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

Side by Side Diff: src/preparser.cc

Issue 658423002: Unship ES6 iteration and unscopables on 3.28 (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/preparser.h ('k') | src/symbol.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 "include/v8stdint.h" 7 #include "include/v8stdint.h"
8 8
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 Expect(Token::LPAREN, CHECK_OK); 646 Expect(Token::LPAREN, CHECK_OK);
647 ParseExpression(true, CHECK_OK); 647 ParseExpression(true, CHECK_OK);
648 Expect(Token::RPAREN, CHECK_OK); 648 Expect(Token::RPAREN, CHECK_OK);
649 ParseStatement(ok); 649 ParseStatement(ok);
650 return Statement::Default(); 650 return Statement::Default();
651 } 651 }
652 652
653 653
654 bool PreParser::CheckInOrOf(bool accept_OF) { 654 bool PreParser::CheckInOrOf(bool accept_OF) {
655 if (Check(Token::IN) || 655 if (Check(Token::IN) ||
656 (accept_OF && CheckContextualKeyword(CStrVector("of")))) { 656 (allow_for_of() && accept_OF &&
657 CheckContextualKeyword(CStrVector("of")))) {
657 return true; 658 return true;
658 } 659 }
659 return false; 660 return false;
660 } 661 }
661 662
662 663
663 PreParser::Statement PreParser::ParseForStatement(bool* ok) { 664 PreParser::Statement PreParser::ParseForStatement(bool* ok) {
664 // ForStatement :: 665 // ForStatement ::
665 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement 666 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement
666 667
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); 928 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
928 ParseArguments(ok); 929 ParseArguments(ok);
929 930
930 return Expression::Default(); 931 return Expression::Default();
931 } 932 }
932 933
933 #undef CHECK_OK 934 #undef CHECK_OK
934 935
935 936
936 } } // v8::internal 937 } } // v8::internal
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698