Commit ece4e54a authored by hablich's avatar hablich Committed by Commit bot

Revert of Thread maybe-assigned through the bytecodes. (patchset #5 id:80001...

Revert of Thread maybe-assigned through the bytecodes. (patchset #5 id:80001 of https://codereview.chromium.org/2655733003/ )

Reason for revert:
needed for properly reverting https://chromium.googlesource.com/v8/v8/+/f3ae5ccf57690d8c2d87c4fe1d10b103ad6a4ab3

Original issue's description:
> Thread maybe-assigned through the bytecodes.
>
> This introduces LoadImmutableContextSlot and LoadImmutableCurrentContextSlot
> bytecodes, which are emitted when reading from never-assigned context slot.
>
> There is a subtlety here: the slot are not immutable, the meaning is
> actually undefined-or-hole-or-immutable.
>
> Review-Url: https://codereview.chromium.org/2655733003
> Cr-Commit-Position: refs/heads/master@{#43000}
> Committed: https://chromium.googlesource.com/v8/v8/+/17c2dd388697da626224c371c8181d20d2016d82

TBR=rmcilroy@chromium.org,bmeurer@chromium.org,neis@chromium.org,jarin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2680923003
Cr-Commit-Position: refs/heads/master@{#43011}
parent f3ae5ccf
...@@ -770,6 +770,9 @@ void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() { ...@@ -770,6 +770,9 @@ void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() {
} }
void BytecodeGraphBuilder::VisitLdaContextSlot() { void BytecodeGraphBuilder::VisitLdaContextSlot() {
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
const Operator* op = javascript()->LoadContext( const Operator* op = javascript()->LoadContext(
bytecode_iterator().GetUnsignedImmediateOperand(2), bytecode_iterator().GetUnsignedImmediateOperand(2),
bytecode_iterator().GetIndexOperand(1), false); bytecode_iterator().GetIndexOperand(1), false);
...@@ -780,31 +783,16 @@ void BytecodeGraphBuilder::VisitLdaContextSlot() { ...@@ -780,31 +783,16 @@ void BytecodeGraphBuilder::VisitLdaContextSlot() {
environment()->BindAccumulator(node); environment()->BindAccumulator(node);
} }
void BytecodeGraphBuilder::VisitLdaImmutableContextSlot() {
const Operator* op = javascript()->LoadContext(
bytecode_iterator().GetUnsignedImmediateOperand(2),
bytecode_iterator().GetIndexOperand(1), true);
Node* node = NewNode(op);
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
NodeProperties::ReplaceContextInput(node, context);
environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() { void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() {
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
const Operator* op = javascript()->LoadContext( const Operator* op = javascript()->LoadContext(
0, bytecode_iterator().GetIndexOperand(0), false); 0, bytecode_iterator().GetIndexOperand(0), false);
Node* node = NewNode(op); Node* node = NewNode(op);
environment()->BindAccumulator(node); environment()->BindAccumulator(node);
} }
void BytecodeGraphBuilder::VisitLdaImmutableCurrentContextSlot() {
const Operator* op = javascript()->LoadContext(
0, bytecode_iterator().GetIndexOperand(0), true);
Node* node = NewNode(op);
environment()->BindAccumulator(node);
}
void BytecodeGraphBuilder::VisitStaContextSlot() { void BytecodeGraphBuilder::VisitStaContextSlot() {
const Operator* op = javascript()->StoreContext( const Operator* op = javascript()->StoreContext(
bytecode_iterator().GetUnsignedImmediateOperand(2), bytecode_iterator().GetUnsignedImmediateOperand(2),
......
...@@ -477,20 +477,12 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal( ...@@ -477,20 +477,12 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal(
return *this; return *this;
} }
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot( BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context,
Register context, int slot_index, int depth, int slot_index,
ContextSlotMutability mutability) { int depth) {
if (context.is_current_context() && depth == 0) { if (context.is_current_context() && depth == 0) {
if (mutability == kImmutableSlot) { OutputLdaCurrentContextSlot(slot_index);
OutputLdaImmutableCurrentContextSlot(slot_index);
} else {
DCHECK_EQ(kMutableSlot, mutability);
OutputLdaCurrentContextSlot(slot_index);
}
} else if (mutability == kImmutableSlot) {
OutputLdaImmutableContextSlot(context, slot_index, depth);
} else { } else {
DCHECK_EQ(mutability, kMutableSlot);
OutputLdaContextSlot(context, slot_index, depth); OutputLdaContextSlot(context, slot_index, depth);
} }
return *this; return *this;
......
...@@ -92,10 +92,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final ...@@ -92,10 +92,8 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
// Load the object at |slot_index| at |depth| in the context chain starting // Load the object at |slot_index| at |depth| in the context chain starting
// with |context| into the accumulator. // with |context| into the accumulator.
enum ContextSlotMutability { kImmutableSlot, kMutableSlot };
BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index, BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index,
int depth, int depth);
ContextSlotMutability immutable);
// Stores the object in the accumulator into |slot_index| at |depth| in the // Stores the object in the accumulator into |slot_index| at |depth| in the
// context chain starting with |context|. // context chain starting with |context|.
......
...@@ -1936,13 +1936,7 @@ void BytecodeGenerator::BuildVariableLoad(Variable* variable, FeedbackSlot slot, ...@@ -1936,13 +1936,7 @@ void BytecodeGenerator::BuildVariableLoad(Variable* variable, FeedbackSlot slot,
context_reg = execution_context()->reg(); context_reg = execution_context()->reg();
} }
BytecodeArrayBuilder::ContextSlotMutability immutable = builder()->LoadContextSlot(context_reg, variable->index(), depth);
(variable->maybe_assigned() == kNotAssigned)
? BytecodeArrayBuilder::kImmutableSlot
: BytecodeArrayBuilder::kMutableSlot;
builder()->LoadContextSlot(context_reg, variable->index(), depth,
immutable);
if (hole_check_mode == HoleCheckMode::kRequired) { if (hole_check_mode == HoleCheckMode::kRequired) {
BuildThrowIfHole(variable->name()); BuildThrowIfHole(variable->name());
} }
...@@ -2106,8 +2100,7 @@ void BytecodeGenerator::BuildVariableAssignment(Variable* variable, ...@@ -2106,8 +2100,7 @@ void BytecodeGenerator::BuildVariableAssignment(Variable* variable,
Register value_temp = register_allocator()->NewRegister(); Register value_temp = register_allocator()->NewRegister();
builder() builder()
->StoreAccumulatorInRegister(value_temp) ->StoreAccumulatorInRegister(value_temp)
.LoadContextSlot(context_reg, variable->index(), depth, .LoadContextSlot(context_reg, variable->index(), depth);
BytecodeArrayBuilder::kMutableSlot);
BuildHoleCheckForVariableAssignment(variable, op); BuildHoleCheckForVariableAssignment(variable, op);
builder()->LoadAccumulatorWithRegister(value_temp); builder()->LoadAccumulatorWithRegister(value_temp);
...@@ -2737,11 +2730,9 @@ void BytecodeGenerator::VisitDelete(UnaryOperation* expr) { ...@@ -2737,11 +2730,9 @@ void BytecodeGenerator::VisitDelete(UnaryOperation* expr) {
Register global_object = register_allocator()->NewRegister(); Register global_object = register_allocator()->NewRegister();
builder() builder()
->LoadContextSlot(execution_context()->reg(), ->LoadContextSlot(execution_context()->reg(),
Context::NATIVE_CONTEXT_INDEX, 0, Context::NATIVE_CONTEXT_INDEX, 0)
BytecodeArrayBuilder::kMutableSlot)
.StoreAccumulatorInRegister(native_context) .StoreAccumulatorInRegister(native_context)
.LoadContextSlot(native_context, Context::EXTENSION_INDEX, 0, .LoadContextSlot(native_context, Context::EXTENSION_INDEX, 0)
BytecodeArrayBuilder::kMutableSlot)
.StoreAccumulatorInRegister(global_object) .StoreAccumulatorInRegister(global_object)
.LoadLiteral(variable->name()) .LoadLiteral(variable->name())
.Delete(global_object, language_mode()); .Delete(global_object, language_mode());
...@@ -3252,18 +3243,15 @@ void BytecodeGenerator::VisitFunctionClosureForContext() { ...@@ -3252,18 +3243,15 @@ void BytecodeGenerator::VisitFunctionClosureForContext() {
Register native_context = register_allocator()->NewRegister(); Register native_context = register_allocator()->NewRegister();
builder() builder()
->LoadContextSlot(execution_context()->reg(), ->LoadContextSlot(execution_context()->reg(),
Context::NATIVE_CONTEXT_INDEX, 0, Context::NATIVE_CONTEXT_INDEX, 0)
BytecodeArrayBuilder::kMutableSlot)
.StoreAccumulatorInRegister(native_context) .StoreAccumulatorInRegister(native_context)
.LoadContextSlot(native_context, Context::CLOSURE_INDEX, 0, .LoadContextSlot(native_context, Context::CLOSURE_INDEX, 0);
BytecodeArrayBuilder::kMutableSlot);
} else if (closure_scope->is_eval_scope()) { } else if (closure_scope->is_eval_scope()) {
// Contexts created by a call to eval have the same closure as the // Contexts created by a call to eval have the same closure as the
// context calling eval, not the anonymous closure containing the eval // context calling eval, not the anonymous closure containing the eval
// code. Fetch it from the context. // code. Fetch it from the context.
builder()->LoadContextSlot(execution_context()->reg(), builder()->LoadContextSlot(execution_context()->reg(),
Context::CLOSURE_INDEX, 0, Context::CLOSURE_INDEX, 0);
BytecodeArrayBuilder::kMutableSlot);
} else { } else {
DCHECK(closure_scope->is_function_scope() || DCHECK(closure_scope->is_function_scope() ||
closure_scope->is_module_scope()); closure_scope->is_module_scope());
......
...@@ -22,291 +22,288 @@ namespace interpreter { ...@@ -22,291 +22,288 @@ namespace interpreter {
// The list of bytecodes which are interpreted by the interpreter. // The list of bytecodes which are interpreted by the interpreter.
// Format is V(<bytecode>, <accumulator_use>, <operands>). // Format is V(<bytecode>, <accumulator_use>, <operands>).
#define BYTECODE_LIST(V) \ #define BYTECODE_LIST(V) \
/* Extended width operands */ \ /* Extended width operands */ \
V(Wide, AccumulatorUse::kNone) \ V(Wide, AccumulatorUse::kNone) \
V(ExtraWide, AccumulatorUse::kNone) \ V(ExtraWide, AccumulatorUse::kNone) \
\ \
/* Loading the accumulator */ \ /* Loading the accumulator */ \
V(LdaZero, AccumulatorUse::kWrite) \ V(LdaZero, AccumulatorUse::kWrite) \
V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \ V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \
V(LdaUndefined, AccumulatorUse::kWrite) \ V(LdaUndefined, AccumulatorUse::kWrite) \
V(LdaNull, AccumulatorUse::kWrite) \ V(LdaNull, AccumulatorUse::kWrite) \
V(LdaTheHole, AccumulatorUse::kWrite) \ V(LdaTheHole, AccumulatorUse::kWrite) \
V(LdaTrue, AccumulatorUse::kWrite) \ V(LdaTrue, AccumulatorUse::kWrite) \
V(LdaFalse, AccumulatorUse::kWrite) \ V(LdaFalse, AccumulatorUse::kWrite) \
V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \ V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \
\ \
/* Globals */ \ /* Globals */ \
V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \ V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \
V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \ V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \
OperandType::kIdx) \ OperandType::kIdx) \
V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \ V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \ OperandType::kIdx) \
V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \ V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \
OperandType::kIdx) \ OperandType::kIdx) \
\ \
/* Context operations */ \ /* Context operations */ \
V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \ V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \
V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \
V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kIdx, OperandType::kUImm) \ OperandType::kIdx, OperandType::kUImm) \
V(LdaImmutableContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
OperandType::kIdx, OperandType::kUImm) \ V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \
V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ OperandType::kIdx, OperandType::kUImm) \
V(LdaImmutableCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \
V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ \
OperandType::kIdx, OperandType::kUImm) \ /* Load-Store lookup slots */ \
V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \ V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
\ V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
/* Load-Store lookup slots */ \ OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \ OperandType::kIdx, OperandType::kUImm) \
OperandType::kIdx, OperandType::kUImm) \ V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \
V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \ V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \
OperandType::kIdx, OperandType::kUImm) \ OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \
V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \ OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \ V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \
V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \ V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \
OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \ \
V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \ /* Register-accumulator transfers */ \
V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \ V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \
\ V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \
/* Register-accumulator transfers */ \ \
V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \ /* Register-register transfers */ \
V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \ V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
\ \
/* Register-register transfers */ \ /* Property loads (LoadIC) operations */ \
V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \ V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
\ OperandType::kIdx, OperandType::kIdx) \
/* Property loads (LoadIC) operations */ \ V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx, OperandType::kIdx) \ \
V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \ /* Operations on module variables */ \
OperandType::kIdx) \ V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \
\ OperandType::kUImm) \
/* Operations on module variables */ \ V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \
V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \ OperandType::kUImm) \
OperandType::kUImm) \ \
V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \ /* Propery stores (StoreIC) operations */ \
OperandType::kUImm) \ V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
\ OperandType::kIdx, OperandType::kIdx) \
/* Propery stores (StoreIC) operations */ \ V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ OperandType::kIdx, OperandType::kIdx) \
OperandType::kIdx, OperandType::kIdx) \ V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kIdx, OperandType::kIdx) \ V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kReg, OperandType::kIdx) \ V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \
V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \
OperandType::kReg, OperandType::kIdx) \ \
V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \ /* Binary Operators */ \
OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \ V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
\ V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
/* Binary Operators */ \ V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \ V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \ V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \ V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \ OperandType::kIdx) \
V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \ V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ \
V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \ /* Binary operators with immediate operands */ \
OperandType::kIdx) \ V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
\ OperandType::kIdx) \
/* Binary operators with immediate operands */ \ V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kIdx) \ V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kReg, OperandType::kIdx) \ V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kReg, OperandType::kIdx) \ V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \ OperandType::kReg, OperandType::kIdx) \
OperandType::kReg, OperandType::kIdx) \ \
V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \ /* Unary Operators */ \
OperandType::kReg, OperandType::kIdx) \ V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \
\ V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \
/* Unary Operators */ \ V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \
V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \ V(LogicalNot, AccumulatorUse::kReadWrite) \
V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \ V(TypeOf, AccumulatorUse::kReadWrite) \
V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \ V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(LogicalNot, AccumulatorUse::kReadWrite) \ V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(TypeOf, AccumulatorUse::kReadWrite) \ \
V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \ /* GetSuperConstructor operator */ \
V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \ V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \
\ \
/* GetSuperConstructor operator */ \ /* Call operations */ \
V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \ V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
\ OperandType::kRegCount, OperandType::kIdx) \
/* Call operations */ \ V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
OperandType::kRegCount, OperandType::kIdx) \ V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kRegList, OperandType::kRegCount) \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \ V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
OperandType::kRegList, OperandType::kRegCount) \ V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kRegList, OperandType::kRegCount) \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \ V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \ OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
OperandType::kRegList, OperandType::kRegCount) \ V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \ OperandType::kRegList, OperandType::kRegCount) \
OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \ \
V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \ /* Intrinsics */ \
OperandType::kRegList, OperandType::kRegCount) \ V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
\ OperandType::kRegList, OperandType::kRegCount) \
/* Intrinsics */ \ \
V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \ /* Construct operators */ \
OperandType::kRegList, OperandType::kRegCount) \ V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \
\ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
/* Construct operators */ \ V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kRegList, OperandType::kRegCount) \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \ \
V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \ /* Test Operators */ \
OperandType::kRegList, OperandType::kRegCount) \ V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
\ OperandType::kIdx) \
/* Test Operators */ \ V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ OperandType::kIdx) \
OperandType::kIdx) \ V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \
V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \
OperandType::kIdx) \ \
V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \ /* TestEqual with Null or Undefined */ \
V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \ V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \
\ V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \
/* TestEqual with Null or Undefined */ \ V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \
V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \ \
V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \ /* Cast operators */ \
V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \ V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \
\ V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \
/* Cast operators */ \ V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \
V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \ \
V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \ /* Literals */ \
V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \ V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
\ OperandType::kIdx, OperandType::kFlag8) \
/* Literals */ \ V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ OperandType::kIdx, OperandType::kFlag8) \
OperandType::kIdx, OperandType::kFlag8) \ V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \
V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \
OperandType::kIdx, OperandType::kFlag8) \ \
V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \ /* Closure allocation */ \
OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \ V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \
\ OperandType::kIdx, OperandType::kFlag8) \
/* Closure allocation */ \ \
V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \ /* Context allocation */ \
OperandType::kIdx, OperandType::kFlag8) \ V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \
\ V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
/* Context allocation */ \ OperandType::kIdx, OperandType::kIdx) \
V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \ V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \
V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \
OperandType::kIdx, OperandType::kIdx) \ V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \ OperandType::kIdx) \
V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \ \
V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ /* Arguments allocation */ \
OperandType::kIdx) \ V(CreateMappedArguments, AccumulatorUse::kWrite) \
\ V(CreateUnmappedArguments, AccumulatorUse::kWrite) \
/* Arguments allocation */ \ V(CreateRestParameter, AccumulatorUse::kWrite) \
V(CreateMappedArguments, AccumulatorUse::kWrite) \ \
V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ /* Control Flow -- carefully ordered for efficient checks */ \
V(CreateRestParameter, AccumulatorUse::kWrite) \ /* - [Unconditional jumps] */ \
\ V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \
/* Control Flow -- carefully ordered for efficient checks */ \ /* - [Forward jumps] */ \
/* - [Unconditional jumps] */ \ V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \
V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \ /* - [Start constant jumps] */ \
/* - [Forward jumps] */ \ V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \ /* - [Conditional jumps] */ \
/* - [Start constant jumps] */ \ /* - [Conditional constant jumps] */ \
V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [Conditional jumps] */ \ V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [Conditional constant jumps] */ \ V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ /* - [Start ToBoolean jumps] */ \
V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
/* - [Start ToBoolean jumps] */ \ /* - [End constant jumps] */ \
V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ /* - [Conditional immediate jumps] */ \
V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \
/* - [End constant jumps] */ \ V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \
/* - [Conditional immediate jumps] */ \ /* - [End ToBoolean jumps] */ \
V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \ V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \ V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \
/* - [End ToBoolean jumps] */ \ V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \ V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \ V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \ V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \
V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \ \
V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \ /* Complex flow control For..in */ \
V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \ V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
\ OperandType::kRegOutTriple) \
/* Complex flow control For..in */ \ V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \ OperandType::kReg) \
OperandType::kRegOutTriple) \ V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \ OperandType::kRegPair, OperandType::kIdx) \
OperandType::kReg) \ V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ \
OperandType::kRegPair, OperandType::kIdx) \ /* Perform a stack guard check */ \
V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ V(StackCheck, AccumulatorUse::kNone) \
\ \
/* Perform a stack guard check */ \ /* Update the pending message */ \
V(StackCheck, AccumulatorUse::kNone) \ V(SetPendingMessage, AccumulatorUse::kReadWrite) \
\ \
/* Update the pending message */ \ /* Non-local flow control */ \
V(SetPendingMessage, AccumulatorUse::kReadWrite) \ V(Throw, AccumulatorUse::kRead) \
\ V(ReThrow, AccumulatorUse::kRead) \
/* Non-local flow control */ \ V(Return, AccumulatorUse::kRead) \
V(Throw, AccumulatorUse::kRead) \ \
V(ReThrow, AccumulatorUse::kRead) \ /* Generators */ \
V(Return, AccumulatorUse::kRead) \ V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
\ V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
/* Generators */ \ \
V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \ /* Debugger */ \
V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \ V(Debugger, AccumulatorUse::kNone) \
\ \
/* Debugger */ \ /* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
V(Debugger, AccumulatorUse::kNone) \ /* and one for each operand widening prefix bytecode */ \
\ V(DebugBreak0, AccumulatorUse::kRead) \
/* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \ V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
/* and one for each operand widening prefix bytecode */ \ V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
V(DebugBreak0, AccumulatorUse::kRead) \ V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \ OperandType::kReg) \
V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \ V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \ OperandType::kReg, OperandType::kReg) \
OperandType::kReg) \ V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \
V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \ OperandType::kReg, OperandType::kReg) \
OperandType::kReg, OperandType::kReg) \ V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \
V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \ OperandType::kReg, OperandType::kReg, OperandType::kReg) \
OperandType::kReg, OperandType::kReg) \ V(DebugBreakWide, AccumulatorUse::kRead) \
V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \ V(DebugBreakExtraWide, AccumulatorUse::kRead) \
OperandType::kReg, OperandType::kReg, OperandType::kReg) \ \
V(DebugBreakWide, AccumulatorUse::kRead) \ /* Illegal bytecode (terminates execution) */ \
V(DebugBreakExtraWide, AccumulatorUse::kRead) \ V(Illegal, AccumulatorUse::kNone) \
\ \
/* Illegal bytecode (terminates execution) */ \ /* No operation (used to maintain source positions for peephole */ \
V(Illegal, AccumulatorUse::kNone) \ /* eliminated bytecodes). */ \
\
/* No operation (used to maintain source positions for peephole */ \
/* eliminated bytecodes). */ \
V(Nop, AccumulatorUse::kNone) V(Nop, AccumulatorUse::kNone)
// List of debug break bytecodes. // List of debug break bytecodes.
...@@ -513,9 +510,7 @@ class V8_EXPORT_PRIVATE Bytecodes final { ...@@ -513,9 +510,7 @@ class V8_EXPORT_PRIVATE Bytecodes final {
bytecode == Bytecode::kLdaTheHole || bytecode == Bytecode::kLdaTheHole ||
bytecode == Bytecode::kLdaConstant || bytecode == Bytecode::kLdaConstant ||
bytecode == Bytecode::kLdaContextSlot || bytecode == Bytecode::kLdaContextSlot ||
bytecode == Bytecode::kLdaCurrentContextSlot || bytecode == Bytecode::kLdaCurrentContextSlot;
bytecode == Bytecode::kLdaImmutableContextSlot ||
bytecode == Bytecode::kLdaImmutableCurrentContextSlot;
} }
// Return true if |bytecode| is a register load without effects, // Return true if |bytecode| is a register load without effects,
......
...@@ -557,15 +557,6 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) { ...@@ -557,15 +557,6 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) {
__ Dispatch(); __ Dispatch();
} }
// LdaImmutableContextSlot <context> <slot_index> <depth>
//
// Load the object in |slot_index| of the context at |depth| in the context
// chain starting at |context| into the accumulator.
void Interpreter::DoLdaImmutableContextSlot(InterpreterAssembler* assembler) {
// TODO(danno) Share the actual code object rather creating a duplicate one.
DoLdaContextSlot(assembler);
}
// LdaCurrentContextSlot <slot_index> // LdaCurrentContextSlot <slot_index>
// //
// Load the object in |slot_index| of the current context into the accumulator. // Load the object in |slot_index| of the current context into the accumulator.
...@@ -577,15 +568,6 @@ void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) { ...@@ -577,15 +568,6 @@ void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) {
__ Dispatch(); __ Dispatch();
} }
// LdaImmutableCurrentContextSlot <slot_index>
//
// Load the object in |slot_index| of the current context into the accumulator.
void Interpreter::DoLdaImmutableCurrentContextSlot(
InterpreterAssembler* assembler) {
// TODO(danno) Share the actual code object rather creating a duplicate one.
DoLdaCurrentContextSlot(assembler);
}
// StaContextSlot <context> <slot_index> <depth> // StaContextSlot <context> <slot_index> <depth>
// //
// Stores the object in the accumulator into |slot_index| of the context at // Stores the object in the accumulator into |slot_index| of the context at
......
...@@ -142,7 +142,7 @@ bytecodes: [ ...@@ -142,7 +142,7 @@ bytecodes: [
B(Mov), R(4), R(6), B(Mov), R(4), R(6),
B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4), B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
B(Star), R(5), B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
/* 75 E> */ B(ToName), R(7), /* 75 E> */ B(ToName), R(7),
B(CreateClosure), U8(3), U8(3), U8(2), B(CreateClosure), U8(3), U8(3), U8(2),
B(Star), R(8), B(Star), R(8),
...@@ -150,7 +150,7 @@ bytecodes: [ ...@@ -150,7 +150,7 @@ bytecodes: [
B(Star), R(9), B(Star), R(9),
B(Ldar), R(8), B(Ldar), R(8),
B(StaDataPropertyInLiteral), R(5), R(7), U8(3), U8(5), B(StaDataPropertyInLiteral), R(5), R(7), U8(3), U8(5),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
/* 106 E> */ B(ToName), R(7), /* 106 E> */ B(ToName), R(7),
B(LdaConstant), U8(4), B(LdaConstant), U8(4),
B(TestEqualStrict), R(7), U8(0), B(TestEqualStrict), R(7), U8(0),
......
...@@ -48,7 +48,7 @@ bytecodes: [ ...@@ -48,7 +48,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10), /* 44 S> */ B(LdaSmi), I8(10),
/* 44 E> */ B(StaCurrentContextSlot), U8(4), /* 44 E> */ B(StaCurrentContextSlot), U8(4),
/* 74 S> */ B(LdaImmutableCurrentContextSlot), U8(4), /* 74 S> */ B(LdaCurrentContextSlot), U8(4),
/* 84 S> */ B(Return), /* 84 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -107,7 +107,7 @@ bytecodes: [ ...@@ -107,7 +107,7 @@ bytecodes: [
B(Ldar), R(1), B(Ldar), R(1),
/* 56 E> */ B(StaCurrentContextSlot), U8(4), /* 56 E> */ B(StaCurrentContextSlot), U8(4),
/* 64 S> */ B(CreateClosure), U8(1), U8(3), U8(2), /* 64 S> */ B(CreateClosure), U8(1), U8(3), U8(2),
/* 93 S> */ B(LdaImmutableCurrentContextSlot), U8(4), /* 93 S> */ B(LdaCurrentContextSlot), U8(4),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(DeletePropertyStrict), R(1), B(DeletePropertyStrict), R(1),
......
...@@ -57,7 +57,7 @@ bytecodes: [ ...@@ -57,7 +57,7 @@ bytecodes: [
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(13), B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1), B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
B(PopContext), R(8), B(PopContext), R(8),
...@@ -202,7 +202,7 @@ bytecodes: [ ...@@ -202,7 +202,7 @@ bytecodes: [
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(5), B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(14), B(Star), R(14),
B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1), B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
B(PopContext), R(9), B(PopContext), R(9),
...@@ -360,7 +360,7 @@ bytecodes: [ ...@@ -360,7 +360,7 @@ bytecodes: [
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(13), B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1), B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
B(PopContext), R(8), B(PopContext), R(8),
...@@ -508,7 +508,7 @@ bytecodes: [ ...@@ -508,7 +508,7 @@ bytecodes: [
B(JumpIfFalse), U8(6), B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(12), B(Star), R(12),
B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1), B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
B(PopContext), R(7), B(PopContext), R(7),
......
...@@ -35,13 +35,13 @@ bytecodes: [ ...@@ -35,13 +35,13 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5), B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(7), B(Star), R(7),
B(Mov), R(closure), R(6), B(Mov), R(closure), R(6),
/* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2), /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(6), B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(7), B(Star), R(7),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(7), B(SuspendGenerator), R(7),
...@@ -88,7 +88,7 @@ bytecodes: [ ...@@ -88,7 +88,7 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
B(Star), R(5), B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(6), B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5), B(Ldar), R(5),
...@@ -150,13 +150,13 @@ bytecodes: [ ...@@ -150,13 +150,13 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5), B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(7), B(Star), R(7),
B(Mov), R(closure), R(6), B(Mov), R(closure), R(6),
/* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2), /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(6), B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(7), B(Star), R(7),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(7), B(SuspendGenerator), R(7),
...@@ -191,7 +191,7 @@ bytecodes: [ ...@@ -191,7 +191,7 @@ bytecodes: [
B(Star), R(7), B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(6), B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(SuspendGenerator), R(7), B(SuspendGenerator), R(7),
...@@ -238,7 +238,7 @@ bytecodes: [ ...@@ -238,7 +238,7 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
B(Star), R(5), B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(6), B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5), B(Ldar), R(5),
...@@ -305,13 +305,13 @@ bytecodes: [ ...@@ -305,13 +305,13 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck), /* 11 E> */ B(StackCheck),
B(Mov), R(context), R(7), B(Mov), R(context), R(7),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(9), B(Star), R(9),
B(Mov), R(closure), R(8), B(Mov), R(closure), R(8),
/* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(8), U8(2), /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(8), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(8), B(Star), R(8),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(9), B(Star), R(9),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(9), B(SuspendGenerator), R(9),
...@@ -399,13 +399,13 @@ bytecodes: [ ...@@ -399,13 +399,13 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
B(LdaContextSlot), R(1), U8(6), U8(0), B(LdaContextSlot), R(1), U8(6), U8(0),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 36 S> */ B(LdaImmutableCurrentContextSlot), U8(4), /* 36 S> */ B(LdaCurrentContextSlot), U8(4),
B(Star), R(12), B(Star), R(12),
B(LdaFalse), B(LdaFalse),
B(Star), R(13), B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12), B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(5), U8(0), B(LdaContextSlot), R(1), U8(5), U8(0),
B(Star), R(13), B(Star), R(13),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(SuspendGenerator), R(13), B(SuspendGenerator), R(13),
...@@ -457,7 +457,7 @@ bytecodes: [ ...@@ -457,7 +457,7 @@ bytecodes: [
B(JumpIfFalse), U8(8), B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(StaContextSlot), R(1), U8(9), U8(0), B(StaContextSlot), R(1), U8(9), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(12), B(Star), R(12),
B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1), B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
B(PopContext), R(2), B(PopContext), R(2),
...@@ -573,7 +573,7 @@ bytecodes: [ ...@@ -573,7 +573,7 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
B(Star), R(7), B(Star), R(7),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(8), B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorClose), R(8), U8(1), B(CallRuntime), U16(Runtime::k_GeneratorClose), R(8), U8(1),
B(Ldar), R(7), B(Ldar), R(7),
......
...@@ -48,7 +48,7 @@ bytecodes: [ ...@@ -48,7 +48,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10), /* 42 S> */ B(LdaSmi), I8(10),
/* 42 E> */ B(StaCurrentContextSlot), U8(4), /* 42 E> */ B(StaCurrentContextSlot), U8(4),
/* 72 S> */ B(LdaImmutableCurrentContextSlot), U8(4), /* 72 S> */ B(LdaCurrentContextSlot), U8(4),
/* 82 S> */ B(Return), /* 82 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -38,13 +38,13 @@ bytecodes: [ ...@@ -38,13 +38,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -110,13 +110,13 @@ bytecodes: [ ...@@ -110,13 +110,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -184,13 +184,13 @@ bytecodes: [ ...@@ -184,13 +184,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(5), B(Star), R(5),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(5), B(Star), R(5),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(5), B(SuspendGenerator), R(5),
...@@ -290,13 +290,13 @@ bytecodes: [ ...@@ -290,13 +290,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(5), B(Star), R(5),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(5), B(Star), R(5),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(5), B(SuspendGenerator), R(5),
...@@ -383,13 +383,13 @@ bytecodes: [ ...@@ -383,13 +383,13 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(5), B(Star), R(5),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(5), B(Star), R(5),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(5), B(SuspendGenerator), R(5),
...@@ -476,13 +476,13 @@ bytecodes: [ ...@@ -476,13 +476,13 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(5), B(Star), R(5),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(5), B(Star), R(5),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(5), B(SuspendGenerator), R(5),
...@@ -567,13 +567,13 @@ bytecodes: [ ...@@ -567,13 +567,13 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -644,13 +644,13 @@ bytecodes: [ ...@@ -644,13 +644,13 @@ bytecodes: [
B(LdaTheHole), B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0), B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -733,13 +733,13 @@ bytecodes: [ ...@@ -733,13 +733,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -805,13 +805,13 @@ bytecodes: [ ...@@ -805,13 +805,13 @@ bytecodes: [
B(Ldar), R(this), B(Ldar), R(this),
B(StaCurrentContextSlot), U8(4), B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -882,13 +882,13 @@ bytecodes: [ ...@@ -882,13 +882,13 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(3), U8(1), B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(3), U8(1),
B(StaCurrentContextSlot), U8(6), B(StaCurrentContextSlot), U8(6),
/* 0 E> */ B(StackCheck), /* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
B(Star), R(4), B(Star), R(4),
B(Mov), R(closure), R(3), B(Mov), R(closure), R(3),
/* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2), /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(5), B(StaCurrentContextSlot), U8(5),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(5), B(LdaCurrentContextSlot), U8(5),
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(SuspendGenerator), R(4), B(SuspendGenerator), R(4),
...@@ -914,13 +914,13 @@ bytecodes: [ ...@@ -914,13 +914,13 @@ bytecodes: [
/* 45 S> */ B(Return), /* 45 S> */ B(Return),
B(Ldar), R(5), B(Ldar), R(5),
/* 0 E> */ B(Throw), /* 0 E> */ B(Throw),
/* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(6), /* 27 S> */ B(LdaCurrentContextSlot), U8(6),
B(Star), R(4), B(Star), R(4),
/* 30 E> */ B(LdaNamedProperty), R(4), U8(1), U8(4), /* 30 E> */ B(LdaNamedProperty), R(4), U8(1), U8(4),
B(Star), R(3), B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(6), B(LdaCurrentContextSlot), U8(6),
B(Star), R(5), B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(6), B(LdaCurrentContextSlot), U8(6),
B(Star), R(6), B(Star), R(6),
/* 41 E> */ B(LdaNamedProperty), R(6), U8(2), U8(6), /* 41 E> */ B(LdaNamedProperty), R(6), U8(2), U8(6),
B(Star), R(6), B(Star), R(6),
......
...@@ -23,9 +23,9 @@ parameter count: 1 ...@@ -23,9 +23,9 @@ parameter count: 1
bytecode array length: 13 bytecode array length: 13
bytecodes: [ bytecodes: [
/* 97 E> */ B(StackCheck), /* 97 E> */ B(StackCheck),
/* 102 S> */ B(LdaImmutableContextSlot), R(context), U8(4), U8(1), /* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(1),
B(Star), R(0), B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
/* 118 E> */ B(Mul), R(0), U8(2), /* 118 E> */ B(Mul), R(0), U8(2),
/* 130 S> */ B(Return), /* 130 S> */ B(Return),
] ]
...@@ -51,7 +51,7 @@ parameter count: 1 ...@@ -51,7 +51,7 @@ parameter count: 1
bytecode array length: 9 bytecode array length: 9
bytecodes: [ bytecodes: [
/* 97 E> */ B(StackCheck), /* 97 E> */ B(StackCheck),
/* 102 S> */ B(LdaImmutableCurrentContextSlot), U8(4), /* 102 S> */ B(LdaCurrentContextSlot), U8(4),
/* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1), /* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1),
B(LdaUndefined), B(LdaUndefined),
/* 123 S> */ B(Return), /* 123 S> */ B(Return),
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function h(g) {
return g();
}
function f() {
var g;
for (var i = 0; i < 10; i++) {
var y = i;
if (i === 5) {
g = function() {
return y;
};
assertEquals(5, h(g));
assertEquals(5, h(g));
%OptimizeFunctionOnNextCall(h);
assertEquals(5, h(g));
}
}
return g;
}
var myg = f();
assertEquals(9, h(myg));
...@@ -86,19 +86,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -86,19 +86,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
// Emit context operations. // Emit context operations.
builder.PushContext(reg) builder.PushContext(reg)
.PopContext(reg) .PopContext(reg)
.LoadContextSlot(reg, 1, 0, BytecodeArrayBuilder::kMutableSlot) .LoadContextSlot(reg, 1, 0)
.StoreContextSlot(reg, 1, 0) .StoreContextSlot(reg, 1, 0);
.LoadContextSlot(reg, 2, 0, BytecodeArrayBuilder::kImmutableSlot)
.StoreContextSlot(reg, 3, 0);
// Emit context operations which operate on the local context. // Emit context operations which operate on the local context.
builder builder.LoadContextSlot(Register::current_context(), 1, 0)
.LoadContextSlot(Register::current_context(), 1, 0, .StoreContextSlot(Register::current_context(), 1, 0);
BytecodeArrayBuilder::kMutableSlot)
.StoreContextSlot(Register::current_context(), 1, 0)
.LoadContextSlot(Register::current_context(), 2, 0,
BytecodeArrayBuilder::kImmutableSlot)
.StoreContextSlot(Register::current_context(), 3, 0);
// Emit load / store property operations. // Emit load / store property operations.
builder.LoadNamedProperty(reg, name, 0) builder.LoadNamedProperty(reg, name, 0)
...@@ -334,8 +327,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -334,8 +327,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
DataPropertyInLiteralFlag::kNoFlags, 0); DataPropertyInLiteralFlag::kNoFlags, 0);
// Emit wide context operations. // Emit wide context operations.
builder.LoadContextSlot(reg, 1024, 0, BytecodeArrayBuilder::kMutableSlot) builder.LoadContextSlot(reg, 1024, 0).StoreContextSlot(reg, 1024, 0);
.StoreContextSlot(reg, 1024, 0);
// Emit wide load / store lookup slots. // Emit wide load / store lookup slots.
builder.LoadLookupSlot(wide_name, TypeofMode::NOT_INSIDE_TYPEOF) builder.LoadLookupSlot(wide_name, TypeofMode::NOT_INSIDE_TYPEOF)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment