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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10830253: Support for new operator - (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 10521)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -858,12 +858,14 @@
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(1);
arguments->Add(push_value);
- Token::Kind token_kind =
- (node->kind() == Token::kSUB) ? Token::kNEGATE : node->kind();
- const String& name =
- String::ZoneHandle(Symbols::New(Token::Str(token_kind)));
+ String& name = String::ZoneHandle();
+ if (node->kind() == Token::kSUB) {
+ name = Symbols::New("unary-");
+ } else {
+ name = Symbols::New(Token::Str(node->kind()));
+ }
InstanceCallComp* call = new InstanceCallComp(
- node->token_pos(), owner()->try_index(), name, token_kind,
+ node->token_pos(), owner()->try_index(), name, node->kind(),
arguments, Array::ZoneHandle(), 1);
ReturnComputation(call);
}
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698