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

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

Issue 908883002: new classes: implement new.target passing to superclass constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 arithmetic 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/variables.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index 80a41dde16c6d06b570347c9d2772fb1795db1b3..ca23b369234953fca11edbe9658e53f78f539969 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -516,6 +516,9 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ Push(rax);
__ SmiToInteger32(rax, rax);
+ // Push new.target
+ __ Push(rdx);
+
// receiver is the hole.
__ Push(masm->isolate()->factory()->the_hole_value());
@@ -533,6 +536,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ j(greater_equal, &loop);
// Call the function.
+ __ incp(rax); // Pushed new.target.
ParameterCount actual(rax);
__ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper());
« no previous file with comments | « src/variables.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698