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

Unified Diff: runtime/vm/token.cc

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | « 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
===================================================================
--- runtime/vm/token.cc (revision 8171)
+++ runtime/vm/token.cc (working copy)
@@ -66,4 +66,15 @@
}
+Token::Kind Token::GetUnaryOp(const String& name) {
+ if (name.Equals(Str(Token::kNEGATE))) {
+ return Token::kNEGATE;
+ }
+ if ((name.Length() == 1) && (name.CharAt(0) == '~')) {
+ return Token::kBIT_NOT;
+ }
+ return Token::kILLEGAL;
+}
+
+
} // namespace dart
« no previous file with comments | « runtime/vm/token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698