Index: test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden b/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6d95afcf75f183a0e57a9dddefe6db46e9ba2cde |
--- /dev/null |
+++ b/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden |
@@ -0,0 +1,166 @@ |
+# |
+# 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; |
+ })(); |
+" |
+frame size: 9 |
+parameter count: 1 |
+bytecode array length: 40 |
+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), |
+ /* 93 S> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1), |
+ B(Star), R(3), |
+ B(CallRuntime), U16(Runtime::kSpreadIterablePrepareVarargs), R(2), U8(1), |
+ B(Star), R(7), |
+ B(LdaUndefined), |
+ B(Star), R(5), |
+ B(Mov), R(3), R(6), |
+ B(Mov), R(0), R(8), |
+ /* 93 E> */ B(CallJSRuntime), U8(150), R(5), U8(4), |
+ /* 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; |
+ })(); |
+" |
+frame size: 10 |
+parameter count: 1 |
+bytecode array length: 80 |
+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(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1), |
+ B(Star), R(3), |
+ B(LdaSmi), U8(1), |
+ B(Star), R(4), |
+ B(Mov), R(2), R(5), |
+ /* 152 E> */ B(CallRuntime), U16(Runtime::kSpreadIterablePrepareVarargs), R(4), U8(2), |
+ B(Star), R(8), |
+ B(LdaUndefined), |
+ B(Star), R(6), |
+ B(Mov), R(3), R(7), |
+ B(Mov), R(0), R(9), |
+ /* 140 E> */ B(CallJSRuntime), U8(150), R(6), U8(4), |
+ B(Star), R(3), |
+ B(Ldar), R(this), |
+ B(JumpIfNotHole), U8(4), |
+ B(Jump), U8(11), |
+ B(LdaConstant), U8(0), |
+ B(Star), R(4), |
+ /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
+ 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; |
+ })(); |
+" |
+frame size: 13 |
+parameter count: 1 |
+bytecode array length: 96 |
+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), |
+ B(Star), R(7), |
+ B(CreateArrayLiteral), U8(0), U8(0), U8(9), |
+ B(Star), R(8), |
+ B(LdaUndefined), |
+ B(Star), R(11), |
+ B(Mov), R(2), R(12), |
+ /* 152 E> */ B(CallJSRuntime), U8(154), R(11), U8(2), |
+ B(Star), R(9), |
+ B(CreateArrayLiteral), U8(1), U8(1), U8(9), |
+ B(Star), R(10), |
+ B(CallJSRuntime), U8(153), R(7), U8(4), |
+ B(Star), R(5), |
+ B(Mov), R(0), R(6), |
+ /* 140 E> */ B(CallJSRuntime), U8(150), R(3), U8(4), |
+ B(Star), R(3), |
+ B(Ldar), R(this), |
+ B(JumpIfNotHole), U8(4), |
+ B(Jump), U8(11), |
+ B(LdaConstant), U8(2), |
+ B(Star), R(4), |
+ /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
+ 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: [ |
+ FIXED_ARRAY_TYPE, |
+ FIXED_ARRAY_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"], |
+] |
+handlers: [ |
+] |
+ |