Index: src/hydrogen-instructions.h |
=================================================================== |
--- src/hydrogen-instructions.h (revision 11420) |
+++ src/hydrogen-instructions.h (working copy) |
@@ -140,7 +140,6 @@ |
V(LoadNamedField) \ |
V(LoadNamedFieldPolymorphic) \ |
V(LoadNamedGeneric) \ |
- V(MathFloorOfDiv) \ |
V(Mod) \ |
V(Mul) \ |
V(ObjectLiteral) \ |
@@ -1993,7 +1992,15 @@ |
} |
} |
- virtual HValue* Canonicalize(); |
+ virtual HValue* Canonicalize() { |
+ // If the input is integer32 then we replace the floor instruction |
+ // with its inputs. This happens before the representation changes are |
+ // introduced. |
+ if (op() == kMathFloor) { |
+ if (value()->representation().IsInteger32()) return value(); |
+ } |
+ return this; |
+ } |
BuiltinFunctionId op() const { return op_; } |
const char* OpName() const; |
@@ -2751,25 +2758,6 @@ |
}; |
-class HMathFloorOfDiv: public HBinaryOperation { |
- public: |
- HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) |
- : HBinaryOperation(context, left, right) { |
- set_representation(Representation::Integer32()); |
- SetFlag(kUseGVN); |
- } |
- |
- virtual Representation RequiredInputRepresentation(int index) { |
- return Representation::Integer32(); |
- } |
- |
- DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv) |
- |
- protected: |
- virtual bool DataEquals(HValue* other) { return true; } |
-}; |
- |
- |
class HArithmeticBinaryOperation: public HBinaryOperation { |
public: |
HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right) |