| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 == | 363 STATIC_ASSERT(kTypeFeedbackInfoOffset + kPointerSize == |
| 364 kProtectedInstructionOffset); | |
| 365 STATIC_ASSERT(kProtectedInstructionOffset + kPointerSize == | |
| 366 kNextCodeLinkOffset); | 364 kNextCodeLinkOffset); |
| 367 | 365 |
| 368 static bool IsValidSlot(HeapObject* obj, int offset) { | 366 static bool IsValidSlot(HeapObject* obj, int offset) { |
| 369 // Slots in code can't be invalid because we never trim code objects. | 367 // Slots in code can't be invalid because we never trim code objects. |
| 370 return true; | 368 return true; |
| 371 } | 369 } |
| 372 | 370 |
| 373 template <typename ObjectVisitor> | 371 template <typename ObjectVisitor> |
| 374 static inline void IterateBody(HeapObject* obj, ObjectVisitor* v) { | 372 static inline void IterateBody(HeapObject* obj, ObjectVisitor* v) { |
| 375 int mode_mask = RelocInfo::kCodeTargetMask | | 373 int mode_mask = RelocInfo::kCodeTargetMask | |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 | 610 |
| 613 template <typename ObjectVisitor> | 611 template <typename ObjectVisitor> |
| 614 void HeapObject::IterateBodyFast(InstanceType type, int object_size, | 612 void HeapObject::IterateBodyFast(InstanceType type, int object_size, |
| 615 ObjectVisitor* v) { | 613 ObjectVisitor* v) { |
| 616 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); | 614 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); |
| 617 } | 615 } |
| 618 } // namespace internal | 616 } // namespace internal |
| 619 } // namespace v8 | 617 } // namespace v8 |
| 620 | 618 |
| 621 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 619 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
| OLD | NEW |