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

Unified Diff: src/hydrogen-instructions.h

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, 6 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/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index e464ac45ea5390d255c4cfa22d89f65e29b9321f..f79d995d9577204f1db8f615d7e086a03ad13317 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -4340,7 +4340,12 @@ class HMod: public HArithmeticBinaryOperation {
static HInstruction* New(Zone* zone,
HValue* context,
HValue* left,
- HValue* right);
+ HValue* right,
+ bool has_fixed_right_arg,
+ int fixed_right_arg_value);
+
+ bool has_fixed_right_arg() const { return has_fixed_right_arg_; }
+ int fixed_right_arg_value() const { return fixed_right_arg_value_; }
bool HasPowerOf2Divisor() {
if (right()->IsConstant() &&
@@ -4364,11 +4369,20 @@ class HMod: public HArithmeticBinaryOperation {
virtual Range* InferRange(Zone* zone);
private:
- HMod(HValue* context, HValue* left, HValue* right)
- : HArithmeticBinaryOperation(context, left, right) {
+ HMod(HValue* context,
+ HValue* left,
+ HValue* right,
+ bool has_fixed_right_arg,
+ int fixed_right_arg_value)
+ : HArithmeticBinaryOperation(context, left, right),
+ has_fixed_right_arg_(has_fixed_right_arg),
+ fixed_right_arg_value_(fixed_right_arg_value) {
SetFlag(kCanBeDivByZero);
SetFlag(kCanOverflow);
}
+
+ const bool has_fixed_right_arg_;
+ const int fixed_right_arg_value_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698