fd75c97d3f
Calls with a spread expression in a non-final position get transformed to calls to Reflect.apply. This transformation is currently done in the parser, which does not compose well with other features (e.g. direct eval checking, optional chaining). Do this transform in the BytecodeGenerator instead. Bug: v8:11573, v8:11558, v8:5690 Change-Id: I56c90a2036fe5b43e0897c57766f666bf72bc3a8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2765783 Auto-Submit: Shu-yu Guo <syg@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#73534}
121 lines
3.4 KiB
Plaintext
121 lines
3.4 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: yes
|
|
|
|
---
|
|
snippet: "
|
|
Math.max(...[1, 2, 3]);
|
|
"
|
|
frame size: 3
|
|
parameter count: 1
|
|
bytecode array length: 21
|
|
bytecodes: [
|
|
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
|
|
B(Star1),
|
|
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
|
|
B(Star0),
|
|
B(CreateArrayLiteral), U8(2), U8(4), U8(37),
|
|
B(Star2),
|
|
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(2), U8(5),
|
|
B(LdaUndefined),
|
|
/* 58 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
Math.max(0, ...[1, 2, 3]);
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 23
|
|
bytecodes: [
|
|
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
|
|
B(Star1),
|
|
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
|
|
B(Star0),
|
|
B(LdaZero),
|
|
B(Star2),
|
|
B(CreateArrayLiteral), U8(2), U8(4), U8(37),
|
|
B(Star3),
|
|
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(3), U8(5),
|
|
B(LdaUndefined),
|
|
/* 61 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
Math.max(0, ...[1, 2, 3], 4);
|
|
"
|
|
frame size: 7
|
|
parameter count: 1
|
|
bytecode array length: 95
|
|
bytecodes: [
|
|
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
|
|
B(Star1),
|
|
/* 39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
|
|
B(Star0),
|
|
B(CreateEmptyArrayLiteral), U8(4),
|
|
B(Star3),
|
|
B(LdaZero),
|
|
B(Star2),
|
|
B(LdaZero),
|
|
B(StaInArrayLiteral), R(3), R(2), U8(5),
|
|
B(Ldar), R(2),
|
|
B(Inc), U8(7),
|
|
B(Star2),
|
|
/* 49 S> */ B(CreateArrayLiteral), U8(2), U8(8), U8(37),
|
|
B(Star6),
|
|
/* 49 E> */ B(GetIterator), R(6), U8(9), U8(11),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star5),
|
|
B(LdaNamedProperty), R(5), U8(3), U8(13),
|
|
B(Star4),
|
|
B(CallProperty0), R(4), R(5), U8(19),
|
|
B(Star6),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
|
B(LdaNamedProperty), R(6), U8(4), U8(21),
|
|
B(JumpIfToBooleanTrue), U8(18),
|
|
B(LdaNamedProperty), R(6), U8(5), U8(15),
|
|
B(StaInArrayLiteral), R(3), R(2), U8(5),
|
|
B(Ldar), R(2),
|
|
B(Inc), U8(7),
|
|
B(Star2),
|
|
B(JumpLoop), U8(31), I8(0),
|
|
B(LdaSmi), I8(4),
|
|
B(StaInArrayLiteral), R(3), R(2), U8(5),
|
|
B(Mov), R(3), R(2),
|
|
/* 39 E> */ B(CallJSRuntime), U8(%reflect_apply), R(0), U8(3),
|
|
B(LdaUndefined),
|
|
/* 64 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|