| 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 5220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5231 } | 5231 } |
| 5232 | 5232 |
| 5233 | 5233 |
| 5234 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { | 5234 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { |
| 5235 return HeapObject:: | 5235 return HeapObject:: |
| 5236 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); | 5236 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); |
| 5237 } | 5237 } |
| 5238 | 5238 |
| 5239 | 5239 |
| 5240 bool Code::CanContainWeakObjects() { | 5240 bool Code::CanContainWeakObjects() { |
| 5241 // is_turbofanned() implies !can_have_weak_objects(). | |
| 5242 DCHECK(!is_optimized_code() || !is_turbofanned() || !can_have_weak_objects()); | |
| 5243 return is_optimized_code() && can_have_weak_objects(); | 5241 return is_optimized_code() && can_have_weak_objects(); |
| 5244 } | 5242 } |
| 5245 | 5243 |
| 5246 | 5244 |
| 5247 bool Code::IsWeakObject(Object* object) { | 5245 bool Code::IsWeakObject(Object* object) { |
| 5248 return (CanContainWeakObjects() && IsWeakObjectInOptimizedCode(object)); | 5246 return (CanContainWeakObjects() && IsWeakObjectInOptimizedCode(object)); |
| 5249 } | 5247 } |
| 5250 | 5248 |
| 5251 | 5249 |
| 5252 bool Code::IsWeakObjectInOptimizedCode(Object* object) { | 5250 bool Code::IsWeakObjectInOptimizedCode(Object* object) { |
| (...skipping 2547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7800 #undef WRITE_INT64_FIELD | 7798 #undef WRITE_INT64_FIELD |
| 7801 #undef READ_BYTE_FIELD | 7799 #undef READ_BYTE_FIELD |
| 7802 #undef WRITE_BYTE_FIELD | 7800 #undef WRITE_BYTE_FIELD |
| 7803 #undef NOBARRIER_READ_BYTE_FIELD | 7801 #undef NOBARRIER_READ_BYTE_FIELD |
| 7804 #undef NOBARRIER_WRITE_BYTE_FIELD | 7802 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7805 | 7803 |
| 7806 } // namespace internal | 7804 } // namespace internal |
| 7807 } // namespace v8 | 7805 } // namespace v8 |
| 7808 | 7806 |
| 7809 #endif // V8_OBJECTS_INL_H_ | 7807 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |