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

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

Issue 2372513003: [es8] Remove syntactic tail calls support. (Closed)
Patch Set: Created 4 years, 2 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/parser-base.h ('k') | test/message/syntactic-tail-call-generator.js » ('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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/message/syntactic-tail-call-generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698