Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 111613003: Load the global proxy from the context of the target function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: don't embed global object or receiver in hydrogen Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index ade69286c8446405e8f9a39fe0beebf8721ba3f1..c42936d0544b82e57bc36e73a6a12ae63c919ade 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -3494,9 +3494,8 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
__ b(&result_in_receiver);
__ bind(&global_object);
- __ ldr(result, GlobalObjectOperand());
- __ ldr(result,
- FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset));
+ CallStubCompiler::FetchGlobalProxy(masm(), receiver, function);
+
if (result.is(receiver)) {
__ bind(&result_in_receiver);
} else {
@@ -3994,7 +3993,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);

Powered by Google App Engine
This is Rietveld 408576698