| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 4a502ba2d46d6f552eafa84fe554df1ddaca6e5c..7264ccb6fe5dead0663c95708ad2c80996a2caf6 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -143,6 +143,7 @@ class LChunkBuilder;
|
| V(LoadKeyedGeneric) \
|
| V(LoadNamedField) \
|
| V(LoadNamedGeneric) \
|
| + V(LoadRoot) \
|
| V(MapEnumLength) \
|
| V(MathFloorOfDiv) \
|
| V(MathMinMax) \
|
| @@ -2515,6 +2516,40 @@ class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| +class HLoadRoot V8_FINAL : public HTemplateInstruction<0> {
|
| + public:
|
| + DECLARE_INSTRUCTION_FACTORY_P1(HLoadRoot, Heap::RootListIndex);
|
| + DECLARE_INSTRUCTION_FACTORY_P2(HLoadRoot, Heap::RootListIndex, HType);
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| + return Representation::None();
|
| + }
|
| +
|
| + Heap::RootListIndex index() const { return index_; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadRoot)
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) V8_OVERRIDE {
|
| + HLoadRoot* b = HLoadRoot::cast(other);
|
| + return index_ == b->index_;
|
| + }
|
| +
|
| + private:
|
| + HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged())
|
| + : HTemplateInstruction<0>(type), index_(index) {
|
| + SetFlag(kUseGVN);
|
| + // TODO(bmeurer): We'll need kDependsOnRoots once we add the
|
| + // corresponding HStoreRoot instruction.
|
| + SetGVNFlag(kDependsOnCalls);
|
| + }
|
| +
|
| + virtual bool IsDeletable() const V8_OVERRIDE { return true; }
|
| +
|
| + const Heap::RootListIndex index_;
|
| +};
|
| +
|
| +
|
| class HLoadExternalArrayPointer V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P1(HLoadExternalArrayPointer, HValue*);
|
|
|