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

Unified Diff: src/mips64/builtins-mips64.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 | « src/mips/full-codegen-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index 7819cd8ee95bc4ae2428e5078513a4f3e9b1ce2d..456be8ff7f4710dc9d5cb2f3949245f5acdfae40 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -787,6 +787,9 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ SmiTag(a4);
__ push(a4); // Smi-tagged arguments count.
+ // Push new.target.
+ __ push(a3);
+
// receiver is the hole.
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
__ push(at);
@@ -800,7 +803,8 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
// a2: address of last argument (caller sp)
// a4: 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;
__ SmiUntag(a4);
__ jmp(&entry);
@@ -816,6 +820,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
// Call the function.
// a0: number of arguments
// a1: constructor function
+ __ Daddu(a0, a0, Operand(1));
ParameterCount actual(a0);
__ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698