| Index: src/compiler/bytecode-graph-builder.cc
|
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
|
| index 93a2971ed16837801609c32d5dbed6aee2bc28bd..9ad681c3139697ebac2f6e746cdf28177315cb83 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::BuildLoadLocalContextSlot() {
|
| + // 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::VisitLdaLocalContextSlot() {
|
| + Node* node = BuildLoadLocalContextSlot();
|
| + environment()->BindAccumulator(node);
|
| +}
|
| +
|
| void BytecodeGraphBuilder::VisitLdrContextSlot() {
|
| Node* node = BuildLoadContextSlot();
|
| environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), node);
|
| }
|
|
|
| +void BytecodeGraphBuilder::VisitLdrLocalContextSlot() {
|
| + Node* node = BuildLoadLocalContextSlot();
|
| + 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::VisitStaLocalContextSlot() {
|
| + 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 =
|
|
|