Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/objects-inl.h

Issue 726713003: LayoutDescriptorHelper is now able to calculate the length of contiguous regions of tagged/non-tagg… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7413 matching lines...) Expand 10 before | Expand all | Expand 10 after
7424 7424
7425 7425
7426 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object, 7426 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object,
7427 int start_offset, 7427 int start_offset,
7428 int end_offset, 7428 int end_offset,
7429 ObjectVisitor* v) { 7429 ObjectVisitor* v) {
7430 DCHECK(FLAG_unbox_double_fields); 7430 DCHECK(FLAG_unbox_double_fields);
7431 DCHECK(IsAligned(start_offset, kPointerSize) && 7431 DCHECK(IsAligned(start_offset, kPointerSize) &&
7432 IsAligned(end_offset, kPointerSize)); 7432 IsAligned(end_offset, kPointerSize));
7433 7433
7434 InobjectPropertiesHelper helper(object->map()); 7434 LayoutDescriptorHelper helper(object->map());
7435 DCHECK(!helper.all_fields_tagged()); 7435 DCHECK(!helper.all_fields_tagged());
7436 7436
7437 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) { 7437 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) {
7438 // Visit all tagged fields. 7438 // Visit all tagged fields.
7439 if (helper.IsTagged(offset)) { 7439 if (helper.IsTagged(offset)) {
7440 v->VisitPointer(HeapObject::RawField(object, offset)); 7440 v->VisitPointer(HeapObject::RawField(object, offset));
7441 } 7441 }
7442 } 7442 }
7443 } 7443 }
7444 7444
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
7528 #undef READ_SHORT_FIELD 7528 #undef READ_SHORT_FIELD
7529 #undef WRITE_SHORT_FIELD 7529 #undef WRITE_SHORT_FIELD
7530 #undef READ_BYTE_FIELD 7530 #undef READ_BYTE_FIELD
7531 #undef WRITE_BYTE_FIELD 7531 #undef WRITE_BYTE_FIELD
7532 #undef NOBARRIER_READ_BYTE_FIELD 7532 #undef NOBARRIER_READ_BYTE_FIELD
7533 #undef NOBARRIER_WRITE_BYTE_FIELD 7533 #undef NOBARRIER_WRITE_BYTE_FIELD
7534 7534
7535 } } // namespace v8::internal 7535 } } // namespace v8::internal
7536 7536
7537 #endif // V8_OBJECTS_INL_H_ 7537 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698