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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 | 162 |
163 | 163 |
164 bool Object::IsHeapObject() const { | 164 bool Object::IsHeapObject() const { |
165 return Internals::HasHeapObjectTag(this); | 165 return Internals::HasHeapObjectTag(this); |
166 } | 166 } |
167 | 167 |
168 | 168 |
169 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) | 169 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) |
170 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) | 170 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) |
| 171 TYPE_CHECKER(Symbol, SYMBOL_TYPE) |
| 172 |
| 173 |
| 174 bool Object::IsSimd128Value() const { |
| 175 if (!Object::IsHeapObject()) return false; |
| 176 InstanceType instance_type = HeapObject::cast(this)->map()->instance_type(); |
| 177 return (instance_type >= FIRST_SIMD_VALUE_TYPE && |
| 178 instance_type <= LAST_SIMD_VALUE_TYPE); |
| 179 } |
| 180 |
| 181 |
171 TYPE_CHECKER(Float32x4, FLOAT32X4_TYPE) | 182 TYPE_CHECKER(Float32x4, FLOAT32X4_TYPE) |
172 TYPE_CHECKER(Symbol, SYMBOL_TYPE) | 183 TYPE_CHECKER(Int32x4, INT32X4_TYPE) |
| 184 TYPE_CHECKER(Bool32x4, BOOL32X4_TYPE) |
| 185 TYPE_CHECKER(Int16x8, INT16X8_TYPE) |
| 186 TYPE_CHECKER(Bool16x8, BOOL16X8_TYPE) |
| 187 TYPE_CHECKER(Int8x16, INT8X16_TYPE) |
| 188 TYPE_CHECKER(Bool8x16, BOOL8X16_TYPE) |
173 | 189 |
174 | 190 |
175 bool Object::IsString() const { | 191 bool Object::IsString() const { |
176 return Object::IsHeapObject() | 192 return Object::IsHeapObject() |
177 && HeapObject::cast(this)->map()->instance_type() < FIRST_NONSTRING_TYPE; | 193 && HeapObject::cast(this)->map()->instance_type() < FIRST_NONSTRING_TYPE; |
178 } | 194 } |
179 | 195 |
180 | 196 |
181 bool Object::IsName() const { | 197 bool Object::IsName() const { |
182 return IsString() || IsSymbol(); | 198 return IsString() || IsSymbol(); |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 | 1252 |
1237 #define WRITE_INT_FIELD(p, offset, value) \ | 1253 #define WRITE_INT_FIELD(p, offset, value) \ |
1238 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value) | 1254 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value) |
1239 | 1255 |
1240 #define READ_INTPTR_FIELD(p, offset) \ | 1256 #define READ_INTPTR_FIELD(p, offset) \ |
1241 (*reinterpret_cast<const intptr_t*>(FIELD_ADDR_CONST(p, offset))) | 1257 (*reinterpret_cast<const intptr_t*>(FIELD_ADDR_CONST(p, offset))) |
1242 | 1258 |
1243 #define WRITE_INTPTR_FIELD(p, offset, value) \ | 1259 #define WRITE_INTPTR_FIELD(p, offset, value) \ |
1244 (*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)) = value) | 1260 (*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)) = value) |
1245 | 1261 |
| 1262 #define READ_UINT16_FIELD(p, offset) \ |
| 1263 (*reinterpret_cast<const uint16_t*>(FIELD_ADDR_CONST(p, offset))) |
| 1264 |
| 1265 #define WRITE_UINT16_FIELD(p, offset, value) \ |
| 1266 (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value) |
| 1267 |
| 1268 #define READ_INT16_FIELD(p, offset) \ |
| 1269 (*reinterpret_cast<const int16_t*>(FIELD_ADDR_CONST(p, offset))) |
| 1270 |
| 1271 #define WRITE_INT16_FIELD(p, offset, value) \ |
| 1272 (*reinterpret_cast<int16_t*>(FIELD_ADDR(p, offset)) = value) |
| 1273 |
1246 #define READ_UINT32_FIELD(p, offset) \ | 1274 #define READ_UINT32_FIELD(p, offset) \ |
1247 (*reinterpret_cast<const uint32_t*>(FIELD_ADDR_CONST(p, offset))) | 1275 (*reinterpret_cast<const uint32_t*>(FIELD_ADDR_CONST(p, offset))) |
1248 | 1276 |
1249 #define WRITE_UINT32_FIELD(p, offset, value) \ | 1277 #define WRITE_UINT32_FIELD(p, offset, value) \ |
1250 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value) | 1278 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value) |
1251 | 1279 |
1252 #define READ_INT32_FIELD(p, offset) \ | 1280 #define READ_INT32_FIELD(p, offset) \ |
1253 (*reinterpret_cast<const int32_t*>(FIELD_ADDR_CONST(p, offset))) | 1281 (*reinterpret_cast<const int32_t*>(FIELD_ADDR_CONST(p, offset))) |
1254 | 1282 |
1255 #define WRITE_INT32_FIELD(p, offset, value) \ | 1283 #define WRITE_INT32_FIELD(p, offset, value) \ |
(...skipping 10 matching lines...) Expand all Loading... |
1266 | 1294 |
1267 #define WRITE_UINT64_FIELD(p, offset, value) \ | 1295 #define WRITE_UINT64_FIELD(p, offset, value) \ |
1268 (*reinterpret_cast<uint64_t*>(FIELD_ADDR(p, offset)) = value) | 1296 (*reinterpret_cast<uint64_t*>(FIELD_ADDR(p, offset)) = value) |
1269 | 1297 |
1270 #define READ_INT64_FIELD(p, offset) \ | 1298 #define READ_INT64_FIELD(p, offset) \ |
1271 (*reinterpret_cast<const int64_t*>(FIELD_ADDR_CONST(p, offset))) | 1299 (*reinterpret_cast<const int64_t*>(FIELD_ADDR_CONST(p, offset))) |
1272 | 1300 |
1273 #define WRITE_INT64_FIELD(p, offset, value) \ | 1301 #define WRITE_INT64_FIELD(p, offset, value) \ |
1274 (*reinterpret_cast<int64_t*>(FIELD_ADDR(p, offset)) = value) | 1302 (*reinterpret_cast<int64_t*>(FIELD_ADDR(p, offset)) = value) |
1275 | 1303 |
1276 #define READ_SHORT_FIELD(p, offset) \ | |
1277 (*reinterpret_cast<const uint16_t*>(FIELD_ADDR_CONST(p, offset))) | |
1278 | |
1279 #define WRITE_SHORT_FIELD(p, offset, value) \ | |
1280 (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value) | |
1281 | |
1282 #define READ_BYTE_FIELD(p, offset) \ | 1304 #define READ_BYTE_FIELD(p, offset) \ |
1283 (*reinterpret_cast<const byte*>(FIELD_ADDR_CONST(p, offset))) | 1305 (*reinterpret_cast<const byte*>(FIELD_ADDR_CONST(p, offset))) |
1284 | 1306 |
1285 #define NOBARRIER_READ_BYTE_FIELD(p, offset) \ | 1307 #define NOBARRIER_READ_BYTE_FIELD(p, offset) \ |
1286 static_cast<byte>(base::NoBarrier_Load( \ | 1308 static_cast<byte>(base::NoBarrier_Load( \ |
1287 reinterpret_cast<base::Atomic8*>(FIELD_ADDR(p, offset)))) | 1309 reinterpret_cast<base::Atomic8*>(FIELD_ADDR(p, offset)))) |
1288 | 1310 |
1289 #define WRITE_BYTE_FIELD(p, offset, value) \ | 1311 #define WRITE_BYTE_FIELD(p, offset, value) \ |
1290 (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value) | 1312 (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value) |
1291 | 1313 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 #if defined(V8_TARGET_LITTLE_ENDIAN) | 1575 #if defined(V8_TARGET_LITTLE_ENDIAN) |
1554 WRITE_FLOAT_FIELD(this, kValueOffset + lane * kFloatSize, value); | 1576 WRITE_FLOAT_FIELD(this, kValueOffset + lane * kFloatSize, value); |
1555 #elif defined(V8_TARGET_BIG_ENDIAN) | 1577 #elif defined(V8_TARGET_BIG_ENDIAN) |
1556 WRITE_FLOAT_FIELD(this, kValueOffset + (3 - lane) * kFloatSize, value); | 1578 WRITE_FLOAT_FIELD(this, kValueOffset + (3 - lane) * kFloatSize, value); |
1557 #else | 1579 #else |
1558 #error Unknown byte ordering | 1580 #error Unknown byte ordering |
1559 #endif | 1581 #endif |
1560 } | 1582 } |
1561 | 1583 |
1562 | 1584 |
| 1585 int32_t Int32x4::get_lane(int lane) const { |
| 1586 DCHECK(lane < 4 && lane >= 0); |
| 1587 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1588 return READ_INT32_FIELD(this, kValueOffset + lane * kInt32Size); |
| 1589 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1590 return READ_INT32_FIELD(this, kValueOffset + (3 - lane) * kInt32Size); |
| 1591 #else |
| 1592 #error Unknown byte ordering |
| 1593 #endif |
| 1594 } |
| 1595 |
| 1596 |
| 1597 void Int32x4::set_lane(int lane, int32_t value) { |
| 1598 DCHECK(lane < 4 && lane >= 0); |
| 1599 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1600 WRITE_INT32_FIELD(this, kValueOffset + lane * kInt32Size, value); |
| 1601 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1602 WRITE_INT32_FIELD(this, kValueOffset + (3 - lane) * kInt32Size, value); |
| 1603 #else |
| 1604 #error Unknown byte ordering |
| 1605 #endif |
| 1606 } |
| 1607 |
| 1608 |
| 1609 bool Bool32x4::get_lane(int lane) const { |
| 1610 DCHECK(lane < 4 && lane >= 0); |
| 1611 int32_t value; |
| 1612 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1613 value = READ_INT32_FIELD(this, kValueOffset + lane * kInt32Size); |
| 1614 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1615 value = READ_INT32_FIELD(this, kValueOffset + (3 - lane) * kInt32Size); |
| 1616 #else |
| 1617 #error Unknown byte ordering |
| 1618 #endif |
| 1619 DCHECK(value == 0 || value == -1); |
| 1620 return value != 0; |
| 1621 } |
| 1622 |
| 1623 |
| 1624 void Bool32x4::set_lane(int lane, bool value) { |
| 1625 DCHECK(lane < 4 && lane >= 0); |
| 1626 int32_t int_val = value ? -1 : 0; |
| 1627 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1628 WRITE_INT32_FIELD(this, kValueOffset + lane * kInt32Size, int_val); |
| 1629 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1630 WRITE_INT32_FIELD(this, kValueOffset + (3 - lane) * kInt32Size, int_val); |
| 1631 #else |
| 1632 #error Unknown byte ordering |
| 1633 #endif |
| 1634 } |
| 1635 |
| 1636 |
| 1637 int16_t Int16x8::get_lane(int lane) const { |
| 1638 DCHECK(lane < 8 && lane >= 0); |
| 1639 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1640 return READ_INT16_FIELD(this, kValueOffset + lane * kShortSize); |
| 1641 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1642 return READ_INT16_FIELD(this, kValueOffset + (7 - lane) * kShortSize); |
| 1643 #else |
| 1644 #error Unknown byte ordering |
| 1645 #endif |
| 1646 } |
| 1647 |
| 1648 |
| 1649 void Int16x8::set_lane(int lane, int16_t value) { |
| 1650 DCHECK(lane < 8 && lane >= 0); |
| 1651 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1652 WRITE_INT16_FIELD(this, kValueOffset + lane * kShortSize, value); |
| 1653 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1654 WRITE_INT16_FIELD(this, kValueOffset + (7 - lane) * kShortSize, value); |
| 1655 #else |
| 1656 #error Unknown byte ordering |
| 1657 #endif |
| 1658 } |
| 1659 |
| 1660 |
| 1661 bool Bool16x8::get_lane(int lane) const { |
| 1662 DCHECK(lane < 8 && lane >= 0); |
| 1663 int16_t value; |
| 1664 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1665 return READ_INT16_FIELD(this, kValueOffset + lane * kShortSize); |
| 1666 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1667 return READ_INT16_FIELD(this, kValueOffset + (7 - lane) * kShortSize); |
| 1668 #else |
| 1669 #error Unknown byte ordering |
| 1670 #endif |
| 1671 DCHECK(value == 0 || value == -1); |
| 1672 return value != 0; |
| 1673 } |
| 1674 |
| 1675 |
| 1676 void Bool16x8::set_lane(int lane, bool value) { |
| 1677 DCHECK(lane < 8 && lane >= 0); |
| 1678 int16_t int_val = value ? -1 : 0; |
| 1679 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1680 WRITE_INT16_FIELD(this, kValueOffset + lane * kShortSize, int_val); |
| 1681 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1682 WRITE_INT16_FIELD(this, kValueOffset + (7 - lane) * kShortSize, int_val); |
| 1683 #else |
| 1684 #error Unknown byte ordering |
| 1685 #endif |
| 1686 } |
| 1687 |
| 1688 |
| 1689 int8_t Int8x16::get_lane(int lane) const { |
| 1690 DCHECK(lane < 16 && lane >= 0); |
| 1691 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1692 return READ_BYTE_FIELD(this, kValueOffset + lane * kCharSize); |
| 1693 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1694 return READ_BYTE_FIELD(this, kValueOffset + (15 - lane) * kCharSize); |
| 1695 #else |
| 1696 #error Unknown byte ordering |
| 1697 #endif |
| 1698 } |
| 1699 |
| 1700 |
| 1701 void Int8x16::set_lane(int lane, int8_t value) { |
| 1702 DCHECK(lane < 16 && lane >= 0); |
| 1703 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1704 WRITE_BYTE_FIELD(this, kValueOffset + lane * kCharSize, value); |
| 1705 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1706 WRITE_BYTE_FIELD(this, kValueOffset + (15 - lane) * kCharSize, value); |
| 1707 #else |
| 1708 #error Unknown byte ordering |
| 1709 #endif |
| 1710 } |
| 1711 |
| 1712 |
| 1713 bool Bool8x16::get_lane(int lane) const { |
| 1714 DCHECK(lane < 16 && lane >= 0); |
| 1715 int8_t value; |
| 1716 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1717 value = READ_BYTE_FIELD(this, kValueOffset + lane * kCharSize); |
| 1718 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1719 value = READ_BYTE_FIELD(this, kValueOffset + (15 - lane) * kCharSize); |
| 1720 #else |
| 1721 #error Unknown byte ordering |
| 1722 #endif |
| 1723 DCHECK(value == 0 || value == -1); |
| 1724 return value != 0; |
| 1725 } |
| 1726 |
| 1727 |
| 1728 void Bool8x16::set_lane(int lane, bool value) { |
| 1729 DCHECK(lane < 16 && lane >= 0); |
| 1730 int8_t int_val = value ? -1 : 0; |
| 1731 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 1732 WRITE_BYTE_FIELD(this, kValueOffset + lane * kCharSize, int_val); |
| 1733 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 1734 WRITE_BYTE_FIELD(this, kValueOffset + (15 - lane) * kCharSize, int_val); |
| 1735 #else |
| 1736 #error Unknown byte ordering |
| 1737 #endif |
| 1738 } |
| 1739 |
| 1740 |
1563 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) | 1741 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) |
1564 | 1742 |
1565 | 1743 |
1566 Object** FixedArray::GetFirstElementAddress() { | 1744 Object** FixedArray::GetFirstElementAddress() { |
1567 return reinterpret_cast<Object**>(FIELD_ADDR(this, OffsetOfElementAt(0))); | 1745 return reinterpret_cast<Object**>(FIELD_ADDR(this, OffsetOfElementAt(0))); |
1568 } | 1746 } |
1569 | 1747 |
1570 | 1748 |
1571 bool FixedArray::ContainsOnlySmisOrHoles() { | 1749 bool FixedArray::ContainsOnlySmisOrHoles() { |
1572 Object* the_hole = GetHeap()->the_hole_value(); | 1750 Object* the_hole = GetHeap()->the_hole_value(); |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 String* str = String::cast(js_value->value()); | 2375 String* str = String::cast(js_value->value()); |
2198 if (index >= static_cast<uint32_t>(str->length())) return false; | 2376 if (index >= static_cast<uint32_t>(str->length())) return false; |
2199 | 2377 |
2200 return true; | 2378 return true; |
2201 } | 2379 } |
2202 | 2380 |
2203 | 2381 |
2204 void Object::VerifyApiCallResultType() { | 2382 void Object::VerifyApiCallResultType() { |
2205 #if DEBUG | 2383 #if DEBUG |
2206 if (!(IsSmi() || IsString() || IsSymbol() || IsSpecObject() || | 2384 if (!(IsSmi() || IsString() || IsSymbol() || IsSpecObject() || |
2207 IsHeapNumber() || IsFloat32x4() || IsUndefined() || IsTrue() || | 2385 IsHeapNumber() || IsSimd128Value() || IsUndefined() || IsTrue() || |
2208 IsFalse() || IsNull())) { | 2386 IsFalse() || IsNull())) { |
2209 FATAL("API call returned invalid object"); | 2387 FATAL("API call returned invalid object"); |
2210 } | 2388 } |
2211 #endif // DEBUG | 2389 #endif // DEBUG |
2212 } | 2390 } |
2213 | 2391 |
2214 | 2392 |
2215 Object* FixedArray::get(int index) const { | 2393 Object* FixedArray::get(int index) const { |
2216 SLOW_DCHECK(index >= 0 && index < this->length()); | 2394 SLOW_DCHECK(index >= 0 && index < this->length()); |
2217 return READ_FIELD(this, kHeaderSize + index * kPointerSize); | 2395 return READ_FIELD(this, kHeaderSize + index * kPointerSize); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 } | 2567 } |
2390 | 2568 |
2391 | 2569 |
2392 AllocationAlignment HeapObject::RequiredAlignment() { | 2570 AllocationAlignment HeapObject::RequiredAlignment() { |
2393 #ifdef V8_HOST_ARCH_32_BIT | 2571 #ifdef V8_HOST_ARCH_32_BIT |
2394 if ((IsFixedFloat64Array() || IsFixedDoubleArray()) && | 2572 if ((IsFixedFloat64Array() || IsFixedDoubleArray()) && |
2395 FixedArrayBase::cast(this)->length() != 0) { | 2573 FixedArrayBase::cast(this)->length() != 0) { |
2396 return kDoubleAligned; | 2574 return kDoubleAligned; |
2397 } | 2575 } |
2398 if (IsHeapNumber()) return kDoubleUnaligned; | 2576 if (IsHeapNumber()) return kDoubleUnaligned; |
2399 if (IsFloat32x4()) return kSimd128Unaligned; | 2577 if (IsSimd128Value()) return kSimd128Unaligned; |
2400 #endif // V8_HOST_ARCH_32_BIT | 2578 #endif // V8_HOST_ARCH_32_BIT |
2401 return kWordAligned; | 2579 return kWordAligned; |
2402 } | 2580 } |
2403 | 2581 |
2404 | 2582 |
2405 void FixedArray::set(int index, | 2583 void FixedArray::set(int index, |
2406 Object* value, | 2584 Object* value, |
2407 WriteBarrierMode mode) { | 2585 WriteBarrierMode mode) { |
2408 DCHECK(map() != GetHeap()->fixed_cow_array_map()); | 2586 DCHECK(map() != GetHeap()->fixed_cow_array_map()); |
2409 DCHECK(index >= 0 && index < this->length()); | 2587 DCHECK(index >= 0 && index < this->length()); |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2901 set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask)); | 3079 set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask)); |
2902 } | 3080 } |
2903 | 3081 |
2904 | 3082 |
2905 // ------------------------------------ | 3083 // ------------------------------------ |
2906 // Cast operations | 3084 // Cast operations |
2907 | 3085 |
2908 | 3086 |
2909 CAST_ACCESSOR(AccessorInfo) | 3087 CAST_ACCESSOR(AccessorInfo) |
2910 CAST_ACCESSOR(ArrayList) | 3088 CAST_ACCESSOR(ArrayList) |
| 3089 CAST_ACCESSOR(Bool16x8) |
| 3090 CAST_ACCESSOR(Bool32x4) |
| 3091 CAST_ACCESSOR(Bool8x16) |
2911 CAST_ACCESSOR(ByteArray) | 3092 CAST_ACCESSOR(ByteArray) |
2912 CAST_ACCESSOR(BytecodeArray) | 3093 CAST_ACCESSOR(BytecodeArray) |
2913 CAST_ACCESSOR(Cell) | 3094 CAST_ACCESSOR(Cell) |
2914 CAST_ACCESSOR(Code) | 3095 CAST_ACCESSOR(Code) |
2915 CAST_ACCESSOR(CodeCacheHashTable) | 3096 CAST_ACCESSOR(CodeCacheHashTable) |
2916 CAST_ACCESSOR(CompilationCacheTable) | 3097 CAST_ACCESSOR(CompilationCacheTable) |
2917 CAST_ACCESSOR(ConsString) | 3098 CAST_ACCESSOR(ConsString) |
2918 CAST_ACCESSOR(DeoptimizationInputData) | 3099 CAST_ACCESSOR(DeoptimizationInputData) |
2919 CAST_ACCESSOR(DeoptimizationOutputData) | 3100 CAST_ACCESSOR(DeoptimizationOutputData) |
2920 CAST_ACCESSOR(DependentCode) | 3101 CAST_ACCESSOR(DependentCode) |
2921 CAST_ACCESSOR(DescriptorArray) | 3102 CAST_ACCESSOR(DescriptorArray) |
2922 CAST_ACCESSOR(ExternalOneByteString) | 3103 CAST_ACCESSOR(ExternalOneByteString) |
2923 CAST_ACCESSOR(ExternalString) | 3104 CAST_ACCESSOR(ExternalString) |
2924 CAST_ACCESSOR(ExternalTwoByteString) | 3105 CAST_ACCESSOR(ExternalTwoByteString) |
2925 CAST_ACCESSOR(FixedArray) | 3106 CAST_ACCESSOR(FixedArray) |
2926 CAST_ACCESSOR(FixedArrayBase) | 3107 CAST_ACCESSOR(FixedArrayBase) |
2927 CAST_ACCESSOR(FixedDoubleArray) | 3108 CAST_ACCESSOR(FixedDoubleArray) |
2928 CAST_ACCESSOR(FixedTypedArrayBase) | 3109 CAST_ACCESSOR(FixedTypedArrayBase) |
2929 CAST_ACCESSOR(Float32x4) | 3110 CAST_ACCESSOR(Float32x4) |
2930 CAST_ACCESSOR(Foreign) | 3111 CAST_ACCESSOR(Foreign) |
2931 CAST_ACCESSOR(GlobalDictionary) | 3112 CAST_ACCESSOR(GlobalDictionary) |
2932 CAST_ACCESSOR(GlobalObject) | 3113 CAST_ACCESSOR(GlobalObject) |
2933 CAST_ACCESSOR(HandlerTable) | 3114 CAST_ACCESSOR(HandlerTable) |
2934 CAST_ACCESSOR(HeapObject) | 3115 CAST_ACCESSOR(HeapObject) |
| 3116 CAST_ACCESSOR(Int16x8) |
| 3117 CAST_ACCESSOR(Int32x4) |
| 3118 CAST_ACCESSOR(Int8x16) |
2935 CAST_ACCESSOR(JSArray) | 3119 CAST_ACCESSOR(JSArray) |
2936 CAST_ACCESSOR(JSArrayBuffer) | 3120 CAST_ACCESSOR(JSArrayBuffer) |
2937 CAST_ACCESSOR(JSArrayBufferView) | 3121 CAST_ACCESSOR(JSArrayBufferView) |
2938 CAST_ACCESSOR(JSBuiltinsObject) | 3122 CAST_ACCESSOR(JSBuiltinsObject) |
2939 CAST_ACCESSOR(JSDataView) | 3123 CAST_ACCESSOR(JSDataView) |
2940 CAST_ACCESSOR(JSDate) | 3124 CAST_ACCESSOR(JSDate) |
2941 CAST_ACCESSOR(JSFunction) | 3125 CAST_ACCESSOR(JSFunction) |
2942 CAST_ACCESSOR(JSFunctionProxy) | 3126 CAST_ACCESSOR(JSFunctionProxy) |
2943 CAST_ACCESSOR(JSFunctionResultCache) | 3127 CAST_ACCESSOR(JSFunctionResultCache) |
2944 CAST_ACCESSOR(JSGeneratorObject) | 3128 CAST_ACCESSOR(JSGeneratorObject) |
(...skipping 24 matching lines...) Expand all Loading... |
2969 CAST_ACCESSOR(OrderedHashMap) | 3153 CAST_ACCESSOR(OrderedHashMap) |
2970 CAST_ACCESSOR(OrderedHashSet) | 3154 CAST_ACCESSOR(OrderedHashSet) |
2971 CAST_ACCESSOR(PolymorphicCodeCacheHashTable) | 3155 CAST_ACCESSOR(PolymorphicCodeCacheHashTable) |
2972 CAST_ACCESSOR(PropertyCell) | 3156 CAST_ACCESSOR(PropertyCell) |
2973 CAST_ACCESSOR(ScopeInfo) | 3157 CAST_ACCESSOR(ScopeInfo) |
2974 CAST_ACCESSOR(SeededNumberDictionary) | 3158 CAST_ACCESSOR(SeededNumberDictionary) |
2975 CAST_ACCESSOR(SeqOneByteString) | 3159 CAST_ACCESSOR(SeqOneByteString) |
2976 CAST_ACCESSOR(SeqString) | 3160 CAST_ACCESSOR(SeqString) |
2977 CAST_ACCESSOR(SeqTwoByteString) | 3161 CAST_ACCESSOR(SeqTwoByteString) |
2978 CAST_ACCESSOR(SharedFunctionInfo) | 3162 CAST_ACCESSOR(SharedFunctionInfo) |
| 3163 CAST_ACCESSOR(Simd128Value) |
2979 CAST_ACCESSOR(SlicedString) | 3164 CAST_ACCESSOR(SlicedString) |
2980 CAST_ACCESSOR(Smi) | 3165 CAST_ACCESSOR(Smi) |
2981 CAST_ACCESSOR(String) | 3166 CAST_ACCESSOR(String) |
2982 CAST_ACCESSOR(StringTable) | 3167 CAST_ACCESSOR(StringTable) |
2983 CAST_ACCESSOR(Struct) | 3168 CAST_ACCESSOR(Struct) |
2984 CAST_ACCESSOR(Symbol) | 3169 CAST_ACCESSOR(Symbol) |
2985 CAST_ACCESSOR(UnseededNumberDictionary) | 3170 CAST_ACCESSOR(UnseededNumberDictionary) |
2986 CAST_ACCESSOR(WeakCell) | 3171 CAST_ACCESSOR(WeakCell) |
2987 CAST_ACCESSOR(WeakFixedArray) | 3172 CAST_ACCESSOR(WeakFixedArray) |
2988 CAST_ACCESSOR(WeakHashTable) | 3173 CAST_ACCESSOR(WeakHashTable) |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3304 } | 3489 } |
3305 | 3490 |
3306 | 3491 |
3307 uc16* SeqTwoByteString::GetChars() { | 3492 uc16* SeqTwoByteString::GetChars() { |
3308 return reinterpret_cast<uc16*>(FIELD_ADDR(this, kHeaderSize)); | 3493 return reinterpret_cast<uc16*>(FIELD_ADDR(this, kHeaderSize)); |
3309 } | 3494 } |
3310 | 3495 |
3311 | 3496 |
3312 uint16_t SeqTwoByteString::SeqTwoByteStringGet(int index) { | 3497 uint16_t SeqTwoByteString::SeqTwoByteStringGet(int index) { |
3313 DCHECK(index >= 0 && index < length()); | 3498 DCHECK(index >= 0 && index < length()); |
3314 return READ_SHORT_FIELD(this, kHeaderSize + index * kShortSize); | 3499 return READ_UINT16_FIELD(this, kHeaderSize + index * kShortSize); |
3315 } | 3500 } |
3316 | 3501 |
3317 | 3502 |
3318 void SeqTwoByteString::SeqTwoByteStringSet(int index, uint16_t value) { | 3503 void SeqTwoByteString::SeqTwoByteStringSet(int index, uint16_t value) { |
3319 DCHECK(index >= 0 && index < length()); | 3504 DCHECK(index >= 0 && index < length()); |
3320 WRITE_SHORT_FIELD(this, kHeaderSize + index * kShortSize, value); | 3505 WRITE_UINT16_FIELD(this, kHeaderSize + index * kShortSize, value); |
3321 } | 3506 } |
3322 | 3507 |
3323 | 3508 |
3324 int SeqTwoByteString::SeqTwoByteStringSize(InstanceType instance_type) { | 3509 int SeqTwoByteString::SeqTwoByteStringSize(InstanceType instance_type) { |
3325 return SizeFor(length()); | 3510 return SizeFor(length()); |
3326 } | 3511 } |
3327 | 3512 |
3328 | 3513 |
3329 int SeqOneByteString::SeqOneByteStringSize(InstanceType instance_type) { | 3514 int SeqOneByteString::SeqOneByteStringSize(InstanceType instance_type) { |
3330 return SizeFor(length()); | 3515 return SizeFor(length()); |
(...skipping 3750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7081 #undef WRITE_FIELD | 7266 #undef WRITE_FIELD |
7082 #undef NOBARRIER_WRITE_FIELD | 7267 #undef NOBARRIER_WRITE_FIELD |
7083 #undef WRITE_BARRIER | 7268 #undef WRITE_BARRIER |
7084 #undef CONDITIONAL_WRITE_BARRIER | 7269 #undef CONDITIONAL_WRITE_BARRIER |
7085 #undef READ_DOUBLE_FIELD | 7270 #undef READ_DOUBLE_FIELD |
7086 #undef WRITE_DOUBLE_FIELD | 7271 #undef WRITE_DOUBLE_FIELD |
7087 #undef READ_INT_FIELD | 7272 #undef READ_INT_FIELD |
7088 #undef WRITE_INT_FIELD | 7273 #undef WRITE_INT_FIELD |
7089 #undef READ_INTPTR_FIELD | 7274 #undef READ_INTPTR_FIELD |
7090 #undef WRITE_INTPTR_FIELD | 7275 #undef WRITE_INTPTR_FIELD |
| 7276 #undef READ_UINT16_FIELD |
| 7277 #undef WRITE_UINT16_FIELD |
| 7278 #undef READ_INT16_FIELD |
| 7279 #undef WRITE_INT16_FIELD |
7091 #undef READ_UINT32_FIELD | 7280 #undef READ_UINT32_FIELD |
7092 #undef WRITE_UINT32_FIELD | 7281 #undef WRITE_UINT32_FIELD |
7093 #undef READ_SHORT_FIELD | 7282 #undef READ_INT32_FIELD |
7094 #undef WRITE_SHORT_FIELD | 7283 #undef WRITE_INT32_FIELD |
| 7284 #undef READ_FLOAT_FIELD |
| 7285 #undef WRITE_FLOAT_FIELD |
| 7286 #undef READ_UINT64_FIELD |
| 7287 #undef WRITE_UINT64_FIELD |
| 7288 #undef READ_INT64_FIELD |
| 7289 #undef WRITE_INT64_FIELD |
7095 #undef READ_BYTE_FIELD | 7290 #undef READ_BYTE_FIELD |
7096 #undef WRITE_BYTE_FIELD | 7291 #undef WRITE_BYTE_FIELD |
7097 #undef NOBARRIER_READ_BYTE_FIELD | 7292 #undef NOBARRIER_READ_BYTE_FIELD |
7098 #undef NOBARRIER_WRITE_BYTE_FIELD | 7293 #undef NOBARRIER_WRITE_BYTE_FIELD |
7099 | 7294 |
7100 } } // namespace v8::internal | 7295 } } // namespace v8::internal |
7101 | 7296 |
7102 #endif // V8_OBJECTS_INL_H_ | 7297 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |