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

Side by Side Diff: src/parsing/preparser.cc

Issue 2657413002: No need to collect literal counts.
Patch Set: Rebase. Created 3 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 unified diff | Download patch
« no previous file with comments | « src/parsing/preparser.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 6
7 #include "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool may_abort, bool* ok) { 288 bool may_abort, bool* ok) {
289 PreParserStatementList body; 289 PreParserStatementList body;
290 LazyParsingResult result = ParseStatementList( 290 LazyParsingResult result = ParseStatementList(
291 body, Token::RBRACE, may_abort, CHECK_OK_VALUE(kLazyParsingComplete)); 291 body, Token::RBRACE, may_abort, CHECK_OK_VALUE(kLazyParsingComplete));
292 if (result == kLazyParsingAborted) return result; 292 if (result == kLazyParsingAborted) return result;
293 293
294 // Position right after terminal '}'. 294 // Position right after terminal '}'.
295 DCHECK_EQ(Token::RBRACE, scanner()->peek()); 295 DCHECK_EQ(Token::RBRACE, scanner()->peek());
296 int body_end = scanner()->peek_location().end_pos; 296 int body_end = scanner()->peek_location().end_pos;
297 DCHECK_EQ(this->scope()->is_function_scope(), formals->is_simple); 297 DCHECK_EQ(this->scope()->is_function_scope(), formals->is_simple);
298 log_.LogFunction( 298 log_.LogFunction(body_end, formals->num_parameters(),
299 body_end, formals->num_parameters(), formals->function_length, 299 formals->function_length, has_duplicate_parameters,
300 has_duplicate_parameters, function_state_->materialized_literal_count(), 300 function_state_->expected_property_count(),
301 function_state_->expected_property_count(), GetLastFunctionLiteralId()); 301 GetLastFunctionLiteralId());
302 return kLazyParsingComplete; 302 return kLazyParsingComplete;
303 } 303 }
304 304
305 PreParserExpression PreParser::ExpressionFromIdentifier( 305 PreParserExpression PreParser::ExpressionFromIdentifier(
306 PreParserIdentifier name, int start_position, InferName infer) { 306 PreParserIdentifier name, int start_position, InferName infer) {
307 VariableProxy* proxy = nullptr; 307 VariableProxy* proxy = nullptr;
308 if (track_unresolved_variables_) { 308 if (track_unresolved_variables_) {
309 AstNodeFactory factory(ast_value_factory()); 309 AstNodeFactory factory(ast_value_factory());
310 // Setting the Zone is necessary because zone_ might be the temp Zone, and 310 // Setting the Zone is necessary because zone_ might be the temp Zone, and
311 // AstValueFactory doesn't know about it. 311 // AstValueFactory doesn't know about it.
(...skipping 29 matching lines...) Expand all
341 } 341 }
342 } 342 }
343 } 343 }
344 344
345 #undef CHECK_OK 345 #undef CHECK_OK
346 #undef CHECK_OK_CUSTOM 346 #undef CHECK_OK_CUSTOM
347 347
348 348
349 } // namespace internal 349 } // namespace internal
350 } // namespace v8 350 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/preparser.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698