Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index f9524bc24f4be401b02983084f9ee7220a90f8f4..73c1d7d3a2990ebec5b62767e1541609df03a127 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -155,6 +155,7 @@ class LChunkBuilder; |
V(Parameter) \ |
V(Power) \ |
V(PushArgument) \ |
+ V(Random) \ |
V(RegExpLiteral) \ |
V(Return) \ |
V(Ror) \ |
@@ -4723,6 +4724,28 @@ class HPower V8_FINAL : public HTemplateInstruction<2> { |
}; |
+class HRandom V8_FINAL : public HTemplateInstruction<1> { |
+ public: |
+ DECLARE_INSTRUCTION_FACTORY_P1(HRandom, HValue*); |
+ |
+ HValue* global_object() { return OperandAt(0); } |
+ |
+ virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
+ return Representation::Tagged(); |
+ } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(Random) |
+ |
+ private: |
+ explicit HRandom(HValue* global_object) { |
+ SetOperandAt(0, global_object); |
+ set_representation(Representation::Double()); |
+ } |
+ |
+ virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
+}; |
+ |
+ |
class HAdd V8_FINAL : public HArithmeticBinaryOperation { |
public: |
static HInstruction* New(Zone* zone, |