Index: src/hydrogen-instructions.h |
=================================================================== |
--- src/hydrogen-instructions.h (revision 9883) |
+++ src/hydrogen-instructions.h (working copy) |
@@ -2325,6 +2325,12 @@ |
ASSERT(HasDoubleValue()); |
return double_value_; |
} |
+ bool HasNumberValue() const { return has_int32_value_ || has_double_value_; } |
+ int32_t NumberValueAsInteger32() const { |
+ ASSERT(HasNumberValue()); |
+ if (has_int32_value_) return int32_value_; |
+ return DoubleToInt32(double_value_); |
+ } |
bool HasStringValue() const { return handle_->IsString(); } |
bool ToBoolean() const; |
@@ -2942,6 +2948,11 @@ |
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
+ static HInstruction* NewHAdd(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
virtual HType CalculateInferredType(); |
DECLARE_CONCRETE_INSTRUCTION(Add) |
@@ -2962,6 +2973,11 @@ |
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
+ static HInstruction* NewHSub(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Sub) |
protected: |
@@ -2985,6 +3001,11 @@ |
return !representation().IsTagged(); |
} |
+ static HInstruction* NewHMul(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Mul) |
protected: |
@@ -3013,6 +3034,11 @@ |
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
+ static HInstruction* NewHMod(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Mod) |
protected: |
@@ -3032,6 +3058,12 @@ |
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
+ |
+ static HInstruction* NewHDiv(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Div) |
protected: |
@@ -3054,6 +3086,12 @@ |
virtual bool IsCommutative() const { return true; } |
+ static HInstruction* NewHBitwise(Zone* zone, |
+ Token::Value op, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Bitwise) |
protected: |
@@ -3075,6 +3113,11 @@ |
virtual Range* InferRange(); |
+ static HInstruction* NewHShl(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Shl) |
protected: |
@@ -3089,6 +3132,11 @@ |
virtual Range* InferRange(); |
+ static HInstruction* NewHShr(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Shr) |
protected: |
@@ -3103,6 +3151,11 @@ |
virtual Range* InferRange(); |
+ static HInstruction* NewHSar(Zone* zone, |
+ HValue* context, |
+ HValue* left, |
+ HValue* right); |
+ |
DECLARE_CONCRETE_INSTRUCTION(Sar) |
protected: |