Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 5fc778d72476b4f612e555ecd2650ffe7ccd6531..fe334e16412933e6156099538a84c4139f128701 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -295,6 +295,18 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupSlot( |
return *this; |
} |
+BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupContextSlot( |
+ const Handle<String> name, TypeofMode typeof_mode, int slot_index, |
+ int depth) { |
+ Bytecode bytecode = (typeof_mode == INSIDE_TYPEOF) |
+ ? Bytecode::kLdaLookupContextSlotInsideTypeof |
+ : Bytecode::kLdaLookupContextSlot; |
+ size_t name_index = GetConstantPoolEntry(name); |
+ Output(bytecode, UnsignedOperand(name_index), UnsignedOperand(slot_index), |
+ UnsignedOperand(depth)); |
+ return *this; |
+} |
+ |
BytecodeArrayBuilder& BytecodeArrayBuilder::StoreLookupSlot( |
const Handle<String> name, LanguageMode language_mode) { |
Bytecode bytecode = BytecodeForStoreLookupSlot(language_mode); |