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) && |