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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 V(_StringBase, [], StringBaseCharAt, 1512210677) \ | 191 V(_StringBase, [], StringBaseCharAt, 1512210677) \ |
192 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1111837929) \ | 192 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1111837929) \ |
193 V(_OneByteString, _substringUncheckedNative, \ | 193 V(_OneByteString, _substringUncheckedNative, \ |
194 OneByteString_substringUnchecked, 1527498975) \ | 194 OneByteString_substringUnchecked, 1527498975) \ |
195 V(_OneByteString, _setAt, OneByteStringSetAt, 468605749) \ | 195 V(_OneByteString, _setAt, OneByteStringSetAt, 468605749) \ |
196 V(_OneByteString, _allocate, OneByteString_allocate, 2035417022) \ | 196 V(_OneByteString, _allocate, OneByteString_allocate, 2035417022) \ |
197 V(_OneByteString, ==, OneByteString_equality, 1727047023) \ | 197 V(_OneByteString, ==, OneByteString_equality, 1727047023) \ |
198 V(_TwoByteString, ==, TwoByteString_equality, 951149689) \ | 198 V(_TwoByteString, ==, TwoByteString_equality, 951149689) \ |
199 | 199 |
200 | 200 |
| 201 // TODO(zerny): Remove this list and add _ExecuteMatch to |
| 202 // CORE_LIB_INTRINSIC_LIST once JSCRE has been removed. |
| 203 #define CORE_REGEXP_LIB_INTRINSIC_LIST(V) \ |
| 204 V(_JSSyntaxRegExp, _ExecuteMatch, JSRegExp_ExecuteMatch, 1654250896) |
| 205 |
| 206 |
201 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ | 207 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ |
202 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ | 208 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ |
203 438687793) \ | 209 438687793) \ |
204 V(_IntegerImplementation, +, Integer_add, 501253666) \ | 210 V(_IntegerImplementation, +, Integer_add, 501253666) \ |
205 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \ | 211 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \ |
206 562800077) \ | 212 562800077) \ |
207 V(_IntegerImplementation, -, Integer_sub, 1819430179) \ | 213 V(_IntegerImplementation, -, Integer_sub, 1819430179) \ |
208 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ | 214 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ |
209 67891834) \ | 215 67891834) \ |
210 V(_IntegerImplementation, *, Integer_mul, 1787870724) \ | 216 V(_IntegerImplementation, *, Integer_mul, 1787870724) \ |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 GRAPH_CORE_INTRINSICS_LIST(V) \ | 299 GRAPH_CORE_INTRINSICS_LIST(V) \ |
294 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ | 300 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ |
295 | 301 |
296 #define PROFILER_LIB_INTRINSIC_LIST(V) \ | 302 #define PROFILER_LIB_INTRINSIC_LIST(V) \ |
297 V(_UserTag, makeCurrent, UserTag_makeCurrent, 370414636) \ | 303 V(_UserTag, makeCurrent, UserTag_makeCurrent, 370414636) \ |
298 V(::, _getDefaultTag, UserTag_defaultTag, 1159885970) \ | 304 V(::, _getDefaultTag, UserTag_defaultTag, 1159885970) \ |
299 V(::, _getCurrentTag, Profiler_getCurrentTag, 1182126114) \ | 305 V(::, _getCurrentTag, Profiler_getCurrentTag, 1182126114) \ |
300 | 306 |
301 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ | 307 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
302 CORE_LIB_INTRINSIC_LIST(V) \ | 308 CORE_LIB_INTRINSIC_LIST(V) \ |
| 309 CORE_REGEXP_LIB_INTRINSIC_LIST(V) \ |
303 MATH_LIB_INTRINSIC_LIST(V) \ | 310 MATH_LIB_INTRINSIC_LIST(V) \ |
304 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 311 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
305 PROFILER_LIB_INTRINSIC_LIST(V) | 312 PROFILER_LIB_INTRINSIC_LIST(V) |
306 | 313 |
307 #define ALL_INTRINSICS_LIST(V) \ | 314 #define ALL_INTRINSICS_LIST(V) \ |
308 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ | 315 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
309 CORE_INTEGER_LIB_INTRINSIC_LIST(V) | 316 CORE_INTEGER_LIB_INTRINSIC_LIST(V) |
310 | 317 |
311 #define RECOGNIZED_LIST(V) \ | 318 #define RECOGNIZED_LIST(V) \ |
312 OTHER_RECOGNIZED_LIST(V) \ | 319 OTHER_RECOGNIZED_LIST(V) \ |
313 ALL_INTRINSICS_LIST(V) \ | 320 ALL_INTRINSICS_LIST(V) \ |
314 GRAPH_INTRINSICS_LIST(V) | 321 GRAPH_INTRINSICS_LIST(V) |
315 | 322 |
316 // A list of core function that should always be inlined. | 323 // A list of core function that should always be inlined. |
317 #define INLINE_WHITE_LIST(V) \ | 324 #define INLINE_WHITE_LIST(V) \ |
318 V(Object, ==, ObjectEquals, 1068471689) \ | 325 V(Object, ==, ObjectEquals, 1068471689) \ |
319 V(_List, get:length, ObjectArrayLength, 1181352729) \ | 326 V(_List, get:length, ObjectArrayLength, 1181352729) \ |
320 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \ | 327 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \ |
321 V(_TypedList, get:length, TypedDataLength, 522565357) \ | 328 V(_TypedList, get:length, TypedDataLength, 522565357) \ |
322 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \ | 329 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \ |
323 V(_StringBase, get:length, StringBaseLength, 784399628) \ | 330 V(_StringBase, get:length, StringBaseLength, 784399628) \ |
| 331 V(_GrowableList, add, GrowableListAdd, 1899133961) \ |
| 332 V(_GrowableList, removeLast, GrowableListRemoveLast, 1274907639) \ |
324 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \ | 333 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \ |
325 V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 1147271335) \ | 334 V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 1147271335) \ |
326 V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946) \ | 335 V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946) \ |
327 V(_GrowableList, forEach, GrowableArrayForEach, 2085943947) \ | 336 V(_GrowableList, forEach, GrowableArrayForEach, 2085943947) \ |
328 V(_List, ., ObjectArrayAllocate, 1595327584) \ | 337 V(_List, ., ObjectArrayAllocate, 1595327584) \ |
329 V(_List, [], ObjectArrayGetIndexed, 795612476) \ | 338 V(_List, [], ObjectArrayGetIndexed, 795612476) \ |
330 V(_List, []=, ObjectArraySetIndexed, 1288827575) \ | 339 V(_List, []=, ObjectArraySetIndexed, 1288827575) \ |
331 V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737) \ | 340 V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737) \ |
332 V(_List, get:iterator, ObjectArrayIterator, 458612415) \ | 341 V(_List, get:iterator, ObjectArrayIterator, 458612415) \ |
333 V(_List, forEach, ObjectArrayForEach, 592525445) \ | 342 V(_List, forEach, ObjectArrayForEach, 592525445) \ |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 static Kind RecognizeKind(const Function& function); | 431 static Kind RecognizeKind(const Function& function); |
423 static bool AlwaysInline(const Function& function); | 432 static bool AlwaysInline(const Function& function); |
424 static bool PolymorphicTarget(const Function& function); | 433 static bool PolymorphicTarget(const Function& function); |
425 static const char* KindToCString(Kind kind); | 434 static const char* KindToCString(Kind kind); |
426 static void InitializeState(); | 435 static void InitializeState(); |
427 }; | 436 }; |
428 | 437 |
429 } // namespace dart | 438 } // namespace dart |
430 | 439 |
431 #endif // VM_METHOD_RECOGNIZER_H_ | 440 #endif // VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |