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

Side by Side Diff: runtime/vm/token.h

Issue 251883004: Fix crashes: ComparisonInstr now has also kinds kIS and kISNOT: implement negation for those. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_TOKEN_H_ 5 #ifndef VM_TOKEN_H_
6 #define VM_TOKEN_H_ 6 #define VM_TOKEN_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 static Token::Kind NegateComparison(Token::Kind op) { 297 static Token::Kind NegateComparison(Token::Kind op) {
298 switch (op) { 298 switch (op) {
299 case Token::kEQ: return Token::kNE; 299 case Token::kEQ: return Token::kNE;
300 case Token::kNE: return Token::kEQ; 300 case Token::kNE: return Token::kEQ;
301 case Token::kLT: return Token::kGTE; 301 case Token::kLT: return Token::kGTE;
302 case Token::kGT: return Token::kLTE; 302 case Token::kGT: return Token::kLTE;
303 case Token::kLTE: return Token::kGT; 303 case Token::kLTE: return Token::kGT;
304 case Token::kGTE: return Token::kLT; 304 case Token::kGTE: return Token::kLT;
305 case Token::kEQ_STRICT: return Token::kNE_STRICT; 305 case Token::kEQ_STRICT: return Token::kNE_STRICT;
306 case Token::kNE_STRICT: return Token::kEQ_STRICT; 306 case Token::kNE_STRICT: return Token::kEQ_STRICT;
307 case Token::kIS: return Token::kISNOT;
308 case Token::kISNOT: return Token::kIS;
307 default: 309 default:
308 UNREACHABLE(); 310 UNREACHABLE();
309 return Token::kILLEGAL; 311 return Token::kILLEGAL;
310 } 312 }
311 } 313 }
312 314
313 private: 315 private:
314 static const char* name_[]; 316 static const char* name_[];
315 static const char* tok_str_[]; 317 static const char* tok_str_[];
316 static const uint8_t precedence_[]; 318 static const uint8_t precedence_[];
317 static const Attribute attributes_[]; 319 static const Attribute attributes_[];
318 }; 320 };
319 321
320 322
321 } // namespace dart 323 } // namespace dart
322 324
323 #endif // VM_TOKEN_H_ 325 #endif // VM_TOKEN_H_
OLDNEW
« 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