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

Unified Diff: src/compiler.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/code-stubs.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 5d605fd3e2ecbf026bdc65fe4cb486d4f9f10d95..4b4c9105908cb337869f5d273d8dd541f9f5148a 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -618,7 +618,12 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
bool is_toplevel,
Handle<Script> script) {
function_info->set_length(lit->parameter_count());
- function_info->set_formal_parameter_count(lit->parameter_count());
+ if (FLAG_experimental_classes && IsSubclassConstructor(lit->kind())) {
+ function_info->set_internal_formal_parameter_count(lit->parameter_count() +
+ 1);
+ } else {
+ function_info->set_internal_formal_parameter_count(lit->parameter_count());
+ }
function_info->set_script(*script);
function_info->set_function_token_position(lit->function_token_position());
function_info->set_start_position(lit->start_position());
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698