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

Unified Diff: src/hydrogen.cc

Issue 15735005: Collect type feedback for power-of-2 right operands in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 7 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 | « src/deoptimizer.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index b166e138c15edd5c04a12b61534d7a7e751fc5a8..bfe7cbc17c9809c9e230fae7406ce450775936f1 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -9334,7 +9334,8 @@ HInstruction* HOptimizedGraphBuilder::BuildBinaryOperation(
TypeInfo left_info = expr->left_type();
TypeInfo right_info = expr->right_type();
TypeInfo result_info = expr->result_type();
- TypeInfo combined_info;
+ bool has_fixed_right_arg = expr->has_fixed_right_arg();
+ int fixed_right_arg_value = expr->fixed_right_arg_value();
Representation left_rep = ToRepresentation(left_info);
Representation right_rep = ToRepresentation(right_info);
Representation result_rep = ToRepresentation(result_info);
@@ -9364,7 +9365,12 @@ HInstruction* HOptimizedGraphBuilder::BuildBinaryOperation(
instr = HMul::New(zone(), context, left, right);
break;
case Token::MOD:
- instr = HMod::New(zone(), context, left, right);
+ instr = HMod::New(zone(),
+ context,
+ left,
+ right,
+ has_fixed_right_arg,
+ fixed_right_arg_value);
break;
case Token::DIV:
instr = HDiv::New(zone(), context, left, right);
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698