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

Unified Diff: src/ppc/full-codegen-ppc.cc

Issue 1209703002: PPC: Fix "Fix receiver when calling eval() bound by with scope" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase and reapply Created 5 years, 6 months 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
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/full-codegen-ppc.cc
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
index c88562007044125ccdc5fd826817248a5538ab20..fca0698d67eb9af8db83f62cfdb2853dc2a486cd 100644
--- a/src/ppc/full-codegen-ppc.cc
+++ b/src/ppc/full-codegen-ppc.cc
@@ -3148,34 +3148,35 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
EmitDynamicLookupFastCase(callee, NOT_INSIDE_TYPEOF, &slow, &done);
}
__ bind(&slow);
- // Call the runtime to find the function to call (returned in rax) and
- // the object holding it (returned in rdx).
- __ Push(context_register());
- __ Push(callee->name());
+ // Call the runtime to find the function to call (returned in r3) and
+ // the object holding it (returned in r4).
+ DCHECK(!context_register().is(r5));
+ __ mov(r5, Operand(callee->name()));
+ __ Push(context_register(), r5);
__ CallRuntime(Runtime::kLoadLookupSlot, 2);
- __ Push(rax); // Function.
- __ Push(rdx); // Receiver.
+ __ Push(r3, r4); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);
// If fast case code has been generated, emit code to push the function
// and receiver and have the slow path jump around this code.
if (done.is_linked()) {
Label call;
- __ jmp(&call, Label::kNear);
+ __ b(&call);
__ bind(&done);
// Push function.
- __ Push(rax);
+ __ push(r3);
// Pass undefined as the receiver, which is the WithBaseObject of a
// non-object environment record. If the callee is sloppy, it will patch
// it up to be the global receiver.
- __ PushRoot(Heap::kUndefinedValueRootIndex);
+ __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
+ __ push(r4);
__ bind(&call);
}
} else {
VisitForStackValue(callee);
// refEnv.WithBaseObject()
__ LoadRoot(r5, Heap::kUndefinedValueRootIndex);
- __ push(r5);
+ __ push(r5); // Reserved receiver slot.
}
}
@@ -3796,7 +3797,7 @@ void FullCodeGenerator::EmitArguments(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
DCHECK(args->length() == 1);
- // ArgumentsAccessStub expects the key in edx and the formal
+ // ArgumentsAccessStub expects the key in r4 and the formal
// parameter count in r3.
VisitForAccumulatorValue(args->at(0));
__ mr(r4, r3);
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698