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

Unified Diff: runtime/vm/token.cc

Issue 2487873003: Speculate on bitwise operators. (Closed)
Patch Set: git cl format Created 4 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/redundancy_elimination.cc ('K') | « runtime/vm/token.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/token.cc
diff --git a/runtime/vm/token.cc b/runtime/vm/token.cc
index d82a31a95c2f54c55b8497ef53d5561cf5157692..5109177efba582f88d105bff3b5889f712122c73 100644
--- a/runtime/vm/token.cc
+++ b/runtime/vm/token.cc
@@ -69,4 +69,18 @@ bool Token::IsUnaryArithmeticOperator(Token::Kind token) {
return (token == kBIT_NOT) || (token == kNEGATE);
}
+
+bool Token::IsBinaryBitwiseOperator(Token::Kind token) {
+ switch (token) {
+ case Token::kBIT_OR:
+ case Token::kBIT_XOR:
+ case Token::kBIT_AND:
+ case Token::kSHL:
+ case Token::kSHR:
+ return true;
+ default:
+ return false;
+ }
+}
+
} // namespace dart
« runtime/vm/redundancy_elimination.cc ('K') | « runtime/vm/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698