Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 5aedf46a9ba291be2cb446d6f41f35950dda20c3..da586d2b4681be28e3bc0b0304dddc18855a6f7d 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -3713,6 +3713,12 @@ class HBinaryOperation : public HTemplateInstruction<3> { |
set_operand_position(zone, 2, right_pos); |
} |
+ bool RightIsPowerOf2() { |
+ if (!right()->IsInteger32Constant()) return false; |
+ int32_t value = right()->GetInteger32Constant(); |
+ return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value)); |
+ } |
+ |
DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) |
private: |
@@ -4089,12 +4095,6 @@ class HArithmeticBinaryOperation : public HBinaryOperation { |
} |
} |
- bool RightIsPowerOf2() { |
- if (!right()->IsInteger32Constant()) return false; |
- int32_t value = right()->GetInteger32Constant(); |
- return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value)); |
- } |
- |
DECLARE_ABSTRACT_INSTRUCTION(ArithmeticBinaryOperation) |
private: |