|
|
Chromium Code Reviews|
Created:
5 years, 6 months ago by MTBrandyberry Modified:
5 years, 6 months ago CC:
v8-dev Base URL:
https://chromium.googlesource.com/v8/v8.git@master Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
DescriptionPPC: Fix "Fix receiver when calling eval() bound by with scope"
R=wingo@igalia.com, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=
Committed: https://crrev.com/01009640b7590b2bd68a14171f96c5d42a2ab75f
Cr-Commit-Position: refs/heads/master@{#29300}
Patch Set 1 #Patch Set 2 : Rebase and reapply #
Messages
Total messages: 14 (4 generated)
lgtm
The CQ bit was checked by mbrandy@us.ibm.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1209703002/1
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for src/ppc/full-codegen-ppc.cc:
While running git apply --index -3 -p1;
error: patch failed: src/ppc/full-codegen-ppc.cc:3148
Falling back to three-way merge...
Applied patch to 'src/ppc/full-codegen-ppc.cc' with conflicts.
U src/ppc/full-codegen-ppc.cc
Patch: src/ppc/full-codegen-ppc.cc
Index: src/ppc/full-codegen-ppc.cc
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
index
e89be857cfd4c70a83fba91986b99ccb50f2d3e6..83526dd7d87920f196023f244aa68ce08c49f792
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);
On 2015/06/24 19:12:21, commit-bot: I haz the power wrote:
> Failed to apply patch for src/ppc/full-codegen-ppc.cc:
> While running git apply --index -3 -p1;
> error: patch failed: src/ppc/full-codegen-ppc.cc:3148
> Falling back to three-way merge...
> Applied patch to 'src/ppc/full-codegen-ppc.cc' with conflicts.
> U src/ppc/full-codegen-ppc.cc
>
> Patch: src/ppc/full-codegen-ppc.cc
> Index: src/ppc/full-codegen-ppc.cc
> diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
> index
>
e89be857cfd4c70a83fba91986b99ccb50f2d3e6..83526dd7d87920f196023f244aa68ce08c49f792
> 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);
Holding off on this until the revert of the original commit is sorted.
On 2015/06/24 20:00:48, mtbrandyberry wrote:
> On 2015/06/24 19:12:21, commit-bot: I haz the power wrote:
> > Failed to apply patch for src/ppc/full-codegen-ppc.cc:
> > While running git apply --index -3 -p1;
> > error: patch failed: src/ppc/full-codegen-ppc.cc:3148
> > Falling back to three-way merge...
> > Applied patch to 'src/ppc/full-codegen-ppc.cc' with conflicts.
> > U src/ppc/full-codegen-ppc.cc
> >
> > Patch: src/ppc/full-codegen-ppc.cc
> > Index: src/ppc/full-codegen-ppc.cc
> > diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
> > index
> >
>
e89be857cfd4c70a83fba91986b99ccb50f2d3e6..83526dd7d87920f196023f244aa68ce08c49f792
> > 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);
>
> Holding off on this until the revert of the original commit is sorted.
Did I just paste x64 assembly into this thing? My bad :P I meant to cut and
paste from the code below but I obviously flubbed it. Sorry about that!
The CQ bit was checked by mbrandy@us.ibm.com
The patchset sent to the CQ was uploaded after l-g-t-m from dstence@us.ibm.com Link to the patchset: https://codereview.chromium.org/1209703002/#ps20001 (title: "Rebase and reapply")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1209703002/20001
lgtm
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/01009640b7590b2bd68a14171f96c5d42a2ab75f Cr-Commit-Position: refs/heads/master@{#29300} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
