| Index: src/compiler/bytecode-graph-builder.cc
|
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
|
| index 865de43e4b214cd2223885937f02fe8556058f2d..6f7b374a7599eae1e15008d684b5c0b6fd0f02af 100644
|
| --- a/src/compiler/bytecode-graph-builder.cc
|
| +++ b/src/compiler/bytecode-graph-builder.cc
|
| @@ -809,16 +809,36 @@ Node* BytecodeGraphBuilder::BuildLoadContextSlot() {
|
| return NewNode(op, context);
|
| }
|
|
|
| +Node* BytecodeGraphBuilder::BuildLoadCurrentContextSlot() {
|
| + // 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(
|
| + 0, bytecode_iterator().GetIndexOperand(0), false);
|
| + Node* context = environment()->Context();
|
| + return NewNode(op, context);
|
| +}
|
| +
|
| void BytecodeGraphBuilder::VisitLdaContextSlot() {
|
| Node* node = BuildLoadContextSlot();
|
| environment()->BindAccumulator(node);
|
| }
|
|
|
| +void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() {
|
| + Node* node = BuildLoadCurrentContextSlot();
|
| + environment()->BindAccumulator(node);
|
| +}
|
| +
|
| void BytecodeGraphBuilder::VisitLdrContextSlot() {
|
| Node* node = BuildLoadContextSlot();
|
| environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), node);
|
| }
|
|
|
| +void BytecodeGraphBuilder::VisitLdrCurrentContextSlot() {
|
| + Node* node = BuildLoadCurrentContextSlot();
|
| + environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), node);
|
| +}
|
| +
|
| void BytecodeGraphBuilder::VisitStaContextSlot() {
|
| const Operator* op = javascript()->StoreContext(
|
| bytecode_iterator().GetUnsignedImmediateOperand(2),
|
| @@ -829,6 +849,14 @@ void BytecodeGraphBuilder::VisitStaContextSlot() {
|
| NewNode(op, context, value);
|
| }
|
|
|
| +void BytecodeGraphBuilder::VisitStaCurrentContextSlot() {
|
| + const Operator* op =
|
| + javascript()->StoreContext(0, bytecode_iterator().GetIndexOperand(0));
|
| + Node* context = environment()->Context();
|
| + Node* value = environment()->LookupAccumulator();
|
| + NewNode(op, context, value);
|
| +}
|
| +
|
| void BytecodeGraphBuilder::BuildLdaLookupSlot(TypeofMode typeof_mode) {
|
| PrepareEagerCheckpoint();
|
| Node* name =
|
|
|