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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10536162: Add token kind into InstanceCallComp so that we do not need to extract it from name (addresses vego… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/flow_graph_optimizer.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 8672)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -427,6 +427,7 @@
InstanceCallComp* call = new InstanceCallComp(node->token_index(),
owner()->try_index(),
name,
+ node->kind(),
arguments,
Array::ZoneHandle(),
2);
@@ -837,12 +838,13 @@
Append(for_value);
ZoneGrowableArray<Value*>* arguments = new ZoneGrowableArray<Value*>(1);
arguments->Add(for_value.value());
+ Token::Kind token_kind =
+ (node->kind() == Token::kSUB) ? Token::kNEGATE : node->kind();
+
const String& name =
- String::ZoneHandle(String::NewSymbol((node->kind() == Token::kSUB)
- ? Token::Str(Token::kNEGATE)
- : node->Name()));
+ String::ZoneHandle(String::NewSymbol(Token::Str(token_kind)));
InstanceCallComp* call = new InstanceCallComp(
- node->token_index(), owner()->try_index(), name,
+ node->token_index(), owner()->try_index(), name, token_kind,
arguments, Array::ZoneHandle(), 1);
ReturnComputation(call);
}
@@ -1376,8 +1378,8 @@
TranslateArgumentList(*arguments, values);
InstanceCallComp* call = new InstanceCallComp(
node->token_index(), owner()->try_index(),
- node->function_name(), values,
- arguments->names(), 1);
+ node->function_name(), Token::kILLEGAL, values,
+ arguments->names(), 1);
ReturnComputation(call);
}
@@ -1748,7 +1750,7 @@
const String& name =
String::ZoneHandle(Field::GetterSymbol(node->field_name()));
InstanceCallComp* call = new InstanceCallComp(
- node->token_index(), owner()->try_index(), name,
+ node->token_index(), owner()->try_index(), name, Token::kGET,
arguments, Array::ZoneHandle(), 1);
ReturnComputation(call);
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698