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

Unified Diff: vm/flow_graph_optimizer.cc

Issue 10850014: Separate double binary operation into a separate instruction class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: added ia32 Created 8 years, 5 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/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_optimizer.cc
===================================================================
--- vm/flow_graph_optimizer.cc (revision 10161)
+++ vm/flow_graph_optimizer.cc (working copy)
@@ -174,17 +174,23 @@
};
ASSERT(comp->ArgumentCount() == 2);
- Value* left = comp->ArgumentAt(0)->value();
- Value* right = comp->ArgumentAt(1)->value();
- BinaryOpComp* bin_op =
- new BinaryOpComp(op_kind,
- operands_type,
- comp,
- left,
- right);
- bin_op->set_ic_data(comp->ic_data());
- instr->set_computation(bin_op);
- RemovePushArguments(comp);
+ if (operands_type == BinaryOpComp::kDoubleOperands) {
+ DoubleBinaryOpComp* double_bin_op = new DoubleBinaryOpComp(op_kind, comp);
+ double_bin_op->set_ic_data(comp->ic_data());
+ instr->set_computation(double_bin_op);
+ } else {
+ Value* left = comp->ArgumentAt(0)->value();
+ Value* right = comp->ArgumentAt(1)->value();
+ BinaryOpComp* bin_op =
+ new BinaryOpComp(op_kind,
+ operands_type,
+ comp,
+ left,
+ right);
+ bin_op->set_ic_data(comp->ic_data());
+ instr->set_computation(bin_op);
+ RemovePushArguments(comp);
+ }
return true;
}
« no previous file with comments | « no previous file | vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698