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

Side by Side Diff: src/preparser.h

Issue 684873002: Scanner: remove PushBack calls when we're going to return ILLEGAL. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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/messages.js ('k') | src/scanner.cc » ('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 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_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 ReportMessage("unterminated_regexp"); 1697 ReportMessage("unterminated_regexp");
1698 *ok = false; 1698 *ok = false;
1699 return Traits::EmptyExpression(); 1699 return Traits::EmptyExpression();
1700 } 1700 }
1701 1701
1702 int literal_index = function_state_->NextMaterializedLiteralIndex(); 1702 int literal_index = function_state_->NextMaterializedLiteralIndex();
1703 1703
1704 IdentifierT js_pattern = this->GetNextSymbol(scanner()); 1704 IdentifierT js_pattern = this->GetNextSymbol(scanner());
1705 if (!scanner()->ScanRegExpFlags()) { 1705 if (!scanner()->ScanRegExpFlags()) {
1706 Next(); 1706 Next();
1707 ReportMessage("invalid_regexp_flags"); 1707 ReportMessage("malformed_regexp_flags");
1708 *ok = false; 1708 *ok = false;
1709 return Traits::EmptyExpression(); 1709 return Traits::EmptyExpression();
1710 } 1710 }
1711 IdentifierT js_flags = this->GetNextSymbol(scanner()); 1711 IdentifierT js_flags = this->GetNextSymbol(scanner());
1712 Next(); 1712 Next();
1713 return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index, pos); 1713 return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index, pos);
1714 } 1714 }
1715 1715
1716 1716
1717 #define CHECK_OK ok); \ 1717 #define CHECK_OK ok); \
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 DCHECK(IsAccessorAccessorConflict(old_type, type)); 2841 DCHECK(IsAccessorAccessorConflict(old_type, type));
2842 // Both accessors of the same type. 2842 // Both accessors of the same type.
2843 parser()->ReportMessage("accessor_get_set"); 2843 parser()->ReportMessage("accessor_get_set");
2844 } 2844 }
2845 *ok = false; 2845 *ok = false;
2846 } 2846 }
2847 } 2847 }
2848 } } // v8::internal 2848 } } // v8::internal
2849 2849
2850 #endif // V8_PREPARSER_H 2850 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698