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

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

Issue 906813003: MIPS: new classes: implement new.target passing to superclass constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index e35b7097f1d1de35c564f2d439e80167c9b79a78..f2e5ef73fa7c58fd3d605ea21cd87dea43999c58 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -778,6 +778,9 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ SmiTag(t0);
__ push(t0); // Smi-tagged arguments count.
+ // Push new.target.
+ __ push(a3);
+
// receiver is the hole.
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
__ push(at);
@@ -791,7 +794,8 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
// a2: address of last argument (caller sp)
// t0: number of arguments (smi-tagged)
// sp[0]: receiver
- // sp[1]: number of arguments (smi-tagged)
+ // sp[1]: new.target
+ // sp[2]: number of arguments (smi-tagged)
Label loop, entry;
__ Branch(&entry);
__ bind(&loop);
@@ -806,6 +810,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
// Call the function.
// a0: number of arguments
// a1: constructor function
+ __ Addu(a0, a0, Operand(1));
ParameterCount actual(a0);
__ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698