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

Unified Diff: src/ppc/macro-assembler-ppc.cc

Issue 1469283004: PPC: [turbofan] Switch passing of new.target to register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/macro-assembler-ppc.cc
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
index 88ca14977a585ff3921400967c8333494f5dfbbe..17473479fad76612902759e9a0ea3b8d7434b1c1 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -1085,12 +1085,20 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
}
-void MacroAssembler::InvokeCode(Register code, const ParameterCount& expected,
+void MacroAssembler::InvokeCode(Register code, Register new_target,
+ const ParameterCount& expected,
const ParameterCount& actual, InvokeFlag flag,
const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
+ // Ensure new target is passed in the correct register. Otherwise clear the
+ // appropriate register in case new target is not given.
+ DCHECK_IMPLIES(new_target.is_valid(), new_target.is(r6));
+ if (!new_target.is_valid()) {
+ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
+ }
+
Label done;
bool definitely_mismatches = false;
InvokePrologue(expected, actual, &done, &definitely_mismatches, flag,
@@ -1112,7 +1120,8 @@ void MacroAssembler::InvokeCode(Register code, const ParameterCount& expected,
}
-void MacroAssembler::InvokeFunction(Register fun, const ParameterCount& actual,
+void MacroAssembler::InvokeFunction(Register fun, Register new_target,
+ const ParameterCount& actual,
InvokeFlag flag,
const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
@@ -1135,7 +1144,7 @@ void MacroAssembler::InvokeFunction(Register fun, const ParameterCount& actual,
LoadP(code_reg, FieldMemOperand(r4, JSFunction::kCodeEntryOffset));
ParameterCount expected(expected_reg);
- InvokeCode(code_reg, expected, actual, flag, call_wrapper);
+ InvokeCode(code_reg, new_target, expected, actual, flag, call_wrapper);
}
@@ -1157,7 +1166,7 @@ void MacroAssembler::InvokeFunction(Register function,
// allow recompilation to take effect without changing any of the
// call sites.
LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset));
- InvokeCode(ip, expected, actual, flag, call_wrapper);
+ InvokeCode(ip, no_reg, expected, actual, flag, call_wrapper);
}
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698