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()); |