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

Unified Diff: dart/runtime/vm/flow_graph_optimizer.cc

Issue 754763003: Version 1.8.3 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 6 years 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 | « dart/runtime/vm/flow_graph_builder.cc ('k') | dart/runtime/vm/flow_graph_range_analysis.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/flow_graph_optimizer.cc
===================================================================
--- dart/runtime/vm/flow_graph_optimizer.cc (revision 42037)
+++ dart/runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -589,7 +589,14 @@
BlockEntryInstr* entry = block_order_[i];
for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
Instruction* current = it.Current();
+ if (current->HasUnmatchedInputRepresentations()) {
+ // Can't canonicalize this instruction until all conversions for its
+ // inputs are inserted.
+ continue;
+ }
+
Instruction* replacement = current->Canonicalize(flow_graph());
+
if (replacement != current) {
// For non-definitions Canonicalize should return either NULL or
// this.
@@ -2963,57 +2970,6 @@
return true;
}
- if ((recognized_kind == MethodRecognizer::kBigint_setUsed) &&
- (ic_data.NumberOfChecks() == 1) &&
- (class_ids[0] == kBigintCid)) {
- // This is an internal method, no need to check argument types nor
- // range.
- Definition* bigint = call->ArgumentAt(0);
- Definition* value = call->ArgumentAt(1);
- StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
- Bigint::used_offset(),
- new(I) Value(bigint),
- new(I) Value(value),
- kNoStoreBarrier,
- call->token_pos());
- ReplaceCall(call, store);
- return true;
- }
-
- if ((recognized_kind == MethodRecognizer::kBigint_setDigits) &&
- (ic_data.NumberOfChecks() == 1) &&
- (class_ids[0] == kBigintCid)) {
- // This is an internal method, no need to check argument types nor
- // range.
- Definition* bigint = call->ArgumentAt(0);
- Definition* value = call->ArgumentAt(1);
- StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
- Bigint::digits_offset(),
- new(I) Value(bigint),
- new(I) Value(value),
- kEmitStoreBarrier,
- call->token_pos());
- ReplaceCall(call, store);
- return true;
- }
-
- if ((recognized_kind == MethodRecognizer::kBigint_setNeg) &&
- (ic_data.NumberOfChecks() == 1) &&
- (class_ids[0] == kBigintCid)) {
- // This is an internal method, no need to check argument types nor
- // range.
- Definition* bigint = call->ArgumentAt(0);
- Definition* value = call->ArgumentAt(1);
- StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
- Bigint::neg_offset(),
- new(I) Value(bigint),
- new(I) Value(value),
- kEmitStoreBarrier,
- call->token_pos());
- ReplaceCall(call, store);
- return true;
- }
-
if (((recognized_kind == MethodRecognizer::kStringBaseCodeUnitAt) ||
(recognized_kind == MethodRecognizer::kStringBaseCharAt)) &&
(ic_data.NumberOfChecks() == 1) &&
« no previous file with comments | « dart/runtime/vm/flow_graph_builder.cc ('k') | dart/runtime/vm/flow_graph_range_analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698