| Index: src/hydrogen-instructions.h
|
| ===================================================================
|
| --- src/hydrogen-instructions.h (revision 9605)
|
| +++ src/hydrogen-instructions.h (working copy)
|
| @@ -397,6 +397,11 @@
|
| return type_ == kUninitialized;
|
| }
|
|
|
| + bool IsHeapObject() {
|
| + ASSERT(type_ != kUninitialized);
|
| + return IsHeapNumber() || IsString() || IsNonPrimitive();
|
| + }
|
| +
|
| static HType TypeFromValue(Handle<Object> value);
|
|
|
| const char* ToString();
|
| @@ -1101,12 +1106,14 @@
|
| ASSERT(!value->representation().IsNone() && !to.IsNone());
|
| ASSERT(!value->representation().Equals(to));
|
| set_representation(to);
|
| + set_type(HType::TaggedNumber());
|
| SetFlag(kUseGVN);
|
| if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
|
| if (is_truncating) SetFlag(kTruncatingToInt32);
|
| }
|
|
|
| virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
| + virtual HType CalculateInferredType();
|
|
|
| Representation from() { return value()->representation(); }
|
| Representation to() { return representation(); }
|
| @@ -3260,6 +3267,13 @@
|
| };
|
|
|
|
|
| +static inline bool StoringValueNeedsWriteBarrier(HValue* value) {
|
| + return !value->type().IsBoolean()
|
| + && !value->type().IsSmi()
|
| + && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
|
| +}
|
| +
|
| +
|
| class HStoreGlobalCell: public HUnaryOperation {
|
| public:
|
| HStoreGlobalCell(HValue* value,
|
| @@ -3275,6 +3289,9 @@
|
| bool RequiresHoleCheck() {
|
| return !details_.IsDontDelete() || details_.IsReadOnly();
|
| }
|
| + bool NeedsWriteBarrier() {
|
| + return StoringValueNeedsWriteBarrier(value());
|
| + }
|
|
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| @@ -3355,13 +3372,6 @@
|
| };
|
|
|
|
|
| -static inline bool StoringValueNeedsWriteBarrier(HValue* value) {
|
| - return !value->type().IsBoolean()
|
| - && !value->type().IsSmi()
|
| - && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
|
| -}
|
| -
|
| -
|
| class HStoreContextSlot: public HTemplateInstruction<2> {
|
| public:
|
| HStoreContextSlot(HValue* context, int slot_index, HValue* value)
|
| @@ -3948,7 +3958,7 @@
|
| HStringCharFromCode(HValue* context, HValue* char_code) {
|
| SetOperandAt(0, context);
|
| SetOperandAt(1, char_code);
|
| - set_representation(Representation::Tagged());
|
| + set_representation(Representation::Tagged());
|
| SetFlag(kUseGVN);
|
| }
|
|
|
| @@ -3957,6 +3967,7 @@
|
| ? Representation::Tagged()
|
| : Representation::Integer32();
|
| }
|
| + virtual HType CalculateInferredType();
|
|
|
| HValue* context() { return OperandAt(0); }
|
| HValue* value() { return OperandAt(1); }
|
| @@ -4034,6 +4045,7 @@
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| }
|
| + virtual HType CalculateInferredType();
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral)
|
|
|
| @@ -4068,6 +4080,7 @@
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| }
|
| + virtual HType CalculateInferredType();
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral)
|
|
|
| @@ -4097,6 +4110,7 @@
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| }
|
| + virtual HType CalculateInferredType();
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral)
|
|
|
| @@ -4121,6 +4135,7 @@
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| return Representation::Tagged();
|
| }
|
| + virtual HType CalculateInferredType();
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral)
|
|
|
|
|