| OLD | NEW |
| 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 Loading... |
| 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::IsConstantProperties() 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 CAST_ACCESSOR(Bool16x8) | 614 CAST_ACCESSOR(Bool16x8) |
| 613 CAST_ACCESSOR(Bool32x4) | 615 CAST_ACCESSOR(Bool32x4) |
| 614 CAST_ACCESSOR(Bool8x16) | 616 CAST_ACCESSOR(Bool8x16) |
| 615 CAST_ACCESSOR(ByteArray) | 617 CAST_ACCESSOR(ByteArray) |
| 616 CAST_ACCESSOR(BytecodeArray) | 618 CAST_ACCESSOR(BytecodeArray) |
| 617 CAST_ACCESSOR(Cell) | 619 CAST_ACCESSOR(Cell) |
| 618 CAST_ACCESSOR(Code) | 620 CAST_ACCESSOR(Code) |
| 619 CAST_ACCESSOR(CodeCacheHashTable) | 621 CAST_ACCESSOR(CodeCacheHashTable) |
| 620 CAST_ACCESSOR(CompilationCacheTable) | 622 CAST_ACCESSOR(CompilationCacheTable) |
| 621 CAST_ACCESSOR(ConsString) | 623 CAST_ACCESSOR(ConsString) |
| 624 CAST_ACCESSOR(ConstantProperties) |
| 622 CAST_ACCESSOR(DeoptimizationInputData) | 625 CAST_ACCESSOR(DeoptimizationInputData) |
| 623 CAST_ACCESSOR(DeoptimizationOutputData) | 626 CAST_ACCESSOR(DeoptimizationOutputData) |
| 624 CAST_ACCESSOR(DependentCode) | 627 CAST_ACCESSOR(DependentCode) |
| 625 CAST_ACCESSOR(DescriptorArray) | 628 CAST_ACCESSOR(DescriptorArray) |
| 626 CAST_ACCESSOR(ExternalOneByteString) | 629 CAST_ACCESSOR(ExternalOneByteString) |
| 627 CAST_ACCESSOR(ExternalString) | 630 CAST_ACCESSOR(ExternalString) |
| 628 CAST_ACCESSOR(ExternalTwoByteString) | 631 CAST_ACCESSOR(ExternalTwoByteString) |
| 629 CAST_ACCESSOR(FixedArray) | 632 CAST_ACCESSOR(FixedArray) |
| 630 CAST_ACCESSOR(FixedArrayBase) | 633 CAST_ACCESSOR(FixedArrayBase) |
| 631 CAST_ACCESSOR(FixedDoubleArray) | 634 CAST_ACCESSOR(FixedDoubleArray) |
| (...skipping 7778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8410 #undef WRITE_INT64_FIELD | 8413 #undef WRITE_INT64_FIELD |
| 8411 #undef READ_BYTE_FIELD | 8414 #undef READ_BYTE_FIELD |
| 8412 #undef WRITE_BYTE_FIELD | 8415 #undef WRITE_BYTE_FIELD |
| 8413 #undef NOBARRIER_READ_BYTE_FIELD | 8416 #undef NOBARRIER_READ_BYTE_FIELD |
| 8414 #undef NOBARRIER_WRITE_BYTE_FIELD | 8417 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8415 | 8418 |
| 8416 } // namespace internal | 8419 } // namespace internal |
| 8417 } // namespace v8 | 8420 } // namespace v8 |
| 8418 | 8421 |
| 8419 #endif // V8_OBJECTS_INL_H_ | 8422 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |