| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 34316319aa3ebc61db008d7e663e27b2461fe0ed..2e0f029b2fc796302838f08f39a782ca5742856e 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -106,6 +106,7 @@ class LChunkBuilder;
|
| // HGlobalObject
|
| // HGlobalReceiver
|
| // HLeaveInlined
|
| +// HLoadContextSlot
|
| // HLoadGlobal
|
| // HMaterializedLiteral
|
| // HArrayLiteral
|
| @@ -213,6 +214,7 @@ class LChunkBuilder;
|
| V(HasCachedArrayIndex) \
|
| V(ClassOfTest) \
|
| V(LeaveInlined) \
|
| + V(LoadContextSlot) \
|
| V(LoadElements) \
|
| V(LoadGlobal) \
|
| V(LoadKeyedFastElement) \
|
| @@ -2503,6 +2505,39 @@ class HStoreGlobal: public HUnaryOperation {
|
| };
|
|
|
|
|
| +class HLoadContextSlot: public HInstruction {
|
| + public:
|
| + HLoadContextSlot(Handle<Context> context, int index)
|
| + : context_(context), index_(index) {
|
| + set_representation(Representation::Tagged());
|
| + SetFlag(kUseGVN);
|
| + SetFlag(kDependsOnCalls);
|
| + }
|
| +
|
| + Handle<Context> context() const { return context_; }
|
| + int index() const { return index_; }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream) const;
|
| +
|
| + virtual intptr_t Hashcode() const {
|
| + ASSERT(!Heap::allow_allocation(false));
|
| + return reinterpret_cast<intptr_t>(*context_) * 7 + index_;
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load_context_slot")
|
| +
|
| + protected:
|
| + virtual bool DataEquals(HValue* other) const {
|
| + HLoadContextSlot* b = HLoadContextSlot::cast(other);
|
| + return context_.is_identical_to(b->context()) && index_ == b->index();
|
| + }
|
| +
|
| + private:
|
| + Handle<Context> context_;
|
| + int index_;
|
| +};
|
| +
|
| +
|
| class HLoadNamedField: public HUnaryOperation {
|
| public:
|
| HLoadNamedField(HValue* object, bool is_in_object, int offset)
|
|
|