| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 1856c80929676e0d363d0f6ebe44a37faa3f44a4..0891a22de4f0345aa0312234fdb0222105581f66 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -137,6 +137,7 @@ class LChunkBuilder;
|
| V(LoadNamedField) \
|
| V(LoadNamedFieldPolymorphic) \
|
| V(LoadNamedGeneric) \
|
| + V(MathMinMax) \
|
| V(Mod) \
|
| V(Mul) \
|
| V(ObjectLiteralFast) \
|
| @@ -2985,6 +2986,38 @@ class HPower: public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| +class HMathMinMax: public HTemplateInstruction<2> {
|
| + public:
|
| + HMathMinMax(HValue* left,
|
| + HValue* right,
|
| + BuiltinFunctionId op) {
|
| + op_ = op;
|
| + SetOperandAt(0, left);
|
| + SetOperandAt(1, right);
|
| + ASSERT(right->representation().Equals(left->representation()));
|
| + set_representation(left->representation());
|
| + }
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) {
|
| + return representation();
|
| + }
|
| +
|
| + HValue* left() { return OperandAt(0); }
|
| + HValue* right() { return OperandAt(1); }
|
| + BuiltinFunctionId op() { return op_; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(MathMinMax)
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) { return true; }
|
| +
|
| + virtual Range* InferRange();
|
| +
|
| + private:
|
| + BuiltinFunctionId op_;
|
| +};
|
| +
|
| +
|
| class HAdd: public HArithmeticBinaryOperation {
|
| public:
|
| HAdd(HValue* context, HValue* left, HValue* right)
|
|
|