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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 911363002: Revert of 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/x64/code-stubs-x64.cc ('k') | test/mjsunit/harmony/classes-experimental.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 63357e95f591de24f907152f0853e67dd8087cf9..65e60fb855368667302c9cab27e7dce5c1a3bca7 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -254,11 +254,6 @@
// function, receiver address, parameter count.
// The stub will rewrite receiver and parameter count if the previous
// stack frame was an arguments adapter frame.
-
- ArgumentsAccessStub::HasNewTarget has_new_target =
- IsSubclassConstructor(info->function()->kind())
- ? ArgumentsAccessStub::HAS_NEW_TARGET
- : ArgumentsAccessStub::NO_NEW_TARGET;
ArgumentsAccessStub::Type type;
if (is_strict(language_mode())) {
type = ArgumentsAccessStub::NEW_STRICT;
@@ -267,7 +262,7 @@
} else {
type = ArgumentsAccessStub::NEW_SLOPPY_FAST;
}
- ArgumentsAccessStub stub(isolate(), type, has_new_target);
+ ArgumentsAccessStub stub(isolate(), type);
__ CallStub(&stub);
SetVar(arguments, rax, rbx, rdx);
@@ -421,12 +416,7 @@
__ popq(rbp);
int no_frame_start = masm_->pc_offset();
- int arg_count = info_->scope()->num_parameters() + 1;
- if (FLAG_experimental_classes &&
- IsSubclassConstructor(info_->function()->kind())) {
- arg_count++;
- }
- int arguments_bytes = arg_count * kPointerSize;
+ int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize;
__ Ret(arguments_bytes, rcx);
// Add padding that will be overwritten by a debugger breakpoint. We
@@ -3152,10 +3142,6 @@
void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
- Variable* new_target_var = scope()->DeclarationScope()->new_target_var();
- GetVar(result_register(), new_target_var);
- __ Push(result_register());
-
SuperReference* super_ref = expr->expression()->AsSuperReference();
EmitLoadSuperConstructor(super_ref);
__ Push(result_register());
@@ -3200,13 +3186,10 @@
__ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot()));
// TODO(dslomov): use a different stub and propagate new.target.
- CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
+ CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
__ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
- __ Drop(1);
-
RecordJSReturnSite(expr);
-
EmitVariableAssignment(this_var, Token::INIT_CONST);
context()->Plug(rax);
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/harmony/classes-experimental.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698