| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 class Code::BodyDescriptor final : public BodyDescriptorBase { | 354 class Code::BodyDescriptor final : public BodyDescriptorBase { |
| 355 public: | 355 public: |
| 356 STATIC_ASSERT(kRelocationInfoOffset + kPointerSize == kHandlerTableOffset); | 356 STATIC_ASSERT(kRelocationInfoOffset + kPointerSize == kHandlerTableOffset); |
| 357 STATIC_ASSERT(kHandlerTableOffset + kPointerSize == | 357 STATIC_ASSERT(kHandlerTableOffset + kPointerSize == |
| 358 kDeoptimizationDataOffset); | 358 kDeoptimizationDataOffset); |
| 359 STATIC_ASSERT(kDeoptimizationDataOffset + kPointerSize == | 359 STATIC_ASSERT(kDeoptimizationDataOffset + kPointerSize == |
| 360 kSourcePositionTableOffset); | 360 kSourcePositionTableOffset); |
| 361 STATIC_ASSERT(kSourcePositionTableOffset + kPointerSize == | 361 STATIC_ASSERT(kSourcePositionTableOffset + kPointerSize == |
| 362 kTypeFeedbackInfoOffset); | 362 kTypeFeedbackInfoOffset); |
| 363 STATIC_ASSERT(kTypeFeedbackInfoOffset + kPointerSize == kNextCodeLinkOffset); | 363 STATIC_ASSERT(kTypeFeedbackInfoOffset + kPointerSize == |
| 364 kProtectedInstructionOffset); |
| 365 STATIC_ASSERT(kProtectedInstructionOffset + kPointerSize == |
| 366 kNextCodeLinkOffset); |
| 364 | 367 |
| 365 static bool IsValidSlot(HeapObject* obj, int offset) { | 368 static bool IsValidSlot(HeapObject* obj, int offset) { |
| 366 // Slots in code can't be invalid because we never trim code objects. | 369 // Slots in code can't be invalid because we never trim code objects. |
| 367 return true; | 370 return true; |
| 368 } | 371 } |
| 369 | 372 |
| 370 template <typename ObjectVisitor> | 373 template <typename ObjectVisitor> |
| 371 static inline void IterateBody(HeapObject* obj, ObjectVisitor* v) { | 374 static inline void IterateBody(HeapObject* obj, ObjectVisitor* v) { |
| 372 int mode_mask = RelocInfo::kCodeTargetMask | | 375 int mode_mask = RelocInfo::kCodeTargetMask | |
| 373 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 376 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 609 |
| 607 template <typename ObjectVisitor> | 610 template <typename ObjectVisitor> |
| 608 void HeapObject::IterateBodyFast(InstanceType type, int object_size, | 611 void HeapObject::IterateBodyFast(InstanceType type, int object_size, |
| 609 ObjectVisitor* v) { | 612 ObjectVisitor* v) { |
| 610 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); | 613 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); |
| 611 } | 614 } |
| 612 } // namespace internal | 615 } // namespace internal |
| 613 } // namespace v8 | 616 } // namespace v8 |
| 614 | 617 |
| 615 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 618 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
| OLD | NEW |