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

Unified Diff: vm/flow_graph_builder.cc

Issue 10829164: Replace InstanceSetterComp instruction with a plain instance call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_builder.cc
===================================================================
--- vm/flow_graph_builder.cc (revision 10227)
+++ vm/flow_graph_builder.cc (working copy)
@@ -1750,12 +1750,16 @@
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(2);
BuildInstanceSetterArguments(node, arguments, false); // Value not used.
- InstanceSetterComp* setter =
- new InstanceSetterComp(node->token_pos(),
- owner()->try_index(),
- node->field_name(),
- arguments);
- ReturnComputation(setter);
+ const String& name =
+ String::ZoneHandle(Field::SetterSymbol(node->field_name()));
+ InstanceCallComp* call = new InstanceCallComp(node->token_pos(),
+ owner()->try_index(),
+ name,
+ Token::kSET,
+ arguments,
+ Array::ZoneHandle(),
+ 1); // Checked argument count.
+ ReturnComputation(call);
}
@@ -1763,10 +1767,15 @@
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(2);
BuildInstanceSetterArguments(node, arguments, true); // Value used.
- Do(new InstanceSetterComp(node->token_pos(),
- owner()->try_index(),
- node->field_name(),
- arguments));
+ const String& name =
+ String::ZoneHandle(Field::SetterSymbol(node->field_name()));
+ Do(new InstanceCallComp(node->token_pos(),
+ owner()->try_index(),
+ name,
+ Token::kSET,
+ arguments,
+ Array::ZoneHandle(),
+ 1)); // Checked argument count.
ReturnComputation(
BuildLoadLocal(*owner()->parsed_function().expression_temp_var()));
}
« no previous file with comments | « no previous file | vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698