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

Side by Side Diff: src/preparser.cc

Issue 446023002: Enable ES6 iteration by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moved tests to es6, fixed duplicate ExtendArrayPrototype name in unscopables.js Created 6 years, 4 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/unscopables.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 (allow_for_of() && accept_OF && 656 (accept_OF && CheckContextualKeyword(CStrVector("of")))) {
657 CheckContextualKeyword(CStrVector("of")))) {
658 return true; 657 return true;
659 } 658 }
660 return false; 659 return false;
661 } 660 }
662 661
663 662
664 PreParser::Statement PreParser::ParseForStatement(bool* ok) { 663 PreParser::Statement PreParser::ParseForStatement(bool* ok) {
665 // ForStatement :: 664 // ForStatement ::
666 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement 665 // 'for' '(' Expression? ';' Expression? ';' Expression? ')' Statement
667 666
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); 927 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK);
929 ParseArguments(ok); 928 ParseArguments(ok);
930 929
931 return Expression::Default(); 930 return Expression::Default();
932 } 931 }
933 932
934 #undef CHECK_OK 933 #undef CHECK_OK
935 934
936 935
937 } } // v8::internal 936 } } // v8::internal
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/unscopables.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698