Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 5703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5714 // Stores to external references require no write barriers | 5714 // Stores to external references require no write barriers |
| 5715 return false; | 5715 return false; |
| 5716 } | 5716 } |
| 5717 if (object != new_space_dominator) return true; | 5717 if (object != new_space_dominator) return true; |
| 5718 if (object->IsAllocate()) { | 5718 if (object->IsAllocate()) { |
| 5719 // Stores to new space allocations require no write barriers if the object | 5719 // Stores to new space allocations require no write barriers if the object |
| 5720 // is the new space dominator. | 5720 // is the new space dominator. |
| 5721 if (HAllocate::cast(object)->IsNewSpaceAllocation()) { | 5721 if (HAllocate::cast(object)->IsNewSpaceAllocation()) { |
| 5722 return false; | 5722 return false; |
| 5723 } | 5723 } |
| 5724 // Storing a map or an immortal immovable object requires no write barriers | 5724 // Stores to old space allocations require no write barriers if the object |
| 5725 // if the object is the new space dominator. | 5725 // is the new space dominator and the value is not in new space. |
|
Hannes Payer (out of office)
2014/05/18 18:54:58
new_space_dominator should be called dominator, ot
Benedikt Meurer
2014/05/19 06:17:51
Done.
| |
| 5726 if (value->IsConstant() && | 5726 if (value->IsConstant() && HConstant::cast(value)->NotInNewSpace()) { |
| 5727 (HConstant::cast(value)->IsMap() || | |
| 5728 HConstant::cast(value)->ImmortalImmovable())) { | |
| 5729 return false; | 5727 return false; |
| 5730 } | 5728 } |
| 5731 // Likewise we don't need a write barrier if we store a value that | 5729 // Likewise we don't need a write barrier if we store a value was previously |
| 5732 // originates from the same allocation (via allocation folding). | 5730 // allocated in old space. |
|
Hannes Payer (out of office)
2014/05/18 18:54:58
broken comment.
Benedikt Meurer
2014/05/19 06:17:51
Done.
| |
| 5733 while (value->IsInnerAllocatedObject()) { | 5731 while (value->IsInnerAllocatedObject()) { |
| 5734 value = HInnerAllocatedObject::cast(value)->base_object(); | 5732 value = HInnerAllocatedObject::cast(value)->base_object(); |
| 5735 } | 5733 } |
| 5736 return object != value; | 5734 if (value->IsAllocate() && |
| 5735 HAllocate::cast(value)->IsOldDataSpaceAllocation()) { | |
| 5736 return false; | |
| 5737 } | |
|
Hannes Payer (out of office)
2014/05/18 18:54:58
Why not
if (value->IsAllocate() &&
(HAllocate:
Benedikt Meurer
2014/05/19 06:17:51
Done.
| |
| 5737 } | 5738 } |
| 5738 return true; | 5739 return true; |
| 5739 } | 5740 } |
| 5740 | 5741 |
| 5741 | 5742 |
| 5742 class HStoreGlobalCell V8_FINAL : public HUnaryOperation { | 5743 class HStoreGlobalCell V8_FINAL : public HUnaryOperation { |
| 5743 public: | 5744 public: |
| 5744 DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, | 5745 DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, |
| 5745 Handle<PropertyCell>, PropertyDetails); | 5746 Handle<PropertyCell>, PropertyDetails); |
| 5746 | 5747 |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7718 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7719 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7719 }; | 7720 }; |
| 7720 | 7721 |
| 7721 | 7722 |
| 7722 #undef DECLARE_INSTRUCTION | 7723 #undef DECLARE_INSTRUCTION |
| 7723 #undef DECLARE_CONCRETE_INSTRUCTION | 7724 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7724 | 7725 |
| 7725 } } // namespace v8::internal | 7726 } } // namespace v8::internal |
| 7726 | 7727 |
| 7727 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7728 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |