OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 5 #ifndef V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
6 #define V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 6 #define V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
7 | 7 |
8 #include "src/objects-body-descriptors.h" | 8 #include "src/objects-body-descriptors.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 template <typename ObjectVisitor> | 95 template <typename ObjectVisitor> |
96 void BodyDescriptorBase::IteratePointer(HeapObject* obj, int offset, | 96 void BodyDescriptorBase::IteratePointer(HeapObject* obj, int offset, |
97 ObjectVisitor* v) { | 97 ObjectVisitor* v) { |
98 v->VisitPointer(HeapObject::RawField(obj, offset)); | 98 v->VisitPointer(HeapObject::RawField(obj, offset)); |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 template <typename StaticVisitor> | 102 template <typename StaticVisitor> |
103 void BodyDescriptorBase::IteratePointer(Heap* heap, HeapObject* obj, | 103 void BodyDescriptorBase::IteratePointer(Heap* heap, HeapObject* obj, |
104 int offset) { | 104 int offset) { |
105 StaticVisitor::VisitPointer(heap, obj, HeapObject::RawField(obj, offset)); | 105 StaticVisitor::VisitPointers( |
Igor Sheludko
2015/12/01 13:53:00
Why did you change this?
jochen (gone - plz use gerrit)
2015/12/01 14:00:57
because the StaticScavengingVisitor doesn't implem
Igor Sheludko
2015/12/01 14:09:09
I think it is better to modify signature of the St
| |
106 heap, obj, HeapObject::RawField(obj, offset), | |
107 HeapObject::RawField(obj, offset + kPointerSize)); | |
106 } | 108 } |
107 | 109 |
108 | 110 |
109 // Iterates the function object according to the visiting policy. | 111 // Iterates the function object according to the visiting policy. |
110 template <JSFunction::BodyVisitingPolicy body_visiting_policy> | 112 template <JSFunction::BodyVisitingPolicy body_visiting_policy> |
111 class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase { | 113 class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase { |
112 public: | 114 public: |
113 STATIC_ASSERT(kNonWeakFieldsEndOffset == kCodeEntryOffset); | 115 STATIC_ASSERT(kNonWeakFieldsEndOffset == kCodeEntryOffset); |
114 STATIC_ASSERT(kCodeEntryOffset + kPointerSize == kNextFunctionLinkOffset); | 116 STATIC_ASSERT(kCodeEntryOffset + kPointerSize == kNextFunctionLinkOffset); |
115 STATIC_ASSERT(kNextFunctionLinkOffset + kPointerSize == kSize); | 117 STATIC_ASSERT(kNextFunctionLinkOffset + kPointerSize == kSize); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
555 | 557 |
556 template <typename ObjectVisitor> | 558 template <typename ObjectVisitor> |
557 void HeapObject::IterateBodyFast(InstanceType type, int object_size, | 559 void HeapObject::IterateBodyFast(InstanceType type, int object_size, |
558 ObjectVisitor* v) { | 560 ObjectVisitor* v) { |
559 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); | 561 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); |
560 } | 562 } |
561 } // namespace internal | 563 } // namespace internal |
562 } // namespace v8 | 564 } // namespace v8 |
563 | 565 |
564 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 566 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
OLD | NEW |