Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index ea6c37902afad75d0dfba7433bdbe54cedf5545d..8590365a175c3e4e07a2195df073e7b93b725619 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -246,6 +246,8 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
const int kGlobalIndex = |
Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ movq(rbx, FieldOperand(rsi, kGlobalIndex)); |
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalContextOffset)); |
+ __ movq(rbx, FieldOperand(rbx, kGlobalIndex)); |
__ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
__ bind(&patch_receiver); |
@@ -400,6 +402,8 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
const int kGlobalOffset = |
Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
__ movq(rbx, FieldOperand(rsi, kGlobalOffset)); |
+ __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalContextOffset)); |
+ __ movq(rbx, FieldOperand(rbx, kGlobalOffset)); |
__ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
// Push the receiver. |