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

Unified Diff: src/builtins/s390/builtins-s390.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 | « src/builtins/ppc/builtins-ppc.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/s390/builtins-s390.cc
diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc
index b2d2352c1bd4bd49815cef524f7c74e826e68289..293ff2e4e25757e7bf26ae6fce33b6002dd65838 100644
--- a/src/builtins/s390/builtins-s390.cc
+++ b/src/builtins/s390/builtins-s390.cc
@@ -1191,8 +1191,10 @@ void Builtins::Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm) {
__ Ret();
}
-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;
__ AddP(index, index, Operand(kPointerSize)); // Bias up for LoadPU
__ LoadRR(r0, count);
@@ -1220,7 +1222,7 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl(
__ AddP(r5, r2, Operand(1));
// Push the arguments.
- Generate_InterpreterPushArgs(masm, r4, r5, r6);
+ Generate_InterpreterPushArgs(masm, r5, r4, r5, r6);
// Call the target.
if (function_type == CallableType::kJSFunction) {
@@ -1254,7 +1256,7 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
Label skip;
__ CmpP(r2, Operand::Zero());
__ beq(&skip);
- Generate_InterpreterPushArgs(masm, r6, r2, r7);
+ Generate_InterpreterPushArgs(masm, r2, r6, r2, r7);
__ bind(&skip);
__ AssertUndefinedOrAllocationSite(r4, r7);
@@ -1276,6 +1278,29 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
}
}
+// static
+void Builtins::Generate_InterpreterPushArgsAndConstructArray(
+ MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- r2 : argument count (not including receiver)
+ // -- r3 : target to call verified to be Array function
+ // -- r4 : allocation site feedback if available, undefined otherwise.
+ // -- r5 : address of the first argument
+ // -----------------------------------
+
+ __ AddP(r6, r2, 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, r6, r5, r6, r7);
+
+ // Array constructor expects constructor in r5. It is same as r3 here.
+ __ LoadRR(r5, r3);
+
+ 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 | « src/builtins/ppc/builtins-ppc.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698