Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 0463ce44706415be5e3531f1d24e4f8229b33728..c58fdb1c928eef7c1d3b96ad7ac9a986ac92a031 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -3491,11 +3491,8 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) { |
__ b(&result_in_receiver); |
__ bind(&global_object); |
+ CallStubCompiler::FetchGlobalProxy(masm(), receiver, function); |
- __ ldr(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
- __ ldr(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); |
- __ ldr(result, |
- FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset)); |
if (result.is(receiver)) { |
__ bind(&result_in_receiver); |
} else { |
@@ -3993,7 +3990,10 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { |
ASSERT(ToRegister(instr->result()).is(r0)); |
int arity = instr->arity(); |
- CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
+ CallFunctionFlags flags = |
+ instr->hydrogen()->IsContextualCall() ? |
+ RECEIVER_IS_IMPLICIT : NO_CALL_FUNCTION_FLAGS; |
+ CallFunctionStub stub(arity, flags); |
if (instr->hydrogen()->IsTailCall()) { |
if (NeedsEagerFrame()) __ mov(sp, fp); |
__ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |