Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index e6a20f21f86a9d0e0c473bb1873720dfde06bb01..d35219c2dcb8cac1ad1fee2eef3cb38a04031bb8 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -3250,7 +3250,10 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) { |
// TODO(kmillikin): We have a hydrogen value for the global object. See |
// if it's better to use it than to explicitly fetch it from the context |
// here. |
- CallStubCompiler::FetchGlobalProxy(masm(), receiver, function); |
+ __ movq(receiver, Operand(rbp, StandardFrameConstants::kContextOffset)); |
+ __ movq(receiver, ContextOperand(receiver, Context::GLOBAL_OBJECT_INDEX)); |
+ __ movq(receiver, |
+ FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); |
__ bind(&receiver_ok); |
} |
@@ -3815,10 +3818,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { |
ASSERT(ToRegister(instr->result()).is(rax)); |
int arity = instr->arity(); |
- CallFunctionFlags flags = |
- instr->hydrogen()->IsContextualCall() ? |
- RECEIVER_IS_IMPLICIT : NO_CALL_FUNCTION_FLAGS; |
- CallFunctionStub stub(arity, flags); |
+ CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
if (instr->hydrogen()->IsTailCall()) { |
if (NeedsEagerFrame()) __ leave(); |
__ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |