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

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

Issue 68663003: Merge TRUNCDIV and MOD into TRUNCDIV_MOD single operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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/token.h" 5 #include "vm/token.h"
6 6
7 #include "vm/object.h" 7 #include "vm/object.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 39
40 bool Token::IsBinaryOperator(Token::Kind token) { 40 bool Token::IsBinaryOperator(Token::Kind token) {
41 switch (token) { 41 switch (token) {
42 case Token::kADD: 42 case Token::kADD:
43 case Token::kSUB: 43 case Token::kSUB:
44 case Token::kMUL: 44 case Token::kMUL:
45 case Token::kDIV: 45 case Token::kDIV:
46 case Token::kTRUNCDIV: 46 case Token::kTRUNCDIV:
47 case Token::kMOD: 47 case Token::kMOD:
48 case Token::kTRUNCDIVMOD:
49 case Token::kREM:
50 case Token::kTRUNCDIVREM:
48 case Token::kBIT_OR: 51 case Token::kBIT_OR:
49 case Token::kBIT_XOR: 52 case Token::kBIT_XOR:
50 case Token::kBIT_AND: 53 case Token::kBIT_AND:
51 case Token::kOR: 54 case Token::kOR:
52 case Token::kAND: 55 case Token::kAND:
53 case Token::kSHL: 56 case Token::kSHL:
54 case Token::kSHR: 57 case Token::kSHR:
55 return true; 58 return true;
56 default: 59 default:
57 return false; 60 return false;
58 } 61 }
59 } 62 }
60 63
61 64
62 bool Token::IsPrefixOperator(Token::Kind token) { 65 bool Token::IsPrefixOperator(Token::Kind token) {
63 return (token == kNOT) || (token == kBIT_NOT) || (token == kNEGATE); 66 return (token == kNOT) || (token == kBIT_NOT) || (token == kNEGATE);
64 } 67 }
65 68
66 } // namespace dart 69 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698