OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |