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