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

Unified Diff: src/builtins/ppc/builtins-ppc.cc

Issue 2319913004: PPC/s390: [Interpreter] Collect allocation site feedback in call bytecode handler. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/ppc/builtins-ppc.cc
diff --git a/src/builtins/ppc/builtins-ppc.cc b/src/builtins/ppc/builtins-ppc.cc
index a718df9461781fdca102a29bd9b00ea2c9e4836d..e420ce12c1926ed2fe14a527918765e2b190d054 100644
--- a/src/builtins/ppc/builtins-ppc.cc
+++ b/src/builtins/ppc/builtins-ppc.cc
@@ -1187,8 +1187,10 @@ void Builtins::Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm) {
__ blr();
}
-static void Generate_InterpreterPushArgs(MacroAssembler* masm, Register index,
+static void Generate_InterpreterPushArgs(MacroAssembler* masm,
+ Register num_args, Register index,
Register count, Register scratch) {
+ // TODO(mythria): Add a stack check before pushing arguments.
Label loop;
__ addi(index, index, Operand(kPointerSize)); // Bias up for LoadPU
__ mtctr(count);
@@ -1214,8 +1216,8 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl(
__ addi(r6, r3, Operand(1));
// TODO(mythria): Add a stack check before pushing arguments.
- // Push the arguments.
- Generate_InterpreterPushArgs(masm, r5, r6, r7);
+ // Push the arguments. r5, r6, r7 will be modified.
+ Generate_InterpreterPushArgs(masm, r6, r5, r6, r7);
// Call the target.
if (function_type == CallableType::kJSFunction) {
@@ -1249,7 +1251,8 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
Label skip;
__ cmpi(r3, Operand::Zero());
__ beq(&skip);
- Generate_InterpreterPushArgs(masm, r7, r3, r8);
+ // Push the arguments. r8, r7, r9 will be modified.
+ Generate_InterpreterPushArgs(masm, r3, r7, r3, r8);
__ bind(&skip);
__ AssertUndefinedOrAllocationSite(r5, r8);
@@ -1271,6 +1274,29 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
}
}
+// static
+void Builtins::Generate_InterpreterPushArgsAndConstructArray(
+ MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- r3 : argument count (not including receiver)
+ // -- r4 : target to call verified to be Array function
+ // -- r5 : allocation site feedback if available, undefined otherwise.
+ // -- r6 : address of the first argument
+ // -----------------------------------
+
+ __ addi(r7, r3, Operand(1)); // Add one for receiver.
+
+ // TODO(mythria): Add a stack check before pushing arguments.
+ // Push the arguments. r6, r8, r3 will be modified.
+ Generate_InterpreterPushArgs(masm, r7, r6, r7, r8);
+
+ // Array constructor expects constructor in r6. It is same as r4 here.
+ __ mr(r6, r4);
+
+ ArrayConstructorStub stub(masm->isolate());
+ __ TailCallStub(&stub);
+}
+
void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
// Set the return address to the correct point in the interpreter entry
// trampoline.
« no previous file with comments | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698