| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 0fc75028b304bd965d9b937e2b70155d61134a5c..1d375e15f8a3e295ca346104838dd9f0873ba2da 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -3617,15 +3617,10 @@ void MacroAssembler::CopyBytes(Register destination,
|
| 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.
|
| - movq(dst, Operand(rsi, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
| - // Load the function context (which is the incoming, outer context).
|
| - movq(dst, FieldOperand(dst, JSFunction::kContextOffset));
|
| + movq(dst, Operand(rsi, Context::SlotOffset(Context::PREVIOUS_INDEX)));
|
| for (int i = 1; i < context_chain_length; i++) {
|
| - movq(dst, Operand(dst, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
| - movq(dst, FieldOperand(dst, JSFunction::kContextOffset));
|
| + movq(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
|
| }
|
| - // The context may be an intermediate context, not a function context.
|
| - movq(dst, Operand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
|
| } else {
|
| // Slot is in the current function context. Move it into the
|
| // destination register in case we store into it (the write barrier
|
|
|