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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 1237813002: Switch CallConstructStub to take new.target in register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments about ARM and MIPS. Created 5 years, 5 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/arm64/builtins-arm64.cc ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index e67b4fd2beb291703281082aa711f1c21c975fc3..47e789a8287b464a43b2e4a071078d8c73906aff 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -2985,7 +2985,8 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
// x0 : number of arguments
// x1 : the function to call
// x2 : feedback vector
- // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol)
+ // x3 : slot in feedback vector (Smi, for RecordCallTarget)
+ // x4 : original constructor (for IsSuperConstructorCall)
Register function = x1;
Label slow, non_function_call;
@@ -2997,7 +2998,14 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
&slow);
if (RecordCallTarget()) {
+ if (IsSuperConstructorCall()) {
+ __ Push(x4);
+ }
+ // TODO(mstarzinger): Consider tweaking target recording to avoid push/pop.
GenerateRecordCallTarget(masm, x0, function, x2, x3, x4, x5, x11);
+ if (IsSuperConstructorCall()) {
+ __ Pop(x4);
+ }
__ Add(x5, x2, Operand::UntagSmiAndScale(x3, kPointerSizeLog2));
if (FLAG_pretenuring_call_new) {
@@ -3020,9 +3028,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
}
if (IsSuperConstructorCall()) {
- __ Mov(x4, Operand(1 * kPointerSize));
- __ Add(x4, x4, Operand(x0, LSL, kPointerSizeLog2));
- __ Peek(x3, x4);
+ __ Mov(x3, x4);
} else {
__ Mov(x3, function);
}
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698