| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index b7e9903f05aa078e458654341a77b464fc231e33..11e85a0c034ab6a689eaa4fdf55cb537f9af1035 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -119,6 +119,7 @@ class LChunkBuilder;
|
| V(LoadFieldByIndex) \
|
| V(LoadFunctionPrototype) \
|
| V(LoadGlobalGeneric) \
|
| + V(LoadGlobalViaContext) \
|
| V(LoadKeyed) \
|
| V(LoadKeyedGeneric) \
|
| V(LoadNamedField) \
|
| @@ -147,6 +148,7 @@ class LChunkBuilder;
|
| V(StoreCodeEntry) \
|
| V(StoreContextSlot) \
|
| V(StoreFrameContext) \
|
| + V(StoreGlobalViaContext) \
|
| V(StoreKeyed) \
|
| V(StoreKeyedGeneric) \
|
| V(StoreNamedField) \
|
| @@ -5445,6 +5447,39 @@ class HLoadGlobalGeneric final : public HTemplateInstruction<2> {
|
| };
|
|
|
|
|
| +class HLoadGlobalViaContext final : public HTemplateInstruction<1> {
|
| + public:
|
| + DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalViaContext,
|
| + Handle<String>, int, int);
|
| +
|
| + HValue* context() { return OperandAt(0); }
|
| + Handle<String> name() const { return name_; }
|
| + int depth() const { return depth_; }
|
| + int slot_index() const { return slot_index_; }
|
| +
|
| + std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
|
| +
|
| + Representation RequiredInputRepresentation(int index) override {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadGlobalViaContext)
|
| +
|
| + private:
|
| + HLoadGlobalViaContext(HValue* context, Handle<String> name, int depth,
|
| + int slot_index)
|
| + : name_(name), depth_(depth), slot_index_(slot_index) {
|
| + SetOperandAt(0, context);
|
| + set_representation(Representation::Tagged());
|
| + SetAllSideEffects();
|
| + }
|
| +
|
| + Handle<String> name_;
|
| + int depth_;
|
| + int slot_index_;
|
| +};
|
| +
|
| +
|
| class HAllocate final : public HTemplateInstruction<2> {
|
| public:
|
| static bool CompatibleInstanceTypes(InstanceType type1,
|
| @@ -6979,6 +7014,45 @@ class HStoreNamedGeneric final : public HTemplateInstruction<3> {
|
| };
|
|
|
|
|
| +class HStoreGlobalViaContext final : public HTemplateInstruction<2> {
|
| + public:
|
| + DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreGlobalViaContext,
|
| + Handle<String>, HValue*, int, int,
|
| + LanguageMode);
|
| + HValue* context() const { return OperandAt(0); }
|
| + HValue* value() const { return OperandAt(1); }
|
| + Handle<String> name() const { return name_; }
|
| + int depth() const { return depth_; }
|
| + int slot_index() const { return slot_index_; }
|
| + LanguageMode language_mode() const { return language_mode_; }
|
| +
|
| + std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
|
| +
|
| + Representation RequiredInputRepresentation(int index) override {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreGlobalViaContext)
|
| +
|
| + private:
|
| + HStoreGlobalViaContext(HValue* context, Handle<String> name, HValue* value,
|
| + int depth, int slot_index, LanguageMode language_mode)
|
| + : name_(name),
|
| + depth_(depth),
|
| + slot_index_(slot_index),
|
| + language_mode_(language_mode) {
|
| + SetOperandAt(0, context);
|
| + SetOperandAt(1, value);
|
| + SetAllSideEffects();
|
| + }
|
| +
|
| + Handle<String> name_;
|
| + int depth_;
|
| + int slot_index_;
|
| + LanguageMode language_mode_;
|
| +};
|
| +
|
| +
|
| class HStoreKeyed final : public HTemplateInstruction<3>,
|
| public ArrayInstructionInterface {
|
| public:
|
|
|