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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 V(_Double, _mulFromInteger, Double_mulFromInteger, 1893886883) \ | 171 V(_Double, _mulFromInteger, Double_mulFromInteger, 1893886883) \ |
172 V(_Double, .fromInteger, DoubleFromInteger, 2129942595) \ | 172 V(_Double, .fromInteger, DoubleFromInteger, 2129942595) \ |
173 V(_List, []=, ObjectArraySetIndexed, 886228780) \ | 173 V(_List, []=, ObjectArraySetIndexed, 886228780) \ |
174 V(_GrowableList, .withData, GrowableArray_Allocate, 631736030) \ | 174 V(_GrowableList, .withData, GrowableArray_Allocate, 631736030) \ |
175 V(_GrowableList, add, GrowableArray_add, 219371757) \ | 175 V(_GrowableList, add, GrowableArray_add, 219371757) \ |
176 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 1614206970) \ | 176 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 1614206970) \ |
177 V(Object, ==, ObjectEquals, 291909336) \ | 177 V(Object, ==, ObjectEquals, 291909336) \ |
178 V(Object, get:runtimeType, ObjectRuntimeType, 15188587) \ | 178 V(Object, get:runtimeType, ObjectRuntimeType, 15188587) \ |
179 V(_StringBase, get:hashCode, String_getHashCode, 2026040200) \ | 179 V(_StringBase, get:hashCode, String_getHashCode, 2026040200) \ |
180 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1958879178) \ | 180 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1958879178) \ |
181 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1436590579) \ | |
182 V(_StringBase, _substringMatches, StringBaseSubstringMatches, 797253099) \ | 181 V(_StringBase, _substringMatches, StringBaseSubstringMatches, 797253099) \ |
183 V(_StringBase, [], StringBaseCharAt, 754527301) \ | 182 V(_StringBase, [], StringBaseCharAt, 754527301) \ |
184 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 2026040200) \ | 183 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 2026040200) \ |
185 V(_OneByteString, _substringUncheckedNative, \ | 184 V(_OneByteString, _substringUncheckedNative, \ |
186 OneByteString_substringUnchecked, 1670133538) \ | 185 OneByteString_substringUnchecked, 1670133538) \ |
187 V(_OneByteString, _setAt, OneByteStringSetAt, 1160066031) \ | 186 V(_OneByteString, _setAt, OneByteStringSetAt, 1160066031) \ |
188 V(_OneByteString, _allocate, OneByteString_allocate, 1028631946) \ | 187 V(_OneByteString, _allocate, OneByteString_allocate, 1028631946) \ |
189 V(_OneByteString, ==, OneByteString_equality, 1062844160) \ | 188 V(_OneByteString, ==, OneByteString_equality, 1062844160) \ |
190 V(_TwoByteString, ==, TwoByteString_equality, 1062844160) \ | 189 V(_TwoByteString, ==, TwoByteString_equality, 1062844160) \ |
191 | 190 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 V(_List, [], ObjectArrayGetIndexed, 360400496) \ | 277 V(_List, [], ObjectArrayGetIndexed, 360400496) \ |
279 V(_ImmutableList, get:length, ImmutableArrayLength, 630471378) \ | 278 V(_ImmutableList, get:length, ImmutableArrayLength, 630471378) \ |
280 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ | 279 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ |
281 V(_GrowableList, get:length, GrowableArrayLength, 417111542) \ | 280 V(_GrowableList, get:length, GrowableArrayLength, 417111542) \ |
282 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 41110914) \ | 281 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 41110914) \ |
283 V(_GrowableList, _setData, GrowableArraySetData, 210059283) \ | 282 V(_GrowableList, _setData, GrowableArraySetData, 210059283) \ |
284 V(_GrowableList, _setLength, GrowableArraySetLength, 335652822) \ | 283 V(_GrowableList, _setLength, GrowableArraySetLength, 335652822) \ |
285 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ | 284 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ |
286 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ | 285 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ |
287 V(_StringBase, get:length, StringBaseLength, 707533587) \ | 286 V(_StringBase, get:length, StringBaseLength, 707533587) \ |
| 287 V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 1436590579) \ |
| 288 V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 1436590579) \ |
| 289 V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt, \ |
| 290 1436590579) \ |
| 291 V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt, \ |
| 292 1436590579) \ |
288 V(_Double, unary-, DoubleFlipSignBit, 1783281169) \ | 293 V(_Double, unary-, DoubleFlipSignBit, 1783281169) \ |
289 V(_Double, truncateToDouble, DoubleTruncate, 791143891) \ | 294 V(_Double, truncateToDouble, DoubleTruncate, 791143891) \ |
290 V(_Double, roundToDouble, DoubleRound, 797558034) \ | 295 V(_Double, roundToDouble, DoubleRound, 797558034) \ |
291 V(_Double, floorToDouble, DoubleFloor, 1789426271) \ | 296 V(_Double, floorToDouble, DoubleFloor, 1789426271) \ |
292 V(_Double, ceilToDouble, DoubleCeil, 453271198) \ | 297 V(_Double, ceilToDouble, DoubleCeil, 453271198) \ |
293 V(_Double, _modulo, DoubleMod, 776062204) | 298 V(_Double, _modulo, DoubleMod, 776062204) |
294 | 299 |
295 | 300 |
296 #define GRAPH_INTRINSICS_LIST(V) \ | 301 #define GRAPH_INTRINSICS_LIST(V) \ |
297 GRAPH_CORE_INTRINSICS_LIST(V) \ | 302 GRAPH_CORE_INTRINSICS_LIST(V) \ |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 V(_IntegerImplementation, ==, Integer_equal, 272474439) \ | 450 V(_IntegerImplementation, ==, Integer_equal, 272474439) \ |
446 V(_IntegerImplementation, <, Integer_lessThan, 652059836) \ | 451 V(_IntegerImplementation, <, Integer_lessThan, 652059836) \ |
447 V(_IntegerImplementation, <=, Integer_lessEqualThan, 512138528) \ | 452 V(_IntegerImplementation, <=, Integer_lessEqualThan, 512138528) \ |
448 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096) \ | 453 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096) \ |
449 V(_IntegerImplementation, <<, Integer_shl, 1127538624) \ | 454 V(_IntegerImplementation, <<, Integer_shl, 1127538624) \ |
450 V(_IntegerImplementation, >>, Integer_sar, 1243972513) \ | 455 V(_IntegerImplementation, >>, Integer_sar, 1243972513) \ |
451 | 456 |
452 // A list of core functions that internally dispatch based on received id. | 457 // A list of core functions that internally dispatch based on received id. |
453 #define POLYMORPHIC_TARGET_LIST(V) \ | 458 #define POLYMORPHIC_TARGET_LIST(V) \ |
454 V(_StringBase, [], StringBaseCharAt, 754527301) \ | 459 V(_StringBase, [], StringBaseCharAt, 754527301) \ |
455 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1436590579) \ | |
456 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1508321565) \ | 460 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1508321565) \ |
457 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 953411007) \ | 461 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 953411007) \ |
458 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 433971756) \ | 462 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 433971756) \ |
459 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1329446488) \ | 463 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1329446488) \ |
460 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 137212209) \ | 464 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 137212209) \ |
461 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 499907480) \ | 465 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 499907480) \ |
462 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 1672834581) \ | 466 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 1672834581) \ |
463 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 966634744) \ | 467 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 966634744) \ |
464 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1197581758) \ | 468 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1197581758) \ |
465 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 810805548) \ | 469 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 810805548) \ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 // Class that recognizes factories and returns corresponding result cid. | 536 // Class that recognizes factories and returns corresponding result cid. |
533 class FactoryRecognizer : public AllStatic { | 537 class FactoryRecognizer : public AllStatic { |
534 public: | 538 public: |
535 // Return kDynamicCid if factory is not recognized. | 539 // Return kDynamicCid if factory is not recognized. |
536 static intptr_t ResultCid(const Function& factory); | 540 static intptr_t ResultCid(const Function& factory); |
537 }; | 541 }; |
538 | 542 |
539 } // namespace dart | 543 } // namespace dart |
540 | 544 |
541 #endif // VM_METHOD_RECOGNIZER_H_ | 545 #endif // VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |