| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index fed4b8bfed7ef652c1bc0268442d7fca85f49515..b2bdeb061e2e5912e21e6cb5723f28593370f695 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -124,7 +124,8 @@ class LChunkBuilder;
|
| V(LoadElements) \
|
| V(LoadExternalArrayPointer) \
|
| V(LoadFunctionPrototype) \
|
| - V(LoadGlobal) \
|
| + V(LoadGlobalCell) \
|
| + V(LoadGlobalGeneric) \
|
| V(LoadKeyedFastElement) \
|
| V(LoadKeyedGeneric) \
|
| V(LoadKeyedSpecializedArrayElement) \
|
| @@ -147,7 +148,8 @@ class LChunkBuilder;
|
| V(Simulate) \
|
| V(StackCheck) \
|
| V(StoreContextSlot) \
|
| - V(StoreGlobal) \
|
| + V(StoreGlobalCell) \
|
| + V(StoreGlobalGeneric) \
|
| V(StoreKeyedFastElement) \
|
| V(StoreKeyedSpecializedArrayElement) \
|
| V(StoreKeyedGeneric) \
|
| @@ -931,7 +933,7 @@ class HChange: public HUnaryOperation {
|
| Representation from,
|
| Representation to,
|
| bool is_truncating)
|
| - : HUnaryOperation(value), from_(from), to_(to) {
|
| + : HUnaryOperation(value), from_(from) {
|
| ASSERT(!from.IsNone() && !to.IsNone());
|
| ASSERT(!from.Equals(to));
|
| set_representation(to);
|
| @@ -946,7 +948,7 @@ class HChange: public HUnaryOperation {
|
| virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
|
|
| Representation from() const { return from_; }
|
| - Representation to() const { return to_; }
|
| + Representation to() const { return representation(); }
|
| virtual Representation RequiredInputRepresentation(int index) const {
|
| return from_;
|
| }
|
| @@ -968,7 +970,6 @@ class HChange: public HUnaryOperation {
|
|
|
| private:
|
| Representation from_;
|
| - Representation to_;
|
| };
|
|
|
|
|
| @@ -2809,9 +2810,9 @@ class HUnknownOSRValue: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -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);
|
| @@ -2832,11 +2833,11 @@ class HLoadGlobal: public HTemplateInstruction<0> {
|
| 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());
|
| }
|
|
|
| @@ -2846,11 +2847,43 @@ class HLoadGlobal: public HTemplateInstruction<0> {
|
| };
|
|
|
|
|
| -class HStoreGlobal: public HUnaryOperation {
|
| +class HLoadGlobalGeneric: public HBinaryOperation {
|
| public:
|
| - HStoreGlobal(HValue* value,
|
| - Handle<JSGlobalPropertyCell> cell,
|
| - bool check_hole_value)
|
| + HLoadGlobalGeneric(HValue* context,
|
| + HValue* global_object,
|
| + Handle<Object> name,
|
| + bool for_typeof)
|
| + : HBinaryOperation(context, global_object),
|
| + name_(name),
|
| + for_typeof_(for_typeof) {
|
| + set_representation(Representation::Tagged());
|
| + SetAllSideEffects();
|
| + }
|
| +
|
| + HValue* context() { return OperandAt(0); }
|
| + HValue* global_object() { return OperandAt(1); }
|
| + 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 HStoreGlobalCell: public HUnaryOperation {
|
| + public:
|
| + HStoreGlobalCell(HValue* value,
|
| + Handle<JSGlobalPropertyCell> cell,
|
| + bool check_hole_value)
|
| : HUnaryOperation(value),
|
| cell_(cell),
|
| check_hole_value_(check_hole_value) {
|
| @@ -2865,7 +2898,7 @@ class HStoreGlobal: public HUnaryOperation {
|
| }
|
| virtual void PrintDataTo(StringStream* stream);
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global")
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store_global_cell")
|
|
|
| private:
|
| Handle<JSGlobalPropertyCell> cell_;
|
| @@ -2873,6 +2906,38 @@ class HStoreGlobal: public HUnaryOperation {
|
| };
|
|
|
|
|
| +class HStoreGlobalGeneric: public HTemplateInstruction<3> {
|
| + public:
|
| + HStoreGlobalGeneric(HValue* context,
|
| + HValue* global_object,
|
| + Handle<Object> name,
|
| + HValue* value)
|
| + : name_(name) {
|
| + SetOperandAt(0, context);
|
| + SetOperandAt(1, global_object);
|
| + SetOperandAt(2, value);
|
| + set_representation(Representation::Tagged());
|
| + SetAllSideEffects();
|
| + }
|
| +
|
| + HValue* context() { return OperandAt(0); }
|
| + HValue* global_object() { return OperandAt(1); }
|
| + Handle<Object> name() const { return name_; }
|
| + HValue* value() { return OperandAt(2); }
|
| +
|
| + virtual void PrintDataTo(StringStream* stream);
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Tagged();
|
| + }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic")
|
| +
|
| + private:
|
| + Handle<Object> name_;
|
| +};
|
| +
|
| +
|
| class HLoadContextSlot: public HUnaryOperation {
|
| public:
|
| HLoadContextSlot(HValue* context , int slot_index)
|
|
|