mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:10:22 +00:00
[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>
This commit is contained in:
parent
a80b13e2f9
commit
76091c13db
22 changed files with 2778 additions and 3033 deletions
|
@ -221,6 +221,22 @@ class BytecodeAssembler {
|
|||
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));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ library vm.bytecode.dbc;
|
|||
// 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 @@ enum Opcode {
|
|||
kLoadClassId,
|
||||
kLoadClassIdTOS,
|
||||
kPushConstant,
|
||||
kPushNull,
|
||||
kPushTrue,
|
||||
kPushFalse,
|
||||
kPushInt,
|
||||
kStoreLocal,
|
||||
kPopLocal,
|
||||
kIndirectStaticCall,
|
||||
|
@ -320,6 +326,14 @@ const Map<Opcode, Format> BytecodeFormats = const {
|
|||
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(
|
||||
|
|
|
@ -150,7 +150,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
} 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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
|
||||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
asm.emitLoadTypeArgumentsField(cpIndex);
|
||||
}
|
||||
} else {
|
||||
_genPushNull();
|
||||
asm.emitPushNull();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,7 +517,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
if (locals.hasFunctionTypeArgsVar) {
|
||||
asm.emitPush(locals.functionTypeArgsVarIndexInFrame);
|
||||
} else {
|
||||
_genPushNull();
|
||||
asm.emitPushNull();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -561,7 +579,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
}
|
||||
|
||||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
void _genInstanceOf(DartType type) {
|
||||
if (typeEnvironment.isTop(type)) {
|
||||
asm.emitDrop1();
|
||||
asm.emitPushConstant(cp.add(new ConstantBool(true)));
|
||||
asm.emitPushTrue();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -604,8 +622,8 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
_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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
|
||||
@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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
|
||||
@override
|
||||
visitNullLiteral(NullLiteral node) {
|
||||
final cpIndex = cp.add(const ConstantNull());
|
||||
asm.emitPushConstant(cpIndex);
|
||||
asm.emitPushNull();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1920,7 +1935,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
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 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
}
|
||||
|
||||
void _genFutureNull() {
|
||||
_genPushNull();
|
||||
asm.emitPushNull();
|
||||
_genStaticCall(futureValue, new ConstantArgDesc(1), 1);
|
||||
}
|
||||
|
||||
|
@ -2078,7 +2093,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
if (node.message != null) {
|
||||
node.message.accept(this);
|
||||
} else {
|
||||
_genPushNull();
|
||||
asm.emitPushNull();
|
||||
}
|
||||
|
||||
_genStaticCall(throwNewAssertionError, new ConstantArgDesc(3), 3);
|
||||
|
@ -2602,7 +2617,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
if (node.initializer != null) {
|
||||
node.initializer.accept(this);
|
||||
} else {
|
||||
_genPushNull();
|
||||
asm.emitPushNull();
|
||||
}
|
||||
if (isCaptured) {
|
||||
asm.emitStoreContextVar(locals.getVarIndexInContext(node));
|
||||
|
@ -2722,8 +2737,7 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
|
|||
|
||||
@override
|
||||
visitConstantExpression(ConstantExpression node) {
|
||||
int cpIndex = node.constant.accept(constantEmitter);
|
||||
asm.emitPushConstant(cpIndex);
|
||||
_genPushConstExpr(node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,25 +9,22 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,13 +14,12 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#4
|
||||
IndirectStaticCall 2, CP#3
|
||||
StoreStaticTOS CP#5
|
||||
PushConstant CP#6
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -110,7 +108,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#3
|
||||
IndirectStaticCall 1, CP#2
|
||||
ReturnTOS
|
||||
PushConstant CP#4
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -181,7 +176,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,22 +6,21 @@ import "./hello.dart" as hel;
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -13,37 +13,33 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#3
|
||||
IndirectStaticCall 3, CP#2
|
||||
Drop1
|
||||
PushConstant CP#4
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -133,7 +123,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -10,14 +10,13 @@ Bytecode {
|
|||
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!");
|
||||
|
|
|
@ -14,56 +14,50 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
IndirectStaticCall 2, CP#3
|
||||
Drop1
|
||||
ReturnTOS
|
||||
PushConstant CP#1
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -414,14 +391,13 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
IndirectStaticCall 2, CP#2
|
||||
Drop1
|
||||
ReturnTOS
|
||||
PushConstant CP#4
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -467,7 +442,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
IndirectStaticCall 1, CP#7
|
||||
Drop1
|
||||
Drop1
|
||||
PushConstant CP#9
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -507,7 +481,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#5
|
||||
IndirectStaticCall 1, CP#4
|
||||
Drop1
|
||||
PushConstant CP#6
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -614,7 +583,6 @@ ConstantPool {
|
|||
[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();
|
||||
|
|
|
@ -100,7 +100,7 @@ Bytecode {
|
|||
PushConstant CP#5
|
||||
IndirectStaticCall 1, CP#4
|
||||
Drop1
|
||||
PushConstant CP#6
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -110,7 +110,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#3
|
||||
IndirectStaticCall 1, CP#2
|
||||
Drop1
|
||||
PushConstant CP#4
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -155,7 +153,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
PushConstant CP#6
|
||||
IndirectStaticCall 1, CP#5
|
||||
Drop1
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -240,13 +235,12 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ static const field core::String c2 = "hello!";
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ ConstantPool {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#4
|
||||
IndirectStaticCall 1, CP#1
|
||||
Drop1
|
||||
PushConstant CP#5
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -675,7 +655,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -6,50 +6,46 @@ import "dart:core" as core;
|
|||
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 @@ ConstantPool {
|
|||
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 @@ L2:
|
|||
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 @@ ConstantPool {
|
|||
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 @@ L2:
|
|||
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 @@ ConstantPool {
|
|||
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 @@ L2:
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -9,77 +9,73 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
Frame 1
|
||||
CheckStack
|
||||
CheckFunctionTypeArgs 2, 4
|
||||
PushConstant CP#3
|
||||
PushNull
|
||||
Push r4
|
||||
InstantiateType CP#4
|
||||
PushConstant CP#6
|
||||
|
@ -245,7 +237,7 @@ Bytecode {
|
|||
PushConstant CP#8
|
||||
IndirectStaticCall 1, CP#5
|
||||
Drop1
|
||||
PushConstant CP#3
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -279,7 +271,7 @@ Bytecode {
|
|||
PushConstant CP#7
|
||||
IndirectStaticCall 3, CP#6
|
||||
Drop1
|
||||
PushConstant CP#8
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -291,7 +283,6 @@ ConstantPool {
|
|||
[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");
|
||||
|
|
|
@ -11,13 +11,12 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
] set bazz(core::int x) → void {}
|
||||
}
|
||||
|
@ -70,13 +65,12 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
PushConstant CP#3
|
||||
InstanceCall 3, CP#5
|
||||
ReturnTOS
|
||||
PushConstant CP#6
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
|
@ -162,7 +152,6 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
[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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -6,60 +6,52 @@ import "dart:core" as core;
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,13 +11,12 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ class E<P extends core::String = core::String> extends core::Object {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ Bytecode {
|
|||
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 @@ ConstantPool {
|
|||
Bytecode {
|
||||
Entry 0
|
||||
CheckStack
|
||||
PushConstant CP#0
|
||||
PushNull
|
||||
ReturnTOS
|
||||
}
|
||||
ConstantPool {
|
||||
[0] = Null
|
||||
}
|
||||
]static method main() → dynamic {}
|
||||
|
|
|
@ -626,6 +626,25 @@ void BytecodeFlowGraphBuilder::BuildPushConstant() {
|
|||
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();
|
||||
|
|
|
@ -51,7 +51,11 @@ namespace kernel {
|
|||
M(PopLocal) \
|
||||
M(Push) \
|
||||
M(PushConstant) \
|
||||
M(PushFalse) \
|
||||
M(PushInt) \
|
||||
M(PushNull) \
|
||||
M(PushStatic) \
|
||||
M(PushTrue) \
|
||||
M(ReturnTOS) \
|
||||
M(SetFrame) \
|
||||
M(StoreContextParent) \
|
||||
|
|
|
@ -154,6 +154,22 @@ namespace dart {
|
|||
// 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 @@ namespace dart {
|
|||
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, ___) \
|
||||
|
|
|
@ -2273,6 +2273,30 @@ RawObject* Interpreter::Call(RawFunction* function,
|
|||
DISPATCH();
|
||||
}
|
||||
|
||||
{
|
||||
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];
|
||||
|
|
Loading…
Reference in a new issue