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

Unified Diff: runtime/vm/parser.cc

Issue 24078019: Fix assertion in the parser about operator precedence. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 27619)
+++ runtime/vm/parser.cc (working copy)
@@ -1897,7 +1897,7 @@
negate_result = true;
}
- ASSERT(Token::Precedence(op) >= Token::Precedence(Token::kBIT_OR));
+ ASSERT(Token::Precedence(op) >= Token::Precedence(Token::kEQ));
Kevin Millikin (Google) 2013/09/18 15:13:21 This is OK to fix the tests. It's kind of annoyin
hausner 2013/09/18 15:52:37 We are blindly calling ParseBinaryExpr() here, so
AstNode* other_operand = ParseBinaryExpr(Token::Precedence(op) + 1);
ArgumentListNode* op_arguments = new ArgumentListNode(operator_pos);
@@ -7345,7 +7345,7 @@
AstNode* Parser::ParseBinaryExpr(int min_preced) {
TRACE_PARSER("ParseBinaryExpr");
- ASSERT(min_preced >= 4);
+ ASSERT(min_preced >= Token::Precedence(Token::kOR));
AstNode* left_operand = ParseUnaryExpr();
if (left_operand->IsPrimaryNode() &&
(left_operand->AsPrimaryNode()->IsSuper())) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698