4671cb5644
This reverts commit 91e3243d60
.
Reason for revert: This deopts to the wrong point.
Original change's description:
> Extend GetIterator bytecode to perform JSReceiver check on object[Symbol.iterator]()
>
> Current GetIterator bytecode loads and calls @@iterator property on a
> given object. This change extends the bytecode functionality to check
> whether the value returned after calling @@iterator property is a valid
> JSReceiver. The bytecode throws SymbolIteratorInvalid exception if the
> returned value is not a valid JSReceiver. This change absorbs the
> functionality of additional two bytecodes - JumpIfJSReceiver and
> CallRuntime, that are part of the iterator protocol in the GetIterator
> bytecode.
>
> Bug: v8:9489
> Change-Id: I9e84cfe85eeb9a1b8a97ca0595375ac26ba1bbfd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1792905
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Swapnil Gaikwad <swapnilgaikwad@google.com>
> Cr-Commit-Position: refs/heads/master@{#63704}
TBR=rmcilroy@chromium.org,leszeks@chromium.org,tebbi@chromium.org,swapnilgaikwad@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:9489
Change-Id: I9324b5b01ead29912ad793a1e7b4d009643d7901
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1960288
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65541}
157 lines
4.7 KiB
Plaintext
157 lines
4.7 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: yes
|
|
|
|
---
|
|
snippet: "
|
|
class A { constructor(...args) { this.args = args; } }
|
|
new A(...[1, 2, 3]);
|
|
"
|
|
frame size: 6
|
|
parameter count: 1
|
|
bytecode array length: 48
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(0),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(Star), R(5),
|
|
B(CreateClosure), U8(2), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(3),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
|
|
B(Star), R(3),
|
|
B(PopContext), R(1),
|
|
B(Mov), R(4), R(0),
|
|
/* 89 S> */ B(CreateArrayLiteral), U8(3), U8(0), U8(37),
|
|
B(Star), R(2),
|
|
B(Ldar), R(0),
|
|
/* 89 E> */ B(ConstructWithSpread), R(0), R(2), U8(1), U8(1),
|
|
B(LdaUndefined),
|
|
/* 110 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SCOPE_INFO_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
class A { constructor(...args) { this.args = args; } }
|
|
new A(0, ...[1, 2, 3]);
|
|
"
|
|
frame size: 6
|
|
parameter count: 1
|
|
bytecode array length: 51
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(0),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(Star), R(5),
|
|
B(CreateClosure), U8(2), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(3),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
|
|
B(Star), R(3),
|
|
B(PopContext), R(1),
|
|
B(Mov), R(4), R(0),
|
|
/* 89 S> */ B(LdaZero),
|
|
B(Star), R(2),
|
|
B(CreateArrayLiteral), U8(3), U8(0), U8(37),
|
|
B(Star), R(3),
|
|
B(Ldar), R(0),
|
|
/* 89 E> */ B(ConstructWithSpread), R(0), R(2), U8(2), U8(1),
|
|
B(LdaUndefined),
|
|
/* 113 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SCOPE_INFO_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
ARRAY_BOILERPLATE_DESCRIPTION_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: 122
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(0),
|
|
B(PushContext), R(1),
|
|
B(LdaTheHole),
|
|
B(Star), R(5),
|
|
B(CreateClosure), U8(2), U8(0), U8(2),
|
|
B(Star), R(2),
|
|
B(LdaConstant), U8(1),
|
|
B(Star), R(3),
|
|
B(Mov), R(2), R(4),
|
|
B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
|
|
B(Star), R(3),
|
|
B(PopContext), R(1),
|
|
B(Mov), R(4), R(0),
|
|
/* 89 S> */ B(CreateArrayLiteral), U8(3), U8(0), U8(37),
|
|
B(Star), R(3),
|
|
B(LdaConstant), U8(4),
|
|
B(Star), R(2),
|
|
/* 101 S> */ B(CreateArrayLiteral), U8(5), U8(1), U8(37),
|
|
B(Star), R(6),
|
|
B(GetIterator), R(6), U8(2), U8(4),
|
|
B(Mov), R(4), R(1),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(5),
|
|
B(LdaNamedProperty), R(5), U8(6), U8(6),
|
|
B(Star), R(4),
|
|
B(CallProperty0), R(4), R(5), U8(15),
|
|
B(Star), R(6),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
|
B(LdaNamedProperty), R(6), U8(7), U8(17),
|
|
B(JumpIfToBooleanTrue), U8(19),
|
|
B(LdaNamedProperty), R(6), U8(8), U8(8),
|
|
B(StaInArrayLiteral), R(3), R(2), U8(13),
|
|
B(Ldar), R(2),
|
|
B(Inc), U8(12),
|
|
B(Star), R(2),
|
|
B(JumpLoop), U8(33), I8(0),
|
|
B(LdaSmi), I8(4),
|
|
B(StaInArrayLiteral), R(3), R(2), U8(13),
|
|
B(Mov), R(3), R(2),
|
|
B(CallJSRuntime), U8(%reflect_construct), R(1), U8(2),
|
|
B(LdaUndefined),
|
|
/* 116 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SCOPE_INFO_TYPE,
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
Smi [1],
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|