[vm/bytecode] Add PushNull, PushTrue, PushFalse and PushInt bytecodes
These bytecode instructions are added in order to shrink constant pools
and reduce time spent for reading constant pool entries.
Change-Id: I8522f73dc7a6236969ac0422c6cb89b945559b2d
Reviewed-on: https://dart-review.googlesource.com/75125
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
diff --git a/pkg/vm/lib/bytecode/assembler.dart b/pkg/vm/lib/bytecode/assembler.dart
index 469682e..82b3c2a 100644
--- a/pkg/vm/lib/bytecode/assembler.dart
+++ b/pkg/vm/lib/bytecode/assembler.dart
@@ -221,6 +221,22 @@
emitWord(_encodeD(Opcode.kPushConstant, rd));
}
+ void emitPushNull() {
+ emitWord(_encode0(Opcode.kPushNull));
+ }
+
+ void emitPushTrue() {
+ emitWord(_encode0(Opcode.kPushTrue));
+ }
+
+ void emitPushFalse() {
+ emitWord(_encode0(Opcode.kPushFalse));
+ }
+
+ void emitPushInt(int rx) {
+ emitWord(_encodeX(Opcode.kPushInt, rx));
+ }
+
void emitStoreLocal(int rx) {
emitWord(_encodeX(Opcode.kStoreLocal, rx));
}
diff --git a/pkg/vm/lib/bytecode/dbc.dart b/pkg/vm/lib/bytecode/dbc.dart
index 000d960..8fd6b05 100644
--- a/pkg/vm/lib/bytecode/dbc.dart
+++ b/pkg/vm/lib/bytecode/dbc.dart
@@ -43,6 +43,8 @@
// 12. JumpIfNotZeroTypeArgs instruction jumps if number of passed
// function type arguments is not zero.
//
+// 13. PushNull, PushTrue, PushFalse, PushInt instructions added.
+//
enum Opcode {
kTrap,
@@ -65,6 +67,10 @@
kLoadClassId,
kLoadClassIdTOS,
kPushConstant,
+ kPushNull,
+ kPushTrue,
+ kPushFalse,
+ kPushInt,
kStoreLocal,
kPopLocal,
kIndirectStaticCall,
@@ -320,6 +326,14 @@
Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
Opcode.kPushConstant: const Format(
Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
+ Opcode.kPushNull: const Format(
+ Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+ Opcode.kPushTrue: const Format(
+ Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+ Opcode.kPushFalse: const Format(
+ Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+ Opcode.kPushInt: const Format(
+ Encoding.kX, const [Operand.imm, Operand.none, Operand.none]),
Opcode.kStoreLocal: const Format(
Encoding.kX, const [Operand.xeg, Operand.none, Operand.none]),
Opcode.kPopLocal: const Format(
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 49c6a09..7de7ecd 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -150,7 +150,7 @@
} else {
node.function?.body?.accept(this);
// TODO(alexmarkov): figure out when 'return null' should be generated.
- _genPushNull();
+ asm.emitPushNull();
}
_genReturnTOS();
end(node);
@@ -296,17 +296,27 @@
arguments.named.forEach((NamedExpression ne) => ne.value.accept(this));
}
- void _genPushNull() {
- final cpIndex = cp.add(const ConstantNull());
- asm.emitPushConstant(cpIndex);
+ void _genPushBool(bool value) {
+ if (value) {
+ asm.emitPushTrue();
+ } else {
+ asm.emitPushFalse();
+ }
}
void _genPushInt(int value) {
- int cpIndex = cp.add(new ConstantInt(value));
- asm.emitPushConstant(cpIndex);
+ if (value.bitLength + 1 <= 16) {
+ asm.emitPushInt(value);
+ } else {
+ int cpIndex = cp.add(new ConstantInt(value));
+ asm.emitPushConstant(cpIndex);
+ }
}
Constant _evaluateConstantExpression(Expression expr) {
+ if (expr is ConstantExpression) {
+ return expr.constant;
+ }
final constant = constantEvaluator.evaluate(expr);
if (constant == null) {
// Compile-time error is already reported. Proceed with compilation
@@ -319,7 +329,15 @@
void _genPushConstExpr(Expression expr) {
final constant = _evaluateConstantExpression(expr);
- asm.emitPushConstant(constant.accept(constantEmitter));
+ if (constant is NullConstant) {
+ asm.emitPushNull();
+ } else if (constant is BoolConstant) {
+ _genPushBool(constant.value);
+ } else if (constant is IntConstant) {
+ _genPushInt(constant.value);
+ } else {
+ asm.emitPushConstant(constant.accept(constantEmitter));
+ }
}
void _genReturnTOS() {
@@ -398,13 +416,13 @@
assert(instantiatorTypeArguments != null);
_genPushInstantiatorTypeArguments();
} else {
- _genPushNull();
+ asm.emitPushNull();
}
if (functionTypeParameters != null &&
types.any((t) => containsTypeVariable(t, functionTypeParameters))) {
_genPushFunctionTypeArguments();
} else {
- _genPushNull();
+ asm.emitPushNull();
}
}
@@ -421,7 +439,7 @@
asm.emitLoadTypeArgumentsField(cpIndex);
}
} else {
- _genPushNull();
+ asm.emitPushNull();
}
}
@@ -499,7 +517,7 @@
if (locals.hasFunctionTypeArgsVar) {
asm.emitPush(locals.functionTypeArgsVarIndexInFrame);
} else {
- _genPushNull();
+ asm.emitPushNull();
}
}
@@ -561,7 +579,7 @@
}
void _genJumpIfFalse(bool negated, Label dest) {
- asm.emitPushConstant(cp.add(new ConstantBool(true)));
+ asm.emitPushTrue();
if (negated) {
asm.emitIfEqStrictTOS(); // if ((!condition) == true) ...
} else {
@@ -595,7 +613,7 @@
void _genInstanceOf(DartType type) {
if (typeEnvironment.isTop(type)) {
asm.emitDrop1();
- asm.emitPushConstant(cp.add(new ConstantBool(true)));
+ asm.emitPushTrue();
return;
}
@@ -604,8 +622,8 @@
if (hasFreeTypeParameters([type])) {
_genPushInstantiatorAndFunctionTypeArguments([type]);
} else {
- _genPushNull(); // Instantiator type arguments.
- _genPushNull(); // Function type arguments.
+ asm.emitPushNull(); // Instantiator type arguments.
+ asm.emitPushNull(); // Function type arguments.
}
asm.emitPushConstant(cp.add(new ConstantType(type)));
final argDescIndex = cp.add(new ConstantArgDesc(4));
@@ -686,11 +704,11 @@
Label done = new Label();
_genLoadVar(member.function.positionalParameters[0]);
- _genPushNull();
+ asm.emitPushNull();
asm.emitIfNeStrictTOS();
asm.emitJump(done);
- asm.emitPushConstant(cp.add(new ConstantBool(false)));
+ asm.emitPushFalse();
_genReturnTOS();
asm.bind(done);
@@ -1129,7 +1147,7 @@
function.body.accept(this);
// TODO(alexmarkov): figure out when 'return null' should be generated.
- _genPushNull();
+ asm.emitPushNull();
_genReturnTOS();
if (locals.isSyncYieldingFrame) {
@@ -1399,7 +1417,7 @@
_createArgumentsArray(temp, typeArgs, args, storeLastArgumentToTemp);
// Argument 3 for _allocateInvocationMirror(): isSuperInvocation flag.
- asm.emitPushConstant(cp.add(new ConstantBool(true)));
+ asm.emitPushTrue();
_genStaticCall(allocateInvocationMirror, new ConstantArgDesc(4), 4);
@@ -1435,14 +1453,12 @@
@override
visitBoolLiteral(BoolLiteral node) {
- final cpIndex = cp.add(new ConstantBool.fromLiteral(node));
- asm.emitPushConstant(cpIndex);
+ _genPushBool(node.value);
}
@override
visitIntLiteral(IntLiteral node) {
- final cpIndex = cp.add(new ConstantInt.fromLiteral(node));
- asm.emitPushConstant(cpIndex);
+ _genPushInt(node.value);
}
@override
@@ -1653,7 +1669,7 @@
final isOR = (node.operator == '||');
bool negated = _genCondition(node.left);
- asm.emitPushConstant(cp.add(new ConstantBool(true)));
+ asm.emitPushTrue();
if (negated != isOR) {
// OR: if (condition == true)
// AND: if ((!condition) == true)
@@ -1673,7 +1689,7 @@
asm.emitJump(done);
asm.bind(shortCircuit);
- asm.emitPushConstant(cp.add(new ConstantBool(isOR)));
+ _genPushBool(isOR);
asm.emitPopLocal(temp);
asm.bind(done);
@@ -1847,8 +1863,7 @@
@override
visitNullLiteral(NullLiteral node) {
- final cpIndex = cp.add(const ConstantNull());
- asm.emitPushConstant(cpIndex);
+ asm.emitPushNull();
}
@override
@@ -1920,7 +1935,7 @@
assert(args.types.isEmpty);
// VM needs type arguments for every invocation of a factory
// constructor. TODO(alexmarkov): Clean this up.
- _genPushNull();
+ asm.emitPushNull();
}
args =
new Arguments(node.arguments.positional, named: node.arguments.named);
@@ -1955,7 +1970,7 @@
node.expressions.single.accept(this);
_genStaticCall(interpolateSingle, new ConstantArgDesc(1), 1);
} else {
- _genPushNull();
+ asm.emitPushNull();
_genPushInt(node.expressions.length);
asm.emitCreateArrayTOS();
@@ -2050,7 +2065,7 @@
}
void _genFutureNull() {
- _genPushNull();
+ asm.emitPushNull();
_genStaticCall(futureValue, new ConstantArgDesc(1), 1);
}
@@ -2078,7 +2093,7 @@
if (node.message != null) {
node.message.accept(this);
} else {
- _genPushNull();
+ asm.emitPushNull();
}
_genStaticCall(throwNewAssertionError, new ConstantArgDesc(3), 3);
@@ -2602,7 +2617,7 @@
if (node.initializer != null) {
node.initializer.accept(this);
} else {
- _genPushNull();
+ asm.emitPushNull();
}
if (isCaptured) {
asm.emitStoreContextVar(locals.getVarIndexInContext(node));
@@ -2722,8 +2737,7 @@
@override
visitConstantExpression(ConstantExpression node) {
- int cpIndex = node.constant.accept(constantEmitter);
- asm.emitPushConstant(cpIndex);
+ _genPushConstExpr(node);
}
}
diff --git a/pkg/vm/testcases/bytecode/asserts.dart.expect b/pkg/vm/testcases/bytecode/asserts.dart.expect
index d7546c2..d6a69ba 100644
--- a/pkg/vm/testcases/bytecode/asserts.dart.expect
+++ b/pkg/vm/testcases/bytecode/asserts.dart.expect
@@ -9,25 +9,22 @@
JumpIfNoAsserts L1
Push FP[-5]
AssertBoolean 0
- PushConstant CP#0
+ PushTrue
IfEqStrictTOS
Jump L1
+ PushInt 0
+ PushInt 0
+ PushNull
PushConstant CP#1
- PushConstant CP#1
- PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 3, CP#3
+ IndirectStaticCall 3, CP#0
Drop1
L1:
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Bool true
- [1] = Int 0
- [2] = Null
- [3] = ArgDesc num-args 3, num-type-args 0, names []
- [4] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#3
+ [0] = ArgDesc num-args 3, num-type-args 0, names []
+ [1] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#0
}
]static method test1(core::bool condition) → void {
assert(condition);
@@ -40,29 +37,26 @@
Push FP[-6]
InstanceCall 1, CP#1
AssertBoolean 0
- PushConstant CP#2
+ PushTrue
IfEqStrictTOS
Jump L1
- PushConstant CP#3
- PushConstant CP#3
+ PushInt 0
+ PushInt 0
Push FP[-5]
- InstanceCall 1, CP#4
- PushConstant CP#6
- IndirectStaticCall 3, CP#5
+ InstanceCall 1, CP#2
+ PushConstant CP#4
+ IndirectStaticCall 3, CP#3
Drop1
L1:
- PushConstant CP#7
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = ICData dynamic target-name 'call', arg-desc CP#0
- [2] = Bool true
- [3] = Int 0
- [4] = ICData dynamic target-name 'call', arg-desc CP#0
- [5] = ArgDesc num-args 3, num-type-args 0, names []
- [6] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#5
- [7] = Null
+ [2] = ICData dynamic target-name 'call', arg-desc CP#0
+ [3] = ArgDesc num-args 3, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#3
}
]static method test2(() → core::bool condition, () → core::String message) → void {
assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
@@ -71,10 +65,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index 4dbdd29..8267a0d 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -8,20 +8,20 @@
Bytecode {
Entry 3
CheckStack
- Allocate CP#21
+ Allocate CP#19
StoreLocal r2
Push r2
- PushConstant CP#3
+ PushNull
+ StoreFieldTOS CP#20
+ Push r2
+ PushNull
StoreFieldTOS CP#22
Push r2
- PushConstant CP#3
- StoreFieldTOS CP#24
- Push r2
- PushConstant CP#26
- StoreFieldTOS CP#27
+ PushConstant CP#24
+ StoreFieldTOS CP#25
Push r2
PushConstant CP#0
- StoreFieldTOS CP#29
+ StoreFieldTOS CP#27
Push r2
Push r0
StoreFieldTOS CP#1
@@ -31,47 +31,45 @@
[0] = ClosureFunction <anonymous closure> (dart.async::Future<dart.core::int> x) → dart.async::Future<dart.core::Null> /* originally async */ ;
[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
+ [3] = Type dart.async::Future<dart.core::int>
+ [4] = String 'x'
+ [5] = SubtypeTestCache
+ [6] = TypeArgumentsForInstanceAllocation dart.async::Completer [dart.core::Null]
+ [7] = ArgDesc num-args 1, num-type-args 0, names []
+ [8] = StaticICData target 'dart.async::Completer::sync', arg-desc CP#7
+ [9] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [10] = Null
+ [11] = ArgDesc num-args 4, num-type-args 0, names []
+ [12] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#11
+ [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] = 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_type_arguments
- [25] = Reserved
- [26] = EmptyTypeArguments
- [27] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [24] = EmptyTypeArguments
+ [25] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [26] = Reserved
+ [27] = InstanceField dart.core::_Closure::_function
[28] = Reserved
- [29] = InstanceField dart.core::_Closure::_function
- [30] = Reserved
- [31] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#8
- [32] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#8
- [33] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#8
- [34] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [35] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
- [36] = ICData get target-name 'future', arg-desc CP#8
- [37] = EndClosureFunctionScope
+ [29] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#7
+ [30] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#7
+ [31] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#7
+ [32] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [33] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#13
+ [34] = ICData get target-name 'future', arg-desc CP#7
+ [35] = EndClosureFunctionScope
}
-Closure CP#11 {
+Closure CP#9 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#10
+ LoadConstant r2, CP#10
+ LoadConstant r3, CP#10
Frame 6
CheckStack
Push r0
@@ -80,7 +78,7 @@
Push r4
LoadContextVar 5
StoreLocal r5
- PushConstant CP#10
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -88,7 +86,7 @@
StoreContextVar 7
Try #0 start:
Push r4
- PushConstant CP#12
+ PushInt 1
StoreContextVar 5
Push r4
Push r4
@@ -101,10 +99,10 @@
LoadContextVar 4
Push r4
LoadContextVar 8
- PushConstant CP#14
- IndirectStaticCall 4, CP#13
+ PushConstant CP#12
+ IndirectStaticCall 4, CP#11
PopLocal r8
- PushConstant CP#3
+ PushNull
ReturnTOS
L4:
IfEqNull r2
@@ -119,10 +117,10 @@
LoadContextVar 1
Push r4
LoadContextVar 2
- PushConstant CP#16
- IndirectStaticCall 2, CP#15
+ PushConstant CP#14
+ IndirectStaticCall 2, CP#13
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L3
Try #0 end:
@@ -144,11 +142,11 @@
LoadContextVar 1
Push r8
Push r9
- InstanceCall 3, CP#19
+ InstanceCall 3, CP#17
Drop1
Jump L3
L3:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Push r4
@@ -170,84 +168,84 @@
Push FP[-5]
StoreContextVar 0
Push FP[-5]
- PushConstant CP#3
+ PushNull
+ PushNull
PushConstant CP#3
PushConstant CP#4
- PushConstant CP#5
- AssertAssignable 0, CP#6
+ AssertAssignable 0, CP#5
Drop1
Push r0
- PushConstant CP#7
- PushConstant CP#9
- IndirectStaticCall 1, CP#8
+ PushConstant CP#6
+ PushConstant CP#8
+ IndirectStaticCall 1, CP#7
StoreContextVar 1
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 2
- PushConstant CP#3
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 3
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 4
Push r0
- PushConstant CP#10
+ PushInt 0
StoreContextVar 5
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 6
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 7
Push r0
- Allocate CP#21
+ Allocate CP#19
StoreLocal r3
Push r3
- PushConstant CP#3
+ PushNull
+ StoreFieldTOS CP#20
+ Push r3
+ PushNull
StoreFieldTOS CP#22
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#24
+ PushConstant CP#24
+ StoreFieldTOS CP#25
Push r3
- PushConstant CP#26
+ PushConstant CP#9
StoreFieldTOS CP#27
Push r3
- PushConstant CP#11
- StoreFieldTOS CP#29
- Push r3
Push r0
StoreFieldTOS CP#1
StoreContextVar 8
Push r0
LoadContextVar 8
- PushConstant CP#31
- IndirectStaticCall 1, CP#8
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#7
PopLocal r2
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#32
- IndirectStaticCall 1, CP#8
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#7
StoreContextVar 3
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#33
- IndirectStaticCall 1, CP#8
+ PushConstant CP#31
+ IndirectStaticCall 1, CP#7
StoreContextVar 4
- PushConstant CP#34
+ PushConstant CP#32
Push r0
LoadContextVar 8
- PushConstant CP#35
- IndirectStaticCall 2, CP#15
+ PushConstant CP#33
+ IndirectStaticCall 2, CP#13
Drop1
Push r0
LoadContextVar 1
- InstanceCall 1, CP#36
+ InstanceCall 1, CP#34
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
@@ -291,119 +289,117 @@
IndirectStaticCall 1, CP#1
StoreContextVar 0
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 1
- PushConstant CP#3
+ PushNull
PopLocal r2
- PushConstant CP#3
+ PushNull
PopLocal r3
- PushConstant CP#3
+ PushNull
PopLocal r4
Push r0
- PushConstant CP#4
+ PushInt 0
StoreContextVar 2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 3
- Allocate CP#15
+ Allocate CP#13
StoreLocal r6
Push r6
- PushConstant CP#3
+ PushNull
+ StoreFieldTOS CP#14
+ Push r6
+ PushNull
StoreFieldTOS CP#16
Push r6
- PushConstant CP#3
- StoreFieldTOS CP#18
+ PushConstant CP#18
+ StoreFieldTOS CP#19
Push r6
- PushConstant CP#20
+ PushConstant CP#3
StoreFieldTOS CP#21
Push r6
- PushConstant CP#5
- StoreFieldTOS CP#23
- Push r6
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
PopLocal r5
Push r5
+ PushConstant CP#23
+ IndirectStaticCall 1, CP#1
+ PopLocal r2
+ Push r5
+ PushConstant CP#24
+ IndirectStaticCall 1, CP#1
+ PopLocal r3
+ Push r5
PushConstant CP#25
IndirectStaticCall 1, CP#1
- PopLocal r2
- Push r5
+ PopLocal r4
PushConstant CP#26
- IndirectStaticCall 1, CP#1
- PopLocal r3
Push r5
PushConstant CP#27
- IndirectStaticCall 1, CP#1
- PopLocal r4
- PushConstant CP#28
- Push r5
- PushConstant CP#29
- IndirectStaticCall 2, CP#9
+ IndirectStaticCall 2, CP#7
Drop1
Push r0
LoadContextVar 0
- InstanceCall 1, CP#30
+ InstanceCall 1, CP#28
ReturnTOS
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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
+ [3] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [4] = Null
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 2, num-type-args 0, names []
+ [8] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#7
+ [9] = Type dynamic
+ [10] = ArgDesc num-args 3, num-type-args 0, names []
+ [11] = ICData target-name 'completeError', arg-desc CP#10
+ [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_type_arguments
- [19] = Reserved
- [20] = EmptyTypeArguments
- [21] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [18] = EmptyTypeArguments
+ [19] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [20] = Reserved
+ [21] = InstanceField dart.core::_Closure::_function
[22] = Reserved
- [23] = InstanceField dart.core::_Closure::_function
- [24] = Reserved
- [25] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
- [26] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
- [27] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
- [28] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [29] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
- [30] = ICData get target-name 'future', arg-desc CP#1
+ [23] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [24] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [25] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [26] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [27] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#7
+ [28] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#5 {
+Closure CP#3 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#4
+ LoadConstant r2, CP#4
+ LoadConstant r3, CP#4
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 2
StoreLocal r5
- PushConstant CP#4
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
PopLocal r6
Try #0 start:
Push r4
- PushConstant CP#8
+ PushInt 42
StoreContextVar 1
Jump L2
L2:
@@ -411,10 +407,10 @@
LoadContextVar 0
Push r4
LoadContextVar 1
- PushConstant CP#10
- IndirectStaticCall 2, CP#9
+ PushConstant CP#8
+ IndirectStaticCall 2, CP#7
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L3
Try #0 end:
@@ -432,11 +428,11 @@
LoadContextVar 0
Push r8
Push r9
- InstanceCall 3, CP#13
+ InstanceCall 3, CP#11
Drop1
Jump L3
L3:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Trap
@@ -487,129 +483,126 @@
IndirectStaticCall 1, CP#1
StoreContextVar 2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 3
- PushConstant CP#3
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 4
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 5
Push r0
- PushConstant CP#4
+ PushInt 0
StoreContextVar 6
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 7
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 8
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 9
Push r0
- Allocate CP#20
+ Allocate CP#17
StoreLocal r3
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#21
+ PushNull
+ StoreFieldTOS CP#18
Push r3
- PushConstant CP#3
+ PushNull
+ StoreFieldTOS CP#20
+ Push r3
+ PushConstant CP#22
StoreFieldTOS CP#23
Push r3
- PushConstant CP#25
- StoreFieldTOS CP#26
- Push r3
- PushConstant CP#5
- StoreFieldTOS CP#28
+ PushConstant CP#3
+ StoreFieldTOS CP#25
Push r3
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
StoreContextVar 10
Push r0
LoadContextVar 10
- PushConstant CP#30
+ PushConstant CP#27
IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
LoadContextVar 10
- PushConstant CP#31
+ PushConstant CP#28
IndirectStaticCall 1, CP#1
StoreContextVar 4
Push r0
Push r0
LoadContextVar 10
- PushConstant CP#32
+ PushConstant CP#29
IndirectStaticCall 1, CP#1
StoreContextVar 5
- PushConstant CP#33
+ PushConstant CP#30
Push r0
LoadContextVar 10
- PushConstant CP#34
- IndirectStaticCall 2, CP#13
+ PushConstant CP#31
+ IndirectStaticCall 2, CP#10
Drop1
Push r0
LoadContextVar 2
- InstanceCall 1, CP#35
+ InstanceCall 1, CP#32
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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
+ [3] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [4] = Null
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 4, num-type-args 0, names []
+ [8] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [9] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [10] = ArgDesc num-args 2, num-type-args 0, names []
+ [11] = ICData target-name '+', arg-desc CP#10
+ [12] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#10
+ [13] = Type dynamic
+ [14] = ArgDesc num-args 3, num-type-args 0, names []
+ [15] = ICData target-name 'completeError', arg-desc CP#14
+ [16] = EndClosureFunctionScope
+ [17] = Class dart.core::_Closure
+ [18] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [19] = Reserved
+ [20] = InstanceField dart.core::_Closure::_function_type_arguments
+ [21] = Reserved
+ [22] = EmptyTypeArguments
+ [23] = InstanceField dart.core::_Closure::_delayed_type_arguments
[24] = Reserved
- [25] = EmptyTypeArguments
- [26] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [27] = Reserved
- [28] = InstanceField dart.core::_Closure::_function
- [29] = Reserved
- [30] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
- [31] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
- [32] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
- [33] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [34] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#13
- [35] = ICData get target-name 'future', arg-desc CP#1
+ [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#10
+ [32] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#5 {
+Closure CP#3 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#4
+ LoadConstant r2, CP#4
+ LoadConstant r3, CP#4
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 6
StoreLocal r5
- PushConstant CP#4
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -617,7 +610,7 @@
StoreContextVar 8
Try #0 start:
Push r4
- PushConstant CP#8
+ PushInt 1
StoreContextVar 6
Push r4
Push r4
@@ -630,10 +623,10 @@
LoadContextVar 5
Push r4
LoadContextVar 10
- PushConstant CP#10
- IndirectStaticCall 4, CP#9
+ PushConstant CP#8
+ IndirectStaticCall 4, CP#7
PopLocal r8
- PushConstant CP#3
+ PushNull
ReturnTOS
L6:
IfEqNull r2
@@ -646,7 +639,7 @@
Push r1
StoreContextVar 9
Push r4
- PushConstant CP#11
+ PushInt 2
StoreContextVar 6
Push r4
Push r4
@@ -659,10 +652,10 @@
LoadContextVar 5
Push r4
LoadContextVar 10
- PushConstant CP#12
- IndirectStaticCall 4, CP#9
+ PushConstant CP#9
+ IndirectStaticCall 4, CP#7
PopLocal r9
- PushConstant CP#3
+ PushNull
ReturnTOS
L7:
IfEqNull r2
@@ -675,7 +668,7 @@
Push r4
LoadContextVar 9
Push r1
- InstanceCall 2, CP#14
+ InstanceCall 2, CP#11
StoreContextVar 3
Jump L4
L4:
@@ -683,17 +676,17 @@
LoadContextVar 2
Push r4
LoadContextVar 3
- PushConstant CP#15
- IndirectStaticCall 2, CP#13
+ PushConstant CP#12
+ IndirectStaticCall 2, CP#10
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L5
Try #0 end:
Try #0 handler:
SetFrame 10
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 8
@@ -708,18 +701,18 @@
LoadContextVar 2
Push r8
Push r9
- InstanceCall 3, CP#18
+ InstanceCall 3, CP#15
Drop1
Jump L5
L5:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Push r4
LoadContextVar 7
PopLocal r4
Push r5
- PushConstant CP#8
+ PushInt 1
IfEqStrictTOS
Jump L6
Jump L7
@@ -772,144 +765,140 @@
IndirectStaticCall 1, CP#1
StoreContextVar 1
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 2
- PushConstant CP#3
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 3
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 4
Push r0
- PushConstant CP#4
+ PushInt 0
StoreContextVar 5
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 6
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 7
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 8
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 9
Push r0
- Allocate CP#32
+ Allocate CP#28
StoreLocal r3
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#33
+ PushNull
+ StoreFieldTOS CP#29
+ Push r3
+ PushNull
+ StoreFieldTOS CP#31
+ Push r3
+ PushConstant CP#33
+ StoreFieldTOS CP#34
Push r3
PushConstant CP#3
- StoreFieldTOS CP#35
- Push r3
- PushConstant CP#37
- StoreFieldTOS CP#38
- Push r3
- PushConstant CP#5
- StoreFieldTOS CP#40
+ StoreFieldTOS CP#36
Push r3
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
StoreContextVar 10
Push r0
LoadContextVar 10
- PushConstant CP#42
+ PushConstant CP#38
IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
LoadContextVar 10
- PushConstant CP#43
+ PushConstant CP#39
IndirectStaticCall 1, CP#1
StoreContextVar 3
Push r0
Push r0
LoadContextVar 10
- PushConstant CP#44
+ PushConstant CP#40
IndirectStaticCall 1, CP#1
StoreContextVar 4
- PushConstant CP#45
+ PushConstant CP#41
Push r0
LoadContextVar 10
- PushConstant CP#46
- IndirectStaticCall 2, CP#9
+ PushConstant CP#42
+ IndirectStaticCall 2, CP#7
Drop1
Push r0
LoadContextVar 1
- InstanceCall 1, CP#47
+ InstanceCall 1, CP#43
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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] = EmptyTypeArguments
- [38] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [39] = Reserved
- [40] = InstanceField dart.core::_Closure::_function
- [41] = Reserved
- [42] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
- [43] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
- [44] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
- [45] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [46] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
- [47] = ICData get target-name 'future', arg-desc CP#1
+ [3] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [4] = Null
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 2, num-type-args 0, names []
+ [8] = ICData target-name '<', arg-desc CP#7
+ [9] = ICData get target-name 'iterator', arg-desc CP#1
+ [10] = ICData target-name 'moveNext', arg-desc CP#1
+ [11] = ICData get target-name 'current', arg-desc CP#1
+ [12] = ICData target-name '+', arg-desc CP#7
+ [13] = ArgDesc num-args 0, num-type-args 0, names []
+ [14] = StaticICData target '#lib::foo', arg-desc CP#13
+ [15] = ArgDesc num-args 4, num-type-args 0, names []
+ [16] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#15
+ [17] = ICData target-name '+', arg-desc CP#7
+ [18] = ICData target-name '+', arg-desc CP#7
+ [19] = ICData target-name '+', arg-desc CP#7
+ [20] = ICData target-name '<', arg-desc CP#7
+ [21] = ICData target-name '+', arg-desc CP#7
+ [22] = ICData target-name '+', arg-desc CP#7
+ [23] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#7
+ [24] = Type dynamic
+ [25] = ArgDesc num-args 3, num-type-args 0, names []
+ [26] = ICData target-name 'completeError', arg-desc CP#25
+ [27] = EndClosureFunctionScope
+ [28] = Class dart.core::_Closure
+ [29] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [30] = Reserved
+ [31] = InstanceField dart.core::_Closure::_function_type_arguments
+ [32] = Reserved
+ [33] = EmptyTypeArguments
+ [34] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [35] = Reserved
+ [36] = InstanceField dart.core::_Closure::_function
+ [37] = Reserved
+ [38] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [39] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [40] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [41] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [42] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#7
+ [43] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#5 {
+Closure CP#3 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#4
+ LoadConstant r2, CP#4
+ LoadConstant r3, CP#4
Frame 7
CheckStack
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 5
StoreLocal r5
- PushConstant CP#4
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -923,7 +912,7 @@
StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#4
+ PushInt 0
StoreContextVar 0
AllocateContext 2
StoreLocal r5
@@ -932,23 +921,23 @@
StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#4
+ PushInt 0
StoreContextVar 0
L6:
CheckStack
Push r4
LoadContextVar 0
- PushConstant CP#8
- InstanceCall 2, CP#10
+ PushInt 10
+ InstanceCall 2, CP#8
AssertBoolean 0
- PushConstant CP#11
+ PushTrue
IfNeStrictTOS
Jump L2
Push r4
LoadContextParent
LoadContextParent
LoadContextVar 0
- InstanceCall 1, CP#12
+ InstanceCall 1, CP#9
PopLocal r8
Push r4
Push r8
@@ -958,8 +947,8 @@
Push r4
LoadContextVar 1
StoreLocal r8
- InstanceCall 1, CP#13
- PushConstant CP#11
+ InstanceCall 1, CP#10
+ PushTrue
IfNeStrictTOS
Jump L3
AllocateContext 1
@@ -970,7 +959,7 @@
PopLocal r4
Push r4
Push r8
- InstanceCall 1, CP#14
+ InstanceCall 1, CP#11
StoreContextVar 0
Push r4
LoadContextParent
@@ -990,13 +979,13 @@
LoadContextVar 0
Push r4
LoadContextVar 0
- InstanceCall 2, CP#15
+ InstanceCall 2, CP#12
StoreContextVar 8
Push r4
LoadContextParent
LoadContextParent
LoadContextParent
- PushConstant CP#16
+ PushInt 1
StoreContextVar 5
Push r4
LoadContextParent
@@ -1004,8 +993,8 @@
LoadContextParent
Push r4
StoreContextVar 6
- PushConstant CP#18
- IndirectStaticCall 0, CP#17
+ PushConstant CP#14
+ IndirectStaticCall 0, CP#13
Push r4
LoadContextParent
LoadContextParent
@@ -1021,10 +1010,10 @@
LoadContextParent
LoadContextParent
LoadContextVar 10
- PushConstant CP#20
- IndirectStaticCall 4, CP#19
+ PushConstant CP#16
+ IndirectStaticCall 4, CP#15
PopLocal r10
- PushConstant CP#3
+ PushNull
ReturnTOS
L11:
IfEqNull r2
@@ -1047,8 +1036,8 @@
LoadContextParent
LoadContextVar 8
Push r1
- InstanceCall 2, CP#21
- InstanceCall 2, CP#22
+ InstanceCall 2, CP#17
+ InstanceCall 2, CP#18
StoreContextVar 0
Push r4
LoadContextParent
@@ -1061,8 +1050,8 @@
Push r4
Push r4
LoadContextVar 0
- PushConstant CP#16
- InstanceCall 2, CP#23
+ PushInt 1
+ InstanceCall 2, CP#19
StoreLocal r8
StoreContextVar 0
Push r8
@@ -1072,26 +1061,26 @@
Push r4
LoadContextParent
PopLocal r4
- PushConstant CP#4
+ PushInt 0
PopLocal r8
L8:
CheckStack
Push r8
- PushConstant CP#8
- InstanceCall 2, CP#24
+ PushInt 10
+ InstanceCall 2, CP#20
AssertBoolean 0
- PushConstant CP#11
+ PushTrue
IfNeStrictTOS
Jump L7
Push r4
Push r4
LoadContextVar 0
Push r8
- InstanceCall 2, CP#25
+ InstanceCall 2, CP#21
StoreContextVar 0
Push r8
- PushConstant CP#16
- InstanceCall 2, CP#26
+ PushInt 1
+ InstanceCall 2, CP#22
StoreLocal r8
Drop1
Jump L8
@@ -1113,17 +1102,17 @@
LoadContextVar 1
Push r4
LoadContextVar 2
- PushConstant CP#27
- IndirectStaticCall 2, CP#9
+ PushConstant CP#23
+ IndirectStaticCall 2, CP#7
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L10
Try #0 end:
Try #0 handler:
SetFrame 11
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 7
@@ -1138,11 +1127,11 @@
LoadContextVar 1
Push r8
Push r9
- InstanceCall 3, CP#30
+ InstanceCall 3, CP#26
Drop1
Jump L10
L10:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Push r4
@@ -1214,159 +1203,151 @@
IndirectStaticCall 1, CP#1
StoreContextVar 3
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 4
- PushConstant CP#3
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 5
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 6
Push r0
- PushConstant CP#4
+ PushInt 0
StoreContextVar 7
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 8
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 9
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 10
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 11
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 12
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 13
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 14
Push r0
- Allocate CP#38
+ Allocate CP#30
StoreLocal r3
Push r3
- PushConstant CP#3
- StoreFieldTOS CP#39
+ PushNull
+ StoreFieldTOS CP#31
+ Push r3
+ PushNull
+ StoreFieldTOS CP#33
+ Push r3
+ PushConstant CP#35
+ StoreFieldTOS CP#36
Push r3
PushConstant CP#3
- StoreFieldTOS CP#41
- Push r3
- PushConstant CP#43
- StoreFieldTOS CP#44
- Push r3
- PushConstant CP#5
- StoreFieldTOS CP#46
+ StoreFieldTOS CP#38
Push r3
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
StoreContextVar 15
Push r0
LoadContextVar 15
- PushConstant CP#48
+ PushConstant CP#40
IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
LoadContextVar 15
- PushConstant CP#49
+ PushConstant CP#41
IndirectStaticCall 1, CP#1
StoreContextVar 5
Push r0
Push r0
LoadContextVar 15
- PushConstant CP#50
+ PushConstant CP#42
IndirectStaticCall 1, CP#1
StoreContextVar 6
- PushConstant CP#51
+ PushConstant CP#43
Push r0
LoadContextVar 15
- PushConstant CP#52
- IndirectStaticCall 2, CP#11
+ PushConstant CP#44
+ IndirectStaticCall 2, CP#9
Drop1
Push r0
LoadContextVar 3
- InstanceCall 1, CP#53
+ InstanceCall 1, CP#45
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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] = EmptyTypeArguments
- [44] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [45] = Reserved
- [46] = InstanceField dart.core::_Closure::_function
- [47] = Reserved
- [48] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
- [49] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
- [50] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
- [51] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [52] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#11
- [53] = ICData get target-name 'future', arg-desc CP#1
+ [3] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [4] = Null
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 4, num-type-args 0, names []
+ [8] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [9] = ArgDesc num-args 2, num-type-args 0, names []
+ [10] = ICData target-name '+', arg-desc CP#9
+ [11] = Type dynamic
+ [12] = Type dart.core::Error
+ [13] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#7
+ [14] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [15] = ICData target-name '+', arg-desc CP#9
+ [16] = String 'fin'
+ [17] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [18] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [19] = ICData target-name '+', arg-desc CP#9
+ [20] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [21] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [22] = ICData target-name '+', arg-desc CP#9
+ [23] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [24] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [25] = ICData target-name '+', arg-desc CP#9
+ [26] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
+ [27] = ArgDesc num-args 3, num-type-args 0, names []
+ [28] = ICData target-name 'completeError', arg-desc CP#27
+ [29] = EndClosureFunctionScope
+ [30] = Class dart.core::_Closure
+ [31] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [32] = Reserved
+ [33] = InstanceField dart.core::_Closure::_function_type_arguments
+ [34] = Reserved
+ [35] = EmptyTypeArguments
+ [36] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [37] = Reserved
+ [38] = InstanceField dart.core::_Closure::_function
+ [39] = Reserved
+ [40] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
+ [41] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
+ [42] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
+ [43] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [44] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#9
+ [45] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#5 {
+Closure CP#3 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#4
+ LoadConstant r2, CP#4
+ LoadConstant r3, CP#4
Frame 10
CheckStack
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 7
StoreLocal r5
- PushConstant CP#4
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -1380,7 +1361,7 @@
StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#8
+ PushInt 1
StoreContextVar 0
Push r4
LoadContextParent
@@ -1399,7 +1380,7 @@
StoreContextVar 14
Push r4
LoadContextParent
- PushConstant CP#8
+ PushInt 1
StoreContextVar 7
Push r4
LoadContextParent
@@ -1417,10 +1398,10 @@
Push r4
LoadContextParent
LoadContextVar 15
- PushConstant CP#10
- IndirectStaticCall 4, CP#9
+ PushConstant CP#8
+ IndirectStaticCall 4, CP#7
PopLocal r13
- PushConstant CP#3
+ PushNull
ReturnTOS
L13:
IfEqNull r2
@@ -1434,14 +1415,14 @@
LoadContextParent
LoadContextVar 14
Push r1
- InstanceCall 2, CP#12
+ InstanceCall 2, CP#10
StoreContextVar 0
Jump L3
Try #2 end:
Try #2 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 11
@@ -1461,17 +1442,17 @@
StoreContextVar 1
Push r4
LoadContextVar 1
- PushConstant CP#3
- PushConstant CP#3
- PushConstant CP#14
- InstanceCall 4, CP#15
+ PushNull
+ PushNull
+ PushConstant CP#12
+ InstanceCall 4, CP#13
AssertBoolean 0
- PushConstant CP#16
+ PushTrue
IfNeStrictTOS
Jump L4
Push r4
LoadContextParent
- PushConstant CP#17
+ PushInt 42
StoreContextVar 4
Jump L5
L4:
@@ -1482,7 +1463,7 @@
StoreContextVar 14
Push r4
LoadContextParent
- PushConstant CP#18
+ PushInt 2
StoreContextVar 7
Push r4
LoadContextParent
@@ -1500,10 +1481,10 @@
Push r4
LoadContextParent
LoadContextVar 15
- PushConstant CP#19
- IndirectStaticCall 4, CP#9
+ PushConstant CP#14
+ IndirectStaticCall 4, CP#7
PopLocal r13
- PushConstant CP#3
+ PushNull
ReturnTOS
L14:
IfEqNull r2
@@ -1517,7 +1498,7 @@
LoadContextParent
LoadContextVar 14
Push r1
- InstanceCall 2, CP#20
+ InstanceCall 2, CP#15
StoreContextVar 0
Push r4
LoadContextParent
@@ -1534,7 +1515,7 @@
Try #1 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 10
@@ -1549,8 +1530,8 @@
LoadContextParent
Push r9
StoreContextVar 13
- PushConstant CP#21
- PushConstant CP#22
+ PushConstant CP#16
+ PushConstant CP#17
IndirectStaticCall 1, CP#1
Drop1
Push r4
@@ -1560,7 +1541,7 @@
StoreContextVar 14
Push r4
LoadContextParent
- PushConstant CP#23
+ PushInt 3
StoreContextVar 7
Push r4
LoadContextParent
@@ -1578,10 +1559,10 @@
Push r4
LoadContextParent
LoadContextVar 15
- PushConstant CP#24
- IndirectStaticCall 4, CP#9
+ PushConstant CP#18
+ IndirectStaticCall 4, CP#7
PopLocal r12
- PushConstant CP#3
+ PushNull
ReturnTOS
L15:
IfEqNull r2
@@ -1595,7 +1576,7 @@
LoadContextParent
LoadContextVar 14
Push r1
- InstanceCall 2, CP#25
+ InstanceCall 2, CP#19
StoreContextVar 0
Push r4
LoadContextParent
@@ -1615,13 +1596,13 @@
Throw 1
L5:
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 10
PopLocal r4
- PushConstant CP#21
- PushConstant CP#26
+ PushConstant CP#16
+ PushConstant CP#20
IndirectStaticCall 1, CP#1
Drop1
Push r4
@@ -1631,7 +1612,7 @@
StoreContextVar 14
Push r4
LoadContextParent
- PushConstant CP#27
+ PushInt 4
StoreContextVar 7
Push r4
LoadContextParent
@@ -1649,10 +1630,10 @@
Push r4
LoadContextParent
LoadContextVar 15
- PushConstant CP#28
- IndirectStaticCall 4, CP#9
+ PushConstant CP#21
+ IndirectStaticCall 4, CP#7
PopLocal r12
- PushConstant CP#3
+ PushNull
ReturnTOS
L16:
IfEqNull r2
@@ -1666,7 +1647,7 @@
LoadContextParent
LoadContextVar 14
Push r1
- InstanceCall 2, CP#29
+ InstanceCall 2, CP#22
StoreContextVar 0
Push r4
LoadContextParent
@@ -1683,13 +1664,13 @@
Jump L9
L7:
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 10
PopLocal r4
- PushConstant CP#21
- PushConstant CP#30
+ PushConstant CP#16
+ PushConstant CP#23
IndirectStaticCall 1, CP#1
Drop1
Push r4
@@ -1699,7 +1680,7 @@
StoreContextVar 14
Push r4
LoadContextParent
- PushConstant CP#31
+ PushInt 5
StoreContextVar 7
Push r4
LoadContextParent
@@ -1717,10 +1698,10 @@
Push r4
LoadContextParent
LoadContextVar 15
- PushConstant CP#32
- IndirectStaticCall 4, CP#9
+ PushConstant CP#24
+ IndirectStaticCall 4, CP#7
PopLocal r12
- PushConstant CP#3
+ PushNull
ReturnTOS
L17:
IfEqNull r2
@@ -1734,7 +1715,7 @@
LoadContextParent
LoadContextVar 14
Push r1
- InstanceCall 2, CP#33
+ InstanceCall 2, CP#25
StoreContextVar 0
Push r4
LoadContextParent
@@ -1753,17 +1734,17 @@
LoadContextVar 3
Push r4
LoadContextVar 4
- PushConstant CP#34
- IndirectStaticCall 2, CP#11
+ PushConstant CP#26
+ IndirectStaticCall 2, CP#9
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L12
Try #0 end:
Try #0 handler:
SetFrame 14
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 9
@@ -1778,30 +1759,30 @@
LoadContextVar 3
Push r8
Push r9
- InstanceCall 3, CP#36
+ InstanceCall 3, CP#28
Drop1
Jump L12
L12:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Push r4
LoadContextVar 8
PopLocal r4
Push r5
- PushConstant CP#8
+ PushInt 1
IfEqStrictTOS
Jump L13
Push r5
- PushConstant CP#18
+ PushInt 2
IfEqStrictTOS
Jump L14
Push r5
- PushConstant CP#23
+ PushInt 3
IfEqStrictTOS
Jump L15
Push r5
- PushConstant CP#27
+ PushInt 4
IfEqStrictTOS
Jump L16
Jump L17
@@ -1873,77 +1854,72 @@
Push FP[-5]
StoreContextVar 0
Push r0
- PushConstant CP#0
+ PushInt 3
StoreContextVar 1
- Allocate CP#26
+ Allocate CP#21
StoreLocal r3
Push r3
- PushConstant CP#7
+ PushNull
+ StoreFieldTOS CP#22
+ Push r3
+ PushNull
+ StoreFieldTOS CP#24
+ Push r3
+ PushConstant CP#26
StoreFieldTOS CP#27
Push r3
- PushConstant CP#7
+ PushConstant CP#0
StoreFieldTOS CP#29
Push r3
- PushConstant CP#31
- StoreFieldTOS CP#32
- Push r3
- PushConstant CP#1
- StoreFieldTOS CP#34
- Push r3
Push r0
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#1
PopLocal r2
Push r2
ReturnTOS
- PushConstant CP#7
+ PushNull
ReturnTOS
}
ConstantPool {
- [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
+ [0] = ClosureFunction nested () → dart.async::Future<dart.core::int> /* originally async */ ;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [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] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
[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
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#8
+ [10] = ArgDesc num-args 2, num-type-args 0, names []
+ [11] = ICData target-name '+', arg-desc CP#10
+ [12] = Type dynamic
+ [13] = String 'fin'
+ [14] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [15] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [17] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#10
+ [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] = EmptyTypeArguments
+ [27] = InstanceField dart.core::_Closure::_delayed_type_arguments
[28] = Reserved
- [29] = InstanceField dart.core::_Closure::_function_type_arguments
+ [29] = InstanceField dart.core::_Closure::_function
[30] = Reserved
- [31] = EmptyTypeArguments
- [32] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [33] = Reserved
- [34] = InstanceField dart.core::_Closure::_function
- [35] = Reserved
- [36] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#5
- [37] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#5
- [38] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#5
- [39] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [40] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#15
- [41] = ICData get target-name 'future', arg-desc CP#5
- [42] = EndClosureFunctionScope
+ [31] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#4
+ [32] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#4
+ [33] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#4
+ [34] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
+ [35] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#10
+ [36] = ICData get target-name 'future', arg-desc CP#4
+ [37] = EndClosureFunctionScope
}
-Closure CP#9 {
+Closure CP#6 {
EntryOptional 1, 3, 0
LoadConstant r1, CP#7
LoadConstant r2, CP#7
@@ -1951,12 +1927,12 @@
Frame 8
CheckStack
Push r0
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r4
Push r4
LoadContextVar 4
StoreLocal r5
- PushConstant CP#8
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -1970,7 +1946,7 @@
StoreContextParent
PopLocal r4
Push r4
- PushConstant CP#10
+ PushInt 4
StoreContextVar 0
Push r4
LoadContextParent
@@ -1980,11 +1956,11 @@
Push r4
LoadContextParent
LoadContextParent
- PushConstant CP#11
+ PushInt 5
StoreContextVar 1
Push r4
LoadContextParent
- PushConstant CP#12
+ PushInt 1
StoreContextVar 4
Push r4
LoadContextParent
@@ -2003,10 +1979,10 @@
Push r4
LoadContextParent
LoadContextVar 8
- PushConstant CP#14
- IndirectStaticCall 4, CP#13
+ PushConstant CP#9
+ IndirectStaticCall 4, CP#8
PopLocal r11
- PushConstant CP#7
+ PushNull
ReturnTOS
L7:
IfEqNull r2
@@ -2026,7 +2002,7 @@
LoadContextVar 1
Push r4
LoadContextVar 0
- InstanceCall 2, CP#16
+ InstanceCall 2, CP#11
StoreContextVar 1
Jump L3
Jump L4
@@ -2034,30 +2010,30 @@
Try #1 handler:
SetFrame 12
Push r0
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r4
Push r4
LoadContextVar 7
PopLocal r4
MoveSpecial r8, exception
MoveSpecial r9, stackTrace
- PushConstant CP#18
- PushConstant CP#19
- IndirectStaticCall 1, CP#5
+ PushConstant CP#13
+ PushConstant CP#14
+ IndirectStaticCall 1, CP#4
Drop1
Push r8
Push r9
Throw 1
L3:
Push r0
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r4
Push r4
LoadContextVar 7
PopLocal r4
- PushConstant CP#18
- PushConstant CP#20
- IndirectStaticCall 1, CP#5
+ PushConstant CP#13
+ PushConstant CP#15
+ IndirectStaticCall 1, CP#4
Drop1
Push r4
LoadContextParent
@@ -2065,14 +2041,14 @@
Jump L5
L4:
Push r0
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r4
Push r4
LoadContextVar 7
PopLocal r4
- PushConstant CP#18
- PushConstant CP#21
- IndirectStaticCall 1, CP#5
+ PushConstant CP#13
+ PushConstant CP#16
+ IndirectStaticCall 1, CP#4
Drop1
Push r4
LoadContextParent
@@ -2082,17 +2058,17 @@
LoadContextVar 0
Push r4
LoadContextVar 1
- PushConstant CP#22
- IndirectStaticCall 2, CP#15
+ PushConstant CP#17
+ IndirectStaticCall 2, CP#10
Drop1
- PushConstant CP#7
+ PushNull
ReturnTOS
Jump L6
Try #0 end:
Try #0 handler:
SetFrame 12
Push r0
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r4
Push r4
LoadContextVar 6
@@ -2107,11 +2083,11 @@
LoadContextVar 0
Push r8
Push r9
- InstanceCall 3, CP#24
+ InstanceCall 3, CP#19
Drop1
Jump L6
L6:
- PushConstant CP#7
+ PushNull
ReturnTOS
L1:
Push r4
@@ -2121,11 +2097,11 @@
}
-Closure CP#1 {
+Closure CP#0 {
EntryFixed 1, 4
CheckStack
Push FP[-5]
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r0
AllocateContext 9
StoreLocal r1
@@ -2134,83 +2110,83 @@
StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#4
- PushConstant CP#6
- IndirectStaticCall 1, CP#5
+ PushConstant CP#3
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
StoreContextVar 0
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 1
- PushConstant CP#7
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 2
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 3
Push r0
- PushConstant CP#8
+ PushInt 0
StoreContextVar 4
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 5
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 6
Push r0
- PushConstant CP#7
+ PushNull
StoreContextVar 7
Push r0
- Allocate CP#26
+ Allocate CP#21
StoreLocal r3
Push r3
- PushConstant CP#7
+ PushNull
+ StoreFieldTOS CP#22
+ Push r3
+ PushNull
+ StoreFieldTOS CP#24
+ Push r3
+ PushConstant CP#26
StoreFieldTOS CP#27
Push r3
- PushConstant CP#7
+ PushConstant CP#6
StoreFieldTOS CP#29
Push r3
- PushConstant CP#31
- StoreFieldTOS CP#32
- Push r3
- PushConstant CP#9
- StoreFieldTOS CP#34
- Push r3
Push r0
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#1
StoreContextVar 8
Push r0
LoadContextVar 8
- PushConstant CP#36
- IndirectStaticCall 1, CP#5
+ PushConstant CP#31
+ IndirectStaticCall 1, CP#4
PopLocal r2
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#37
- IndirectStaticCall 1, CP#5
+ PushConstant CP#32
+ IndirectStaticCall 1, CP#4
StoreContextVar 2
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#38
- IndirectStaticCall 1, CP#5
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#4
StoreContextVar 3
- PushConstant CP#39
+ PushConstant CP#34
Push r0
LoadContextVar 8
- PushConstant CP#40
- IndirectStaticCall 2, CP#15
+ PushConstant CP#35
+ IndirectStaticCall 2, CP#10
Drop1
Push r0
LoadContextVar 0
- InstanceCall 1, CP#41
+ InstanceCall 1, CP#36
ReturnTOS
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#7
+ PushNull
ReturnTOS
}
@@ -2271,128 +2247,123 @@
IndirectStaticCall 1, CP#1
StoreContextVar 1
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 2
- PushConstant CP#3
+ PushNull
PopLocal r2
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 3
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 4
Push r0
- PushConstant CP#4
+ PushInt 0
StoreContextVar 5
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 6
Push r0
- PushConstant CP#3
+ PushNull
StoreContextVar 7
Push r0
- Allocate CP#22
+ Allocate CP#17
StoreLocal r3
Push r3
- PushConstant CP#3
+ PushNull
+ StoreFieldTOS CP#18
+ Push r3
+ PushNull
+ StoreFieldTOS CP#20
+ Push r3
+ PushConstant CP#22
StoreFieldTOS CP#23
Push r3
PushConstant CP#3
StoreFieldTOS CP#25
Push r3
- PushConstant CP#27
- StoreFieldTOS CP#28
- Push r3
- PushConstant CP#5
- StoreFieldTOS CP#30
- Push r3
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
StoreContextVar 8
Push r0
LoadContextVar 8
- PushConstant CP#32
+ PushConstant CP#27
IndirectStaticCall 1, CP#1
PopLocal r2
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#33
+ PushConstant CP#28
IndirectStaticCall 1, CP#1
StoreContextVar 3
Push r0
Push r0
LoadContextVar 8
- PushConstant CP#34
+ PushConstant CP#29
IndirectStaticCall 1, CP#1
StoreContextVar 4
- PushConstant CP#35
+ PushConstant CP#30
Push r0
LoadContextVar 8
- PushConstant CP#36
- IndirectStaticCall 2, CP#12
+ PushConstant CP#31
+ IndirectStaticCall 2, CP#9
Drop1
Push r0
LoadContextVar 1
- InstanceCall 1, CP#37
+ InstanceCall 1, CP#32
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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
+ [3] = ClosureFunction :async_op ([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding ;
+ [4] = Null
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 4, num-type-args 0, names []
+ [8] = StaticICData target 'dart.async::_awaitHelper', arg-desc CP#7
+ [9] = ArgDesc num-args 2, num-type-args 0, names []
+ [10] = ICData target-name '==', arg-desc CP#9
+ [11] = ArgDesc num-args 3, num-type-args 0, names []
+ [12] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#11
+ [13] = StaticICData target 'dart.async::_completeOnAsyncReturn', arg-desc CP#9
+ [14] = Type dynamic
+ [15] = ICData target-name 'completeError', arg-desc CP#11
+ [16] = EndClosureFunctionScope
+ [17] = Class dart.core::_Closure
+ [18] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [19] = Reserved
+ [20] = InstanceField dart.core::_Closure::_function_type_arguments
+ [21] = Reserved
+ [22] = EmptyTypeArguments
+ [23] = InstanceField dart.core::_Closure::_delayed_type_arguments
[24] = Reserved
- [25] = InstanceField dart.core::_Closure::_function_type_arguments
+ [25] = InstanceField dart.core::_Closure::_function
[26] = Reserved
- [27] = EmptyTypeArguments
- [28] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [29] = Reserved
- [30] = InstanceField dart.core::_Closure::_function
- [31] = Reserved
- [32] = StaticICData target 'dart.async::_asyncStackTraceHelper', arg-desc CP#1
- [33] = StaticICData target 'dart.async::_asyncThenWrapperHelper', arg-desc CP#1
- [34] = StaticICData target 'dart.async::_asyncErrorWrapperHelper', arg-desc CP#1
- [35] = TypeArgumentsForInstanceAllocation dart.async::Future [dynamic]
- [36] = StaticICData target 'dart.async::Future::microtask', arg-desc CP#12
- [37] = ICData get target-name 'future', arg-desc CP#1
+ [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#9
+ [32] = ICData get target-name 'future', arg-desc CP#1
}
-Closure CP#5 {
+Closure CP#3 {
EntryOptional 1, 3, 0
- LoadConstant r1, CP#3
- LoadConstant r2, CP#3
- LoadConstant r3, CP#3
+ LoadConstant r1, CP#4
+ LoadConstant r2, CP#4
+ LoadConstant r3, CP#4
Frame 6
CheckStack
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 5
StoreLocal r5
- PushConstant CP#4
+ PushInt 0
IfNeStrictTOS
Jump L1
Push r4
@@ -2401,7 +2372,7 @@
Try #0 start:
JumpIfNoAsserts L2
Push r4
- PushConstant CP#8
+ PushInt 1
StoreContextVar 5
Push r4
Push r4
@@ -2414,10 +2385,10 @@
LoadContextVar 4
Push r4
LoadContextVar 8
- PushConstant CP#10
- IndirectStaticCall 4, CP#9
+ PushConstant CP#8
+ IndirectStaticCall 4, CP#7
PopLocal r8
- PushConstant CP#3
+ PushNull
ReturnTOS
L6:
IfEqNull r2
@@ -2428,21 +2399,21 @@
L3:
JumpIfNoAsserts L2
Push r1
- PushConstant CP#11
- InstanceCall 2, CP#13
+ PushInt 42
+ InstanceCall 2, CP#10
AssertBoolean 0
- PushConstant CP#14
+ PushTrue
IfEqStrictTOS
Jump L2
- PushConstant CP#4
- PushConstant CP#4
- PushConstant CP#3
- PushConstant CP#16
- IndirectStaticCall 3, CP#15
+ PushInt 0
+ PushInt 0
+ PushNull
+ PushConstant CP#12
+ IndirectStaticCall 3, CP#11
Drop1
L2:
Push r4
- PushConstant CP#17
+ PushInt 7
StoreContextVar 2
Jump L4
L4:
@@ -2450,17 +2421,17 @@
LoadContextVar 1
Push r4
LoadContextVar 2
- PushConstant CP#18
- IndirectStaticCall 2, CP#12
+ PushConstant CP#13
+ IndirectStaticCall 2, CP#9
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
Jump L5
Try #0 end:
Try #0 handler:
SetFrame 10
Push r0
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r4
Push r4
LoadContextVar 7
@@ -2475,11 +2446,11 @@
LoadContextVar 1
Push r8
Push r9
- InstanceCall 3, CP#20
+ InstanceCall 3, CP#15
Drop1
Jump L5
L5:
- PushConstant CP#3
+ PushNull
ReturnTOS
L1:
Push r4
@@ -2524,10 +2495,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index 2d466cb..c14b6ae 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -14,13 +14,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -36,13 +35,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] constructor _() → void
: super core::Object::•()
@@ -100,7 +98,7 @@
PushConstant CP#4
IndirectStaticCall 2, CP#3
StoreStaticTOS CP#5
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -110,7 +108,6 @@
[3] = ArgDesc num-args 2, num-type-args 0, names []
[4] = StaticICData target '#lib::_NamespaceImpl::_create', arg-desc CP#3
[5] = StaticField #lib::_NamespaceImpl::_cachedNamespace
- [6] = Null
}
] static method _setupNamespace(dynamic namespace) → void {
self::_NamespaceImpl::_cachedNamespace = self::_NamespaceImpl::_create(new self::_NamespaceImpl::_(), namespace);
@@ -121,42 +118,40 @@
CheckStack
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#1
- InstanceCall 2, CP#3
+ PushNull
+ InstanceCall 2, CP#2
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L1
- Allocate CP#5
+ Allocate CP#3
StoreLocal r1
Push r1
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#9
- IndirectStaticCall 0, CP#8
- PushConstant CP#10
- IndirectStaticCall 2, CP#2
+ PushConstant CP#7
+ IndirectStaticCall 0, CP#6
+ PushConstant CP#8
+ IndirectStaticCall 2, CP#1
StoreStaticTOS CP#0
L1:
PushConstant CP#0
PushStatic CP#0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[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
- [4] = Bool true
- [5] = Class #lib::_NamespaceImpl
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target '#lib::_NamespaceImpl::_', arg-desc CP#6
- [8] = ArgDesc num-args 0, num-type-args 0, names []
- [9] = StaticICData target '#lib::_NamespaceImpl::_getDefault', arg-desc CP#8
- [10] = StaticICData target '#lib::_NamespaceImpl::_create', arg-desc CP#2
+ [1] = ArgDesc num-args 2, num-type-args 0, names []
+ [2] = ICData target-name '==', arg-desc CP#1
+ [3] = Class #lib::_NamespaceImpl
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target '#lib::_NamespaceImpl::_', arg-desc CP#4
+ [6] = ArgDesc num-args 0, num-type-args 0, names []
+ [7] = StaticICData target '#lib::_NamespaceImpl::_getDefault', arg-desc CP#6
+ [8] = StaticICData target '#lib::_NamespaceImpl::_create', arg-desc CP#1
}
] static get _namespace() → self::_NamespaceImpl {
if(self::_NamespaceImpl::_cachedNamespace.{core::Object::==}(null)) {
@@ -173,7 +168,7 @@
PushConstant CP#3
IndirectStaticCall 1, CP#2
ReturnTOS
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -181,7 +176,6 @@
[1] = StaticICData get target '#lib::_NamespaceImpl::_namespace', arg-desc CP#0
[2] = ArgDesc num-args 1, num-type-args 0, names []
[3] = StaticICData target '#lib::_NamespaceImpl::_getPointer', arg-desc CP#2
- [4] = Null
}
] static get _namespacePointer() → core::int
return self::_NamespaceImpl::_getPointer(self::_NamespaceImpl::_namespace);
@@ -195,13 +189,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -214,13 +207,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::_NamespaceImpl::_setupNamespace', arg-desc CP#0
- [2] = Null
}
] static method _setupNamespace(dynamic namespace) → void {
self::_NamespaceImpl::_setupNamespace(namespace);
@@ -232,13 +224,12 @@
PushConstant CP#1
IndirectStaticCall 0, CP#0
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 0, num-type-args 0, names []
[1] = StaticICData get target '#lib::_NamespaceImpl::_namespace', arg-desc CP#0
- [2] = Null
}
] static get _namespace() → self::_Namespace
return self::_NamespaceImpl::_namespace;
@@ -249,13 +240,12 @@
PushConstant CP#1
IndirectStaticCall 0, CP#0
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 0, num-type-args 0, names []
[1] = StaticICData get target '#lib::_NamespaceImpl::_namespacePointer', arg-desc CP#0
- [2] = Null
}
] static get _namespacePointer() → core::int
return self::_NamespaceImpl::_namespacePointer;
@@ -280,13 +270,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -297,15 +286,14 @@
CheckStack
Push FP[-5]
StoreStaticTOS CP#0
- PushConstant CP#1
- StoreStaticTOS CP#2
- PushConstant CP#1
+ PushNull
+ StoreStaticTOS CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = StaticField #lib::VMLibraryHooks::_computeScriptUri
- [1] = Null
- [2] = StaticField #lib::VMLibraryHooks::_cachedScript
+ [1] = StaticField #lib::VMLibraryHooks::_cachedScript
}
] static set platformScript(dynamic f) → void {
self::VMLibraryHooks::_computeScriptUri = f;
@@ -317,51 +305,48 @@
CheckStack
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#1
- InstanceCall 2, CP#3
+ PushNull
+ InstanceCall 2, CP#2
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L1
- PushConstant CP#5
- PushStatic CP#5
- PushConstant CP#1
- InstanceCall 2, CP#6
+ PushConstant CP#3
+ PushStatic CP#3
+ PushNull
+ InstanceCall 2, CP#4
AssertBoolean 0
BooleanNegateTOS
PopLocal r0
Jump L2
L1:
- PushConstant CP#7
+ PushFalse
PopLocal r0
L2:
Push r0
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L3
- PushConstant CP#5
- PushStatic CP#5
- InstanceCall 1, CP#9
+ PushConstant CP#3
+ PushStatic CP#3
+ InstanceCall 1, CP#6
StoreStaticTOS CP#0
L3:
PushConstant CP#0
PushStatic CP#0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[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] = 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 []
- [9] = ICData dynamic target-name 'call', arg-desc CP#8
+ [1] = ArgDesc num-args 2, num-type-args 0, names []
+ [2] = ICData target-name '==', arg-desc CP#1
+ [3] = StaticField #lib::VMLibraryHooks::_computeScriptUri
+ [4] = ICData target-name '==', arg-desc CP#1
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = ICData dynamic target-name 'call', arg-desc CP#5
}
] static get platformScript() → dynamic {
if(self::VMLibraryHooks::_cachedScript.{core::Object::==}(null) && !self::VMLibraryHooks::_computeScriptUri.{core::Object::==}(null)) {
@@ -396,14 +381,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = ICData target-name 'toString', arg-desc CP#0
[2] = StaticICData target '#lib::_printString', arg-desc CP#0
- [3] = Null
}
]static method _print(dynamic arg) → void {
self::_printString(arg.{core::Object::toString}());
@@ -414,12 +398,11 @@
CheckStack
PushConstant CP#0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TearOff #lib::_print
- [1] = Null
}
]static method _getPrintClosure() → dynamic
return self::_print;
@@ -429,12 +412,11 @@
CheckStack
Push FP[-5]
StoreStaticTOS CP#0
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = StaticField #lib::_ScheduleImmediate::_closure
- [1] = Null
}
]static method _setScheduleImmediateClosure((() → void) → void closure) → void {
self::_ScheduleImmediate::_closure = closure;
@@ -449,14 +431,13 @@
StoreStaticTOS CP#1
Push FP[-5]
StoreStaticTOS CP#2
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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 {
self::_stdinFD = stdin;
@@ -472,59 +453,59 @@
PushConstant CP#1
InstanceCall 2, CP#3
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L1
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#5
- InstanceCall 2, CP#6
+ PushConstant CP#4
+ InstanceCall 2, CP#5
AssertBoolean 0
PopLocal r1
Jump L2
L1:
- PushConstant CP#4
+ PushTrue
PopLocal r1
L2:
Push r1
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L3
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#7
- InstanceCall 2, CP#8
+ PushConstant CP#6
+ InstanceCall 2, CP#7
AssertBoolean 0
PopLocal r0
Jump L4
L3:
- PushConstant CP#4
+ PushTrue
PopLocal r0
L4:
Push r0
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L5
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#10
- IndirectStaticCall 1, CP#9
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
ReturnTOS
Jump L6
L5:
- PushConstant CP#12
- IndirectStaticCall 0, CP#11
- PushConstant CP#13
+ PushConstant CP#11
+ IndirectStaticCall 0, CP#10
+ PushNull
PushConstant CP#0
PushStatic CP#0
- PushConstant CP#14
+ PushConstant CP#12
IndirectStaticCall 2, CP#2
- InstanceCall 2, CP#15
+ InstanceCall 2, CP#13
ReturnTOS
L6:
- PushConstant CP#13
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -532,18 +513,16 @@
[1] = String 'http:'
[2] = ArgDesc num-args 2, num-type-args 0, names []
[3] = ICData target-name 'startsWith', arg-desc CP#2
- [4] = Bool true
- [5] = String 'https:'
- [6] = ICData target-name 'startsWith', arg-desc CP#2
- [7] = String 'file:'
- [8] = ICData target-name 'startsWith', arg-desc CP#2
- [9] = ArgDesc num-args 1, num-type-args 0, names []
- [10] = StaticICData target 'dart.core::Uri::parse', arg-desc CP#9
- [11] = ArgDesc num-args 0, num-type-args 0, names []
- [12] = StaticICData get target 'dart.core::Uri::base', arg-desc CP#11
- [13] = Null
- [14] = StaticICData target 'dart.core::_Uri::file', arg-desc CP#2
- [15] = ICData target-name 'resolveUri', arg-desc CP#2
+ [4] = String 'https:'
+ [5] = ICData target-name 'startsWith', arg-desc CP#2
+ [6] = String 'file:'
+ [7] = ICData target-name 'startsWith', arg-desc CP#2
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart.core::Uri::parse', arg-desc CP#8
+ [10] = ArgDesc num-args 0, num-type-args 0, names []
+ [11] = StaticICData get target 'dart.core::Uri::base', arg-desc CP#10
+ [12] = StaticICData target 'dart.core::_Uri::file', arg-desc CP#2
+ [13] = ICData target-name 'resolveUri', arg-desc CP#2
}
]static method _scriptUri() → core::Uri {
if(self::_rawScript.{core::String::startsWith}("http:") || self::_rawScript.{core::String::startsWith}("https:") || self::_rawScript.{core::String::startsWith}("file:")) {
@@ -561,14 +540,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TearOff #lib::_scriptUri
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData set target '#lib::VMLibraryHooks::platformScript', arg-desc CP#1
- [3] = Null
}
]static method _setupHooks() → dynamic {
self::VMLibraryHooks::platformScript = self::_scriptUri;
@@ -577,10 +555,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index 44ff7b77..10f84a5 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -12,13 +12,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -33,13 +32,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -54,13 +52,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -75,13 +72,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -96,13 +92,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -117,13 +112,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -138,13 +132,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -159,13 +152,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -180,13 +172,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -201,12 +192,12 @@
Push r1
Push FP[-5]
StoreContextVar 0
- Allocate CP#41
+ Allocate CP#31
StoreLocal r4
Push r4
Push FP[-5]
- LoadTypeArgumentsField CP#20
- StoreFieldTOS CP#42
+ LoadTypeArgumentsField CP#15
+ StoreFieldTOS CP#32
Push r4
Push r0
StoreFieldTOS CP#6
@@ -215,20 +206,20 @@
StoreFieldTOS CP#3
Push r4
PushConstant CP#0
- StoreFieldTOS CP#44
+ StoreFieldTOS CP#34
Push r4
Push r1
StoreFieldTOS CP#1
PopLocal r3
- PushConstant CP#54
+ PushConstant CP#44
Push r3
- InstanceCall 2, CP#55
+ InstanceCall 2, CP#45
Drop1
- PushConstant CP#56
+ PushConstant CP#46
Push r3
- InstanceCall 2, CP#57
+ InstanceCall 2, CP#47
Drop1
- PushConstant CP#21
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -240,58 +231,48 @@
[5] = EmptyTypeArguments
[6] = InstanceField dart.core::_Closure::_function_type_arguments
[7] = Reserved
- [8] = Int 2
- [9] = Int 4
- [10] = ArgDesc num-args 4, num-type-args 0, names []
- [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
- [12] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
- [13] = Int 6
- [14] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
- [15] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [16] = TypeArgs [dart.core::Type]
- [17] = Int 8
- [18] = Int 0
- [19] = Type #lib::A::T1
- [20] = TypeArgumentsField #lib::A
- [21] = Null
- [22] = Int 1
- [23] = Type #lib::A::T2
- [24] = Type #lib::A::foo::T3
- [25] = Int 3
- [26] = Type #lib::A::foo::T4
- [27] = Type T5
- [28] = Int 5
- [29] = Type T6
- [30] = Type T7
- [31] = Int 7
- [32] = Type T8
- [33] = ArgDesc num-args 2, num-type-args 0, names []
- [34] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#33
- [35] = ArgDesc num-args 1, num-type-args 0, names []
- [36] = StaticICData target 'dart.core::print', arg-desc CP#35
- [37] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
- [38] = ArgDesc num-args 0, num-type-args 8, names []
- [39] = StaticICData target '#lib::callWithArgs', arg-desc CP#38
- [40] = EndClosureFunctionScope
- [41] = Class dart.core::_Closure
- [42] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [43] = Reserved
- [44] = InstanceField dart.core::_Closure::_function
- [45] = Reserved
- [46] = ICData dynamic target-name 'call', arg-desc CP#35
- [47] = EndClosureFunctionScope
- [48] = TypeArgs [#lib::C7, #lib::C8]
- [49] = ArgDesc num-args 1, num-type-args 2, names []
- [50] = ICData dynamic target-name 'call', arg-desc CP#49
- [51] = TypeArgs [dart.core::List<#lib::C7>, dart.core::List<#lib::C8>]
- [52] = ICData dynamic target-name 'call', arg-desc CP#49
- [53] = EndClosureFunctionScope
- [54] = TypeArgs [#lib::C5, #lib::C6]
- [55] = ICData dynamic target-name 'call', arg-desc CP#49
- [56] = TypeArgs [dart.core::List<#lib::C5>, dart.core::List<#lib::C6>]
- [57] = ICData dynamic target-name 'call', arg-desc CP#49
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#8
+ [10] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
+ [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#8
+ [12] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [13] = TypeArgs [dart.core::Type]
+ [14] = Type #lib::A::T1
+ [15] = TypeArgumentsField #lib::A
+ [16] = Type #lib::A::T2
+ [17] = Type #lib::A::foo::T3
+ [18] = Type #lib::A::foo::T4
+ [19] = Type T5
+ [20] = Type T6
+ [21] = Type T7
+ [22] = Type T8
+ [23] = ArgDesc num-args 2, num-type-args 0, names []
+ [24] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#23
+ [25] = ArgDesc num-args 1, num-type-args 0, names []
+ [26] = StaticICData target 'dart.core::print', arg-desc CP#25
+ [27] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
+ [28] = ArgDesc num-args 0, num-type-args 8, names []
+ [29] = StaticICData target '#lib::callWithArgs', arg-desc CP#28
+ [30] = EndClosureFunctionScope
+ [31] = Class dart.core::_Closure
+ [32] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [33] = Reserved
+ [34] = InstanceField dart.core::_Closure::_function
+ [35] = Reserved
+ [36] = ICData dynamic target-name 'call', arg-desc CP#25
+ [37] = EndClosureFunctionScope
+ [38] = TypeArgs [#lib::C7, #lib::C8]
+ [39] = ArgDesc num-args 1, num-type-args 2, names []
+ [40] = ICData dynamic target-name 'call', arg-desc CP#39
+ [41] = TypeArgs [dart.core::List<#lib::C7>, dart.core::List<#lib::C8>]
+ [42] = ICData dynamic target-name 'call', arg-desc CP#39
+ [43] = EndClosureFunctionScope
+ [44] = TypeArgs [#lib::C5, #lib::C6]
+ [45] = ICData dynamic target-name 'call', arg-desc CP#39
+ [46] = TypeArgs [dart.core::List<#lib::C5>, dart.core::List<#lib::C6>]
+ [47] = ICData dynamic target-name 'call', arg-desc CP#39
}
-Closure CP#15 {
+Closure CP#12 {
EntryFixed 1, 4
CheckStack
Push FP[-5]
@@ -300,83 +281,83 @@
Push FP[-5]
LoadFieldTOS CP#6
PopLocal r0
- PushConstant CP#16
+ PushConstant CP#13
StoreLocal r3
Push r3
- PushConstant CP#17
+ PushInt 8
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#18
+ PushInt 0
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#20
- PushConstant CP#21
+ LoadTypeArgumentsField CP#15
+ PushNull
+ InstantiateType CP#14
+ StoreIndexedTOS
+ Push r3
+ PushInt 1
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#15
+ PushNull
+ InstantiateType CP#16
+ StoreIndexedTOS
+ Push r3
+ PushInt 2
+ PushNull
+ Push r0
+ InstantiateType CP#17
+ StoreIndexedTOS
+ Push r3
+ PushInt 3
+ PushNull
+ Push r0
+ InstantiateType CP#18
+ StoreIndexedTOS
+ Push r3
+ PushInt 4
+ PushNull
+ Push r0
InstantiateType CP#19
StoreIndexedTOS
Push r3
- PushConstant CP#22
- Push r1
- LoadContextVar 0
- LoadTypeArgumentsField CP#20
- PushConstant CP#21
- InstantiateType CP#23
+ PushInt 5
+ PushNull
+ Push r0
+ InstantiateType CP#20
StoreIndexedTOS
Push r3
- PushConstant CP#8
- PushConstant CP#21
+ PushInt 6
+ PushNull
Push r0
- InstantiateType CP#24
+ InstantiateType CP#21
StoreIndexedTOS
Push r3
- PushConstant CP#25
- PushConstant CP#21
+ PushInt 7
+ PushNull
Push r0
- InstantiateType CP#26
+ InstantiateType CP#22
StoreIndexedTOS
- Push r3
- PushConstant CP#9
- PushConstant CP#21
- Push r0
- InstantiateType CP#27
- StoreIndexedTOS
- Push r3
- PushConstant CP#28
- PushConstant CP#21
- Push r0
- InstantiateType CP#29
- StoreIndexedTOS
- Push r3
- PushConstant CP#13
- PushConstant CP#21
- Push r0
- InstantiateType CP#30
- StoreIndexedTOS
- Push r3
- PushConstant CP#31
- PushConstant CP#21
- Push r0
- InstantiateType CP#32
- StoreIndexedTOS
- PushConstant CP#34
- IndirectStaticCall 2, CP#33
- PushConstant CP#36
- IndirectStaticCall 1, CP#35
+ PushConstant CP#24
+ IndirectStaticCall 2, CP#23
+ PushConstant CP#26
+ IndirectStaticCall 1, CP#25
Drop1
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#20
+ LoadTypeArgumentsField CP#15
Push r0
- InstantiateTypeArgumentsTOS 0, CP#37
- PushConstant CP#39
- IndirectStaticCall 1, CP#38
+ InstantiateTypeArgumentsTOS 0, CP#27
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#28
Drop1
- PushConstant CP#21
+ PushNull
ReturnTOS
}
-Closure CP#12 {
+Closure CP#10 {
EntryFixed 1, 5
CheckStack
Push FP[-5]
@@ -396,18 +377,18 @@
Push r0
Push FP[-5]
LoadFieldTOS CP#6
- PushConstant CP#9
- PushConstant CP#13
- PushConstant CP#14
- IndirectStaticCall 4, CP#10
+ PushInt 4
+ PushInt 6
+ PushConstant CP#11
+ IndirectStaticCall 4, CP#8
PopLocal r0
- Allocate CP#41
+ Allocate CP#31
StoreLocal r4
Push r4
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#20
- StoreFieldTOS CP#42
+ LoadTypeArgumentsField CP#15
+ StoreFieldTOS CP#32
Push r4
Push r0
StoreFieldTOS CP#6
@@ -415,16 +396,16 @@
PushConstant CP#5
StoreFieldTOS CP#3
Push r4
- PushConstant CP#15
- StoreFieldTOS CP#44
+ PushConstant CP#12
+ StoreFieldTOS CP#34
Push r4
Push r1
StoreFieldTOS CP#1
PopLocal r3
Push r3
- InstanceCall 1, CP#46
+ InstanceCall 1, CP#36
Drop1
- PushConstant CP#21
+ PushNull
ReturnTOS
}
@@ -449,18 +430,18 @@
Push r0
Push FP[-5]
LoadFieldTOS CP#6
- PushConstant CP#8
+ PushInt 2
+ PushInt 4
PushConstant CP#9
- PushConstant CP#11
- IndirectStaticCall 4, CP#10
+ IndirectStaticCall 4, CP#8
PopLocal r0
- Allocate CP#41
+ Allocate CP#31
StoreLocal r4
Push r4
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#20
- StoreFieldTOS CP#42
+ LoadTypeArgumentsField CP#15
+ StoreFieldTOS CP#32
Push r4
Push r0
StoreFieldTOS CP#6
@@ -468,21 +449,21 @@
PushConstant CP#5
StoreFieldTOS CP#3
Push r4
- PushConstant CP#12
- StoreFieldTOS CP#44
+ PushConstant CP#10
+ StoreFieldTOS CP#34
Push r4
Push r1
StoreFieldTOS CP#1
PopLocal r3
- PushConstant CP#48
+ PushConstant CP#38
Push r3
- InstanceCall 2, CP#50
+ InstanceCall 2, CP#40
Drop1
- PushConstant CP#51
+ PushConstant CP#41
Push r3
- InstanceCall 2, CP#52
+ InstanceCall 2, CP#42
Drop1
- PushConstant CP#21
+ PushNull
ReturnTOS
}
@@ -512,13 +493,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -533,162 +513,152 @@
Push FP[-5]
StoreContextVar 0
Push r0
- PushConstant CP#0
+ PushInt 1
StoreContextVar 1
- PushConstant CP#1
+ PushInt 2
PopLocal r2
Push r0
- PushConstant CP#2
+ PushInt 3
StoreContextVar 2
- Allocate CP#22
+ Allocate CP#15
StoreLocal r4
Push r4
- PushConstant CP#6
+ PushNull
+ StoreFieldTOS CP#16
+ Push r4
+ PushNull
+ StoreFieldTOS CP#18
+ Push r4
+ PushConstant CP#20
+ StoreFieldTOS CP#21
+ Push r4
+ PushConstant CP#0
StoreFieldTOS CP#23
Push r4
- PushConstant CP#6
- StoreFieldTOS CP#25
- Push r4
- PushConstant CP#27
- StoreFieldTOS CP#28
- Push r4
- PushConstant CP#3
- StoreFieldTOS CP#30
- Push r4
Push r0
- StoreFieldTOS CP#4
+ StoreFieldTOS CP#1
PopLocal r3
Push r3
- PushConstant CP#35
- InstanceCall 2, CP#36
+ PushInt 10
+ InstanceCall 2, CP#28
Drop1
Push r3
- PushConstant CP#37
- InstanceCall 2, CP#38
+ PushInt 11
+ InstanceCall 2, CP#29
Drop1
Push r2
- PushConstant CP#39
- IndirectStaticCall 1, CP#18
+ PushConstant CP#30
+ IndirectStaticCall 1, CP#11
Drop1
Push r0
LoadContextVar 2
- PushConstant CP#40
- IndirectStaticCall 1, CP#18
+ PushConstant CP#31
+ IndirectStaticCall 1, CP#11
Drop1
Push r0
LoadContextVar 1
- PushConstant CP#41
- IndirectStaticCall 1, CP#18
+ PushConstant CP#32
+ IndirectStaticCall 1, CP#11
Drop1
Push r0
- PushConstant CP#42
+ PushInt 42
StoreContextVar 3
- Allocate CP#22
+ Allocate CP#15
StoreLocal r3
Push r3
- PushConstant CP#6
+ PushNull
+ StoreFieldTOS CP#16
+ Push r3
+ PushNull
+ StoreFieldTOS CP#18
+ Push r3
+ PushConstant CP#20
+ StoreFieldTOS CP#21
+ Push r3
+ PushConstant CP#33
StoreFieldTOS CP#23
Push r3
- PushConstant CP#6
- StoreFieldTOS CP#25
- Push r3
- PushConstant CP#27
- StoreFieldTOS CP#28
- Push r3
- PushConstant CP#43
- StoreFieldTOS CP#30
- Push r3
Push r0
- StoreFieldTOS CP#4
+ StoreFieldTOS CP#1
PopLocal r2
Push r2
- InstanceCall 1, CP#46
+ InstanceCall 1, CP#36
Drop1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
- [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
+ [0] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = Type dart.core::int
+ [4] = String 'y'
+ [5] = SubtypeTestCache
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = ICData target-name '+', arg-desc CP#6
+ [8] = ICData target-name '>', arg-desc CP#6
+ [9] = ClosureFunction closure2 () → void;
+ [10] = ICData target-name '+', arg-desc CP#6
+ [11] = ArgDesc num-args 1, num-type-args 0, names []
+ [12] = ICData get target-name 'foo', arg-desc CP#11
+ [13] = ICData target-name '+', arg-desc CP#6
+ [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] = EmptyTypeArguments
+ [21] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [22] = Reserved
+ [23] = InstanceField dart.core::_Closure::_function
[24] = Reserved
- [25] = InstanceField dart.core::_Closure::_function_type_arguments
- [26] = Reserved
- [27] = EmptyTypeArguments
- [28] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [29] = Reserved
- [30] = InstanceField dart.core::_Closure::_function
- [31] = Reserved
- [32] = ICData dynamic target-name 'call', arg-desc CP#18
- [33] = StaticICData target 'dart.core::print', arg-desc CP#18
- [34] = EndClosureFunctionScope
- [35] = Int 10
- [36] = ICData dynamic target-name 'call', arg-desc CP#10
- [37] = Int 11
- [38] = ICData dynamic target-name 'call', arg-desc CP#10
- [39] = StaticICData target 'dart.core::print', arg-desc CP#18
- [40] = StaticICData target 'dart.core::print', arg-desc CP#18
- [41] = StaticICData target 'dart.core::print', arg-desc CP#18
- [42] = Int 42
- [43] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [44] = ICData set target-name 'foo', arg-desc CP#10
- [45] = EndClosureFunctionScope
- [46] = ICData dynamic target-name 'call', arg-desc CP#18
+ [25] = ICData dynamic target-name 'call', arg-desc CP#11
+ [26] = StaticICData target 'dart.core::print', arg-desc CP#11
+ [27] = EndClosureFunctionScope
+ [28] = ICData dynamic target-name 'call', arg-desc CP#6
+ [29] = ICData dynamic target-name 'call', arg-desc CP#6
+ [30] = StaticICData target 'dart.core::print', arg-desc CP#11
+ [31] = StaticICData target 'dart.core::print', arg-desc CP#11
+ [32] = StaticICData target 'dart.core::print', arg-desc CP#11
+ [33] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [34] = ICData set target-name 'foo', arg-desc CP#6
+ [35] = EndClosureFunctionScope
+ [36] = ICData dynamic target-name 'call', arg-desc CP#11
}
-Closure CP#16 {
+Closure CP#9 {
EntryFixed 1, 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#1
PopLocal r0
Push r0
LoadContextParent
Push r0
LoadContextParent
LoadContextVar 1
- PushConstant CP#1
- InstanceCall 2, CP#17
+ PushInt 2
+ InstanceCall 2, CP#10
StoreContextVar 2
Push r0
Push r0
LoadContextParent
LoadContextVar 0
- InstanceCall 1, CP#19
+ InstanceCall 1, CP#12
Push r0
LoadContextVar 0
- InstanceCall 2, CP#20
+ InstanceCall 2, CP#13
StoreContextVar 1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
-Closure CP#3 {
+Closure CP#0 {
EntryFixed 2, 4
CheckStack
Push FP[-6]
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#1
PopLocal r0
AllocateContext 2
StoreLocal r1
@@ -700,76 +670,76 @@
Push FP[-5]
StoreContextVar 0
Push FP[-5]
- PushConstant CP#6
- PushConstant CP#6
- PushConstant CP#7
- PushConstant CP#8
- AssertAssignable 1, CP#9
+ PushNull
+ PushNull
+ PushConstant CP#3
+ PushConstant CP#4
+ AssertAssignable 1, CP#5
Drop1
Push r0
LoadContextParent
Push r0
LoadContextVar 0
- PushConstant CP#0
- InstanceCall 2, CP#11
+ PushInt 1
+ InstanceCall 2, CP#7
StoreContextVar 1
Push r0
LoadContextParent
LoadContextVar 1
- PushConstant CP#12
- InstanceCall 2, CP#13
+ PushInt 5
+ InstanceCall 2, CP#8
AssertBoolean 0
- PushConstant CP#14
+ PushTrue
IfNeStrictTOS
Jump L1
Push r0
- PushConstant CP#15
+ PushInt 4
StoreContextVar 1
- Allocate CP#22
+ Allocate CP#15
StoreLocal r2
Push r2
- PushConstant CP#6
+ PushNull
+ StoreFieldTOS CP#16
+ Push r2
+ PushNull
+ StoreFieldTOS CP#18
+ Push r2
+ PushConstant CP#20
+ StoreFieldTOS CP#21
+ Push r2
+ PushConstant CP#9
StoreFieldTOS CP#23
Push r2
- PushConstant CP#6
- StoreFieldTOS CP#25
- Push r2
- PushConstant CP#27
- StoreFieldTOS CP#28
- Push r2
- PushConstant CP#16
- StoreFieldTOS CP#30
- Push r2
Push r0
- StoreFieldTOS CP#4
+ StoreFieldTOS CP#1
PopLocal r3
Push r3
- InstanceCall 1, CP#32
+ InstanceCall 1, CP#25
Drop1
Push r0
LoadContextVar 1
- PushConstant CP#33
- IndirectStaticCall 1, CP#18
+ PushConstant CP#26
+ IndirectStaticCall 1, CP#11
Drop1
L1:
- PushConstant CP#6
+ PushNull
ReturnTOS
}
-Closure CP#43 {
+Closure CP#33 {
EntryFixed 1, 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#4
+ LoadFieldTOS CP#1
PopLocal r0
Push r0
LoadContextVar 0
Push r0
LoadContextVar 3
- InstanceCall 2, CP#44
+ InstanceCall 2, CP#34
Drop1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
@@ -816,13 +786,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -834,25 +803,25 @@
AllocateContext 1
PopLocal r0
Push r0
- PushConstant CP#0
+ PushInt 0
StoreContextVar 0
- PushConstant CP#1
+ PushConstant CP#0
StoreLocal r3
Push r3
+ PushInt 0
+ CreateArrayTOS
+ StoreLocal r3
+ PushConstant CP#2
+ IndirectStaticCall 2, CP#1
+ PopLocal r2
PushConstant CP#0
+ StoreLocal r3
+ Push r3
+ PushInt 0
CreateArrayTOS
StoreLocal r3
PushConstant CP#3
- IndirectStaticCall 2, CP#2
- PopLocal r2
- PushConstant CP#1
- StoreLocal r3
- Push r3
- PushConstant CP#0
- CreateArrayTOS
- StoreLocal r3
- PushConstant CP#4
- IndirectStaticCall 2, CP#2
+ IndirectStaticCall 2, CP#1
PopLocal r4
AllocateContext 1
StoreLocal r1
@@ -861,57 +830,57 @@
StoreContextParent
PopLocal r0
Push r0
- PushConstant CP#0
+ PushInt 0
StoreContextVar 0
L2:
CheckStack
Push r0
LoadContextVar 0
- PushConstant CP#5
- InstanceCall 2, CP#6
+ PushInt 10
+ InstanceCall 2, CP#4
AssertBoolean 0
- PushConstant CP#7
+ PushTrue
IfNeStrictTOS
Jump L1
Push r2
- Allocate CP#14
+ Allocate CP#10
StoreLocal r3
Push r3
- PushConstant CP#12
- StoreFieldTOS CP#15
+ PushNull
+ StoreFieldTOS CP#11
Push r3
- PushConstant CP#12
- StoreFieldTOS CP#17
+ PushNull
+ StoreFieldTOS CP#13
Push r3
- PushConstant CP#19
- StoreFieldTOS CP#20
+ PushConstant CP#15
+ StoreFieldTOS CP#16
Push r3
- PushConstant CP#8
- StoreFieldTOS CP#22
+ PushConstant CP#5
+ StoreFieldTOS CP#18
Push r3
Push r0
- StoreFieldTOS CP#9
- InstanceCall 2, CP#24
+ StoreFieldTOS CP#6
+ InstanceCall 2, CP#20
Drop1
Push r4
- Allocate CP#14
+ Allocate CP#10
StoreLocal r3
Push r3
- PushConstant CP#12
- StoreFieldTOS CP#15
+ PushNull
+ StoreFieldTOS CP#11
Push r3
- PushConstant CP#12
- StoreFieldTOS CP#17
+ PushNull
+ StoreFieldTOS CP#13
Push r3
- PushConstant CP#19
- StoreFieldTOS CP#20
+ PushConstant CP#15
+ StoreFieldTOS CP#16
Push r3
- PushConstant CP#25
- StoreFieldTOS CP#22
+ PushConstant CP#21
+ StoreFieldTOS CP#18
Push r3
Push r0
- StoreFieldTOS CP#9
- InstanceCall 2, CP#31
+ StoreFieldTOS CP#6
+ InstanceCall 2, CP#27
Drop1
Push r0
CloneContext
@@ -919,8 +888,8 @@
Push r0
Push r0
LoadContextVar 0
- PushConstant CP#32
- InstanceCall 2, CP#33
+ PushInt 1
+ InstanceCall 2, CP#28
StoreLocal r3
StoreContextVar 0
Push r3
@@ -933,84 +902,79 @@
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#12
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = TypeArgs [dart.core::Function]
- [2] = ArgDesc num-args 2, num-type-args 0, 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] = ICData target-name '<', arg-desc CP#2
- [7] = Bool true
- [8] = ClosureFunction <anonymous closure> () → dart.core::int;
- [9] = InstanceField dart.core::_Closure::_context
- [10] = Reserved
- [11] = ICData target-name '+', arg-desc CP#2
- [12] = Null
- [13] = EndClosureFunctionScope
- [14] = Class dart.core::_Closure
- [15] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [16] = Reserved
- [17] = InstanceField dart.core::_Closure::_function_type_arguments
- [18] = Reserved
- [19] = EmptyTypeArguments
- [20] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [21] = Reserved
- [22] = InstanceField dart.core::_Closure::_function
- [23] = Reserved
- [24] = ICData target-name 'add', arg-desc CP#2
- [25] = ClosureFunction <anonymous closure> (dart.core::int ii) → dart.core::Null;
- [26] = Type dart.core::int
- [27] = String 'ii'
- [28] = SubtypeTestCache
- [29] = ICData target-name '+', arg-desc CP#2
- [30] = EndClosureFunctionScope
- [31] = ICData target-name 'add', arg-desc CP#2
- [32] = Int 1
- [33] = ICData target-name '+', arg-desc CP#2
+ [0] = TypeArgs [dart.core::Function]
+ [1] = ArgDesc num-args 2, num-type-args 0, names []
+ [2] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#1
+ [3] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#1
+ [4] = ICData target-name '<', arg-desc CP#1
+ [5] = ClosureFunction <anonymous closure> () → dart.core::int;
+ [6] = InstanceField dart.core::_Closure::_context
+ [7] = Reserved
+ [8] = ICData target-name '+', arg-desc CP#1
+ [9] = EndClosureFunctionScope
+ [10] = Class dart.core::_Closure
+ [11] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [12] = Reserved
+ [13] = InstanceField dart.core::_Closure::_function_type_arguments
+ [14] = Reserved
+ [15] = EmptyTypeArguments
+ [16] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [17] = Reserved
+ [18] = InstanceField dart.core::_Closure::_function
+ [19] = Reserved
+ [20] = ICData target-name 'add', arg-desc CP#1
+ [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#1
+ [26] = EndClosureFunctionScope
+ [27] = ICData target-name 'add', arg-desc CP#1
+ [28] = ICData target-name '+', arg-desc CP#1
}
-Closure CP#8 {
+Closure CP#5 {
EntryFixed 1, 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#9
+ LoadFieldTOS CP#6
PopLocal r0
Push r0
LoadContextVar 0
Push r0
LoadContextParent
LoadContextVar 0
- InstanceCall 2, CP#11
+ InstanceCall 2, CP#8
ReturnTOS
- PushConstant CP#12
+ PushNull
ReturnTOS
}
-Closure CP#25 {
+Closure CP#21 {
EntryFixed 2, 3
CheckStack
Push FP[-6]
- LoadFieldTOS CP#9
+ LoadFieldTOS CP#6
PopLocal r0
Push FP[-5]
- PushConstant CP#12
- PushConstant CP#12
- PushConstant CP#26
- PushConstant CP#27
- AssertAssignable 1, CP#28
+ PushNull
+ PushNull
+ PushConstant CP#22
+ PushConstant CP#23
+ AssertAssignable 1, CP#24
Drop1
Push r0
Push FP[-5]
Push r0
LoadContextParent
LoadContextVar 0
- InstanceCall 2, CP#29
+ InstanceCall 2, CP#25
StoreContextVar 0
- PushConstant CP#12
+ PushNull
ReturnTOS
}
@@ -1036,39 +1000,39 @@
CheckStack
Push r2
InstanceCall 1, CP#2
- PushConstant CP#3
+ PushTrue
IfNeStrictTOS
Jump L1
AllocateContext 1
PopLocal r0
Push r0
Push r2
- InstanceCall 1, CP#4
+ InstanceCall 1, CP#3
StoreContextVar 0
- Allocate CP#13
+ Allocate CP#10
StoreLocal r4
Push r4
- PushConstant CP#11
- StoreFieldTOS CP#14
+ PushNull
+ StoreFieldTOS CP#11
Push r4
- PushConstant CP#11
+ PushNull
+ StoreFieldTOS CP#13
+ Push r4
+ PushConstant CP#15
StoreFieldTOS CP#16
Push r4
- PushConstant CP#18
- StoreFieldTOS CP#19
- Push r4
- PushConstant CP#5
- StoreFieldTOS CP#21
+ PushConstant CP#4
+ StoreFieldTOS CP#18
Push r4
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
PopLocal r3
Push r3
- InstanceCall 1, CP#23
+ InstanceCall 1, CP#20
Drop1
Push r0
LoadContextVar 0
- PushConstant CP#24
+ PushConstant CP#21
IndirectStaticCall 1, CP#0
Drop1
Push r0
@@ -1076,49 +1040,46 @@
PopLocal r0
Jump L2
L1:
- PushConstant CP#11
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = ICData get target-name 'iterator', arg-desc CP#0
[2] = ICData target-name 'moveNext', arg-desc CP#0
- [3] = Bool true
- [4] = ICData get target-name 'current', arg-desc CP#0
- [5] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [6] = InstanceField dart.core::_Closure::_context
- [7] = Reserved
- [8] = Int 1
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = ICData target-name '+', arg-desc CP#9
- [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
+ [3] = ICData get target-name 'current', arg-desc CP#0
+ [4] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = ArgDesc num-args 2, num-type-args 0, names []
+ [8] = ICData target-name '+', arg-desc CP#7
+ [9] = EndClosureFunctionScope
+ [10] = Class dart.core::_Closure
+ [11] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [12] = Reserved
+ [13] = InstanceField dart.core::_Closure::_function_type_arguments
+ [14] = Reserved
+ [15] = EmptyTypeArguments
+ [16] = InstanceField dart.core::_Closure::_delayed_type_arguments
[17] = Reserved
- [18] = EmptyTypeArguments
- [19] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [20] = Reserved
- [21] = InstanceField dart.core::_Closure::_function
- [22] = Reserved
- [23] = ICData dynamic target-name 'call', arg-desc CP#0
- [24] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [18] = InstanceField dart.core::_Closure::_function
+ [19] = Reserved
+ [20] = ICData dynamic target-name 'call', arg-desc CP#0
+ [21] = StaticICData target 'dart.core::print', arg-desc CP#0
}
-Closure CP#5 {
+Closure CP#4 {
EntryFixed 1, 3
CheckStack
Push FP[-5]
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r0
Push r0
Push r0
LoadContextVar 0
- PushConstant CP#8
- InstanceCall 2, CP#10
+ PushInt 1
+ InstanceCall 2, CP#8
StoreContextVar 0
- PushConstant CP#11
+ PushNull
ReturnTOS
}
@@ -1141,13 +1102,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -1164,64 +1124,63 @@
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
+ PushNull
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
- AssertAssignable 0, CP#4
+ AssertAssignable 0, CP#3
Drop1
- Allocate CP#9
+ Allocate CP#8
StoreLocal r2
Push r2
Push FP[-6]
LoadTypeArgumentsField CP#0
- StoreFieldTOS CP#10
+ StoreFieldTOS CP#9
Push r2
- PushConstant CP#1
- StoreFieldTOS CP#12
+ PushNull
+ StoreFieldTOS CP#11
Push r2
- PushConstant CP#14
- StoreFieldTOS CP#15
+ PushConstant CP#13
+ StoreFieldTOS CP#14
Push r2
- PushConstant CP#5
- StoreFieldTOS CP#17
+ PushConstant CP#4
+ StoreFieldTOS CP#16
Push r2
Push r0
- StoreFieldTOS CP#6
+ StoreFieldTOS CP#5
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[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] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [11] = Reserved
- [12] = InstanceField dart.core::_Closure::_function_type_arguments
- [13] = Reserved
- [14] = EmptyTypeArguments
- [15] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [16] = Reserved
- [17] = InstanceField dart.core::_Closure::_function
- [18] = Reserved
+ [1] = Type #lib::D::T
+ [2] = String 't'
+ [3] = SubtypeTestCache
+ [4] = ClosureFunction <anonymous closure> () → #lib::D::T;
+ [5] = InstanceField dart.core::_Closure::_context
+ [6] = Reserved
+ [7] = EndClosureFunctionScope
+ [8] = Class dart.core::_Closure
+ [9] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [10] = Reserved
+ [11] = InstanceField dart.core::_Closure::_function_type_arguments
+ [12] = Reserved
+ [13] = EmptyTypeArguments
+ [14] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [15] = Reserved
+ [16] = InstanceField dart.core::_Closure::_function
+ [17] = Reserved
}
-Closure CP#5 {
+Closure CP#4 {
EntryFixed 1, 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#6
+ LoadFieldTOS CP#5
PopLocal r0
Push r0
LoadContextVar 0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
@@ -1236,29 +1195,29 @@
AllocateContext 1
PopLocal r0
Push r0
- PushConstant CP#0
+ PushInt 5
StoreContextVar 0
- Allocate CP#11
+ Allocate CP#9
StoreLocal r3
Push r3
- PushConstant CP#4
+ PushNull
+ StoreFieldTOS CP#10
+ Push r3
+ PushNull
StoreFieldTOS CP#12
Push r3
- PushConstant CP#4
- StoreFieldTOS CP#14
+ PushConstant CP#14
+ StoreFieldTOS CP#15
Push r3
- PushConstant CP#16
+ PushConstant CP#0
StoreFieldTOS CP#17
Push r3
- PushConstant CP#1
- StoreFieldTOS CP#19
- Push r3
Push r0
- StoreFieldTOS CP#2
+ StoreFieldTOS CP#1
PopLocal r2
Push r2
- PushConstant CP#21
- InstanceCall 2, CP#22
+ PushInt 3
+ InstanceCall 2, CP#19
Drop1
Push r0
LoadContextVar 0
@@ -1266,54 +1225,51 @@
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
- [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
+ [0] = ClosureFunction <anonymous closure> (dart.core::int y) → dart.core::Null;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = Type dart.core::int
+ [4] = String 'y'
+ [5] = SubtypeTestCache
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = ICData target-name '+', arg-desc CP#6
+ [8] = EndClosureFunctionScope
+ [9] = Class dart.core::_Closure
+ [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_type_arguments
- [15] = Reserved
- [16] = EmptyTypeArguments
- [17] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [14] = EmptyTypeArguments
+ [15] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [16] = Reserved
+ [17] = InstanceField dart.core::_Closure::_function
[18] = Reserved
- [19] = InstanceField dart.core::_Closure::_function
- [20] = Reserved
- [21] = Int 3
- [22] = ICData dynamic target-name 'call', arg-desc CP#8
+ [19] = ICData dynamic target-name 'call', arg-desc CP#6
}
-Closure CP#1 {
+Closure CP#0 {
EntryFixed 2, 3
CheckStack
Push FP[-6]
- LoadFieldTOS CP#2
+ LoadFieldTOS CP#1
PopLocal r0
Push FP[-5]
+ PushNull
+ PushNull
+ PushConstant CP#3
PushConstant CP#4
- PushConstant CP#4
- PushConstant CP#5
- PushConstant CP#6
- AssertAssignable 1, CP#7
+ AssertAssignable 1, CP#5
Drop1
Push r0
Push r0
LoadContextVar 0
Push FP[-5]
- InstanceCall 2, CP#9
+ InstanceCall 2, CP#7
StoreContextVar 0
- PushConstant CP#4
+ PushNull
ReturnTOS
}
@@ -1333,89 +1289,79 @@
PushConstant CP#0
StoreLocal r1
Push r1
- PushConstant CP#1
+ PushInt 8
CreateArrayTOS
StoreLocal r1
Push r1
- PushConstant CP#2
- PushConstant CP#4
+ PushInt 0
+ PushNull
+ Push r0
+ InstantiateType CP#1
+ StoreIndexedTOS
+ Push r1
+ PushInt 1
+ PushNull
+ Push r0
+ InstantiateType CP#2
+ StoreIndexedTOS
+ Push r1
+ PushInt 2
+ PushNull
Push r0
InstantiateType CP#3
StoreIndexedTOS
Push r1
- PushConstant CP#5
- PushConstant CP#4
+ PushInt 3
+ PushNull
+ Push r0
+ InstantiateType CP#4
+ StoreIndexedTOS
+ Push r1
+ PushInt 4
+ PushNull
+ Push r0
+ InstantiateType CP#5
+ StoreIndexedTOS
+ Push r1
+ PushInt 5
+ PushNull
Push r0
InstantiateType CP#6
StoreIndexedTOS
Push r1
- PushConstant CP#7
- PushConstant CP#4
+ PushInt 6
+ PushNull
+ Push r0
+ InstantiateType CP#7
+ StoreIndexedTOS
+ Push r1
+ PushInt 7
+ PushNull
Push r0
InstantiateType CP#8
StoreIndexedTOS
- Push r1
- PushConstant CP#9
- PushConstant CP#4
- Push r0
- InstantiateType CP#10
- StoreIndexedTOS
- Push r1
- PushConstant CP#11
- PushConstant CP#4
- Push r0
- InstantiateType CP#12
- StoreIndexedTOS
- Push r1
- PushConstant CP#13
- PushConstant CP#4
- Push r0
- InstantiateType CP#14
- StoreIndexedTOS
- Push r1
- PushConstant CP#15
- PushConstant CP#4
- Push r0
- InstantiateType CP#16
- StoreIndexedTOS
- Push r1
- PushConstant CP#17
- PushConstant CP#4
- Push r0
- InstantiateType CP#18
- StoreIndexedTOS
- PushConstant CP#20
- IndirectStaticCall 2, CP#19
- PushConstant CP#22
- IndirectStaticCall 1, CP#21
+ PushConstant CP#10
+ IndirectStaticCall 2, CP#9
+ PushConstant CP#12
+ IndirectStaticCall 1, CP#11
Drop1
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::Type]
- [1] = Int 8
- [2] = Int 0
- [3] = Type #lib::callWithArgs::T1
- [4] = Null
- [5] = Int 1
- [6] = Type #lib::callWithArgs::T2
- [7] = Int 2
- [8] = Type #lib::callWithArgs::T3
- [9] = Int 3
- [10] = Type #lib::callWithArgs::T4
- [11] = Int 4
- [12] = Type #lib::callWithArgs::T5
- [13] = Int 5
- [14] = Type #lib::callWithArgs::T6
- [15] = Int 6
- [16] = Type #lib::callWithArgs::T7
- [17] = Int 7
- [18] = Type #lib::callWithArgs::T8
- [19] = ArgDesc num-args 2, num-type-args 0, names []
- [20] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#19
- [21] = ArgDesc num-args 1, num-type-args 0, names []
- [22] = StaticICData target 'dart.core::print', arg-desc CP#21
+ [1] = Type #lib::callWithArgs::T1
+ [2] = Type #lib::callWithArgs::T2
+ [3] = Type #lib::callWithArgs::T3
+ [4] = Type #lib::callWithArgs::T4
+ [5] = Type #lib::callWithArgs::T5
+ [6] = Type #lib::callWithArgs::T6
+ [7] = Type #lib::callWithArgs::T7
+ [8] = Type #lib::callWithArgs::T8
+ [9] = ArgDesc num-args 2, num-type-args 0, names []
+ [10] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#9
+ [11] = ArgDesc num-args 1, num-type-args 0, names []
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#11
}
]static method callWithArgs<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic, T3 extends core::Object = dynamic, T4 extends core::Object = dynamic, T5 extends core::Object = dynamic, T6 extends core::Object = dynamic, T7 extends core::Object = dynamic, T8 extends core::Object = dynamic>() → void {
core::print(<core::Type>[self::callWithArgs::T1, self::callWithArgs::T2, self::callWithArgs::T3, self::callWithArgs::T4, self::callWithArgs::T5, self::callWithArgs::T6, self::callWithArgs::T7, self::callWithArgs::T8]);
@@ -1457,7 +1403,7 @@
Drop1
InstanceCall 2, CP#12
Drop1
- PushConstant CP#13
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -1474,7 +1420,6 @@
[10] = TypeArgumentsForInstanceAllocation #lib::A [dart.core::List<#lib::C1>, dart.core::List<#lib::C2>]
[11] = StaticICData target '#lib::A::', arg-desc CP#3
[12] = ICData target-name 'foo', arg-desc CP#5
- [13] = Null
}
]static method callA() → void {
new self::A::•<self::C1, self::C2>().{self::A::foo}<self::C3, self::C4>();
@@ -1485,47 +1430,47 @@
Bytecode {
Entry 7
CheckStack
- Allocate CP#17
+ Allocate CP#14
StoreLocal r3
Push r3
- PushConstant CP#12
- StoreFieldTOS CP#18
+ PushNull
+ StoreFieldTOS CP#15
Push r3
- PushConstant CP#12
+ PushNull
StoreFieldTOS CP#6
Push r3
PushConstant CP#5
StoreFieldTOS CP#3
Push r3
PushConstant CP#0
- StoreFieldTOS CP#20
+ StoreFieldTOS CP#17
Push r3
Push r0
StoreFieldTOS CP#1
PopLocal r2
Push r2
StoreLocal r3
- PushConstant CP#22
+ PushConstant CP#19
StoreLocal r6
- PushConstant CP#24
- IndirectStaticCall 2, CP#23
+ PushConstant CP#21
+ IndirectStaticCall 2, CP#20
Drop1
- Allocate CP#17
+ Allocate CP#14
StoreLocal r5
Push r6
StoreFieldTOS CP#3
Push r5
Push r3
- LoadFieldTOS CP#18
- StoreFieldTOS CP#18
+ LoadFieldTOS CP#15
+ StoreFieldTOS CP#15
Push r5
Push r3
LoadFieldTOS CP#6
StoreFieldTOS CP#6
Push r5
Push r3
- LoadFieldTOS CP#20
- StoreFieldTOS CP#20
+ LoadFieldTOS CP#17
+ StoreFieldTOS CP#17
Push r5
Push r3
LoadFieldTOS CP#1
@@ -1534,7 +1479,7 @@
PopLocal r4
Push r4
ReturnTOS
- PushConstant CP#12
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -1546,23 +1491,20 @@
[5] = EmptyTypeArguments
[6] = InstanceField dart.core::_Closure::_function_type_arguments
[7] = Reserved
- [8] = Int 0
- [9] = Int 1
- [10] = ArgDesc num-args 4, num-type-args 0, names []
- [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
- [12] = Null
- [13] = Type T
- [14] = String 't'
- [15] = SubtypeTestCache
- [16] = EndClosureFunctionScope
- [17] = Class dart.core::_Closure
- [18] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [19] = Reserved
- [20] = InstanceField dart.core::_Closure::_function
- [21] = Reserved
- [22] = TypeArgs [dart.core::int]
- [23] = ArgDesc num-args 2, num-type-args 0, names []
- [24] = StaticICData target 'dart._internal::_boundsCheckForPartialInstantiation', arg-desc CP#23
+ [8] = ArgDesc num-args 4, num-type-args 0, names []
+ [9] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#8
+ [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] = ArgDesc num-args 2, num-type-args 0, names []
+ [21] = StaticICData target 'dart._internal::_boundsCheckForPartialInstantiation', arg-desc CP#20
}
Closure CP#0 {
EntryFixed 2, 3
@@ -1584,19 +1526,19 @@
Push r0
Push FP[-6]
LoadFieldTOS CP#6
- PushConstant CP#8
+ PushInt 0
+ PushInt 1
PushConstant CP#9
- PushConstant CP#11
- IndirectStaticCall 4, CP#10
+ IndirectStaticCall 4, CP#8
PopLocal r0
Push FP[-5]
- PushConstant CP#12
+ PushNull
Push r0
- PushConstant CP#13
- PushConstant CP#14
- AssertAssignable 0, CP#15
+ PushConstant CP#10
+ PushConstant CP#11
+ AssertAssignable 0, CP#12
Drop1
- PushConstant CP#12
+ PushNull
ReturnTOS
}
@@ -1609,10 +1551,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
index 8d4cb94..cf966e1 100644
--- a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
+++ b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
@@ -6,22 +6,21 @@
Bytecode {
Entry 1
CheckStack
- PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ PushNull
+ PushConstant CP#1
+ IndirectStaticCall 1, CP#0
PopLocal r0
- PushConstant CP#4
- IndirectStaticCall 0, CP#3
+ PushConstant CP#3
+ IndirectStaticCall 0, CP#2
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = StaticICData target 'dart.async::Future::value', arg-desc CP#1
- [3] = ArgDesc num-args 0, num-type-args 0, names []
- [4] = StaticICData target '#lib1::main', arg-desc CP#3
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = StaticICData target 'dart.async::Future::value', arg-desc CP#0
+ [2] = ArgDesc num-args 0, num-type-args 0, names []
+ [3] = StaticICData target '#lib1::main', arg-desc CP#2
}
]static method callDeferred() → dynamic
return let final dynamic #t1 = CheckLibraryIsLoaded(lib) in hel::main();
@@ -29,17 +28,16 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ PushNull
+ PushConstant CP#1
+ IndirectStaticCall 1, CP#0
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = StaticICData target 'dart.async::Future::value', arg-desc CP#1
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = StaticICData target 'dart.async::Future::value', arg-desc CP#0
}
]static method testLoadLibrary() → dynamic
return LoadLibrary(lib);
@@ -47,10 +45,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/field_initializers.dart.expect b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
index 5e795aa..5268d47 100644
--- a/pkg/vm/testcases/bytecode/field_initializers.dart.expect
+++ b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
@@ -13,37 +13,33 @@
Entry 0
CheckStack
Push FP[-6]
- PushConstant CP#0
- StoreFieldTOS CP#1
+ PushInt 42
+ StoreFieldTOS CP#0
Push FP[-6]
- PushConstant CP#3
- StoreFieldTOS CP#4
+ PushInt 43
+ StoreFieldTOS CP#2
Push FP[-6]
Push FP[-5]
- StoreFieldTOS CP#6
- Push FP[-6]
- PushConstant CP#8
StoreFieldTOS CP#4
Push FP[-6]
- PushConstant CP#10
- IndirectStaticCall 1, CP#9
+ PushInt 44
+ StoreFieldTOS CP#2
+ Push FP[-6]
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#6
Drop1
- PushConstant CP#11
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 42
- [1] = InstanceField #lib::A::foo3
- [2] = Reserved
- [3] = Int 43
- [4] = InstanceField #lib::A::foo5
+ [0] = InstanceField #lib::A::foo3
+ [1] = Reserved
+ [2] = InstanceField #lib::A::foo5
+ [3] = Reserved
+ [4] = InstanceField #lib::A::foo4
[5] = Reserved
- [6] = InstanceField #lib::A::foo4
- [7] = Reserved
- [8] = Int 44
- [9] = ArgDesc num-args 1, num-type-args 0, names []
- [10] = StaticICData target 'dart.core::Object::', arg-desc CP#9
- [11] = Null
+ [6] = ArgDesc num-args 1, num-type-args 0, names []
+ [7] = StaticICData target 'dart.core::Object::', arg-desc CP#6
}
] constructor •(core::int foo4) → void
: self::A::foo1 = null, self::A::foo4 = foo4, self::A::foo5 = 44, super core::Object::•()
@@ -53,41 +49,37 @@
Entry 0
CheckStack
Push FP[-7]
- PushConstant CP#0
- StoreFieldTOS CP#1
+ PushInt 42
+ StoreFieldTOS CP#0
Push FP[-7]
- PushConstant CP#3
- StoreFieldTOS CP#4
+ PushInt 43
+ StoreFieldTOS CP#2
Push FP[-7]
Push FP[-6]
- StoreFieldTOS CP#6
- Push FP[-7]
- Push FP[-5]
- PushConstant CP#8
- InstanceCall 2, CP#10
StoreFieldTOS CP#4
Push FP[-7]
- PushConstant CP#12
- IndirectStaticCall 1, CP#11
+ Push FP[-5]
+ PushInt 1
+ InstanceCall 2, CP#7
+ StoreFieldTOS CP#2
+ Push FP[-7]
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#13
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 42
- [1] = InstanceField #lib::A::foo3
- [2] = Reserved
- [3] = Int 43
- [4] = InstanceField #lib::A::foo5
+ [0] = InstanceField #lib::A::foo3
+ [1] = Reserved
+ [2] = InstanceField #lib::A::foo5
+ [3] = Reserved
+ [4] = InstanceField #lib::A::foo1
[5] = Reserved
- [6] = InstanceField #lib::A::foo1
- [7] = Reserved
- [8] = Int 1
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = ICData target-name '+', arg-desc CP#9
- [11] = ArgDesc num-args 1, num-type-args 0, names []
- [12] = StaticICData target 'dart.core::Object::', arg-desc CP#11
- [13] = Null
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = ICData target-name '+', arg-desc CP#6
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart.core::Object::', arg-desc CP#8
}
] 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::•()
@@ -97,18 +89,16 @@
Entry 0
CheckStack
Push FP[-5]
- PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 2, CP#1
+ PushInt 45
+ PushConstant CP#1
+ IndirectStaticCall 2, CP#0
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 45
- [1] = ArgDesc num-args 2, num-type-args 0, names []
- [2] = StaticICData target '#lib::A::', arg-desc CP#1
- [3] = Null
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = StaticICData target '#lib::A::', arg-desc CP#0
}
] constructor redirecting1() → void
: this self::A::•(45)
@@ -125,7 +115,7 @@
PushConstant CP#3
IndirectStaticCall 3, CP#2
Drop1
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -133,7 +123,6 @@
[1] = ICData target-name '*', arg-desc CP#0
[2] = ArgDesc num-args 3, num-type-args 0, names []
[3] = StaticICData target '#lib::A::constr2', arg-desc CP#2
- [4] = Null
}
] constructor redirecting2(core::int a, core::int b, core::int c) → void
: this self::A::constr2(a, b.{core::num::*}(c))
@@ -148,24 +137,21 @@
Entry 0
CheckStack
Push FP[-5]
- PushConstant CP#0
- StoreFieldTOS CP#1
+ PushInt 46
+ StoreFieldTOS CP#0
Push FP[-5]
+ PushInt 49
PushConstant CP#3
- PushConstant CP#5
- IndirectStaticCall 2, CP#4
+ IndirectStaticCall 2, CP#2
Drop1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 46
- [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
+ [0] = InstanceField #lib::B::foo6
+ [1] = Reserved
+ [2] = ArgDesc num-args 2, num-type-args 0, names []
+ [3] = StaticICData target '#lib::A::', arg-desc CP#2
}
] constructor •() → void
: super self::A::•(49)
@@ -175,30 +161,26 @@
Entry 0
CheckStack
Push FP[-7]
- PushConstant CP#0
- StoreFieldTOS CP#1
+ PushInt 46
+ StoreFieldTOS CP#0
Push FP[-7]
- PushConstant CP#3
- StoreFieldTOS CP#1
+ PushInt 50
+ StoreFieldTOS CP#0
Push FP[-7]
Push FP[-6]
Push FP[-5]
- PushConstant CP#4
- PushConstant CP#6
- IndirectStaticCall 4, CP#5
+ PushInt 51
+ PushConstant CP#3
+ IndirectStaticCall 4, CP#2
Drop1
- PushConstant CP#7
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 46
- [1] = InstanceField #lib::B::foo6
- [2] = Reserved
- [3] = Int 50
- [4] = Int 51
- [5] = ArgDesc num-args 4, num-type-args 0, names []
- [6] = StaticICData target '#lib::A::redirecting2', arg-desc CP#5
- [7] = Null
+ [0] = InstanceField #lib::B::foo6
+ [1] = Reserved
+ [2] = ArgDesc num-args 4, num-type-args 0, names []
+ [3] = StaticICData target '#lib::A::redirecting2', arg-desc CP#2
}
] constructor c2(core::int i, core::int j) → void
: self::B::foo6 = 50, super self::A::redirecting2(i, j, 51)
@@ -208,10 +190,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/hello.dart.expect b/pkg/vm/testcases/bytecode/hello.dart.expect
index 7147dbc..b9c0903 100644
--- a/pkg/vm/testcases/bytecode/hello.dart.expect
+++ b/pkg/vm/testcases/bytecode/hello.dart.expect
@@ -10,14 +10,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'Hello, Dart Bytecode!'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::print', arg-desc CP#1
- [3] = Null
}
]static method main() → dynamic {
core::print("Hello, Dart Bytecode!");
diff --git a/pkg/vm/testcases/bytecode/instance_creation.dart.expect b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
index be1eedc..127251d 100644
--- a/pkg/vm/testcases/bytecode/instance_creation.dart.expect
+++ b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
@@ -14,56 +14,50 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 4
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
+ PushInt 0
+ PushConstant CP#2
+ StoreIndexedTOS
+ Push r0
+ PushInt 1
+ Push FP[-5]
+ LoadTypeArgumentsField CP#4
+ PushNull
+ InstantiateType CP#3
+ StoreIndexedTOS
+ Push r0
+ PushInt 2
PushConstant CP#5
StoreIndexedTOS
Push r0
- PushConstant CP#6
+ PushInt 3
Push FP[-5]
- LoadTypeArgumentsField CP#8
- PushConstant CP#2
- InstantiateType CP#7
+ LoadTypeArgumentsField CP#4
+ PushNull
+ InstantiateType CP#6
StoreIndexedTOS
- Push r0
- PushConstant CP#9
- PushConstant CP#10
- StoreIndexedTOS
- Push r0
- PushConstant CP#11
- Push FP[-5]
- LoadTypeArgumentsField CP#8
- PushConstant CP#2
- InstantiateType CP#12
- StoreIndexedTOS
- PushConstant CP#13
+ PushConstant CP#7
IndirectStaticCall 1, CP#0
- PushConstant CP#14
+ PushConstant CP#8
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
- [3] = Int 4
- [4] = Int 0
- [5] = String 'Base: '
- [6] = Int 1
- [7] = Type #lib::Base::T1
- [8] = TypeArgumentsField #lib::Base
- [9] = Int 2
- [10] = String ', '
- [11] = Int 3
- [12] = Type #lib::Base::T2
- [13] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
- [14] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [2] = String 'Base: '
+ [3] = Type #lib::Base::T1
+ [4] = TypeArgumentsField #lib::Base
+ [5] = String ', '
+ [6] = Type #lib::Base::T2
+ [7] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#0
}
] constructor •() → void
: super core::Object::•() {
@@ -79,13 +73,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base::', arg-desc CP#0
- [2] = Null
}
] constructor •(core::String s) → void
: super self::Base::•()
@@ -100,41 +93,37 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
- PushConstant CP#5
+ PushInt 0
+ PushConstant CP#2
StoreIndexedTOS
Push r0
- PushConstant CP#6
+ PushInt 1
Push FP[-5]
- LoadTypeArgumentsField CP#8
- PushConstant CP#2
- InstantiateType CP#7
+ LoadTypeArgumentsField CP#4
+ PushNull
+ InstantiateType CP#3
StoreIndexedTOS
- PushConstant CP#9
+ PushConstant CP#5
IndirectStaticCall 1, CP#0
- PushConstant CP#10
+ PushConstant CP#6
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base::', arg-desc CP#0
- [2] = Null
- [3] = Int 2
- [4] = Int 0
- [5] = String 'B: '
- [6] = Int 1
- [7] = Type #lib::B::T
- [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
+ [2] = String 'B: '
+ [3] = Type #lib::B::T
+ [4] = TypeArgumentsField #lib::B
+ [5] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#0
}
] constructor •() → void
: super self::Base::•() {
@@ -150,36 +139,32 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
- PushConstant CP#5
+ PushInt 0
+ PushConstant CP#2
StoreIndexedTOS
Push r0
- PushConstant CP#6
+ PushInt 1
Push FP[-5]
StoreIndexedTOS
- PushConstant CP#7
+ PushConstant CP#3
IndirectStaticCall 1, CP#0
- PushConstant CP#8
+ PushConstant CP#4
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
- [3] = Int 2
- [4] = Int 0
- [5] = String 'C: '
- [6] = Int 1
- [7] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
- [8] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [2] = String 'C: '
+ [3] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#0
+ [4] = StaticICData target 'dart.core::print', arg-desc CP#0
}
] constructor •(core::String s) → void
: super core::Object::•() {
@@ -195,13 +180,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -215,14 +199,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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
}
] method test_reuse1() → dynamic
return core::Map::•<self::E::K, self::E::V>();
@@ -236,13 +219,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::E::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::E::•()
@@ -256,14 +238,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[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
}
] method test_reuse2() → dynamic
return core::Map::•<core::String, core::List<self::F::V>>();
@@ -277,13 +258,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] constructor •() → void
: super core::Object::•()
@@ -293,25 +273,24 @@
Entry 1
CheckStack
Push FP[-5]
- PushConstant CP#1
- InstantiateTypeArgumentsTOS 0, CP#2
+ PushNull
+ InstantiateTypeArgumentsTOS 0, CP#1
PushConstant CP#0
AllocateT
StoreLocal r0
Push r0
- PushConstant CP#4
- IndirectStaticCall 1, CP#3
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
Drop1
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = Class #lib::H
- [1] = Null
- [2] = TypeArgumentsForInstanceAllocation #lib::H [dart.core::String, #lib::G::test_factory::K, #lib::G::test_factory::V]
- [3] = ArgDesc num-args 1, num-type-args 0, names []
- [4] = StaticICData target '#lib::H::', arg-desc CP#3
+ [1] = TypeArgumentsForInstanceAllocation #lib::H [dart.core::String, #lib::G::test_factory::K, #lib::G::test_factory::V]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target '#lib::H::', arg-desc CP#2
}
] static factory test_factory<K extends core::Object = dynamic, V extends core::Object = dynamic>() → self::G<self::G::test_factory::K, self::G::test_factory::V>
return new self::H::•<core::String, self::G::test_factory::K, self::G::test_factory::V>();
@@ -325,13 +304,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::G::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::G::•()
@@ -346,13 +324,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] constructor •(dynamic param) → void
: super core::Object::•()
@@ -372,7 +349,7 @@
IndirectStaticCall 2, CP#3
Drop1
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -414,14 +391,13 @@
IndirectStaticCall 1, CP#1
Drop1
ReturnTOS
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = Class #lib::TestTypeArgReuse
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target '#lib::TestTypeArgReuse::', arg-desc CP#1
- [3] = Null
}
] static factory •<A extends core::Object = dynamic, B extends core::Object = dynamic>() → self::K<self::K::•::A, self::K::•::B>
return new self::TestTypeArgReuse::•<self::K::•::A, self::K::•::B>();
@@ -435,13 +411,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::Base::•()
@@ -459,7 +434,7 @@
IndirectStaticCall 2, CP#2
Drop1
ReturnTOS
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -467,7 +442,6 @@
[1] = String 'hello'
[2] = ArgDesc num-args 2, num-type-args 0, names []
[3] = StaticICData target '#lib::C::', arg-desc CP#2
- [4] = Null
}
]static method foo1() → dynamic
return new self::C::•("hello");
@@ -494,7 +468,7 @@
IndirectStaticCall 1, CP#7
Drop1
Drop1
- PushConstant CP#9
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -507,7 +481,6 @@
[6] = TypeArgumentsForInstanceAllocation #lib::B [dart.core::int]
[7] = ArgDesc num-args 1, num-type-args 0, names []
[8] = StaticICData target '#lib::B::', arg-desc CP#7
- [9] = Null
}
]static method foo2() → void {
new self::A::•("hi");
@@ -518,26 +491,25 @@
Entry 2
CheckStack
CheckFunctionTypeArgs 1, 0
- PushConstant CP#1
+ PushNull
Push r0
- InstantiateTypeArgumentsTOS 0, CP#2
+ InstantiateTypeArgumentsTOS 0, CP#1
PushConstant CP#0
AllocateT
StoreLocal r1
Push r1
- PushConstant CP#4
- IndirectStaticCall 1, CP#3
+ PushConstant CP#3
+ IndirectStaticCall 1, CP#2
Drop1
Drop1
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = Class #lib::B
- [1] = Null
- [2] = TypeArgumentsForInstanceAllocation #lib::B [dart.core::List<#lib::foo3::T>]
- [3] = ArgDesc num-args 1, num-type-args 0, names []
- [4] = StaticICData target '#lib::B::', arg-desc CP#3
+ [1] = TypeArgumentsForInstanceAllocation #lib::B [dart.core::List<#lib::foo3::T>]
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = StaticICData target '#lib::B::', arg-desc CP#2
}
]static method foo3<T extends core::Object = dynamic>() → void {
new self::B::•<core::List<self::foo3::T>>();
@@ -550,14 +522,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsForInstanceAllocation #lib::G [dart.core::int, dart.core::List<dart.core::String>]
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target '#lib::G::test_factory', arg-desc CP#1
- [3] = Null
}
]static method foo4() → void {
self::G::test_factory<core::int, core::List<core::String>>();
@@ -566,25 +537,23 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 1, CP#1
+ PushNull
+ PushConstant CP#1
+ IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#0
+ PushNull
+ PushInt 42
PushConstant CP#3
- PushConstant CP#5
- IndirectStaticCall 2, CP#4
+ IndirectStaticCall 2, CP#2
Drop1
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = StaticICData target '#lib::I::test_factory2', arg-desc CP#1
- [3] = Int 42
- [4] = ArgDesc num-args 2, num-type-args 0, names [param]
- [5] = StaticICData target '#lib::I::test_factory2', arg-desc CP#4
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = StaticICData target '#lib::I::test_factory2', arg-desc CP#0
+ [2] = ArgDesc num-args 2, num-type-args 0, names [param]
+ [3] = StaticICData target '#lib::I::test_factory2', arg-desc CP#2
}
]static method foo5() → void {
self::I::test_factory2();
@@ -604,7 +573,7 @@
PushConstant CP#5
IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -614,7 +583,6 @@
[3] = TypeArgs [dart.core::String]
[4] = ArgDesc num-args 0, num-type-args 1, names []
[5] = StaticICData target '#lib::foo3', arg-desc CP#4
- [6] = Null
}
]static method main() → dynamic {
self::foo1();
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index 22fd2fd..be1bb2e 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -100,7 +100,7 @@
PushConstant CP#5
IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -110,7 +110,6 @@
[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::•()
@@ -123,13 +122,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData get target '#lib::A::_name', arg-desc CP#0
- [2] = Null
}
] method toString() → core::String
return this.{=self::A::_name};
@@ -147,7 +145,7 @@
PushConstant CP#3
IndirectStaticCall 1, CP#2
Drop1
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -155,7 +153,6 @@
[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::•()
@@ -174,12 +171,12 @@
StoreFieldTOS CP#2
Push FP[-8]
Push FP[-5]
- PushConstant CP#4
- InstanceCall 2, CP#5
- PushConstant CP#6
+ PushInt 5
+ InstanceCall 2, CP#4
+ PushConstant CP#5
IndirectStaticCall 2, CP#0
Drop1
- PushConstant CP#7
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -187,10 +184,8 @@
[1] = ICData target-name '+', arg-desc CP#0
[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
+ [4] = ICData target-name '*', arg-desc CP#0
+ [5] = StaticICData target '#lib::B::', arg-desc CP#0
}
] 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))
@@ -215,7 +210,7 @@
PushConstant CP#6
IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -240,13 +235,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] const constructor •() → void
: super core::Object::•()
@@ -261,13 +255,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::E::', arg-desc CP#0
- [2] = Null
}
] const constructor •() → void
: super self::E::•()
@@ -292,11 +285,10 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushInt 6
ReturnTOS
}
ConstantPool {
- [0] = Int 6
}
]static const field core::int c3 = self::c2.{core::String::length};
[@vm.bytecode=
@@ -340,19 +332,19 @@
PushConstant CP#7
IndirectStaticCall 1, CP#4
Drop1
+ PushInt 6
PushConstant CP#8
- PushConstant CP#9
IndirectStaticCall 1, CP#4
Drop1
+ PushConstant CP#11
PushConstant CP#12
- PushConstant CP#13
IndirectStaticCall 1, CP#4
Drop1
+ PushConstant CP#15
PushConstant CP#16
- PushConstant CP#17
IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -364,16 +356,15 @@
[5] = StaticICData target 'dart.core::print', arg-desc CP#4
[6] = String 'hello!'
[7] = StaticICData target 'dart.core::print', arg-desc CP#4
- [8] = Int 6
- [9] = StaticICData target 'dart.core::print', arg-desc CP#4
- [10] = Int 3
- [11] = Int 15
- [12] = Instance #lib::C type-args CP#0 {j: CP#10, i: CP#11}
- [13] = StaticICData target 'dart.core::print', arg-desc CP#4
- [14] = Int 4
- [15] = Instance #lib::B type-args CP#0 {i: CP#14}
- [16] = Instance #lib::D type-args CP#0 {x: CP#15, y: CP#0}
- [17] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [9] = Int 3
+ [10] = Int 15
+ [11] = Instance #lib::C type-args CP#0 {j: CP#9, i: CP#10}
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [13] = Int 4
+ [14] = Instance #lib::B type-args CP#0 {i: CP#13}
+ [15] = Instance #lib::D type-args CP#0 {x: CP#14, y: CP#0}
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#4
}
]static method test_constants1() → void {
core::print(self::c1);
@@ -386,67 +377,67 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushInt 42
+ PushConstant CP#1
+ IndirectStaticCall 1, CP#0
+ Drop1
PushConstant CP#2
- IndirectStaticCall 1, CP#1
- Drop1
PushConstant CP#3
- PushConstant CP#4
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#0
Drop1
+ PushConstant CP#7
PushConstant CP#8
- PushConstant CP#9
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#11
PushConstant CP#12
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#20
PushConstant CP#21
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#31
PushConstant CP#32
- IndirectStaticCall 1, CP#1
+ IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#5
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 42
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = StaticICData target 'dart.core::print', arg-desc CP#1
- [3] = String 'foo'
- [4] = StaticICData target 'dart.core::print', arg-desc CP#1
- [5] = Null
- [6] = Int 1
- [7] = String 'A.elem2'
- [8] = Instance #lib::A type-args CP#5 {index: CP#6, _name: CP#7}
- [9] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [2] = String 'foo'
+ [3] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [4] = Null
+ [5] = Int 1
+ [6] = String 'A.elem2'
+ [7] = Instance #lib::A type-args CP#4 {index: CP#5, _name: CP#6}
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#0
+ [9] = Int 42
[10] = Type dart.core::int
- [11] = List type-arg dart.core::Object, entries CP# [0, 3, 10]
- [12] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [11] = List type-arg dart.core::Object, entries CP# [9, 2, 10]
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#0
[13] = TypeArgumentsForInstanceAllocation dart.core::_ImmutableMap [dart.core::String, #lib::A]
[14] = String 'E2'
[15] = String 'E4'
[16] = Int 3
[17] = String 'A.elem4'
- [18] = Instance #lib::A type-args CP#5 {index: CP#16, _name: CP#17}
- [19] = List type-arg dynamic, entries CP# [14, 8, 15, 18]
+ [18] = Instance #lib::A type-args CP#4 {index: CP#16, _name: CP#17}
+ [19] = List type-arg dynamic, entries CP# [14, 7, 15, 18]
[20] = Instance dart.core::_ImmutableMap type-args CP#13 {_kvPairs: CP#19}
- [21] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [21] = StaticICData target 'dart.core::print', arg-desc CP#0
[22] = Int 9
[23] = Int 30
- [24] = Instance #lib::C type-args CP#5 {j: CP#22, i: CP#23}
+ [24] = Instance #lib::C type-args CP#4 {j: CP#22, i: CP#23}
[25] = TypeArgumentsForInstanceAllocation dart.core::_ImmutableMap [dart.core::String, dart.core::Object]
[26] = String 'bar'
[27] = Int 6
- [28] = Instance #lib::B type-args CP#5 {i: CP#27}
- [29] = List type-arg dynamic, entries CP# [3, 0, 26, 28]
+ [28] = Instance #lib::B type-args CP#4 {i: CP#27}
+ [29] = List type-arg dynamic, entries CP# [2, 9, 26, 28]
[30] = Instance dart.core::_ImmutableMap type-args CP#25 {_kvPairs: CP#29}
- [31] = Instance #lib::D type-args CP#5 {x: CP#24, y: CP#30}
- [32] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [31] = Instance #lib::D type-args CP#4 {x: CP#24, y: CP#30}
+ [32] = StaticICData target 'dart.core::print', arg-desc CP#0
}
]static method test_constants2() → void {
core::print(42);
@@ -463,70 +454,65 @@
PushConstant CP#0
StoreLocal r0
Push r0
- PushConstant CP#1
+ PushInt 3
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#2
- PushConstant CP#3
+ PushInt 0
+ PushInt 1
StoreIndexedTOS
Push r0
- PushConstant CP#3
+ PushInt 1
Push FP[-5]
StoreIndexedTOS
Push r0
- PushConstant CP#4
- PushConstant CP#1
+ PushInt 2
+ PushInt 3
StoreIndexedTOS
+ PushConstant CP#2
+ IndirectStaticCall 2, CP#1
+ PushConstant CP#4
+ IndirectStaticCall 1, CP#3
+ Drop1
+ PushConstant CP#5
+ StoreLocal r0
+ Push r0
+ PushInt 3
+ CreateArrayTOS
+ StoreLocal r0
+ Push r0
+ PushInt 0
PushConstant CP#6
- IndirectStaticCall 2, CP#5
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
- Drop1
- PushConstant CP#9
- StoreLocal r0
- Push r0
- PushConstant CP#1
- CreateArrayTOS
- StoreLocal r0
- Push r0
- PushConstant CP#2
- PushConstant CP#10
StoreIndexedTOS
Push r0
- PushConstant CP#3
+ PushInt 1
Push FP[-5]
- InstanceCall 1, CP#11
+ InstanceCall 1, CP#7
StoreIndexedTOS
Push r0
- PushConstant CP#4
- PushConstant CP#12
+ PushInt 2
+ PushConstant CP#8
StoreIndexedTOS
- PushConstant CP#13
- IndirectStaticCall 2, CP#5
- PushConstant CP#14
- IndirectStaticCall 1, CP#7
+ PushConstant CP#9
+ IndirectStaticCall 2, CP#1
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#15
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::int]
- [1] = Int 3
- [2] = Int 0
- [3] = Int 1
- [4] = Int 2
- [5] = ArgDesc num-args 2, num-type-args 0, names []
- [6] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#5
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::print', arg-desc CP#7
- [9] = TypeArgs [dart.core::String]
- [10] = String 'a'
- [11] = ICData target-name 'toString', arg-desc CP#7
- [12] = String 'b'
- [13] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#5
- [14] = StaticICData target 'dart.core::print', arg-desc CP#7
- [15] = Null
+ [1] = ArgDesc num-args 2, num-type-args 0, names []
+ [2] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#1
+ [3] = ArgDesc num-args 1, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [5] = TypeArgs [dart.core::String]
+ [6] = String 'a'
+ [7] = ICData target-name 'toString', arg-desc CP#3
+ [8] = String 'b'
+ [9] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#1
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#3
}
]static method test_list_literal(core::int a) → void {
core::print(<core::int>[1, a, 3]);
@@ -539,114 +525,108 @@
CheckFunctionTypeArgs 1, 0
PushConstant CP#0
PushConstant CP#1
- PushConstant CP#2
+ PushInt 4
CreateArrayTOS
StoreLocal r1
Push r1
- PushConstant CP#3
- PushConstant CP#4
+ PushInt 0
+ PushInt 1
StoreIndexedTOS
Push r1
- PushConstant CP#4
+ PushInt 1
Push FP[-7]
StoreIndexedTOS
Push r1
- PushConstant CP#5
+ PushInt 2
Push FP[-6]
StoreIndexedTOS
Push r1
- PushConstant CP#6
- PushConstant CP#5
+ PushInt 3
+ PushInt 2
StoreIndexedTOS
- PushConstant CP#8
- IndirectStaticCall 2, CP#7
+ PushConstant CP#3
+ IndirectStaticCall 2, CP#2
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
+ Drop1
+ PushConstant CP#6
+ PushConstant CP#1
+ PushInt 4
+ CreateArrayTOS
+ StoreLocal r1
+ Push r1
+ PushInt 0
+ PushConstant CP#7
+ StoreIndexedTOS
+ Push r1
+ PushInt 1
+ Push FP[-7]
+ StoreIndexedTOS
+ Push r1
+ PushInt 2
+ Push FP[-6]
+ InstanceCall 1, CP#8
+ StoreIndexedTOS
+ Push r1
+ PushInt 3
+ PushInt 3
+ StoreIndexedTOS
+ PushConstant CP#9
+ IndirectStaticCall 2, CP#2
PushConstant CP#10
- IndirectStaticCall 1, CP#9
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#11
- PushConstant CP#1
- PushConstant CP#2
- CreateArrayTOS
- StoreLocal r1
- Push r1
- PushConstant CP#3
+ PushNull
+ Push r0
+ InstantiateTypeArgumentsTOS 0, CP#11
PushConstant CP#12
- StoreIndexedTOS
- Push r1
- PushConstant CP#4
- Push FP[-7]
- StoreIndexedTOS
- Push r1
- PushConstant CP#5
- Push FP[-6]
- InstanceCall 1, CP#13
- StoreIndexedTOS
- Push r1
- PushConstant CP#6
- PushConstant CP#6
- StoreIndexedTOS
+ PushConstant CP#13
+ IndirectStaticCall 2, CP#2
PushConstant CP#14
- IndirectStaticCall 2, CP#7
- PushConstant CP#15
- IndirectStaticCall 1, CP#9
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#16
+ PushNull
Push r0
- InstantiateTypeArgumentsTOS 0, CP#17
- PushConstant CP#18
- PushConstant CP#19
- IndirectStaticCall 2, CP#7
- PushConstant CP#20
- IndirectStaticCall 1, CP#9
- Drop1
- PushConstant CP#16
- Push r0
- InstantiateTypeArgumentsTOS 0, CP#21
+ InstantiateTypeArgumentsTOS 0, CP#15
PushConstant CP#1
- PushConstant CP#5
+ PushInt 2
CreateArrayTOS
StoreLocal r1
Push r1
- PushConstant CP#3
+ PushInt 0
Push FP[-5]
StoreIndexedTOS
Push r1
- PushConstant CP#4
- PushConstant CP#2
+ PushInt 1
+ PushInt 4
StoreIndexedTOS
- PushConstant CP#22
- IndirectStaticCall 2, CP#7
- PushConstant CP#23
- IndirectStaticCall 1, CP#9
- Drop1
PushConstant CP#16
+ IndirectStaticCall 2, CP#2
+ PushConstant CP#17
+ IndirectStaticCall 1, CP#4
+ Drop1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::int, dart.core::int]
[1] = TypeArgs [dynamic]
- [2] = Int 4
- [3] = Int 0
- [4] = Int 1
- [5] = Int 2
- [6] = Int 3
- [7] = ArgDesc num-args 2, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#7
- [9] = ArgDesc num-args 1, num-type-args 0, names []
- [10] = StaticICData target 'dart.core::print', arg-desc CP#9
- [11] = TypeArgs [dart.core::String, dart.core::int]
- [12] = String 'foo'
- [13] = ICData target-name 'toString', arg-desc CP#9
- [14] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#7
- [15] = StaticICData target 'dart.core::print', arg-desc CP#9
- [16] = Null
- [17] = TypeArgs [dart.core::String, #lib::test_map_literal::T]
- [18] = List type-arg dynamic, entries CP# []
- [19] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#7
- [20] = StaticICData target 'dart.core::print', arg-desc CP#9
- [21] = TypeArgs [#lib::test_map_literal::T, dart.core::int]
- [22] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#7
- [23] = StaticICData target 'dart.core::print', arg-desc CP#9
+ [2] = ArgDesc num-args 2, num-type-args 0, names []
+ [3] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#2
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = TypeArgs [dart.core::String, dart.core::int]
+ [7] = String 'foo'
+ [8] = ICData target-name 'toString', arg-desc CP#4
+ [9] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#2
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [11] = TypeArgs [dart.core::String, #lib::test_map_literal::T]
+ [12] = List type-arg dynamic, entries CP# []
+ [13] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#2
+ [14] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [15] = TypeArgs [#lib::test_map_literal::T, dart.core::int]
+ [16] = StaticICData target 'dart.core::Map::_fromLiteral', arg-desc CP#2
+ [17] = StaticICData target 'dart.core::print', arg-desc CP#4
}
]static method test_map_literal<T extends core::Object = dynamic>(core::int a, core::int b, self::test_map_literal::T c) → void {
core::print(<core::int, core::int>{1: a, b: 2});
@@ -666,7 +646,7 @@
PushConstant CP#4
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#5
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -675,7 +655,6 @@
[2] = StaticICData target 'dart.core::print', arg-desc CP#1
[3] = Symbol #lib::'_private_symbol'
[4] = StaticICData target 'dart.core::print', arg-desc CP#1
- [5] = Null
}
]static method test_symbol() → void {
core::print(#test_symbol);
@@ -690,13 +669,13 @@
PushConstant CP#2
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#4
+ PushNull
Push r0
InstantiateType CP#3
- PushConstant CP#5
+ PushConstant CP#4
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -704,8 +683,7 @@
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::print', arg-desc CP#1
[3] = Type #lib::test_type_literal::T
- [4] = Null
- [5] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [4] = StaticICData target 'dart.core::print', arg-desc CP#1
}
]static method test_type_literal<T extends core::Object = dynamic>() → void {
core::print(core::String);
@@ -717,13 +695,12 @@
CheckStack
PushConstant CP#1
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsForInstanceAllocation #lib::F [dart.core::int, dart.core::String]
[1] = Instance #lib::F type-args CP#0 {}
- [2] = Null
}
]static method testGenericConstInstance() → dynamic
return const self::F::•<core::int, core::String>();
@@ -733,12 +710,11 @@
CheckStack
PushConstant CP#0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = Type <X extends dart.core::Object = dynamic>(X) → X
- [1] = Null
}
]static method testGenericFunctionTypeLiteral() → dynamic
return <X extends core::Object = dynamic>(X) → X;
@@ -749,12 +725,11 @@
PushConstant CP#0
PushStatic CP#0
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = StaticField #lib::fieldWithDoubleLiteralInitializer
- [1] = Null
}
]static method testFieldWithDoubleLiteralInitializer() → dynamic
return self::fieldWithDoubleLiteralInitializer;
@@ -762,10 +737,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/loops.dart.expect b/pkg/vm/testcases/bytecode/loops.dart.expect
index 4112fe8..1a03e54 100644
--- a/pkg/vm/testcases/bytecode/loops.dart.expect
+++ b/pkg/vm/testcases/bytecode/loops.dart.expect
@@ -6,50 +6,46 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#0
+ PushInt 0
PopLocal r1
L2:
CheckStack
Push r1
Push FP[-5]
- InstanceCall 1, CP#2
- InstanceCall 2, CP#4
+ InstanceCall 1, CP#1
+ InstanceCall 2, CP#3
AssertBoolean 0
- PushConstant CP#5
+ PushTrue
IfNeStrictTOS
Jump L1
Push r0
Push FP[-5]
Push r1
- InstanceCall 2, CP#6
- InstanceCall 2, CP#7
+ InstanceCall 2, CP#4
+ InstanceCall 2, CP#5
PopLocal r0
Push r1
- PushConstant CP#8
- InstanceCall 2, CP#9
+ PushInt 1
+ InstanceCall 2, CP#6
StoreLocal r1
Drop1
Jump L2
L1:
Push r0
ReturnTOS
- PushConstant CP#10
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = ICData get target-name 'length', arg-desc CP#1
- [3] = ArgDesc num-args 2, num-type-args 0, names []
- [4] = ICData target-name '<', arg-desc CP#3
- [5] = Bool true
- [6] = ICData target-name '[]', arg-desc CP#3
- [7] = ICData target-name '+', arg-desc CP#3
- [8] = Int 1
- [9] = ICData target-name '+', arg-desc CP#3
- [10] = Null
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = ICData get target-name 'length', arg-desc CP#0
+ [2] = ArgDesc num-args 2, num-type-args 0, names []
+ [3] = ICData target-name '<', arg-desc CP#2
+ [4] = ICData target-name '[]', arg-desc CP#2
+ [5] = ICData target-name '+', arg-desc CP#2
+ [6] = ICData target-name '+', arg-desc CP#2
}
]static method test_for(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -62,25 +58,25 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#0
+ PushInt 0
PopLocal r1
L3:
CheckStack
Push r1
- PushConstant CP#0
- InstanceCall 2, CP#2
+ PushInt 0
+ InstanceCall 2, CP#1
AssertBoolean 0
- PushConstant CP#3
+ PushTrue
IfNeStrictTOS
Jump L1
Push r1
Push FP[-5]
- InstanceCall 1, CP#5
- InstanceCall 2, CP#6
+ InstanceCall 1, CP#3
+ InstanceCall 2, CP#4
AssertBoolean 0
- PushConstant CP#3
+ PushTrue
IfNeStrictTOS
Jump L2
Jump L1
@@ -88,34 +84,30 @@
Push r0
Push FP[-5]
Push r1
- InstanceCall 2, CP#7
- InstanceCall 2, CP#8
+ InstanceCall 2, CP#5
+ InstanceCall 2, CP#6
PopLocal r0
Push r1
- PushConstant CP#9
- InstanceCall 2, CP#10
+ PushInt 1
+ InstanceCall 2, CP#7
StoreLocal r1
Drop1
Jump L3
L1:
Push r0
ReturnTOS
- PushConstant CP#11
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = ArgDesc num-args 2, num-type-args 0, names []
- [2] = ICData target-name '>=', arg-desc CP#1
- [3] = Bool true
- [4] = ArgDesc num-args 1, num-type-args 0, names []
- [5] = ICData get target-name 'length', arg-desc CP#4
- [6] = ICData target-name '>=', arg-desc CP#1
- [7] = ICData target-name '[]', arg-desc CP#1
- [8] = ICData target-name '+', arg-desc CP#1
- [9] = Int 1
- [10] = ICData target-name '+', arg-desc CP#1
- [11] = Null
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '>=', arg-desc CP#0
+ [2] = ArgDesc num-args 1, num-type-args 0, names []
+ [3] = ICData get target-name 'length', arg-desc CP#2
+ [4] = ICData target-name '>=', arg-desc CP#0
+ [5] = ICData target-name '[]', arg-desc CP#0
+ [6] = ICData target-name '+', arg-desc CP#0
+ [7] = ICData target-name '+', arg-desc CP#0
}
]static method test_for_break(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -132,26 +124,26 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#1
- InstanceCall 1, CP#3
+ PushInt 100
+ InstanceCall 1, CP#1
PopLocal r1
L4:
CheckStack
Push r1
Push FP[-5]
- InstanceCall 1, CP#4
- InstanceCall 2, CP#6
+ InstanceCall 1, CP#2
+ InstanceCall 2, CP#4
AssertBoolean 0
- PushConstant CP#7
+ PushTrue
IfNeStrictTOS
Jump L1
Push r1
- PushConstant CP#0
- InstanceCall 2, CP#8
+ PushInt 0
+ InstanceCall 2, CP#5
AssertBoolean 0
- PushConstant CP#7
+ PushTrue
IfNeStrictTOS
Jump L2
Jump L3
@@ -159,37 +151,32 @@
Push r0
Push FP[-5]
Push r1
- InstanceCall 2, CP#9
- InstanceCall 2, CP#10
+ InstanceCall 2, CP#6
+ InstanceCall 2, CP#7
PopLocal r0
L3:
Push r1
- PushConstant CP#11
- InstanceCall 2, CP#12
+ PushInt 1
+ InstanceCall 2, CP#8
StoreLocal r1
Drop1
Jump L4
L1:
Push r0
ReturnTOS
- PushConstant CP#13
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = Int 100
- [2] = ArgDesc num-args 1, num-type-args 0, names []
- [3] = ICData target-name 'unary-', arg-desc CP#2
- [4] = ICData get target-name 'length', arg-desc CP#2
- [5] = ArgDesc num-args 2, num-type-args 0, names []
- [6] = ICData target-name '<', arg-desc CP#5
- [7] = Bool true
- [8] = ICData target-name '<', arg-desc CP#5
- [9] = ICData target-name '[]', arg-desc CP#5
- [10] = ICData target-name '+', arg-desc CP#5
- [11] = Int 1
- [12] = ICData target-name '+', arg-desc CP#5
- [13] = Null
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = ICData target-name 'unary-', arg-desc CP#0
+ [2] = ICData get target-name 'length', arg-desc CP#0
+ [3] = ArgDesc num-args 2, num-type-args 0, names []
+ [4] = ICData target-name '<', arg-desc CP#3
+ [5] = ICData target-name '<', arg-desc CP#3
+ [6] = ICData target-name '[]', arg-desc CP#3
+ [7] = ICData target-name '+', arg-desc CP#3
+ [8] = ICData target-name '+', arg-desc CP#3
}
]static method test_for_continue(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -207,18 +194,18 @@
Bytecode {
Entry 4
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#0
+ PushInt 0
PopLocal r1
L2:
CheckStack
Push r1
Push FP[-5]
- InstanceCall 1, CP#2
- InstanceCall 2, CP#4
+ InstanceCall 1, CP#1
+ InstanceCall 2, CP#3
AssertBoolean 0
- PushConstant CP#5
+ PushTrue
IfNeStrictTOS
Jump L1
Push r0
@@ -226,33 +213,29 @@
Push r1
PopLocal r2
Push r2
- PushConstant CP#6
- InstanceCall 2, CP#7
+ PushInt 1
+ InstanceCall 2, CP#4
StoreLocal r1
PopLocal r3
Push r2
- InstanceCall 2, CP#8
- InstanceCall 2, CP#9
+ InstanceCall 2, CP#5
+ InstanceCall 2, CP#6
PopLocal r0
Jump L2
L1:
Push r0
ReturnTOS
- PushConstant CP#10
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = ICData get target-name 'length', arg-desc CP#1
- [3] = ArgDesc num-args 2, num-type-args 0, names []
- [4] = ICData target-name '<', arg-desc CP#3
- [5] = Bool true
- [6] = Int 1
- [7] = ICData target-name '+', arg-desc CP#3
- [8] = ICData target-name '[]', arg-desc CP#3
- [9] = ICData target-name '+', arg-desc CP#3
- [10] = Null
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = ICData get target-name 'length', arg-desc CP#0
+ [2] = ArgDesc num-args 2, num-type-args 0, names []
+ [3] = ICData target-name '<', arg-desc CP#2
+ [4] = ICData target-name '+', arg-desc CP#2
+ [5] = ICData target-name '[]', arg-desc CP#2
+ [6] = ICData target-name '+', arg-desc CP#2
}
]static method test_while(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -266,47 +249,43 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#0
+ PushInt 0
PopLocal r1
L1:
CheckStack
Push r0
Push FP[-5]
Push r1
+ InstanceCall 2, CP#1
InstanceCall 2, CP#2
- InstanceCall 2, CP#3
PopLocal r0
Push r1
- PushConstant CP#4
- InstanceCall 2, CP#5
+ PushInt 1
+ InstanceCall 2, CP#3
PopLocal r1
Push r1
Push FP[-5]
- InstanceCall 1, CP#7
- InstanceCall 2, CP#8
+ InstanceCall 1, CP#5
+ InstanceCall 2, CP#6
AssertBoolean 0
- PushConstant CP#9
+ PushTrue
IfEqStrictTOS
Jump L1
Push r0
ReturnTOS
- PushConstant CP#10
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = ArgDesc num-args 2, num-type-args 0, names []
- [2] = ICData target-name '[]', arg-desc CP#1
- [3] = ICData target-name '+', arg-desc CP#1
- [4] = Int 1
- [5] = ICData target-name '+', arg-desc CP#1
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = ICData get target-name 'length', arg-desc CP#6
- [8] = ICData target-name '<', arg-desc CP#1
- [9] = Bool true
- [10] = Null
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '[]', arg-desc CP#0
+ [2] = ICData target-name '+', arg-desc CP#0
+ [3] = ICData target-name '+', arg-desc CP#0
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = ICData get target-name 'length', arg-desc CP#4
+ [6] = ICData target-name '<', arg-desc CP#0
}
]static method test_do_while(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -322,42 +301,39 @@
Bytecode {
Entry 3
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
Push FP[-5]
- InstanceCall 1, CP#2
+ InstanceCall 1, CP#1
PopLocal r1
L2:
CheckStack
Push r1
- InstanceCall 1, CP#3
- PushConstant CP#4
+ InstanceCall 1, CP#2
+ PushTrue
IfNeStrictTOS
Jump L1
Push r1
- InstanceCall 1, CP#5
+ InstanceCall 1, CP#3
PopLocal r2
Push r0
Push r2
- InstanceCall 2, CP#7
+ InstanceCall 2, CP#5
PopLocal r0
Jump L2
L1:
Push r0
ReturnTOS
- PushConstant CP#8
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = ArgDesc num-args 1, num-type-args 0, names []
- [2] = ICData get target-name 'iterator', arg-desc CP#1
- [3] = ICData target-name 'moveNext', arg-desc CP#1
- [4] = Bool true
- [5] = ICData get target-name 'current', arg-desc CP#1
- [6] = ArgDesc num-args 2, num-type-args 0, names []
- [7] = ICData target-name '+', arg-desc CP#6
- [8] = Null
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = ICData get target-name 'iterator', arg-desc CP#0
+ [2] = ICData target-name 'moveNext', arg-desc CP#0
+ [3] = ICData get target-name 'current', arg-desc CP#0
+ [4] = ArgDesc num-args 2, num-type-args 0, names []
+ [5] = ICData target-name '+', arg-desc CP#4
}
]static method test_for_in(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -370,47 +346,43 @@
Bytecode {
Entry 4
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
- PushConstant CP#1
+ PushInt 42
PopLocal r1
Push FP[-5]
- InstanceCall 1, CP#3
+ InstanceCall 1, CP#1
PopLocal r2
L2:
CheckStack
Push r2
- InstanceCall 1, CP#4
- PushConstant CP#5
+ InstanceCall 1, CP#2
+ PushTrue
IfNeStrictTOS
Jump L1
Push r2
- InstanceCall 1, CP#6
+ InstanceCall 1, CP#3
PopLocal r3
Push r3
PopLocal r1
Push r0
Push r1
- InstanceCall 2, CP#8
+ InstanceCall 2, CP#5
PopLocal r0
Jump L2
L1:
Push r0
ReturnTOS
- PushConstant CP#9
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 0
- [1] = Int 42
- [2] = ArgDesc num-args 1, num-type-args 0, names []
- [3] = ICData get target-name 'iterator', arg-desc CP#2
- [4] = ICData target-name 'moveNext', arg-desc CP#2
- [5] = Bool true
- [6] = ICData get target-name 'current', arg-desc CP#2
- [7] = ArgDesc num-args 2, num-type-args 0, names []
- [8] = ICData target-name '+', arg-desc CP#7
- [9] = Null
+ [0] = ArgDesc num-args 1, num-type-args 0, names []
+ [1] = ICData get target-name 'iterator', arg-desc CP#0
+ [2] = ICData target-name 'moveNext', arg-desc CP#0
+ [3] = ICData get target-name 'current', arg-desc CP#0
+ [4] = ArgDesc num-args 2, num-type-args 0, names []
+ [5] = ICData target-name '+', arg-desc CP#4
}
]static method test_for_in_with_outer_var(core::List<core::int> list) → core::int {
core::int sum = 0;
@@ -425,10 +397,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/optional_params.dart.expect b/pkg/vm/testcases/bytecode/optional_params.dart.expect
index 306a642..265c758 100644
--- a/pkg/vm/testcases/bytecode/optional_params.dart.expect
+++ b/pkg/vm/testcases/bytecode/optional_params.dart.expect
@@ -9,77 +9,73 @@
LoadConstant r2, CP#1
Frame 1
CheckStack
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#4
- PushConstant CP#5
+ PushInt 0
+ PushConstant CP#2
StoreIndexedTOS
Push r3
- PushConstant CP#6
+ PushInt 1
Push r0
StoreIndexedTOS
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
- PushConstant CP#9
- IndirectStaticCall 1, CP#7
+ PushConstant CP#4
+ IndirectStaticCall 1, CP#3
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#4
- PushConstant CP#10
+ PushInt 0
+ PushConstant CP#6
StoreIndexedTOS
Push r3
- PushConstant CP#6
+ PushInt 1
Push r1
StoreIndexedTOS
- PushConstant CP#11
- IndirectStaticCall 1, CP#7
- PushConstant CP#12
- IndirectStaticCall 1, CP#7
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#3
+ PushConstant CP#8
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#2
- PushConstant CP#3
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#4
- PushConstant CP#13
+ PushInt 0
+ PushConstant CP#9
StoreIndexedTOS
Push r3
- PushConstant CP#6
+ PushInt 1
Push r2
StoreIndexedTOS
- PushConstant CP#14
- IndirectStaticCall 1, CP#7
- PushConstant CP#15
- IndirectStaticCall 1, CP#7
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#3
+ PushConstant CP#11
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'default_a'
[1] = String 'default_b'
- [2] = Null
- [3] = Int 2
- [4] = Int 0
- [5] = String 'x = '
- [6] = Int 1
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#7
- [9] = StaticICData target 'dart.core::print', arg-desc CP#7
- [10] = String 'a = '
- [11] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#7
- [12] = StaticICData target 'dart.core::print', arg-desc CP#7
- [13] = String 'b = '
- [14] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#7
- [15] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [2] = String 'x = '
+ [3] = ArgDesc num-args 1, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#3
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [6] = String 'a = '
+ [7] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#3
+ [8] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [9] = String 'b = '
+ [10] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#3
+ [11] = StaticICData target 'dart.core::print', arg-desc CP#3
}
]static method foo1(dynamic x, [dynamic a = "default_a", dynamic b = "default_b"]) → void {
core::print("x = ${x}");
@@ -97,92 +93,92 @@
LoadConstant r4, CP#6
Frame 1
CheckStack
- PushConstant CP#7
- PushConstant CP#8
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#9
- PushConstant CP#10
+ PushInt 0
+ PushConstant CP#7
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushInt 1
Push r0
StoreIndexedTOS
- PushConstant CP#13
- IndirectStaticCall 1, CP#12
- PushConstant CP#14
- IndirectStaticCall 1, CP#12
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#8
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
- PushConstant CP#8
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#9
- PushConstant CP#15
+ PushInt 0
+ PushConstant CP#11
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushInt 1
Push r1
StoreIndexedTOS
- PushConstant CP#16
- IndirectStaticCall 1, CP#12
- PushConstant CP#17
- IndirectStaticCall 1, CP#12
+ PushConstant CP#12
+ IndirectStaticCall 1, CP#8
+ PushConstant CP#13
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
- PushConstant CP#8
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#9
- PushConstant CP#18
+ PushInt 0
+ PushConstant CP#14
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushInt 1
Push r2
StoreIndexedTOS
- PushConstant CP#19
- IndirectStaticCall 1, CP#12
- PushConstant CP#20
- IndirectStaticCall 1, CP#12
+ PushConstant CP#15
+ IndirectStaticCall 1, CP#8
+ PushConstant CP#16
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
- PushConstant CP#8
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#9
- PushConstant CP#21
+ PushInt 0
+ PushConstant CP#17
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushInt 1
Push r3
StoreIndexedTOS
- PushConstant CP#22
- IndirectStaticCall 1, CP#12
- PushConstant CP#23
- IndirectStaticCall 1, CP#12
+ PushConstant CP#18
+ IndirectStaticCall 1, CP#8
+ PushConstant CP#19
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
- PushConstant CP#8
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#9
- PushConstant CP#24
+ PushInt 0
+ PushConstant CP#20
StoreIndexedTOS
Push r5
- PushConstant CP#11
+ PushInt 1
Push r4
StoreIndexedTOS
- PushConstant CP#25
- IndirectStaticCall 1, CP#12
- PushConstant CP#26
- IndirectStaticCall 1, CP#12
+ PushConstant CP#21
+ IndirectStaticCall 1, CP#8
+ PushConstant CP#22
+ IndirectStaticCall 1, CP#8
Drop1
- PushConstant CP#7
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -193,26 +189,22 @@
[4] = List type-arg dart.core::String, entries CP# [3]
[5] = String 'c'
[6] = String 'default_c'
- [7] = Null
- [8] = Int 2
- [9] = Int 0
- [10] = String 'y = '
- [11] = Int 1
- [12] = ArgDesc num-args 1, num-type-args 0, names []
- [13] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
- [14] = StaticICData target 'dart.core::print', arg-desc CP#12
- [15] = String 'z = '
- [16] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
- [17] = StaticICData target 'dart.core::print', arg-desc CP#12
- [18] = String 'a = '
- [19] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
- [20] = StaticICData target 'dart.core::print', arg-desc CP#12
- [21] = String 'b = '
- [22] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
- [23] = StaticICData target 'dart.core::print', arg-desc CP#12
- [24] = String 'c = '
- [25] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
- [26] = StaticICData target 'dart.core::print', arg-desc CP#12
+ [7] = String 'y = '
+ [8] = ArgDesc num-args 1, num-type-args 0, names []
+ [9] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#8
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#8
+ [11] = String 'z = '
+ [12] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#8
+ [13] = StaticICData target 'dart.core::print', arg-desc CP#8
+ [14] = String 'a = '
+ [15] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#8
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#8
+ [17] = String 'b = '
+ [18] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#8
+ [19] = StaticICData target 'dart.core::print', arg-desc CP#8
+ [20] = String 'c = '
+ [21] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#8
+ [22] = StaticICData target 'dart.core::print', arg-desc CP#8
}
]static method foo2(dynamic y, dynamic z, {dynamic c = "default_c", dynamic a = 42, dynamic b = const <core::String>["default_b"]}) → void {
core::print("y = ${y}");
@@ -231,7 +223,7 @@
Frame 1
CheckStack
CheckFunctionTypeArgs 2, 4
- PushConstant CP#3
+ PushNull
Push r4
InstantiateType CP#4
PushConstant CP#6
@@ -245,7 +237,7 @@
PushConstant CP#8
IndirectStaticCall 1, CP#5
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -279,7 +271,7 @@
PushConstant CP#7
IndirectStaticCall 3, CP#6
Drop1
- PushConstant CP#8
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -291,7 +283,6 @@
[5] = String 'fixed_z'
[6] = ArgDesc num-args 3, num-type-args 0, names [a]
[7] = StaticICData target '#lib::foo2', arg-desc CP#6
- [8] = Null
}
]static method main() → dynamic {
self::foo1("fixed_x", "concrete_a");
diff --git a/pkg/vm/testcases/bytecode/super_calls.dart.expect b/pkg/vm/testcases/bytecode/super_calls.dart.expect
index a415164..c234538 100644
--- a/pkg/vm/testcases/bytecode/super_calls.dart.expect
+++ b/pkg/vm/testcases/bytecode/super_calls.dart.expect
@@ -11,13 +11,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -27,25 +26,22 @@
Entry 1
CheckStack
CheckFunctionTypeArgs 1, 0
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
] method foo<T extends core::Object = dynamic>(self::Base1::foo::T a1, core::int a2) → void {}
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushInt 42
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 42
- [1] = Null
}
] get bar() → dynamic
return 42;
@@ -53,11 +49,10 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
] set bazz(core::int x) → void {}
}
@@ -70,13 +65,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base1::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::Base1::•()
@@ -88,20 +82,18 @@
PushConstant CP#0
Push FP[-6]
PushConstant CP#1
- PushConstant CP#2
- PushConstant CP#4
- IndirectStaticCall 4, CP#3
+ PushInt 2
+ PushConstant CP#3
+ IndirectStaticCall 4, CP#2
ReturnTOS
- PushConstant CP#5
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::String]
[1] = String 'a1'
- [2] = Int 2
- [3] = ArgDesc num-args 3, num-type-args 1, names []
- [4] = StaticICData target '#lib::Base1::foo', arg-desc CP#3
- [5] = Null
+ [2] = ArgDesc num-args 3, num-type-args 1, names []
+ [3] = StaticICData target '#lib::Base1::foo', arg-desc CP#2
}
] method testSuperCall(core::int x) → dynamic
return super.{self::Base1::foo}<core::String>("a1", 2);
@@ -113,13 +105,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData get target '#lib::Base1::foo', arg-desc CP#0
- [2] = Null
}
] method testSuperTearOff() → dynamic
return super.{self::Base1::foo};
@@ -131,13 +122,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
ReturnTOS
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData get target '#lib::Base1::bar', arg-desc CP#0
- [2] = Null
}
] method testSuperGet() → dynamic
return super.{self::Base1::bar};
@@ -152,7 +142,7 @@
PushConstant CP#3
InstanceCall 3, CP#5
ReturnTOS
- PushConstant CP#6
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -162,7 +152,6 @@
[3] = String 'param'
[4] = ArgDesc num-args 2, num-type-args 1, names []
[5] = ICData dynamic target-name 'call', arg-desc CP#4
- [6] = Null
}
] method testSuperCallViaGetter() → dynamic
return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base1::bar}.call<core::int>("param");
@@ -171,18 +160,16 @@
Entry 1
CheckStack
Push FP[-5]
- PushConstant CP#0
- PushConstant CP#2
- IndirectStaticCall 2, CP#1
+ PushInt 3
+ PushConstant CP#1
+ IndirectStaticCall 2, CP#0
Drop1
- PushConstant CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Int 3
- [1] = ArgDesc num-args 2, num-type-args 0, names []
- [2] = StaticICData set target '#lib::Base1::bazz', arg-desc CP#1
- [3] = Null
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = StaticICData set target '#lib::Base1::bazz', arg-desc CP#0
}
] method testSuperSet() → dynamic {
super.{self::Base1::bazz} = 3;
@@ -197,13 +184,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -221,13 +207,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base2::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::Base2::•()
@@ -240,57 +225,49 @@
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
+ PushInt 5
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
- PushConstant CP#5
+ PushInt 0
+ PushConstant CP#3
StoreIndexedTOS
Push r0
- PushConstant CP#6
+ PushInt 1
Push FP[-6]
StoreIndexedTOS
Push r0
+ PushInt 2
+ PushConstant CP#4
+ StoreIndexedTOS
+ Push r0
+ PushInt 3
+ PushConstant CP#5
+ StoreIndexedTOS
+ Push r0
+ PushInt 4
+ PushInt 5
+ StoreIndexedTOS
+ PushTrue
PushConstant CP#7
- PushConstant CP#8
- StoreIndexedTOS
- Push r0
+ IndirectStaticCall 4, CP#6
PushConstant CP#9
- PushConstant CP#10
- StoreIndexedTOS
- Push r0
- PushConstant CP#11
- PushConstant CP#3
- StoreIndexedTOS
- PushConstant CP#12
- PushConstant CP#14
- IndirectStaticCall 4, CP#13
- PushConstant CP#16
- IndirectStaticCall 2, CP#15
+ IndirectStaticCall 2, CP#8
ReturnTOS
- PushConstant CP#17
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'foo'
[1] = ArgDesc num-args 4, num-type-args 1, names []
[2] = TypeArgs [dynamic]
- [3] = Int 5
- [4] = Int 0
- [5] = TypeArgs [dart.core::double]
- [6] = Int 1
- [7] = Int 2
- [8] = String 'a1'
- [9] = Int 3
- [10] = Double 3.14
- [11] = Int 4
- [12] = Bool true
- [13] = ArgDesc num-args 4, num-type-args 0, names []
- [14] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#13
- [15] = ArgDesc num-args 2, num-type-args 0, names []
- [16] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#15
- [17] = Null
+ [3] = TypeArgs [dart.core::double]
+ [4] = String 'a1'
+ [5] = Double 3.14
+ [6] = ArgDesc num-args 4, num-type-args 0, names []
+ [7] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#6
+ [8] = ArgDesc num-args 2, num-type-args 0, names []
+ [9] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#8
}
] method testSuperCall(core::int x) → dynamic
return super.{self::Base2::foo}<core::double>("a1", 3.14, 5);
@@ -302,34 +279,30 @@
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
+ PushInt 1
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
+ PushInt 0
Push FP[-5]
StoreIndexedTOS
- PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 4, CP#6
- PushConstant CP#9
- IndirectStaticCall 2, CP#8
+ PushTrue
+ PushConstant CP#4
+ IndirectStaticCall 4, CP#3
+ PushConstant CP#6
+ IndirectStaticCall 2, CP#5
ReturnTOS
- PushConstant CP#10
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'foo'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = TypeArgs [dynamic]
- [3] = Int 1
- [4] = Int 0
- [5] = Bool true
- [6] = ArgDesc num-args 4, num-type-args 0, names []
- [7] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#6
- [8] = ArgDesc num-args 2, num-type-args 0, names []
- [9] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#8
- [10] = Null
+ [3] = ArgDesc num-args 4, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#3
+ [5] = ArgDesc num-args 2, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#5
}
] method testSuperTearOff() → dynamic
return super.{self::Base2::foo};
@@ -341,34 +314,30 @@
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
+ PushInt 1
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
+ PushInt 0
Push FP[-5]
StoreIndexedTOS
- PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 4, CP#6
- PushConstant CP#9
- IndirectStaticCall 2, CP#8
+ PushTrue
+ PushConstant CP#4
+ IndirectStaticCall 4, CP#3
+ PushConstant CP#6
+ IndirectStaticCall 2, CP#5
ReturnTOS
- PushConstant CP#10
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'bar'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = TypeArgs [dynamic]
- [3] = Int 1
- [4] = Int 0
- [5] = Bool true
- [6] = ArgDesc num-args 4, num-type-args 0, names []
- [7] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#6
- [8] = ArgDesc num-args 2, num-type-args 0, names []
- [9] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#8
- [10] = Null
+ [3] = ArgDesc num-args 4, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#3
+ [5] = ArgDesc num-args 2, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#5
}
] method testSuperGet() → dynamic
return super.{self::Base2::bar};
@@ -381,22 +350,22 @@
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
- PushConstant CP#4
+ PushInt 1
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#5
+ PushInt 0
Push FP[-5]
StoreIndexedTOS
- PushConstant CP#6
+ PushTrue
+ PushConstant CP#5
+ IndirectStaticCall 4, CP#4
+ PushConstant CP#7
+ IndirectStaticCall 2, CP#6
PushConstant CP#8
- IndirectStaticCall 4, CP#7
- PushConstant CP#10
- IndirectStaticCall 2, CP#9
- PushConstant CP#11
- InstanceCall 3, CP#13
+ InstanceCall 3, CP#10
ReturnTOS
- PushConstant CP#14
+ PushNull
ReturnTOS
}
ConstantPool {
@@ -404,17 +373,13 @@
[1] = String 'bar'
[2] = ArgDesc num-args 1, num-type-args 0, names []
[3] = TypeArgs [dynamic]
- [4] = Int 1
- [5] = Int 0
- [6] = Bool true
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#7
- [9] = ArgDesc num-args 2, num-type-args 0, names []
- [10] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#9
- [11] = String 'param'
- [12] = ArgDesc num-args 2, num-type-args 1, names []
- [13] = ICData dynamic target-name 'call', arg-desc CP#12
- [14] = Null
+ [4] = ArgDesc num-args 4, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#4
+ [6] = ArgDesc num-args 2, num-type-args 0, names []
+ [7] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#6
+ [8] = String 'param'
+ [9] = ArgDesc num-args 2, num-type-args 1, names []
+ [10] = ICData dynamic target-name 'call', arg-desc CP#9
}
] method testSuperCallViaGetter() → dynamic
return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base2::bar}.call<core::int>("param");
@@ -426,39 +391,33 @@
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
+ PushInt 2
CreateArrayTOS
StoreLocal r0
Push r0
- PushConstant CP#4
+ PushInt 0
Push FP[-5]
StoreIndexedTOS
Push r0
- PushConstant CP#5
- PushConstant CP#6
+ PushInt 1
+ PushInt 3
StoreIndexedTOS
- PushConstant CP#7
- PushConstant CP#9
- IndirectStaticCall 4, CP#8
- PushConstant CP#10
+ PushTrue
+ PushConstant CP#4
+ IndirectStaticCall 4, CP#3
+ PushConstant CP#5
IndirectStaticCall 2, CP#1
Drop1
- PushConstant CP#11
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = String 'bazz'
[1] = ArgDesc num-args 2, num-type-args 0, names []
[2] = TypeArgs [dynamic]
- [3] = Int 2
- [4] = Int 0
- [5] = Int 1
- [6] = Int 3
- [7] = Bool true
- [8] = ArgDesc num-args 4, num-type-args 0, names []
- [9] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#8
- [10] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#1
- [11] = Null
+ [3] = ArgDesc num-args 4, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#3
+ [5] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#1
}
] method testSuperSet() → dynamic {
super.{self::Base2::bazz} = 3;
@@ -468,10 +427,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/switch.dart.expect b/pkg/vm/testcases/bytecode/switch.dart.expect
index ed998c2..bf66bbf 100644
--- a/pkg/vm/testcases/bytecode/switch.dart.expect
+++ b/pkg/vm/testcases/bytecode/switch.dart.expect
@@ -6,60 +6,52 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushNull
PopLocal r0
Push FP[-5]
PopLocal r1
Push r1
- PushConstant CP#2
- InstanceCall 2, CP#3
- PushConstant CP#4
+ PushInt 1
+ InstanceCall 2, CP#1
+ PushTrue
IfEqStrictTOS
Jump L1
Push r1
- PushConstant CP#5
- InstanceCall 2, CP#6
- PushConstant CP#4
+ PushInt 2
+ InstanceCall 2, CP#2
+ PushTrue
IfEqStrictTOS
Jump L2
Push r1
- PushConstant CP#7
- InstanceCall 2, CP#8
- PushConstant CP#4
+ PushInt 3
+ InstanceCall 2, CP#3
+ PushTrue
IfEqStrictTOS
Jump L3
Jump L4
L1:
- PushConstant CP#9
+ PushInt 11
PopLocal r0
Jump L4
L2:
- PushConstant CP#10
+ PushInt 22
PopLocal r0
Jump L4
L3:
- PushConstant CP#11
+ PushInt 33
PopLocal r0
Jump L4
L4:
Push r0
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [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] = Int 3
- [8] = ICData target-name '==', arg-desc CP#1
- [9] = Int 11
- [10] = Int 22
- [11] = Int 33
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '==', arg-desc CP#0
+ [2] = ICData target-name '==', arg-desc CP#0
+ [3] = ICData target-name '==', arg-desc CP#0
}
]static method foo1(core::int x) → core::int {
core::int y;
@@ -90,83 +82,72 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushNull
PopLocal r0
Push FP[-5]
PopLocal r1
Push r1
- PushConstant CP#2
+ PushInt 1
+ InstanceCall 2, CP#1
+ PushTrue
+ IfEqStrictTOS
+ Jump L1
+ Push r1
+ PushInt 2
+ InstanceCall 2, CP#2
+ PushTrue
+ IfEqStrictTOS
+ Jump L1
+ Push r1
+ PushInt 3
InstanceCall 2, CP#3
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L1
Push r1
- PushConstant CP#5
+ PushInt 4
+ InstanceCall 2, CP#4
+ PushTrue
+ IfEqStrictTOS
+ Jump L2
+ Push r1
+ PushInt 5
+ InstanceCall 2, CP#5
+ PushTrue
+ IfEqStrictTOS
+ Jump L2
+ Push r1
+ PushInt 6
InstanceCall 2, CP#6
- PushConstant CP#4
- IfEqStrictTOS
- Jump L1
- Push r1
- PushConstant CP#7
- InstanceCall 2, CP#8
- PushConstant CP#4
- IfEqStrictTOS
- Jump L1
- Push r1
- PushConstant CP#9
- InstanceCall 2, CP#10
- PushConstant CP#4
- IfEqStrictTOS
- Jump L2
- Push r1
- PushConstant CP#11
- InstanceCall 2, CP#12
- PushConstant CP#4
- IfEqStrictTOS
- Jump L2
- Push r1
- PushConstant CP#13
- InstanceCall 2, CP#14
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L2
Jump L3
L1:
- PushConstant CP#15
+ PushInt 11
PopLocal r0
Jump L4
L2:
- PushConstant CP#16
+ PushInt 22
PopLocal r0
Jump L4
L3:
- PushConstant CP#17
+ PushInt 33
PopLocal r0
L4:
Push r0
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [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] = Int 3
- [8] = ICData target-name '==', arg-desc CP#1
- [9] = Int 4
- [10] = ICData target-name '==', arg-desc CP#1
- [11] = Int 5
- [12] = ICData target-name '==', arg-desc CP#1
- [13] = Int 6
- [14] = ICData target-name '==', arg-desc CP#1
- [15] = Int 11
- [16] = Int 22
- [17] = Int 33
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '==', arg-desc CP#0
+ [2] = ICData target-name '==', arg-desc CP#0
+ [3] = ICData target-name '==', arg-desc CP#0
+ [4] = ICData target-name '==', arg-desc CP#0
+ [5] = ICData target-name '==', arg-desc CP#0
+ [6] = ICData target-name '==', arg-desc CP#0
}
]static method foo2(core::int x) → core::int {
core::int y;
@@ -200,84 +181,72 @@
Bytecode {
Entry 2
CheckStack
- PushConstant CP#0
+ PushNull
PopLocal r0
Push FP[-5]
PopLocal r1
Push r1
- PushConstant CP#2
+ PushInt 1
+ InstanceCall 2, CP#1
+ PushTrue
+ IfEqStrictTOS
+ Jump L1
+ Push r1
+ PushInt 2
+ InstanceCall 2, CP#2
+ PushTrue
+ IfEqStrictTOS
+ Jump L1
+ Push r1
+ PushInt 3
InstanceCall 2, CP#3
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L1
Push r1
- PushConstant CP#5
+ PushInt 4
+ InstanceCall 2, CP#4
+ PushTrue
+ IfEqStrictTOS
+ Jump L2
+ Push r1
+ PushInt 5
+ InstanceCall 2, CP#5
+ PushTrue
+ IfEqStrictTOS
+ Jump L2
+ Push r1
+ PushInt 6
InstanceCall 2, CP#6
- PushConstant CP#4
- IfEqStrictTOS
- Jump L1
- Push r1
- PushConstant CP#7
- InstanceCall 2, CP#8
- PushConstant CP#4
- IfEqStrictTOS
- Jump L1
- Push r1
- PushConstant CP#9
- InstanceCall 2, CP#10
- PushConstant CP#4
- IfEqStrictTOS
- Jump L2
- Push r1
- PushConstant CP#11
- InstanceCall 2, CP#12
- PushConstant CP#4
- IfEqStrictTOS
- Jump L2
- Push r1
- PushConstant CP#13
- InstanceCall 2, CP#14
- PushConstant CP#4
+ PushTrue
IfEqStrictTOS
Jump L2
Jump L3
L1:
- PushConstant CP#15
+ PushInt 11
PopLocal r0
Jump L2
L2:
- PushConstant CP#16
+ PushInt 22
PopLocal r0
- PushConstant CP#17
+ PushInt 42
ReturnTOS
L3:
- PushConstant CP#18
+ PushInt 33
PopLocal r0
Push r0
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [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] = Int 3
- [8] = ICData target-name '==', arg-desc CP#1
- [9] = Int 4
- [10] = ICData target-name '==', arg-desc CP#1
- [11] = Int 5
- [12] = ICData target-name '==', arg-desc CP#1
- [13] = Int 6
- [14] = ICData target-name '==', arg-desc CP#1
- [15] = Int 11
- [16] = Int 22
- [17] = Int 42
- [18] = Int 33
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '==', arg-desc CP#0
+ [2] = ICData target-name '==', arg-desc CP#0
+ [3] = ICData target-name '==', arg-desc CP#0
+ [4] = ICData target-name '==', arg-desc CP#0
+ [5] = ICData target-name '==', arg-desc CP#0
+ [6] = ICData target-name '==', arg-desc CP#0
}
]static method foo3(core::int x) → core::int {
core::int y;
@@ -310,10 +279,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index d297c11..2158d27 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -19,26 +19,26 @@
MoveSpecial r1, stackTrace
Push r0
PopLocal r2
- PushConstant CP#4
- PushConstant CP#5
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#6
- PushConstant CP#7
+ PushInt 0
+ PushConstant CP#4
StoreIndexedTOS
Push r3
- PushConstant CP#8
+ PushInt 1
Push r2
StoreIndexedTOS
- PushConstant CP#9
+ PushConstant CP#5
IndirectStaticCall 1, CP#1
- PushConstant CP#10
+ PushConstant CP#6
IndirectStaticCall 1, CP#1
Drop1
Jump L1
L1:
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ExceptionsTable {
@@ -49,13 +49,9 @@
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::print', arg-desc CP#1
[3] = Type dynamic
- [4] = Null
- [5] = Int 2
- [6] = Int 0
- [7] = String 'caught '
- [8] = Int 1
- [9] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
- [10] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [4] = String 'caught '
+ [5] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#1
}
]static method testTryCatch1() → dynamic {
try {
@@ -81,83 +77,83 @@
MoveSpecial r0, exception
MoveSpecial r1, stackTrace
Push r0
- PushConstant CP#4
- PushConstant CP#4
+ PushNull
+ PushNull
PushConstant CP#3
- InstanceCall 4, CP#6
- PushConstant CP#7
+ InstanceCall 4, CP#5
+ PushTrue
IfNeStrictTOS
Jump L2
- PushConstant CP#8
- PushConstant CP#9
+ PushConstant CP#6
+ PushConstant CP#7
IndirectStaticCall 1, CP#1
Drop1
Jump L1
L2:
Push r0
- PushConstant CP#4
- PushConstant CP#4
- PushConstant CP#10
- InstanceCall 4, CP#11
- PushConstant CP#7
+ PushNull
+ PushNull
+ PushConstant CP#8
+ InstanceCall 4, CP#9
+ PushTrue
IfNeStrictTOS
Jump L3
Push r0
PopLocal r2
- PushConstant CP#4
- PushConstant CP#12
+ PushNull
+ PushInt 2
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#13
- PushConstant CP#14
+ PushInt 0
+ PushConstant CP#10
StoreIndexedTOS
Push r3
- PushConstant CP#15
+ PushInt 1
Push r2
StoreIndexedTOS
- PushConstant CP#16
+ PushConstant CP#11
IndirectStaticCall 1, CP#1
- PushConstant CP#17
+ PushConstant CP#12
IndirectStaticCall 1, CP#1
Drop1
Jump L1
L3:
Push r0
- PushConstant CP#4
- PushConstant CP#4
- PushConstant CP#18
- InstanceCall 4, CP#19
- PushConstant CP#7
+ PushNull
+ PushNull
+ PushConstant CP#13
+ InstanceCall 4, CP#14
+ PushTrue
IfNeStrictTOS
Jump L4
Push r0
PopLocal r2
Push r1
PopLocal r3
- PushConstant CP#4
- PushConstant CP#20
+ PushNull
+ PushInt 4
CreateArrayTOS
StoreLocal r4
Push r4
- PushConstant CP#13
- PushConstant CP#21
+ PushInt 0
+ PushConstant CP#15
StoreIndexedTOS
Push r4
- PushConstant CP#15
+ PushInt 1
Push r2
StoreIndexedTOS
Push r4
- PushConstant CP#12
- PushConstant CP#22
+ PushInt 2
+ PushConstant CP#16
StoreIndexedTOS
Push r4
- PushConstant CP#23
+ PushInt 3
Push r3
StoreIndexedTOS
- PushConstant CP#24
+ PushConstant CP#17
IndirectStaticCall 1, CP#1
- PushConstant CP#25
+ PushConstant CP#18
IndirectStaticCall 1, CP#1
Drop1
Jump L1
@@ -166,70 +162,63 @@
PopLocal r2
Push r1
PopLocal r3
- PushConstant CP#4
- PushConstant CP#20
+ PushNull
+ PushInt 4
CreateArrayTOS
StoreLocal r4
Push r4
- PushConstant CP#13
- PushConstant CP#27
+ PushInt 0
+ PushConstant CP#20
StoreIndexedTOS
Push r4
- PushConstant CP#15
+ PushInt 1
Push r2
StoreIndexedTOS
Push r4
- PushConstant CP#12
- PushConstant CP#22
+ PushInt 2
+ PushConstant CP#16
StoreIndexedTOS
Push r4
- PushConstant CP#23
+ PushInt 3
Push r3
StoreIndexedTOS
- PushConstant CP#28
+ PushConstant CP#21
IndirectStaticCall 1, CP#1
- PushConstant CP#29
+ PushConstant CP#22
IndirectStaticCall 1, CP#1
Drop1
Jump L1
L1:
- PushConstant CP#4
+ PushNull
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 2, end 7, handler 7, needs-stack-trace, types [CP#3, CP#10, CP#18, CP#26]
+ try-index 0, outer -1, start 2, end 7, handler 7, needs-stack-trace, types [CP#3, CP#8, CP#13, CP#19]
}
ConstantPool {
[0] = String 'danger!'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData target 'dart.core::print', arg-desc CP#1
[3] = Type dart.core::TypeError
- [4] = Null
- [5] = ArgDesc num-args 4, num-type-args 0, names []
- [6] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#5
- [7] = Bool true
- [8] = String 'caught type error'
- [9] = StaticICData target 'dart.core::print', arg-desc CP#1
- [10] = Type dart.core::AssertionError
- [11] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#5
- [12] = Int 2
- [13] = Int 0
- [14] = String 'caught assertion error '
- [15] = Int 1
- [16] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
- [17] = StaticICData target 'dart.core::print', arg-desc CP#1
- [18] = Type dart.core::Error
- [19] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#5
- [20] = Int 4
- [21] = String 'caught error '
- [22] = String ' '
- [23] = Int 3
- [24] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
- [25] = StaticICData target 'dart.core::print', arg-desc CP#1
- [26] = Type dynamic
- [27] = String 'caught something '
- [28] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
- [29] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [4] = ArgDesc num-args 4, num-type-args 0, names []
+ [5] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4
+ [6] = String 'caught type error'
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [8] = Type dart.core::AssertionError
+ [9] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4
+ [10] = String 'caught assertion error '
+ [11] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [13] = Type dart.core::Error
+ [14] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#4
+ [15] = String 'caught error '
+ [16] = String ' '
+ [17] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
+ [18] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [19] = Type dynamic
+ [20] = String 'caught something '
+ [21] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#1
+ [22] = StaticICData target 'dart.core::print', arg-desc CP#1
}
]static method testTryCatch2() → dynamic {
try {
@@ -255,39 +244,39 @@
AllocateContext 3
PopLocal r0
Push r0
- PushConstant CP#0
+ PushInt 1
StoreContextVar 0
Push r0
PopLocal r2
Try #0 start:
Push r0
- PushConstant CP#1
+ PushInt 2
StoreContextVar 1
- Allocate CP#13
+ Allocate CP#9
StoreLocal r5
Push r5
- PushConstant CP#11
- StoreFieldTOS CP#14
+ PushNull
+ StoreFieldTOS CP#10
Push r5
- PushConstant CP#11
- StoreFieldTOS CP#16
+ PushNull
+ StoreFieldTOS CP#12
Push r5
- PushConstant CP#18
- StoreFieldTOS CP#19
+ PushConstant CP#14
+ StoreFieldTOS CP#15
Push r5
- PushConstant CP#2
- StoreFieldTOS CP#21
+ PushConstant CP#0
+ StoreFieldTOS CP#17
Push r5
Push r0
- StoreFieldTOS CP#3
+ StoreFieldTOS CP#1
PopLocal r4
Push r4
- InstanceCall 1, CP#23
+ InstanceCall 1, CP#19
Drop1
Push r0
LoadContextVar 1
- PushConstant CP#24
- IndirectStaticCall 1, CP#6
+ PushConstant CP#20
+ IndirectStaticCall 1, CP#4
Drop1
Jump L1
Try #0 end:
@@ -302,49 +291,49 @@
Push r0
Push r3
StoreContextVar 2
- PushConstant CP#11
- PushConstant CP#25
+ PushNull
+ PushInt 4
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#26
- PushConstant CP#27
+ PushInt 0
+ PushConstant CP#21
StoreIndexedTOS
Push r5
- PushConstant CP#0
+ PushInt 1
Push r4
StoreIndexedTOS
Push r5
- PushConstant CP#1
- PushConstant CP#28
+ PushInt 2
+ PushConstant CP#22
StoreIndexedTOS
Push r5
- PushConstant CP#10
+ PushInt 3
Push r0
LoadContextVar 2
StoreIndexedTOS
- PushConstant CP#29
- IndirectStaticCall 1, CP#6
- PushConstant CP#30
- IndirectStaticCall 1, CP#6
+ PushConstant CP#23
+ IndirectStaticCall 1, CP#4
+ PushConstant CP#24
+ IndirectStaticCall 1, CP#4
Drop1
- Allocate CP#13
+ Allocate CP#9
StoreLocal r5
Push r5
- PushConstant CP#11
- StoreFieldTOS CP#14
+ PushNull
+ StoreFieldTOS CP#10
Push r5
- PushConstant CP#11
- StoreFieldTOS CP#16
+ PushNull
+ StoreFieldTOS CP#12
Push r5
- PushConstant CP#18
- StoreFieldTOS CP#19
+ PushConstant CP#14
+ StoreFieldTOS CP#15
Push r5
- PushConstant CP#31
- StoreFieldTOS CP#21
+ PushConstant CP#25
+ StoreFieldTOS CP#17
Push r5
Push r0
- StoreFieldTOS CP#3
+ StoreFieldTOS CP#1
PopLocal r6
Push r6
ReturnTOS
@@ -353,69 +342,62 @@
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#11
+ PushNull
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 9, end 39, handler 39, needs-stack-trace, types [CP#8]
+ try-index 0, outer -1, start 9, end 39, handler 39, needs-stack-trace, types [CP#6]
}
ConstantPool {
- [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] = EmptyTypeArguments
- [19] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [20] = Reserved
- [21] = InstanceField dart.core::_Closure::_function
- [22] = Reserved
- [23] = ICData dynamic target-name 'call', arg-desc CP#6
- [24] = StaticICData target 'dart.core::print', arg-desc CP#6
- [25] = Int 4
- [26] = Int 0
- [27] = String 'caught '
- [28] = String ' '
- [29] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#6
- [30] = StaticICData target 'dart.core::print', arg-desc CP#6
- [31] = ClosureFunction bar () → void;
- [32] = String 'danger bar'
- [33] = StaticICData target 'dart.core::print', arg-desc CP#6
- [34] = Type dart.core::Error
- [35] = ArgDesc num-args 4, num-type-args 0, names []
- [36] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#35
- [37] = Bool true
- [38] = String 'error '
- [39] = String ', captured stack trace: '
- [40] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#6
- [41] = StaticICData target 'dart.core::print', arg-desc CP#6
- [42] = EndClosureFunctionScope
+ [0] = ClosureFunction foo () → void;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = String 'danger foo'
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = Type dynamic
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [8] = EndClosureFunctionScope
+ [9] = Class dart.core::_Closure
+ [10] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [11] = Reserved
+ [12] = InstanceField dart.core::_Closure::_function_type_arguments
+ [13] = Reserved
+ [14] = EmptyTypeArguments
+ [15] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [16] = Reserved
+ [17] = InstanceField dart.core::_Closure::_function
+ [18] = Reserved
+ [19] = ICData dynamic target-name 'call', arg-desc CP#4
+ [20] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [21] = String 'caught '
+ [22] = String ' '
+ [23] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#4
+ [24] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [25] = ClosureFunction bar () → void;
+ [26] = String 'danger bar'
+ [27] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [28] = Type dart.core::Error
+ [29] = ArgDesc num-args 4, num-type-args 0, names []
+ [30] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#29
+ [31] = String 'error '
+ [32] = String ', captured stack trace: '
+ [33] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#4
+ [34] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [35] = EndClosureFunctionScope
}
-Closure CP#2 {
+Closure CP#0 {
EntryFixed 1, 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#3
+ LoadFieldTOS CP#1
PopLocal r0
Push r0
PopLocal r2
Try #0 start:
+ PushConstant CP#3
PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ IndirectStaticCall 1, CP#4
Drop1
Jump L1
Try #0 end:
@@ -429,31 +411,31 @@
PopLocal r4
Push r0
LoadContextVar 0
- PushConstant CP#9
- IndirectStaticCall 1, CP#6
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#4
Drop1
Push r0
- PushConstant CP#10
+ PushInt 3
StoreContextVar 1
Jump L1
L1:
- PushConstant CP#11
+ PushNull
ReturnTOS
}
-Closure CP#31 {
+Closure CP#25 {
EntryFixed 1, 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#3
+ LoadFieldTOS CP#1
PopLocal r0
Push r0
PopLocal r2
Try #0 start:
- PushConstant CP#32
- PushConstant CP#33
- IndirectStaticCall 1, CP#6
+ PushConstant CP#26
+ PushConstant CP#27
+ IndirectStaticCall 1, CP#4
Drop1
Jump L1
Try #0 end:
@@ -464,40 +446,40 @@
MoveSpecial r2, exception
MoveSpecial r3, stackTrace
Push r2
- PushConstant CP#11
- PushConstant CP#11
- PushConstant CP#34
- InstanceCall 4, CP#36
- PushConstant CP#37
+ PushNull
+ PushNull
+ PushConstant CP#28
+ InstanceCall 4, CP#30
+ PushTrue
IfNeStrictTOS
Jump L2
Push r2
PopLocal r4
- PushConstant CP#11
- PushConstant CP#25
+ PushNull
+ PushInt 4
CreateArrayTOS
StoreLocal r5
Push r5
- PushConstant CP#26
- PushConstant CP#38
+ PushInt 0
+ PushConstant CP#31
StoreIndexedTOS
Push r5
- PushConstant CP#0
+ PushInt 1
Push r4
StoreIndexedTOS
Push r5
- PushConstant CP#1
- PushConstant CP#39
+ PushInt 2
+ PushConstant CP#32
StoreIndexedTOS
Push r5
- PushConstant CP#10
+ PushInt 3
Push r0
LoadContextVar 2
StoreIndexedTOS
- PushConstant CP#40
- IndirectStaticCall 1, CP#6
- PushConstant CP#41
- IndirectStaticCall 1, CP#6
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#4
+ PushConstant CP#34
+ IndirectStaticCall 1, CP#4
Drop1
Jump L1
L2:
@@ -505,7 +487,7 @@
Push r3
Throw 1
L1:
- PushConstant CP#11
+ PushNull
ReturnTOS
}
@@ -563,7 +545,7 @@
Drop1
Push FP[-5]
AssertBoolean 0
- PushConstant CP#6
+ PushTrue
IfNeStrictTOS
Jump L2
Push r2
@@ -579,8 +561,8 @@
MoveSpecial r6, stackTrace
Push r5
PopLocal r7
+ PushConstant CP#6
PushConstant CP#7
- PushConstant CP#8
IndirectStaticCall 1, CP#1
Drop1
Jump L3
@@ -597,17 +579,17 @@
PopLocal r2
Push r1
PopLocal r3
+ PushConstant CP#8
PushConstant CP#9
- PushConstant CP#10
IndirectStaticCall 1, CP#1
Drop1
Push r3
- PushConstant CP#11
+ PushConstant CP#10
IndirectStaticCall 1, CP#1
Drop1
Jump L4
L4:
- PushConstant CP#12
+ PushNull
ReturnTOS
}
ExceptionsTable {
@@ -622,13 +604,11 @@
[3] = Type dynamic
[4] = String 'try 1 > catch 2 > try 3'
[5] = StaticICData target 'dart.core::print', arg-desc CP#1
- [6] = Bool true
- [7] = String 'try 1 > catch 2 > catch 3'
- [8] = StaticICData target 'dart.core::print', arg-desc CP#1
- [9] = String 'catch 1'
+ [6] = String 'try 1 > catch 2 > catch 3'
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#1
+ [8] = String 'catch 1'
+ [9] = StaticICData target 'dart.core::print', arg-desc CP#1
[10] = StaticICData target 'dart.core::print', arg-desc CP#1
- [11] = StaticICData target 'dart.core::print', arg-desc CP#1
- [12] = Null
}
]static method testRethrow(core::bool cond) → dynamic {
try {
@@ -656,23 +636,23 @@
Bytecode {
Entry 3
CheckStack
- PushConstant CP#0
+ PushInt 0
PopLocal r0
L5:
CheckStack
Push r0
- PushConstant CP#1
- InstanceCall 2, CP#3
+ PushInt 10
+ InstanceCall 2, CP#1
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L1
Try #0 start:
Push r0
- PushConstant CP#5
- InstanceCall 2, CP#6
+ PushInt 5
+ InstanceCall 2, CP#2
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L2
Jump L3
@@ -684,52 +664,46 @@
MoveSpecial r1, exception
MoveSpecial r2, stackTrace
Push r0
- PushConstant CP#9
- IndirectStaticCall 1, CP#8
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
Drop1
Push r1
Push r2
Throw 1
L3:
Push r0
- PushConstant CP#10
- IndirectStaticCall 1, CP#8
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#4
Drop1
Jump L1
L4:
Push r0
- PushConstant CP#11
- IndirectStaticCall 1, CP#8
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#4
Drop1
Push r0
- PushConstant CP#12
- InstanceCall 2, CP#13
+ PushInt 1
+ InstanceCall 2, CP#8
StoreLocal r0
Drop1
Jump L5
L1:
- PushConstant CP#14
+ PushNull
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 12, end 21, handler 21, needs-stack-trace, types [CP#7]
+ try-index 0, outer -1, start 12, end 21, handler 21, needs-stack-trace, types [CP#3]
}
ConstantPool {
- [0] = Int 0
- [1] = Int 10
- [2] = ArgDesc num-args 2, num-type-args 0, names []
- [3] = ICData target-name '<', arg-desc CP#2
- [4] = Bool true
- [5] = Int 5
- [6] = ICData target-name '>', arg-desc CP#2
- [7] = Type dynamic
- [8] = ArgDesc num-args 1, num-type-args 0, names []
- [9] = StaticICData target 'dart.core::print', arg-desc CP#8
- [10] = StaticICData target 'dart.core::print', arg-desc CP#8
- [11] = StaticICData target 'dart.core::print', arg-desc CP#8
- [12] = Int 1
- [13] = ICData target-name '+', arg-desc CP#2
- [14] = Null
+ [0] = ArgDesc num-args 2, num-type-args 0, names []
+ [1] = ICData target-name '<', arg-desc CP#0
+ [2] = ICData target-name '>', arg-desc CP#0
+ [3] = Type dynamic
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [8] = ICData target-name '+', arg-desc CP#0
}
]static method testTryFinally1() → dynamic {
#L1:
@@ -757,15 +731,15 @@
LoadContextVar 0
PopLocal r2
Push r2
- PushConstant CP#1
- InstanceCall 2, CP#2
- PushConstant CP#3
+ PushInt 1
+ InstanceCall 2, CP#1
+ PushTrue
IfEqStrictTOS
Jump L1
Push r2
- PushConstant CP#4
- InstanceCall 2, CP#5
- PushConstant CP#3
+ PushInt 2
+ InstanceCall 2, CP#2
+ PushTrue
IfEqStrictTOS
Jump L2
Jump L3
@@ -773,40 +747,40 @@
Push r0
PopLocal r3
Try #0 start:
- PushConstant CP#6
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ PushConstant CP#3
+ PushConstant CP#5
+ IndirectStaticCall 1, CP#4
Drop1
Push r0
- PushConstant CP#9
+ PushInt 3
StoreContextVar 1
Push r0
PopLocal r5
Try #1 start:
- PushConstant CP#10
- PushConstant CP#11
- IndirectStaticCall 1, CP#7
+ PushConstant CP#6
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#4
Drop1
- Allocate CP#19
+ Allocate CP#14
StoreLocal r8
Push r8
- PushConstant CP#17
+ PushNull
+ StoreFieldTOS CP#15
+ Push r8
+ PushNull
+ StoreFieldTOS CP#17
+ Push r8
+ PushConstant CP#19
StoreFieldTOS CP#20
Push r8
- PushConstant CP#17
+ PushConstant CP#8
StoreFieldTOS CP#22
Push r8
- PushConstant CP#24
- StoreFieldTOS CP#25
- Push r8
- PushConstant CP#12
- StoreFieldTOS CP#27
- Push r8
Push r0
- StoreFieldTOS CP#13
+ StoreFieldTOS CP#9
PopLocal r7
Push r7
- InstanceCall 1, CP#29
+ InstanceCall 1, CP#24
Drop1
Jump L4
Jump L5
@@ -817,9 +791,9 @@
PopLocal r0
MoveSpecial r5, exception
MoveSpecial r6, stackTrace
- PushConstant CP#31
- PushConstant CP#32
- IndirectStaticCall 1, CP#7
+ PushConstant CP#26
+ PushConstant CP#27
+ IndirectStaticCall 1, CP#4
Drop1
Push r5
Push r6
@@ -827,21 +801,21 @@
L4:
Push r5
PopLocal r0
- PushConstant CP#31
- PushConstant CP#33
- IndirectStaticCall 1, CP#7
+ PushConstant CP#26
+ PushConstant CP#28
+ IndirectStaticCall 1, CP#4
Drop1
Jump L6
L5:
Push r5
PopLocal r0
- PushConstant CP#31
- PushConstant CP#34
- IndirectStaticCall 1, CP#7
+ PushConstant CP#26
+ PushConstant CP#29
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#35
- PushConstant CP#36
- IndirectStaticCall 1, CP#7
+ PushConstant CP#30
+ PushConstant CP#31
+ IndirectStaticCall 1, CP#4
Drop1
Jump L7
Try #0 end:
@@ -851,9 +825,9 @@
PopLocal r0
MoveSpecial r3, exception
MoveSpecial r4, stackTrace
- PushConstant CP#37
- PushConstant CP#38
- IndirectStaticCall 1, CP#7
+ PushConstant CP#32
+ PushConstant CP#33
+ IndirectStaticCall 1, CP#4
Drop1
Push r3
Push r4
@@ -861,95 +835,90 @@
L6:
Push r3
PopLocal r0
- PushConstant CP#37
- PushConstant CP#39
- IndirectStaticCall 1, CP#7
+ PushConstant CP#32
+ PushConstant CP#34
+ IndirectStaticCall 1, CP#4
Drop1
Jump L2
L7:
Push r3
PopLocal r0
- PushConstant CP#37
- PushConstant CP#40
- IndirectStaticCall 1, CP#7
+ PushConstant CP#32
+ PushConstant CP#35
+ IndirectStaticCall 1, CP#4
Drop1
Jump L3
L2:
- PushConstant CP#41
- PushConstant CP#42
- IndirectStaticCall 1, CP#7
+ PushConstant CP#36
+ PushConstant CP#37
+ IndirectStaticCall 1, CP#4
Drop1
Jump L3
L3:
- PushConstant CP#17
+ PushNull
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 25, end 91, handler 91, needs-stack-trace, types [CP#30]
- try-index 1, outer 0, start 34, end 61, handler 61, needs-stack-trace, types [CP#30]
+ try-index 0, outer -1, start 25, end 91, handler 91, needs-stack-trace, types [CP#25]
+ try-index 1, outer 0, start 34, end 61, handler 61, needs-stack-trace, types [CP#25]
}
ConstantPool {
[0] = ArgDesc num-args 2, num-type-args 0, names []
- [1] = Int 1
+ [1] = ICData target-name '==', arg-desc CP#0
[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
+ [3] = String 'before try 1'
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = String 'try'
+ [7] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [8] = ClosureFunction foo () → void;
+ [9] = InstanceField dart.core::_Closure::_context
+ [10] = Reserved
+ [11] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [13] = EndClosureFunctionScope
+ [14] = Class dart.core::_Closure
+ [15] = InstanceField dart.core::_Closure::_instantiator_type_arguments
+ [16] = Reserved
+ [17] = InstanceField dart.core::_Closure::_function_type_arguments
+ [18] = Reserved
+ [19] = EmptyTypeArguments
+ [20] = InstanceField dart.core::_Closure::_delayed_type_arguments
[21] = Reserved
- [22] = InstanceField dart.core::_Closure::_function_type_arguments
+ [22] = InstanceField dart.core::_Closure::_function
[23] = Reserved
- [24] = EmptyTypeArguments
- [25] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [26] = Reserved
- [27] = InstanceField dart.core::_Closure::_function
- [28] = Reserved
- [29] = ICData dynamic target-name 'call', arg-desc CP#7
- [30] = Type dynamic
- [31] = String 'finally 1'
- [32] = StaticICData target 'dart.core::print', arg-desc CP#7
- [33] = StaticICData target 'dart.core::print', arg-desc CP#7
- [34] = StaticICData target 'dart.core::print', arg-desc CP#7
- [35] = String 'after try 1'
- [36] = StaticICData target 'dart.core::print', arg-desc CP#7
- [37] = String 'finally 2'
- [38] = StaticICData target 'dart.core::print', arg-desc CP#7
- [39] = StaticICData target 'dart.core::print', arg-desc CP#7
- [40] = StaticICData target 'dart.core::print', arg-desc CP#7
- [41] = String 'case 2'
- [42] = StaticICData target 'dart.core::print', arg-desc CP#7
+ [24] = ICData dynamic target-name 'call', arg-desc CP#4
+ [25] = Type dynamic
+ [26] = String 'finally 1'
+ [27] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [28] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [29] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [30] = String 'after try 1'
+ [31] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [32] = String 'finally 2'
+ [33] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [34] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [35] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [36] = String 'case 2'
+ [37] = StaticICData target 'dart.core::print', arg-desc CP#4
}
-Closure CP#12 {
+Closure CP#8 {
EntryFixed 1, 2
CheckStack
Push FP[-5]
- LoadFieldTOS CP#13
+ LoadFieldTOS CP#9
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#15
- IndirectStaticCall 1, CP#7
+ PushConstant CP#11
+ IndirectStaticCall 1, CP#4
Drop1
Push r0
LoadContextVar 1
- PushConstant CP#16
- IndirectStaticCall 1, CP#7
+ PushConstant CP#12
+ IndirectStaticCall 1, CP#4
Drop1
- PushConstant CP#17
+ PushNull
ReturnTOS
}
@@ -996,30 +965,30 @@
AllocateContext 1
PopLocal r0
Push r0
- PushConstant CP#0
+ PushInt 11
StoreContextVar 0
- PushConstant CP#1
+ PushNull
PopLocal r2
Push r0
PopLocal r3
Try #0 start:
- Allocate CP#26
+ Allocate CP#22
StoreLocal r5
Push r5
- PushConstant CP#1
- StoreFieldTOS CP#27
+ PushNull
+ StoreFieldTOS CP#23
Push r5
- PushConstant CP#1
- StoreFieldTOS CP#29
+ PushNull
+ StoreFieldTOS CP#25
Push r5
- PushConstant CP#31
- StoreFieldTOS CP#32
+ PushConstant CP#27
+ StoreFieldTOS CP#28
Push r5
- PushConstant CP#2
- StoreFieldTOS CP#34
+ PushConstant CP#0
+ StoreFieldTOS CP#30
Push r5
Push r0
- StoreFieldTOS CP#3
+ StoreFieldTOS CP#1
PopLocal r2
Jump L1
Try #0 end:
@@ -1031,11 +1000,11 @@
MoveSpecial r4, stackTrace
Push r0
LoadContextVar 0
- PushConstant CP#36
- IndirectStaticCall 1, CP#5
+ PushConstant CP#32
+ IndirectStaticCall 1, CP#3
Drop1
Push r2
- InstanceCall 1, CP#37
+ InstanceCall 1, CP#33
Drop1
Push r3
Push r4
@@ -1045,80 +1014,76 @@
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#38
- IndirectStaticCall 1, CP#5
+ PushConstant CP#34
+ IndirectStaticCall 1, CP#3
Drop1
Push r2
- InstanceCall 1, CP#39
+ InstanceCall 1, CP#35
Drop1
Push r0
LoadContextParent
PopLocal r0
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ExceptionsTable {
- try-index 0, outer -1, start 11, end 30, handler 30, needs-stack-trace, types [CP#9]
+ try-index 0, outer -1, start 11, end 30, handler 30, needs-stack-trace, types [CP#7]
}
ConstantPool {
- [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] = Type dynamic
- [10] = String 'try 2'
- [11] = StaticICData target 'dart.core::print', arg-desc CP#5
- [12] = StaticICData target 'dart.core::print', arg-desc CP#5
- [13] = StaticICData target 'dart.core::print', arg-desc CP#5
- [14] = Int 43
- [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] = Int 42
- [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] = EmptyTypeArguments
- [32] = InstanceField dart.core::_Closure::_delayed_type_arguments
- [33] = Reserved
- [34] = InstanceField dart.core::_Closure::_function
- [35] = Reserved
- [36] = StaticICData target 'dart.core::print', arg-desc CP#5
- [37] = ICData dynamic target-name 'call', arg-desc CP#5
- [38] = StaticICData target 'dart.core::print', arg-desc CP#5
- [39] = ICData dynamic target-name 'call', arg-desc CP#5
+ [0] = ClosureFunction <anonymous closure> () → dart.core::int;
+ [1] = InstanceField dart.core::_Closure::_context
+ [2] = Reserved
+ [3] = ArgDesc num-args 1, num-type-args 0, names []
+ [4] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [5] = String 'try 1'
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [7] = Type dynamic
+ [8] = String 'try 2'
+ [9] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [11] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [12] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [13] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [14] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [15] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [16] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [17] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [18] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [19] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [20] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [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] = EmptyTypeArguments
+ [28] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [29] = Reserved
+ [30] = InstanceField dart.core::_Closure::_function
+ [31] = Reserved
+ [32] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [33] = ICData dynamic target-name 'call', arg-desc CP#3
+ [34] = StaticICData target 'dart.core::print', arg-desc CP#3
+ [35] = ICData dynamic target-name 'call', arg-desc CP#3
}
-Closure CP#2 {
+Closure CP#0 {
EntryFixed 1, 6
CheckStack
Push FP[-5]
- LoadFieldTOS CP#3
+ LoadFieldTOS CP#1
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#6
- IndirectStaticCall 1, CP#5
+ PushConstant CP#4
+ IndirectStaticCall 1, CP#3
Drop1
Push r0
PopLocal r2
Try #0 start:
- PushConstant CP#7
- PushConstant CP#8
- IndirectStaticCall 1, CP#5
+ PushConstant CP#5
+ PushConstant CP#6
+ IndirectStaticCall 1, CP#3
Drop1
Jump L1
Jump L2
@@ -1132,9 +1097,9 @@
Push r0
PopLocal r4
Try #1 start:
- PushConstant CP#10
- PushConstant CP#11
- IndirectStaticCall 1, CP#5
+ PushConstant CP#8
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#3
Drop1
Jump L3
Jump L4
@@ -1147,8 +1112,8 @@
MoveSpecial r5, stackTrace
Push r0
LoadContextVar 0
- PushConstant CP#12
- IndirectStaticCall 1, CP#5
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#3
Drop1
Push r4
Push r5
@@ -1158,18 +1123,18 @@
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#13
- IndirectStaticCall 1, CP#5
+ PushConstant CP#11
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#14
+ PushInt 43
ReturnTOS
L4:
Push r4
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#15
- IndirectStaticCall 1, CP#5
+ PushConstant CP#12
+ IndirectStaticCall 1, CP#3
Drop1
Push r2
Push r3
@@ -1180,9 +1145,9 @@
Push r0
PopLocal r4
Try #2 start:
- PushConstant CP#10
- PushConstant CP#16
- IndirectStaticCall 1, CP#5
+ PushConstant CP#8
+ PushConstant CP#13
+ IndirectStaticCall 1, CP#3
Drop1
Jump L5
Jump L6
@@ -1195,8 +1160,8 @@
MoveSpecial r5, stackTrace
Push r0
LoadContextVar 0
- PushConstant CP#17
- IndirectStaticCall 1, CP#5
+ PushConstant CP#14
+ IndirectStaticCall 1, CP#3
Drop1
Push r4
Push r5
@@ -1206,20 +1171,20 @@
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#18
- IndirectStaticCall 1, CP#5
+ PushConstant CP#15
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#14
+ PushInt 43
ReturnTOS
L6:
Push r4
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#19
- IndirectStaticCall 1, CP#5
+ PushConstant CP#16
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#20
+ PushInt 42
ReturnTOS
L2:
Push r2
@@ -1227,9 +1192,9 @@
Push r0
PopLocal r4
Try #3 start:
- PushConstant CP#10
- PushConstant CP#21
- IndirectStaticCall 1, CP#5
+ PushConstant CP#8
+ PushConstant CP#17
+ IndirectStaticCall 1, CP#3
Drop1
Jump L7
Jump L8
@@ -1242,8 +1207,8 @@
MoveSpecial r5, stackTrace
Push r0
LoadContextVar 0
- PushConstant CP#22
- IndirectStaticCall 1, CP#5
+ PushConstant CP#18
+ IndirectStaticCall 1, CP#3
Drop1
Push r4
Push r5
@@ -1253,20 +1218,20 @@
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#23
- IndirectStaticCall 1, CP#5
+ PushConstant CP#19
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#14
+ PushInt 43
ReturnTOS
L8:
Push r4
PopLocal r0
Push r0
LoadContextVar 0
- PushConstant CP#24
- IndirectStaticCall 1, CP#5
+ PushConstant CP#20
+ IndirectStaticCall 1, CP#3
Drop1
- PushConstant CP#1
+ PushNull
ReturnTOS
}
@@ -1338,7 +1303,7 @@
PushConstant CP#8
IndirectStaticCall 1, CP#1
Drop1
- PushConstant CP#9
+ PushNull
ReturnTOS
}
ExceptionsTable {
@@ -1355,7 +1320,6 @@
[6] = String 'finally'
[7] = StaticICData target 'dart.core::print', arg-desc CP#1
[8] = StaticICData target 'dart.core::print', arg-desc CP#1
- [9] = Null
}
]static method testTryCatchFinally() → dynamic {
try
@@ -1373,10 +1337,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 6d47595..363540d 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -11,13 +11,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super core::Object::•()
@@ -32,13 +31,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::A::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::A::•()
@@ -53,13 +51,12 @@
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
- PushConstant CP#2
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::B::', arg-desc CP#0
- [2] = Null
}
] synthetic constructor •() → void
: super self::B::•()
@@ -75,28 +72,27 @@
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
+ PushNull
PushConstant CP#1
PushConstant CP#2
- PushConstant CP#3
- AssertAssignable 0, CP#4
- StoreFieldTOS CP#5
+ AssertAssignable 0, CP#3
+ StoreFieldTOS CP#4
Push FP[-6]
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ PushConstant CP#7
+ IndirectStaticCall 1, CP#6
Drop1
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::D
- [1] = Null
- [2] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
- [3] = String ''
- [4] = SubtypeTestCache
- [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
+ [1] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
+ [2] = String ''
+ [3] = SubtypeTestCache
+ [4] = InstanceField #lib::D::foo
+ [5] = Reserved
+ [6] = ArgDesc num-args 1, num-type-args 0, names []
+ [7] = StaticICData target '#lib::C::', arg-desc CP#6
}
] constructor •(dynamic tt) → void
: self::D::foo = tt as{TypeError} core::Map<self::D::P, self::D::Q>, super self::C::•()
@@ -108,65 +104,63 @@
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
+ PushNull
PushConstant CP#1
- PushConstant CP#2
- InstanceCall 4, CP#4
+ InstanceCall 4, CP#3
AssertBoolean 0
- PushConstant CP#5
+ PushTrue
IfNeStrictTOS
Jump L1
+ PushConstant CP#4
PushConstant CP#6
- PushConstant CP#8
- IndirectStaticCall 1, CP#7
+ IndirectStaticCall 1, CP#5
Drop1
L1:
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- PushConstant CP#9
- InstanceCall 4, CP#10
+ PushNull
+ PushConstant CP#7
+ InstanceCall 4, CP#8
AssertBoolean 0
- PushConstant CP#5
+ PushTrue
IfNeStrictTOS
Jump L2
- PushConstant CP#11
- PushConstant CP#12
- IndirectStaticCall 1, CP#7
+ PushConstant CP#9
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#5
Drop1
L2:
Push FP[-6]
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- PushConstant CP#13
- PushConstant CP#14
- AssertAssignable 0, CP#15
- InstanceCall 2, CP#17
+ PushNull
+ PushConstant CP#11
+ PushConstant CP#12
+ AssertAssignable 0, CP#13
+ InstanceCall 2, CP#15
Drop1
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::D
- [1] = Null
- [2] = Type #lib::A<#lib::D::P>
- [3] = ArgDesc num-args 4, num-type-args 0, names []
- [4] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#3
- [5] = Bool true
- [6] = String '21'
- [7] = ArgDesc num-args 1, num-type-args 0, names []
- [8] = StaticICData target 'dart.core::print', arg-desc CP#7
- [9] = Type #lib::C<dynamic, #lib::D::Q, dart.core::List<#lib::D::P>>
- [10] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#3
- [11] = String '22'
- [12] = StaticICData target 'dart.core::print', arg-desc CP#7
- [13] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
- [14] = String ''
- [15] = SubtypeTestCache
- [16] = ArgDesc num-args 2, num-type-args 0, names []
- [17] = ICData set target-name 'foo', arg-desc CP#16
+ [1] = Type #lib::A<#lib::D::P>
+ [2] = ArgDesc num-args 4, num-type-args 0, names []
+ [3] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
+ [4] = String '21'
+ [5] = ArgDesc num-args 1, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [7] = Type #lib::C<dynamic, #lib::D::Q, dart.core::List<#lib::D::P>>
+ [8] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
+ [9] = String '22'
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#5
+ [11] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
+ [12] = String ''
+ [13] = SubtypeTestCache
+ [14] = ArgDesc num-args 2, num-type-args 0, names []
+ [15] = ICData set target-name 'foo', arg-desc CP#14
}
] method foo2(dynamic y) → dynamic {
if(y is self::A<self::D::P>) {
@@ -183,62 +177,60 @@
CheckStack
CheckFunctionTypeArgs 2, 0
Push FP[-5]
- PushConstant CP#0
+ PushNull
Push r0
- PushConstant CP#1
- InstanceCall 4, CP#3
+ PushConstant CP#0
+ InstanceCall 4, CP#2
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L1
+ PushConstant CP#3
PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ IndirectStaticCall 1, CP#4
Drop1
L1:
Push FP[-5]
Push FP[-6]
- LoadTypeArgumentsField CP#8
+ LoadTypeArgumentsField CP#6
Push r0
- PushConstant CP#9
- InstanceCall 4, CP#10
+ PushConstant CP#7
+ InstanceCall 4, CP#8
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L2
- PushConstant CP#11
- PushConstant CP#12
- IndirectStaticCall 1, CP#6
+ PushConstant CP#9
+ PushConstant CP#10
+ IndirectStaticCall 1, CP#4
Drop1
L2:
Push FP[-5]
Push FP[-6]
- LoadTypeArgumentsField CP#8
+ LoadTypeArgumentsField CP#6
Push r0
- PushConstant CP#13
- InstanceCall 4, CP#14
- InstanceCall 1, CP#15
+ PushConstant CP#11
+ InstanceCall 4, CP#12
+ InstanceCall 1, CP#13
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = Type #lib::A<#lib::D::foo3::T1>
- [2] = ArgDesc num-args 4, num-type-args 0, names []
- [3] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
- [4] = Bool true
- [5] = String '31'
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target 'dart.core::print', arg-desc CP#6
- [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'
- [12] = StaticICData target 'dart.core::print', arg-desc CP#6
- [13] = Type dart.core::Map<#lib::D::foo3::T2, #lib::D::Q>
- [14] = ICData target-name 'dart.core::_as', arg-desc CP#2
- [15] = ICData get target-name 'values', arg-desc CP#6
+ [0] = Type #lib::A<#lib::D::foo3::T1>
+ [1] = ArgDesc num-args 4, num-type-args 0, names []
+ [2] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#1
+ [3] = String '31'
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = TypeArgumentsField #lib::D
+ [7] = Type #lib::C<dart.core::Map<#lib::D::foo3::T1, #lib::D::P>, dart.core::List<#lib::D::foo3::T2>, #lib::D::Q>
+ [8] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#1
+ [9] = String '32'
+ [10] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [11] = Type dart.core::Map<#lib::D::foo3::T2, #lib::D::Q>
+ [12] = ICData target-name 'dart.core::_as', arg-desc CP#1
+ [13] = ICData get target-name 'values', arg-desc CP#4
}
] method foo3<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic>(dynamic z) → dynamic {
if(z is self::A<self::D::foo3::T1>) {
@@ -255,49 +247,46 @@
CheckStack
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- InstantiateTypeArgumentsTOS 0, CP#2
+ PushNull
+ InstantiateTypeArgumentsTOS 0, CP#1
StoreLocal r1
Push r1
- PushConstant CP#3
+ PushInt 1
CreateArrayTOS
StoreLocal r1
Push r1
- PushConstant CP#4
+ PushInt 0
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- PushConstant CP#5
- PushConstant CP#6
- AssertAssignable 0, CP#7
+ PushNull
+ PushConstant CP#2
+ PushConstant CP#3
+ AssertAssignable 0, CP#4
StoreIndexedTOS
- PushConstant CP#9
- IndirectStaticCall 2, CP#8
+ PushConstant CP#6
+ IndirectStaticCall 2, CP#5
PopLocal r0
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- PushConstant CP#5
- PushConstant CP#6
- AssertAssignable 0, CP#10
+ PushNull
+ PushConstant CP#2
+ PushConstant CP#3
+ AssertAssignable 0, CP#7
ReturnTOS
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::D
- [1] = Null
- [2] = TypeArgs [dart.core::Map<#lib::D::P, #lib::D::Q>]
- [3] = Int 1
- [4] = Int 0
- [5] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
- [6] = String ''
+ [1] = TypeArgs [dart.core::Map<#lib::D::P, #lib::D::Q>]
+ [2] = Type dart.core::Map<#lib::D::P, #lib::D::Q>
+ [3] = String ''
+ [4] = SubtypeTestCache
+ [5] = ArgDesc num-args 2, num-type-args 0, names []
+ [6] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#5
[7] = SubtypeTestCache
- [8] = ArgDesc num-args 2, num-type-args 0, names []
- [9] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#8
- [10] = SubtypeTestCache
}
] method foo4(dynamic w) → core::Map<self::D::P, self::D::Q> {
core::List<core::Map<self::D::P, self::D::Q>> list = <core::Map<self::D::P, self::D::Q>>[w as{TypeError} core::Map<self::D::P, self::D::Q>];
@@ -309,13 +298,12 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
] static factory •<P extends core::String = dynamic>() → self::E<self::E::•::P>
return null;
@@ -327,27 +315,26 @@
JumpIfNotZeroTypeArgs L1
Push FP[-6]
LoadTypeArgumentsField CP#0
- PushConstant CP#1
- InstantiateTypeArgumentsTOS 0, CP#2
+ PushNull
+ InstantiateTypeArgumentsTOS 0, CP#1
PopLocal r0
L1:
Push FP[-6]
LoadTypeArgumentsField CP#0
Push r0
+ PushConstant CP#2
PushConstant CP#3
PushConstant CP#4
- PushConstant CP#5
AssertSubtype
- PushConstant CP#1
+ PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::E
- [1] = Null
- [2] = TypeArgs [#lib::E::P, dart.core::List<#lib::E::P>]
- [3] = Type #lib::E::foo6::T
- [4] = Type #lib::E::P
- [5] = String 'T'
+ [1] = TypeArgs [#lib::E::P, dart.core::List<#lib::E::P>]
+ [2] = Type #lib::E::foo6::T
+ [3] = Type #lib::E::P
+ [4] = String 'T'
}
] method foo6<generic-covariant-impl T extends self::E::P = self::E::P, U extends core::List<self::E::foo6::T> = core::List<self::E::P>>(core::Map<self::E::foo6::T, self::E::foo6::U> map) → void {}
}
@@ -357,57 +344,55 @@
Entry 0
CheckStack
Push FP[-5]
+ PushNull
+ PushNull
PushConstant CP#0
- PushConstant CP#0
- PushConstant CP#1
- InstanceCall 4, CP#3
+ InstanceCall 4, CP#2
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L1
+ PushConstant CP#3
PushConstant CP#5
- PushConstant CP#7
- IndirectStaticCall 1, CP#6
+ IndirectStaticCall 1, CP#4
Drop1
L1:
Push FP[-5]
- PushConstant CP#0
- PushConstant CP#0
- PushConstant CP#8
- InstanceCall 4, CP#9
+ PushNull
+ PushNull
+ PushConstant CP#6
+ InstanceCall 4, CP#7
AssertBoolean 0
- PushConstant CP#4
+ PushTrue
IfNeStrictTOS
Jump L2
- PushConstant CP#10
- PushConstant CP#11
- IndirectStaticCall 1, CP#6
+ PushConstant CP#8
+ PushConstant CP#9
+ IndirectStaticCall 1, CP#4
Drop1
L2:
Push FP[-5]
- PushConstant CP#0
- PushConstant CP#0
- PushConstant CP#12
- InstanceCall 4, CP#13
+ PushNull
+ PushNull
+ PushConstant CP#10
+ InstanceCall 4, CP#11
ReturnTOS
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = Type #lib::B
- [2] = ArgDesc num-args 4, num-type-args 0, names []
- [3] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
- [4] = Bool true
- [5] = String '11'
- [6] = ArgDesc num-args 1, num-type-args 0, names []
- [7] = StaticICData target 'dart.core::print', arg-desc CP#6
- [8] = Type #lib::C<dart.core::int, dart.core::Object, dynamic>
- [9] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#2
- [10] = String '12'
- [11] = StaticICData target 'dart.core::print', arg-desc CP#6
- [12] = Type #lib::A<dart.core::int>
- [13] = ICData target-name 'dart.core::_as', arg-desc CP#2
+ [0] = Type #lib::B
+ [1] = ArgDesc num-args 4, num-type-args 0, names []
+ [2] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#1
+ [3] = String '11'
+ [4] = ArgDesc num-args 1, num-type-args 0, names []
+ [5] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [6] = Type #lib::C<dart.core::int, dart.core::Object, dynamic>
+ [7] = ICData target-name 'dart.core::_instanceOf', arg-desc CP#1
+ [8] = String '12'
+ [9] = StaticICData target 'dart.core::print', arg-desc CP#4
+ [10] = Type #lib::A<dart.core::int>
+ [11] = ICData target-name 'dart.core::_as', arg-desc CP#1
}
]static method foo1(dynamic x) → dynamic {
if(x is self::B) {
@@ -423,21 +408,20 @@
Entry 1
CheckStack
Push FP[-5]
- PushConstant CP#0
+ PushNull
+ PushNull
PushConstant CP#0
PushConstant CP#1
- PushConstant CP#2
- AssertAssignable 0, CP#3
- StoreStaticTOS CP#4
- PushConstant CP#0
+ AssertAssignable 0, CP#2
+ StoreStaticTOS CP#3
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
- [1] = Type dart.core::List<dart.core::Iterable<dynamic>>
- [2] = String ''
- [3] = SubtypeTestCache
- [4] = StaticField #lib::globalVar
+ [0] = Type dart.core::List<dart.core::Iterable<dynamic>>
+ [1] = String ''
+ [2] = SubtypeTestCache
+ [3] = StaticField #lib::globalVar
}
]static method foo5(dynamic x) → void {
self::globalVar = x as{TypeError} core::List<core::Iterable<dynamic>>;
@@ -446,10 +430,9 @@
Bytecode {
Entry 0
CheckStack
- PushConstant CP#0
+ PushNull
ReturnTOS
}
ConstantPool {
- [0] = Null
}
]static method main() → dynamic {}
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
index e93787f..6cacf81 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
@@ -626,6 +626,25 @@
PushConstant(ConstantAt(DecodeOperandD()));
}
+void BytecodeFlowGraphBuilder::BuildPushNull() {
+ code_ += B->NullConstant();
+}
+
+void BytecodeFlowGraphBuilder::BuildPushTrue() {
+ code_ += B->Constant(Bool::True());
+}
+
+void BytecodeFlowGraphBuilder::BuildPushFalse() {
+ code_ += B->Constant(Bool::False());
+}
+
+void BytecodeFlowGraphBuilder::BuildPushInt() {
+ if (is_generating_interpreter()) {
+ UNIMPLEMENTED(); // TODO(alexmarkov): interpreter
+ }
+ code_ += B->IntConstant(DecodeOperandX().value());
+}
+
void BytecodeFlowGraphBuilder::BuildStoreLocal() {
LoadStackSlots(1);
const Operand local_index = DecodeOperandX();
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
index 9bf0b9c..7de8c02 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
@@ -51,7 +51,11 @@
M(PopLocal) \
M(Push) \
M(PushConstant) \
+ M(PushFalse) \
+ M(PushInt) \
+ M(PushNull) \
M(PushStatic) \
+ M(PushTrue) \
M(ReturnTOS) \
M(SetFrame) \
M(StoreContextParent) \
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index 8142e11..2a5d9e5 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -154,6 +154,22 @@
// Load value at index D from constant pool into FP[rA] or push it onto the
// stack.
//
+// - PushNull
+//
+// Push `null` onto the stack.
+//
+// - PushTrue
+//
+// Push `true` onto the stack.
+//
+// - PushFalse
+//
+// Push `false` onto the stack.
+//
+// - PushInt rX
+//
+// Push int rX onto the stack.
+//
// - StoreLocal rX; PopLocal rX
//
// Store top of the stack into FP[rX] and pop it if needed.
@@ -832,6 +848,10 @@
V(LoadClassId, A_D, reg, reg, ___) \
V(LoadClassIdTOS, 0, ___, ___, ___) \
V(PushConstant, D, lit, ___, ___) \
+ V(PushNull, 0, ___, ___, ___) \
+ V(PushTrue, 0, ___, ___, ___) \
+ V(PushFalse, 0, ___, ___, ___) \
+ V(PushInt, X, num, ___, ___) \
V(StoreLocal, X, xeg, ___, ___) \
V(PopLocal, X, xeg, ___, ___) \
V(IndirectStaticCall, A_D, num, num, ___) \
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index 466b216..62a2fd5 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -2274,6 +2274,30 @@
}
{
+ BYTECODE(PushNull, 0);
+ *++SP = Object::null();
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(PushTrue, 0);
+ *++SP = Object::bool_true().raw();
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(PushFalse, 0);
+ *++SP = Object::bool_false().raw();
+ DISPATCH();
+ }
+
+ {
+ BYTECODE(PushInt, A_X);
+ *++SP = Smi::New(rD);
+ DISPATCH();
+ }
+
+ {
BYTECODE(Push, A_X);
*++SP = FP[rD];
DISPATCH();