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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 return value; \ | 1584 return value; \ |
1585 } \ | 1585 } \ |
1586 \ | 1586 \ |
1587 void type::set_lane(int lane, lane_type value) { \ | 1587 void type::set_lane(int lane, lane_type value) { \ |
1588 DCHECK(lane < lane_count && lane >= 0); \ | 1588 DCHECK(lane < lane_count && lane >= 0); \ |
1589 SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \ | 1589 SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \ |
1590 } | 1590 } |
1591 | 1591 |
1592 SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize) | 1592 SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize) |
1593 SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size) | 1593 SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size) |
| 1594 SIMD128_NUMERIC_LANE_FNS(Uint32x4, uint32_t, 4, UINT32, kInt32Size) |
1594 SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize) | 1595 SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize) |
| 1596 SIMD128_NUMERIC_LANE_FNS(Uint16x8, uint16_t, 8, UINT16, kShortSize) |
1595 SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize) | 1597 SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize) |
| 1598 SIMD128_NUMERIC_LANE_FNS(Uint8x16, uint8_t, 16, UINT8, kCharSize) |
1596 #undef SIMD128_NUMERIC_LANE_FNS | 1599 #undef SIMD128_NUMERIC_LANE_FNS |
1597 | 1600 |
1598 | 1601 |
1599 #define SIMD128_BOOLEAN_LANE_FNS(type, lane_type, lane_count, field_type, \ | 1602 #define SIMD128_BOOLEAN_LANE_FNS(type, lane_type, lane_count, field_type, \ |
1600 field_size) \ | 1603 field_size) \ |
1601 bool type::get_lane(int lane) const { \ | 1604 bool type::get_lane(int lane) const { \ |
1602 DCHECK(lane < lane_count && lane >= 0); \ | 1605 DCHECK(lane < lane_count && lane >= 0); \ |
1603 SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \ | 1606 SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \ |
1604 DCHECK(value == 0 || value == -1); \ | 1607 DCHECK(value == 0 || value == -1); \ |
1605 return value != 0; \ | 1608 return value != 0; \ |
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 CAST_ACCESSOR(SeqString) | 3323 CAST_ACCESSOR(SeqString) |
3321 CAST_ACCESSOR(SeqTwoByteString) | 3324 CAST_ACCESSOR(SeqTwoByteString) |
3322 CAST_ACCESSOR(SharedFunctionInfo) | 3325 CAST_ACCESSOR(SharedFunctionInfo) |
3323 CAST_ACCESSOR(Simd128Value) | 3326 CAST_ACCESSOR(Simd128Value) |
3324 CAST_ACCESSOR(SlicedString) | 3327 CAST_ACCESSOR(SlicedString) |
3325 CAST_ACCESSOR(Smi) | 3328 CAST_ACCESSOR(Smi) |
3326 CAST_ACCESSOR(String) | 3329 CAST_ACCESSOR(String) |
3327 CAST_ACCESSOR(StringTable) | 3330 CAST_ACCESSOR(StringTable) |
3328 CAST_ACCESSOR(Struct) | 3331 CAST_ACCESSOR(Struct) |
3329 CAST_ACCESSOR(Symbol) | 3332 CAST_ACCESSOR(Symbol) |
| 3333 CAST_ACCESSOR(Uint16x8) |
| 3334 CAST_ACCESSOR(Uint32x4) |
| 3335 CAST_ACCESSOR(Uint8x16) |
3330 CAST_ACCESSOR(UnseededNumberDictionary) | 3336 CAST_ACCESSOR(UnseededNumberDictionary) |
3331 CAST_ACCESSOR(WeakCell) | 3337 CAST_ACCESSOR(WeakCell) |
3332 CAST_ACCESSOR(WeakFixedArray) | 3338 CAST_ACCESSOR(WeakFixedArray) |
3333 CAST_ACCESSOR(WeakHashTable) | 3339 CAST_ACCESSOR(WeakHashTable) |
3334 | 3340 |
3335 | 3341 |
3336 // static | 3342 // static |
3337 template <class Traits> | 3343 template <class Traits> |
3338 STATIC_CONST_MEMBER_DEFINITION const InstanceType | 3344 STATIC_CONST_MEMBER_DEFINITION const InstanceType |
3339 FixedTypedArray<Traits>::kInstanceType; | 3345 FixedTypedArray<Traits>::kInstanceType; |
(...skipping 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7852 #undef READ_INT64_FIELD | 7858 #undef READ_INT64_FIELD |
7853 #undef WRITE_INT64_FIELD | 7859 #undef WRITE_INT64_FIELD |
7854 #undef READ_BYTE_FIELD | 7860 #undef READ_BYTE_FIELD |
7855 #undef WRITE_BYTE_FIELD | 7861 #undef WRITE_BYTE_FIELD |
7856 #undef NOBARRIER_READ_BYTE_FIELD | 7862 #undef NOBARRIER_READ_BYTE_FIELD |
7857 #undef NOBARRIER_WRITE_BYTE_FIELD | 7863 #undef NOBARRIER_WRITE_BYTE_FIELD |
7858 | 7864 |
7859 } } // namespace v8::internal | 7865 } } // namespace v8::internal |
7860 | 7866 |
7861 #endif // V8_OBJECTS_INL_H_ | 7867 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |