| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 BlockState block_state(&scope_state_); | 297 BlockState block_state(&scope_state_); |
| 298 scope()->SetLanguageMode( | 298 scope()->SetLanguageMode( |
| 299 static_cast<LanguageMode>(class_language_mode | STRICT)); | 299 static_cast<LanguageMode>(class_language_mode | STRICT)); |
| 300 // TODO(marja): Make PreParser use scope names too. | 300 // TODO(marja): Make PreParser use scope names too. |
| 301 // this->scope()->SetScopeName(name); | 301 // this->scope()->SetScopeName(name); |
| 302 | 302 |
| 303 bool has_extends = Check(Token::EXTENDS); | 303 bool has_extends = Check(Token::EXTENDS); |
| 304 if (has_extends) { | 304 if (has_extends) { |
| 305 ExpressionClassifier extends_classifier(this); | 305 ExpressionClassifier extends_classifier(this); |
| 306 ParseLeftHandSideExpression(CHECK_OK); | 306 ParseLeftHandSideExpression(CHECK_OK); |
| 307 CheckNoTailCallExpressions(CHECK_OK); | |
| 308 ValidateExpression(CHECK_OK); | 307 ValidateExpression(CHECK_OK); |
| 309 impl()->AccumulateFormalParameterContainmentErrors(); | 308 impl()->AccumulateFormalParameterContainmentErrors(); |
| 310 } | 309 } |
| 311 | 310 |
| 312 ClassLiteralChecker checker(this); | 311 ClassLiteralChecker checker(this); |
| 313 bool has_seen_constructor = false; | 312 bool has_seen_constructor = false; |
| 314 | 313 |
| 315 Expect(Token::LBRACE, CHECK_OK); | 314 Expect(Token::LBRACE, CHECK_OK); |
| 316 while (peek() != Token::RBRACE) { | 315 while (peek() != Token::RBRACE) { |
| 317 if (Check(Token::SEMICOLON)) continue; | 316 if (Check(Token::SEMICOLON)) continue; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 339 | 338 |
| 340 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); | 339 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); |
| 341 } | 340 } |
| 342 | 341 |
| 343 #undef CHECK_OK | 342 #undef CHECK_OK |
| 344 #undef CHECK_OK_CUSTOM | 343 #undef CHECK_OK_CUSTOM |
| 345 | 344 |
| 346 | 345 |
| 347 } // namespace internal | 346 } // namespace internal |
| 348 } // namespace v8 | 347 } // namespace v8 |
| OLD | NEW |