| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_PARSING_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
| (...skipping 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3053 formal_parameters.materialized_literals_count); | 3053 formal_parameters.materialized_literals_count); |
| 3054 | 3054 |
| 3055 this->ReindexLiterals(formal_parameters); | 3055 this->ReindexLiterals(formal_parameters); |
| 3056 | 3056 |
| 3057 Expect(Token::ARROW, CHECK_OK); | 3057 Expect(Token::ARROW, CHECK_OK); |
| 3058 | 3058 |
| 3059 if (peek() == Token::LBRACE) { | 3059 if (peek() == Token::LBRACE) { |
| 3060 // Multiple statement body | 3060 // Multiple statement body |
| 3061 Consume(Token::LBRACE); | 3061 Consume(Token::LBRACE); |
| 3062 bool is_lazily_parsed = | 3062 bool is_lazily_parsed = |
| 3063 (mode() == PARSE_LAZILY && scope_->AllowsLazyCompilation()); | 3063 (mode() == PARSE_LAZILY && scope_->AllowsLazyParsing()); |
| 3064 if (is_lazily_parsed) { | 3064 if (is_lazily_parsed) { |
| 3065 body = this->NewStatementList(0, zone()); | 3065 body = this->NewStatementList(0, zone()); |
| 3066 this->SkipLazyFunctionBody(&materialized_literal_count, | 3066 this->SkipLazyFunctionBody(&materialized_literal_count, |
| 3067 &expected_property_count, CHECK_OK); | 3067 &expected_property_count, CHECK_OK); |
| 3068 if (formal_parameters.materialized_literals_count > 0) { | 3068 if (formal_parameters.materialized_literals_count > 0) { |
| 3069 materialized_literal_count += | 3069 materialized_literal_count += |
| 3070 formal_parameters.materialized_literals_count; | 3070 formal_parameters.materialized_literals_count; |
| 3071 } | 3071 } |
| 3072 } else { | 3072 } else { |
| 3073 body = this->ParseEagerFunctionBody( | 3073 body = this->ParseEagerFunctionBody( |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3371 return; | 3371 return; |
| 3372 } | 3372 } |
| 3373 has_seen_constructor_ = true; | 3373 has_seen_constructor_ = true; |
| 3374 return; | 3374 return; |
| 3375 } | 3375 } |
| 3376 } | 3376 } |
| 3377 } // namespace internal | 3377 } // namespace internal |
| 3378 } // namespace v8 | 3378 } // namespace v8 |
| 3379 | 3379 |
| 3380 #endif // V8_PARSING_PARSER_BASE_H | 3380 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |