v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
Sathya Gunasekaran eb4ebf98c9 [class] Initialize class fields after binding this
Class fields needs to be initialized after `this` is bound, as per the
new spec change:
https://github.com/tc39/proposal-class-fields/pull/92

This CL moves the initialization of `this` from parser desugaring to
the bytecode generator.

Bug: v8:7647
Change-Id: I20f749403e5a4d2f06a39726cf39012ceb541987
Reviewed-on: https://chromium-review.googlesource.com/1014383
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52646}
2018-04-17 13:40:39 +00:00

163 lines
4.5 KiB
Plaintext

#
# 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: 5
parameter count: 1
bytecode array length: 19
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
/* 93 E> */ B(StackCheck),
/* 93 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(4),
B(Ldar), R(0),
/* 93 E> */ B(ConstructWithSpread), R(4), R(2), U8(1), U8(0),
/* 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: 9
parameter count: 1
bytecode array length: 40
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
/* 128 E> */ B(StackCheck),
B(Mov), R(2), R(3),
/* 140 S> */ B(Ldar), R(closure),
B(GetSuperConstructor), R(5),
B(LdaSmi), I8(1),
B(Star), R(6),
B(Ldar), R(0),
B(Mov), R(2), R(7),
/* 140 E> */ B(ConstructWithSpread), R(5), R(6), U8(2), U8(0),
B(Star), R(8),
B(Ldar), R(this),
B(ThrowSuperAlreadyCalledIfNotHole),
B(Mov), R(8), R(this),
B(Ldar), R(this),
B(ThrowSuperNotCalledIfHole),
/* 159 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, 1); }
}
test = new B(1, 2, 3).constructor;
})();
"
frame size: 13
parameter count: 1
bytecode array length: 137
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
/* 128 E> */ B(StackCheck),
B(Mov), R(2), R(3),
/* 140 S> */ B(Ldar), R(closure),
B(GetSuperConstructor), R(5),
B(CreateEmptyArrayLiteral), U8(0),
B(Star), R(6),
B(LdaZero),
B(Star), R(7),
B(LdaSmi), I8(1),
B(StaKeyedProperty), R(6), R(7), U8(1),
B(LdaConstant), U8(0),
/* 152 S> */ B(Star), R(7),
B(LdaNamedProperty), R(2), U8(1), U8(8),
B(Star), R(12),
B(CallProperty0), R(12), R(2), U8(10),
B(Mov), R(2), R(11),
B(Mov), R(1), R(4),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(10),
B(LdaNamedProperty), R(10), U8(2), U8(12),
B(Star), R(9),
B(CallProperty0), R(9), R(10), U8(14),
B(Star), R(8),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
B(LdaNamedProperty), R(8), U8(3), U8(16),
B(JumpIfToBooleanTrue), U8(21),
B(LdaNamedProperty), R(8), U8(4), U8(18),
B(Star), R(8),
B(StaInArrayLiteral), R(6), R(7), U8(3),
B(Ldar), R(7),
B(Inc), U8(5),
B(Star), R(7),
B(JumpLoop), U8(35), I8(0),
B(LdaSmi), I8(1),
B(StaInArrayLiteral), R(6), R(7), U8(3),
B(Ldar), R(7),
B(Inc), U8(5),
B(Star), R(7),
B(Mov), R(5), R(8),
B(Mov), R(6), R(9),
B(Mov), R(0), R(10),
/* 140 E> */ B(CallJSRuntime), U8(%reflect_construct), R(8), U8(3),
B(Star), R(11),
B(Ldar), R(this),
B(ThrowSuperAlreadyCalledIfNotHole),
B(Mov), R(11), R(this),
B(Ldar), R(this),
B(ThrowSuperNotCalledIfHole),
/* 162 S> */ B(Return),
]
constant pool: [
Smi [1],
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
]
handlers: [
]