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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 11970038: Remove StringCharCodeAtInstr and handle it as part of LoadIndexed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 17219)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -1220,7 +1220,7 @@
}
-StringCharCodeAtInstr* FlowGraphOptimizer::BuildStringCharCodeAt(
+LoadIndexedInstr* FlowGraphOptimizer::BuildStringCharCodeAt(
InstanceCallInstr* call,
intptr_t cid) {
Value* str = call->ArgumentAt(0)->value();
@@ -1253,7 +1253,7 @@
call->env(),
Definition::kEffect);
}
- return new StringCharCodeAtInstr(str, index, cid);
+ return new LoadIndexedInstr(str, index, cid);
}
@@ -1274,7 +1274,7 @@
(ic_data.NumberOfChecks() == 1) &&
((class_ids[0] == kOneByteStringCid) ||
(class_ids[0] == kTwoByteStringCid))) {
- StringCharCodeAtInstr* instr = BuildStringCharCodeAt(call, class_ids[0]);
+ LoadIndexedInstr* instr = BuildStringCharCodeAt(call, class_ids[0]);
call->ReplaceWith(instr, current_iterator());
RemovePushArguments(call);
return true;
@@ -1283,7 +1283,7 @@
(ic_data.NumberOfChecks() == 1) &&
(class_ids[0] == kOneByteStringCid)) {
// TODO(fschneider): Handle TwoByteString.
- StringCharCodeAtInstr* load_char_code =
+ LoadIndexedInstr* load_char_code =
BuildStringCharCodeAt(call, class_ids[0]);
InsertBefore(call, load_char_code, NULL, Definition::kValue);
StringFromCharCodeInstr* char_at =
@@ -4036,11 +4036,6 @@
}
-void ConstantPropagator::VisitStringCharCodeAt(StringCharCodeAtInstr* instr) {
- SetValue(instr, non_constant_);
-}
-
-
void ConstantPropagator::VisitStringFromCharCode(
StringFromCharCodeInstr* instr) {
SetValue(instr, non_constant_);
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698