[interpreter] add JumpIfUndefinedOrNull
Cleans up a plethora of JumpIfUndefined().JumpIfNull() occurances by introducing a new JumpIfUndefinedOrNull bytecode. Change-Id: I715e9dd82ca8309e0f3eb6514ddec19b4efe7dbe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1743148 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#63130}
This commit is contained in:
parent
704fa7ada1
commit
b54dbdc6bf
@ -3132,6 +3132,16 @@ void BytecodeGraphBuilder::VisitJumpIfNotUndefinedConstant() {
|
||||
BuildJumpIfNotEqual(jsgraph()->UndefinedConstant());
|
||||
}
|
||||
|
||||
void BytecodeGraphBuilder::VisitJumpIfUndefinedOrNull() {
|
||||
BuildJumpIfEqual(jsgraph()->UndefinedConstant());
|
||||
BuildJumpIfEqual(jsgraph()->NullConstant());
|
||||
}
|
||||
|
||||
void BytecodeGraphBuilder::VisitJumpIfUndefinedOrNullConstant() {
|
||||
BuildJumpIfEqual(jsgraph()->UndefinedConstant());
|
||||
BuildJumpIfEqual(jsgraph()->NullConstant());
|
||||
}
|
||||
|
||||
void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); }
|
||||
|
||||
void BytecodeGraphBuilder::BuildSwitchOnSmi(Node* condition) {
|
||||
|
@ -1159,6 +1159,13 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfUndefined(
|
||||
return *this;
|
||||
}
|
||||
|
||||
BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfUndefinedOrNull(
|
||||
BytecodeLabel* label) {
|
||||
DCHECK(!label->is_bound());
|
||||
OutputJumpIfUndefinedOrNull(label, 0);
|
||||
return *this;
|
||||
}
|
||||
|
||||
BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfNotUndefined(
|
||||
BytecodeLabel* label) {
|
||||
DCHECK(!label->is_bound());
|
||||
|
@ -418,6 +418,7 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
|
||||
BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label);
|
||||
BytecodeArrayBuilder& JumpIfNotNull(BytecodeLabel* label);
|
||||
BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label);
|
||||
BytecodeArrayBuilder& JumpIfUndefinedOrNull(BytecodeLabel* label);
|
||||
BytecodeArrayBuilder& JumpIfNotUndefined(BytecodeLabel* label);
|
||||
BytecodeArrayBuilder& JumpIfNil(BytecodeLabel* label, Token::Value op,
|
||||
NilValue nil);
|
||||
|
@ -286,6 +286,8 @@ Bytecode GetJumpWithConstantOperand(Bytecode jump_bytecode) {
|
||||
return Bytecode::kJumpIfUndefinedConstant;
|
||||
case Bytecode::kJumpIfNotUndefined:
|
||||
return Bytecode::kJumpIfNotUndefinedConstant;
|
||||
case Bytecode::kJumpIfUndefinedOrNull:
|
||||
return Bytecode::kJumpIfUndefinedOrNullConstant;
|
||||
case Bytecode::kJumpIfJSReceiver:
|
||||
return Bytecode::kJumpIfJSReceiverConstant;
|
||||
default:
|
||||
|
@ -1777,14 +1777,13 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
||||
return;
|
||||
}
|
||||
|
||||
BytecodeLabel subject_null_label, subject_undefined_label;
|
||||
BytecodeLabel subject_undefined_label;
|
||||
FeedbackSlot slot = feedback_spec()->AddForInSlot();
|
||||
|
||||
// Prepare the state for executing ForIn.
|
||||
builder()->SetExpressionAsStatementPosition(stmt->subject());
|
||||
VisitForAccumulatorValue(stmt->subject());
|
||||
builder()->JumpIfUndefined(&subject_undefined_label);
|
||||
builder()->JumpIfNull(&subject_null_label);
|
||||
builder()->JumpIfUndefinedOrNull(&subject_undefined_label);
|
||||
Register receiver = register_allocator()->NewRegister();
|
||||
builder()->ToObject(receiver);
|
||||
|
||||
@ -1826,7 +1825,6 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
||||
builder()->StoreAccumulatorInRegister(index);
|
||||
loop_builder.JumpToHeader(loop_depth_);
|
||||
}
|
||||
builder()->Bind(&subject_null_label);
|
||||
builder()->Bind(&subject_undefined_label);
|
||||
}
|
||||
|
||||
@ -3357,8 +3355,7 @@ void BytecodeGenerator::BuildFinalizeIteration(
|
||||
ast_string_constants()->return_string(),
|
||||
feedback_index(feedback_spec()->AddLoadICSlot()))
|
||||
.StoreAccumulatorInRegister(method)
|
||||
.JumpIfUndefined(iterator_is_done.New())
|
||||
.JumpIfNull(iterator_is_done.New());
|
||||
.JumpIfUndefinedOrNull(iterator_is_done.New());
|
||||
|
||||
{
|
||||
RegisterAllocationScope register_scope(this);
|
||||
@ -4342,11 +4339,8 @@ void BytecodeGenerator::VisitThrow(Throw* expr) {
|
||||
void BytecodeGenerator::VisitPropertyLoad(Register obj, Property* property) {
|
||||
if (property->is_optional_chain_link()) {
|
||||
DCHECK_NOT_NULL(optional_chaining_null_labels_);
|
||||
// TODO(ignition): Add a single opcode for JumpIfNullOrUndefined
|
||||
builder()
|
||||
->LoadAccumulatorWithRegister(obj)
|
||||
.JumpIfUndefined(optional_chaining_null_labels_->New())
|
||||
.JumpIfNull(optional_chaining_null_labels_->New());
|
||||
builder()->LoadAccumulatorWithRegister(obj).JumpIfUndefinedOrNull(
|
||||
optional_chaining_null_labels_->New());
|
||||
}
|
||||
|
||||
AssignType property_kind = Property::GetAssignType(property);
|
||||
@ -4593,11 +4587,8 @@ void BytecodeGenerator::VisitCall(Call* expr) {
|
||||
|
||||
if (expr->is_optional_chain_link()) {
|
||||
DCHECK_NOT_NULL(optional_chaining_null_labels_);
|
||||
// TODO(ignition): Add a single opcode for JumpIfNullOrUndefined
|
||||
builder()
|
||||
->LoadAccumulatorWithRegister(callee)
|
||||
.JumpIfUndefined(optional_chaining_null_labels_->New())
|
||||
.JumpIfNull(optional_chaining_null_labels_->New());
|
||||
builder()->LoadAccumulatorWithRegister(callee).JumpIfUndefinedOrNull(
|
||||
optional_chaining_null_labels_->New());
|
||||
}
|
||||
|
||||
// Evaluate all arguments to the function call and store in sequential args
|
||||
@ -4869,9 +4860,7 @@ void BytecodeGenerator::VisitDelete(UnaryOperation* unary) {
|
||||
BytecodeLabel done;
|
||||
OptionalChainNullLabelScope label_scope(this);
|
||||
VisitForAccumulatorValue(property->obj());
|
||||
builder()
|
||||
->JumpIfUndefined(label_scope.labels()->New())
|
||||
.JumpIfNull(label_scope.labels()->New());
|
||||
builder()->JumpIfUndefinedOrNull(label_scope.labels()->New());
|
||||
Register object = register_allocator()->NewRegister();
|
||||
builder()->StoreAccumulatorInRegister(object);
|
||||
VisitForAccumulatorValue(property->key());
|
||||
@ -5262,10 +5251,8 @@ void BytecodeGenerator::BuildGetIterator(IteratorType hint) {
|
||||
builder()->StoreAccumulatorInRegister(obj).LoadAsyncIteratorProperty(
|
||||
obj, feedback_index(feedback_spec()->AddLoadICSlot()));
|
||||
|
||||
BytecodeLabel async_iterator_undefined, async_iterator_null, done;
|
||||
// TODO(ignition): Add a single opcode for JumpIfNullOrUndefined
|
||||
builder()->JumpIfUndefined(&async_iterator_undefined);
|
||||
builder()->JumpIfNull(&async_iterator_null);
|
||||
BytecodeLabel async_iterator_undefined, done;
|
||||
builder()->JumpIfUndefinedOrNull(&async_iterator_undefined);
|
||||
|
||||
// Let iterator be Call(method, obj)
|
||||
builder()->StoreAccumulatorInRegister(method).CallProperty(
|
||||
@ -5276,7 +5263,6 @@ void BytecodeGenerator::BuildGetIterator(IteratorType hint) {
|
||||
builder()->CallRuntime(Runtime::kThrowSymbolAsyncIteratorInvalid);
|
||||
|
||||
builder()->Bind(&async_iterator_undefined);
|
||||
builder()->Bind(&async_iterator_null);
|
||||
// If method is undefined,
|
||||
// Let syncMethod be GetMethod(obj, @@iterator)
|
||||
builder()
|
||||
@ -5366,8 +5352,7 @@ void BytecodeGenerator::BuildCallIteratorMethod(Register iterator,
|
||||
FeedbackSlot slot = feedback_spec()->AddLoadICSlot();
|
||||
builder()
|
||||
->LoadNamedProperty(iterator, method_name, feedback_index(slot))
|
||||
.JumpIfUndefined(if_notcalled->New())
|
||||
.JumpIfNull(if_notcalled->New())
|
||||
.JumpIfUndefinedOrNull(if_notcalled->New())
|
||||
.StoreAccumulatorInRegister(method)
|
||||
.CallProperty(method, receiver_and_args,
|
||||
feedback_index(feedback_spec()->AddCallICSlot()))
|
||||
|
@ -298,6 +298,7 @@ namespace interpreter {
|
||||
V(JumpIfNotNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfNotUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfUndefinedOrNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
|
||||
@ -315,6 +316,7 @@ namespace interpreter {
|
||||
V(JumpIfNotNull, AccumulatorUse::kRead, OperandType::kUImm) \
|
||||
V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
|
||||
V(JumpIfNotUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
|
||||
V(JumpIfUndefinedOrNull, AccumulatorUse::kRead, OperandType::kUImm) \
|
||||
V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
|
||||
\
|
||||
/* Smi-table lookup for switch statements */ \
|
||||
@ -407,7 +409,8 @@ namespace interpreter {
|
||||
V(JumpIfNotNull) \
|
||||
V(JumpIfUndefined) \
|
||||
V(JumpIfNotUndefined) \
|
||||
V(JumpIfJSReceiver) \
|
||||
V(JumpIfUndefinedOrNull) \
|
||||
V(JumpIfJSReceiver)
|
||||
|
||||
#define JUMP_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
|
||||
JUMP_TOBOOLEAN_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
|
||||
@ -415,9 +418,10 @@ namespace interpreter {
|
||||
V(JumpIfNotNullConstant) \
|
||||
V(JumpIfUndefinedConstant) \
|
||||
V(JumpIfNotUndefinedConstant) \
|
||||
V(JumpIfUndefinedOrNullConstant) \
|
||||
V(JumpIfTrueConstant) \
|
||||
V(JumpIfFalseConstant) \
|
||||
V(JumpIfJSReceiverConstant) \
|
||||
V(JumpIfJSReceiverConstant)
|
||||
|
||||
#define JUMP_CONSTANT_BYTECODE_LIST(V) \
|
||||
JUMP_UNCONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
|
||||
|
@ -2288,6 +2288,41 @@ IGNITION_HANDLER(JumpIfNotUndefinedConstant, InterpreterAssembler) {
|
||||
JumpIfWordNotEqual(accumulator, UndefinedConstant(), relative_jump);
|
||||
}
|
||||
|
||||
// JumpIfUndefinedOrNull <imm>
|
||||
//
|
||||
// Jump by the number of bytes represented by an immediate operand if the object
|
||||
// referenced by the accumulator is the undefined constant or the null constant.
|
||||
IGNITION_HANDLER(JumpIfUndefinedOrNull, InterpreterAssembler) {
|
||||
Node* accumulator = GetAccumulator();
|
||||
|
||||
Label do_jump(this);
|
||||
GotoIf(IsUndefined(accumulator), &do_jump);
|
||||
GotoIf(IsNull(accumulator), &do_jump);
|
||||
Dispatch();
|
||||
|
||||
BIND(&do_jump);
|
||||
Node* relative_jump = BytecodeOperandUImmWord(0);
|
||||
Jump(relative_jump);
|
||||
}
|
||||
|
||||
// JumpIfUndefinedOrNullConstant <idx>
|
||||
//
|
||||
// Jump by the number of bytes in the Smi in the |idx| entry in the constant
|
||||
// pool if the object referenced by the accumulator is the undefined constant or
|
||||
// the null constant.
|
||||
IGNITION_HANDLER(JumpIfUndefinedOrNullConstant, InterpreterAssembler) {
|
||||
Node* accumulator = GetAccumulator();
|
||||
|
||||
Label do_jump(this);
|
||||
GotoIf(IsUndefined(accumulator), &do_jump);
|
||||
GotoIf(IsNull(accumulator), &do_jump);
|
||||
Dispatch();
|
||||
|
||||
BIND(&do_jump);
|
||||
Node* relative_jump = LoadAndUntagConstantPoolEntryAtOperandIndex(0);
|
||||
Jump(relative_jump);
|
||||
}
|
||||
|
||||
// JumpIfJSReceiver <imm>
|
||||
//
|
||||
// Jump by the number of bytes represented by an immediate operand if the object
|
||||
|
@ -214,7 +214,7 @@ snippet: "
|
||||
"
|
||||
frame size: 21
|
||||
parameter count: 1
|
||||
bytecode array length: 372
|
||||
bytecode array length: 370
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -293,11 +293,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(15),
|
||||
B(Ldar), R(12),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(9), U8(11), U8(13),
|
||||
B(Star), R(17),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(18),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -392,16 +391,16 @@ constant pool: [
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
SCOPE_INFO_TYPE,
|
||||
Smi [277],
|
||||
Smi [275],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
Smi [23],
|
||||
]
|
||||
handlers: [
|
||||
[20, 318, 326],
|
||||
[23, 282, 284],
|
||||
[20, 316, 324],
|
||||
[23, 280, 282],
|
||||
[93, 180, 188],
|
||||
[214, 247, 249],
|
||||
[212, 245, 247],
|
||||
]
|
||||
|
||||
---
|
||||
@ -412,7 +411,7 @@ snippet: "
|
||||
"
|
||||
frame size: 19
|
||||
parameter count: 1
|
||||
bytecode array length: 475
|
||||
bytecode array length: 467
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
|
||||
B(Mov), R(closure), R(1),
|
||||
@ -439,8 +438,7 @@ bytecodes: [
|
||||
/* 56 E> */ B(CallUndefinedReceiver0), R(9), U8(2),
|
||||
B(Star), R(10),
|
||||
B(LdaNamedProperty), R(10), U8(8), U8(4),
|
||||
B(JumpIfUndefined), U8(17),
|
||||
B(JumpIfNull), U8(15),
|
||||
B(JumpIfUndefinedOrNull), U8(15),
|
||||
B(Star), R(11),
|
||||
B(CallProperty0), R(11), R(10), U8(6),
|
||||
B(JumpIfJSReceiver), U8(23),
|
||||
@ -460,13 +458,12 @@ bytecodes: [
|
||||
B(Ldar), R(6),
|
||||
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(1),
|
||||
B(CallProperty1), R(9), R(7), R(8), U8(14),
|
||||
B(Jump), U8(146),
|
||||
B(Jump), U8(140),
|
||||
B(LdaNamedProperty), R(7), U8(13), U8(16),
|
||||
B(JumpIfUndefined), U8(13),
|
||||
B(JumpIfNull), U8(11),
|
||||
B(JumpIfUndefinedOrNull), U8(11),
|
||||
B(Star), R(12),
|
||||
B(CallProperty1), R(12), R(7), R(8), U8(18),
|
||||
B(Jump), U8(129),
|
||||
B(Jump), U8(125),
|
||||
B(Mov), R(0), R(12),
|
||||
B(Mov), R(8), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(12), U8(2),
|
||||
@ -483,16 +480,14 @@ bytecodes: [
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(12), R(2),
|
||||
B(Jump), U8(245),
|
||||
B(Jump), U8(241),
|
||||
B(LdaNamedProperty), R(7), U8(14), U8(20),
|
||||
B(JumpIfUndefined), U8(13),
|
||||
B(JumpIfNull), U8(11),
|
||||
B(JumpIfUndefinedOrNull), U8(11),
|
||||
B(Star), R(14),
|
||||
B(CallProperty1), R(14), R(7), R(8), U8(22),
|
||||
B(Jump), U8(68),
|
||||
B(Jump), U8(66),
|
||||
B(LdaNamedProperty), R(7), U8(13), U8(24),
|
||||
B(JumpIfUndefined), U8(57),
|
||||
B(JumpIfNull), U8(55),
|
||||
B(JumpIfUndefinedOrNull), U8(55),
|
||||
B(Star), R(14),
|
||||
B(CallProperty0), R(14), R(7), U8(26),
|
||||
B(Jump), U8(2),
|
||||
@ -544,7 +539,7 @@ bytecodes: [
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
||||
B(Star), R(6),
|
||||
B(JumpLoop), U8(242), I8(0),
|
||||
B(JumpLoop), U8(236), I8(0),
|
||||
B(LdaNamedProperty), R(5), U8(16), U8(32),
|
||||
B(Star), R(7),
|
||||
B(LdaSmi), I8(1),
|
||||
@ -603,10 +598,10 @@ bytecodes: [
|
||||
]
|
||||
constant pool: [
|
||||
Smi [30],
|
||||
Smi [162],
|
||||
Smi [238],
|
||||
Smi [288],
|
||||
Smi [347],
|
||||
Smi [158],
|
||||
Smi [230],
|
||||
Smi [280],
|
||||
Smi [339],
|
||||
Smi [16],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
||||
@ -614,19 +609,19 @@ constant pool: [
|
||||
SYMBOL_TYPE,
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
Smi [11],
|
||||
Smi [72],
|
||||
Smi [70],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
SCOPE_INFO_TYPE,
|
||||
Smi [380],
|
||||
Smi [372],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
Smi [23],
|
||||
]
|
||||
handlers: [
|
||||
[20, 421, 429],
|
||||
[23, 383, 387],
|
||||
[20, 413, 421],
|
||||
[23, 375, 379],
|
||||
]
|
||||
|
||||
|
@ -12,7 +12,7 @@ snippet: "
|
||||
"
|
||||
frame size: 16
|
||||
parameter count: 1
|
||||
bytecode array length: 178
|
||||
bytecode array length: 176
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
||||
@ -59,11 +59,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(10),
|
||||
B(Ldar), R(7),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(4), U8(5), U8(13),
|
||||
B(Star), R(12),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(13),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -105,7 +104,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[44, 86, 94],
|
||||
[120, 153, 155],
|
||||
[118, 151, 153],
|
||||
]
|
||||
|
||||
---
|
||||
@ -115,7 +114,7 @@ snippet: "
|
||||
"
|
||||
frame size: 17
|
||||
parameter count: 1
|
||||
bytecode array length: 264
|
||||
bytecode array length: 262
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
||||
@ -196,11 +195,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(5), U8(23),
|
||||
B(Star), R(13),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(14),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -242,7 +240,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[44, 172, 180],
|
||||
[206, 239, 241],
|
||||
[204, 237, 239],
|
||||
]
|
||||
|
||||
---
|
||||
@ -252,7 +250,7 @@ snippet: "
|
||||
"
|
||||
frame size: 18
|
||||
parameter count: 1
|
||||
bytecode array length: 229
|
||||
bytecode array length: 227
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 40 S> */ B(CreateEmptyObjectLiteral),
|
||||
@ -320,11 +318,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(6), U8(17),
|
||||
B(Star), R(14),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(15),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -367,7 +364,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[47, 137, 145],
|
||||
[171, 204, 206],
|
||||
[169, 202, 204],
|
||||
]
|
||||
|
||||
---
|
||||
|
@ -16,7 +16,7 @@ snippet: "
|
||||
"
|
||||
frame size: 21
|
||||
parameter count: 1
|
||||
bytecode array length: 325
|
||||
bytecode array length: 321
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -28,8 +28,7 @@ bytecodes: [
|
||||
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
|
||||
B(Star), R(7),
|
||||
B(LdaNamedProperty), R(7), U8(3), U8(1),
|
||||
B(JumpIfUndefined), U8(17),
|
||||
B(JumpIfNull), U8(15),
|
||||
B(JumpIfUndefinedOrNull), U8(15),
|
||||
B(Star), R(8),
|
||||
B(CallProperty0), R(8), R(7), U8(3),
|
||||
B(JumpIfJSReceiver), U8(23),
|
||||
@ -87,11 +86,10 @@ bytecodes: [
|
||||
/* 38 E> */ B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(Ldar), R(9),
|
||||
B(JumpIfToBooleanTrue), U8(96),
|
||||
B(JumpIfToBooleanTrue), U8(94),
|
||||
B(LdaNamedProperty), R(6), U8(8), U8(17),
|
||||
B(Star), R(16),
|
||||
B(JumpIfUndefined), U8(88),
|
||||
B(JumpIfNull), U8(86),
|
||||
B(JumpIfUndefinedOrNull), U8(86),
|
||||
B(Mov), R(context), R(17),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -156,8 +154,8 @@ bytecodes: [
|
||||
/* 57 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [98],
|
||||
Smi [229],
|
||||
Smi [96],
|
||||
Smi [225],
|
||||
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
@ -169,9 +167,9 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[20, 297, 297],
|
||||
[77, 157, 165],
|
||||
[191, 260, 262],
|
||||
[20, 293, 293],
|
||||
[75, 155, 163],
|
||||
[187, 256, 258],
|
||||
]
|
||||
|
||||
---
|
||||
@ -183,7 +181,7 @@ snippet: "
|
||||
"
|
||||
frame size: 21
|
||||
parameter count: 1
|
||||
bytecode array length: 346
|
||||
bytecode array length: 342
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -195,8 +193,7 @@ bytecodes: [
|
||||
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
|
||||
B(Star), R(7),
|
||||
B(LdaNamedProperty), R(7), U8(3), U8(1),
|
||||
B(JumpIfUndefined), U8(17),
|
||||
B(JumpIfNull), U8(15),
|
||||
B(JumpIfUndefinedOrNull), U8(15),
|
||||
B(Star), R(8),
|
||||
B(CallProperty0), R(8), R(7), U8(3),
|
||||
B(JumpIfJSReceiver), U8(23),
|
||||
@ -256,11 +253,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(Ldar), R(9),
|
||||
B(JumpIfToBooleanTrue), U8(96),
|
||||
B(JumpIfToBooleanTrue), U8(94),
|
||||
B(LdaNamedProperty), R(6), U8(8), U8(17),
|
||||
B(Star), R(16),
|
||||
B(JumpIfUndefined), U8(88),
|
||||
B(JumpIfNull), U8(86),
|
||||
B(JumpIfUndefinedOrNull), U8(86),
|
||||
B(Mov), R(context), R(17),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -331,8 +327,8 @@ bytecodes: [
|
||||
/* 68 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [98],
|
||||
Smi [233],
|
||||
Smi [96],
|
||||
Smi [229],
|
||||
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
@ -346,9 +342,9 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[20, 318, 318],
|
||||
[77, 161, 169],
|
||||
[195, 264, 266],
|
||||
[20, 314, 314],
|
||||
[75, 159, 167],
|
||||
[191, 260, 262],
|
||||
]
|
||||
|
||||
---
|
||||
@ -363,7 +359,7 @@ snippet: "
|
||||
"
|
||||
frame size: 21
|
||||
parameter count: 1
|
||||
bytecode array length: 341
|
||||
bytecode array length: 337
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -375,8 +371,7 @@ bytecodes: [
|
||||
/* 43 S> */ B(CreateArrayLiteral), U8(2), U8(0), U8(37),
|
||||
B(Star), R(7),
|
||||
B(LdaNamedProperty), R(7), U8(3), U8(1),
|
||||
B(JumpIfUndefined), U8(17),
|
||||
B(JumpIfNull), U8(15),
|
||||
B(JumpIfUndefinedOrNull), U8(15),
|
||||
B(Star), R(8),
|
||||
B(CallProperty0), R(8), R(7), U8(3),
|
||||
B(JumpIfJSReceiver), U8(23),
|
||||
@ -441,11 +436,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(Ldar), R(9),
|
||||
B(JumpIfToBooleanTrue), U8(96),
|
||||
B(JumpIfToBooleanTrue), U8(94),
|
||||
B(LdaNamedProperty), R(6), U8(8), U8(19),
|
||||
B(Star), R(16),
|
||||
B(JumpIfUndefined), U8(88),
|
||||
B(JumpIfNull), U8(86),
|
||||
B(JumpIfUndefinedOrNull), U8(86),
|
||||
B(Mov), R(context), R(17),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -510,8 +504,8 @@ bytecodes: [
|
||||
/* 114 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [98],
|
||||
Smi [245],
|
||||
Smi [96],
|
||||
Smi [241],
|
||||
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
@ -523,9 +517,9 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[20, 313, 313],
|
||||
[77, 173, 181],
|
||||
[207, 276, 278],
|
||||
[20, 309, 309],
|
||||
[75, 171, 179],
|
||||
[203, 272, 274],
|
||||
]
|
||||
|
||||
---
|
||||
@ -538,7 +532,7 @@ snippet: "
|
||||
"
|
||||
frame size: 17
|
||||
parameter count: 1
|
||||
bytecode array length: 261
|
||||
bytecode array length: 259
|
||||
bytecodes: [
|
||||
B(Mov), R(closure), R(2),
|
||||
B(Mov), R(this), R(3),
|
||||
@ -593,11 +587,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(10),
|
||||
B(Ldar), R(7),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(4), U8(7), U8(18),
|
||||
B(Star), R(13),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(14),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -668,8 +661,8 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[16, 233, 233],
|
||||
[16, 231, 231],
|
||||
[59, 112, 120],
|
||||
[146, 179, 181],
|
||||
[144, 177, 179],
|
||||
]
|
||||
|
||||
|
@ -63,13 +63,12 @@ snippet: "
|
||||
"
|
||||
frame size: 8
|
||||
parameter count: 1
|
||||
bytecode array length: 46
|
||||
bytecode array length: 44
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(LdaConstant), U8(0),
|
||||
B(Star), R(0),
|
||||
/* 68 S> */ B(JumpIfUndefined), U8(39),
|
||||
B(JumpIfNull), U8(37),
|
||||
/* 68 S> */ B(JumpIfUndefinedOrNull), U8(37),
|
||||
B(ToObject), R(3),
|
||||
B(ForInEnumerate), R(3),
|
||||
B(ForInPrepare), R(4), U8(0),
|
||||
@ -102,14 +101,13 @@ snippet: "
|
||||
"
|
||||
frame size: 9
|
||||
parameter count: 1
|
||||
bytecode array length: 58
|
||||
bytecode array length: 56
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(LdaZero),
|
||||
B(Star), R(0),
|
||||
/* 59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
|
||||
B(JumpIfUndefined), U8(48),
|
||||
B(JumpIfNull), U8(46),
|
||||
B(JumpIfUndefinedOrNull), U8(46),
|
||||
B(ToObject), R(3),
|
||||
B(ForInEnumerate), R(3),
|
||||
B(ForInPrepare), R(4), U8(0),
|
||||
@ -148,14 +146,13 @@ snippet: "
|
||||
"
|
||||
frame size: 7
|
||||
parameter count: 1
|
||||
bytecode array length: 85
|
||||
bytecode array length: 83
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
|
||||
B(Star), R(0),
|
||||
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
|
||||
B(JumpIfUndefined), U8(72),
|
||||
B(JumpIfNull), U8(70),
|
||||
B(JumpIfUndefinedOrNull), U8(70),
|
||||
B(ToObject), R(1),
|
||||
B(ForInEnumerate), R(1),
|
||||
B(ForInPrepare), R(2), U8(1),
|
||||
@ -202,14 +199,13 @@ snippet: "
|
||||
"
|
||||
frame size: 9
|
||||
parameter count: 1
|
||||
bytecode array length: 64
|
||||
bytecode array length: 62
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
||||
B(Star), R(0),
|
||||
/* 72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
|
||||
B(JumpIfUndefined), U8(51),
|
||||
B(JumpIfNull), U8(49),
|
||||
B(JumpIfUndefinedOrNull), U8(49),
|
||||
B(ToObject), R(1),
|
||||
B(ForInEnumerate), R(1),
|
||||
B(ForInPrepare), R(2), U8(1),
|
||||
|
@ -11,7 +11,7 @@ snippet: "
|
||||
"
|
||||
frame size: 15
|
||||
parameter count: 1
|
||||
bytecode array length: 173
|
||||
bytecode array length: 171
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
||||
@ -55,11 +55,10 @@ bytecodes: [
|
||||
/* 43 E> */ B(SetPendingMessage),
|
||||
B(Star), R(9),
|
||||
B(Ldar), R(6),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(3), U8(5), U8(13),
|
||||
B(Star), R(11),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(12),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -101,7 +100,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[38, 81, 89],
|
||||
[115, 148, 150],
|
||||
[113, 146, 148],
|
||||
]
|
||||
|
||||
---
|
||||
@ -111,7 +110,7 @@ snippet: "
|
||||
"
|
||||
frame size: 16
|
||||
parameter count: 1
|
||||
bytecode array length: 184
|
||||
bytecode array length: 182
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(LdaConstant), U8(0),
|
||||
@ -158,11 +157,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(10),
|
||||
B(Ldar), R(7),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(4), U8(5), U8(12),
|
||||
B(Star), R(12),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(13),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -208,7 +206,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[39, 86, 94],
|
||||
[120, 153, 155],
|
||||
[118, 151, 153],
|
||||
]
|
||||
|
||||
---
|
||||
@ -220,7 +218,7 @@ snippet: "
|
||||
"
|
||||
frame size: 15
|
||||
parameter count: 1
|
||||
bytecode array length: 189
|
||||
bytecode array length: 187
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
||||
@ -271,11 +269,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(9),
|
||||
B(Ldar), R(6),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(3), U8(5), U8(15),
|
||||
B(Star), R(11),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(12),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -317,7 +314,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[38, 97, 105],
|
||||
[131, 164, 166],
|
||||
[129, 162, 164],
|
||||
]
|
||||
|
||||
---
|
||||
@ -327,7 +324,7 @@ snippet: "
|
||||
"
|
||||
frame size: 15
|
||||
parameter count: 1
|
||||
bytecode array length: 195
|
||||
bytecode array length: 193
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
|
||||
@ -377,11 +374,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(8),
|
||||
B(Ldar), R(5),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(2), U8(7), U8(18),
|
||||
B(Star), R(11),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(12),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -429,6 +425,6 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[44, 97, 105],
|
||||
[131, 164, 166],
|
||||
[129, 162, 164],
|
||||
]
|
||||
|
||||
|
@ -15,7 +15,7 @@ snippet: "
|
||||
"
|
||||
frame size: 17
|
||||
parameter count: 2
|
||||
bytecode array length: 173
|
||||
bytecode array length: 171
|
||||
bytecodes: [
|
||||
/* 10 E> */ B(StackCheck),
|
||||
/* 34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
|
||||
@ -59,11 +59,10 @@ bytecodes: [
|
||||
/* 49 E> */ B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(4), U8(12),
|
||||
B(Star), R(13),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(14),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -104,7 +103,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[35, 81, 89],
|
||||
[115, 148, 150],
|
||||
[113, 146, 148],
|
||||
]
|
||||
|
||||
---
|
||||
@ -116,7 +115,7 @@ snippet: "
|
||||
"
|
||||
frame size: 22
|
||||
parameter count: 2
|
||||
bytecode array length: 254
|
||||
bytecode array length: 252
|
||||
bytecodes: [
|
||||
B(CreateFunctionContext), U8(0), U8(4),
|
||||
B(PushContext), R(2),
|
||||
@ -196,11 +195,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(9), U8(16),
|
||||
B(Star), R(14),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(15),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -247,7 +245,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[65, 160, 168],
|
||||
[194, 227, 229],
|
||||
[192, 225, 227],
|
||||
]
|
||||
|
||||
---
|
||||
@ -259,7 +257,7 @@ snippet: "
|
||||
"
|
||||
frame size: 16
|
||||
parameter count: 2
|
||||
bytecode array length: 190
|
||||
bytecode array length: 188
|
||||
bytecodes: [
|
||||
/* 10 E> */ B(StackCheck),
|
||||
/* 34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
|
||||
@ -311,11 +309,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(9),
|
||||
B(Ldar), R(6),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(3), U8(6), U8(14),
|
||||
B(Star), R(12),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(13),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -358,7 +355,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[35, 98, 106],
|
||||
[132, 165, 167],
|
||||
[130, 163, 165],
|
||||
]
|
||||
|
||||
---
|
||||
@ -370,7 +367,7 @@ snippet: "
|
||||
"
|
||||
frame size: 19
|
||||
parameter count: 2
|
||||
bytecode array length: 197
|
||||
bytecode array length: 195
|
||||
bytecodes: [
|
||||
/* 10 E> */ B(StackCheck),
|
||||
/* 41 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
|
||||
@ -423,11 +420,10 @@ bytecodes: [
|
||||
/* 56 E> */ B(SetPendingMessage),
|
||||
B(Star), R(13),
|
||||
B(Ldar), R(10),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(7), U8(6), U8(17),
|
||||
B(Star), R(15),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(16),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -470,7 +466,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[35, 105, 113],
|
||||
[139, 172, 174],
|
||||
[137, 170, 172],
|
||||
]
|
||||
|
||||
---
|
||||
@ -482,7 +478,7 @@ snippet: "
|
||||
"
|
||||
frame size: 18
|
||||
parameter count: 2
|
||||
bytecode array length: 214
|
||||
bytecode array length: 212
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
||||
B(Mov), R(closure), R(5),
|
||||
@ -540,11 +536,10 @@ bytecodes: [
|
||||
/* 50 E> */ B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(Ldar), R(9),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(6), U8(7), U8(12),
|
||||
B(Star), R(14),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(15),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -588,7 +583,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[76, 122, 130],
|
||||
[156, 189, 191],
|
||||
[154, 187, 189],
|
||||
]
|
||||
|
||||
---
|
||||
@ -600,7 +595,7 @@ snippet: "
|
||||
"
|
||||
frame size: 17
|
||||
parameter count: 2
|
||||
bytecode array length: 258
|
||||
bytecode array length: 256
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -672,11 +667,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(10), U8(12),
|
||||
B(Star), R(13),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(14),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -727,7 +721,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[76, 160, 168],
|
||||
[194, 227, 229],
|
||||
[192, 225, 227],
|
||||
]
|
||||
|
||||
---
|
||||
@ -739,7 +733,7 @@ snippet: "
|
||||
"
|
||||
frame size: 19
|
||||
parameter count: 2
|
||||
bytecode array length: 228
|
||||
bytecode array length: 226
|
||||
bytecodes: [
|
||||
B(Mov), R(closure), R(5),
|
||||
B(Mov), R(this), R(6),
|
||||
@ -788,11 +782,10 @@ bytecodes: [
|
||||
/* 55 E> */ B(SetPendingMessage),
|
||||
B(Star), R(13),
|
||||
B(Ldar), R(10),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(7), U8(4), U8(12),
|
||||
B(Star), R(15),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(16),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -852,9 +845,9 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[16, 200, 200],
|
||||
[16, 198, 198],
|
||||
[50, 96, 104],
|
||||
[130, 163, 165],
|
||||
[128, 161, 163],
|
||||
]
|
||||
|
||||
---
|
||||
@ -866,7 +859,7 @@ snippet: "
|
||||
"
|
||||
frame size: 18
|
||||
parameter count: 2
|
||||
bytecode array length: 264
|
||||
bytecode array length: 262
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -928,11 +921,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(Ldar), R(9),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(6), U8(5), U8(12),
|
||||
B(Star), R(14),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(15),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -993,8 +985,8 @@ constant pool: [
|
||||
SCOPE_INFO_TYPE,
|
||||
]
|
||||
handlers: [
|
||||
[20, 236, 236],
|
||||
[20, 234, 234],
|
||||
[54, 132, 140],
|
||||
[166, 199, 201],
|
||||
[164, 197, 199],
|
||||
]
|
||||
|
||||
|
@ -100,7 +100,7 @@ snippet: "
|
||||
"
|
||||
frame size: 17
|
||||
parameter count: 1
|
||||
bytecode array length: 261
|
||||
bytecode array length: 259
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
@ -173,11 +173,10 @@ bytecodes: [
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(Ldar), R(8),
|
||||
B(JumpIfToBooleanTrue), U8(60),
|
||||
B(JumpIfToBooleanTrue), U8(58),
|
||||
B(LdaNamedProperty), R(5), U8(11), U8(13),
|
||||
B(Star), R(13),
|
||||
B(JumpIfUndefined), U8(52),
|
||||
B(JumpIfNull), U8(50),
|
||||
B(JumpIfUndefinedOrNull), U8(50),
|
||||
B(Mov), R(context), R(14),
|
||||
B(TestTypeOf), U8(6),
|
||||
B(JumpIfTrue), U8(18),
|
||||
@ -229,7 +228,7 @@ constant pool: [
|
||||
]
|
||||
handlers: [
|
||||
[79, 163, 171],
|
||||
[197, 230, 232],
|
||||
[195, 228, 230],
|
||||
]
|
||||
|
||||
---
|
||||
@ -240,7 +239,7 @@ snippet: "
|
||||
"
|
||||
frame size: 9
|
||||
parameter count: 1
|
||||
bytecode array length: 217
|
||||
bytecode array length: 211
|
||||
bytecodes: [
|
||||
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
||||
B(Mov), R(closure), R(1),
|
||||
@ -276,24 +275,21 @@ bytecodes: [
|
||||
B(Ldar), R(2),
|
||||
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(1),
|
||||
B(CallProperty1), R(5), R(3), R(4), U8(10),
|
||||
B(Jump), U8(69),
|
||||
B(Jump), U8(63),
|
||||
B(LdaNamedProperty), R(3), U8(9), U8(12),
|
||||
B(JumpIfUndefined), U8(13),
|
||||
B(JumpIfNull), U8(11),
|
||||
B(JumpIfUndefinedOrNull), U8(11),
|
||||
B(Star), R(8),
|
||||
B(CallProperty1), R(8), R(3), R(4), U8(14),
|
||||
B(Jump), U8(52),
|
||||
B(Jump), U8(48),
|
||||
B(Ldar), R(4),
|
||||
/* 54 S> */ B(Return),
|
||||
B(LdaNamedProperty), R(3), U8(10), U8(16),
|
||||
B(JumpIfUndefined), U8(13),
|
||||
B(JumpIfNull), U8(11),
|
||||
B(JumpIfUndefinedOrNull), U8(11),
|
||||
B(Star), R(8),
|
||||
B(CallProperty1), R(8), R(3), R(4), U8(18),
|
||||
B(Jump), U8(32),
|
||||
B(Jump), U8(30),
|
||||
B(LdaNamedProperty), R(3), U8(9), U8(20),
|
||||
B(JumpIfUndefined), U8(21),
|
||||
B(JumpIfNull), U8(19),
|
||||
B(JumpIfUndefinedOrNull), U8(19),
|
||||
B(Star), R(8),
|
||||
B(CallProperty0), R(8), R(3), U8(22),
|
||||
B(Jump), U8(2),
|
||||
@ -312,7 +308,7 @@ bytecodes: [
|
||||
B(Star), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
||||
B(Star), R(2),
|
||||
B(JumpLoop), U8(114), I8(0),
|
||||
B(JumpLoop), U8(108), I8(0),
|
||||
B(LdaNamedProperty), R(1), U8(12), U8(26),
|
||||
B(Star), R(3),
|
||||
B(LdaSmi), I8(1),
|
||||
@ -325,14 +321,14 @@ bytecodes: [
|
||||
]
|
||||
constant pool: [
|
||||
Smi [22],
|
||||
Smi [185],
|
||||
Smi [179],
|
||||
Smi [10],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
||||
SYMBOL_TYPE,
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
Smi [11],
|
||||
Smi [31],
|
||||
Smi [29],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
|
@ -2655,7 +2655,7 @@ snippet: "
|
||||
"
|
||||
frame size: 163
|
||||
parameter count: 1
|
||||
bytecode array length: 626
|
||||
bytecode array length: 624
|
||||
bytecodes: [
|
||||
/* 30 E> */ B(StackCheck),
|
||||
/* 43 S> */ B(LdaZero),
|
||||
@ -2977,8 +2977,7 @@ bytecodes: [
|
||||
/* 2146 S> */ B(LdaZero),
|
||||
B(Star), R(1),
|
||||
/* 2162 S> */ B(Ldar), R(0),
|
||||
B(JumpIfUndefined), U8(74),
|
||||
B(JumpIfNull), U8(72),
|
||||
B(JumpIfUndefinedOrNull), U8(72),
|
||||
B(Wide), B(ToObject), R16(157),
|
||||
B(Wide), B(ForInEnumerate), R16(157),
|
||||
B(Wide), B(ForInPrepare), R16(158), U16(0),
|
||||
|
@ -283,7 +283,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
||||
BytecodeLoopHeader loop_header;
|
||||
BytecodeLabel after_jump1, after_jump2, after_jump3, after_jump4,
|
||||
after_jump5, after_jump6, after_jump7, after_jump8, after_jump9,
|
||||
after_jump10, after_loop;
|
||||
after_jump10, after_jump11, after_loop;
|
||||
builder.JumpIfNull(&after_loop)
|
||||
.Bind(&loop_header)
|
||||
.Jump(&after_jump1)
|
||||
@ -296,21 +296,23 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
||||
.Bind(&after_jump4)
|
||||
.JumpIfNotUndefined(&after_jump5)
|
||||
.Bind(&after_jump5)
|
||||
.JumpIfJSReceiver(&after_jump6)
|
||||
.JumpIfUndefinedOrNull(&after_jump6)
|
||||
.Bind(&after_jump6)
|
||||
.JumpIfTrue(ToBooleanMode::kConvertToBoolean, &after_jump7)
|
||||
.JumpIfJSReceiver(&after_jump7)
|
||||
.Bind(&after_jump7)
|
||||
.JumpIfTrue(ToBooleanMode::kAlreadyBoolean, &after_jump8)
|
||||
.JumpIfTrue(ToBooleanMode::kConvertToBoolean, &after_jump8)
|
||||
.Bind(&after_jump8)
|
||||
.JumpIfFalse(ToBooleanMode::kConvertToBoolean, &after_jump9)
|
||||
.JumpIfTrue(ToBooleanMode::kAlreadyBoolean, &after_jump9)
|
||||
.Bind(&after_jump9)
|
||||
.JumpIfFalse(ToBooleanMode::kAlreadyBoolean, &after_jump10)
|
||||
.JumpIfFalse(ToBooleanMode::kConvertToBoolean, &after_jump10)
|
||||
.Bind(&after_jump10)
|
||||
.JumpIfFalse(ToBooleanMode::kAlreadyBoolean, &after_jump11)
|
||||
.Bind(&after_jump11)
|
||||
.JumpLoop(&loop_header, 0)
|
||||
.Bind(&after_loop);
|
||||
}
|
||||
|
||||
BytecodeLabel end[10];
|
||||
BytecodeLabel end[11];
|
||||
{
|
||||
// Longer jumps with constant operands
|
||||
BytecodeLabel after_jump;
|
||||
@ -325,8 +327,9 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
|
||||
.JumpIfNotNull(&end[6])
|
||||
.JumpIfUndefined(&end[7])
|
||||
.JumpIfNotUndefined(&end[8])
|
||||
.JumpIfUndefinedOrNull(&end[9])
|
||||
.LoadLiteral(ast_factory.prototype_string())
|
||||
.JumpIfJSReceiver(&end[9]);
|
||||
.JumpIfJSReceiver(&end[10]);
|
||||
}
|
||||
|
||||
// Emit Smi table switch bytecode.
|
||||
|
Loading…
Reference in New Issue
Block a user