[vm/kernel/bytecode] Revise access to instance fields in bytecode
Constant pool:
* Field constant pool entry is renamed to StaticField
* FieldOffset constant pool entry is replaced with InstanceField.
InstanceField occupies 2 slots for field offset and field object.
* ContextOffset constant pool entry is removed.
* TypeArgumentsFieldOffset is renamed to TypeArgumentsField
Bytecodes:
* LoadFieldTOS and StoreFieldTOS require InstanceField entry.
* New bytecodes added: LoadContextParent, StoreContextParent,
LoadContextVar, StoreContextVar, LoadTypeArgumentsField.
This CL is a preparation for compilation of bytecodes related
to instance field accesses.
Change-Id: I1d6274e94bd7cd764e4fc83d9847daf4f21e5a25
Reviewed-on: https://dart-review.googlesource.com/68843
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: RĂ©gis Crelier <regis@google.com>
diff --git a/pkg/vm/lib/bytecode/assembler.dart b/pkg/vm/lib/bytecode/assembler.dart
index dcbb60d..aec44bf 100644
--- a/pkg/vm/lib/bytecode/assembler.dart
+++ b/pkg/vm/lib/bytecode/assembler.dart
@@ -776,6 +776,14 @@
emitWord(_encodeD(Opcode.kStoreFieldTOS, rd));
}
+ void emitStoreContextParent() {
+ emitWord(_encode0(Opcode.kStoreContextParent));
+ }
+
+ void emitStoreContextVar(int rd) {
+ emitWord(_encodeD(Opcode.kStoreContextVar, rd));
+ }
+
void emitLoadField(int ra, int rb, int rc) {
emitWord(_encodeABC(Opcode.kLoadField, ra, rb, rc));
}
@@ -792,6 +800,18 @@
emitWord(_encodeD(Opcode.kLoadFieldTOS, rd));
}
+ void emitLoadTypeArgumentsField(int rd) {
+ emitWord(_encodeD(Opcode.kLoadTypeArgumentsField, rd));
+ }
+
+ void emitLoadContextParent() {
+ emitWord(_encode0(Opcode.kLoadContextParent));
+ }
+
+ void emitLoadContextVar(int rd) {
+ emitWord(_encodeD(Opcode.kLoadContextVar, rd));
+ }
+
void emitBooleanNegateTOS() {
emitWord(_encode0(Opcode.kBooleanNegateTOS));
}
diff --git a/pkg/vm/lib/bytecode/constant_pool.dart b/pkg/vm/lib/bytecode/constant_pool.dart
index a8661bb..e09d313 100644
--- a/pkg/vm/lib/bytecode/constant_pool.dart
+++ b/pkg/vm/lib/bytecode/constant_pool.dart
@@ -77,12 +77,13 @@
ConstantIndex argDesc;
}
-type ConstantField extends ConstantPoolEntry {
+type ConstantStaticField extends ConstantPoolEntry {
Byte tag = 9;
CanonicalNameReference field;
}
-type ConstantFieldOffset extends ConstantPoolEntry {
+// Occupies 2 entries in the constant pool.
+type ConstantInstanceField extends ConstantPoolEntry {
Byte tag = 10;
CanonicalNameReference field;
}
@@ -92,7 +93,7 @@
CanonicalNameReference class;
}
-type ConstantTypeArgumentsFieldOffset extends ConstantPoolEntry {
+type ConstantTypeArgumentsField extends ConstantPoolEntry {
Byte tag = 12;
CanonicalNameReference class;
}
@@ -136,34 +137,27 @@
List<DartType> types;
}
-type ConstantContextOffset extends ConstantPoolEntry {
- Byte tag = 20;
- // 0 = Offset of 'parent' field in Context object.
- // 1 + i = Offset of i-th variable in Context object.
- UInt index;
-}
-
type ConstantClosureFunction extends ConstantPoolEntry {
- Byte tag = 21;
+ Byte tag = 20;
StringReference name;
FunctionNode function; // Doesn't have a body.
}
type ConstantEndClosureFunctionScope extends ConstantPoolEntry {
- Byte tag = 22;
+ Byte tag = 21;
}
type ConstantNativeEntry extends ConstantPoolEntry {
- Byte tag = 23;
+ Byte tag = 22;
StringReference nativeName;
}
type ConstantSubtypeTestCache extends ConstantPoolEntry {
- Byte tag = 24;
+ Byte tag = 23;
}
type ConstantPartialTearOffInstantiation extends ConstantPoolEntry {
- Byte tag = 25;
+ Byte tag = 24;
ConstantIndex tearOffConstant;
ConstantIndex typeArguments;
}
@@ -180,10 +174,10 @@
kArgDesc,
kICData,
kStaticICData,
- kField,
- kFieldOffset,
+ kStaticField,
+ kInstanceField,
kClass,
- kTypeArgumentsFieldOffset,
+ kTypeArgumentsField,
kTearOff,
kType,
kTypeArguments,
@@ -191,7 +185,6 @@
kInstance,
kSymbol,
kTypeArgumentsForInstanceAllocation,
- kContextOffset,
kClosureFunction,
kEndClosureFunctionScope,
kNativeEntry,
@@ -204,6 +197,10 @@
ConstantTag get tag;
+ // Returns number of extra reserved constant pool entries
+ // following this entry.
+ int get numReservedEntries => 0;
+
void writeToBinary(BinarySink sink) {
sink.writeUInt30(tag.index);
writeValueToBinary(sink);
@@ -232,14 +229,14 @@
return new ConstantStaticICData.readFromBinary(source);
case ConstantTag.kArgDesc:
return new ConstantArgDesc.readFromBinary(source);
- case ConstantTag.kField:
- return new ConstantField.readFromBinary(source);
- case ConstantTag.kFieldOffset:
- return new ConstantFieldOffset.readFromBinary(source);
+ case ConstantTag.kStaticField:
+ return new ConstantStaticField.readFromBinary(source);
+ case ConstantTag.kInstanceField:
+ return new ConstantInstanceField.readFromBinary(source);
case ConstantTag.kClass:
return new ConstantClass.readFromBinary(source);
- case ConstantTag.kTypeArgumentsFieldOffset:
- return new ConstantTypeArgumentsFieldOffset.readFromBinary(source);
+ case ConstantTag.kTypeArgumentsField:
+ return new ConstantTypeArgumentsField.readFromBinary(source);
case ConstantTag.kTearOff:
return new ConstantTearOff.readFromBinary(source);
case ConstantTag.kType:
@@ -255,8 +252,6 @@
case ConstantTag.kTypeArgumentsForInstanceAllocation:
return new ConstantTypeArgumentsForInstanceAllocation.readFromBinary(
source);
- case ConstantTag.kContextOffset:
- return new ConstantContextOffset.readFromBinary(source);
case ConstantTag.kClosureFunction:
return new ConstantClosureFunction.readFromBinary(source);
case ConstantTag.kEndClosureFunctionScope:
@@ -572,64 +567,65 @@
bool operator ==(other) => identical(this, other);
}
-class ConstantField extends ConstantPoolEntry {
+class ConstantStaticField extends ConstantPoolEntry {
final Reference _reference;
Field get field => _reference.asField;
- ConstantField(Field field) : this.byReference(field.reference);
- ConstantField.byReference(this._reference);
+ ConstantStaticField(Field field) : this.byReference(field.reference);
+ ConstantStaticField.byReference(this._reference);
@override
- ConstantTag get tag => ConstantTag.kField;
+ ConstantTag get tag => ConstantTag.kStaticField;
@override
void writeValueToBinary(BinarySink sink) {
sink.writeCanonicalNameReference(getCanonicalNameOfMember(field));
}
- ConstantField.readFromBinary(BinarySource source)
+ ConstantStaticField.readFromBinary(BinarySource source)
: _reference = source.readCanonicalNameReference().getReference();
@override
- String toString() => 'Field $field';
+ String toString() => 'StaticField $field';
@override
int get hashCode => field.hashCode;
@override
bool operator ==(other) =>
- other is ConstantField && this.field == other.field;
+ other is ConstantStaticField && this.field == other.field;
}
-class ConstantFieldOffset extends ConstantPoolEntry {
+class ConstantInstanceField extends ConstantPoolEntry {
final Reference _reference;
Field get field => _reference.asField;
+ int get numReservedEntries => 1;
- ConstantFieldOffset(Field field) : this.byReference(field.reference);
- ConstantFieldOffset.byReference(this._reference);
+ ConstantInstanceField(Field field) : this.byReference(field.reference);
+ ConstantInstanceField.byReference(this._reference);
@override
- ConstantTag get tag => ConstantTag.kFieldOffset;
+ ConstantTag get tag => ConstantTag.kInstanceField;
@override
void writeValueToBinary(BinarySink sink) {
sink.writeCanonicalNameReference(getCanonicalNameOfMember(field));
}
- ConstantFieldOffset.readFromBinary(BinarySource source)
+ ConstantInstanceField.readFromBinary(BinarySource source)
: _reference = source.readCanonicalNameReference().getReference();
@override
- String toString() => 'FieldOffset $field';
+ String toString() => 'InstanceField $field';
@override
int get hashCode => field.hashCode;
@override
bool operator ==(other) =>
- other is ConstantFieldOffset && this.field == other.field;
+ other is ConstantInstanceField && this.field == other.field;
}
class ConstantClass extends ConstantPoolEntry {
@@ -662,36 +658,34 @@
other is ConstantClass && this.classNode == other.classNode;
}
-class ConstantTypeArgumentsFieldOffset extends ConstantPoolEntry {
+class ConstantTypeArgumentsField extends ConstantPoolEntry {
final Reference _reference;
Class get classNode => _reference.asClass;
- ConstantTypeArgumentsFieldOffset(Class class_)
- : this.byReference(class_.reference);
- ConstantTypeArgumentsFieldOffset.byReference(this._reference);
+ ConstantTypeArgumentsField(Class class_) : this.byReference(class_.reference);
+ ConstantTypeArgumentsField.byReference(this._reference);
@override
- ConstantTag get tag => ConstantTag.kTypeArgumentsFieldOffset;
+ ConstantTag get tag => ConstantTag.kTypeArgumentsField;
@override
void writeValueToBinary(BinarySink sink) {
sink.writeCanonicalNameReference(getCanonicalNameOfClass(classNode));
}
- ConstantTypeArgumentsFieldOffset.readFromBinary(BinarySource source)
+ ConstantTypeArgumentsField.readFromBinary(BinarySource source)
: _reference = source.readCanonicalNameReference().getReference();
@override
- String toString() => 'TypeArgumentsFieldOffset $classNode';
+ String toString() => 'TypeArgumentsField $classNode';
@override
int get hashCode => classNode.hashCode;
@override
bool operator ==(other) =>
- other is ConstantTypeArgumentsFieldOffset &&
- this.classNode == other.classNode;
+ other is ConstantTypeArgumentsField && this.classNode == other.classNode;
}
class ConstantTearOff extends ConstantPoolEntry {
@@ -949,39 +943,6 @@
listEquals(this.typeArgs, other.typeArgs);
}
-class ConstantContextOffset extends ConstantPoolEntry {
- static const int kParent = 0;
- static const int kVariableBase = 1;
-
- final int _index;
-
- ConstantContextOffset._(this._index);
- ConstantContextOffset.parent() : this._(kParent);
- ConstantContextOffset.variable(int index) : this._(index + kVariableBase);
-
- @override
- ConstantTag get tag => ConstantTag.kContextOffset;
-
- @override
- void writeValueToBinary(BinarySink sink) {
- sink.writeUInt30(_index);
- }
-
- ConstantContextOffset.readFromBinary(BinarySource source)
- : _index = source.readUInt();
-
- @override
- String toString() =>
- 'ContextOffset ${_index == kParent ? 'parent' : 'var [${_index - kVariableBase}]'}';
-
- @override
- int get hashCode => _index;
-
- @override
- bool operator ==(other) =>
- other is ConstantContextOffset && this._index == other._index;
-}
-
class ConstantClosureFunction extends ConstantPoolEntry {
final String name;
final FunctionNode function;
@@ -1133,6 +1094,18 @@
this.typeArgumentsConstantIndex == other.typeArgumentsConstantIndex;
}
+/// Reserved constant pool entry.
+class _ReservedConstantPoolEntry extends ConstantPoolEntry {
+ const _ReservedConstantPoolEntry();
+
+ ConstantTag get tag => throw 'This constant pool entry is reserved';
+ void writeValueToBinary(BinarySink sink) =>
+ throw 'This constant pool entry is reserved';
+
+ @override
+ String toString() => 'Reserved';
+}
+
class ConstantPool {
final List<ConstantPoolEntry> entries = <ConstantPoolEntry>[];
final Map<ConstantPoolEntry, int> _canonicalizationCache =
@@ -1143,11 +1116,18 @@
int add(ConstantPoolEntry entry) {
return _canonicalizationCache.putIfAbsent(entry, () {
int index = entries.length;
- entries.add(entry);
+ _addEntry(entry);
return index;
});
}
+ void _addEntry(ConstantPoolEntry entry) {
+ entries.add(entry);
+ for (int i = 0; i < entry.numReservedEntries; ++i) {
+ entries.add(const _ReservedConstantPoolEntry());
+ }
+ }
+
void writeToBinary(Node node, BinarySink sink) {
final function = (node as Member).function;
sink.enterScope(
@@ -1157,6 +1137,10 @@
sink.writeUInt30(entries.length);
entries.forEach((e) {
+ if (e is _ReservedConstantPoolEntry) {
+ return;
+ }
+
e.writeToBinary(sink);
if (e is ConstantClosureFunction) {
@@ -1185,7 +1169,8 @@
int len = source.readUInt();
for (int i = 0; i < len; i++) {
final e = new ConstantPoolEntry.readFromBinary(source);
- entries.add(e);
+ _addEntry(e);
+ i += e.numReservedEntries;
if (e is ConstantClosureFunction) {
source.enterScope(typeParameters: e.function.typeParameters);
diff --git a/pkg/vm/lib/bytecode/dbc.dart b/pkg/vm/lib/bytecode/dbc.dart
index a3b002b..809c47c 100644
--- a/pkg/vm/lib/bytecode/dbc.dart
+++ b/pkg/vm/lib/bytecode/dbc.dart
@@ -7,8 +7,7 @@
// List of changes from original DBC (described in runtime/vm/constants_dbc.h):
//
// 1. StoreFieldTOS, LoadFieldTOS instructions:
-// D = index of constant pool entry with FieldOffset,
-// TypeArgumentsFieldOffset or ConstantContextOffset tags
+// D = index of constant pool entry with InstanceField tag.
// (instead of field offset in words).
//
// 2. EntryOptional instruction is revived in order to re-shuffle optional
@@ -22,6 +21,19 @@
// target if assertions are not enabled. It has the same format as Jump
// instruction.
//
+// 5. StoreContextParent stores context SP[0] into `parent` field of context SP[-1].
+//
+// 6. LoadContextParent loads parent from context SP[0].
+//
+// 7. StoreContextVar stores value SP[0] into context SP[-1] at index D.
+//
+// 8. LoadContextVar loads value from context SP[0] at index D.
+//
+// 9. LoadTypeArgumentsField loads instantiator type arguments from an
+// instance SP[0].
+// D = index of TypeArgumentsField constant pool entry corresponding
+// to an instance's class.
+//
enum Opcode {
kTrap,
@@ -183,10 +195,15 @@
kStoreField,
kStoreFieldExt,
kStoreFieldTOS,
+ kStoreContextParent,
+ kStoreContextVar,
kLoadField,
kLoadFieldExt,
kLoadUntagged,
kLoadFieldTOS,
+ kLoadTypeArgumentsField,
+ kLoadContextParent,
+ kLoadContextVar,
kBooleanNegateTOS,
kBooleanNegate,
kThrow,
@@ -571,6 +588,10 @@
Encoding.kAD, const [Operand.reg, Operand.reg, Operand.none]),
Opcode.kStoreFieldTOS: const Format(
Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
+ Opcode.kStoreContextParent: const Format(
+ Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+ Opcode.kStoreContextVar: const Format(
+ Encoding.kD, const [Operand.imm, Operand.none, Operand.none]),
Opcode.kLoadField: const Format(
Encoding.kABC, const [Operand.reg, Operand.reg, Operand.imm]),
Opcode.kLoadFieldExt: const Format(
@@ -579,6 +600,12 @@
Encoding.kABC, const [Operand.reg, Operand.reg, Operand.imm]),
Opcode.kLoadFieldTOS: const Format(
Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
+ Opcode.kLoadTypeArgumentsField: const Format(
+ Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
+ Opcode.kLoadContextParent: const Format(
+ Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+ Opcode.kLoadContextVar: const Format(
+ Encoding.kD, const [Operand.imm, Operand.none, Operand.none]),
Opcode.kBooleanNegateTOS: const Format(
Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
Opcode.kBooleanNegate: const Format(
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 9414531..bb017ed 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -277,7 +277,7 @@
_genPushReceiver();
initializer.accept(this);
- final int cpIndex = cp.add(new ConstantFieldOffset(field));
+ final int cpIndex = cp.add(new ConstantInstanceField(field));
asm.emitStoreFieldTOS(cpIndex);
}
@@ -411,8 +411,8 @@
} else {
_genPushReceiver();
final int cpIndex =
- cp.add(new ConstantTypeArgumentsFieldOffset(enclosingClass));
- asm.emitLoadFieldTOS(cpIndex);
+ cp.add(new ConstantTypeArgumentsField(enclosingClass));
+ asm.emitLoadTypeArgumentsField(cpIndex);
}
} else {
_genPushNull();
@@ -477,9 +477,8 @@
asm.emitPush(locals.contextVarIndexInFrame);
if (depth > 0) {
- int cpIndex = cp.add(new ConstantContextOffset.parent());
for (; depth > 0; --depth) {
- asm.emitLoadFieldTOS(cpIndex);
+ asm.emitLoadContextParent();
}
}
}
@@ -493,9 +492,7 @@
void _genLoadVar(VariableDeclaration v, {int currentContextLevel}) {
if (locals.isCaptured(v)) {
_genPushContextForVariable(v, currentContextLevel: currentContextLevel);
- final int cpIndex = cp.add(
- new ConstantContextOffset.variable(locals.getVarIndexInContext(v)));
- asm.emitLoadFieldTOS(cpIndex);
+ asm.emitLoadContextVar(locals.getVarIndexInContext(v));
} else {
asm.emitPush(locals.getVarIndexInFrame(v));
}
@@ -511,9 +508,7 @@
// If variable is captured, context should be pushed before value.
void _genStoreVar(VariableDeclaration variable) {
if (locals.isCaptured(variable)) {
- final int cpIndex = cp.add(new ConstantContextOffset.variable(
- locals.getVarIndexInContext(variable)));
- asm.emitStoreFieldTOS(cpIndex);
+ asm.emitStoreContextVar(locals.getVarIndexInContext(variable));
} else {
asm.emitPopLocal(locals.getVarIndexInFrame(variable));
}
@@ -732,7 +727,7 @@
if (isClosure) {
asm.emitPush(locals.closureVarIndexInFrame);
- asm.emitLoadFieldTOS(cp.add(new ConstantFieldOffset(closureContext)));
+ asm.emitLoadFieldTOS(cp.add(new ConstantInstanceField(closureContext)));
asm.emitPopLocal(locals.contextVarIndexInFrame);
}
@@ -749,7 +744,7 @@
asm.emitPush(locals.functionTypeArgsVarIndexInFrame);
asm.emitPush(locals.closureVarIndexInFrame);
asm.emitLoadFieldTOS(
- cp.add(new ConstantFieldOffset(closureFunctionTypeArguments)));
+ cp.add(new ConstantInstanceField(closureFunctionTypeArguments)));
_genPushInt(numParentTypeArgs);
_genPushInt(numParentTypeArgs + function.typeParameters.length);
_genStaticCall(prependTypeArguments, new ConstantArgDesc(4), 4);
@@ -757,7 +752,7 @@
} else {
asm.emitPush(locals.closureVarIndexInFrame);
asm.emitLoadFieldTOS(
- cp.add(new ConstantFieldOffset(closureFunctionTypeArguments)));
+ cp.add(new ConstantInstanceField(closureFunctionTypeArguments)));
asm.emitPopLocal(locals.functionTypeArgsVarIndexInFrame);
}
}
@@ -962,23 +957,23 @@
asm.emitPush(temp);
_genPushInstantiatorTypeArguments();
asm.emitStoreFieldTOS(
- cp.add(new ConstantFieldOffset(closureInstantiatorTypeArguments)));
+ cp.add(new ConstantInstanceField(closureInstantiatorTypeArguments)));
asm.emitPush(temp);
_genPushFunctionTypeArguments();
asm.emitStoreFieldTOS(
- cp.add(new ConstantFieldOffset(closureFunctionTypeArguments)));
+ cp.add(new ConstantInstanceField(closureFunctionTypeArguments)));
// TODO(alexmarkov): How to put Object::empty_type_arguments()
// to _delayed_type_arguments?
asm.emitPush(temp);
asm.emitPushConstant(closureFunctionIndex);
- asm.emitStoreFieldTOS(cp.add(new ConstantFieldOffset(closureFunction)));
+ asm.emitStoreFieldTOS(cp.add(new ConstantInstanceField(closureFunction)));
asm.emitPush(temp);
asm.emitPush(locals.contextVarIndexInFrame);
- asm.emitStoreFieldTOS(cp.add(new ConstantFieldOffset(closureContext)));
+ asm.emitStoreFieldTOS(cp.add(new ConstantInstanceField(closureContext)));
}
void _genClosure(TreeNode node, String name, FunctionNode function) {
@@ -994,7 +989,7 @@
if (locals.currentContextLevel > 0) {
_genDupTOS(locals.scratchVarIndexInFrame);
asm.emitPush(locals.contextVarIndexInFrame);
- asm.emitStoreFieldTOS(cp.add(new ConstantContextOffset.parent()));
+ asm.emitStoreContextParent();
}
asm.emitPopLocal(locals.contextVarIndexInFrame);
@@ -1018,7 +1013,7 @@
assert(currentContextLevel >= targetContextLevel);
while (currentContextLevel > targetContextLevel) {
asm.emitPush(locals.contextVarIndexInFrame);
- asm.emitLoadFieldTOS(cp.add(new ConstantContextOffset.parent()));
+ asm.emitLoadContextParent();
asm.emitPopLocal(locals.contextVarIndexInFrame);
--currentContextLevel;
}
@@ -1305,7 +1300,7 @@
_genTypeArguments(node.typeArguments);
asm.emitStoreFieldTOS(
- cp.add(new ConstantFieldOffset(closureDelayedTypeArguments)));
+ cp.add(new ConstantInstanceField(closureDelayedTypeArguments)));
// Copy the rest of the fields from old closure to a new closure.
final fieldsToCopy = <Field>[
@@ -1316,7 +1311,7 @@
];
for (Field field in fieldsToCopy) {
- final fieldOffsetCpIndex = cp.add(new ConstantFieldOffset(field));
+ final fieldOffsetCpIndex = cp.add(new ConstantInstanceField(field));
asm.emitPush(newClosure);
asm.emitPush(oldClosure);
asm.emitLoadFieldTOS(fieldOffsetCpIndex);
@@ -1604,7 +1599,7 @@
if (target.isConst) {
_genPushConstExpr(target.initializer);
} else if (_hasTrivialInitializer(target)) {
- final fieldIndex = cp.add(new ConstantField(target));
+ final fieldIndex = cp.add(new ConstantStaticField(target));
asm.emitPushConstant(
fieldIndex); // TODO(alexmarkov): do we really need this?
asm.emitPushStatic(fieldIndex);
@@ -1656,7 +1651,7 @@
final target = node.target;
if (target is Field) {
- int cpIndex = cp.add(new ConstantField(target));
+ int cpIndex = cp.add(new ConstantStaticField(target));
asm.emitStoreStaticTOS(cpIndex);
} else {
_genStaticCall(target, new ConstantArgDesc(1), 1, isSet: true);
@@ -2124,7 +2119,7 @@
// 1. Restore context from closure var.
// This context has a context level at frame entry.
asm.emitPush(locals.closureVarIndexInFrame);
- asm.emitLoadFieldTOS(cp.add(new ConstantFieldOffset(closureContext)));
+ asm.emitLoadFieldTOS(cp.add(new ConstantInstanceField(closureContext)));
asm.emitPopLocal(locals.contextVarIndexInFrame);
// 2. Restore context from captured :saved_try_context_var${depth}.
@@ -2309,9 +2304,7 @@
_genPushNull();
}
if (isCaptured) {
- final int cpIndex = cp.add(new ConstantContextOffset.variable(
- locals.getVarIndexInContext(node)));
- asm.emitStoreFieldTOS(cpIndex);
+ asm.emitStoreContextVar(locals.getVarIndexInContext(node));
} else {
asm.emitPopLocal(locals.getVarIndexInFrame(node));
}
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index c20cd65..acc535f 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -7,17 +7,17 @@
Bytecode {
Entry 3
CheckStack
- Allocate CP#29
+ Allocate CP#21
StoreLocal r2
Push r2
- PushConstant CP#4
- StoreFieldTOS CP#30
+ PushConstant CP#3
+ StoreFieldTOS CP#22
Push r2
- PushConstant CP#4
- StoreFieldTOS CP#31
+ PushConstant CP#3
+ StoreFieldTOS CP#24
Push r2
PushConstant CP#0
- StoreFieldTOS CP#32
+ StoreFieldTOS CP#26
Push r2
Push r0
StoreFieldTOS CP#1
@@ -25,85 +25,80 @@
}
ConstantPool {
[0] = ClosureFunction <anonymous closure> (dart.async::Future<dart.core::int> x) → dart.async::Future<dart.core::Null> /* originally async */ ;
- [1] = FieldOffset dart.core::_Closure::_context
- [2] = ContextOffset parent
- [3] = ContextOffset var [0]
- [4] = Null
- [5] = Type dart.async::Future<dart.core::int>
- [6] = String 'x'
- [7] = SubtypeTestCache
- [8] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::Null]
- [9] = ArgDesc num-args 1, num-type-args 0, names []
- [10] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#9
- [11] = ContextOffset var [6]
- [12] = ContextOffset var [7]
- [13] = ContextOffset var [3]
- [14] = ContextOffset var [4]
- [15] = Int 0
- [16] = ContextOffset var [1]
- [17] = ContextOffset var [2]
- [18] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [19] = Int 1
- [20] = ContextOffset var [5]
- [21] = ArgDesc num-args 4, num-type-args 0, names []
- [22] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#21
- [23] = ArgDesc num-args 2, num-type-args 0, names []
- [24] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#23
- [25] = Type dynamic
- [26] = ArgDesc num-args 3, num-type-args 0, names []
- [27] = ICData target-name 'completeError', arg-desc CP#26
- [28] = EndClosureFunctionScope
- [29] = Class dart.core::_Closure
- [30] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [31] = FieldOffset dart.core::_Closure::_function_type_arguments
- [32] = FieldOffset dart.core::_Closure::_function
- [33] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#9
- [34] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#9
- [35] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#9
- [36] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [37] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#23
- [38] = ICData get target-name 'future', arg-desc CP#9
- [39] = EndClosureFunctionScope
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = Null
+ [4] = Type dart.async::Future<dart.core::int>
+ [5] = String 'x'
+ [6] = SubtypeTestCache
+ [7] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::Null]
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#8
+ [10] = Int 0
+ [11] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [12] = Int 1
+ [13] = ArgDesc num-args 4, num-type-args 0, names []
+ [14] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#13
+ [15] = ArgDesc num-args 2, num-type-args 0, names []
+ [16] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#15
+ [17] = Type dynamic
+ [18] = ArgDesc num-args 3, num-type-args 0, names []
+ [19] = ICData target-name 'completeError', arg-desc CP#18
+ [20] = EndClosureFunctionScope
+ [21] = Class dart.core::_Closure
+ [22] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [23] = Reserved
+ [24] = InstanceField dart.core::_Closure::_function_type_arguments
+ [25] = Reserved
+ [26] = InstanceField dart.core::_Closure::_function
+ [27] = Reserved
+ [28] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#8
+ [29] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#8
+ [30] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#8
+ [31] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [32] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
+ [33] = ICData get target-name 'future', arg-desc CP#8
+ [34] = EndClosureFunctionScope
}
-Closure CP#18 {
+Closure CP#11 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#4
- LoadConstant r2, CP#4
- LoadConstant r3, CP#4
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 6
CheckStack
Push r0
LoadFieldTOS CP#1
PopLocal r4
Push r4
- LoadFieldTOS CP#3
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#15
+ PushConstant CP#10
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#17
+ StoreContextVar 2
Try #0 start:
Push r4
- PushConstant CP#19
- StoreFieldTOS CP#3
+ PushConstant CP#12
+ StoreContextVar 0
Push r4
Push r4
- StoreFieldTOS CP#16
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#2
- LoadFieldTOS CP#3
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#13
+ LoadContextVar 3
Push r4
- LoadFieldTOS CP#14
+ LoadContextVar 4
Push r4
- LoadFieldTOS CP#20
- PushConstant CP#22
- IndirectStaticCall 4, CP#21
+ LoadContextVar 5
+ PushConstant CP#14
+ IndirectStaticCall 4, CP#13
PopLocal r8
- PushConstant CP#4
+ PushConstant CP#3
ReturnTOS
L4:
IfEqNull r2
@@ -115,13 +110,13 @@
Push r1
Drop1
Push r4
- LoadFieldTOS CP#11
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#12
- PushConstant CP#24
- IndirectStaticCall 2, CP#23
+ LoadContextVar 7
+ PushConstant CP#16
+ IndirectStaticCall 2, CP#15
Drop1
- PushConstant CP#4
+ PushConstant CP#3
ReturnTOS
Jump L3
Try #0 end:
@@ -130,7 +125,7 @@
LoadFieldTOS CP#1
PopLocal r4
Push r4
- LoadFieldTOS CP#17
+ LoadContextVar 2
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -139,18 +134,18 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#11
+ LoadContextVar 6
Push r8
Push r9
- InstanceCall1 3, CP#27
+ InstanceCall1 3, CP#19
Drop1
Jump L3
L3:
- PushConstant CP#4
+ PushConstant CP#3
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#16
+ LoadContextVar 1
PopLocal r4
Jump L4
@@ -166,96 +161,96 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#2
+ StoreContextParent
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#3
+ StoreContextVar 0
Push FP[-5]
- PushConstant CP#4
+ PushConstant CP#3
+ PushConstant CP#3
PushConstant CP#4
PushConstant CP#5
- PushConstant CP#6
- AssertAssignable 0, CP#7
+ AssertAssignable 0, CP#6
Drop1
AllocateContext 8
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#2
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#8
- PushConstant CP#10
- IndirectStaticCall 1, CP#9
- StoreFieldTOS CP#11
+ PushConstant CP#7
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
+ StoreContextVar 6
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#12
- PushConstant CP#4
+ PushConstant CP#3
+ StoreContextVar 7
+ PushConstant CP#3
PopLocal r2
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#13
+ PushConstant CP#3
+ StoreContextVar 3
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#14
+ PushConstant CP#3
+ StoreContextVar 4
Push r0
- PushConstant CP#15
- StoreFieldTOS CP#3
+ PushConstant CP#10
+ StoreContextVar 0
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#16
+ PushConstant CP#3
+ StoreContextVar 1
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#17
+ PushConstant CP#3
+ StoreContextVar 2
Push r0
- Allocate CP#29
+ Allocate CP#21
StoreLocal r3
Push r3
- PushConstant CP#4
- StoreFieldTOS CP#30
+ PushConstant CP#3
+ StoreFieldTOS CP#22
Push r3
- PushConstant CP#4
- StoreFieldTOS CP#31
+ PushConstant CP#3
+ StoreFieldTOS CP#24
Push r3
- PushConstant CP#18
- StoreFieldTOS CP#32
+ PushConstant CP#11
+ StoreFieldTOS CP#26
Push r3
Push r0
StoreFieldTOS CP#1
- StoreFieldTOS CP#20
+ StoreContextVar 5
Push r0
- LoadFieldTOS CP#20
- PushConstant CP#33
- IndirectStaticCall 1, CP#9
+ LoadContextVar 5
+ PushConstant CP#28
+ IndirectStaticCall 1, CP#8
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#20
- PushConstant CP#34
- IndirectStaticCall 1, CP#9
- StoreFieldTOS CP#13
+ LoadContextVar 5
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#8
+ StoreContextVar 3
Push r0
Push r0
- LoadFieldTOS CP#20
- PushConstant CP#35
- IndirectStaticCall 1, CP#9
- StoreFieldTOS CP#14
- PushConstant CP#36
+ LoadContextVar 5
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#8
+ StoreContextVar 4
+ PushConstant CP#31
Push r0
- LoadFieldTOS CP#20
- PushConstant CP#37
- IndirectStaticCall 2, CP#23
+ LoadContextVar 5
+ PushConstant CP#32
+ IndirectStaticCall 2, CP#15
Drop1
Push r0
- LoadFieldTOS CP#11
- InstanceCall1 1, CP#38
+ LoadContextVar 6
+ InstanceCall1 1, CP#33
ReturnTOS
Push r0
- LoadFieldTOS CP#2
+ LoadContextParent
PopLocal r0
- PushConstant CP#4
+ PushConstant CP#3
ReturnTOS
}
@@ -295,133 +290,132 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#1
- PushConstant CP#3
- IndirectStaticCall 1, CP#2
- StoreFieldTOS CP#4
+ PushConstant CP#0
+ PushConstant CP#2
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 3
Push r0
- PushConstant CP#5
- StoreFieldTOS CP#6
- PushConstant CP#5
+ PushConstant CP#3
+ StoreContextVar 2
+ PushConstant CP#3
PopLocal r2
- PushConstant CP#5
+ PushConstant CP#3
PopLocal r3
- PushConstant CP#5
+ PushConstant CP#3
PopLocal r4
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#8
+ PushConstant CP#4
+ StoreContextVar 0
Push r0
- PushConstant CP#5
- StoreFieldTOS CP#9
- Allocate CP#19
+ PushConstant CP#3
+ StoreContextVar 1
+ Allocate CP#15
StoreLocal r6
Push r6
+ PushConstant CP#3
+ StoreFieldTOS CP#16
+ Push r6
+ PushConstant CP#3
+ StoreFieldTOS CP#18
+ Push r6
PushConstant CP#5
StoreFieldTOS CP#20
Push r6
- PushConstant CP#5
- StoreFieldTOS CP#21
- Push r6
- PushConstant CP#10
- StoreFieldTOS CP#22
- Push r6
Push r0
- StoreFieldTOS CP#11
+ StoreFieldTOS CP#6
PopLocal r5
Push r5
- PushConstant CP#23
- IndirectStaticCall 1, CP#2
+ PushConstant CP#22
+ IndirectStaticCall 1, CP#1
PopLocal r2
Push r5
- PushConstant CP#24
- IndirectStaticCall 1, CP#2
+ PushConstant CP#23
+ IndirectStaticCall 1, CP#1
PopLocal r3
Push r5
- PushConstant CP#25
- IndirectStaticCall 1, CP#2
+ PushConstant CP#24
+ IndirectStaticCall 1, CP#1
PopLocal r4
- PushConstant CP#26
+ PushConstant CP#25
Push r5
- PushConstant CP#27
- IndirectStaticCall 2, CP#13
+ PushConstant CP#26
+ IndirectStaticCall 2, CP#9
Drop1
Push r0
- LoadFieldTOS CP#4
- InstanceCall1 1, CP#28
+ LoadContextVar 3
+ InstanceCall1 1, CP#27
ReturnTOS
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
- PushConstant CP#5
+ PushConstant CP#3
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset parent
- [1] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [2] = ArgDesc num-args 1, num-type-args 0, names []
- [3] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#2
- [4] = ContextOffset var [3]
- [5] = Null
- [6] = ContextOffset var [2]
- [7] = Int 0
- [8] = ContextOffset var [0]
- [9] = ContextOffset var [1]
- [10] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [11] = FieldOffset dart.core::_Closure::_context
- [12] = Int 42
- [13] = ArgDesc num-args 2, num-type-args 0, names []
- [14] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#13
- [15] = Type dynamic
- [16] = ArgDesc num-args 3, num-type-args 0, names []
- [17] = ICData target-name 'completeError', arg-desc CP#16
- [18] = EndClosureFunctionScope
- [19] = Class dart.core::_Closure
- [20] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [21] = FieldOffset dart.core::_Closure::_function_type_arguments
- [22] = FieldOffset dart.core::_Closure::_function
- [23] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#2
- [24] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#2
- [25] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#2
- [26] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [27] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#13
- [28] = ICData get target-name 'future', arg-desc CP#2
+ [0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [1] = ArgDesc num-args 1, num-type-args 0, names []
+ [2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
+ [3] = Null
+ [4] = Int 0
+ [5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = Int 42
+ [9] = ArgDesc num-args 2, num-type-args 0, names []
+ [10] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
+ [11] = Type dynamic
+ [12] = ArgDesc num-args 3, num-type-args 0, names []
+ [13] = ICData target-name 'completeError', arg-desc CP#12
+ [14] = EndClosureFunctionScope
+ [15] = Class dart.core::_Closure
+ [16] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [17] = Reserved
+ [18] = InstanceField dart.core::_Closure::_function_type_arguments
+ [19] = Reserved
+ [20] = InstanceField dart.core::_Closure::_function
+ [21] = Reserved
+ [22] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [23] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [24] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [25] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [26] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
+ [27] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#10 {
+Closure CP#5 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#5
- LoadConstant r2, CP#5
- LoadConstant r3, CP#5
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#11
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#8
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#7
+ PushConstant CP#4
IfNeStrictNumTOS
Jump L1
Push r4
PopLocal r6
Try #0 start:
Push r4
- PushConstant CP#12
- StoreFieldTOS CP#6
+ PushConstant CP#8
+ StoreContextVar 2
Jump L2
L2:
Push r4
- LoadFieldTOS CP#4
+ LoadContextVar 3
Push r4
- LoadFieldTOS CP#6
- PushConstant CP#14
- IndirectStaticCall 2, CP#13
+ LoadContextVar 2
+ PushConstant CP#10
+ IndirectStaticCall 2, CP#9
Drop1
- PushConstant CP#5
+ PushConstant CP#3
ReturnTOS
Jump L3
Try #0 end:
@@ -435,14 +429,14 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#4
+ LoadContextVar 3
Push r8
Push r9
- InstanceCall1 3, CP#17
+ InstanceCall1 3, CP#13
Drop1
Jump L3
L3:
- PushConstant CP#5
+ PushConstant CP#3
ReturnTOS
L1:
Trap
@@ -483,173 +477,167 @@
PopLocal r0
Push r0
Push FP[-6]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r0
Push FP[-5]
- StoreFieldTOS CP#1
+ StoreContextVar 1
AllocateContext 9
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#2
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
+ PushConstant CP#2
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 8
+ Push r0
PushConstant CP#3
- PushConstant CP#5
- IndirectStaticCall 1, CP#4
- StoreFieldTOS CP#6
- Push r0
- PushConstant CP#7
- StoreFieldTOS CP#8
- PushConstant CP#7
+ StoreContextVar 7
+ PushConstant CP#3
PopLocal r2
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#9
+ PushConstant CP#3
+ StoreContextVar 3
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#10
+ PushConstant CP#3
+ StoreContextVar 4
Push r0
- PushConstant CP#11
- StoreFieldTOS CP#0
+ PushConstant CP#4
+ StoreContextVar 0
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#1
+ PushConstant CP#3
+ StoreContextVar 1
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#12
+ PushConstant CP#3
+ StoreContextVar 2
Push r0
- PushConstant CP#7
- StoreFieldTOS CP#13
+ PushConstant CP#3
+ StoreContextVar 6
Push r0
- Allocate CP#29
+ Allocate CP#20
StoreLocal r3
Push r3
- PushConstant CP#7
- StoreFieldTOS CP#30
+ PushConstant CP#3
+ StoreFieldTOS CP#21
Push r3
- PushConstant CP#7
- StoreFieldTOS CP#31
+ PushConstant CP#3
+ StoreFieldTOS CP#23
Push r3
- PushConstant CP#14
- StoreFieldTOS CP#32
+ PushConstant CP#5
+ StoreFieldTOS CP#25
Push r3
Push r0
- StoreFieldTOS CP#15
- StoreFieldTOS CP#17
+ StoreFieldTOS CP#6
+ StoreContextVar 5
Push r0
- LoadFieldTOS CP#17
- PushConstant CP#33
- IndirectStaticCall 1, CP#4
+ LoadContextVar 5
+ PushConstant CP#27
+ IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#17
- PushConstant CP#34
- IndirectStaticCall 1, CP#4
- StoreFieldTOS CP#9
+ LoadContextVar 5
+ PushConstant CP#28
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 3
Push r0
Push r0
- LoadFieldTOS CP#17
- PushConstant CP#35
- IndirectStaticCall 1, CP#4
- StoreFieldTOS CP#10
- PushConstant CP#36
+ LoadContextVar 5
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 4
+ PushConstant CP#30
Push r0
- LoadFieldTOS CP#17
- PushConstant CP#37
- IndirectStaticCall 2, CP#22
+ LoadContextVar 5
+ PushConstant CP#31
+ IndirectStaticCall 2, CP#13
Drop1
Push r0
- LoadFieldTOS CP#6
- InstanceCall1 1, CP#38
+ LoadContextVar 8
+ InstanceCall1 1, CP#32
ReturnTOS
Push r0
- LoadFieldTOS CP#2
+ LoadContextParent
PopLocal r0
- PushConstant CP#7
+ PushConstant CP#3
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset var [1]
- [2] = ContextOffset parent
- [3] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [4] = ArgDesc num-args 1, num-type-args 0, names []
- [5] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#4
- [6] = ContextOffset var [8]
- [7] = Null
- [8] = ContextOffset var [7]
- [9] = ContextOffset var [3]
- [10] = ContextOffset var [4]
- [11] = Int 0
- [12] = ContextOffset var [2]
- [13] = ContextOffset var [6]
- [14] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [15] = FieldOffset dart.core::_Closure::_context
- [16] = Int 1
- [17] = ContextOffset var [5]
- [18] = ArgDesc num-args 4, num-type-args 0, names []
- [19] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#18
- [20] = Int 2
- [21] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#18
- [22] = ArgDesc num-args 2, num-type-args 0, names []
- [23] = ICData target-name '+', arg-desc CP#22
- [24] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#22
- [25] = Type dynamic
- [26] = ArgDesc num-args 3, num-type-args 0, names []
- [27] = ICData target-name 'completeError', arg-desc CP#26
- [28] = EndClosureFunctionScope
- [29] = Class dart.core::_Closure
- [30] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [31] = FieldOffset dart.core::_Closure::_function_type_arguments
- [32] = FieldOffset dart.core::_Closure::_function
- [33] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#4
- [34] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#4
- [35] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#4
- [36] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [37] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#22
- [38] = ICData get target-name 'future', arg-desc CP#4
+ [0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [1] = ArgDesc num-args 1, num-type-args 0, names []
+ [2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
+ [3] = Null
+ [4] = Int 0
+ [5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = Int 1
+ [9] = ArgDesc num-args 4, num-type-args 0, names []
+ [10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [11] = Int 2
+ [12] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [13] = ArgDesc num-args 2, num-type-args 0, names []
+ [14] = ICData target-name '+', arg-desc CP#13
+ [15] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#13
+ [16] = Type dynamic
+ [17] = ArgDesc num-args 3, num-type-args 0, names []
+ [18] = ICData target-name 'completeError', arg-desc CP#17
+ [19] = EndClosureFunctionScope
+ [20] = Class dart.core::_Closure
+ [21] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [22] = Reserved
+ [23] = InstanceField dart.core::_Closure::_function_type_arguments
+ [24] = Reserved
+ [25] = InstanceField dart.core::_Closure::_function
+ [26] = Reserved
+ [27] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [28] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [29] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [30] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [31] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#13
+ [32] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#14 {
+Closure CP#5 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#7
- LoadConstant r2, CP#7
- LoadConstant r3, CP#7
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#15
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#11
+ PushConstant CP#4
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#12
+ StoreContextVar 2
Try #0 start:
Push r4
- PushConstant CP#16
- StoreFieldTOS CP#0
+ PushConstant CP#8
+ StoreContextVar 0
Push r4
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#2
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#9
+ LoadContextVar 3
Push r4
- LoadFieldTOS CP#10
+ LoadContextVar 4
Push r4
- LoadFieldTOS CP#17
- PushConstant CP#19
- IndirectStaticCall 4, CP#18
+ LoadContextVar 5
+ PushConstant CP#10
+ IndirectStaticCall 4, CP#9
PopLocal r8
- PushConstant CP#7
+ PushConstant CP#3
ReturnTOS
L6:
IfEqNull r2
@@ -660,26 +648,26 @@
L2:
Push r4
Push r1
- StoreFieldTOS CP#13
+ StoreContextVar 6
Push r4
- PushConstant CP#20
- StoreFieldTOS CP#0
+ PushConstant CP#11
+ StoreContextVar 0
Push r4
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#2
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextVar 1
Push r4
- LoadFieldTOS CP#9
+ LoadContextVar 3
Push r4
- LoadFieldTOS CP#10
+ LoadContextVar 4
Push r4
- LoadFieldTOS CP#17
- PushConstant CP#21
- IndirectStaticCall 4, CP#18
+ LoadContextVar 5
+ PushConstant CP#12
+ IndirectStaticCall 4, CP#9
PopLocal r9
- PushConstant CP#7
+ PushConstant CP#3
ReturnTOS
L7:
IfEqNull r2
@@ -690,29 +678,29 @@
L3:
Push r4
Push r4
- LoadFieldTOS CP#13
+ LoadContextVar 6
Push r1
- InstanceCall1 2, CP#23
- StoreFieldTOS CP#8
+ InstanceCall1 2, CP#14
+ StoreContextVar 7
Jump L4
L4:
Push r4
- LoadFieldTOS CP#6
+ LoadContextVar 8
Push r4
- LoadFieldTOS CP#8
- PushConstant CP#24
- IndirectStaticCall 2, CP#22
+ LoadContextVar 7
+ PushConstant CP#15
+ IndirectStaticCall 2, CP#13
Drop1
- PushConstant CP#7
+ PushConstant CP#3
ReturnTOS
Jump L5
Try #0 end:
Try #0 handler:
Push r0
- LoadFieldTOS CP#15
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#12
+ LoadContextVar 2
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -721,21 +709,21 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#6
+ LoadContextVar 8
Push r8
Push r9
- InstanceCall1 3, CP#27
+ InstanceCall1 3, CP#18
Drop1
Jump L5
L5:
- PushConstant CP#7
+ PushConstant CP#3
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#1
+ LoadContextVar 1
PopLocal r4
Push r5
- PushConstant CP#16
+ PushConstant CP#8
IfEqStrictNumTOS
Jump L6
Jump L7
@@ -781,293 +769,286 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
AllocateContext 10
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#5
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 9
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#7
- PushConstant CP#6
+ PushConstant CP#3
+ StoreContextVar 8
+ PushConstant CP#3
PopLocal r2
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#8
+ PushConstant CP#3
+ StoreContextVar 5
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#9
+ PushConstant CP#3
+ StoreContextVar 6
Push r0
- PushConstant CP#10
- StoreFieldTOS CP#0
+ PushConstant CP#4
+ StoreContextVar 0
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#11
+ PushConstant CP#3
+ StoreContextVar 1
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#12
+ PushConstant CP#3
+ StoreContextVar 4
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#13
+ PushConstant CP#3
+ StoreContextVar 3
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#14
+ PushConstant CP#3
+ StoreContextVar 2
Push r0
- Allocate CP#42
+ Allocate CP#32
StoreLocal r3
Push r3
- PushConstant CP#6
- StoreFieldTOS CP#43
+ PushConstant CP#3
+ StoreFieldTOS CP#33
Push r3
- PushConstant CP#6
- StoreFieldTOS CP#44
+ PushConstant CP#3
+ StoreFieldTOS CP#35
Push r3
- PushConstant CP#15
- StoreFieldTOS CP#45
+ PushConstant CP#5
+ StoreFieldTOS CP#37
Push r3
Push r0
- StoreFieldTOS CP#16
- StoreFieldTOS CP#28
+ StoreFieldTOS CP#6
+ StoreContextVar 7
Push r0
- LoadFieldTOS CP#28
- PushConstant CP#46
- IndirectStaticCall 1, CP#3
+ LoadContextVar 7
+ PushConstant CP#39
+ IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#28
- PushConstant CP#47
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#8
+ LoadContextVar 7
+ PushConstant CP#40
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 5
Push r0
Push r0
- LoadFieldTOS CP#28
- PushConstant CP#48
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#9
- PushConstant CP#49
+ LoadContextVar 7
+ PushConstant CP#41
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 6
+ PushConstant CP#42
Push r0
- LoadFieldTOS CP#28
- PushConstant CP#50
- IndirectStaticCall 2, CP#18
+ LoadContextVar 7
+ PushConstant CP#43
+ IndirectStaticCall 2, CP#9
Drop1
Push r0
- LoadFieldTOS CP#5
- InstanceCall1 1, CP#51
+ LoadContextVar 9
+ InstanceCall1 1, CP#44
ReturnTOS
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset parent
- [2] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [3] = ArgDesc num-args 1, num-type-args 0, names []
- [4] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#3
- [5] = ContextOffset var [9]
- [6] = Null
- [7] = ContextOffset var [8]
- [8] = ContextOffset var [5]
- [9] = ContextOffset var [6]
- [10] = Int 0
- [11] = ContextOffset var [1]
- [12] = ContextOffset var [4]
- [13] = ContextOffset var [3]
- [14] = ContextOffset var [2]
- [15] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [16] = FieldOffset dart.core::_Closure::_context
- [17] = Int 10
- [18] = ArgDesc num-args 2, num-type-args 0, names []
- [19] = ICData target-name '<', arg-desc CP#18
- [20] = Bool true
- [21] = ICData get target-name 'iterator', arg-desc CP#3
- [22] = ICData target-name 'moveNext', arg-desc CP#3
- [23] = ICData get target-name 'current', arg-desc CP#3
- [24] = ICData target-name '+', arg-desc CP#18
- [25] = Int 1
- [26] = ArgDesc num-args 0, num-type-args 0, names []
- [27] = StaticICData target '#lib::foo', arg-desc CP#26
- [28] = ContextOffset var [7]
- [29] = ArgDesc num-args 4, num-type-args 0, names []
- [30] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#29
- [31] = ICData target-name '+', arg-desc CP#18
- [32] = ICData target-name '+', arg-desc CP#18
- [33] = ICData target-name '+', arg-desc CP#18
- [34] = ICData target-name '<', arg-desc CP#18
- [35] = ICData target-name '+', arg-desc CP#18
- [36] = ICData target-name '+', arg-desc CP#18
- [37] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#18
- [38] = Type dynamic
- [39] = ArgDesc num-args 3, num-type-args 0, names []
- [40] = ICData target-name 'completeError', arg-desc CP#39
- [41] = EndClosureFunctionScope
- [42] = Class dart.core::_Closure
- [43] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [44] = FieldOffset dart.core::_Closure::_function_type_arguments
- [45] = FieldOffset dart.core::_Closure::_function
- [46] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#3
- [47] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#3
- [48] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#3
- [49] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [50] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#18
- [51] = ICData get target-name 'future', arg-desc CP#3
+ [0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [1] = ArgDesc num-args 1, num-type-args 0, names []
+ [2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
+ [3] = Null
+ [4] = Int 0
+ [5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = Int 10
+ [9] = ArgDesc num-args 2, num-type-args 0, names []
+ [10] = ICData target-name '<', arg-desc CP#9
+ [11] = Bool true
+ [12] = ICData get target-name 'iterator', arg-desc CP#1
+ [13] = ICData target-name 'moveNext', arg-desc CP#1
+ [14] = ICData get target-name 'current', arg-desc CP#1
+ [15] = ICData target-name '+', arg-desc CP#9
+ [16] = Int 1
+ [17] = ArgDesc num-args 0, num-type-args 0, names []
+ [18] = StaticICData target '#lib::foo', arg-desc CP#17
+ [19] = ArgDesc num-args 4, num-type-args 0, names []
+ [20] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#19
+ [21] = ICData target-name '+', arg-desc CP#9
+ [22] = ICData target-name '+', arg-desc CP#9
+ [23] = ICData target-name '+', arg-desc CP#9
+ [24] = ICData target-name '<', arg-desc CP#9
+ [25] = ICData target-name '+', arg-desc CP#9
+ [26] = ICData target-name '+', arg-desc CP#9
+ [27] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
+ [28] = Type dynamic
+ [29] = ArgDesc num-args 3, num-type-args 0, names []
+ [30] = ICData target-name 'completeError', arg-desc CP#29
+ [31] = EndClosureFunctionScope
+ [32] = Class dart.core::_Closure
+ [33] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [34] = Reserved
+ [35] = InstanceField dart.core::_Closure::_function_type_arguments
+ [36] = Reserved
+ [37] = InstanceField dart.core::_Closure::_function
+ [38] = Reserved
+ [39] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [40] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [41] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [42] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [43] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
+ [44] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#15 {
+Closure CP#5 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#6
- LoadConstant r2, CP#6
- LoadConstant r3, CP#6
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 7
CheckStack
Push r0
- LoadFieldTOS CP#16
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#10
+ PushConstant CP#4
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#12
+ StoreContextVar 4
Try #0 start:
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#10
- StoreFieldTOS CP#0
+ PushConstant CP#4
+ StoreContextVar 0
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#10
- StoreFieldTOS CP#0
+ PushConstant CP#4
+ StoreContextVar 0
L6:
CheckStack
Push r4
- LoadFieldTOS CP#0
- PushConstant CP#17
- InstanceCall1 2, CP#19
+ LoadContextVar 0
+ PushConstant CP#8
+ InstanceCall1 2, CP#10
AssertBoolean 0
- PushConstant CP#20
+ PushConstant CP#11
IfNeStrictTOS
Jump L2
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r4
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- InstanceCall1 1, CP#21
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ InstanceCall1 1, CP#12
PopLocal r8
Push r4
Push r8
- StoreFieldTOS CP#0
+ StoreContextVar 0
L5:
CheckStack
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r8
- InstanceCall1 1, CP#22
- PushConstant CP#20
+ InstanceCall1 1, CP#13
+ PushConstant CP#11
IfNeStrictTOS
Jump L3
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r4
Push r4
Push r8
- InstanceCall1 1, CP#23
- StoreFieldTOS CP#0
+ InstanceCall1 1, CP#14
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- StoreFieldTOS CP#14
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#0
- InstanceCall1 2, CP#24
- StoreFieldTOS CP#13
+ LoadContextVar 0
+ InstanceCall1 2, CP#15
+ StoreContextVar 3
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- PushConstant CP#25
- StoreFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ PushConstant CP#16
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
Push r4
- StoreFieldTOS CP#11
- PushConstant CP#27
- IndirectStaticCall 0, CP#26
+ StoreContextVar 1
+ PushConstant CP#18
+ IndirectStaticCall 0, CP#17
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#8
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 5
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#9
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#28
- PushConstant CP#30
- IndirectStaticCall 4, CP#29
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 7
+ PushConstant CP#20
+ IndirectStaticCall 4, CP#19
PopLocal r10
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
L11:
IfEqNull r2
@@ -1077,104 +1058,104 @@
Throw 1
L4:
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#14
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 2
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#13
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 3
Push r1
- InstanceCall1 2, CP#31
- InstanceCall1 2, CP#32
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#21
+ InstanceCall1 2, CP#22
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
Jump L5
L3:
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
Push r4
CloneContext
PopLocal r4
Push r4
Push r4
- LoadFieldTOS CP#0
- PushConstant CP#25
- InstanceCall1 2, CP#33
+ LoadContextVar 0
+ PushConstant CP#16
+ InstanceCall1 2, CP#23
StoreLocal r8
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r8
Drop1
Jump L6
L2:
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
- PushConstant CP#10
+ PushConstant CP#4
PopLocal r8
L8:
CheckStack
Push r8
- PushConstant CP#17
- InstanceCall1 2, CP#34
+ PushConstant CP#8
+ InstanceCall1 2, CP#24
AssertBoolean 0
- PushConstant CP#20
+ PushConstant CP#11
IfNeStrictTOS
Jump L7
Push r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
Push r8
- InstanceCall1 2, CP#35
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#25
+ StoreContextVar 0
Push r8
- PushConstant CP#25
- InstanceCall1 2, CP#36
+ PushConstant CP#16
+ InstanceCall1 2, CP#26
StoreLocal r8
Drop1
Jump L8
L7:
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#7
+ LoadContextVar 0
+ StoreContextVar 8
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
Jump L9
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
L9:
Push r4
- LoadFieldTOS CP#5
+ LoadContextVar 9
Push r4
- LoadFieldTOS CP#7
- PushConstant CP#37
- IndirectStaticCall 2, CP#18
+ LoadContextVar 8
+ PushConstant CP#27
+ IndirectStaticCall 2, CP#9
Drop1
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
Jump L10
Try #0 end:
Try #0 handler:
Push r0
- LoadFieldTOS CP#16
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#12
+ LoadContextVar 4
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -1183,18 +1164,18 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#5
+ LoadContextVar 9
Push r8
Push r9
- InstanceCall1 3, CP#40
+ InstanceCall1 3, CP#30
Drop1
Jump L10
L10:
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#11
+ LoadContextVar 1
PopLocal r4
Jump L11
@@ -1249,240 +1230,230 @@
PopLocal r0
Push r0
Push FP[-7]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r0
Push FP[-6]
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r0
Push FP[-5]
- StoreFieldTOS CP#2
+ StoreContextVar 2
AllocateContext 13
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#3
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
+ PushConstant CP#2
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 12
+ Push r0
+ PushConstant CP#3
+ StoreContextVar 9
+ PushConstant CP#3
+ PopLocal r2
+ Push r0
+ PushConstant CP#3
+ StoreContextVar 6
+ Push r0
+ PushConstant CP#3
+ StoreContextVar 7
+ Push r0
PushConstant CP#4
- PushConstant CP#6
- IndirectStaticCall 1, CP#5
- StoreFieldTOS CP#7
+ StoreContextVar 0
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#9
- PushConstant CP#8
- PopLocal r2
+ PushConstant CP#3
+ StoreContextVar 1
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#10
+ PushConstant CP#3
+ StoreContextVar 3
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#11
+ PushConstant CP#3
+ StoreContextVar 4
Push r0
- PushConstant CP#12
- StoreFieldTOS CP#0
+ PushConstant CP#3
+ StoreContextVar 5
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#1
+ PushConstant CP#3
+ StoreContextVar 10
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#13
+ PushConstant CP#3
+ StoreContextVar 11
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#14
+ PushConstant CP#3
+ StoreContextVar 2
Push r0
- PushConstant CP#8
- StoreFieldTOS CP#15
- Push r0
- PushConstant CP#8
- StoreFieldTOS CP#16
- Push r0
- PushConstant CP#8
- StoreFieldTOS CP#17
- Push r0
- PushConstant CP#8
- StoreFieldTOS CP#2
- Push r0
- Allocate CP#51
+ Allocate CP#38
StoreLocal r3
Push r3
- PushConstant CP#8
- StoreFieldTOS CP#52
+ PushConstant CP#3
+ StoreFieldTOS CP#39
Push r3
- PushConstant CP#8
- StoreFieldTOS CP#53
+ PushConstant CP#3
+ StoreFieldTOS CP#41
Push r3
- PushConstant CP#18
- StoreFieldTOS CP#54
+ PushConstant CP#5
+ StoreFieldTOS CP#43
Push r3
Push r0
- StoreFieldTOS CP#19
- StoreFieldTOS CP#21
+ StoreFieldTOS CP#6
+ StoreContextVar 8
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#55
- IndirectStaticCall 1, CP#5
+ LoadContextVar 8
+ PushConstant CP#45
+ IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#56
- IndirectStaticCall 1, CP#5
- StoreFieldTOS CP#10
+ LoadContextVar 8
+ PushConstant CP#46
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 6
Push r0
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#57
- IndirectStaticCall 1, CP#5
- StoreFieldTOS CP#11
- PushConstant CP#58
+ LoadContextVar 8
+ PushConstant CP#47
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 7
+ PushConstant CP#48
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#59
- IndirectStaticCall 2, CP#24
+ LoadContextVar 8
+ PushConstant CP#49
+ IndirectStaticCall 2, CP#11
Drop1
Push r0
- LoadFieldTOS CP#7
- InstanceCall1 1, CP#60
+ LoadContextVar 12
+ InstanceCall1 1, CP#50
ReturnTOS
Push r0
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r0
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset var [1]
- [2] = ContextOffset var [2]
- [3] = ContextOffset parent
- [4] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [5] = ArgDesc num-args 1, num-type-args 0, names []
- [6] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#5
- [7] = ContextOffset var [12]
- [8] = Null
- [9] = ContextOffset var [9]
- [10] = ContextOffset var [6]
- [11] = ContextOffset var [7]
- [12] = Int 0
- [13] = ContextOffset var [3]
- [14] = ContextOffset var [4]
- [15] = ContextOffset var [5]
- [16] = ContextOffset var [10]
- [17] = ContextOffset var [11]
- [18] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [19] = FieldOffset dart.core::_Closure::_context
- [20] = Int 1
- [21] = ContextOffset var [8]
- [22] = ArgDesc num-args 4, num-type-args 0, names []
- [23] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [24] = ArgDesc num-args 2, num-type-args 0, names []
- [25] = ICData target-name '+', arg-desc CP#24
- [26] = Type dynamic
- [27] = Type dart.core::Error
- [28] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#22
- [29] = Bool true
- [30] = Int 42
- [31] = Int 2
- [32] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [33] = ICData target-name '+', arg-desc CP#24
- [34] = String 'fin'
- [35] = StaticICData target 'dart.core::print', arg-desc CP#5
- [36] = Int 3
- [37] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [38] = ICData target-name '+', arg-desc CP#24
- [39] = StaticICData target 'dart.core::print', arg-desc CP#5
- [40] = Int 4
- [41] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [42] = ICData target-name '+', arg-desc CP#24
- [43] = StaticICData target 'dart.core::print', arg-desc CP#5
- [44] = Int 5
- [45] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [46] = ICData target-name '+', arg-desc CP#24
- [47] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#24
- [48] = ArgDesc num-args 3, num-type-args 0, names []
- [49] = ICData target-name 'completeError', arg-desc CP#48
- [50] = EndClosureFunctionScope
- [51] = Class dart.core::_Closure
- [52] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [53] = FieldOffset dart.core::_Closure::_function_type_arguments
- [54] = FieldOffset dart.core::_Closure::_function
- [55] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#5
- [56] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#5
- [57] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#5
- [58] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [59] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#24
- [60] = ICData get target-name 'future', arg-desc CP#5
+ [0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [1] = ArgDesc num-args 1, num-type-args 0, names []
+ [2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
+ [3] = Null
+ [4] = Int 0
+ [5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = Int 1
+ [9] = ArgDesc num-args 4, num-type-args 0, names []
+ [10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [11] = ArgDesc num-args 2, num-type-args 0, names []
+ [12] = ICData target-name '+', arg-desc CP#11
+ [13] = Type dynamic
+ [14] = Type dart.core::Error
+ [15] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#9
+ [16] = Bool true
+ [17] = Int 42
+ [18] = Int 2
+ [19] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [20] = ICData target-name '+', arg-desc CP#11
+ [21] = String 'fin'
+ [22] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [23] = Int 3
+ [24] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [25] = ICData target-name '+', arg-desc CP#11
+ [26] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [27] = Int 4
+ [28] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [29] = ICData target-name '+', arg-desc CP#11
+ [30] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [31] = Int 5
+ [32] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [33] = ICData target-name '+', arg-desc CP#11
+ [34] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#11
+ [35] = ArgDesc num-args 3, num-type-args 0, names []
+ [36] = ICData target-name 'completeError', arg-desc CP#35
+ [37] = EndClosureFunctionScope
+ [38] = Class dart.core::_Closure
+ [39] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [40] = Reserved
+ [41] = InstanceField dart.core::_Closure::_function_type_arguments
+ [42] = Reserved
+ [43] = InstanceField dart.core::_Closure::_function
+ [44] = Reserved
+ [45] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [46] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [47] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [48] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [49] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#11
+ [50] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#18 {
+Closure CP#5 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#8
- LoadConstant r2, CP#8
- LoadConstant r3, CP#8
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 10
CheckStack
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#12
+ PushConstant CP#4
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#13
+ StoreContextVar 3
Try #0 start:
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#3
+ StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#20
- StoreFieldTOS CP#0
+ PushConstant CP#8
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- StoreFieldTOS CP#14
+ StoreContextVar 4
Try #1 start:
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- StoreFieldTOS CP#15
+ StoreContextVar 5
Try #2 start:
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#2
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#3
- PushConstant CP#20
- StoreFieldTOS CP#0
- Push r4
- LoadFieldTOS CP#3
- Push r4
- StoreFieldTOS CP#1
- Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#0
- Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#10
- Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#11
- Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#21
- PushConstant CP#23
- IndirectStaticCall 4, CP#22
- PopLocal r13
+ LoadContextParent
PushConstant CP#8
+ StoreContextVar 0
+ Push r4
+ LoadContextParent
+ Push r4
+ StoreContextVar 1
+ Push r4
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ Push r4
+ LoadContextParent
+ LoadContextVar 6
+ Push r4
+ LoadContextParent
+ LoadContextVar 7
+ Push r4
+ LoadContextParent
+ LoadContextVar 8
+ PushConstant CP#10
+ IndirectStaticCall 4, CP#9
+ PopLocal r13
+ PushConstant CP#3
ReturnTOS
L13:
IfEqNull r2
@@ -1493,94 +1464,94 @@
L2:
Push r4
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextVar 2
Push r1
- InstanceCall1 2, CP#25
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#12
+ StoreContextVar 0
Jump L3
Try #2 end:
Try #2 handler:
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#15
+ LoadContextVar 5
PopLocal r4
MoveSpecial r10, exception
MoveSpecial r11, stackTrace
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r10
- StoreFieldTOS CP#16
+ StoreContextVar 10
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r11
- StoreFieldTOS CP#17
+ StoreContextVar 11
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#3
+ StoreContextParent
PopLocal r4
Push r4
Push r10
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#0
- PushConstant CP#8
- PushConstant CP#8
- PushConstant CP#27
- InstanceCall1 4, CP#28
+ LoadContextVar 0
+ PushConstant CP#3
+ PushConstant CP#3
+ PushConstant CP#14
+ InstanceCall1 4, CP#15
AssertBoolean 0
- PushConstant CP#29
+ PushConstant CP#16
IfNeStrictTOS
Jump L4
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- PushConstant CP#30
- StoreFieldTOS CP#9
+ LoadContextParent
+ LoadContextParent
+ PushConstant CP#17
+ StoreContextVar 9
Jump L5
L4:
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
+ LoadContextParent
+ LoadContextParent
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#0
- StoreFieldTOS CP#2
+ LoadContextParent
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- PushConstant CP#31
- StoreFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ PushConstant CP#18
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
+ LoadContextParent
+ LoadContextParent
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 1
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#10
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#11
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 7
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#21
- PushConstant CP#32
- IndirectStaticCall 4, CP#22
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 8
+ PushConstant CP#19
+ IndirectStaticCall 4, CP#9
PopLocal r13
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
L14:
IfEqNull r2
@@ -1590,26 +1561,26 @@
Throw 1
L6:
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 2
Push r1
- InstanceCall1 2, CP#33
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#20
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#16
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 10
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#17
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 11
Throw 1
Drop1
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
Jump L3
L3:
@@ -1617,55 +1588,55 @@
Try #1 end:
Try #1 handler:
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#14
+ LoadContextVar 4
PopLocal r4
MoveSpecial r8, exception
MoveSpecial r9, stackTrace
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r8
- StoreFieldTOS CP#16
+ StoreContextVar 10
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r9
- StoreFieldTOS CP#17
- PushConstant CP#34
- PushConstant CP#35
- IndirectStaticCall 1, CP#5
+ StoreContextVar 11
+ PushConstant CP#21
+ PushConstant CP#22
+ IndirectStaticCall 1, CP#1
Drop1
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#2
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#3
- PushConstant CP#36
- StoreFieldTOS CP#0
+ LoadContextParent
+ PushConstant CP#23
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 2
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#10
+ LoadContextParent
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#11
+ LoadContextParent
+ LoadContextVar 7
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#21
- PushConstant CP#37
- IndirectStaticCall 4, CP#22
+ LoadContextParent
+ LoadContextVar 8
+ PushConstant CP#24
+ IndirectStaticCall 4, CP#9
PopLocal r12
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
L15:
IfEqNull r2
@@ -1676,68 +1647,68 @@
L8:
Push r4
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextVar 2
Push r1
- InstanceCall1 2, CP#38
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#25
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#9
+ LoadContextVar 0
+ StoreContextVar 9
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
Jump L9
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#16
+ LoadContextParent
+ LoadContextVar 10
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#17
+ LoadContextParent
+ LoadContextVar 11
Throw 1
L5:
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#14
+ LoadContextVar 4
PopLocal r4
- PushConstant CP#34
- PushConstant CP#39
- IndirectStaticCall 1, CP#5
+ PushConstant CP#21
+ PushConstant CP#26
+ IndirectStaticCall 1, CP#1
Drop1
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#2
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#3
- PushConstant CP#40
- StoreFieldTOS CP#0
+ LoadContextParent
+ PushConstant CP#27
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 2
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#10
+ LoadContextParent
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#11
+ LoadContextParent
+ LoadContextVar 7
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#21
- PushConstant CP#41
- IndirectStaticCall 4, CP#22
+ LoadContextParent
+ LoadContextVar 8
+ PushConstant CP#28
+ IndirectStaticCall 4, CP#9
PopLocal r12
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
L16:
IfEqNull r2
@@ -1748,65 +1719,65 @@
L10:
Push r4
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextVar 2
Push r1
- InstanceCall1 2, CP#42
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#29
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#9
+ LoadContextVar 0
+ StoreContextVar 9
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
Jump L9
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
Jump L9
L7:
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#14
+ LoadContextVar 4
PopLocal r4
- PushConstant CP#34
- PushConstant CP#43
- IndirectStaticCall 1, CP#5
+ PushConstant CP#21
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#1
Drop1
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#2
+ LoadContextVar 0
+ StoreContextVar 2
Push r4
- LoadFieldTOS CP#3
- PushConstant CP#44
- StoreFieldTOS CP#0
+ LoadContextParent
+ PushConstant CP#31
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- StoreFieldTOS CP#1
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 2
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#10
+ LoadContextParent
+ LoadContextVar 6
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#11
+ LoadContextParent
+ LoadContextVar 7
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#21
- PushConstant CP#45
- IndirectStaticCall 4, CP#22
+ LoadContextParent
+ LoadContextVar 8
+ PushConstant CP#32
+ IndirectStaticCall 4, CP#9
PopLocal r12
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
L17:
IfEqNull r2
@@ -1817,41 +1788,41 @@
L11:
Push r4
Push r4
- LoadFieldTOS CP#3
- LoadFieldTOS CP#2
+ LoadContextParent
+ LoadContextVar 2
Push r1
- InstanceCall1 2, CP#46
- StoreFieldTOS CP#0
+ InstanceCall1 2, CP#33
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
Push r4
- LoadFieldTOS CP#0
- StoreFieldTOS CP#9
+ LoadContextVar 0
+ StoreContextVar 9
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
Jump L9
Push r4
- LoadFieldTOS CP#3
+ LoadContextParent
PopLocal r4
L9:
Push r4
- LoadFieldTOS CP#7
+ LoadContextVar 12
Push r4
- LoadFieldTOS CP#9
- PushConstant CP#47
- IndirectStaticCall 2, CP#24
+ LoadContextVar 9
+ PushConstant CP#34
+ IndirectStaticCall 2, CP#11
Drop1
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
Jump L12
Try #0 end:
Try #0 handler:
Push r0
- LoadFieldTOS CP#19
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#13
+ LoadContextVar 3
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -1860,33 +1831,33 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#7
+ LoadContextVar 12
Push r8
Push r9
- InstanceCall1 3, CP#49
+ InstanceCall1 3, CP#36
Drop1
Jump L12
L12:
- PushConstant CP#8
+ PushConstant CP#3
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#1
+ LoadContextVar 1
PopLocal r4
Push r5
- PushConstant CP#20
+ PushConstant CP#8
IfEqStrictNumTOS
Jump L13
Push r5
- PushConstant CP#31
+ PushConstant CP#18
IfEqStrictNumTOS
Jump L14
Push r5
- PushConstant CP#36
+ PushConstant CP#23
IfEqStrictNumTOS
Jump L15
Push r5
- PushConstant CP#40
+ PushConstant CP#27
IfEqStrictNumTOS
Jump L16
Jump L17
@@ -1956,152 +1927,146 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#2
- StoreFieldTOS CP#0
- Allocate CP#35
+ PushConstant CP#0
+ StoreContextVar 0
+ Allocate CP#26
StoreLocal r3
Push r3
- PushConstant CP#9
- StoreFieldTOS CP#36
+ PushConstant CP#7
+ StoreFieldTOS CP#27
Push r3
- PushConstant CP#9
- StoreFieldTOS CP#37
+ PushConstant CP#7
+ StoreFieldTOS CP#29
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#38
+ PushConstant CP#1
+ StoreFieldTOS CP#31
Push r3
Push r0
- StoreFieldTOS CP#4
+ StoreFieldTOS CP#2
PopLocal r2
Push r2
ReturnTOS
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
- PushConstant CP#9
+ PushConstant CP#7
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset parent
- [2] = Int 3
- [3] = ClosureFunction nested () → dart.async::Future<dart.core::int> /* originally async */ ;
- [4] = FieldOffset dart.core::_Closure::_context
- [5] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#6
- [8] = ContextOffset var [8]
- [9] = Null
- [10] = ContextOffset var [7]
- [11] = ContextOffset var [4]
- [12] = ContextOffset var [5]
- [13] = Int 0
- [14] = ContextOffset var [1]
- [15] = ContextOffset var [2]
- [16] = ContextOffset var [3]
- [17] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [18] = Int 4
- [19] = Int 5
- [20] = Int 1
- [21] = ContextOffset var [6]
- [22] = ArgDesc num-args 4, num-type-args 0, names []
- [23] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#22
- [24] = ArgDesc num-args 2, num-type-args 0, names []
- [25] = ICData target-name '+', arg-desc CP#24
- [26] = Type dynamic
- [27] = String 'fin'
- [28] = StaticICData target 'dart.core::print', arg-desc CP#6
- [29] = StaticICData target 'dart.core::print', arg-desc CP#6
- [30] = StaticICData target 'dart.core::print', arg-desc CP#6
- [31] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#24
- [32] = ArgDesc num-args 3, num-type-args 0, names []
- [33] = ICData target-name 'completeError', arg-desc CP#32
- [34] = EndClosureFunctionScope
- [35] = Class dart.core::_Closure
- [36] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [37] = FieldOffset dart.core::_Closure::_function_type_arguments
- [38] = FieldOffset dart.core::_Closure::_function
- [39] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#6
- [40] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#6
- [41] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#6
- [42] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [43] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#24
- [44] = ICData get target-name 'future', arg-desc CP#6
- [45] = EndClosureFunctionScope
+ [0] = Int 3
+ [1] = ClosureFunction nested () → dart.async::Future<dart.core::int> /* originally async */ ;
+ [2] = InstanceField dart.core::_Closure::_context
+ [3] = Reserved
+ [4] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#5
+ [7] = Null
+ [8] = Int 0
+ [9] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [10] = Int 4
+ [11] = Int 5
+ [12] = Int 1
+ [13] = ArgDesc num-args 4, num-type-args 0, names []
+ [14] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#13
+ [15] = ArgDesc num-args 2, num-type-args 0, names []
+ [16] = ICData target-name '+', arg-desc CP#15
+ [17] = Type dynamic
+ [18] = String 'fin'
+ [19] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [20] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [21] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [22] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#15
+ [23] = ArgDesc num-args 3, num-type-args 0, names []
+ [24] = ICData target-name 'completeError', arg-desc CP#23
+ [25] = EndClosureFunctionScope
+ [26] = Class dart.core::_Closure
+ [27] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [28] = Reserved
+ [29] = InstanceField dart.core::_Closure::_function_type_arguments
+ [30] = Reserved
+ [31] = InstanceField dart.core::_Closure::_function
+ [32] = Reserved
+ [33] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#5
+ [34] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#5
+ [35] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#5
+ [36] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [37] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
+ [38] = ICData get target-name 'future', arg-desc CP#5
+ [39] = EndClosureFunctionScope
}
-Closure CP#17 {
+Closure CP#9 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#9
- LoadConstant r2, CP#9
- LoadConstant r3, CP#9
+ LoadConstant r1, CP#7
+ LoadConstant r2, CP#7
+ LoadConstant r3, CP#7
Frame 8
CheckStack
Push r0
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#13
+ PushConstant CP#8
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#15
+ StoreContextVar 2
Try #0 start:
AllocateContext 1
StoreLocal r5
Push r5
Push r4
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#18
- StoreFieldTOS CP#0
+ PushConstant CP#10
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
Push r4
- StoreFieldTOS CP#16
+ StoreContextVar 3
Try #1 start:
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- PushConstant CP#19
- StoreFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ PushConstant CP#11
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
- PushConstant CP#20
- StoreFieldTOS CP#0
+ LoadContextParent
+ PushConstant CP#12
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
Push r4
- StoreFieldTOS CP#14
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#11
+ LoadContextParent
+ LoadContextVar 4
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#12
+ LoadContextParent
+ LoadContextVar 5
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#21
- PushConstant CP#23
- IndirectStaticCall 4, CP#22
+ LoadContextParent
+ LoadContextVar 6
+ PushConstant CP#14
+ IndirectStaticCall 4, CP#13
PopLocal r11
- PushConstant CP#9
+ PushConstant CP#7
ReturnTOS
L7:
IfEqNull r2
@@ -2112,83 +2077,83 @@
L2:
Push r4
Push r1
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#0
- InstanceCall1 2, CP#25
- StoreFieldTOS CP#10
+ LoadContextVar 0
+ InstanceCall1 2, CP#16
+ StoreContextVar 7
Jump L3
Jump L4
Try #1 end:
Try #1 handler:
Push r0
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r4
Push r4
- LoadFieldTOS CP#16
+ LoadContextVar 3
PopLocal r4
MoveSpecial r8, exception
MoveSpecial r9, stackTrace
- PushConstant CP#27
- PushConstant CP#28
- IndirectStaticCall 1, CP#6
+ PushConstant CP#18
+ PushConstant CP#19
+ IndirectStaticCall 1, CP#5
Drop1
Push r8
Push r9
Throw 1
L3:
Push r0
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r4
Push r4
- LoadFieldTOS CP#16
+ LoadContextVar 3
PopLocal r4
- PushConstant CP#27
- PushConstant CP#29
- IndirectStaticCall 1, CP#6
+ PushConstant CP#18
+ PushConstant CP#20
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
Jump L5
L4:
Push r0
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r4
Push r4
- LoadFieldTOS CP#16
+ LoadContextVar 3
PopLocal r4
- PushConstant CP#27
- PushConstant CP#30
- IndirectStaticCall 1, CP#6
+ PushConstant CP#18
+ PushConstant CP#21
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r4
L5:
Push r4
- LoadFieldTOS CP#8
+ LoadContextVar 8
Push r4
- LoadFieldTOS CP#10
- PushConstant CP#31
- IndirectStaticCall 2, CP#24
+ LoadContextVar 7
+ PushConstant CP#22
+ IndirectStaticCall 2, CP#15
Drop1
- PushConstant CP#9
+ PushConstant CP#7
ReturnTOS
Jump L6
Try #0 end:
Try #0 handler:
Push r0
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r4
Push r4
- LoadFieldTOS CP#15
+ LoadContextVar 2
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -2197,110 +2162,110 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#8
+ LoadContextVar 8
Push r8
Push r9
- InstanceCall1 3, CP#33
+ InstanceCall1 3, CP#24
Drop1
Jump L6
L6:
- PushConstant CP#9
+ PushConstant CP#7
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#14
+ LoadContextVar 1
PopLocal r4
Jump L7
}
-Closure CP#3 {
+Closure CP#1 {
Entry 4
CheckStack
Push FP[-5]
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r0
AllocateContext 9
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
- StoreFieldTOS CP#8
+ PushConstant CP#4
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#5
+ StoreContextVar 8
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#10
- PushConstant CP#9
+ PushConstant CP#7
+ StoreContextVar 7
+ PushConstant CP#7
PopLocal r2
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#11
+ PushConstant CP#7
+ StoreContextVar 4
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#12
+ PushConstant CP#7
+ StoreContextVar 5
Push r0
- PushConstant CP#13
- StoreFieldTOS CP#0
+ PushConstant CP#8
+ StoreContextVar 0
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#14
+ PushConstant CP#7
+ StoreContextVar 1
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#15
+ PushConstant CP#7
+ StoreContextVar 2
Push r0
- PushConstant CP#9
- StoreFieldTOS CP#16
+ PushConstant CP#7
+ StoreContextVar 3
Push r0
- Allocate CP#35
+ Allocate CP#26
StoreLocal r3
Push r3
- PushConstant CP#9
- StoreFieldTOS CP#36
+ PushConstant CP#7
+ StoreFieldTOS CP#27
+ Push r3
+ PushConstant CP#7
+ StoreFieldTOS CP#29
Push r3
PushConstant CP#9
- StoreFieldTOS CP#37
- Push r3
- PushConstant CP#17
- StoreFieldTOS CP#38
+ StoreFieldTOS CP#31
Push r3
Push r0
- StoreFieldTOS CP#4
- StoreFieldTOS CP#21
+ StoreFieldTOS CP#2
+ StoreContextVar 6
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#39
- IndirectStaticCall 1, CP#6
+ LoadContextVar 6
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#5
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#40
- IndirectStaticCall 1, CP#6
- StoreFieldTOS CP#11
+ LoadContextVar 6
+ PushConstant CP#34
+ IndirectStaticCall 1, CP#5
+ StoreContextVar 4
Push r0
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#41
- IndirectStaticCall 1, CP#6
- StoreFieldTOS CP#12
- PushConstant CP#42
+ LoadContextVar 6
+ PushConstant CP#35
+ IndirectStaticCall 1, CP#5
+ StoreContextVar 5
+ PushConstant CP#36
Push r0
- LoadFieldTOS CP#21
- PushConstant CP#43
- IndirectStaticCall 2, CP#24
+ LoadContextVar 6
+ PushConstant CP#37
+ IndirectStaticCall 2, CP#15
Drop1
Push r0
- LoadFieldTOS CP#8
- InstanceCall1 1, CP#44
+ LoadContextVar 8
+ InstanceCall1 1, CP#38
ReturnTOS
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
- PushConstant CP#9
+ PushConstant CP#7
ReturnTOS
}
@@ -2354,169 +2319,164 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
AllocateContext 8
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#5
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 7
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#7
- PushConstant CP#6
+ PushConstant CP#3
+ StoreContextVar 6
+ PushConstant CP#3
PopLocal r2
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#8
+ PushConstant CP#3
+ StoreContextVar 3
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#9
+ PushConstant CP#3
+ StoreContextVar 4
Push r0
- PushConstant CP#10
- StoreFieldTOS CP#0
+ PushConstant CP#4
+ StoreContextVar 0
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#11
+ PushConstant CP#3
+ StoreContextVar 1
Push r0
- PushConstant CP#6
- StoreFieldTOS CP#12
+ PushConstant CP#3
+ StoreContextVar 2
Push r0
- Allocate CP#30
+ Allocate CP#22
StoreLocal r3
Push r3
- PushConstant CP#6
- StoreFieldTOS CP#31
+ PushConstant CP#3
+ StoreFieldTOS CP#23
Push r3
- PushConstant CP#6
- StoreFieldTOS CP#32
+ PushConstant CP#3
+ StoreFieldTOS CP#25
Push r3
- PushConstant CP#13
- StoreFieldTOS CP#33
+ PushConstant CP#5
+ StoreFieldTOS CP#27
Push r3
Push r0
- StoreFieldTOS CP#14
- StoreFieldTOS CP#16
+ StoreFieldTOS CP#6
+ StoreContextVar 5
Push r0
- LoadFieldTOS CP#16
- PushConstant CP#34
- IndirectStaticCall 1, CP#3
+ LoadContextVar 5
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
- LoadFieldTOS CP#16
- PushConstant CP#35
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#8
+ LoadContextVar 5
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 3
Push r0
Push r0
- LoadFieldTOS CP#16
- PushConstant CP#36
- IndirectStaticCall 1, CP#3
- StoreFieldTOS CP#9
- PushConstant CP#37
+ LoadContextVar 5
+ PushConstant CP#31
+ IndirectStaticCall 1, CP#1
+ StoreContextVar 4
+ PushConstant CP#32
Push r0
- LoadFieldTOS CP#16
- PushConstant CP#38
- IndirectStaticCall 2, CP#20
+ LoadContextVar 5
+ PushConstant CP#33
+ IndirectStaticCall 2, CP#12
Drop1
Push r0
- LoadFieldTOS CP#5
- InstanceCall1 1, CP#39
+ LoadContextVar 7
+ InstanceCall1 1, CP#34
ReturnTOS
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset parent
- [2] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
- [3] = ArgDesc num-args 1, num-type-args 0, names []
- [4] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#3
- [5] = ContextOffset var [7]
- [6] = Null
- [7] = ContextOffset var [6]
- [8] = ContextOffset var [3]
- [9] = ContextOffset var [4]
- [10] = Int 0
- [11] = ContextOffset var [1]
- [12] = ContextOffset var [2]
- [13] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
- [14] = FieldOffset dart.core::_Closure::_context
- [15] = Int 1
- [16] = ContextOffset var [5]
- [17] = ArgDesc num-args 4, num-type-args 0, names []
- [18] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#17
- [19] = Int 42
- [20] = ArgDesc num-args 2, num-type-args 0, names []
- [21] = ICData target-name '==', arg-desc CP#20
- [22] = Bool true
- [23] = ArgDesc num-args 3, num-type-args 0, names []
- [24] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#23
- [25] = Int 7
- [26] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#20
- [27] = Type dynamic
- [28] = ICData target-name 'completeError', arg-desc CP#23
- [29] = EndClosureFunctionScope
- [30] = Class dart.core::_Closure
- [31] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [32] = FieldOffset dart.core::_Closure::_function_type_arguments
- [33] = FieldOffset dart.core::_Closure::_function
- [34] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#3
- [35] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#3
- [36] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#3
- [37] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [38] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#20
- [39] = ICData get target-name 'future', arg-desc CP#3
+ [0] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::int]
+ [1] = ArgDesc num-args 1, num-type-args 0, names []
+ [2] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#1
+ [3] = Null
+ [4] = Int 0
+ [5] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = Int 1
+ [9] = ArgDesc num-args 4, num-type-args 0, names []
+ [10] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#9
+ [11] = Int 42
+ [12] = ArgDesc num-args 2, num-type-args 0, names []
+ [13] = ICData target-name '==', arg-desc CP#12
+ [14] = Bool true
+ [15] = ArgDesc num-args 3, num-type-args 0, names []
+ [16] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#15
+ [17] = Int 7
+ [18] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#12
+ [19] = Type dynamic
+ [20] = ICData target-name 'completeError', arg-desc CP#15
+ [21] = EndClosureFunctionScope
+ [22] = Class dart.core::_Closure
+ [23] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [24] = Reserved
+ [25] = InstanceField dart.core::_Closure::_function_type_arguments
+ [26] = Reserved
+ [27] = InstanceField dart.core::_Closure::_function
+ [28] = Reserved
+ [29] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [30] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [31] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [32] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [33] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#12
+ [34] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#13 {
+Closure CP#5 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#6
- LoadConstant r2, CP#6
- LoadConstant r3, CP#6
+ LoadConstant r1, CP#3
+ LoadConstant r2, CP#3
+ LoadConstant r3, CP#3
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#14
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#0
+ LoadContextVar 0
StoreLocal r5
- PushConstant CP#10
+ PushConstant CP#4
IfNeStrictNumTOS
Jump L1
Push r4
Push r4
- StoreFieldTOS CP#12
+ StoreContextVar 2
Try #0 start:
JumpIfNoAsserts L2
Push r4
- PushConstant CP#15
- StoreFieldTOS CP#0
+ PushConstant CP#8
+ StoreContextVar 0
Push r4
Push r4
- StoreFieldTOS CP#11
+ StoreContextVar 1
Push r4
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextVar 0
Push r4
- LoadFieldTOS CP#8
+ LoadContextVar 3
Push r4
- LoadFieldTOS CP#9
+ LoadContextVar 4
Push r4
- LoadFieldTOS CP#16
- PushConstant CP#18
- IndirectStaticCall 4, CP#17
+ LoadContextVar 5
+ PushConstant CP#10
+ IndirectStaticCall 4, CP#9
PopLocal r8
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
L6:
IfEqNull r2
@@ -2527,40 +2487,40 @@
L3:
JumpIfNoAsserts L2
Push r1
- PushConstant CP#19
- InstanceCall1 2, CP#21
+ PushConstant CP#11
+ InstanceCall1 2, CP#13
AssertBoolean 0
- PushConstant CP#22
+ PushConstant CP#14
IfEqStrictTOS
Jump L2
- PushConstant CP#10
- PushConstant CP#10
- PushConstant CP#6
- PushConstant CP#24
- IndirectStaticCall 3, CP#23
+ PushConstant CP#4
+ PushConstant CP#4
+ PushConstant CP#3
+ PushConstant CP#16
+ IndirectStaticCall 3, CP#15
L2:
Push r4
- PushConstant CP#25
- StoreFieldTOS CP#7
+ PushConstant CP#17
+ StoreContextVar 6
Jump L4
L4:
Push r4
- LoadFieldTOS CP#5
+ LoadContextVar 7
Push r4
- LoadFieldTOS CP#7
- PushConstant CP#26
- IndirectStaticCall 2, CP#20
+ LoadContextVar 6
+ PushConstant CP#18
+ IndirectStaticCall 2, CP#12
Drop1
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
Jump L5
Try #0 end:
Try #0 handler:
Push r0
- LoadFieldTOS CP#14
+ LoadFieldTOS CP#6
PopLocal r4
Push r4
- LoadFieldTOS CP#12
+ LoadContextVar 2
PopLocal r4
MoveSpecial r6, exception
MoveSpecial r7, stackTrace
@@ -2569,18 +2529,18 @@
Push r7
PopLocal r9
Push r4
- LoadFieldTOS CP#5
+ LoadContextVar 7
Push r8
Push r9
- InstanceCall1 3, CP#28
+ InstanceCall1 3, CP#20
Drop1
Jump L5
L5:
- PushConstant CP#6
+ PushConstant CP#3
ReturnTOS
L1:
Push r4
- LoadFieldTOS CP#11
+ LoadContextVar 1
PopLocal r4
Jump L6
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index e9b455d..49ae297 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -109,7 +109,7 @@
[2] = StaticICData target '#lib::_NamespaceImpl::_', arg-desc CP#1
[3] = ArgDesc num-args 2, num-type-args 0, names []
[4] = StaticICData target '#lib::_NamespaceImpl::_create', arg-desc CP#3
- [5] = Field #lib::_NamespaceImpl::_cachedNamespace
+ [5] = StaticField #lib::_NamespaceImpl::_cachedNamespace
[6] = Null
}
] static method _setupNamespace(dynamic namespace) → void {
@@ -146,7 +146,7 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::_NamespaceImpl::_cachedNamespace
+ [0] = StaticField #lib::_NamespaceImpl::_cachedNamespace
[1] = Null
[2] = ArgDesc num-args 2, num-type-args 0, names []
[3] = ICData target-name '==', arg-desc CP#2
@@ -303,9 +303,9 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::VMLibraryHooks::_computeScriptUri
+ [0] = StaticField #lib::VMLibraryHooks::_computeScriptUri
[1] = Null
- [2] = Field #lib::VMLibraryHooks::_cachedScript
+ [2] = StaticField #lib::VMLibraryHooks::_cachedScript
}
] static set platformScript(dynamic f) → void {
self::VMLibraryHooks::_computeScriptUri = f;
@@ -352,12 +352,12 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::VMLibraryHooks::_cachedScript
+ [0] = StaticField #lib::VMLibraryHooks::_cachedScript
[1] = Null
[2] = ArgDesc num-args 2, num-type-args 0, names []
[3] = ICData target-name '==', arg-desc CP#2
[4] = Bool true
- [5] = Field #lib::VMLibraryHooks::_computeScriptUri
+ [5] = StaticField #lib::VMLibraryHooks::_computeScriptUri
[6] = ICData target-name '==', arg-desc CP#2
[7] = Bool false
[8] = ArgDesc num-args 1, num-type-args 0, names []
@@ -433,7 +433,7 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::_ScheduleImmediate::_closure
+ [0] = StaticField #lib::_ScheduleImmediate::_closure
[1] = Null
}
]static method _setScheduleImmediateClosure((() → void) → void closure) → void {
@@ -453,9 +453,9 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::_stdinFD
- [1] = Field #lib::_stdoutFD
- [2] = Field #lib::_stderrFD
+ [0] = StaticField #lib::_stdinFD
+ [1] = StaticField #lib::_stdoutFD
+ [2] = StaticField #lib::_stderrFD
[3] = Null
}
]static method _setStdioFDs(core::int stdin, core::int stdout, core::int stderr) → void {
@@ -528,7 +528,7 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::_rawScript
+ [0] = StaticField #lib::_rawScript
[1] = String 'http:'
[2] = ArgDesc num-args 2, num-type-args 0, names []
[3] = ICData target-name 'startsWith', arg-desc CP#2
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index ee760ea..4a165f1 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -200,255 +200,258 @@
PopLocal r1
Push r1
Push FP[-5]
- StoreFieldTOS CP#0
- Allocate CP#37
+ StoreContextVar 0
+ Allocate CP#38
StoreLocal r4
Push r4
Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- StoreFieldTOS CP#38
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
+ StoreFieldTOS CP#39
Push r4
Push r0
StoreFieldTOS CP#3
Push r4
- PushConstant CP#1
- StoreFieldTOS CP#39
+ PushConstant CP#0
+ StoreFieldTOS CP#41
Push r4
Push r1
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#1
PopLocal r3
- PushConstant CP#48
+ PushConstant CP#51
Push r3
- InstanceCall1 2, CP#49
+ InstanceCall1 2, CP#52
Drop1
- PushConstant CP#50
+ PushConstant CP#53
Push r3
- InstanceCall1 2, CP#51
+ InstanceCall1 2, CP#54
Drop1
- PushConstant CP#17
+ PushConstant CP#18
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ClosureFunction nested1 <T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void;
- [2] = FieldOffset dart.core::_Closure::_context
- [3] = FieldOffset dart.core::_Closure::_function_type_arguments
- [4] = Int 2
- [5] = Int 4
- [6] = ArgDesc num-args 4, num-type-args 0, names []
- [7] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#6
- [8] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
- [9] = Int 6
- [10] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#6
- [11] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [12] = TypeArgs [dart.core::Type]
- [13] = Int 8
- [14] = Int 0
- [15] = Type #lib::A::T1
- [16] = TypeArgumentsFieldOffset #lib::A
- [17] = Null
- [18] = Int 1
- [19] = Type #lib::A::T2
- [20] = Type #lib::A::foo::T3
- [21] = Int 3
- [22] = Type #lib::A::foo::T4
- [23] = Type T5
- [24] = Int 5
- [25] = Type T6
- [26] = Type T7
- [27] = Int 7
- [28] = Type T8
- [29] = ArgDesc num-args 1, num-type-args 1, names []
- [30] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#29
- [31] = ArgDesc num-args 1, num-type-args 0, names []
- [32] = StaticICData target 'dart.core::print', arg-desc CP#31
- [33] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
- [34] = ArgDesc num-args 0, num-type-args 8, names []
- [35] = StaticICData target '#lib::callWithArgs', arg-desc CP#34
- [36] = EndClosureFunctionScope
- [37] = Class dart.core::_Closure
- [38] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [39] = FieldOffset dart.core::_Closure::_function
- [40] = ICData target-name 'call', arg-desc CP#31
- [41] = EndClosureFunctionScope
- [42] = TypeArgs [#lib::C7, #lib::C8]
- [43] = ArgDesc num-args 1, num-type-args 2, names []
- [44] = ICData target-name 'call', arg-desc CP#43
- [45] = TypeArgs [dart.core::List<#lib::C7>, dart.core::List<#lib::C8>]
- [46] = ICData target-name 'call', arg-desc CP#43
- [47] = EndClosureFunctionScope
- [48] = TypeArgs [#lib::C5, #lib::C6]
- [49] = ICData target-name 'call', arg-desc CP#43
- [50] = TypeArgs [dart.core::List<#lib::C5>, dart.core::List<#lib::C6>]
- [51] = ICData target-name 'call', arg-desc CP#43
+ [0] = ClosureFunction nested1 <T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = InstanceField dart.core::_Closure::_function_type_arguments
+ [4] = Reserved
+ [5] = Int 2
+ [6] = Int 4
+ [7] = ArgDesc num-args 4, num-type-args 0, names []
+ [8] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
+ [9] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
+ [10] = Int 6
+ [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
+ [12] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [13] = TypeArgs [dart.core::Type]
+ [14] = Int 8
+ [15] = Int 0
+ [16] = Type #lib::A::T1
+ [17] = TypeArgumentsField #lib::A
+ [18] = Null
+ [19] = Int 1
+ [20] = Type #lib::A::T2
+ [21] = Type #lib::A::foo::T3
+ [22] = Int 3
+ [23] = Type #lib::A::foo::T4
+ [24] = Type T5
+ [25] = Int 5
+ [26] = Type T6
+ [27] = Type T7
+ [28] = Int 7
+ [29] = Type T8
+ [30] = ArgDesc num-args 1, num-type-args 1, names []
+ [31] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#30
+ [32] = ArgDesc num-args 1, num-type-args 0, names []
+ [33] = StaticICData target 'dart.core::print', arg-desc CP#32
+ [34] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
+ [35] = ArgDesc num-args 0, num-type-args 8, names []
+ [36] = StaticICData target '#lib::callWithArgs', arg-desc CP#35
+ [37] = EndClosureFunctionScope
+ [38] = Class dart.core::_Closure
+ [39] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [40] = Reserved
+ [41] = InstanceField dart.core::_Closure::_function
+ [42] = Reserved
+ [43] = ICData target-name 'call', arg-desc CP#32
+ [44] = EndClosureFunctionScope
+ [45] = TypeArgs [#lib::C7, #lib::C8]
+ [46] = ArgDesc num-args 1, num-type-args 2, names []
+ [47] = ICData target-name 'call', arg-desc CP#46
+ [48] = TypeArgs [dart.core::List<#lib::C7>, dart.core::List<#lib::C8>]
+ [49] = ICData target-name 'call', arg-desc CP#46
+ [50] = EndClosureFunctionScope
+ [51] = TypeArgs [#lib::C5, #lib::C6]
+ [52] = ICData target-name 'call', arg-desc CP#46
+ [53] = TypeArgs [dart.core::List<#lib::C5>, dart.core::List<#lib::C6>]
+ [54] = ICData target-name 'call', arg-desc CP#46
}
-Closure CP#11 {
+Closure CP#12 {
Entry 4
CheckStack
Push FP[-5]
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r1
Push FP[-5]
LoadFieldTOS CP#3
PopLocal r0
- PushConstant CP#12
- StoreLocal r3
- Push r3
PushConstant CP#13
- CreateArrayTOS
StoreLocal r3
Push r3
PushConstant CP#14
- Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- PushConstant CP#17
- InstantiateType CP#15
- StoreIndexedTOS
+ CreateArrayTOS
+ StoreLocal r3
Push r3
+ PushConstant CP#15
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
PushConstant CP#18
- Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- PushConstant CP#17
- InstantiateType CP#19
+ InstantiateType CP#16
StoreIndexedTOS
Push r3
- PushConstant CP#4
- PushConstant CP#17
- Push r0
+ PushConstant CP#19
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
+ PushConstant CP#18
InstantiateType CP#20
StoreIndexedTOS
Push r3
- PushConstant CP#21
- PushConstant CP#17
+ PushConstant CP#5
+ PushConstant CP#18
Push r0
- InstantiateType CP#22
+ InstantiateType CP#21
StoreIndexedTOS
Push r3
- PushConstant CP#5
- PushConstant CP#17
+ PushConstant CP#22
+ PushConstant CP#18
Push r0
InstantiateType CP#23
StoreIndexedTOS
Push r3
- PushConstant CP#24
- PushConstant CP#17
+ PushConstant CP#6
+ PushConstant CP#18
Push r0
- InstantiateType CP#25
+ InstantiateType CP#24
StoreIndexedTOS
Push r3
- PushConstant CP#9
- PushConstant CP#17
+ PushConstant CP#25
+ PushConstant CP#18
Push r0
InstantiateType CP#26
StoreIndexedTOS
Push r3
- PushConstant CP#27
- PushConstant CP#17
- Push r0
- InstantiateType CP#28
- StoreIndexedTOS
- PushConstant CP#30
- IndirectStaticCall 2, CP#29
- PushConstant CP#32
- IndirectStaticCall 1, CP#31
- Drop1
- Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- Push r0
- InstantiateTypeArgumentsTOS 0, CP#33
- PushConstant CP#35
- IndirectStaticCall 1, CP#34
- Drop1
- PushConstant CP#17
- ReturnTOS
-
-}
-
-Closure CP#8 {
- Entry 5
- CheckStack
- Push FP[-5]
- LoadFieldTOS CP#2
- PopLocal r1
- CheckFunctionTypeArgs 2, 0
- Push r0
- Push FP[-5]
- LoadFieldTOS CP#3
- PushConstant CP#5
- PushConstant CP#9
PushConstant CP#10
- IndirectStaticCall 4, CP#6
- PopLocal r0
- Allocate CP#37
- StoreLocal r4
- Push r4
- Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- StoreFieldTOS CP#38
- Push r4
+ PushConstant CP#18
Push r0
- StoreFieldTOS CP#3
- Push r4
- PushConstant CP#11
- StoreFieldTOS CP#39
- Push r4
- Push r1
- StoreFieldTOS CP#2
- PopLocal r3
+ InstantiateType CP#27
+ StoreIndexedTOS
Push r3
- InstanceCall1 1, CP#40
+ PushConstant CP#28
+ PushConstant CP#18
+ Push r0
+ InstantiateType CP#29
+ StoreIndexedTOS
+ PushConstant CP#31
+ IndirectStaticCall 2, CP#30
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#32
Drop1
- PushConstant CP#17
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
+ Push r0
+ InstantiateTypeArgumentsTOS 0, CP#34
+ PushConstant CP#36
+ IndirectStaticCall 1, CP#35
+ Drop1
+ PushConstant CP#18
ReturnTOS
}
-Closure CP#1 {
+Closure CP#9 {
Entry 5
CheckStack
Push FP[-5]
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r1
CheckFunctionTypeArgs 2, 0
Push r0
Push FP[-5]
LoadFieldTOS CP#3
- PushConstant CP#4
- PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 4, CP#6
+ PushConstant CP#6
+ PushConstant CP#10
+ PushConstant CP#11
+ IndirectStaticCall 4, CP#7
PopLocal r0
- Allocate CP#37
+ Allocate CP#38
StoreLocal r4
Push r4
Push r1
- LoadFieldTOS CP#0
- LoadFieldTOS CP#16
- StoreFieldTOS CP#38
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
+ StoreFieldTOS CP#39
Push r4
Push r0
StoreFieldTOS CP#3
Push r4
- PushConstant CP#8
- StoreFieldTOS CP#39
+ PushConstant CP#12
+ StoreFieldTOS CP#41
Push r4
Push r1
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#1
PopLocal r3
- PushConstant CP#42
Push r3
- InstanceCall1 2, CP#44
+ InstanceCall1 1, CP#43
Drop1
+ PushConstant CP#18
+ ReturnTOS
+
+}
+
+Closure CP#0 {
+ Entry 5
+ CheckStack
+ Push FP[-5]
+ LoadFieldTOS CP#1
+ PopLocal r1
+ CheckFunctionTypeArgs 2, 0
+ Push r0
+ Push FP[-5]
+ LoadFieldTOS CP#3
+ PushConstant CP#5
+ PushConstant CP#6
+ PushConstant CP#8
+ IndirectStaticCall 4, CP#7
+ PopLocal r0
+ Allocate CP#38
+ StoreLocal r4
+ Push r4
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#17
+ StoreFieldTOS CP#39
+ Push r4
+ Push r0
+ StoreFieldTOS CP#3
+ Push r4
+ PushConstant CP#9
+ StoreFieldTOS CP#41
+ Push r4
+ Push r1
+ StoreFieldTOS CP#1
+ PopLocal r3
PushConstant CP#45
Push r3
- InstanceCall1 2, CP#46
+ InstanceCall1 2, CP#47
Drop1
- PushConstant CP#17
+ PushConstant CP#48
+ Push r3
+ InstanceCall1 2, CP#49
+ Drop1
+ PushConstant CP#18
ReturnTOS
}
@@ -497,283 +500,285 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#2
- StoreFieldTOS CP#0
+ PushConstant CP#0
+ StoreContextVar 0
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
- PushConstant CP#3
+ PushConstant CP#1
PopLocal r2
Push r0
- PushConstant CP#4
- StoreFieldTOS CP#0
- Allocate CP#23
+ PushConstant CP#2
+ StoreContextVar 0
+ Allocate CP#22
StoreLocal r4
Push r4
- PushConstant CP#7
- StoreFieldTOS CP#24
+ PushConstant CP#6
+ StoreFieldTOS CP#23
Push r4
- PushConstant CP#7
+ PushConstant CP#6
StoreFieldTOS CP#25
Push r4
- PushConstant CP#5
- StoreFieldTOS CP#26
+ PushConstant CP#3
+ StoreFieldTOS CP#27
Push r4
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#4
PopLocal r3
Push r3
- PushConstant CP#30
- InstanceCall1 2, CP#31
- Drop1
- Push r3
PushConstant CP#32
InstanceCall1 2, CP#33
Drop1
- Push r2
+ Push r3
PushConstant CP#34
- IndirectStaticCall 1, CP#19
+ InstanceCall1 2, CP#35
+ Drop1
+ Push r2
+ PushConstant CP#36
+ IndirectStaticCall 1, CP#18
Drop1
Push r0
- LoadFieldTOS CP#0
- PushConstant CP#35
- IndirectStaticCall 1, CP#19
+ LoadContextVar 0
+ PushConstant CP#37
+ IndirectStaticCall 1, CP#18
Drop1
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
Push r0
- LoadFieldTOS CP#0
- PushConstant CP#36
- IndirectStaticCall 1, CP#19
+ LoadContextVar 0
+ PushConstant CP#38
+ IndirectStaticCall 1, CP#18
Drop1
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#37
- StoreFieldTOS CP#0
- Allocate CP#23
+ PushConstant CP#39
+ StoreContextVar 0
+ Allocate CP#22
StoreLocal r3
Push r3
- PushConstant CP#7
- StoreFieldTOS CP#24
+ PushConstant CP#6
+ StoreFieldTOS CP#23
Push r3
- PushConstant CP#7
+ PushConstant CP#6
StoreFieldTOS CP#25
Push r3
- PushConstant CP#38
- StoreFieldTOS CP#26
+ PushConstant CP#40
+ StoreFieldTOS CP#27
Push r3
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#4
PopLocal r2
Push r2
- InstanceCall1 1, CP#41
+ InstanceCall1 1, CP#43
Drop1
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
- PushConstant CP#7
+ PushConstant CP#6
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ContextOffset parent
- [2] = Int 1
- [3] = Int 2
- [4] = Int 3
- [5] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
- [6] = FieldOffset dart.core::_Closure::_context
- [7] = Null
- [8] = Type dart.core::int
- [9] = String 'y'
- [10] = SubtypeTestCache
- [11] = ArgDesc num-args 2, num-type-args 0, names []
- [12] = ICData target-name '+', arg-desc CP#11
- [13] = Int 5
- [14] = ICData target-name '>', arg-desc CP#11
- [15] = Bool true
- [16] = Int 4
- [17] = ClosureFunction closure2 () → void;
- [18] = ICData target-name '+', arg-desc CP#11
- [19] = ArgDesc num-args 1, num-type-args 0, names []
- [20] = ICData get target-name 'foo', arg-desc CP#19
- [21] = ICData target-name '+', arg-desc CP#11
- [22] = EndClosureFunctionScope
- [23] = Class dart.core::_Closure
- [24] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [25] = FieldOffset dart.core::_Closure::_function_type_arguments
- [26] = FieldOffset dart.core::_Closure::_function
- [27] = ICData target-name 'call', arg-desc CP#19
- [28] = StaticICData target 'dart.core::print', arg-desc CP#19
- [29] = EndClosureFunctionScope
- [30] = Int 10
- [31] = ICData target-name 'call', arg-desc CP#11
- [32] = Int 11
- [33] = ICData target-name 'call', arg-desc CP#11
- [34] = StaticICData target 'dart.core::print', arg-desc CP#19
- [35] = StaticICData target 'dart.core::print', arg-desc CP#19
- [36] = StaticICData target 'dart.core::print', arg-desc CP#19
- [37] = Int 42
- [38] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [39] = ICData set target-name 'foo', arg-desc CP#11
- [40] = EndClosureFunctionScope
- [41] = ICData target-name 'call', arg-desc CP#19
+ [0] = Int 1
+ [1] = Int 2
+ [2] = Int 3
+ [3] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
+ [4] = InstanceField dart.core::_Closure::_context
+ [5] = Reserved
+ [6] = Null
+ [7] = Type dart.core::int
+ [8] = String 'y'
+ [9] = SubtypeTestCache
+ [10] = ArgDesc num-args 2, num-type-args 0, names []
+ [11] = ICData target-name '+', arg-desc CP#10
+ [12] = Int 5
+ [13] = ICData target-name '>', arg-desc CP#10
+ [14] = Bool true
+ [15] = Int 4
+ [16] = ClosureFunction closure2 () → void;
+ [17] = ICData target-name '+', arg-desc CP#10
+ [18] = ArgDesc num-args 1, num-type-args 0, names []
+ [19] = ICData get target-name 'foo', arg-desc CP#18
+ [20] = ICData target-name '+', arg-desc CP#10
+ [21] = EndClosureFunctionScope
+ [22] = Class dart.core::_Closure
+ [23] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [24] = Reserved
+ [25] = InstanceField dart.core::_Closure::_function_type_arguments
+ [26] = Reserved
+ [27] = InstanceField dart.core::_Closure::_function
+ [28] = Reserved
+ [29] = ICData target-name 'call', arg-desc CP#18
+ [30] = StaticICData target 'dart.core::print', arg-desc CP#18
+ [31] = EndClosureFunctionScope
+ [32] = Int 10
+ [33] = ICData target-name 'call', arg-desc CP#10
+ [34] = Int 11
+ [35] = ICData target-name 'call', arg-desc CP#10
+ [36] = StaticICData target 'dart.core::print', arg-desc CP#18
+ [37] = StaticICData target 'dart.core::print', arg-desc CP#18
+ [38] = StaticICData target 'dart.core::print', arg-desc CP#18
+ [39] = Int 42
+ [40] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [41] = ICData set target-name 'foo', arg-desc CP#10
+ [42] = EndClosureFunctionScope
+ [43] = ICData target-name 'call', arg-desc CP#18
}
-Closure CP#17 {
+Closure CP#16 {
Entry 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#4
PopLocal r0
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- PushConstant CP#3
- InstanceCall1 2, CP#18
- StoreFieldTOS CP#0
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ PushConstant CP#1
+ InstanceCall1 2, CP#17
+ StoreContextVar 0
Push r0
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- InstanceCall1 1, CP#20
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ InstanceCall1 1, CP#19
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- InstanceCall1 2, CP#21
- StoreFieldTOS CP#0
- PushConstant CP#7
+ LoadContextParent
+ LoadContextVar 0
+ InstanceCall1 2, CP#20
+ StoreContextVar 0
+ PushConstant CP#6
ReturnTOS
}
-Closure CP#5 {
+Closure CP#3 {
Entry 4
CheckStack
Push FP[-6]
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#4
PopLocal r0
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
+ LoadContextParent
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push FP[-5]
- PushConstant CP#7
+ PushConstant CP#6
+ PushConstant CP#6
PushConstant CP#7
PushConstant CP#8
- PushConstant CP#9
- AssertAssignable 1, CP#10
+ AssertAssignable 1, CP#9
Drop1
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
+ LoadContextParent
+ LoadContextParent
Push r0
- LoadFieldTOS CP#0
- PushConstant CP#2
- InstanceCall1 2, CP#12
- StoreFieldTOS CP#0
+ LoadContextVar 0
+ PushConstant CP#0
+ InstanceCall1 2, CP#11
+ StoreContextVar 0
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
- PushConstant CP#13
- InstanceCall1 2, CP#14
+ LoadContextParent
+ LoadContextParent
+ LoadContextVar 0
+ PushConstant CP#12
+ InstanceCall1 2, CP#13
AssertBoolean 0
- PushConstant CP#15
+ PushConstant CP#14
IfNeStrictTOS
Jump L1
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#1
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#16
- StoreFieldTOS CP#0
- Allocate CP#23
+ PushConstant CP#15
+ StoreContextVar 0
+ Allocate CP#22
StoreLocal r2
Push r2
- PushConstant CP#7
- StoreFieldTOS CP#24
+ PushConstant CP#6
+ StoreFieldTOS CP#23
Push r2
- PushConstant CP#7
+ PushConstant CP#6
StoreFieldTOS CP#25
Push r2
- PushConstant CP#17
- StoreFieldTOS CP#26
+ PushConstant CP#16
+ StoreFieldTOS CP#27
Push r2
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#4
PopLocal r3
Push r3
- InstanceCall1 1, CP#27
+ InstanceCall1 1, CP#29
Drop1
Push r0
- LoadFieldTOS CP#0
- PushConstant CP#28
- IndirectStaticCall 1, CP#19
+ LoadContextVar 0
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#18
Drop1
Push r0
- LoadFieldTOS CP#1
+ LoadContextParent
PopLocal r0
L1:
- PushConstant CP#7
+ PushConstant CP#6
ReturnTOS
}
-Closure CP#38 {
+Closure CP#40 {
Entry 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#4
PopLocal r0
Push r0
- LoadFieldTOS CP#1
- LoadFieldTOS CP#0
+ LoadContextParent
+ LoadContextVar 0
Push r0
- LoadFieldTOS CP#0
- InstanceCall1 2, CP#39
+ LoadContextVar 0
+ InstanceCall1 2, CP#41
Drop1
- PushConstant CP#7
+ PushConstant CP#6
ReturnTOS
}
@@ -839,176 +844,178 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
+ StoreContextVar 0
PushConstant CP#1
- StoreFieldTOS CP#2
- PushConstant CP#3
StoreLocal r3
Push r3
- PushConstant CP#1
+ PushConstant CP#0
CreateArrayTOS
StoreLocal r3
- PushConstant CP#5
- IndirectStaticCall 2, CP#4
+ PushConstant CP#3
+ IndirectStaticCall 2, CP#2
PopLocal r2
- PushConstant CP#3
+ PushConstant CP#1
StoreLocal r3
Push r3
- PushConstant CP#1
+ PushConstant CP#0
CreateArrayTOS
StoreLocal r3
- PushConstant CP#6
- IndirectStaticCall 2, CP#4
+ PushConstant CP#4
+ IndirectStaticCall 2, CP#2
PopLocal r4
AllocateContext 1
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#1
- StoreFieldTOS CP#2
+ PushConstant CP#0
+ StoreContextVar 0
L2:
CheckStack
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#7
- InstanceCall1 2, CP#9
+ LoadContextVar 0
+ PushConstant CP#5
+ InstanceCall1 2, CP#7
AssertBoolean 0
- PushConstant CP#10
+ PushConstant CP#8
IfNeStrictTOS
Jump L1
Push r2
- Allocate CP#16
+ Allocate CP#15
StoreLocal r3
Push r3
- PushConstant CP#14
- StoreFieldTOS CP#17
+ PushConstant CP#13
+ StoreFieldTOS CP#16
Push r3
- PushConstant CP#14
+ PushConstant CP#13
StoreFieldTOS CP#18
Push r3
- PushConstant CP#11
- StoreFieldTOS CP#19
+ PushConstant CP#9
+ StoreFieldTOS CP#20
Push r3
Push r0
- StoreFieldTOS CP#12
- InstanceCall1 2, CP#20
+ StoreFieldTOS CP#10
+ InstanceCall1 2, CP#22
Drop1
Push r4
- Allocate CP#16
+ Allocate CP#15
StoreLocal r3
Push r3
- PushConstant CP#14
- StoreFieldTOS CP#17
+ PushConstant CP#13
+ StoreFieldTOS CP#16
Push r3
- PushConstant CP#14
+ PushConstant CP#13
StoreFieldTOS CP#18
Push r3
- PushConstant CP#21
- StoreFieldTOS CP#19
+ PushConstant CP#23
+ StoreFieldTOS CP#20
Push r3
Push r0
- StoreFieldTOS CP#12
- InstanceCall1 2, CP#27
+ StoreFieldTOS CP#10
+ InstanceCall1 2, CP#29
Drop1
Push r0
CloneContext
PopLocal r0
Push r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#28
- InstanceCall1 2, CP#29
+ LoadContextVar 0
+ PushConstant CP#30
+ InstanceCall1 2, CP#31
StoreLocal r3
- StoreFieldTOS CP#2
+ StoreContextVar 0
Push r3
Drop1
Jump L2
L1:
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
- PushConstant CP#14
+ PushConstant CP#13
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset parent
- [1] = Int 0
- [2] = ContextOffset var [0]
- [3] = TypeArgs [dart.core::Function]
- [4] = ArgDesc num-args 1, num-type-args 1, names []
- [5] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#4
- [6] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#4
- [7] = Int 10
- [8] = ArgDesc num-args 2, num-type-args 0, names []
- [9] = ICData target-name '<', arg-desc CP#8
- [10] = Bool true
- [11] = ClosureFunction <anonymous closure> () → dart.core::int;
- [12] = FieldOffset dart.core::_Closure::_context
- [13] = ICData target-name '+', arg-desc CP#8
- [14] = Null
- [15] = EndClosureFunctionScope
- [16] = Class dart.core::_Closure
- [17] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [18] = FieldOffset dart.core::_Closure::_function_type_arguments
- [19] = FieldOffset dart.core::_Closure::_function
- [20] = ICData target-name 'add', arg-desc CP#8
- [21] = ClosureFunction <anonymous closure> (dart.core::int ii) → dart.core::Null;
- [22] = Type dart.core::int
- [23] = String 'ii'
- [24] = SubtypeTestCache
- [25] = ICData target-name '+', arg-desc CP#8
- [26] = EndClosureFunctionScope
- [27] = ICData target-name 'add', arg-desc CP#8
- [28] = Int 1
- [29] = ICData target-name '+', arg-desc CP#8
+ [0] = Int 0
+ [1] = TypeArgs [dart.core::Function]
+ [2] = ArgDesc num-args 1, num-type-args 1, names []
+ [3] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#2
+ [4] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#2
+ [5] = Int 10
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = ICData target-name '<', arg-desc CP#6
+ [8] = Bool true
+ [9] = ClosureFunction <anonymous closure> () → dart.core::int;
+ [10] = InstanceField dart.core::_Closure::_context
+ [11] = Reserved
+ [12] = ICData target-name '+', arg-desc CP#6
+ [13] = Null
+ [14] = EndClosureFunctionScope
+ [15] = Class dart.core::_Closure
+ [16] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [17] = Reserved
+ [18] = InstanceField dart.core::_Closure::_function_type_arguments
+ [19] = Reserved
+ [20] = InstanceField dart.core::_Closure::_function
+ [21] = Reserved
+ [22] = ICData target-name 'add', arg-desc CP#6
+ [23] = ClosureFunction <anonymous closure> (dart.core::int ii) → dart.core::Null;
+ [24] = Type dart.core::int
+ [25] = String 'ii'
+ [26] = SubtypeTestCache
+ [27] = ICData target-name '+', arg-desc CP#6
+ [28] = EndClosureFunctionScope
+ [29] = ICData target-name 'add', arg-desc CP#6
+ [30] = Int 1
+ [31] = ICData target-name '+', arg-desc CP#6
}
-Closure CP#11 {
+Closure CP#9 {
Entry 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#12
+ LoadFieldTOS CP#10
PopLocal r0
Push r0
- LoadFieldTOS CP#2
+ LoadContextVar 0
Push r0
- LoadFieldTOS CP#0
- LoadFieldTOS CP#2
- InstanceCall1 2, CP#13
+ LoadContextParent
+ LoadContextVar 0
+ InstanceCall1 2, CP#12
ReturnTOS
- PushConstant CP#14
+ PushConstant CP#13
ReturnTOS
}
-Closure CP#21 {
+Closure CP#23 {
Entry 3
CheckStack
Push FP[-6]
- LoadFieldTOS CP#12
+ LoadFieldTOS CP#10
PopLocal r0
Push FP[-5]
- PushConstant CP#14
- PushConstant CP#14
- PushConstant CP#22
- PushConstant CP#23
- AssertAssignable 1, CP#24
+ PushConstant CP#13
+ PushConstant CP#13
+ PushConstant CP#24
+ PushConstant CP#25
+ AssertAssignable 1, CP#26
Drop1
Push r0
Push FP[-5]
Push r0
- LoadFieldTOS CP#0
- LoadFieldTOS CP#2
- InstanceCall1 2, CP#25
- StoreFieldTOS CP#2
- PushConstant CP#14
+ LoadContextParent
+ LoadContextVar 0
+ InstanceCall1 2, CP#27
+ StoreContextVar 0
+ PushConstant CP#13
ReturnTOS
}
@@ -1048,37 +1055,37 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#8
+ StoreContextParent
PopLocal r0
Push r0
Push r2
- InstanceCall1 1, CP#9
- StoreFieldTOS CP#10
- Allocate CP#17
+ InstanceCall1 1, CP#8
+ StoreContextVar 0
+ Allocate CP#16
StoreLocal r4
Push r4
PushConstant CP#0
- StoreFieldTOS CP#18
+ StoreFieldTOS CP#17
Push r4
PushConstant CP#0
StoreFieldTOS CP#19
Push r4
- PushConstant CP#11
- StoreFieldTOS CP#20
+ PushConstant CP#9
+ StoreFieldTOS CP#21
Push r4
Push r0
- StoreFieldTOS CP#12
+ StoreFieldTOS CP#10
PopLocal r3
Push r3
- InstanceCall1 1, CP#21
+ InstanceCall1 1, CP#23
Drop1
Push r0
- LoadFieldTOS CP#10
- PushConstant CP#22
+ LoadContextVar 0
+ PushConstant CP#24
IndirectStaticCall 1, CP#4
Drop1
Push r0
- LoadFieldTOS CP#8
+ LoadContextParent
PopLocal r0
Jump L2
L1:
@@ -1094,34 +1101,36 @@
[5] = ICData get target-name 'iterator', arg-desc CP#4
[6] = ICData target-name 'moveNext', arg-desc CP#4
[7] = Bool true
- [8] = ContextOffset parent
- [9] = ICData get target-name 'current', arg-desc CP#4
- [10] = ContextOffset var [0]
- [11] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [12] = FieldOffset dart.core::_Closure::_context
- [13] = Int 1
- [14] = ArgDesc num-args 2, num-type-args 0, names []
- [15] = ICData target-name '+', arg-desc CP#14
- [16] = EndClosureFunctionScope
- [17] = Class dart.core::_Closure
- [18] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [19] = FieldOffset dart.core::_Closure::_function_type_arguments
- [20] = FieldOffset dart.core::_Closure::_function
- [21] = ICData target-name 'call', arg-desc CP#4
- [22] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [8] = ICData get target-name 'current', arg-desc CP#4
+ [9] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [10] = InstanceField dart.core::_Closure::_context
+ [11] = Reserved
+ [12] = Int 1
+ [13] = ArgDesc num-args 2, num-type-args 0, names []
+ [14] = ICData target-name '+', arg-desc CP#13
+ [15] = EndClosureFunctionScope
+ [16] = Class dart.core::_Closure
+ [17] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [18] = Reserved
+ [19] = InstanceField dart.core::_Closure::_function_type_arguments
+ [20] = Reserved
+ [21] = InstanceField dart.core::_Closure::_function
+ [22] = Reserved
+ [23] = ICData target-name 'call', arg-desc CP#4
+ [24] = StaticICData target 'dart.core::print', arg-desc CP#4
}
-Closure CP#11 {
+Closure CP#9 {
Entry 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#12
+ LoadFieldTOS CP#10
PopLocal r0
Push r0
Push r0
- LoadFieldTOS CP#10
- PushConstant CP#13
- InstanceCall1 2, CP#15
- StoreFieldTOS CP#10
+ LoadContextVar 0
+ PushConstant CP#12
+ InstanceCall1 2, CP#14
+ StoreContextVar 0
PushConstant CP#0
ReturnTOS
@@ -1164,59 +1173,62 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#1
+ LoadTypeArgumentsField CP#0
+ PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
- PushConstant CP#4
- AssertAssignable 0, CP#5
+ AssertAssignable 0, CP#4
Drop1
Allocate CP#9
StoreLocal r2
Push r2
Push FP[-6]
- LoadFieldTOS CP#1
+ LoadTypeArgumentsField CP#0
StoreFieldTOS CP#10
Push r2
- PushConstant CP#2
- StoreFieldTOS CP#11
- Push r2
- PushConstant CP#6
+ PushConstant CP#1
StoreFieldTOS CP#12
Push r2
+ PushConstant CP#5
+ StoreFieldTOS CP#14
+ Push r2
Push r0
- StoreFieldTOS CP#7
+ StoreFieldTOS CP#6
ReturnTOS
- PushConstant CP#2
+ PushConstant CP#1
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = TypeArgumentsFieldOffset #lib::D
- [2] = Null
- [3] = Type #lib::D::T
- [4] = String 't'
- [5] = SubtypeTestCache
- [6] = ClosureFunction <anonymous closure> () → #lib::D::T;
- [7] = FieldOffset dart.core::_Closure::_context
+ [0] = TypeArgumentsField #lib::D
+ [1] = Null
+ [2] = Type #lib::D::T
+ [3] = String 't'
+ [4] = SubtypeTestCache
+ [5] = ClosureFunction <anonymous closure> () → #lib::D::T;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
[8] = EndClosureFunctionScope
[9] = Class dart.core::_Closure
- [10] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [11] = FieldOffset dart.core::_Closure::_function_type_arguments
- [12] = FieldOffset dart.core::_Closure::_function
+ [10] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [11] = Reserved
+ [12] = InstanceField dart.core::_Closure::_function_type_arguments
+ [13] = Reserved
+ [14] = InstanceField dart.core::_Closure::_function
+ [15] = Reserved
}
-Closure CP#6 {
+Closure CP#5 {
Entry 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#7
+ LoadFieldTOS CP#6
PopLocal r0
Push r0
- LoadFieldTOS CP#0
+ LoadContextVar 0
ReturnTOS
- PushConstant CP#2
+ PushConstant CP#1
ReturnTOS
}
@@ -1232,79 +1244,81 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#1
- StoreFieldTOS CP#2
- Allocate CP#12
+ PushConstant CP#0
+ StoreContextVar 0
+ Allocate CP#11
StoreLocal r3
Push r3
- PushConstant CP#5
- StoreFieldTOS CP#13
+ PushConstant CP#4
+ StoreFieldTOS CP#12
Push r3
- PushConstant CP#5
+ PushConstant CP#4
StoreFieldTOS CP#14
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#15
+ PushConstant CP#1
+ StoreFieldTOS CP#16
Push r3
Push r0
- StoreFieldTOS CP#4
+ StoreFieldTOS CP#2
PopLocal r2
Push r2
- PushConstant CP#16
- InstanceCall1 2, CP#17
+ PushConstant CP#18
+ InstanceCall1 2, CP#19
Drop1
Push r0
- LoadFieldTOS CP#2
+ LoadContextVar 0
ReturnTOS
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
- PushConstant CP#5
+ PushConstant CP#4
ReturnTOS
}
ConstantPool {
- [0] = ContextOffset parent
- [1] = Int 5
- [2] = ContextOffset var [0]
- [3] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
- [4] = FieldOffset dart.core::_Closure::_context
- [5] = Null
- [6] = Type dart.core::int
- [7] = String 'y'
- [8] = SubtypeTestCache
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = ICData target-name '+', arg-desc CP#9
- [11] = EndClosureFunctionScope
- [12] = Class dart.core::_Closure
- [13] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [14] = FieldOffset dart.core::_Closure::_function_type_arguments
- [15] = FieldOffset dart.core::_Closure::_function
- [16] = Int 3
- [17] = ICData target-name 'call', arg-desc CP#9
+ [0] = Int 5
+ [1] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
+ [2] = InstanceField dart.core::_Closure::_context
+ [3] = Reserved
+ [4] = Null
+ [5] = Type dart.core::int
+ [6] = String 'y'
+ [7] = SubtypeTestCache
+ [8] = ArgDesc num-args 2, num-type-args 0, names []
+ [9] = ICData target-name '+', arg-desc CP#8
+ [10] = EndClosureFunctionScope
+ [11] = Class dart.core::_Closure
+ [12] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [13] = Reserved
+ [14] = InstanceField dart.core::_Closure::_function_type_arguments
+ [15] = Reserved
+ [16] = InstanceField dart.core::_Closure::_function
+ [17] = Reserved
+ [18] = Int 3
+ [19] = ICData target-name 'call', arg-desc CP#8
}
-Closure CP#3 {
+Closure CP#1 {
Entry 3
CheckStack
Push FP[-6]
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#2
PopLocal r0
Push FP[-5]
- PushConstant CP#5
+ PushConstant CP#4
+ PushConstant CP#4
PushConstant CP#5
PushConstant CP#6
- PushConstant CP#7
- AssertAssignable 1, CP#8
+ AssertAssignable 1, CP#7
Drop1
Push r0
Push r0
- LoadFieldTOS CP#2
+ LoadContextVar 0
Push FP[-5]
- InstanceCall1 2, CP#10
- StoreFieldTOS CP#2
- PushConstant CP#5
+ InstanceCall1 2, CP#9
+ StoreContextVar 0
+ PushConstant CP#4
ReturnTOS
}
@@ -1476,39 +1490,39 @@
Bytecode {
Entry 6
CheckStack
- Allocate CP#12
+ Allocate CP#14
StoreLocal r3
Push r3
- PushConstant CP#7
- StoreFieldTOS CP#13
+ PushConstant CP#9
+ StoreFieldTOS CP#15
Push r3
- PushConstant CP#7
- StoreFieldTOS CP#2
+ PushConstant CP#9
+ StoreFieldTOS CP#3
Push r3
PushConstant CP#0
- StoreFieldTOS CP#14
+ StoreFieldTOS CP#17
Push r3
Push r0
StoreFieldTOS CP#1
PopLocal r2
Push r2
PopLocal r3
- Allocate CP#12
+ Allocate CP#14
StoreLocal r5
- PushConstant CP#15
- StoreFieldTOS CP#16
+ PushConstant CP#19
+ StoreFieldTOS CP#20
Push r5
Push r3
- LoadFieldTOS CP#13
- StoreFieldTOS CP#13
+ LoadFieldTOS CP#15
+ StoreFieldTOS CP#15
Push r5
Push r3
- LoadFieldTOS CP#2
- StoreFieldTOS CP#2
+ LoadFieldTOS CP#3
+ StoreFieldTOS CP#3
Push r5
Push r3
- LoadFieldTOS CP#14
- StoreFieldTOS CP#14
+ LoadFieldTOS CP#17
+ StoreFieldTOS CP#17
Push r5
Push r3
LoadFieldTOS CP#1
@@ -1517,27 +1531,32 @@
PopLocal r4
Push r4
ReturnTOS
- PushConstant CP#7
+ PushConstant CP#9
ReturnTOS
}
ConstantPool {
[0] = ClosureFunction foo <T extends dart.core::Object = dynamic>(T t) → void;
- [1] = FieldOffset dart.core::_Closure::_context
- [2] = FieldOffset dart.core::_Closure::_function_type_arguments
- [3] = Int 0
- [4] = Int 1
- [5] = ArgDesc num-args 4, num-type-args 0, names []
- [6] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#5
- [7] = Null
- [8] = Type T
- [9] = String 't'
- [10] = SubtypeTestCache
- [11] = EndClosureFunctionScope
- [12] = Class dart.core::_Closure
- [13] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [14] = FieldOffset dart.core::_Closure::_function
- [15] = TypeArgs [dart.core::int]
- [16] = FieldOffset dart.core::_Closure::_delayed_type_arguments
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = InstanceField dart.core::_Closure::_function_type_arguments
+ [4] = Reserved
+ [5] = Int 0
+ [6] = Int 1
+ [7] = ArgDesc num-args 4, num-type-args 0, names []
+ [8] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
+ [9] = Null
+ [10] = Type T
+ [11] = String 't'
+ [12] = SubtypeTestCache
+ [13] = EndClosureFunctionScope
+ [14] = Class dart.core::_Closure
+ [15] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [16] = Reserved
+ [17] = InstanceField dart.core::_Closure::_function
+ [18] = Reserved
+ [19] = TypeArgs [dart.core::int]
+ [20] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [21] = Reserved
}
Closure CP#0 {
Entry 3
@@ -1548,20 +1567,20 @@
CheckFunctionTypeArgs 1, 0
Push r0
Push FP[-6]
- LoadFieldTOS CP#2
- PushConstant CP#3
- PushConstant CP#4
+ LoadFieldTOS CP#3
+ PushConstant CP#5
PushConstant CP#6
- IndirectStaticCall 4, CP#5
+ PushConstant CP#8
+ IndirectStaticCall 4, CP#7
PopLocal r0
Push FP[-5]
- PushConstant CP#7
- Push r0
- PushConstant CP#8
PushConstant CP#9
- AssertAssignable 0, CP#10
+ Push r0
+ PushConstant CP#10
+ PushConstant CP#11
+ AssertAssignable 0, CP#12
Drop1
- PushConstant CP#7
+ PushConstant CP#9
ReturnTOS
}
diff --git a/pkg/vm/testcases/bytecode/field_initializers.dart.expect b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
index 7f452bb..cb6efea 100644
--- a/pkg/vm/testcases/bytecode/field_initializers.dart.expect
+++ b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
@@ -17,26 +17,29 @@
StoreFieldTOS CP#1
Push FP[-6]
Push FP[-5]
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#3
Push FP[-6]
- PushConstant CP#3
- StoreFieldTOS CP#4
+ PushConstant CP#5
+ StoreFieldTOS CP#6
Push FP[-6]
- PushConstant CP#6
- IndirectStaticCall 1, CP#5
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
+ PushConstant CP#10
ReturnTOS
}
ConstantPool {
[0] = Int 42
- [1] = FieldOffset #lib::A::foo3
- [2] = FieldOffset #lib::A::foo4
- [3] = Int 44
- [4] = FieldOffset #lib::A::foo5
- [5] = ArgDesc num-args 1, num-type-args 0, names []
- [6] = StaticICData target 'dart.core::Object::', arg-desc CP#5
- [7] = Null
+ [1] = InstanceField #lib::A::foo3
+ [2] = Reserved
+ [3] = InstanceField #lib::A::foo4
+ [4] = Reserved
+ [5] = Int 44
+ [6] = InstanceField #lib::A::foo5
+ [7] = Reserved
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart.core::Object::', arg-desc CP#8
+ [10] = Null
}
] constructor •(core::int foo4) → void
: self::A::foo1 = null, self::A::foo4 = foo4, self::A::foo5 = 44, super core::Object::•()
@@ -50,30 +53,33 @@
StoreFieldTOS CP#1
Push FP[-7]
Push FP[-6]
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#3
Push FP[-7]
Push FP[-5]
- PushConstant CP#3
- InstanceCall1 2, CP#5
- StoreFieldTOS CP#6
+ PushConstant CP#5
+ InstanceCall1 2, CP#7
+ StoreFieldTOS CP#8
Push FP[-7]
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ PushConstant CP#11
+ IndirectStaticCall 1, CP#10
Drop1
- PushConstant CP#9
+ PushConstant CP#12
ReturnTOS
}
ConstantPool {
[0] = Int 42
- [1] = FieldOffset #lib::A::foo3
- [2] = FieldOffset #lib::A::foo1
- [3] = Int 1
- [4] = ArgDesc num-args 2, num-type-args 0, names []
- [5] = ICData target-name '+', arg-desc CP#4
- [6] = FieldOffset #lib::A::foo5
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::Object::', arg-desc CP#7
- [9] = Null
+ [1] = InstanceField #lib::A::foo3
+ [2] = Reserved
+ [3] = InstanceField #lib::A::foo1
+ [4] = Reserved
+ [5] = Int 1
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = ICData target-name '+', arg-desc CP#6
+ [8] = InstanceField #lib::A::foo5
+ [9] = Reserved
+ [10] = ArgDesc num-args 1, num-type-args 0, names []
+ [11] = StaticICData target 'dart.core::Object::', arg-desc CP#10
+ [12] = Null
}
] constructor constr2(core::int x, core::int y) → void
: self::A::foo4 = null, self::A::foo1 = x, self::A::foo5 = y.{core::num::+}(1), super core::Object::•()
@@ -137,20 +143,21 @@
PushConstant CP#0
StoreFieldTOS CP#1
Push FP[-5]
- PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 2, CP#3
- Drop1
+ PushConstant CP#3
PushConstant CP#5
+ IndirectStaticCall 2, CP#4
+ Drop1
+ PushConstant CP#6
ReturnTOS
}
ConstantPool {
[0] = Int 46
- [1] = FieldOffset #lib::B::foo6
- [2] = Int 49
- [3] = ArgDesc num-args 2, num-type-args 0, names []
- [4] = StaticICData target '#lib::A::', arg-desc CP#3
- [5] = Null
+ [1] = InstanceField #lib::B::foo6
+ [2] = Reserved
+ [3] = Int 49
+ [4] = ArgDesc num-args 2, num-type-args 0, names []
+ [5] = StaticICData target '#lib::A::', arg-desc CP#4
+ [6] = Null
}
] constructor •() → void
: super self::A::•(49)
@@ -165,20 +172,21 @@
Push FP[-7]
Push FP[-6]
Push FP[-5]
- PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 4, CP#3
- Drop1
+ PushConstant CP#3
PushConstant CP#5
+ IndirectStaticCall 4, CP#4
+ Drop1
+ PushConstant CP#6
ReturnTOS
}
ConstantPool {
[0] = Int 50
- [1] = FieldOffset #lib::B::foo6
- [2] = Int 51
- [3] = ArgDesc num-args 4, num-type-args 0, names []
- [4] = StaticICData target '#lib::A::redirecting2', arg-desc CP#3
- [5] = Null
+ [1] = InstanceField #lib::B::foo6
+ [2] = Reserved
+ [3] = Int 51
+ [4] = ArgDesc num-args 4, num-type-args 0, names []
+ [5] = StaticICData target '#lib::A::redirecting2', arg-desc CP#4
+ [6] = Null
}
] constructor c2(core::int i, core::int j) → void
: self::B::foo6 = 50, super self::A::redirecting2(i, j, 51)
diff --git a/pkg/vm/testcases/bytecode/instance_creation.dart.expect b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
index aa8109a..b741c7e 100644
--- a/pkg/vm/testcases/bytecode/instance_creation.dart.expect
+++ b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
@@ -25,7 +25,7 @@
Push r0
PushConstant CP#6
Push FP[-5]
- LoadFieldTOS CP#8
+ LoadTypeArgumentsField CP#8
PushConstant CP#2
InstantiateType CP#7
StoreIndexedTOS
@@ -36,7 +36,7 @@
Push r0
PushConstant CP#11
Push FP[-5]
- LoadFieldTOS CP#8
+ LoadTypeArgumentsField CP#8
PushConstant CP#2
InstantiateType CP#12
StoreIndexedTOS
@@ -57,7 +57,7 @@
[5] = String 'Base: '
[6] = Int 1
[7] = Type #lib::Base::T1
- [8] = TypeArgumentsFieldOffset #lib::Base
+ [8] = TypeArgumentsField #lib::Base
[9] = Int 2
[10] = String ', '
[11] = Int 3
@@ -111,7 +111,7 @@
Push r0
PushConstant CP#6
Push FP[-5]
- LoadFieldTOS CP#8
+ LoadTypeArgumentsField CP#8
PushConstant CP#2
InstantiateType CP#7
StoreIndexedTOS
@@ -132,7 +132,7 @@
[5] = String 'B: '
[6] = Int 1
[7] = Type #lib::B::T
- [8] = TypeArgumentsFieldOffset #lib::B
+ [8] = TypeArgumentsField #lib::B
[9] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
[10] = StaticICData target 'dart.core::print', arg-desc CP#0
}
@@ -211,7 +211,7 @@
Entry 0
CheckStack
Push FP[-5]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#2
IndirectStaticCall 1, CP#1
ReturnTOS
@@ -219,7 +219,7 @@
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::E
+ [0] = TypeArgumentsField #lib::E
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::Map::', arg-desc CP#1
[3] = Null
@@ -252,7 +252,7 @@
Entry 0
CheckStack
Push FP[-5]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#2
IndirectStaticCall 1, CP#1
ReturnTOS
@@ -260,7 +260,7 @@
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::F
+ [0] = TypeArgumentsField #lib::F
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::Map::', arg-desc CP#1
[3] = Null
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index 7f9a1c2..8452910 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -95,20 +95,22 @@
StoreFieldTOS CP#0
Push FP[-7]
Push FP[-5]
- StoreFieldTOS CP#1
+ StoreFieldTOS CP#2
Push FP[-7]
- PushConstant CP#3
- IndirectStaticCall 1, CP#2
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#4
+ PushConstant CP#6
ReturnTOS
}
ConstantPool {
- [0] = FieldOffset #lib::A::index
- [1] = FieldOffset #lib::A::_name
- [2] = ArgDesc num-args 1, num-type-args 0, names []
- [3] = StaticICData target 'dart.core::Object::', arg-desc CP#2
- [4] = Null
+ [0] = InstanceField #lib::A::index
+ [1] = Reserved
+ [2] = InstanceField #lib::A::_name
+ [3] = Reserved
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::Object::', arg-desc CP#4
+ [6] = Null
}
] const constructor •(core::int index, core::String _name) → void
: self::A::index = index, self::A::_name = _name, super core::Object::•()
@@ -142,17 +144,18 @@
Push FP[-5]
StoreFieldTOS CP#0
Push FP[-6]
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
- Drop1
PushConstant CP#3
+ IndirectStaticCall 1, CP#2
+ Drop1
+ PushConstant CP#4
ReturnTOS
}
ConstantPool {
- [0] = FieldOffset #lib::B::i
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = StaticICData target 'dart.core::Object::', arg-desc CP#1
- [3] = Null
+ [0] = InstanceField #lib::B::i
+ [1] = Reserved
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target 'dart.core::Object::', arg-desc CP#2
+ [4] = Null
}
] const constructor •(core::int i) → void
: self::B::i = i, super core::Object::•()
@@ -171,22 +174,23 @@
StoreFieldTOS CP#2
Push FP[-8]
Push FP[-5]
- PushConstant CP#3
- InstanceCall1 2, CP#4
- PushConstant CP#5
+ PushConstant CP#4
+ InstanceCall1 2, CP#5
+ PushConstant CP#6
IndirectStaticCall 2, CP#0
Drop1
- PushConstant CP#6
+ PushConstant CP#7
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 2, num-type-args 0, names []
[1] = ICData target-name '+', arg-desc CP#0
- [2] = FieldOffset #lib::C::j
- [3] = Int 5
- [4] = ICData target-name '*', arg-desc CP#0
- [5] = StaticICData target '#lib::B::', arg-desc CP#0
- [6] = Null
+ [2] = InstanceField #lib::C::j
+ [3] = Reserved
+ [4] = Int 5
+ [5] = ICData target-name '*', arg-desc CP#0
+ [6] = StaticICData target '#lib::B::', arg-desc CP#0
+ [7] = Null
}
] const constructor •(core::int a, core::int b, core::int c) → void
: self::C::j = a.{core::num::+}(b), super self::B::•(c.{core::num::*}(5))
@@ -206,20 +210,22 @@
StoreFieldTOS CP#1
Push r0
Push r2
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#3
Push r0
- PushConstant CP#4
- IndirectStaticCall 1, CP#3
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#5
Drop1
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
- [1] = FieldOffset #lib::D::x
- [2] = FieldOffset #lib::D::y
- [3] = ArgDesc num-args 1, num-type-args 0, names []
- [4] = StaticICData target 'dart.core::Object::', arg-desc CP#3
+ [1] = InstanceField #lib::D::x
+ [2] = Reserved
+ [3] = InstanceField #lib::D::y
+ [4] = Reserved
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::Object::', arg-desc CP#5
}
] const constructor •(dynamic x, [dynamic y = null]) → void
: self::D::x = x, self::D::y = y, super core::Object::•()
@@ -740,7 +746,7 @@
ReturnTOS
}
ConstantPool {
- [0] = Field #lib::fieldWithDoubleLiteralInitializer
+ [0] = StaticField #lib::fieldWithDoubleLiteralInitializer
[1] = Null
}
]static method testFieldWithDoubleLiteralInitializer() → dynamic
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index baa0ac2..c0fd1bb 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -254,11 +254,11 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#1
- StoreFieldTOS CP#2
+ PushConstant CP#0
+ StoreContextVar 0
Push r0
PopLocal r2
Try #0 start:
@@ -266,36 +266,36 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#3
- StoreFieldTOS CP#2
- Allocate CP#14
+ PushConstant CP#1
+ StoreContextVar 0
+ Allocate CP#13
StoreLocal r5
Push r5
- PushConstant CP#12
- StoreFieldTOS CP#15
+ PushConstant CP#11
+ StoreFieldTOS CP#14
Push r5
- PushConstant CP#12
+ PushConstant CP#11
StoreFieldTOS CP#16
Push r5
- PushConstant CP#4
- StoreFieldTOS CP#17
+ PushConstant CP#2
+ StoreFieldTOS CP#18
Push r5
Push r0
- StoreFieldTOS CP#5
+ StoreFieldTOS CP#3
PopLocal r4
Push r4
- InstanceCall1 1, CP#18
+ InstanceCall1 1, CP#20
Drop1
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#19
- IndirectStaticCall 1, CP#7
+ LoadContextVar 0
+ PushConstant CP#21
+ IndirectStaticCall 1, CP#6
Drop1
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
Jump L1
Try #0 end:
@@ -308,122 +308,124 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r2
PopLocal r4
Push r0
Push r3
- StoreFieldTOS CP#2
- PushConstant CP#12
- PushConstant CP#20
+ StoreContextVar 0
+ PushConstant CP#11
+ PushConstant CP#22
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#21
- PushConstant CP#22
+ PushConstant CP#23
+ PushConstant CP#24
StoreIndexedTOS
Push r5
- PushConstant CP#1
+ PushConstant CP#0
Push r4
StoreIndexedTOS
Push r5
- PushConstant CP#3
- PushConstant CP#23
+ PushConstant CP#1
+ PushConstant CP#25
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushConstant CP#10
Push r0
- LoadFieldTOS CP#2
+ LoadContextVar 0
StoreIndexedTOS
- PushConstant CP#24
- IndirectStaticCall 1, CP#7
- PushConstant CP#25
- IndirectStaticCall 1, CP#7
+ PushConstant CP#26
+ IndirectStaticCall 1, CP#6
+ PushConstant CP#27
+ IndirectStaticCall 1, CP#6
Drop1
- Allocate CP#14
+ Allocate CP#13
StoreLocal r5
Push r5
- PushConstant CP#12
- StoreFieldTOS CP#15
+ PushConstant CP#11
+ StoreFieldTOS CP#14
Push r5
- PushConstant CP#12
+ PushConstant CP#11
StoreFieldTOS CP#16
Push r5
- PushConstant CP#26
- StoreFieldTOS CP#17
+ PushConstant CP#28
+ StoreFieldTOS CP#18
Push r5
Push r0
- StoreFieldTOS CP#5
+ StoreFieldTOS CP#3
PopLocal r6
Push r6
ReturnTOS
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
Jump L1
L1:
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
- PushConstant CP#12
+ PushConstant CP#11
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 13, end 49, handler 49, needs-stack-trace, types [CP#9]
+ try-index 0, outer -1, start 13, end 49, handler 49, needs-stack-trace, types [CP#8]
}
ConstantPool {
- [0] = ContextOffset parent
- [1] = Int 1
- [2] = ContextOffset var [0]
- [3] = Int 2
- [4] = ClosureFunction foo () → void;
- [5] = FieldOffset dart.core::_Closure::_context
- [6] = String 'danger foo'
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::print', arg-desc CP#7
- [9] = Type dynamic
- [10] = StaticICData target 'dart.core::print', arg-desc CP#7
- [11] = Int 3
- [12] = Null
- [13] = EndClosureFunctionScope
- [14] = Class dart.core::_Closure
- [15] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [16] = FieldOffset dart.core::_Closure::_function_type_arguments
- [17] = FieldOffset dart.core::_Closure::_function
- [18] = ICData target-name 'call', arg-desc CP#7
- [19] = StaticICData target 'dart.core::print', arg-desc CP#7
- [20] = Int 4
- [21] = Int 0
- [22] = String 'caught '
- [23] = String ' '
- [24] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#7
- [25] = StaticICData target 'dart.core::print', arg-desc CP#7
- [26] = ClosureFunction bar () → void;
- [27] = String 'danger bar'
- [28] = StaticICData target 'dart.core::print', arg-desc CP#7
- [29] = Type dart.core::Error
- [30] = ArgDesc num-args 4, num-type-args 0, names []
- [31] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#30
- [32] = Bool true
- [33] = String 'error '
- [34] = String ', captured stack trace: '
- [35] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#7
- [36] = StaticICData target 'dart.core::print', arg-desc CP#7
- [37] = EndClosureFunctionScope
+ [0] = Int 1
+ [1] = Int 2
+ [2] = ClosureFunction foo () → void;
+ [3] = InstanceField dart.core::_Closure::_context
+ [4] = Reserved
+ [5] = String 'danger foo'
+ [6] = ArgDesc num-args 1, num-type-args 0, names []
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [8] = Type dynamic
+ [9] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [10] = Int 3
+ [11] = Null
+ [12] = EndClosureFunctionScope
+ [13] = Class dart.core::_Closure
+ [14] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [15] = Reserved
+ [16] = InstanceField dart.core::_Closure::_function_type_arguments
+ [17] = Reserved
+ [18] = InstanceField dart.core::_Closure::_function
+ [19] = Reserved
+ [20] = ICData target-name 'call', arg-desc CP#6
+ [21] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [22] = Int 4
+ [23] = Int 0
+ [24] = String 'caught '
+ [25] = String ' '
+ [26] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#6
+ [27] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [28] = ClosureFunction bar () → void;
+ [29] = String 'danger bar'
+ [30] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [31] = Type dart.core::Error
+ [32] = ArgDesc num-args 4, num-type-args 0, names []
+ [33] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#32
+ [34] = Bool true
+ [35] = String 'error '
+ [36] = String ', captured stack trace: '
+ [37] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#6
+ [38] = StaticICData target 'dart.core::print', arg-desc CP#6
+ [39] = EndClosureFunctionScope
}
-Closure CP#4 {
+Closure CP#2 {
Entry 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#3
PopLocal r0
Push r0
PopLocal r2
Try #0 start:
- PushConstant CP#6
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ PushConstant CP#5
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#6
Drop1
Jump L1
Try #0 end:
@@ -435,33 +437,33 @@
Push r2
PopLocal r4
Push r0
- LoadFieldTOS CP#0
- LoadFieldTOS CP#2
- PushConstant CP#10
- IndirectStaticCall 1, CP#7
+ LoadContextParent
+ LoadContextVar 0
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#6
Drop1
Push r0
- PushConstant CP#11
- StoreFieldTOS CP#2
+ PushConstant CP#10
+ StoreContextVar 0
Jump L1
L1:
- PushConstant CP#12
+ PushConstant CP#11
ReturnTOS
}
-Closure CP#26 {
+Closure CP#28 {
Entry 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#3
PopLocal r0
Push r0
PopLocal r2
Try #0 start:
- PushConstant CP#27
- PushConstant CP#28
- IndirectStaticCall 1, CP#7
+ PushConstant CP#29
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#6
Drop1
Jump L1
Try #0 end:
@@ -471,40 +473,40 @@
MoveSpecial r2, exception
MoveSpecial r3, stackTrace
Push r2
- PushConstant CP#12
- PushConstant CP#12
- PushConstant CP#29
- InstanceCall1 4, CP#31
- PushConstant CP#32
+ PushConstant CP#11
+ PushConstant CP#11
+ PushConstant CP#31
+ InstanceCall1 4, CP#33
+ PushConstant CP#34
IfNeStrictTOS
Jump L2
Push r2
PopLocal r4
- PushConstant CP#12
- PushConstant CP#20
+ PushConstant CP#11
+ PushConstant CP#22
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#21
- PushConstant CP#33
+ PushConstant CP#23
+ PushConstant CP#35
StoreIndexedTOS
Push r5
- PushConstant CP#1
+ PushConstant CP#0
Push r4
StoreIndexedTOS
Push r5
- PushConstant CP#3
- PushConstant CP#34
+ PushConstant CP#1
+ PushConstant CP#36
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushConstant CP#10
Push r0
- LoadFieldTOS CP#2
+ LoadContextVar 0
StoreIndexedTOS
- PushConstant CP#35
- IndirectStaticCall 1, CP#7
- PushConstant CP#36
- IndirectStaticCall 1, CP#7
+ PushConstant CP#37
+ IndirectStaticCall 1, CP#6
+ PushConstant CP#38
+ IndirectStaticCall 1, CP#6
Drop1
Jump L1
L2:
@@ -512,7 +514,7 @@
Push r3
Throw 1
L1:
- PushConstant CP#12
+ PushConstant CP#11
ReturnTOS
}
@@ -755,20 +757,20 @@
PopLocal r0
Push r0
Push FP[-5]
- StoreFieldTOS CP#0
+ StoreContextVar 0
Push r0
- LoadFieldTOS CP#0
+ LoadContextVar 0
PopLocal r2
Push r2
- PushConstant CP#2
- InstanceCall1 2, CP#3
- PushConstant CP#4
+ PushConstant CP#1
+ InstanceCall1 2, CP#2
+ PushConstant CP#3
IfEqStrictTOS
Jump L1
Push r2
- PushConstant CP#5
- InstanceCall1 2, CP#6
PushConstant CP#4
+ InstanceCall1 2, CP#5
+ PushConstant CP#3
IfEqStrictTOS
Jump L2
Jump L3
@@ -780,39 +782,39 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#7
+ StoreContextParent
PopLocal r0
+ PushConstant CP#6
PushConstant CP#8
- PushConstant CP#10
- IndirectStaticCall 1, CP#9
+ IndirectStaticCall 1, CP#7
Drop1
Push r0
- PushConstant CP#11
- StoreFieldTOS CP#0
+ PushConstant CP#9
+ StoreContextVar 0
Push r0
PopLocal r5
Try #1 start:
- PushConstant CP#12
- PushConstant CP#13
- IndirectStaticCall 1, CP#9
+ PushConstant CP#10
+ PushConstant CP#11
+ IndirectStaticCall 1, CP#7
Drop1
- Allocate CP#20
+ Allocate CP#19
StoreLocal r8
Push r8
- PushConstant CP#18
- StoreFieldTOS CP#21
+ PushConstant CP#17
+ StoreFieldTOS CP#20
Push r8
- PushConstant CP#18
+ PushConstant CP#17
StoreFieldTOS CP#22
Push r8
- PushConstant CP#14
- StoreFieldTOS CP#23
+ PushConstant CP#12
+ StoreFieldTOS CP#24
Push r8
Push r0
- StoreFieldTOS CP#15
+ StoreFieldTOS CP#13
PopLocal r7
Push r7
- InstanceCall1 1, CP#24
+ InstanceCall1 1, CP#26
Drop1
Jump L4
Jump L5
@@ -822,9 +824,9 @@
PopLocal r0
MoveSpecial r5, exception
MoveSpecial r6, stackTrace
- PushConstant CP#26
- PushConstant CP#27
- IndirectStaticCall 1, CP#9
+ PushConstant CP#28
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#7
Drop1
Push r5
Push r6
@@ -832,24 +834,24 @@
L4:
Push r5
PopLocal r0
- PushConstant CP#26
PushConstant CP#28
- IndirectStaticCall 1, CP#9
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#7
Drop1
Jump L6
L5:
Push r5
PopLocal r0
- PushConstant CP#26
- PushConstant CP#29
- IndirectStaticCall 1, CP#9
- Drop1
- PushConstant CP#30
+ PushConstant CP#28
PushConstant CP#31
- IndirectStaticCall 1, CP#9
+ IndirectStaticCall 1, CP#7
+ Drop1
+ PushConstant CP#32
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#7
Drop1
Push r0
- LoadFieldTOS CP#7
+ LoadContextParent
PopLocal r0
Jump L7
Try #0 end:
@@ -858,9 +860,9 @@
PopLocal r0
MoveSpecial r3, exception
MoveSpecial r4, stackTrace
- PushConstant CP#32
- PushConstant CP#33
- IndirectStaticCall 1, CP#9
+ PushConstant CP#34
+ PushConstant CP#35
+ IndirectStaticCall 1, CP#7
Drop1
Push r3
Push r4
@@ -868,91 +870,93 @@
L6:
Push r3
PopLocal r0
- PushConstant CP#32
PushConstant CP#34
- IndirectStaticCall 1, CP#9
+ PushConstant CP#36
+ IndirectStaticCall 1, CP#7
Drop1
Jump L2
L7:
Push r3
PopLocal r0
- PushConstant CP#32
- PushConstant CP#35
- IndirectStaticCall 1, CP#9
+ PushConstant CP#34
+ PushConstant CP#37
+ IndirectStaticCall 1, CP#7
Drop1
Jump L3
L2:
- PushConstant CP#36
- PushConstant CP#37
- IndirectStaticCall 1, CP#9
+ PushConstant CP#38
+ PushConstant CP#39
+ IndirectStaticCall 1, CP#7
Drop1
Jump L3
L3:
- PushConstant CP#18
+ PushConstant CP#17
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 25, end 96, handler 96, needs-stack-trace, types [CP#25]
- try-index 1, outer 0, start 40, end 64, handler 64, needs-stack-trace, types [CP#25]
+ try-index 0, outer -1, start 25, end 96, handler 96, needs-stack-trace, types [CP#27]
+ try-index 1, outer 0, start 40, end 64, handler 64, needs-stack-trace, types [CP#27]
}
ConstantPool {
- [0] = ContextOffset var [0]
- [1] = ArgDesc num-args 2, num-type-args 0, names []
- [2] = Int 1
- [3] = ICData target-name '==', arg-desc CP#1
- [4] = Bool true
- [5] = Int 2
- [6] = ICData target-name '==', arg-desc CP#1
- [7] = ContextOffset parent
- [8] = String 'before try 1'
- [9] = ArgDesc num-args 1, num-type-args 0, names []
- [10] = StaticICData target 'dart.core::print', arg-desc CP#9
- [11] = Int 3
- [12] = String 'try'
- [13] = StaticICData target 'dart.core::print', arg-desc CP#9
- [14] = ClosureFunction foo () → void;
- [15] = FieldOffset dart.core::_Closure::_context
- [16] = StaticICData target 'dart.core::print', arg-desc CP#9
- [17] = StaticICData target 'dart.core::print', arg-desc CP#9
- [18] = Null
- [19] = EndClosureFunctionScope
- [20] = Class dart.core::_Closure
- [21] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [22] = FieldOffset dart.core::_Closure::_function_type_arguments
- [23] = FieldOffset dart.core::_Closure::_function
- [24] = ICData target-name 'call', arg-desc CP#9
- [25] = Type dynamic
- [26] = String 'finally 1'
- [27] = StaticICData target 'dart.core::print', arg-desc CP#9
- [28] = StaticICData target 'dart.core::print', arg-desc CP#9
- [29] = StaticICData target 'dart.core::print', arg-desc CP#9
- [30] = String 'after try 1'
- [31] = StaticICData target 'dart.core::print', arg-desc CP#9
- [32] = String 'finally 2'
- [33] = StaticICData target 'dart.core::print', arg-desc CP#9
- [34] = StaticICData target 'dart.core::print', arg-desc CP#9
- [35] = StaticICData target 'dart.core::print', arg-desc CP#9
- [36] = String 'case 2'
- [37] = StaticICData target 'dart.core::print', arg-desc CP#9
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = Int 1
+ [2] = ICData target-name '==', arg-desc CP#0
+ [3] = Bool true
+ [4] = Int 2
+ [5] = ICData target-name '==', arg-desc CP#0
+ [6] = String 'before try 1'
+ [7] = ArgDesc num-args 1, num-type-args 0, names []
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [9] = Int 3
+ [10] = String 'try'
+ [11] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [12] = ClosureFunction foo () → void;
+ [13] = InstanceField dart.core::_Closure::_context
+ [14] = Reserved
+ [15] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [17] = Null
+ [18] = EndClosureFunctionScope
+ [19] = Class dart.core::_Closure
+ [20] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [21] = Reserved
+ [22] = InstanceField dart.core::_Closure::_function_type_arguments
+ [23] = Reserved
+ [24] = InstanceField dart.core::_Closure::_function
+ [25] = Reserved
+ [26] = ICData target-name 'call', arg-desc CP#7
+ [27] = Type dynamic
+ [28] = String 'finally 1'
+ [29] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [30] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [31] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [32] = String 'after try 1'
+ [33] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [34] = String 'finally 2'
+ [35] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [36] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [37] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [38] = String 'case 2'
+ [39] = StaticICData target 'dart.core::print', arg-desc CP#7
}
-Closure CP#14 {
+Closure CP#12 {
Entry 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#15
+ LoadFieldTOS CP#13
PopLocal r0
Push r0
- LoadFieldTOS CP#7
- LoadFieldTOS CP#0
- PushConstant CP#16
- IndirectStaticCall 1, CP#9
+ LoadContextParent
+ LoadContextVar 0
+ PushConstant CP#15
+ IndirectStaticCall 1, CP#7
Drop1
Push r0
- LoadFieldTOS CP#0
- PushConstant CP#17
- IndirectStaticCall 1, CP#9
+ LoadContextVar 0
+ PushConstant CP#16
+ IndirectStaticCall 1, CP#7
Drop1
- PushConstant CP#18
+ PushConstant CP#17
ReturnTOS
}
@@ -1000,30 +1004,30 @@
StoreLocal r1
Push r1
Push r0
- StoreFieldTOS CP#0
+ StoreContextParent
PopLocal r0
Push r0
+ PushConstant CP#0
+ StoreContextVar 0
PushConstant CP#1
- StoreFieldTOS CP#2
- PushConstant CP#3
PopLocal r2
Push r0
PopLocal r3
Try #0 start:
- Allocate CP#27
+ Allocate CP#26
StoreLocal r5
Push r5
- PushConstant CP#3
- StoreFieldTOS CP#28
+ PushConstant CP#1
+ StoreFieldTOS CP#27
Push r5
- PushConstant CP#3
+ PushConstant CP#1
StoreFieldTOS CP#29
Push r5
- PushConstant CP#4
- StoreFieldTOS CP#30
+ PushConstant CP#2
+ StoreFieldTOS CP#31
Push r5
Push r0
- StoreFieldTOS CP#5
+ StoreFieldTOS CP#3
PopLocal r2
Jump L1
Try #0 end:
@@ -1033,12 +1037,12 @@
MoveSpecial r3, exception
MoveSpecial r4, stackTrace
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#31
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#5
Drop1
Push r2
- InstanceCall1 1, CP#32
+ InstanceCall1 1, CP#34
Drop1
Push r3
Push r4
@@ -1047,78 +1051,80 @@
Push r3
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#33
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#35
+ IndirectStaticCall 1, CP#5
Drop1
Push r2
- InstanceCall1 1, CP#34
+ InstanceCall1 1, CP#36
Drop1
Push r0
- LoadFieldTOS CP#0
+ LoadContextParent
PopLocal r0
- PushConstant CP#3
+ PushConstant CP#1
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 15, end 31, handler 31, needs-stack-trace, types [CP#11]
+ try-index 0, outer -1, start 15, end 31, handler 31, needs-stack-trace, types [CP#10]
}
ConstantPool {
- [0] = ContextOffset parent
- [1] = Int 11
- [2] = ContextOffset var [0]
- [3] = Null
- [4] = ClosureFunction <anonymous closure> () → dart.core::int;
- [5] = FieldOffset dart.core::_Closure::_context
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target 'dart.core::print', arg-desc CP#6
- [8] = String 'try 1'
- [9] = StaticICData target 'dart.core::print', arg-desc CP#6
- [10] = Int 42
- [11] = Type dynamic
- [12] = String 'try 2'
- [13] = StaticICData target 'dart.core::print', arg-desc CP#6
- [14] = Int 43
- [15] = StaticICData target 'dart.core::print', arg-desc CP#6
- [16] = StaticICData target 'dart.core::print', arg-desc CP#6
- [17] = StaticICData target 'dart.core::print', arg-desc CP#6
- [18] = StaticICData target 'dart.core::print', arg-desc CP#6
- [19] = StaticICData target 'dart.core::print', arg-desc CP#6
- [20] = StaticICData target 'dart.core::print', arg-desc CP#6
- [21] = StaticICData target 'dart.core::print', arg-desc CP#6
- [22] = StaticICData target 'dart.core::print', arg-desc CP#6
- [23] = StaticICData target 'dart.core::print', arg-desc CP#6
- [24] = StaticICData target 'dart.core::print', arg-desc CP#6
- [25] = StaticICData target 'dart.core::print', arg-desc CP#6
- [26] = EndClosureFunctionScope
- [27] = Class dart.core::_Closure
- [28] = FieldOffset dart.core::_Closure::_instantiator_type_arguments
- [29] = FieldOffset dart.core::_Closure::_function_type_arguments
- [30] = FieldOffset dart.core::_Closure::_function
- [31] = StaticICData target 'dart.core::print', arg-desc CP#6
- [32] = ICData target-name 'call', arg-desc CP#6
- [33] = StaticICData target 'dart.core::print', arg-desc CP#6
- [34] = ICData target-name 'call', arg-desc CP#6
+ [0] = Int 11
+ [1] = Null
+ [2] = ClosureFunction <anonymous closure> () → dart.core::int;
+ [3] = InstanceField dart.core::_Closure::_context
+ [4] = Reserved
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [7] = String 'try 1'
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [9] = Int 42
+ [10] = Type dynamic
+ [11] = String 'try 2'
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [13] = Int 43
+ [14] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [15] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [17] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [18] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [19] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [20] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [21] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [22] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [23] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [24] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [25] = EndClosureFunctionScope
+ [26] = Class dart.core::_Closure
+ [27] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [28] = Reserved
+ [29] = InstanceField dart.core::_Closure::_function_type_arguments
+ [30] = Reserved
+ [31] = InstanceField dart.core::_Closure::_function
+ [32] = Reserved
+ [33] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [34] = ICData target-name 'call', arg-desc CP#5
+ [35] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [36] = ICData target-name 'call', arg-desc CP#5
}
-Closure CP#4 {
+Closure CP#2 {
Entry 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#5
+ LoadFieldTOS CP#3
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#5
Drop1
Push r0
PopLocal r2
Try #0 start:
+ PushConstant CP#7
PushConstant CP#8
- PushConstant CP#9
- IndirectStaticCall 1, CP#6
+ IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#10
+ PushConstant CP#9
Jump L1
Jump L2
Try #0 end:
@@ -1130,11 +1136,11 @@
Push r0
PopLocal r4
Try #1 start:
+ PushConstant CP#11
PushConstant CP#12
- PushConstant CP#13
- IndirectStaticCall 1, CP#6
+ IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#14
+ PushConstant CP#13
Jump L3
Jump L4
Try #1 end:
@@ -1144,9 +1150,9 @@
MoveSpecial r4, exception
MoveSpecial r5, stackTrace
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#15
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#14
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
Push r5
@@ -1155,18 +1161,18 @@
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#16
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#15
+ IndirectStaticCall 1, CP#5
Drop1
ReturnTOS
L4:
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#17
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#16
+ IndirectStaticCall 1, CP#5
Drop1
Push r2
Push r3
@@ -1177,11 +1183,11 @@
Push r0
PopLocal r4
Try #2 start:
- PushConstant CP#12
- PushConstant CP#18
- IndirectStaticCall 1, CP#6
+ PushConstant CP#11
+ PushConstant CP#17
+ IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#14
+ PushConstant CP#13
Jump L5
Jump L6
Try #2 end:
@@ -1191,9 +1197,9 @@
MoveSpecial r4, exception
MoveSpecial r5, stackTrace
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#19
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#18
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
Push r5
@@ -1202,18 +1208,18 @@
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#20
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#19
+ IndirectStaticCall 1, CP#5
Drop1
ReturnTOS
L6:
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#21
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#20
+ IndirectStaticCall 1, CP#5
Drop1
ReturnTOS
L2:
@@ -1222,11 +1228,11 @@
Push r0
PopLocal r4
Try #3 start:
- PushConstant CP#12
- PushConstant CP#22
- IndirectStaticCall 1, CP#6
+ PushConstant CP#11
+ PushConstant CP#21
+ IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#14
+ PushConstant CP#13
Jump L7
Jump L8
Try #3 end:
@@ -1236,9 +1242,9 @@
MoveSpecial r4, exception
MoveSpecial r5, stackTrace
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#23
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#22
+ IndirectStaticCall 1, CP#5
Drop1
Push r4
Push r5
@@ -1247,20 +1253,20 @@
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#24
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#23
+ IndirectStaticCall 1, CP#5
Drop1
ReturnTOS
L8:
Push r4
PopLocal r0
Push r0
- LoadFieldTOS CP#2
- PushConstant CP#25
- IndirectStaticCall 1, CP#6
+ LoadContextVar 0
+ PushConstant CP#24
+ IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#3
+ PushConstant CP#1
ReturnTOS
}
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 618b5b4..229c5ea 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -74,28 +74,29 @@
Push FP[-6]
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
AssertAssignable 0, CP#4
StoreFieldTOS CP#5
Push FP[-6]
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ PushConstant CP#8
+ IndirectStaticCall 1, CP#7
Drop1
PushConstant CP#1
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::D
+ [0] = TypeArgumentsField #lib::D
[1] = Null
[2] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
[3] = String ''
[4] = SubtypeTestCache
- [5] = FieldOffset #lib::D::foo
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target '#lib::C::', arg-desc CP#6
+ [5] = InstanceField #lib::D::foo
+ [6] = Reserved
+ [7] = ArgDesc num-args 1, num-type-args 0, names []
+ [8] = StaticICData target '#lib::C::', arg-desc CP#7
}
] constructor •(dynamic tt) → void
: self::D::foo = tt as{TypeError} core::Map<self::D::P, self::D::Q>, super self::C::•()
@@ -106,7 +107,7 @@
CheckStack
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#2
InstanceCall1 4, CP#4
@@ -121,7 +122,7 @@
L1:
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#9
InstanceCall1 4, CP#10
@@ -137,7 +138,7 @@
Push FP[-6]
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#13
PushConstant CP#14
@@ -148,7 +149,7 @@
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::D
+ [0] = TypeArgumentsField #lib::D
[1] = Null
[2] = Type #lib::A<#lib::D::P>
[3] = ArgDesc num-args 4, num-type-args 0, names []
@@ -197,7 +198,7 @@
L1:
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#8
+ LoadTypeArgumentsField CP#8
Push r0
PushConstant CP#9
InstanceCall1 4, CP#10
@@ -212,7 +213,7 @@
L2:
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#8
+ LoadTypeArgumentsField CP#8
Push r0
PushConstant CP#13
InstanceCall1 4, CP#14
@@ -230,7 +231,7 @@
[5] = String '31'
[6] = ArgDesc num-args 1, num-type-args 0, names []
[7] = StaticICData target 'dart.core::print', arg-desc CP#6
- [8] = TypeArgumentsFieldOffset #lib::D
+ [8] = TypeArgumentsField #lib::D
[9] = Type #lib::C<dart.core::Map<#lib::D::foo3::T1, #lib::D::P>, dart.core::List<#lib::D::foo3::T2>, #lib::D::Q>
[10] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
[11] = String '32'
@@ -253,7 +254,7 @@
Entry 2
CheckStack
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
InstantiateTypeArgumentsTOS 0, CP#2
StoreLocal r1
@@ -265,7 +266,7 @@
PushConstant CP#4
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#5
PushConstant CP#6
@@ -276,7 +277,7 @@
PopLocal r0
Push FP[-5]
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
PushConstant CP#1
PushConstant CP#5
PushConstant CP#6
@@ -286,7 +287,7 @@
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::D
+ [0] = TypeArgumentsField #lib::D
[1] = Null
[2] = TypeArgs [dart.core::Map<#lib::D::P, #lib::D::Q>]
[3] = Int 1
@@ -324,7 +325,7 @@
CheckStack
CheckFunctionTypeArgs 2, 0
Push FP[-6]
- LoadFieldTOS CP#0
+ LoadTypeArgumentsField CP#0
Push r0
PushConstant CP#1
PushConstant CP#2
@@ -347,7 +348,7 @@
ReturnTOS
}
ConstantPool {
- [0] = TypeArgumentsFieldOffset #lib::E
+ [0] = TypeArgumentsField #lib::E
[1] = Type #lib::E::foo6::T
[2] = Type #lib::E::P
[3] = String 'T'
@@ -447,7 +448,7 @@
[1] = Type dart.core::List<dart.core::Iterable<dynamic>>
[2] = String ''
[3] = SubtypeTestCache
- [4] = Field #lib::globalVar
+ [4] = StaticField #lib::globalVar
}
]static method foo5(dynamic x) → void {
self::globalVar = x as{TypeError} core::List<core::Iterable<dynamic>>;
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index deb0238..941e713 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -97,10 +97,10 @@
kArgDesc,
kICData,
kStaticICData,
- kField,
- kFieldOffset,
+ kStaticField,
+ kInstanceField,
kClass,
- kTypeArgumentsFieldOffset,
+ kTypeArgumentsField,
kTearOff,
kType,
kTypeArguments,
@@ -108,7 +108,6 @@
kInstance,
kSymbol,
kTypeArgumentsForInstanceAllocation,
- kContextOffset,
kClosureFunction,
kEndClosureFunctionScope,
kNativeEntry,
@@ -242,20 +241,28 @@
ICData::Cast(obj).set_tag(ICData::Tag::kStaticCall);
#endif
} break;
- case ConstantPoolTag::kField:
+ case ConstantPoolTag::kStaticField:
obj = H.LookupFieldByKernelField(helper_->ReadCanonicalNameReference());
ASSERT(obj.IsField());
break;
- case ConstantPoolTag::kFieldOffset:
- obj = H.LookupFieldByKernelField(helper_->ReadCanonicalNameReference());
- ASSERT(obj.IsField());
- obj = Smi::New(Field::Cast(obj).Offset() / kWordSize);
+ case ConstantPoolTag::kInstanceField:
+ field =
+ H.LookupFieldByKernelField(helper_->ReadCanonicalNameReference());
+ // InstanceField constant occupies 2 entries.
+ // The first entry is used for field offset.
+ obj = Smi::New(field.Offset() / kWordSize);
+ pool.SetTypeAt(i, ObjectPool::kTaggedObject);
+ pool.SetObjectAt(i, obj);
+ ++i;
+ ASSERT(i < obj_count);
+ // The second entry is used for field object.
+ obj = field.raw();
break;
case ConstantPoolTag::kClass:
obj = H.LookupClassByKernelClass(helper_->ReadCanonicalNameReference());
ASSERT(obj.IsClass());
break;
- case ConstantPoolTag::kTypeArgumentsFieldOffset:
+ case ConstantPoolTag::kTypeArgumentsField:
cls = H.LookupClassByKernelClass(helper_->ReadCanonicalNameReference());
obj = Smi::New(cls.type_arguments_field_offset() / kWordSize);
break;
@@ -325,14 +332,6 @@
.raw();
ASSERT(obj.IsNull() || obj.IsTypeArguments());
} break;
- case ConstantPoolTag::kContextOffset: {
- intptr_t index = helper_->ReadUInt();
- if (index == 0) {
- obj = Smi::New(Context::parent_offset() / kWordSize);
- } else {
- obj = Smi::New(Context::variable_offset(index - 1) / kWordSize);
- }
- } break;
case ConstantPoolTag::kClosureFunction: {
name = H.DartSymbolPlain(helper_->ReadStringReference()).raw();
const Function& closure = Function::Handle(
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index 6874731..e6bdae6 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -499,6 +499,14 @@
//
// Store value SP[0] into object SP[-1] at offset (in words) PP[D].
//
+// - StoreContextParent
+//
+// Store context SP[0] into `parent` field of context SP[-1].
+//
+// - StoreContextVar D
+//
+// Store value SP[0] into context SP[-1] at index D.
+//
// - LoadField rA, rB, C
//
// Load value at offset (in words) C from object FP[rB] into FP[rA].
@@ -517,6 +525,20 @@
//
// Push value at offset (in words) PP[D] from object SP[0].
//
+// - LoadTypeArgumentsField D
+//
+// Load instantiator type arguments from an instance SP[0].
+// PP[D] = offset (in words) of type arguments field corresponding
+// to an instance's class.
+//
+// - LoadContextParent
+//
+// Load parent from context SP[0].
+//
+// - LoadContextVar D
+//
+// Load value from context SP[0] at index D.
+//
// - BooleanNegateTOS
//
// SP[0] = !SP[0]
@@ -929,10 +951,15 @@
V(StoreField, A_B_C, reg, num, reg) \
V(StoreFieldExt, A_D, reg, reg, ___) \
V(StoreFieldTOS, D, lit, ___, ___) \
+ V(StoreContextParent, 0, ___, ___, ___) \
+ V(StoreContextVar, D, num, ___, ___) \
V(LoadField, A_B_C, reg, reg, num) \
V(LoadFieldExt, A_D, reg, reg, ___) \
V(LoadUntagged, A_B_C, reg, reg, num) \
V(LoadFieldTOS, D, lit, ___, ___) \
+ V(LoadTypeArgumentsField, D, lit, ___, ___) \
+ V(LoadContextParent, 0, ___, ___, ___) \
+ V(LoadContextVar, D, num, ___, ___) \
V(BooleanNegateTOS, 0, ___, ___, ___) \
V(BooleanNegate, A_D, reg, reg, ___) \
V(Throw, A, num, ___, ___) \
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index 34c4b8c..0e852bf 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -3525,6 +3525,36 @@
}
{
+ BYTECODE(StoreContextParent, 0);
+ const uword offset_in_words =
+ static_cast<uword>(Context::parent_offset() / kWordSize);
+ RawContext* instance = reinterpret_cast<RawContext*>(SP[-1]);
+ RawContext* value = reinterpret_cast<RawContext*>(SP[0]);
+ SP -= 2; // Drop instance and value.
+
+ instance->StorePointer(
+ reinterpret_cast<RawContext**>(instance->ptr()) + offset_in_words,
+ value);
+
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(StoreContextVar, __D);
+ const uword offset_in_words =
+ static_cast<uword>(Context::variable_offset(rD) / kWordSize);
+ RawContext* instance = reinterpret_cast<RawContext*>(SP[-1]);
+ RawObject* value = reinterpret_cast<RawContext*>(SP[0]);
+ SP -= 2; // Drop instance and value.
+
+ instance->StorePointer(
+ reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
+ value);
+
+ DISPATCH();
+ }
+
+ {
BYTECODE(LoadField, A_B_C);
const uint16_t instance_reg = rB;
const uint16_t offset_in_words = rC;
@@ -3562,6 +3592,33 @@
}
{
+ BYTECODE(LoadTypeArgumentsField, __D);
+ const uword offset_in_words =
+ static_cast<uword>(Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD))));
+ RawInstance* instance = static_cast<RawInstance*>(SP[0]);
+ SP[0] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(LoadContextParent, 0);
+ const uword offset_in_words =
+ static_cast<uword>(Context::parent_offset() / kWordSize);
+ RawContext* instance = static_cast<RawContext*>(SP[0]);
+ SP[0] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(LoadContextVar, __D);
+ const uword offset_in_words =
+ static_cast<uword>(Context::variable_offset(rD) / kWordSize);
+ RawContext* instance = static_cast<RawContext*>(SP[0]);
+ SP[0] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+ DISPATCH();
+ }
+
+ {
BYTECODE(InitStaticTOS, 0);
UNREACHABLE(); // Not used. TODO(regis): Remove this bytecode.
RawField* field = static_cast<RawField*>(*SP--);