| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 5916 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5927     HLoadNamedField* b = HLoadNamedField::cast(other); | 5927     HLoadNamedField* b = HLoadNamedField::cast(other); | 
| 5928     return access_.Equals(b->access_); | 5928     return access_.Equals(b->access_); | 
| 5929   } | 5929   } | 
| 5930 | 5930 | 
| 5931  private: | 5931  private: | 
| 5932   HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) { | 5932   HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) { | 
| 5933     ASSERT(object != NULL); | 5933     ASSERT(object != NULL); | 
| 5934     SetOperandAt(0, object); | 5934     SetOperandAt(0, object); | 
| 5935 | 5935 | 
| 5936     Representation representation = access.representation(); | 5936     Representation representation = access.representation(); | 
| 5937     if (representation.IsSmi()) { | 5937     if (representation.IsByte()) { | 
|  | 5938       set_representation(Representation::Integer32()); | 
|  | 5939     } else if (representation.IsSmi()) { | 
| 5938       set_type(HType::Smi()); | 5940       set_type(HType::Smi()); | 
| 5939       set_representation(representation); | 5941       set_representation(representation); | 
| 5940     } else if (representation.IsDouble() || | 5942     } else if (representation.IsDouble() || | 
| 5941                representation.IsExternal() || | 5943                representation.IsExternal() || | 
| 5942                representation.IsInteger32()) { | 5944                representation.IsInteger32()) { | 
| 5943       set_representation(representation); | 5945       set_representation(representation); | 
| 5944     } else if (FLAG_track_heap_object_fields && | 5946     } else if (FLAG_track_heap_object_fields && | 
| 5945                representation.IsHeapObject()) { | 5947                representation.IsHeapObject()) { | 
| 5946       set_type(HType::NonPrimitive()); | 5948       set_type(HType::NonPrimitive()); | 
| 5947       set_representation(Representation::Tagged()); | 5949       set_representation(Representation::Tagged()); | 
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6225   virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { | 6227   virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { | 
| 6226     return index == 1; | 6228     return index == 1; | 
| 6227   } | 6229   } | 
| 6228   virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { | 6230   virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { | 
| 6229     return !access().IsInobject() || access().offset() >= size; | 6231     return !access().IsInobject() || access().offset() >= size; | 
| 6230   } | 6232   } | 
| 6231   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 6233   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 
| 6232     if (index == 0 && access().IsExternalMemory()) { | 6234     if (index == 0 && access().IsExternalMemory()) { | 
| 6233       // object must be external in case of external memory access | 6235       // object must be external in case of external memory access | 
| 6234       return Representation::External(); | 6236       return Representation::External(); | 
| 6235     } else if (index == 1 && | 6237     } else if (index == 1) { | 
| 6236         (field_representation().IsDouble() || | 6238       if (field_representation().IsByte() || | 
| 6237          field_representation().IsSmi() || | 6239           field_representation().IsInteger32()) { | 
| 6238          field_representation().IsInteger32())) { | 6240         return Representation::Integer32(); | 
| 6239       return field_representation(); | 6241       } else if (field_representation().IsDouble() || | 
|  | 6242                  field_representation().IsSmi()) { | 
|  | 6243         return field_representation(); | 
|  | 6244       } | 
| 6240     } | 6245     } | 
| 6241     return Representation::Tagged(); | 6246     return Representation::Tagged(); | 
| 6242   } | 6247   } | 
| 6243   virtual void HandleSideEffectDominator(GVNFlag side_effect, | 6248   virtual void HandleSideEffectDominator(GVNFlag side_effect, | 
| 6244                                          HValue* dominator) V8_OVERRIDE { | 6249                                          HValue* dominator) V8_OVERRIDE { | 
| 6245     ASSERT(side_effect == kChangesNewSpacePromotion); | 6250     ASSERT(side_effect == kChangesNewSpacePromotion); | 
| 6246     new_space_dominator_ = dominator; | 6251     new_space_dominator_ = dominator; | 
| 6247   } | 6252   } | 
| 6248   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 6253   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 
| 6249 | 6254 | 
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7106   virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7111   virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 
| 7107 }; | 7112 }; | 
| 7108 | 7113 | 
| 7109 | 7114 | 
| 7110 #undef DECLARE_INSTRUCTION | 7115 #undef DECLARE_INSTRUCTION | 
| 7111 #undef DECLARE_CONCRETE_INSTRUCTION | 7116 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 7112 | 7117 | 
| 7113 } }  // namespace v8::internal | 7118 } }  // namespace v8::internal | 
| 7114 | 7119 | 
| 7115 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 7120 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 
| OLD | NEW | 
|---|