a192639e2f
JS runtime calls are always created with undefined recievers, so make the bytecode behave similarly to CallUndefinedReciever such that we don't need to push an explicit undefined register for the receiver for such calls. Modifies the Async[Generator/Function]Await[Caught/Uncaught] runtime calls to pass the generator in the first argument rather than the reciever since these runtime calls were desugered in the bytecode generator and explicitly passed the generator in the receiver. Change-Id: I36c8087bb3b663dccd805bfdb1eea04eb6a73269 Reviewed-on: https://chromium-review.googlesource.com/654257 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#47870}
137 lines
4.0 KiB
Plaintext
137 lines
4.0 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: yes
|
|
|
|
---
|
|
snippet: "
|
|
class A { constructor(...args) { this.args = args; } }
|
|
new A(...[1, 2, 3]);
|
|
"
|
|
frame size: 7
|
|
parameter count: 1
|
|
bytecode array length: 57
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateClosure), U8(0), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(34),
|
|
B(Star), R(5),
|
|
B(LdaSmi), I8(88),
|
|
B(Star), R(6),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
|
|
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
|
|
B(Star), R(0),
|
|
B(Star), R(1),
|
|
/* 89 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(37),
|
|
B(Star), R(3),
|
|
B(Ldar), R(1),
|
|
/* 89 E> */ B(ConstructWithSpread), R(1), R(3), U8(1), U8(1),
|
|
B(LdaUndefined),
|
|
/* 110 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
TUPLE2_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
class A { constructor(...args) { this.args = args; } }
|
|
new A(0, ...[1, 2, 3]);
|
|
"
|
|
frame size: 7
|
|
parameter count: 1
|
|
bytecode array length: 60
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateClosure), U8(0), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(34),
|
|
B(Star), R(5),
|
|
B(LdaSmi), I8(88),
|
|
B(Star), R(6),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
|
|
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
|
|
B(Star), R(0),
|
|
B(Star), R(1),
|
|
/* 89 S> */ B(LdaZero),
|
|
B(Star), R(3),
|
|
B(CreateArrayLiteral), U8(1), U8(3), U8(37),
|
|
B(Star), R(4),
|
|
B(Ldar), R(1),
|
|
/* 89 E> */ B(ConstructWithSpread), R(1), R(3), U8(2), U8(1),
|
|
B(LdaUndefined),
|
|
/* 113 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
TUPLE2_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
class A { constructor(...args) { this.args = args; } }
|
|
new A(0, ...[1, 2, 3], 4);
|
|
"
|
|
frame size: 7
|
|
parameter count: 1
|
|
bytecode array length: 81
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateClosure), U8(0), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(34),
|
|
B(Star), R(5),
|
|
B(LdaSmi), I8(88),
|
|
B(Star), R(6),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
|
|
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
|
|
B(Star), R(0),
|
|
B(Star), R(1),
|
|
/* 89 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
|
|
B(Star), R(3),
|
|
B(CreateArrayLiteral), U8(2), U8(2), U8(37),
|
|
B(Star), R(4),
|
|
B(CallJSRuntime), U8(%spread_iterable), R(4), U8(1),
|
|
B(Star), R(4),
|
|
B(CreateArrayLiteral), U8(3), U8(3), U8(37),
|
|
B(Star), R(5),
|
|
B(CallJSRuntime), U8(%spread_arguments), R(3), U8(3),
|
|
B(Star), R(3),
|
|
B(Mov), R(1), R(2),
|
|
B(CallJSRuntime), U8(%reflect_construct), R(2), U8(2),
|
|
B(LdaUndefined),
|
|
/* 116 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
TUPLE2_TYPE,
|
|
TUPLE2_TYPE,
|
|
TUPLE2_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|