| 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 return value; \ | 1587 return value; \ |
| 1588 } \ | 1588 } \ |
| 1589 \ | 1589 \ |
| 1590 void type::set_lane(int lane, lane_type value) { \ | 1590 void type::set_lane(int lane, lane_type value) { \ |
| 1591 DCHECK(lane < lane_count && lane >= 0); \ | 1591 DCHECK(lane < lane_count && lane >= 0); \ |
| 1592 SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \ | 1592 SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \ |
| 1593 } | 1593 } |
| 1594 | 1594 |
| 1595 SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize) | 1595 SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize) |
| 1596 SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size) | 1596 SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size) |
| 1597 SIMD128_NUMERIC_LANE_FNS(Uint32x4, uint32_t, 4, UINT32, kInt32Size) |
| 1597 SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize) | 1598 SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize) |
| 1599 SIMD128_NUMERIC_LANE_FNS(Uint16x8, uint16_t, 8, UINT16, kShortSize) |
| 1598 SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize) | 1600 SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize) |
| 1601 SIMD128_NUMERIC_LANE_FNS(Uint8x16, uint8_t, 16, UINT8, kCharSize) |
| 1599 #undef SIMD128_NUMERIC_LANE_FNS | 1602 #undef SIMD128_NUMERIC_LANE_FNS |
| 1600 | 1603 |
| 1601 | 1604 |
| 1602 #define SIMD128_BOOLEAN_LANE_FNS(type, lane_type, lane_count, field_type, \ | 1605 #define SIMD128_BOOLEAN_LANE_FNS(type, lane_type, lane_count, field_type, \ |
| 1603 field_size) \ | 1606 field_size) \ |
| 1604 bool type::get_lane(int lane) const { \ | 1607 bool type::get_lane(int lane) const { \ |
| 1605 DCHECK(lane < lane_count && lane >= 0); \ | 1608 DCHECK(lane < lane_count && lane >= 0); \ |
| 1606 SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \ | 1609 SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \ |
| 1607 DCHECK(value == 0 || value == -1); \ | 1610 DCHECK(value == 0 || value == -1); \ |
| 1608 return value != 0; \ | 1611 return value != 0; \ |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3308 CAST_ACCESSOR(SeqString) | 3311 CAST_ACCESSOR(SeqString) |
| 3309 CAST_ACCESSOR(SeqTwoByteString) | 3312 CAST_ACCESSOR(SeqTwoByteString) |
| 3310 CAST_ACCESSOR(SharedFunctionInfo) | 3313 CAST_ACCESSOR(SharedFunctionInfo) |
| 3311 CAST_ACCESSOR(Simd128Value) | 3314 CAST_ACCESSOR(Simd128Value) |
| 3312 CAST_ACCESSOR(SlicedString) | 3315 CAST_ACCESSOR(SlicedString) |
| 3313 CAST_ACCESSOR(Smi) | 3316 CAST_ACCESSOR(Smi) |
| 3314 CAST_ACCESSOR(String) | 3317 CAST_ACCESSOR(String) |
| 3315 CAST_ACCESSOR(StringTable) | 3318 CAST_ACCESSOR(StringTable) |
| 3316 CAST_ACCESSOR(Struct) | 3319 CAST_ACCESSOR(Struct) |
| 3317 CAST_ACCESSOR(Symbol) | 3320 CAST_ACCESSOR(Symbol) |
| 3321 CAST_ACCESSOR(Uint16x8) |
| 3322 CAST_ACCESSOR(Uint32x4) |
| 3323 CAST_ACCESSOR(Uint8x16) |
| 3318 CAST_ACCESSOR(UnseededNumberDictionary) | 3324 CAST_ACCESSOR(UnseededNumberDictionary) |
| 3319 CAST_ACCESSOR(WeakCell) | 3325 CAST_ACCESSOR(WeakCell) |
| 3320 CAST_ACCESSOR(WeakFixedArray) | 3326 CAST_ACCESSOR(WeakFixedArray) |
| 3321 CAST_ACCESSOR(WeakHashTable) | 3327 CAST_ACCESSOR(WeakHashTable) |
| 3322 CAST_ACCESSOR(WeakValueHashTable) | 3328 CAST_ACCESSOR(WeakValueHashTable) |
| 3323 | 3329 |
| 3324 | 3330 |
| 3325 // static | 3331 // static |
| 3326 template <class Traits> | 3332 template <class Traits> |
| 3327 STATIC_CONST_MEMBER_DEFINITION const InstanceType | 3333 STATIC_CONST_MEMBER_DEFINITION const InstanceType |
| (...skipping 4503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7831 #undef READ_INT64_FIELD | 7837 #undef READ_INT64_FIELD |
| 7832 #undef WRITE_INT64_FIELD | 7838 #undef WRITE_INT64_FIELD |
| 7833 #undef READ_BYTE_FIELD | 7839 #undef READ_BYTE_FIELD |
| 7834 #undef WRITE_BYTE_FIELD | 7840 #undef WRITE_BYTE_FIELD |
| 7835 #undef NOBARRIER_READ_BYTE_FIELD | 7841 #undef NOBARRIER_READ_BYTE_FIELD |
| 7836 #undef NOBARRIER_WRITE_BYTE_FIELD | 7842 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7837 | 7843 |
| 7838 } } // namespace v8::internal | 7844 } } // namespace v8::internal |
| 7839 | 7845 |
| 7840 #endif // V8_OBJECTS_INL_H_ | 7846 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |