| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 430 |
| 431 template <typename Op, typename ReturnType, typename T1, typename T2, | 431 template <typename Op, typename ReturnType, typename T1, typename T2, |
| 432 typename T3> | 432 typename T3> |
| 433 ReturnType BodyDescriptorApply(InstanceType type, T1 p1, T2 p2, T3 p3) { | 433 ReturnType BodyDescriptorApply(InstanceType type, T1 p1, T2 p2, T3 p3) { |
| 434 if (type < FIRST_NONSTRING_TYPE) { | 434 if (type < FIRST_NONSTRING_TYPE) { |
| 435 switch (type & kStringRepresentationMask) { | 435 switch (type & kStringRepresentationMask) { |
| 436 case kSeqStringTag: | 436 case kSeqStringTag: |
| 437 return ReturnType(); | 437 return ReturnType(); |
| 438 case kConsStringTag: | 438 case kConsStringTag: |
| 439 return Op::template apply<ConsString::BodyDescriptor>(p1, p2, p3); | 439 return Op::template apply<ConsString::BodyDescriptor>(p1, p2, p3); |
| 440 case kThinStringTag: |
| 441 return Op::template apply<ThinString::BodyDescriptor>(p1, p2, p3); |
| 440 case kSlicedStringTag: | 442 case kSlicedStringTag: |
| 441 return Op::template apply<SlicedString::BodyDescriptor>(p1, p2, p3); | 443 return Op::template apply<SlicedString::BodyDescriptor>(p1, p2, p3); |
| 442 case kExternalStringTag: | 444 case kExternalStringTag: |
| 443 if ((type & kStringEncodingMask) == kOneByteStringTag) { | 445 if ((type & kStringEncodingMask) == kOneByteStringTag) { |
| 444 return Op::template apply<ExternalOneByteString::BodyDescriptor>( | 446 return Op::template apply<ExternalOneByteString::BodyDescriptor>( |
| 445 p1, p2, p3); | 447 p1, p2, p3); |
| 446 } else { | 448 } else { |
| 447 return Op::template apply<ExternalTwoByteString::BodyDescriptor>( | 449 return Op::template apply<ExternalTwoByteString::BodyDescriptor>( |
| 448 p1, p2, p3); | 450 p1, p2, p3); |
| 449 } | 451 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 | 608 |
| 607 template <typename ObjectVisitor> | 609 template <typename ObjectVisitor> |
| 608 void HeapObject::IterateBodyFast(InstanceType type, int object_size, | 610 void HeapObject::IterateBodyFast(InstanceType type, int object_size, |
| 609 ObjectVisitor* v) { | 611 ObjectVisitor* v) { |
| 610 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); | 612 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); |
| 611 } | 613 } |
| 612 } // namespace internal | 614 } // namespace internal |
| 613 } // namespace v8 | 615 } // namespace v8 |
| 614 | 616 |
| 615 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ | 617 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ |
| OLD | NEW |