OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // - FixedDoubleArray | 97 // - FixedDoubleArray |
98 // - ExternalArray | 98 // - ExternalArray |
99 // - ExternalPixelArray | 99 // - ExternalPixelArray |
100 // - ExternalByteArray | 100 // - ExternalByteArray |
101 // - ExternalUnsignedByteArray | 101 // - ExternalUnsignedByteArray |
102 // - ExternalShortArray | 102 // - ExternalShortArray |
103 // - ExternalUnsignedShortArray | 103 // - ExternalUnsignedShortArray |
104 // - ExternalIntArray | 104 // - ExternalIntArray |
105 // - ExternalUnsignedIntArray | 105 // - ExternalUnsignedIntArray |
106 // - ExternalFloatArray | 106 // - ExternalFloatArray |
| 107 // - ExternalFloat32x4Array |
| 108 // - ExternalInt32x4Array |
107 // - Name | 109 // - Name |
108 // - String | 110 // - String |
109 // - SeqString | 111 // - SeqString |
110 // - SeqOneByteString | 112 // - SeqOneByteString |
111 // - SeqTwoByteString | 113 // - SeqTwoByteString |
112 // - SlicedString | 114 // - SlicedString |
113 // - ConsString | 115 // - ConsString |
114 // - ExternalString | 116 // - ExternalString |
115 // - ExternalAsciiString | 117 // - ExternalAsciiString |
116 // - ExternalTwoByteString | 118 // - ExternalTwoByteString |
117 // - InternalizedString | 119 // - InternalizedString |
118 // - SeqInternalizedString | 120 // - SeqInternalizedString |
119 // - SeqOneByteInternalizedString | 121 // - SeqOneByteInternalizedString |
120 // - SeqTwoByteInternalizedString | 122 // - SeqTwoByteInternalizedString |
121 // - ConsInternalizedString | 123 // - ConsInternalizedString |
122 // - ExternalInternalizedString | 124 // - ExternalInternalizedString |
123 // - ExternalAsciiInternalizedString | 125 // - ExternalAsciiInternalizedString |
124 // - ExternalTwoByteInternalizedString | 126 // - ExternalTwoByteInternalizedString |
125 // - Symbol | 127 // - Symbol |
126 // - HeapNumber | 128 // - HeapNumber |
| 129 // - Float32x4 |
| 130 // - Int32x4 |
127 // - Cell | 131 // - Cell |
128 // - PropertyCell | 132 // - PropertyCell |
129 // - Code | 133 // - Code |
130 // - Map | 134 // - Map |
131 // - Oddball | 135 // - Oddball |
132 // - Foreign | 136 // - Foreign |
133 // - SharedFunctionInfo | 137 // - SharedFunctionInfo |
134 // - Struct | 138 // - Struct |
135 // - Box | 139 // - Box |
136 // - DeclaredAccessorDescriptor | 140 // - DeclaredAccessorDescriptor |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 \ | 357 \ |
354 V(SYMBOL_TYPE) \ | 358 V(SYMBOL_TYPE) \ |
355 \ | 359 \ |
356 V(MAP_TYPE) \ | 360 V(MAP_TYPE) \ |
357 V(CODE_TYPE) \ | 361 V(CODE_TYPE) \ |
358 V(ODDBALL_TYPE) \ | 362 V(ODDBALL_TYPE) \ |
359 V(CELL_TYPE) \ | 363 V(CELL_TYPE) \ |
360 V(PROPERTY_CELL_TYPE) \ | 364 V(PROPERTY_CELL_TYPE) \ |
361 \ | 365 \ |
362 V(HEAP_NUMBER_TYPE) \ | 366 V(HEAP_NUMBER_TYPE) \ |
| 367 V(FLOAT32x4_TYPE) \ |
| 368 V(INT32x4_TYPE) \ |
363 V(FOREIGN_TYPE) \ | 369 V(FOREIGN_TYPE) \ |
364 V(BYTE_ARRAY_TYPE) \ | 370 V(BYTE_ARRAY_TYPE) \ |
365 V(FREE_SPACE_TYPE) \ | 371 V(FREE_SPACE_TYPE) \ |
366 /* Note: the order of these external array */ \ | 372 /* Note: the order of these external array */ \ |
367 /* types is relied upon in */ \ | 373 /* types is relied upon in */ \ |
368 /* Object::IsExternalArray(). */ \ | 374 /* Object::IsExternalArray(). */ \ |
369 V(EXTERNAL_BYTE_ARRAY_TYPE) \ | 375 V(EXTERNAL_BYTE_ARRAY_TYPE) \ |
370 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \ | 376 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \ |
371 V(EXTERNAL_SHORT_ARRAY_TYPE) \ | 377 V(EXTERNAL_SHORT_ARRAY_TYPE) \ |
372 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \ | 378 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \ |
373 V(EXTERNAL_INT_ARRAY_TYPE) \ | 379 V(EXTERNAL_INT_ARRAY_TYPE) \ |
374 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \ | 380 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \ |
375 V(EXTERNAL_FLOAT_ARRAY_TYPE) \ | 381 V(EXTERNAL_FLOAT_ARRAY_TYPE) \ |
| 382 V(EXTERNAL_FLOAT32x4_ARRAY_TYPE) \ |
| 383 V(EXTERNAL_INT32x4_ARRAY_TYPE) \ |
376 V(EXTERNAL_DOUBLE_ARRAY_TYPE) \ | 384 V(EXTERNAL_DOUBLE_ARRAY_TYPE) \ |
377 V(EXTERNAL_PIXEL_ARRAY_TYPE) \ | 385 V(EXTERNAL_PIXEL_ARRAY_TYPE) \ |
378 V(FILLER_TYPE) \ | 386 V(FILLER_TYPE) \ |
379 \ | 387 \ |
380 V(DECLARED_ACCESSOR_DESCRIPTOR_TYPE) \ | 388 V(DECLARED_ACCESSOR_DESCRIPTOR_TYPE) \ |
381 V(DECLARED_ACCESSOR_INFO_TYPE) \ | 389 V(DECLARED_ACCESSOR_INFO_TYPE) \ |
382 V(EXECUTABLE_ACCESSOR_INFO_TYPE) \ | 390 V(EXECUTABLE_ACCESSOR_INFO_TYPE) \ |
383 V(ACCESSOR_PAIR_TYPE) \ | 391 V(ACCESSOR_PAIR_TYPE) \ |
384 V(ACCESS_CHECK_INFO_TYPE) \ | 392 V(ACCESS_CHECK_INFO_TYPE) \ |
385 V(INTERCEPTOR_INFO_TYPE) \ | 393 V(INTERCEPTOR_INFO_TYPE) \ |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // Objects allocated in their own spaces (never in new space). | 698 // Objects allocated in their own spaces (never in new space). |
691 MAP_TYPE, | 699 MAP_TYPE, |
692 CODE_TYPE, | 700 CODE_TYPE, |
693 ODDBALL_TYPE, | 701 ODDBALL_TYPE, |
694 CELL_TYPE, | 702 CELL_TYPE, |
695 PROPERTY_CELL_TYPE, | 703 PROPERTY_CELL_TYPE, |
696 | 704 |
697 // "Data", objects that cannot contain non-map-word pointers to heap | 705 // "Data", objects that cannot contain non-map-word pointers to heap |
698 // objects. | 706 // objects. |
699 HEAP_NUMBER_TYPE, | 707 HEAP_NUMBER_TYPE, |
| 708 FLOAT32x4_TYPE, |
| 709 INT32x4_TYPE, |
700 FOREIGN_TYPE, | 710 FOREIGN_TYPE, |
701 BYTE_ARRAY_TYPE, | 711 BYTE_ARRAY_TYPE, |
702 FREE_SPACE_TYPE, | 712 FREE_SPACE_TYPE, |
703 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE | 713 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE |
704 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, | 714 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, |
705 EXTERNAL_SHORT_ARRAY_TYPE, | 715 EXTERNAL_SHORT_ARRAY_TYPE, |
706 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, | 716 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, |
707 EXTERNAL_INT_ARRAY_TYPE, | 717 EXTERNAL_INT_ARRAY_TYPE, |
708 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, | 718 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, |
709 EXTERNAL_FLOAT_ARRAY_TYPE, | 719 EXTERNAL_FLOAT_ARRAY_TYPE, |
| 720 EXTERNAL_FLOAT32x4_ARRAY_TYPE, |
| 721 EXTERNAL_INT32x4_ARRAY_TYPE, |
710 EXTERNAL_DOUBLE_ARRAY_TYPE, | 722 EXTERNAL_DOUBLE_ARRAY_TYPE, |
711 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE | 723 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE |
712 FIXED_DOUBLE_ARRAY_TYPE, | 724 FIXED_DOUBLE_ARRAY_TYPE, |
713 CONSTANT_POOL_ARRAY_TYPE, | 725 CONSTANT_POOL_ARRAY_TYPE, |
714 FILLER_TYPE, // LAST_DATA_TYPE | 726 FILLER_TYPE, // LAST_DATA_TYPE |
715 | 727 |
716 // Structs. | 728 // Structs. |
717 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, | 729 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, |
718 DECLARED_ACCESSOR_INFO_TYPE, | 730 DECLARED_ACCESSOR_INFO_TYPE, |
719 EXECUTABLE_ACCESSOR_INFO_TYPE, | 731 EXECUTABLE_ACCESSOR_INFO_TYPE, |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 }; | 955 }; |
944 | 956 |
945 | 957 |
946 #define OBJECT_TYPE_LIST(V) \ | 958 #define OBJECT_TYPE_LIST(V) \ |
947 V(Smi) \ | 959 V(Smi) \ |
948 V(HeapObject) \ | 960 V(HeapObject) \ |
949 V(Number) \ | 961 V(Number) \ |
950 | 962 |
951 #define HEAP_OBJECT_TYPE_LIST(V) \ | 963 #define HEAP_OBJECT_TYPE_LIST(V) \ |
952 V(HeapNumber) \ | 964 V(HeapNumber) \ |
| 965 V(Float32x4) \ |
| 966 V(Int32x4) \ |
953 V(Name) \ | 967 V(Name) \ |
954 V(UniqueName) \ | 968 V(UniqueName) \ |
955 V(String) \ | 969 V(String) \ |
956 V(SeqString) \ | 970 V(SeqString) \ |
957 V(ExternalString) \ | 971 V(ExternalString) \ |
958 V(ConsString) \ | 972 V(ConsString) \ |
959 V(SlicedString) \ | 973 V(SlicedString) \ |
960 V(ExternalTwoByteString) \ | 974 V(ExternalTwoByteString) \ |
961 V(ExternalAsciiString) \ | 975 V(ExternalAsciiString) \ |
962 V(SeqTwoByteString) \ | 976 V(SeqTwoByteString) \ |
963 V(SeqOneByteString) \ | 977 V(SeqOneByteString) \ |
964 V(InternalizedString) \ | 978 V(InternalizedString) \ |
965 V(Symbol) \ | 979 V(Symbol) \ |
966 \ | 980 \ |
967 V(ExternalArray) \ | 981 V(ExternalArray) \ |
968 V(ExternalByteArray) \ | 982 V(ExternalByteArray) \ |
969 V(ExternalUnsignedByteArray) \ | 983 V(ExternalUnsignedByteArray) \ |
970 V(ExternalShortArray) \ | 984 V(ExternalShortArray) \ |
971 V(ExternalUnsignedShortArray) \ | 985 V(ExternalUnsignedShortArray) \ |
972 V(ExternalIntArray) \ | 986 V(ExternalIntArray) \ |
973 V(ExternalUnsignedIntArray) \ | 987 V(ExternalUnsignedIntArray) \ |
974 V(ExternalFloatArray) \ | 988 V(ExternalFloatArray) \ |
| 989 V(ExternalFloat32x4Array) \ |
| 990 V(ExternalInt32x4Array) \ |
975 V(ExternalDoubleArray) \ | 991 V(ExternalDoubleArray) \ |
976 V(ExternalPixelArray) \ | 992 V(ExternalPixelArray) \ |
977 V(ByteArray) \ | 993 V(ByteArray) \ |
978 V(FreeSpace) \ | 994 V(FreeSpace) \ |
979 V(JSReceiver) \ | 995 V(JSReceiver) \ |
980 V(JSObject) \ | 996 V(JSObject) \ |
981 V(JSContextExtensionObject) \ | 997 V(JSContextExtensionObject) \ |
982 V(JSGeneratorObject) \ | 998 V(JSGeneratorObject) \ |
983 V(JSModule) \ | 999 V(JSModule) \ |
984 V(Map) \ | 1000 V(Map) \ |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 static const int kInfinityOrNanExponent = | 1900 static const int kInfinityOrNanExponent = |
1885 (kExponentMask >> kExponentShift) - kExponentBias; | 1901 (kExponentMask >> kExponentShift) - kExponentBias; |
1886 static const int kMantissaBitsInTopWord = 20; | 1902 static const int kMantissaBitsInTopWord = 20; |
1887 static const int kNonMantissaBitsInTopWord = 12; | 1903 static const int kNonMantissaBitsInTopWord = 12; |
1888 | 1904 |
1889 private: | 1905 private: |
1890 DISALLOW_IMPLICIT_CONSTRUCTORS(HeapNumber); | 1906 DISALLOW_IMPLICIT_CONSTRUCTORS(HeapNumber); |
1891 }; | 1907 }; |
1892 | 1908 |
1893 | 1909 |
| 1910 class Float32x4: public HeapObject { |
| 1911 public: |
| 1912 // [value]: number value. |
| 1913 inline float32x4_value_t value(); |
| 1914 inline void set_value(float32x4_value_t value); |
| 1915 |
| 1916 // Casting. |
| 1917 static inline Float32x4* cast(Object* obj); |
| 1918 |
| 1919 inline void Float32x4Print() { |
| 1920 Float32x4Print(stdout); |
| 1921 } |
| 1922 void Float32x4Print(FILE* out); |
| 1923 void Float32x4Print(StringStream* accumulator); |
| 1924 DECLARE_VERIFIER(Float32x4) |
| 1925 |
| 1926 inline float x(); |
| 1927 inline float y(); |
| 1928 inline float z(); |
| 1929 inline float w(); |
| 1930 |
| 1931 inline void set_x(float x); |
| 1932 inline void set_y(float x); |
| 1933 inline void set_z(float x); |
| 1934 inline void set_w(float x); |
| 1935 |
| 1936 // Layout description. |
| 1937 static const int kValueOffset = HeapObject::kHeaderSize; |
| 1938 static const int kSize = kValueOffset + kFloat32x4Size; |
| 1939 |
| 1940 private: |
| 1941 DISALLOW_IMPLICIT_CONSTRUCTORS(Float32x4); |
| 1942 }; |
| 1943 |
| 1944 class Int32x4: public HeapObject { |
| 1945 public: |
| 1946 // [value]: number value. |
| 1947 inline int32x4_value_t value(); |
| 1948 inline void set_value(int32x4_value_t value); |
| 1949 |
| 1950 // Casting. |
| 1951 static inline Int32x4* cast(Object* obj); |
| 1952 |
| 1953 inline void Int32x4Print() { |
| 1954 Int32x4Print(stdout); |
| 1955 } |
| 1956 void Int32x4Print(FILE* out); |
| 1957 void Int32x4Print(StringStream* accumulator); |
| 1958 DECLARE_VERIFIER(Int32x4) |
| 1959 |
| 1960 inline int32_t x(); |
| 1961 inline int32_t y(); |
| 1962 inline int32_t z(); |
| 1963 inline int32_t w(); |
| 1964 |
| 1965 inline void set_x(int32_t x); |
| 1966 inline void set_y(int32_t x); |
| 1967 inline void set_z(int32_t x); |
| 1968 inline void set_w(int32_t x); |
| 1969 |
| 1970 // Layout description. |
| 1971 static const int kValueOffset = HeapObject::kHeaderSize; |
| 1972 static const int kSize = kValueOffset + kInt32x4Size; |
| 1973 |
| 1974 private: |
| 1975 DISALLOW_IMPLICIT_CONSTRUCTORS(Int32x4); |
| 1976 }; |
| 1977 |
| 1978 |
| 1979 |
1894 enum EnsureElementsMode { | 1980 enum EnsureElementsMode { |
1895 DONT_ALLOW_DOUBLE_ELEMENTS, | 1981 DONT_ALLOW_DOUBLE_ELEMENTS, |
1896 ALLOW_COPIED_DOUBLE_ELEMENTS, | 1982 ALLOW_COPIED_DOUBLE_ELEMENTS, |
1897 ALLOW_CONVERTED_DOUBLE_ELEMENTS | 1983 ALLOW_CONVERTED_DOUBLE_ELEMENTS |
1898 }; | 1984 }; |
1899 | 1985 |
1900 | 1986 |
1901 // Indicates whether a property should be set or (re)defined. Setting of a | 1987 // Indicates whether a property should be set or (re)defined. Setting of a |
1902 // property causes attributes to remain unchanged, writability to be checked | 1988 // property causes attributes to remain unchanged, writability to be checked |
1903 // and callbacks to be called. Defining of a property causes attributes to | 1989 // and callbacks to be called. Defining of a property causes attributes to |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 inline bool HasDictionaryElements(); | 2178 inline bool HasDictionaryElements(); |
2093 inline bool HasExternalPixelElements(); | 2179 inline bool HasExternalPixelElements(); |
2094 inline bool HasExternalArrayElements(); | 2180 inline bool HasExternalArrayElements(); |
2095 inline bool HasExternalByteElements(); | 2181 inline bool HasExternalByteElements(); |
2096 inline bool HasExternalUnsignedByteElements(); | 2182 inline bool HasExternalUnsignedByteElements(); |
2097 inline bool HasExternalShortElements(); | 2183 inline bool HasExternalShortElements(); |
2098 inline bool HasExternalUnsignedShortElements(); | 2184 inline bool HasExternalUnsignedShortElements(); |
2099 inline bool HasExternalIntElements(); | 2185 inline bool HasExternalIntElements(); |
2100 inline bool HasExternalUnsignedIntElements(); | 2186 inline bool HasExternalUnsignedIntElements(); |
2101 inline bool HasExternalFloatElements(); | 2187 inline bool HasExternalFloatElements(); |
| 2188 inline bool HasExternalFloat32x4Elements(); |
| 2189 inline bool HasExternalInt32x4Elements(); |
2102 inline bool HasExternalDoubleElements(); | 2190 inline bool HasExternalDoubleElements(); |
2103 bool HasFastArgumentsElements(); | 2191 bool HasFastArgumentsElements(); |
2104 bool HasDictionaryArgumentsElements(); | 2192 bool HasDictionaryArgumentsElements(); |
2105 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. | 2193 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. |
2106 | 2194 |
2107 inline bool ShouldTrackAllocationInfo(); | 2195 inline bool ShouldTrackAllocationInfo(); |
2108 | 2196 |
2109 inline void set_map_and_elements( | 2197 inline void set_map_and_elements( |
2110 Map* map, | 2198 Map* map, |
2111 FixedArrayBase* value, | 2199 FixedArrayBase* value, |
(...skipping 2663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4775 | 4863 |
4776 // Dispatched behavior. | 4864 // Dispatched behavior. |
4777 DECLARE_PRINTER(ExternalFloatArray) | 4865 DECLARE_PRINTER(ExternalFloatArray) |
4778 DECLARE_VERIFIER(ExternalFloatArray) | 4866 DECLARE_VERIFIER(ExternalFloatArray) |
4779 | 4867 |
4780 private: | 4868 private: |
4781 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); | 4869 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); |
4782 }; | 4870 }; |
4783 | 4871 |
4784 | 4872 |
| 4873 class ExternalFloat32x4Array: public ExternalArray { |
| 4874 public: |
| 4875 // Setter and getter. |
| 4876 inline float32x4_value_t get_scalar(int index); |
| 4877 MUST_USE_RESULT inline MaybeObject* get(int index); |
| 4878 inline void set(int index, const float32x4_value_t& value); |
| 4879 |
| 4880 static Handle<Object> SetValue(Handle<ExternalFloat32x4Array> array, |
| 4881 uint32_t index, |
| 4882 Handle<Object> value); |
| 4883 |
| 4884 // This accessor applies the correct conversion from Smi, HeapNumber |
| 4885 // and undefined. |
| 4886 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
| 4887 |
| 4888 // Casting. |
| 4889 static inline ExternalFloat32x4Array* cast(Object* obj); |
| 4890 |
| 4891 // Dispatched behavior. |
| 4892 DECLARE_PRINTER(ExternalFloat32x4Array) |
| 4893 DECLARE_VERIFIER(ExternalFloat32x4Array) |
| 4894 |
| 4895 private: |
| 4896 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat32x4Array); |
| 4897 }; |
| 4898 |
| 4899 |
| 4900 class ExternalInt32x4Array: public ExternalArray { |
| 4901 public: |
| 4902 // Setter and getter. |
| 4903 inline int32x4_value_t get_scalar(int index); |
| 4904 MUST_USE_RESULT inline MaybeObject* get(int index); |
| 4905 inline void set(int index, const int32x4_value_t& value); |
| 4906 |
| 4907 static Handle<Object> SetValue(Handle<ExternalInt32x4Array> array, |
| 4908 uint32_t index, |
| 4909 Handle<Object> value); |
| 4910 // This accessor applies the correct conversion from Smi, HeapNumber |
| 4911 // and undefined. |
| 4912 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
| 4913 |
| 4914 // Casting. |
| 4915 static inline ExternalInt32x4Array* cast(Object* obj); |
| 4916 |
| 4917 // Dispatched behavior. |
| 4918 DECLARE_PRINTER(ExternalInt32x4Array) |
| 4919 DECLARE_VERIFIER(ExternalInt32x4Array) |
| 4920 |
| 4921 private: |
| 4922 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt32x4Array); |
| 4923 }; |
| 4924 |
| 4925 |
4785 class ExternalDoubleArray: public ExternalArray { | 4926 class ExternalDoubleArray: public ExternalArray { |
4786 public: | 4927 public: |
4787 // Setter and getter. | 4928 // Setter and getter. |
4788 inline double get_scalar(int index); | 4929 inline double get_scalar(int index); |
4789 MUST_USE_RESULT inline MaybeObject* get(int index); | 4930 MUST_USE_RESULT inline MaybeObject* get(int index); |
4790 inline void set(int index, double value); | 4931 inline void set(int index, double value); |
4791 | 4932 |
4792 static Handle<Object> SetValue(Handle<ExternalDoubleArray> array, | 4933 static Handle<Object> SetValue(Handle<ExternalDoubleArray> array, |
4793 uint32_t index, | 4934 uint32_t index, |
4794 Handle<Object> value); | 4935 Handle<Object> value); |
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6520 V(Math, asin, MathASin) \ | 6661 V(Math, asin, MathASin) \ |
6521 V(Math, acos, MathACos) \ | 6662 V(Math, acos, MathACos) \ |
6522 V(Math, atan, MathATan) \ | 6663 V(Math, atan, MathATan) \ |
6523 V(Math, exp, MathExp) \ | 6664 V(Math, exp, MathExp) \ |
6524 V(Math, sqrt, MathSqrt) \ | 6665 V(Math, sqrt, MathSqrt) \ |
6525 V(Math, pow, MathPow) \ | 6666 V(Math, pow, MathPow) \ |
6526 V(Math, max, MathMax) \ | 6667 V(Math, max, MathMax) \ |
6527 V(Math, min, MathMin) \ | 6668 V(Math, min, MathMin) \ |
6528 V(Math, imul, MathImul) | 6669 V(Math, imul, MathImul) |
6529 | 6670 |
| 6671 #define EXPERIMENTAL_SIMD_FUNCTIONS_WITH_ID_LIST(V) \ |
| 6672 V(SIMD.float32x4, abs, SIMDAbs) \ |
| 6673 V(SIMD.float32x4, neg, SIMDNeg) \ |
| 6674 V(SIMD.float32x4, add, SIMDAdd) \ |
| 6675 V(SIMD.float32x4, sub, SIMDSub) \ |
| 6676 V(SIMD.float32x4, mul, SIMDMul) \ |
| 6677 V(SIMD.float32x4, div, SIMDDiv) \ |
| 6678 V(SIMD.float32x4, clamp, SIMDClamp) \ |
| 6679 V(SIMD.float32x4, min, SIMDMin) \ |
| 6680 V(SIMD.float32x4, max, SIMDMax) \ |
| 6681 V(SIMD.float32x4, reciprocal, SIMDReciprocal) \ |
| 6682 V(SIMD.float32x4, reciprocalSqrt, SIMDReciprocalSqrt) \ |
| 6683 V(SIMD.float32x4, scale, SIMDScale) \ |
| 6684 V(SIMD.float32x4, sqrt, SIMDSqrt) \ |
| 6685 V(SIMD.float32x4, shuffle, SIMDShuffle) \ |
| 6686 V(SIMD.float32x4, shuffleMix, SIMDShuffleMix) \ |
| 6687 V(SIMD.float32x4, withX, SIMDWithX) \ |
| 6688 V(SIMD.float32x4, withY, SIMDWithY) \ |
| 6689 V(SIMD.float32x4, withZ, SIMDWithZ) \ |
| 6690 V(SIMD.float32x4, withW, SIMDWithW) \ |
| 6691 V(SIMD.float32x4, lessThan, SIMDLessThan) \ |
| 6692 V(SIMD.float32x4, lessThanOrEqual, SIMDLessThanOrEqual) \ |
| 6693 V(SIMD.float32x4, equal, SIMDEqual) \ |
| 6694 V(SIMD.float32x4, notEqual, SIMDNotEqual) \ |
| 6695 V(SIMD.float32x4, greaterThanOrEqual, SIMDGreaterThanOrEqual) \ |
| 6696 V(SIMD.float32x4, greaterThan, SIMDGreaterThan) \ |
| 6697 V(SIMD.float32x4, bitsToInt32x4, SIMDBitsToInt32x4) \ |
| 6698 V(SIMD.float32x4, toInt32x4, SIMDToInt32x4) \ |
| 6699 V(SIMD.int32x4, and, SIMDAnd) \ |
| 6700 V(SIMD.int32x4, or, SIMDOr) \ |
| 6701 V(SIMD.int32x4, xor, SIMDXor) \ |
| 6702 V(SIMD.int32x4, not, SIMDNot) \ |
| 6703 V(SIMD.int32x4, neg, SIMDNegU32) \ |
| 6704 V(SIMD.int32x4, add, SIMDAddU32) \ |
| 6705 V(SIMD.int32x4, sub, SIMDSubU32) \ |
| 6706 V(SIMD.int32x4, mul, SIMDMulU32) \ |
| 6707 V(SIMD.int32x4, select, SIMDSelect) \ |
| 6708 V(SIMD.int32x4, shuffle, SIMDShuffleU32) \ |
| 6709 V(SIMD.int32x4, withX, SIMDWithXu32) \ |
| 6710 V(SIMD.int32x4, withY, SIMDWithYu32) \ |
| 6711 V(SIMD.int32x4, withZ, SIMDWithZu32) \ |
| 6712 V(SIMD.int32x4, withW, SIMDWithWu32) \ |
| 6713 V(SIMD.int32x4, withFlagX, SIMDWithFlagX) \ |
| 6714 V(SIMD.int32x4, withFlagY, SIMDWithFlagY) \ |
| 6715 V(SIMD.int32x4, withFlagZ, SIMDWithFlagZ) \ |
| 6716 V(SIMD.int32x4, withFlagW, SIMDWithFlagW) \ |
| 6717 V(SIMD.int32x4, bitsToFloat32x4, SIMDBitsToFloat32x4) \ |
| 6718 V(SIMD.int32x4, toFloat32x4, SIMDToFloat32x4) \ |
| 6719 V(float32x4, zero, Float32x4Zero) \ |
| 6720 V(float32x4, splat, Float32x4Splat) \ |
| 6721 V(int32x4, splat, Int32x4Splat) \ |
| 6722 V(int32x4, bool, Int32x4Bool) \ |
| 6723 V(Float32x4Array.prototype, getAt, Float32x4ArrayGetAt) \ |
| 6724 V(Float32x4Array.prototype, setAt, Float32x4ArraySetAt) \ |
| 6725 V(Int32x4Array.prototype, getAt, Int32x4ArrayGetAt) \ |
| 6726 V(Int32x4Array.prototype, setAt, Int32x4ArraySetAt) |
| 6727 |
| 6728 |
| 6729 #define EXPERIMENTAL_SIMD_FUNCTIONS_WITH_FAKE_ID_LIST(V) \ |
| 6730 V(global, float32x4, Float32x4Constructor) \ |
| 6731 V(global, int32x4, Int32x4Constructor) \ |
| 6732 V(global, unreachable, Float32x4OrInt32x4Unreachable) \ |
| 6733 V(global, change, Float32x4OrInt32x4Change) \ |
| 6734 V(int32x4.prototype, signMask, Int32x4SignMask) \ |
| 6735 V(int32x4.prototype, x, Int32x4X) \ |
| 6736 V(int32x4.prototype, y, Int32x4Y) \ |
| 6737 V(int32x4.prototype, z, Int32x4Z) \ |
| 6738 V(int32x4.prototype, w, Int32x4W) \ |
| 6739 V(int32x4.prototype, flagX, Int32x4FlagX) \ |
| 6740 V(int32x4.prototype, flagY, Int32x4FlagY) \ |
| 6741 V(int32x4.prototype, flagZ, Int32x4FlagZ) \ |
| 6742 V(int32x4.prototype, flagW, Int32x4FlagW) \ |
| 6743 V(float32x4.prototype, signMask, Float32x4SignMask) \ |
| 6744 V(float32x4.prototype, x, Float32x4X) \ |
| 6745 V(float32x4.prototype, y, Float32x4Y) \ |
| 6746 V(float32x4.prototype, z, Float32x4Z) \ |
| 6747 V(float32x4.prototype, w, Float32x4W) |
| 6748 |
6530 enum BuiltinFunctionId { | 6749 enum BuiltinFunctionId { |
6531 kArrayCode, | 6750 kArrayCode, |
6532 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 6751 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
6533 k##name, | 6752 k##name, |
6534 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 6753 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
6535 #undef DECLARE_FUNCTION_ID | |
6536 // Fake id for a special case of Math.pow. Note, it continues the | 6754 // Fake id for a special case of Math.pow. Note, it continues the |
6537 // list of math functions. | 6755 // list of math functions. |
6538 kMathPowHalf | 6756 kMathPowHalf, |
| 6757 EXPERIMENTAL_SIMD_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
| 6758 EXPERIMENTAL_SIMD_FUNCTIONS_WITH_FAKE_ID_LIST(DECLARE_FUNCTION_ID) |
| 6759 #undef DECLARE_FUNCTION_ID |
| 6760 kNumberOfBuiltinFunction |
6539 }; | 6761 }; |
6540 | 6762 |
6541 | 6763 |
6542 // SharedFunctionInfo describes the JSFunction information that can be | 6764 // SharedFunctionInfo describes the JSFunction information that can be |
6543 // shared by multiple instances of the function. | 6765 // shared by multiple instances of the function. |
6544 class SharedFunctionInfo: public HeapObject { | 6766 class SharedFunctionInfo: public HeapObject { |
6545 public: | 6767 public: |
6546 // [name]: Function name. | 6768 // [name]: Function name. |
6547 DECL_ACCESSORS(name, Object) | 6769 DECL_ACCESSORS(name, Object) |
6548 | 6770 |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7554 | 7776 |
7555 static int OffsetOfCodeWithId(Builtins::JavaScript id) { | 7777 static int OffsetOfCodeWithId(Builtins::JavaScript id) { |
7556 return kJSBuiltinsCodeOffset + id * kPointerSize; | 7778 return kJSBuiltinsCodeOffset + id * kPointerSize; |
7557 } | 7779 } |
7558 | 7780 |
7559 private: | 7781 private: |
7560 DISALLOW_IMPLICIT_CONSTRUCTORS(JSBuiltinsObject); | 7782 DISALLOW_IMPLICIT_CONSTRUCTORS(JSBuiltinsObject); |
7561 }; | 7783 }; |
7562 | 7784 |
7563 | 7785 |
7564 // Representation for JS Wrapper objects, String, Number, Boolean, etc. | 7786 // Representation for JS Wrapper objects, String, Number, Float32x4, Int32x4, |
| 7787 // Boolean, etc. |
7565 class JSValue: public JSObject { | 7788 class JSValue: public JSObject { |
7566 public: | 7789 public: |
7567 // [value]: the object being wrapped. | 7790 // [value]: the object being wrapped. |
7568 DECL_ACCESSORS(value, Object) | 7791 DECL_ACCESSORS(value, Object) |
7569 | 7792 |
7570 // Casting. | 7793 // Casting. |
7571 static inline JSValue* cast(Object* obj); | 7794 static inline JSValue* cast(Object* obj); |
7572 | 7795 |
7573 // Dispatched behavior. | 7796 // Dispatched behavior. |
7574 DECLARE_PRINTER(JSValue) | 7797 DECLARE_PRINTER(JSValue) |
(...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10595 } else { | 10818 } else { |
10596 value &= ~(1 << bit_position); | 10819 value &= ~(1 << bit_position); |
10597 } | 10820 } |
10598 return value; | 10821 return value; |
10599 } | 10822 } |
10600 }; | 10823 }; |
10601 | 10824 |
10602 } } // namespace v8::internal | 10825 } } // namespace v8::internal |
10603 | 10826 |
10604 #endif // V8_OBJECTS_H_ | 10827 #endif // V8_OBJECTS_H_ |
OLD | NEW |