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

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: ARM INT32 stub 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
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 9f52569ccf60fa1a03a7a6aafc178f991a22b6d6..4ec9581752cd0171a288ce12a26417742d348e25 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -4350,7 +4350,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() &&
@@ -4374,11 +4379,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_;
};
« src/code-stubs.h ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698