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

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

Issue 2307903002: [Interpreter] Collect allocation site feedback in call bytecode handler. (Closed)
Patch Set: ia32, arm and arm64 ports. 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
Index: src/builtins/arm/builtins-arm.cc
diff --git a/src/builtins/arm/builtins-arm.cc b/src/builtins/arm/builtins-arm.cc
index 5765f64484ec92129e3984513a3893cd4f157578..17274ee5ac3b552803eb9244fd1321643a4253c9 100644
--- a/src/builtins/arm/builtins-arm.cc
+++ b/src/builtins/arm/builtins-arm.cc
@@ -1249,6 +1249,32 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
}
}
+// static
+void Builtins::Generate_InterpreterPushArgsAndConstructArray(
+ MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- r0 : argument count (not including receiver)
+ // -- r1 : target to call verified to be Array function
+ // -- r2 : allocation site feedback if available, undefined otherwise.
+ // -- r3 : address of the first argument
+ // -----------------------------------
+
+ // Find the address of the last argument.
+ __ add(r4, r0, Operand(1)); // Add one for receiver.
+ __ mov(r4, Operand(r4, LSL, kPointerSizeLog2));
+ __ sub(r4, r3, r4);
+
+ // TODO(mythria): Add a stack check before pushing arguments.
+ // Push the arguments.
+ Generate_InterpreterPushArgs(masm, r3, r4, r5);
+
+ // Array constructor expects constructor in r3. It is same as r1 here.
+ __ mov(r3, r1);
+
+ 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.

Powered by Google App Engine
This is Rietveld 408576698