| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index f7a3554f7ae8350418f3cbf4c3849d254d0a455f..6b7d9632b54fba1efd0a0de54f2e744ad452671c 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -102,12 +102,14 @@ class LChunkBuilder;
|
| V(CompareObjectEqAndBranch) \
|
| V(CompareMap) \
|
| V(Constant) \
|
| + V(ConstructDouble) \
|
| V(Context) \
|
| V(DateField) \
|
| V(DebugBreak) \
|
| V(DeclareGlobals) \
|
| V(Deoptimize) \
|
| V(Div) \
|
| + V(DoubleBits) \
|
| V(DummyUse) \
|
| V(EnterInlined) \
|
| V(EnvironmentMarker) \
|
| @@ -1820,6 +1822,71 @@ class HClampToUint8 V8_FINAL : public HUnaryOperation {
|
| };
|
|
|
|
|
| +class HDoubleBits V8_FINAL : public HUnaryOperation {
|
| + public:
|
| + enum Bits { HIGH, LOW };
|
| + DECLARE_INSTRUCTION_FACTORY_P2(HDoubleBits, HValue*, Bits);
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| + return Representation::Double();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(DoubleBits)
|
| +
|
| + Bits bits() { return bits_; }
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| + if (!other->IsDoubleBits()) return false;
|
| + HDoubleBits* db = HDoubleBits::cast(other);
|
| + return db->value()->Equals(value()) && db->bits() == bits();
|
| + }
|
| +
|
| + private:
|
| + HDoubleBits(HValue* value, Bits bits)
|
| + : HUnaryOperation(value), bits_(bits) {
|
| + set_representation(Representation::Integer32());
|
| + SetFlag(kUseGVN);
|
| + }
|
| +
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| +
|
| + Bits bits_;
|
| +};
|
| +
|
| +
|
| +class HConstructDouble V8_FINAL : public HTemplateInstruction<2> {
|
| + public:
|
| + DECLARE_INSTRUCTION_FACTORY_P2(HConstructDouble, HValue*, HValue*);
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| + return Representation::Integer32();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(ConstructDouble)
|
| +
|
| + HValue* hi() { return OperandAt(0); }
|
| + HValue* lo() { return OperandAt(1); }
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| + if (!other->IsConstructDouble()) return false;
|
| + HConstructDouble* cd = HConstructDouble::cast(other);
|
| + return cd->hi()->Equals(hi()) && cd->lo()->Equals(lo());
|
| + }
|
| +
|
| + private:
|
| + explicit HConstructDouble(HValue* hi, HValue* lo) {
|
| + set_representation(Representation::Double());
|
| + SetFlag(kUseGVN);
|
| + SetOperandAt(0, hi);
|
| + SetOperandAt(1, lo);
|
| + }
|
| +
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| +};
|
| +
|
| +
|
| enum RemovableSimulate {
|
| REMOVABLE_SIMULATE,
|
| FIXED_SIMULATE
|
|
|