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 7348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7359 | 7359 |
7360 | 7360 |
7361 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object, | 7361 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object, |
7362 int start_offset, | 7362 int start_offset, |
7363 int end_offset, | 7363 int end_offset, |
7364 ObjectVisitor* v) { | 7364 ObjectVisitor* v) { |
7365 DCHECK(FLAG_unbox_double_fields); | 7365 DCHECK(FLAG_unbox_double_fields); |
7366 DCHECK(IsAligned(start_offset, kPointerSize) && | 7366 DCHECK(IsAligned(start_offset, kPointerSize) && |
7367 IsAligned(end_offset, kPointerSize)); | 7367 IsAligned(end_offset, kPointerSize)); |
7368 | 7368 |
7369 InobjectPropertiesHelper helper(object->map()); | 7369 LayoutDescriptorHelper helper(object->map()); |
7370 DCHECK(!helper.all_fields_tagged()); | 7370 DCHECK(!helper.all_fields_tagged()); |
7371 | 7371 |
7372 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) { | 7372 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) { |
7373 // Visit all tagged fields. | 7373 // Visit all tagged fields. |
7374 if (helper.IsTagged(offset)) { | 7374 if (helper.IsTagged(offset)) { |
7375 v->VisitPointer(HeapObject::RawField(object, offset)); | 7375 v->VisitPointer(HeapObject::RawField(object, offset)); |
7376 } | 7376 } |
7377 } | 7377 } |
7378 } | 7378 } |
7379 | 7379 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7463 #undef READ_SHORT_FIELD | 7463 #undef READ_SHORT_FIELD |
7464 #undef WRITE_SHORT_FIELD | 7464 #undef WRITE_SHORT_FIELD |
7465 #undef READ_BYTE_FIELD | 7465 #undef READ_BYTE_FIELD |
7466 #undef WRITE_BYTE_FIELD | 7466 #undef WRITE_BYTE_FIELD |
7467 #undef NOBARRIER_READ_BYTE_FIELD | 7467 #undef NOBARRIER_READ_BYTE_FIELD |
7468 #undef NOBARRIER_WRITE_BYTE_FIELD | 7468 #undef NOBARRIER_WRITE_BYTE_FIELD |
7469 | 7469 |
7470 } } // namespace v8::internal | 7470 } } // namespace v8::internal |
7471 | 7471 |
7472 #endif // V8_OBJECTS_INL_H_ | 7472 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |