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

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
« no previous file with comments | « src/layout-descriptor-inl.h ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7403 matching lines...) Expand 10 before | Expand all | Expand 10 after
7414 7414
7415 7415
7416 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object, 7416 static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object,
7417 int start_offset, 7417 int start_offset,
7418 int end_offset, 7418 int end_offset,
7419 ObjectVisitor* v) { 7419 ObjectVisitor* v) {
7420 DCHECK(FLAG_unbox_double_fields); 7420 DCHECK(FLAG_unbox_double_fields);
7421 DCHECK(IsAligned(start_offset, kPointerSize) && 7421 DCHECK(IsAligned(start_offset, kPointerSize) &&
7422 IsAligned(end_offset, kPointerSize)); 7422 IsAligned(end_offset, kPointerSize));
7423 7423
7424 InobjectPropertiesHelper helper(object->map()); 7424 LayoutDescriptorHelper helper(object->map());
7425 DCHECK(!helper.all_fields_tagged()); 7425 DCHECK(!helper.all_fields_tagged());
7426 7426
7427 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) { 7427 for (int offset = start_offset; offset < end_offset; offset += kPointerSize) {
7428 // Visit all tagged fields. 7428 // Visit all tagged fields.
7429 if (helper.IsTagged(offset)) { 7429 if (helper.IsTagged(offset)) {
7430 v->VisitPointer(HeapObject::RawField(object, offset)); 7430 v->VisitPointer(HeapObject::RawField(object, offset));
7431 } 7431 }
7432 } 7432 }
7433 } 7433 }
7434 7434
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
7518 #undef READ_SHORT_FIELD 7518 #undef READ_SHORT_FIELD
7519 #undef WRITE_SHORT_FIELD 7519 #undef WRITE_SHORT_FIELD
7520 #undef READ_BYTE_FIELD 7520 #undef READ_BYTE_FIELD
7521 #undef WRITE_BYTE_FIELD 7521 #undef WRITE_BYTE_FIELD
7522 #undef NOBARRIER_READ_BYTE_FIELD 7522 #undef NOBARRIER_READ_BYTE_FIELD
7523 #undef NOBARRIER_WRITE_BYTE_FIELD 7523 #undef NOBARRIER_WRITE_BYTE_FIELD
7524 7524
7525 } } // namespace v8::internal 7525 } } // namespace v8::internal
7526 7526
7527 #endif // V8_OBJECTS_INL_H_ 7527 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/layout-descriptor-inl.h ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698