| 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 5356 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5367 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, | 5367 inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, | 
| 5368                                             HValue* new_space_dominator) { | 5368                                             HValue* new_space_dominator) { | 
| 5369   if (object->IsInnerAllocatedObject()) { | 5369   if (object->IsInnerAllocatedObject()) { | 
| 5370     return ReceiverObjectNeedsWriteBarrier( | 5370     return ReceiverObjectNeedsWriteBarrier( | 
| 5371         HInnerAllocatedObject::cast(object)->base_object(), | 5371         HInnerAllocatedObject::cast(object)->base_object(), | 
| 5372         new_space_dominator); | 5372         new_space_dominator); | 
| 5373   } | 5373   } | 
| 5374   if (object->IsConstant() && HConstant::cast(object)->IsCell()) { | 5374   if (object->IsConstant() && HConstant::cast(object)->IsCell()) { | 
| 5375     return false; | 5375     return false; | 
| 5376   } | 5376   } | 
|  | 5377   if (object->IsConstant() && | 
|  | 5378       HConstant::cast(object)->HasExternalReferenceValue()) { | 
|  | 5379     // Stores to external references require no write barriers | 
|  | 5380     return false; | 
|  | 5381   } | 
| 5377   if (object != new_space_dominator) return true; | 5382   if (object != new_space_dominator) return true; | 
| 5378   if (object->IsAllocate()) { | 5383   if (object->IsAllocate()) { | 
| 5379     return !HAllocate::cast(object)->IsNewSpaceAllocation(); | 5384     return !HAllocate::cast(object)->IsNewSpaceAllocation(); | 
| 5380   } | 5385   } | 
| 5381   return true; | 5386   return true; | 
| 5382 } | 5387 } | 
| 5383 | 5388 | 
| 5384 | 5389 | 
| 5385 class HStoreGlobalCell: public HUnaryOperation { | 5390 class HStoreGlobalCell: public HUnaryOperation { | 
| 5386  public: | 5391  public: | 
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6148   } | 6153   } | 
| 6149   HValue* new_space_dominator() const { return new_space_dominator_; } | 6154   HValue* new_space_dominator() const { return new_space_dominator_; } | 
| 6150 | 6155 | 
| 6151   bool NeedsWriteBarrier() { | 6156   bool NeedsWriteBarrier() { | 
| 6152     ASSERT(!(FLAG_track_double_fields && field_representation().IsDouble()) || | 6157     ASSERT(!(FLAG_track_double_fields && field_representation().IsDouble()) || | 
| 6153            transition_.is_null()); | 6158            transition_.is_null()); | 
| 6154     if (IsSkipWriteBarrier()) return false; | 6159     if (IsSkipWriteBarrier()) return false; | 
| 6155     if (field_representation().IsDouble()) return false; | 6160     if (field_representation().IsDouble()) return false; | 
| 6156     if (field_representation().IsSmi()) return false; | 6161     if (field_representation().IsSmi()) return false; | 
| 6157     if (field_representation().IsInteger32()) return false; | 6162     if (field_representation().IsInteger32()) return false; | 
|  | 6163     if (field_representation().IsExternal()) return false; | 
| 6158     return StoringValueNeedsWriteBarrier(value()) && | 6164     return StoringValueNeedsWriteBarrier(value()) && | 
| 6159         ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator()); | 6165         ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator()); | 
| 6160   } | 6166   } | 
| 6161 | 6167 | 
| 6162   bool NeedsWriteBarrierForMap() { | 6168   bool NeedsWriteBarrierForMap() { | 
| 6163     if (IsSkipWriteBarrier()) return false; | 6169     if (IsSkipWriteBarrier()) return false; | 
| 6164     return ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator()); | 6170     return ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator()); | 
| 6165   } | 6171   } | 
| 6166 | 6172 | 
| 6167   virtual void FinalizeUniqueValueId() { | 6173   virtual void FinalizeUniqueValueId() { | 
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6958   virtual bool IsDeletable() const { return true; } | 6964   virtual bool IsDeletable() const { return true; } | 
| 6959 }; | 6965 }; | 
| 6960 | 6966 | 
| 6961 | 6967 | 
| 6962 #undef DECLARE_INSTRUCTION | 6968 #undef DECLARE_INSTRUCTION | 
| 6963 #undef DECLARE_CONCRETE_INSTRUCTION | 6969 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 6964 | 6970 | 
| 6965 } }  // namespace v8::internal | 6971 } }  // namespace v8::internal | 
| 6966 | 6972 | 
| 6967 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 6973 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 
| OLD | NEW | 
|---|