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

Side by Side Diff: runtime/vm/parser.cc

Issue 8509032: Implement %= and assign a couple of tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « no previous file | tests/co19/co19-runtime.status » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 case Token::kASSIGN_ADD: 5311 case Token::kASSIGN_ADD:
5312 return new BinaryOpNode(op_pos, Token::kADD, lhs, rhs); 5312 return new BinaryOpNode(op_pos, Token::kADD, lhs, rhs);
5313 case Token::kASSIGN_SUB: 5313 case Token::kASSIGN_SUB:
5314 return new BinaryOpNode(op_pos, Token::kSUB, lhs, rhs); 5314 return new BinaryOpNode(op_pos, Token::kSUB, lhs, rhs);
5315 case Token::kASSIGN_MUL: 5315 case Token::kASSIGN_MUL:
5316 return new BinaryOpNode(op_pos, Token::kMUL, lhs, rhs); 5316 return new BinaryOpNode(op_pos, Token::kMUL, lhs, rhs);
5317 case Token::kASSIGN_TRUNCDIV: 5317 case Token::kASSIGN_TRUNCDIV:
5318 return new BinaryOpNode(op_pos, Token::kTRUNCDIV, lhs, rhs); 5318 return new BinaryOpNode(op_pos, Token::kTRUNCDIV, lhs, rhs);
5319 case Token::kASSIGN_DIV: 5319 case Token::kASSIGN_DIV:
5320 return new BinaryOpNode(op_pos, Token::kDIV, lhs, rhs); 5320 return new BinaryOpNode(op_pos, Token::kDIV, lhs, rhs);
5321 case Token::kASSIGN_MOD:
5322 return new BinaryOpNode(op_pos, Token::kMOD, lhs, rhs);
5321 case Token::kASSIGN_SAR: 5323 case Token::kASSIGN_SAR:
5322 return new BinaryOpNode(op_pos, Token::kSAR, lhs, rhs); 5324 return new BinaryOpNode(op_pos, Token::kSAR, lhs, rhs);
5323 case Token::kASSIGN_SHL: 5325 case Token::kASSIGN_SHL:
5324 return new BinaryOpNode(op_pos, Token::kSHL, lhs, rhs); 5326 return new BinaryOpNode(op_pos, Token::kSHL, lhs, rhs);
5327 case Token::kASSIGN_SHR:
5328 return new BinaryOpNode(op_pos, Token::kSHR, lhs, rhs);
5325 case Token::kASSIGN_OR: 5329 case Token::kASSIGN_OR:
5326 return new BinaryOpNode(op_pos, Token::kBIT_OR, lhs, rhs); 5330 return new BinaryOpNode(op_pos, Token::kBIT_OR, lhs, rhs);
5327 case Token::kASSIGN_AND: 5331 case Token::kASSIGN_AND:
5328 return new BinaryOpNode(op_pos, Token::kBIT_AND, lhs, rhs); 5332 return new BinaryOpNode(op_pos, Token::kBIT_AND, lhs, rhs);
5329 case Token::kASSIGN_XOR: 5333 case Token::kASSIGN_XOR:
5330 return new BinaryOpNode(op_pos, Token::kBIT_XOR, lhs, rhs); 5334 return new BinaryOpNode(op_pos, Token::kBIT_XOR, lhs, rhs);
5331 default: 5335 default:
5332 ErrorMsg(op_pos, "Internal error: ExpandAssignableOp '%s' unimplemented", 5336 ErrorMsg(op_pos, "Internal error: ExpandAssignableOp '%s' unimplemented",
5333 Token::Name(assignment_op)); 5337 Token::Name(assignment_op));
5334 UNIMPLEMENTED(); 5338 UNIMPLEMENTED();
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
7266 } 7270 }
7267 7271
7268 7272
7269 void Parser::SkipNestedExpr() { 7273 void Parser::SkipNestedExpr() {
7270 const bool saved_mode = SetAllowFunctionLiterals(true); 7274 const bool saved_mode = SetAllowFunctionLiterals(true);
7271 SkipExpr(); 7275 SkipExpr();
7272 SetAllowFunctionLiterals(saved_mode); 7276 SetAllowFunctionLiterals(saved_mode);
7273 } 7277 }
7274 7278
7275 } // namespace dart 7279 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698