| 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 5480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5491 // Stores to external references require no write barriers | 5491 // Stores to external references require no write barriers |
| 5492 return false; | 5492 return false; |
| 5493 } | 5493 } |
| 5494 // We definitely need a write barrier unless the object is the allocation | 5494 // We definitely need a write barrier unless the object is the allocation |
| 5495 // dominator. | 5495 // dominator. |
| 5496 if (object == dominator && object->IsAllocate()) { | 5496 if (object == dominator && object->IsAllocate()) { |
| 5497 // Stores to new space allocations require no write barriers. | 5497 // Stores to new space allocations require no write barriers. |
| 5498 if (HAllocate::cast(object)->IsNewSpaceAllocation()) { | 5498 if (HAllocate::cast(object)->IsNewSpaceAllocation()) { |
| 5499 return false; | 5499 return false; |
| 5500 } | 5500 } |
| 5501 // Stores to old space allocations require no write barriers if the value is | |
| 5502 // a constant provably not in new space. | |
| 5503 if (value->IsConstant() && HConstant::cast(value)->NotInNewSpace()) { | |
| 5504 return false; | |
| 5505 } | |
| 5506 } | 5501 } |
| 5507 return true; | 5502 return true; |
| 5508 } | 5503 } |
| 5509 | 5504 |
| 5510 | 5505 |
| 5511 inline PointersToHereCheck PointersToHereCheckForObject(HValue* object, | 5506 inline PointersToHereCheck PointersToHereCheckForObject(HValue* object, |
| 5512 HValue* dominator) { | 5507 HValue* dominator) { |
| 5513 while (object->IsInnerAllocatedObject()) { | 5508 while (object->IsInnerAllocatedObject()) { |
| 5514 object = HInnerAllocatedObject::cast(object)->base_object(); | 5509 object = HInnerAllocatedObject::cast(object)->base_object(); |
| 5515 } | 5510 } |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7565 | 7560 |
| 7566 | 7561 |
| 7567 | 7562 |
| 7568 #undef DECLARE_INSTRUCTION | 7563 #undef DECLARE_INSTRUCTION |
| 7569 #undef DECLARE_CONCRETE_INSTRUCTION | 7564 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7570 | 7565 |
| 7571 } // namespace internal | 7566 } // namespace internal |
| 7572 } // namespace v8 | 7567 } // namespace v8 |
| 7573 | 7568 |
| 7574 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7569 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |