Index: src/parsing/preparser.cc |
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc |
index d765876a88072b680c29af0050752a4292bb851d..cc7f9f52bdf4dc73528ff0683fca60d74cec8f3f 100644 |
--- a/src/parsing/preparser.cc |
+++ b/src/parsing/preparser.cc |
@@ -131,11 +131,19 @@ PreParser::PreParseResult PreParser::PreParseFunction( |
formals_end_position, CHECK_OK_VALUE(kPreParseSuccess)); |
has_duplicate_parameters = |
!classifier()->is_valid_formal_parameter_list_without_duplicates(); |
+ |
+ if (track_unresolved_variables_) { |
+ function_scope->DeclareVariableName( |
+ ast_value_factory()->arguments_string(), VAR); |
+ function_scope->DeclareVariableName(ast_value_factory()->this_string(), |
+ VAR); |
+ } |
} |
Expect(Token::LBRACE, CHECK_OK_VALUE(kPreParseSuccess)); |
LazyParsingResult result = ParseStatementListAndLogFunction( |
&formals, has_duplicate_parameters, may_abort, ok); |
+ |
use_counts_ = nullptr; |
track_unresolved_variables_ = false; |