| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_METHOD_RECOGNIZER_H_ | 5 #ifndef VM_METHOD_RECOGNIZER_H_ |
| 6 #define VM_METHOD_RECOGNIZER_H_ | 6 #define VM_METHOD_RECOGNIZER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870) \ | 115 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870) \ |
| 116 V(_Int32x4, select, Int32x4Select, 1696037681) \ | 116 V(_Int32x4, select, Int32x4Select, 1696037681) \ |
| 117 V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789) \ | 117 V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789) \ |
| 118 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978) \ | 118 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978) \ |
| 119 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960) \ | 119 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960) \ |
| 120 V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907) \ | 120 V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907) \ |
| 121 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \ | 121 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \ |
| 122 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \ | 122 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \ |
| 123 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \ | 123 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \ |
| 124 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \ | 124 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \ |
| 125 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553) \ | |
| 126 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063) \ | 125 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063) \ |
| 127 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340) \ | 126 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340) \ |
| 128 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 918478513) \ | |
| 129 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ | 127 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ |
| 130 1346536303) \ | 128 1346536303) \ |
| 131 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ | 129 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ |
| 132 1794849214) \ | 130 1794849214) \ |
| 133 V(_Int16Array, [], Int16ArrayGetIndexed, 74127855) \ | 131 V(_Int16Array, [], Int16ArrayGetIndexed, 74127855) \ |
| 134 V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345) \ | 132 V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345) \ |
| 135 V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953) \ | 133 V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953) \ |
| 136 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040) \ | 134 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040) \ |
| 137 V(_Int32Array, [], Int32ArrayGetIndexed, 203101370) \ | 135 V(_Int32Array, [], Int32ArrayGetIndexed, 203101370) \ |
| 138 V(_Int32Array, []=, Int32ArraySetIndexed, 338968571) \ | 136 V(_Int32Array, []=, Int32ArraySetIndexed, 338968571) \ |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 V(_Uint16Array, ., TypedData_Uint16Array_factory, 616427808) \ | 255 V(_Uint16Array, ., TypedData_Uint16Array_factory, 616427808) \ |
| 258 V(_Int32Array, ., TypedData_Int32Array_factory, 26656923) \ | 256 V(_Int32Array, ., TypedData_Int32Array_factory, 26656923) \ |
| 259 V(_Uint32Array, ., TypedData_Uint32Array_factory, 297463966) \ | 257 V(_Uint32Array, ., TypedData_Uint32Array_factory, 297463966) \ |
| 260 V(_Int64Array, ., TypedData_Int64Array_factory, 105050331) \ | 258 V(_Int64Array, ., TypedData_Int64Array_factory, 105050331) \ |
| 261 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1469861670) \ | 259 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1469861670) \ |
| 262 V(_Float32Array, ., TypedData_Float32Array_factory, 105860920) \ | 260 V(_Float32Array, ., TypedData_Float32Array_factory, 105860920) \ |
| 263 V(_Float64Array, ., TypedData_Float64Array_factory, 342242776) \ | 261 V(_Float64Array, ., TypedData_Float64Array_factory, 342242776) \ |
| 264 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1217848993) \ | 262 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1217848993) \ |
| 265 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 100825417) \ | 263 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 100825417) \ |
| 266 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 611308575) \ | 264 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 611308575) \ |
| 267 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \ | |
| 268 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1678777951) \ | |
| 269 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \ | 265 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \ |
| 270 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \ | 266 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \ |
| 271 | 267 |
| 268 #define GRAPH_INTRINSICS_LIST(V) \ |
| 269 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \ |
| 270 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553) \ |
| 271 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1678777951) \ |
| 272 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 918478513) \ |
| 273 |
| 274 |
| 272 | 275 |
| 273 #define PROFILER_LIB_INTRINSIC_LIST(V) \ | 276 #define PROFILER_LIB_INTRINSIC_LIST(V) \ |
| 274 V(_UserTag, makeCurrent, UserTag_makeCurrent, 370414636) \ | 277 V(_UserTag, makeCurrent, UserTag_makeCurrent, 370414636) \ |
| 275 V(::, _getDefaultTag, UserTag_defaultTag, 1159885970) \ | 278 V(::, _getDefaultTag, UserTag_defaultTag, 1159885970) \ |
| 276 V(::, _getCurrentTag, Profiler_getCurrentTag, 1182126114) \ | 279 V(::, _getCurrentTag, Profiler_getCurrentTag, 1182126114) \ |
| 277 | 280 |
| 278 #define ALL_INTRINSICS_LIST(V) \ | 281 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
| 279 CORE_LIB_INTRINSIC_LIST(V) \ | 282 CORE_LIB_INTRINSIC_LIST(V) \ |
| 280 CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ | |
| 281 MATH_LIB_INTRINSIC_LIST(V) \ | 283 MATH_LIB_INTRINSIC_LIST(V) \ |
| 282 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 284 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
| 283 PROFILER_LIB_INTRINSIC_LIST(V) | 285 PROFILER_LIB_INTRINSIC_LIST(V) |
| 284 | 286 |
| 287 #define ALL_INTRINSICS_LIST(V) \ |
| 288 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
| 289 CORE_INTEGER_LIB_INTRINSIC_LIST(V) |
| 290 |
| 285 #define RECOGNIZED_LIST(V) \ | 291 #define RECOGNIZED_LIST(V) \ |
| 286 OTHER_RECOGNIZED_LIST(V) \ | 292 OTHER_RECOGNIZED_LIST(V) \ |
| 287 ALL_INTRINSICS_LIST(V) | 293 ALL_INTRINSICS_LIST(V) \ |
| 294 GRAPH_INTRINSICS_LIST(V) |
| 288 | 295 |
| 289 // A list of core function that should always be inlined. | 296 // A list of core function that should always be inlined. |
| 290 #define INLINE_WHITE_LIST(V) \ | 297 #define INLINE_WHITE_LIST(V) \ |
| 291 V(Object, ==, ObjectEquals, 1068471689) \ | 298 V(Object, ==, ObjectEquals, 1068471689) \ |
| 292 V(_List, get:length, ObjectArrayLength, 1181352729) \ | 299 V(_List, get:length, ObjectArrayLength, 1181352729) \ |
| 293 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \ | 300 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \ |
| 294 V(_TypedList, get:length, TypedDataLength, 522565357) \ | 301 V(_TypedList, get:length, TypedDataLength, 522565357) \ |
| 295 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \ | 302 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \ |
| 296 V(_StringBase, get:length, StringBaseLength, 784399628) \ | 303 V(_StringBase, get:length, StringBaseLength, 784399628) \ |
| 297 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \ | 304 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 static Kind RecognizeKind(const Function& function); | 391 static Kind RecognizeKind(const Function& function); |
| 385 static bool AlwaysInline(const Function& function); | 392 static bool AlwaysInline(const Function& function); |
| 386 static bool PolymorphicTarget(const Function& function); | 393 static bool PolymorphicTarget(const Function& function); |
| 387 static const char* KindToCString(Kind kind); | 394 static const char* KindToCString(Kind kind); |
| 388 static void InitializeState(); | 395 static void InitializeState(); |
| 389 }; | 396 }; |
| 390 | 397 |
| 391 } // namespace dart | 398 } // namespace dart |
| 392 | 399 |
| 393 #endif // VM_METHOD_RECOGNIZER_H_ | 400 #endif // VM_METHOD_RECOGNIZER_H_ |
| OLD | NEW |