| Index: src/hydrogen-instructions.h
|
| ===================================================================
|
| --- src/hydrogen-instructions.h (revision 7187)
|
| +++ src/hydrogen-instructions.h (working copy)
|
| @@ -122,7 +122,8 @@
|
| V(LoadElements) \
|
| V(LoadExternalArrayPointer) \
|
| V(LoadFunctionPrototype) \
|
| - V(LoadGlobal) \
|
| + V(LoadGlobalCell) \
|
| + V(LoadGlobalGeneric) \
|
| V(LoadKeyedFastElement) \
|
| V(LoadKeyedGeneric) \
|
| V(LoadNamedField) \
|
| @@ -2785,9 +2786,9 @@
|
| };
|
|
|
|
|
| -class HLoadGlobal: public HTemplateInstruction<0> {
|
| +class HLoadGlobalCell: public HTemplateInstruction<0> {
|
| public:
|
| - HLoadGlobal(Handle<JSGlobalPropertyCell> cell, bool check_hole_value)
|
| + HLoadGlobalCell(Handle<JSGlobalPropertyCell> cell, bool check_hole_value)
|
| : cell_(cell), check_hole_value_(check_hole_value) {
|
| set_representation(Representation::Tagged());
|
| SetFlag(kUseGVN);
|
| @@ -2808,11 +2809,11 @@
|
| return Representation::None();
|
| }
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load_global")
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load_global_cell")
|
|
|
| protected:
|
| virtual bool DataEquals(HValue* other) {
|
| - HLoadGlobal* b = HLoadGlobal::cast(other);
|
| + HLoadGlobalCell* b = HLoadGlobalCell::cast(other);
|
| return cell_.is_identical_to(b->cell());
|
| }
|
|
|
| @@ -2822,6 +2823,32 @@
|
| };
|
|
|
|
|
| +class HLoadGlobalGeneric: public HUnaryOperation {
|
| + public:
|
| + HLoadGlobalGeneric(HValue* context, Handle<Object> name, bool for_typeof)
|
| + : HUnaryOperation(context), name_(name), for_typeof_(for_typeof) {
|
| + set_representation(Representation::Tagged());
|
| + SetAllSideEffects();
|
| + }
|
| +
|
| + HValue* context() { return OperandAt(0); }
|
| + Handle<Object> name() const { return name_; }
|
| + bool for_typeof() const { return for_typeof_; }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream);
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic")
|
| +
|
| + private:
|
| + Handle<Object> name_;
|
| + bool for_typeof_;
|
| +};
|
| +
|
| +
|
| class HStoreGlobal: public HUnaryOperation {
|
| public:
|
| HStoreGlobal(HValue* value,
|
|
|