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

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

Issue 2080243003: Use instance type in Object.prototype.toString(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO comment about checking IsArray() before reading toStringTag. Created 4 years, 6 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 449 }
450 450
451 switch (type) { 451 switch (type) {
452 case FIXED_ARRAY_TYPE: 452 case FIXED_ARRAY_TYPE:
453 return Op::template apply<FixedArray::BodyDescriptor>(p1, p2, p3); 453 return Op::template apply<FixedArray::BodyDescriptor>(p1, p2, p3);
454 case FIXED_DOUBLE_ARRAY_TYPE: 454 case FIXED_DOUBLE_ARRAY_TYPE:
455 return ReturnType(); 455 return ReturnType();
456 case TRANSITION_ARRAY_TYPE: 456 case TRANSITION_ARRAY_TYPE:
457 return Op::template apply<TransitionArray::BodyDescriptor>(p1, p2, p3); 457 return Op::template apply<TransitionArray::BodyDescriptor>(p1, p2, p3);
458 case JS_OBJECT_TYPE: 458 case JS_OBJECT_TYPE:
459 case JS_ERROR_TYPE:
460 case JS_ARGUMENTS_TYPE:
459 case JS_PROMISE_TYPE: 461 case JS_PROMISE_TYPE:
460 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 462 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
461 case JS_GENERATOR_OBJECT_TYPE: 463 case JS_GENERATOR_OBJECT_TYPE:
462 case JS_MODULE_TYPE: 464 case JS_MODULE_TYPE:
463 case JS_VALUE_TYPE: 465 case JS_VALUE_TYPE:
464 case JS_DATE_TYPE: 466 case JS_DATE_TYPE:
465 case JS_ARRAY_TYPE: 467 case JS_ARRAY_TYPE:
466 case JS_TYPED_ARRAY_TYPE: 468 case JS_TYPED_ARRAY_TYPE:
467 case JS_DATA_VIEW_TYPE: 469 case JS_DATA_VIEW_TYPE:
468 case JS_SET_TYPE: 470 case JS_SET_TYPE:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 564
563 template <typename ObjectVisitor> 565 template <typename ObjectVisitor>
564 void HeapObject::IterateBodyFast(InstanceType type, int object_size, 566 void HeapObject::IterateBodyFast(InstanceType type, int object_size,
565 ObjectVisitor* v) { 567 ObjectVisitor* v) {
566 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v); 568 BodyDescriptorApply<CallIterateBody, void>(type, this, object_size, v);
567 } 569 }
568 } // namespace internal 570 } // namespace internal
569 } // namespace v8 571 } // namespace v8
570 572
571 #endif // V8_OBJECTS_BODY_DESCRIPTORS_INL_H_ 573 #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