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

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

Issue 2632503003: [runtime] Allocate space for computed property names (Closed)
Patch Set: Comments and reorder. 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/parsing/parser-base.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 bool HeapObject::IsFixedArrayBase() const { 188 bool HeapObject::IsFixedArrayBase() const {
189 return IsFixedArray() || IsFixedDoubleArray() || IsFixedTypedArrayBase(); 189 return IsFixedArray() || IsFixedDoubleArray() || IsFixedTypedArrayBase();
190 } 190 }
191 191
192 bool HeapObject::IsFixedArray() const { 192 bool HeapObject::IsFixedArray() const {
193 InstanceType instance_type = map()->instance_type(); 193 InstanceType instance_type = map()->instance_type();
194 return instance_type == FIXED_ARRAY_TYPE || 194 return instance_type == FIXED_ARRAY_TYPE ||
195 instance_type == TRANSITION_ARRAY_TYPE; 195 instance_type == TRANSITION_ARRAY_TYPE;
196 } 196 }
197 197
198 bool HeapObject::IsBoilerplateDescription() const { return IsFixedArray(); }
199
198 // External objects are not extensible, so the map check is enough. 200 // External objects are not extensible, so the map check is enough.
199 bool HeapObject::IsExternal() const { 201 bool HeapObject::IsExternal() const {
200 return map() == GetHeap()->external_map(); 202 return map() == GetHeap()->external_map();
201 } 203 }
202 204
203 #define SIMD128_TYPE_CHECKER(TYPE, Type, type, lane_count, lane_type) \ 205 #define SIMD128_TYPE_CHECKER(TYPE, Type, type, lane_count, lane_type) \
204 bool HeapObject::Is##Type() const { return map() == GetHeap()->type##_map(); } 206 bool HeapObject::Is##Type() const { return map() == GetHeap()->type##_map(); }
205 SIMD128_TYPES(SIMD128_TYPE_CHECKER) 207 SIMD128_TYPES(SIMD128_TYPE_CHECKER)
206 #undef SIMD128_TYPE_CHECKER 208 #undef SIMD128_TYPE_CHECKER
207 209
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 SLOW_DCHECK(object->Is##type()); \ 604 SLOW_DCHECK(object->Is##type()); \
603 return reinterpret_cast<type*>(object); \ 605 return reinterpret_cast<type*>(object); \
604 } \ 606 } \
605 const type* type::cast(const Object* object) { \ 607 const type* type::cast(const Object* object) { \
606 SLOW_DCHECK(object->Is##type()); \ 608 SLOW_DCHECK(object->Is##type()); \
607 return reinterpret_cast<const type*>(object); \ 609 return reinterpret_cast<const type*>(object); \
608 } 610 }
609 611
610 CAST_ACCESSOR(AbstractCode) 612 CAST_ACCESSOR(AbstractCode)
611 CAST_ACCESSOR(ArrayList) 613 CAST_ACCESSOR(ArrayList)
614 CAST_ACCESSOR(BoilerplateDescription)
612 CAST_ACCESSOR(Bool16x8) 615 CAST_ACCESSOR(Bool16x8)
613 CAST_ACCESSOR(Bool32x4) 616 CAST_ACCESSOR(Bool32x4)
614 CAST_ACCESSOR(Bool8x16) 617 CAST_ACCESSOR(Bool8x16)
615 CAST_ACCESSOR(ByteArray) 618 CAST_ACCESSOR(ByteArray)
616 CAST_ACCESSOR(BytecodeArray) 619 CAST_ACCESSOR(BytecodeArray)
617 CAST_ACCESSOR(Cell) 620 CAST_ACCESSOR(Cell)
618 CAST_ACCESSOR(Code) 621 CAST_ACCESSOR(Code)
619 CAST_ACCESSOR(CodeCacheHashTable) 622 CAST_ACCESSOR(CodeCacheHashTable)
620 CAST_ACCESSOR(CompilationCacheTable) 623 CAST_ACCESSOR(CompilationCacheTable)
621 CAST_ACCESSOR(ConsString) 624 CAST_ACCESSOR(ConsString)
(...skipping 7779 matching lines...) Expand 10 before | Expand all | Expand 10 after
8401 #undef WRITE_INT64_FIELD 8404 #undef WRITE_INT64_FIELD
8402 #undef READ_BYTE_FIELD 8405 #undef READ_BYTE_FIELD
8403 #undef WRITE_BYTE_FIELD 8406 #undef WRITE_BYTE_FIELD
8404 #undef NOBARRIER_READ_BYTE_FIELD 8407 #undef NOBARRIER_READ_BYTE_FIELD
8405 #undef NOBARRIER_WRITE_BYTE_FIELD 8408 #undef NOBARRIER_WRITE_BYTE_FIELD
8406 8409
8407 } // namespace internal 8410 } // namespace internal
8408 } // namespace v8 8411 } // namespace v8
8409 8412
8410 #endif // V8_OBJECTS_INL_H_ 8413 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698