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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 23060019: Final cleanup of InsertConversion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 8c3d56632691e77cdaa7150322f97fa5f2c840c7..ba9a4d9fa9dbe68442e61735fcc7bd37da568e57 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -408,31 +408,21 @@ void FlowGraphOptimizer::InsertConversion(Representation from,
deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId;
ASSERT(from != kTagged);
ASSERT(to != kTagged);
- Value* to_value = NULL;
+ Definition* boxed = NULL;
if (from == kUnboxedDouble) {
- BoxDoubleInstr* boxed = new BoxDoubleInstr(use->CopyWithType());
- use->BindTo(boxed);
- InsertBefore(insert_before, boxed, NULL, Definition::kValue);
- to_value = new Value(boxed);
+ boxed = new BoxDoubleInstr(use->CopyWithType());
} else if (from == kUnboxedUint32x4) {
- BoxUint32x4Instr* boxed = new BoxUint32x4Instr(use->CopyWithType());
- use->BindTo(boxed);
- InsertBefore(insert_before, boxed, NULL, Definition::kValue);
- to_value = new Value(boxed);
+ boxed = new BoxUint32x4Instr(use->CopyWithType());
} else if (from == kUnboxedFloat32x4) {
- BoxFloat32x4Instr* boxed = new BoxFloat32x4Instr(use->CopyWithType());
- use->BindTo(boxed);
- InsertBefore(insert_before, boxed, NULL, Definition::kValue);
- to_value = new Value(boxed);
+ boxed = new BoxFloat32x4Instr(use->CopyWithType());
} else if (from == kUnboxedMint) {
- BoxIntegerInstr* boxed = new BoxIntegerInstr(use->CopyWithType());
- use->BindTo(boxed);
- InsertBefore(insert_before, boxed, NULL, Definition::kValue);
- to_value = new Value(boxed);
+ boxed = new BoxIntegerInstr(use->CopyWithType());
} else {
UNIMPLEMENTED();
}
- ASSERT(to_value != NULL);
+ use->BindTo(boxed);
+ InsertBefore(insert_before, boxed, NULL, Definition::kValue);
+ Value* to_value = new Value(boxed);
if (to == kUnboxedDouble) {
converted = new UnboxDoubleInstr(to_value, deopt_id);
} else if (to == kUnboxedUint32x4) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698