2016-12-01 09:42:07 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: no
|
|
|
|
test function name: test
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var test;
|
|
|
|
(function() {
|
|
|
|
class A {
|
|
|
|
constructor(...args) { this.baseArgs = args; }
|
|
|
|
}
|
|
|
|
class B extends A {}
|
|
|
|
test = new B(1, 2, 3).constructor;
|
|
|
|
})();
|
|
|
|
"
|
2017-01-18 10:34:24 +00:00
|
|
|
frame size: 4
|
2016-12-01 09:42:07 +00:00
|
|
|
parameter count: 1
|
2017-01-18 10:34:24 +00:00
|
|
|
bytecode array length: 23
|
2016-12-01 09:42:07 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(CreateRestParameter),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(new_target), R(0),
|
|
|
|
B(Ldar), R(new_target),
|
|
|
|
/* 93 E> */ B(StackCheck),
|
2016-12-19 10:12:22 +00:00
|
|
|
/* 93 S> */ B(Ldar), R(1),
|
|
|
|
B(GetSuperConstructor), R(3),
|
2017-01-18 10:34:24 +00:00
|
|
|
B(Ldar), R(0),
|
|
|
|
/* 93 E> */ B(NewWithSpread), R(3), R(2), U8(1),
|
2016-12-01 09:42:07 +00:00
|
|
|
/* 93 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var test;
|
|
|
|
(function() {
|
|
|
|
class A {
|
|
|
|
constructor(...args) { this.baseArgs = args; }
|
|
|
|
}
|
|
|
|
class B extends A {
|
|
|
|
constructor(...args) { super(1, ...args); }
|
|
|
|
}
|
|
|
|
test = new B(1, 2, 3).constructor;
|
|
|
|
})();
|
|
|
|
"
|
2017-01-18 10:34:24 +00:00
|
|
|
frame size: 6
|
2016-12-01 09:42:07 +00:00
|
|
|
parameter count: 1
|
2017-01-18 10:34:24 +00:00
|
|
|
bytecode array length: 59
|
2016-12-01 09:42:07 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(CreateRestParameter),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(new_target), R(0),
|
|
|
|
B(Ldar), R(new_target),
|
|
|
|
/* 128 E> */ B(StackCheck),
|
2016-12-19 10:12:22 +00:00
|
|
|
/* 140 S> */ B(Ldar), R(1),
|
|
|
|
B(GetSuperConstructor), R(3),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(LdaSmi), I8(1),
|
2017-01-18 10:34:24 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(Ldar), R(0),
|
|
|
|
B(Mov), R(2), R(5),
|
|
|
|
/* 140 E> */ B(NewWithSpread), R(3), R(4), U8(2),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(Ldar), R(this),
|
|
|
|
B(JumpIfNotHole), U8(4),
|
2017-01-06 20:26:02 +00:00
|
|
|
B(Jump), U8(7),
|
|
|
|
/* 140 E> */ B(CallRuntime), U16(Runtime::kThrowSuperAlreadyCalledError), R(0), U8(0),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(Mov), R(3), R(this),
|
|
|
|
B(Ldar), R(this),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(0),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
|
|
|
|
/* 159 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"],
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var test;
|
|
|
|
(function() {
|
|
|
|
class A {
|
|
|
|
constructor(...args) { this.baseArgs = args; }
|
|
|
|
}
|
|
|
|
class B extends A {
|
|
|
|
constructor(...args) { super(1, ...args, 1); }
|
|
|
|
}
|
|
|
|
test = new B(1, 2, 3).constructor;
|
|
|
|
})();
|
|
|
|
"
|
2016-12-15 10:59:57 +00:00
|
|
|
frame size: 9
|
2016-12-01 09:42:07 +00:00
|
|
|
parameter count: 1
|
2017-01-06 20:26:02 +00:00
|
|
|
bytecode array length: 92
|
2016-12-01 09:42:07 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(CreateRestParameter),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(Mov), R(closure), R(1),
|
|
|
|
B(Mov), R(new_target), R(0),
|
|
|
|
B(Ldar), R(new_target),
|
|
|
|
/* 128 E> */ B(StackCheck),
|
|
|
|
/* 140 S> */ B(LdaUndefined),
|
|
|
|
B(Star), R(3),
|
|
|
|
/* 140 E> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaUndefined),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(5),
|
2017-01-30 12:31:35 +00:00
|
|
|
B(CreateArrayLiteral), U8(0), U8(2), U8(9),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(6),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(LdaUndefined),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(7),
|
|
|
|
B(Mov), R(2), R(8),
|
2016-12-21 16:41:11 +00:00
|
|
|
/* 152 E> */ B(CallJSRuntime), U8(%spread_iterable), R(7), U8(2),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(7),
|
2017-01-30 12:31:35 +00:00
|
|
|
B(CreateArrayLiteral), U8(1), U8(3), U8(9),
|
2016-12-15 10:59:57 +00:00
|
|
|
B(Star), R(8),
|
2016-12-21 16:41:11 +00:00
|
|
|
B(CallJSRuntime), U8(%spread_arguments), R(5), U8(4),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(Star), R(5),
|
|
|
|
B(Mov), R(0), R(6),
|
2016-12-21 16:41:11 +00:00
|
|
|
/* 140 E> */ B(CallJSRuntime), U8(%reflect_construct), R(3), U8(4),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(Star), R(3),
|
|
|
|
B(Ldar), R(this),
|
|
|
|
B(JumpIfNotHole), U8(4),
|
2017-01-06 20:26:02 +00:00
|
|
|
B(Jump), U8(7),
|
|
|
|
/* 140 E> */ B(CallRuntime), U16(Runtime::kThrowSuperAlreadyCalledError), R(0), U8(0),
|
2016-12-01 09:42:07 +00:00
|
|
|
B(Mov), R(3), R(this),
|
|
|
|
B(Ldar), R(this),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(2),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
|
|
|
|
/* 162 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
2016-12-16 10:57:06 +00:00
|
|
|
CONSTANT_ELEMENTS_PAIR_TYPE,
|
|
|
|
CONSTANT_ELEMENTS_PAIR_TYPE,
|
2016-12-01 09:42:07 +00:00
|
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"],
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|