Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: src/objects-body-descriptors-inl.h

Issue 2627783006: Version 5.7.442.2 (cherry-pick) (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
445 case kSlicedStringTag: 443 case kSlicedStringTag:
446 return Op::template apply<SlicedString::BodyDescriptor>(p1, p2, p3); 444 return Op::template apply<SlicedString::BodyDescriptor>(p1, p2, p3);
447 case kExternalStringTag: 445 case kExternalStringTag:
448 if ((type & kStringEncodingMask) == kOneByteStringTag) { 446 if ((type & kStringEncodingMask) == kOneByteStringTag) {
449 return Op::template apply<ExternalOneByteString::BodyDescriptor>( 447 return Op::template apply<ExternalOneByteString::BodyDescriptor>(
450 p1, p2, p3); 448 p1, p2, p3);
451 } else { 449 } else {
452 return Op::template apply<ExternalTwoByteString::BodyDescriptor>( 450 return Op::template apply<ExternalTwoByteString::BodyDescriptor>(
453 p1, p2, p3); 451 p1, p2, p3);
454 } 452 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698