| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 ObjectVisitor* v) { | 227 ObjectVisitor* v) { |
| 228 IteratePointer(obj, kConstantPoolOffset, v); | 228 IteratePointer(obj, kConstantPoolOffset, v); |
| 229 } | 229 } |
| 230 | 230 |
| 231 template <typename StaticVisitor> | 231 template <typename StaticVisitor> |
| 232 static inline void IterateBody(HeapObject* obj, int object_size) { | 232 static inline void IterateBody(HeapObject* obj, int object_size) { |
| 233 Heap* heap = obj->GetHeap(); | 233 Heap* heap = obj->GetHeap(); |
| 234 IteratePointer<StaticVisitor>(heap, obj, kConstantPoolOffset); | 234 IteratePointer<StaticVisitor>(heap, obj, kConstantPoolOffset); |
| 235 } | 235 } |
| 236 | 236 |
| 237 static inline int SizeOf(Map* map, HeapObject* object) { | 237 static inline int SizeOf(Map* map, HeapObject* obj) { |
| 238 return SizeFor( | 238 return reinterpret_cast<BytecodeArray*>(obj)->BytecodeArraySize(); |
| 239 reinterpret_cast<FixedArray*>(object)->synchronized_length()); | |
| 240 } | 239 } |
| 241 }; | 240 }; |
| 242 | 241 |
| 243 | 242 |
| 244 class FixedTypedArrayBase::BodyDescriptor final : public BodyDescriptorBase { | 243 class FixedTypedArrayBase::BodyDescriptor final : public BodyDescriptorBase { |
| 245 public: | 244 public: |
| 246 static bool IsValidSlot(HeapObject* obj, int offset) { | 245 static bool IsValidSlot(HeapObject* obj, int offset) { |
| 247 return offset == kBasePointerOffset; | 246 return offset == kBasePointerOffset; |
| 248 } | 247 } |
| 249 | 248 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 | 574 |
| 576 template <typename ObjectVisitor> | 575 template <typename ObjectVisitor> |
| 577 void HeapObject::IterateBodyFast(InstanceType type, int object_size, | 576 void HeapObject::IterateBodyFast(InstanceType type, int object_size, |
| 578 ObjectVisitor* v) { | 577 ObjectVisitor* v) { |
| 579 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); | 578 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); |
| 580 } | 579 } |
| 581 } // namespace internal | 580 } // namespace internal |
| 582 } // namespace v8 | 581 } // namespace v8 |
| 583 | 582 |
| 584 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 583 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
| OLD | NEW |