Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 464478a310000dd872229e35edb8de3b106bd2a1..e10e2992ad5736f4d37b2a9b21fabebb9fd027cc 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2538,12 +2538,9 @@ void MacroAssembler::Abort(const char* msg) { |
void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
if (context_chain_length > 0) { |
// Move up the chain of contexts to the context containing the slot. |
- ldr(dst, MemOperand(cp, Context::SlotOffset(Context::CLOSURE_INDEX))); |
- // Load the function context (which is the incoming, outer context). |
- ldr(dst, FieldMemOperand(dst, JSFunction::kContextOffset)); |
+ ldr(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
for (int i = 1; i < context_chain_length; i++) { |
- ldr(dst, MemOperand(dst, Context::SlotOffset(Context::CLOSURE_INDEX))); |
- ldr(dst, FieldMemOperand(dst, JSFunction::kContextOffset)); |
+ ldr(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
} |
} else { |
// Slot is in the current function context. Move it into the |