OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/heap/mark-compact-inl.h" | 7 #include "src/heap/mark-compact-inl.h" |
8 #include "src/heap/objects-visiting.h" | 8 #include "src/heap/objects-visiting.h" |
9 #include "src/heap/objects-visiting-inl.h" | 9 #include "src/heap/objects-visiting-inl.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 | 14 |
| 15 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(Map* map) { |
| 16 return GetVisitorId(map->instance_type(), map->instance_size(), |
| 17 FLAG_unbox_double_fields && !map->HasFastPointerLayout()); |
| 18 } |
| 19 |
| 20 |
15 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId( | 21 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId( |
16 int instance_type, int instance_size, bool has_unboxed_fields) { | 22 int instance_type, int instance_size, bool has_unboxed_fields) { |
17 if (instance_type < FIRST_NONSTRING_TYPE) { | 23 if (instance_type < FIRST_NONSTRING_TYPE) { |
18 switch (instance_type & kStringRepresentationMask) { | 24 switch (instance_type & kStringRepresentationMask) { |
19 case kSeqStringTag: | 25 case kSeqStringTag: |
20 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) { | 26 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) { |
21 return kVisitSeqOneByteString; | 27 return kVisitSeqOneByteString; |
22 } else { | 28 } else { |
23 return kVisitSeqTwoByteString; | 29 return kVisitSeqTwoByteString; |
24 } | 30 } |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 }; | 487 }; |
482 | 488 |
483 | 489 |
484 template Object* VisitWeakList<Context>(Heap* heap, Object* list, | 490 template Object* VisitWeakList<Context>(Heap* heap, Object* list, |
485 WeakObjectRetainer* retainer); | 491 WeakObjectRetainer* retainer); |
486 | 492 |
487 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, | 493 template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list, |
488 WeakObjectRetainer* retainer); | 494 WeakObjectRetainer* retainer); |
489 } // namespace internal | 495 } // namespace internal |
490 } // namespace v8 | 496 } // namespace v8 |
OLD | NEW |