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 { |
11 | 11 |
12 // (class-name, function-name, recognized enum, fingerprint). | 12 // (class-name, function-name, recognized enum, result type, fingerprint). |
13 // When adding a new function add a 0 as fingerprint, build and run to get the | 13 // When adding a new function add a 0 as fingerprint, build and run to get the |
14 // correct fingerprint from the mismatch error. | 14 // correct fingerprint from the mismatch error. |
15 #define OTHER_RECOGNIZED_LIST(V) \ | 15 #define OTHER_RECOGNIZED_LIST(V) \ |
16 V(::, identical, ObjectIdentical, 317103244) \ | 16 V(::, identical, ObjectIdentical, Bool, 317103244) \ |
17 V(ClassID, getID, ClassIDgetID, 1385157717) \ | 17 V(ClassID, getID, ClassIDgetID, Smi, 1385157717) \ |
18 V(Object, Object., ObjectConstructor, 1746278398) \ | 18 V(Object, Object., ObjectConstructor, Dynamic, 1746278398) \ |
19 V(_List, ., ObjectArrayAllocate, 1661438741) \ | 19 V(_List, ., ObjectArrayAllocate, Array, 1661438741) \ |
20 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1508321565) \ | 20 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, Smi, 1508321565) \ |
21 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 953411007) \ | 21 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, Smi, 953411007) \ |
22 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 433971756) \ | 22 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, Smi, 433971756) \ |
23 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1329446488) \ | 23 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, Smi, 1329446488) \ |
24 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 137212209) \ | 24 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, Dynamic, 137212209) \ |
25 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 499907480) \ | 25 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, Dynamic, 499907480) \ |
26 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 1639388276) \ | 26 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, Dynamic, 1639388276) \ |
27 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 1672834581) \ | 27 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, Double, 1672834581) \ |
28 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 966634744) \ | 28 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, Double, 966634744) \ |
29 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1197581758) \ | 29 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, Float32x4, \ |
30 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 810805548) \ | 30 1197581758) \ |
31 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1317196265) \ | 31 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, Int32x4, 810805548) \ |
32 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1328908284) \ | 32 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, Dynamic, 1317196265) \ |
33 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1827614958) \ | 33 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, Dynamic, 1328908284) \ |
34 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1694054572) \ | 34 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, Dynamic, 1827614958) \ |
35 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 915652649) \ | 35 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, Dynamic, 1694054572) \ |
36 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1958474336) \ | 36 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, Dynamic, 915652649) \ |
37 V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 1970687707) \ | 37 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, Dynamic, 1958474336) \ |
38 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1853026980) \ | 38 V(_TypedList, _setInt64, ByteArrayBaseSetInt64, Dynamic, 1970687707) \ |
39 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1197862362) \ | 39 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, Dynamic, 1853026980) \ |
40 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 2093630771) \ | 40 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, Dynamic, 1197862362) \ |
41 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1982971324) \ | 41 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, Dynamic, 2093630771) \ |
42 V(_StringBase, _interpolate, StringBaseInterpolate, 1872292681) \ | 42 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, Dynamic, 1982971324) \ |
43 V(_IntegerImplementation, toDouble, IntegerToDouble, 792762465) \ | 43 V(_StringBase, _interpolate, StringBaseInterpolate, Dynamic, 1872292681) \ |
44 V(_Double, _add, DoubleAdd, 2213216) \ | 44 V(_IntegerImplementation, toDouble, IntegerToDouble, Double, 792762465) \ |
45 V(_Double, _sub, DoubleSub, 1100692582) \ | 45 V(_Double, _add, DoubleAdd, Double, 2213216) \ |
46 V(_Double, _mul, DoubleMul, 436784097) \ | 46 V(_Double, _sub, DoubleSub, Double, 1100692582) \ |
47 V(_Double, _div, DoubleDiv, 953317135) \ | 47 V(_Double, _mul, DoubleMul, Double, 436784097) \ |
48 V(::, min, MathMin, 1115051548) \ | 48 V(_Double, _div, DoubleDiv, Double, 953317135) \ |
49 V(::, max, MathMax, 1410473322) \ | 49 V(::, min, MathMin, Dynamic, 1115051548) \ |
50 V(::, _doublePow, MathDoublePow, 1770960781) \ | 50 V(::, max, MathMax, Dynamic, 1410473322) \ |
51 V(Float32x4, Float32x4., Float32x4Constructor, 93751705) \ | 51 V(::, _doublePow, MathDoublePow, Double, 1770960781) \ |
52 V(Float32x4, Float32x4.zero, Float32x4Zero, 1193954374) \ | 52 V(Float32x4, Float32x4., Float32x4Constructor, Float32x4, 93751705) \ |
53 V(Float32x4, Float32x4.splat, Float32x4Splat, 12296613) \ | 53 V(Float32x4, Float32x4.zero, Float32x4Zero, Float32x4, 1193954374) \ |
54 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1188039061)\ | 54 V(Float32x4, Float32x4.splat, Float32x4Splat, Float32x4, 12296613) \ |
55 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1750763218) \ | 55 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, Float32x4, \ |
56 V(Float32x4, shuffle, Float32x4Shuffle, 2015957023) \ | 56 1188039061) \ |
57 V(Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979) \ | 57 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, Float32x4, \ |
58 V(Float32x4, get:signMask, Float32x4GetSignMask, 487049875) \ | 58 1750763218) \ |
59 V(Float32x4, _cmpequal, Float32x4Equal, 127403211) \ | 59 V(Float32x4, shuffle, Float32x4Shuffle, Float32x4, 2015957023) \ |
60 V(Float32x4, _cmpgt, Float32x4GreaterThan, 2118391173) \ | 60 V(Float32x4, shuffleMix, Float32x4ShuffleMix, Float32x4, 1099087979) \ |
61 V(Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 557807661) \ | 61 V(Float32x4, get:signMask, Float32x4GetSignMask, Dynamic, 487049875) \ |
62 V(Float32x4, _cmplt, Float32x4LessThan, 1061691185) \ | 62 V(Float32x4, _cmpequal, Float32x4Equal, Int32x4, 127403211) \ |
63 V(Float32x4, _cmplte, Float32x4LessThanOrEqual, 102608993) \ | 63 V(Float32x4, _cmpgt, Float32x4GreaterThan, Int32x4, 2118391173) \ |
64 V(Float32x4, _cmpnequal, Float32x4NotEqual, 1873649982) \ | 64 V(Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, Int32x4, 557807661) \ |
65 V(Float32x4, _min, Float32x4Min, 1158016632) \ | 65 V(Float32x4, _cmplt, Float32x4LessThan, Int32x4, 1061691185) \ |
66 V(Float32x4, _max, Float32x4Max, 118915526) \ | 66 V(Float32x4, _cmplte, Float32x4LessThanOrEqual, Int32x4, 102608993) \ |
67 V(Float32x4, _scale, Float32x4Scale, 415757469) \ | 67 V(Float32x4, _cmpnequal, Float32x4NotEqual, Int32x4, 1873649982) \ |
68 V(Float32x4, _sqrt, Float32x4Sqrt, 1934518992) \ | 68 V(Float32x4, _min, Float32x4Min, Float32x4, 1158016632) \ |
69 V(Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 1586141174) \ | 69 V(Float32x4, _max, Float32x4Max, Float32x4, 118915526) \ |
70 V(Float32x4, _reciprocal, Float32x4Reciprocal, 1651466502) \ | 70 V(Float32x4, _scale, Float32x4Scale, Float32x4, 415757469) \ |
71 V(Float32x4, _negate, Float32x4Negate, 2142478676) \ | 71 V(Float32x4, _sqrt, Float32x4Sqrt, Float32x4, 1934518992) \ |
72 V(Float32x4, _abs, Float32x4Absolute, 337704007) \ | 72 V(Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, Float32x4, \ |
73 V(Float32x4, _clamp, Float32x4Clamp, 1107305005) \ | 73 1586141174) \ |
74 V(Float32x4, withX, Float32x4WithX, 1311992575) \ | 74 V(Float32x4, _reciprocal, Float32x4Reciprocal, Float32x4, 1651466502) \ |
75 V(Float32x4, withY, Float32x4WithY, 175290640) \ | 75 V(Float32x4, _negate, Float32x4Negate, Float32x4, 2142478676) \ |
76 V(Float32x4, withZ, Float32x4WithZ, 837367384) \ | 76 V(Float32x4, _abs, Float32x4Absolute, Float32x4, 337704007) \ |
77 V(Float32x4, withW, Float32x4WithW, 1625145605) \ | 77 V(Float32x4, _clamp, Float32x4Clamp, Float32x4, 1107305005) \ |
78 V(Float64x2, Float64x2., Float64x2Constructor, 423355933) \ | 78 V(Float32x4, withX, Float32x4WithX, Float32x4, 1311992575) \ |
79 V(Float64x2, Float64x2.zero, Float64x2Zero, 2066666975) \ | 79 V(Float32x4, withY, Float32x4WithY, Float32x4, 175290640) \ |
80 V(Float64x2, Float64x2.splat, Float64x2Splat, 716962994) \ | 80 V(Float32x4, withZ, Float32x4WithZ, Float32x4, 837367384) \ |
81 V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 792974246) \ | 81 V(Float32x4, withW, Float32x4WithW, Float32x4, 1625145605) \ |
82 V(Float64x2, get:x, Float64x2GetX, 1488958362) \ | 82 V(Float64x2, Float64x2., Float64x2Constructor, Float64x2, 423355933) \ |
83 V(Float64x2, get:y, Float64x2GetY, 1022688506) \ | 83 V(Float64x2, Float64x2.zero, Float64x2Zero, Float64x2, 2066666975) \ |
84 V(Float64x2, _negate, Float64x2Negate, 1693416311) \ | 84 V(Float64x2, Float64x2.splat, Float64x2Splat, Float64x2, 716962994) \ |
85 V(Float64x2, abs, Float64x2Abs, 52403783) \ | 85 V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, Float64x2, \ |
86 V(Float64x2, sqrt, Float64x2Sqrt, 2012680669) \ | 86 792974246) \ |
87 V(Float64x2, get:signMask, Float64x2GetSignMask, 668856717) \ | 87 V(Float64x2, get:x, Float64x2GetX, Double, 1488958362) \ |
88 V(Float64x2, scale, Float64x2Scale, 646122081) \ | 88 V(Float64x2, get:y, Float64x2GetY, Double, 1022688506) \ |
89 V(Float64x2, withX, Float64x2WithX, 489409269) \ | 89 V(Float64x2, _negate, Float64x2Negate, Float64x2, 1693416311) \ |
90 V(Float64x2, withY, Float64x2WithY, 943642284) \ | 90 V(Float64x2, abs, Float64x2Abs, Float64x2, 52403783) \ |
91 V(Float64x2, min, Float64x2Min, 685235702) \ | 91 V(Float64x2, sqrt, Float64x2Sqrt, Float64x2, 2012680669) \ |
92 V(Float64x2, max, Float64x2Max, 198659675) \ | 92 V(Float64x2, get:signMask, Float64x2GetSignMask, Dynamic, 668856717) \ |
93 V(Int32x4, Int32x4., Int32x4Constructor, 649173415) \ | 93 V(Float64x2, scale, Float64x2Scale, Float64x2, 646122081) \ |
94 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 458597857) \ | 94 V(Float64x2, withX, Float64x2WithX, Float64x2, 489409269) \ |
95 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, 2122470988) \ | 95 V(Float64x2, withY, Float64x2WithY, Float64x2, 943642284) \ |
96 V(Int32x4, get:flagX, Int32x4GetFlagX, 1446544324) \ | 96 V(Float64x2, min, Float64x2Min, Float64x2, 685235702) \ |
97 V(Int32x4, get:flagY, Int32x4GetFlagY, 1148149370) \ | 97 V(Float64x2, max, Float64x2Max, Float64x2, 198659675) \ |
98 V(Int32x4, get:flagZ, Int32x4GetFlagZ, 550901369) \ | 98 V(Int32x4, Int32x4., Int32x4Constructor, Int32x4, 649173415) \ |
99 V(Int32x4, get:flagW, Int32x4GetFlagW, 1346664620) \ | 99 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, Int32x4, 458597857) \ |
100 V(Int32x4, get:signMask, Int32x4GetSignMask, 740215269) \ | 100 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, Int32x4, \ |
101 V(Int32x4, shuffle, Int32x4Shuffle, 549194518) \ | 101 2122470988) \ |
102 V(Int32x4, shuffleMix, Int32x4ShuffleMix, 1550866145) \ | 102 V(Int32x4, get:flagX, Int32x4GetFlagX, Bool, 1446544324) \ |
103 V(Int32x4, select, Int32x4Select, 1368318775) \ | 103 V(Int32x4, get:flagY, Int32x4GetFlagY, Bool, 1148149370) \ |
104 V(Int32x4, withFlagX, Int32x4WithFlagX, 250974159) \ | 104 V(Int32x4, get:flagZ, Int32x4GetFlagZ, Bool, 550901369) \ |
105 V(Int32x4, withFlagY, Int32x4WithFlagY, 1686481348) \ | 105 V(Int32x4, get:flagW, Int32x4GetFlagW, Bool, 1346664620) \ |
106 V(Int32x4, withFlagZ, Int32x4WithFlagZ, 645582330) \ | 106 V(Int32x4, get:signMask, Int32x4GetSignMask, Dynamic, 740215269) \ |
107 V(Int32x4, withFlagW, Int32x4WithFlagW, 878364277) \ | 107 V(Int32x4, shuffle, Int32x4Shuffle, Int32x4, 549194518) \ |
108 V(Float32List, [], Float32ArrayGetIndexed, 1451643535) \ | 108 V(Int32x4, shuffleMix, Int32x4ShuffleMix, Int32x4, 1550866145) \ |
109 V(Float32List, []=, Float32ArraySetIndexed, 453873887) \ | 109 V(Int32x4, select, Int32x4Select, Float32x4, 1368318775) \ |
110 V(Int8List, [], Int8ArrayGetIndexed, 110819507) \ | 110 V(Int32x4, withFlagX, Int32x4WithFlagX, Int32x4, 250974159) \ |
111 V(Int8List, []=, Int8ArraySetIndexed, 865684695) \ | 111 V(Int32x4, withFlagY, Int32x4WithFlagY, Int32x4, 1686481348) \ |
112 V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 41288685) \ | 112 V(Int32x4, withFlagZ, Int32x4WithFlagZ, Int32x4, 645582330) \ |
113 V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 687206488) \ | 113 V(Int32x4, withFlagW, Int32x4WithFlagW, Int32x4, 878364277) \ |
| 114 V(Float32List, [], Float32ArrayGetIndexed, Double, 1451643535) \ |
| 115 V(Float32List, []=, Float32ArraySetIndexed, Dynamic, 453873887) \ |
| 116 V(Int8List, [], Int8ArrayGetIndexed, Smi, 110819507) \ |
| 117 V(Int8List, []=, Int8ArraySetIndexed, Dynamic, 865684695) \ |
| 118 V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, Smi, 41288685) \ |
| 119 V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, Dynamic, 687206488) \ |
114 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ | 120 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ |
115 41288685) \ | 121 Smi, 41288685) \ |
116 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ | 122 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ |
117 687206488) \ | 123 Dynamic, 687206488) \ |
118 V(Int16List, [], Int16ArrayGetIndexed, 389863073) \ | 124 V(Int16List, [], Int16ArrayGetIndexed, Smi, 389863073) \ |
119 V(Int16List, []=, Int16ArraySetIndexed, 855133756) \ | 125 V(Int16List, []=, Int16ArraySetIndexed, Dynamic, 855133756) \ |
120 V(Uint16List, [], Uint16ArrayGetIndexed, 1053739567) \ | 126 V(Uint16List, [], Uint16ArrayGetIndexed, Smi, 1053739567) \ |
121 V(Uint16List, []=, Uint16ArraySetIndexed, 1547307961) \ | 127 V(Uint16List, []=, Uint16ArraySetIndexed, Dynamic, 1547307961) \ |
122 V(Int32List, [], Int32ArrayGetIndexed, 640610057) \ | 128 V(Int32List, [], Int32ArrayGetIndexed, Dynamic, 640610057) \ |
123 V(Int32List, []=, Int32ArraySetIndexed, 453358705) \ | 129 V(Int32List, []=, Int32ArraySetIndexed, Dynamic, 453358705) \ |
124 V(Int64List, [], Int64ArrayGetIndexed, 202150810) \ | 130 V(Int64List, [], Int64ArrayGetIndexed, Dynamic, 202150810) \ |
125 V(Int64List, []=, Int64ArraySetIndexed, 924110852) \ | 131 V(Int64List, []=, Int64ArraySetIndexed, Dynamic, 924110852) \ |
126 V(Float32x4List, [], Float32x4ArrayGetIndexed, 29819259) \ | 132 V(Float32x4List, [], Float32x4ArrayGetIndexed, Float32x4, 29819259) \ |
127 V(Float32x4List, []=, Float32x4ArraySetIndexed, 1458062250) \ | 133 V(Float32x4List, []=, Float32x4ArraySetIndexed, Dynamic, 1458062250) \ |
128 V(Int32x4List, [], Int32x4ArrayGetIndexed, 137707405) \ | 134 V(Int32x4List, [], Int32x4ArrayGetIndexed, Int32x4, 137707405) \ |
129 V(Int32x4List, []=, Int32x4ArraySetIndexed, 496650149) \ | 135 V(Int32x4List, []=, Int32x4ArraySetIndexed, Dynamic, 496650149) \ |
130 V(Float64x2List, [], Float64x2ArrayGetIndexed, 1721439384) \ | 136 V(Float64x2List, [], Float64x2ArrayGetIndexed, Float64x2, 1721439384) \ |
131 V(Float64x2List, []=, Float64x2ArraySetIndexed, 1994027006) \ | 137 V(Float64x2List, []=, Float64x2ArraySetIndexed, Dynamic, 1994027006) \ |
132 V(_Bigint, get:_neg, Bigint_getNeg, 2079423063) \ | 138 V(_Bigint, get:_neg, Bigint_getNeg, Bool, 2079423063) \ |
133 V(_Bigint, get:_used, Bigint_getUsed, 1426329619) \ | 139 V(_Bigint, get:_used, Bigint_getUsed, Smi, 1426329619) \ |
134 V(_Bigint, get:_digits, Bigint_getDigits, 1185333683) \ | 140 V(_Bigint, get:_digits, Bigint_getDigits, TypedDataUint32Array, 1185333683) \ |
135 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 2104211307) \ | 141 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, TypedDataUint32Array, \ |
136 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 1273697266) \ | 142 2104211307) \ |
137 V(_HashVMBase, get:_data, LinkedHashMap_getData, 1274399923) \ | 143 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, Dynamic, 1273697266) \ |
138 V(_HashVMBase, set:_data, LinkedHashMap_setData, 1611093357) \ | 144 V(_HashVMBase, get:_data, LinkedHashMap_getData, TypedDataUint32Array, \ |
139 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 367462469) \ | 145 1274399923) \ |
140 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 1049390812) \ | 146 V(_HashVMBase, set:_data, LinkedHashMap_setData, Dynamic, 1611093357) \ |
141 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 902147072) \ | 147 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, Smi, 367462469) \ |
142 V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 1236137630) \ | 148 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, Dynamic, \ |
143 V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 812542585) \ | 149 1049390812) \ |
144 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 1072259010) \ | 150 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, Smi, 902147072) \ |
| 151 V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, Dynamic, \ |
| 152 1236137630) \ |
| 153 V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, Smi, \ |
| 154 812542585) \ |
| 155 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, Dynamic, \ |
| 156 1072259010) \ |
145 | 157 |
146 | 158 |
147 // List of intrinsics: | 159 // List of intrinsics: |
148 // (class-name, function-name, intrinsification method, fingerprint). | 160 // (class-name, function-name, intrinsification method, fingerprint). |
149 #define CORE_LIB_INTRINSIC_LIST(V) \ | 161 #define CORE_LIB_INTRINSIC_LIST(V) \ |
150 V(_Smi, ~, Smi_bitNegate, 1673522705) \ | 162 V(_Smi, ~, Smi_bitNegate, Smi, 1673522705) \ |
151 V(_Smi, get:bitLength, Smi_bitLength, 632480332) \ | 163 V(_Smi, get:bitLength, Smi_bitLength, Smi, 632480332) \ |
152 V(_Bigint, _lsh, Bigint_lsh, 1557746963) \ | 164 V(_Bigint, _lsh, Bigint_lsh, Dynamic, 1557746963) \ |
153 V(_Bigint, _rsh, Bigint_rsh, 761843937) \ | 165 V(_Bigint, _rsh, Bigint_rsh, Dynamic, 761843937) \ |
154 V(_Bigint, _absAdd, Bigint_absAdd, 1227835493) \ | 166 V(_Bigint, _absAdd, Bigint_absAdd, Dynamic, 1227835493) \ |
155 V(_Bigint, _absSub, Bigint_absSub, 390740532) \ | 167 V(_Bigint, _absSub, Bigint_absSub, Dynamic, 390740532) \ |
156 V(_Bigint, _mulAdd, Bigint_mulAdd, 617534446) \ | 168 V(_Bigint, _mulAdd, Bigint_mulAdd, Dynamic, 617534446) \ |
157 V(_Bigint, _sqrAdd, Bigint_sqrAdd, 1623635507) \ | 169 V(_Bigint, _sqrAdd, Bigint_sqrAdd, Dynamic, 1623635507) \ |
158 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 797340802) \ | 170 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, Dynamic, 797340802) \ |
159 V(_Montgomery, _mulMod, Montgomery_mulMod, 1947987219) \ | 171 V(_Montgomery, _mulMod, Montgomery_mulMod, Dynamic, 1947987219) \ |
160 V(_Double, >, Double_greaterThan, 1453001345) \ | 172 V(_Double, >, Double_greaterThan, Bool, 1453001345) \ |
161 V(_Double, >=, Double_greaterEqualThan, 1815180096) \ | 173 V(_Double, >=, Double_greaterEqualThan, Bool, 1815180096) \ |
162 V(_Double, <, Double_lessThan, 652059836) \ | 174 V(_Double, <, Double_lessThan, Bool, 652059836) \ |
163 V(_Double, <=, Double_lessEqualThan, 512138528) \ | 175 V(_Double, <=, Double_lessEqualThan, Bool, 512138528) \ |
164 V(_Double, ==, Double_equal, 1468668497) \ | 176 V(_Double, ==, Double_equal, Bool, 1468668497) \ |
165 V(_Double, +, Double_add, 1269587413) \ | 177 V(_Double, +, Double_add, Double, 1269587413) \ |
166 V(_Double, -, Double_sub, 1644506555) \ | 178 V(_Double, -, Double_sub, Double, 1644506555) \ |
167 V(_Double, *, Double_mul, 600860888) \ | 179 V(_Double, *, Double_mul, Double, 600860888) \ |
168 V(_Double, /, Double_div, 1220198876) \ | 180 V(_Double, /, Double_div, Double, 1220198876) \ |
169 V(_Double, get:isNaN, Double_getIsNaN, 184085483) \ | 181 V(_Double, get:isNaN, Double_getIsNaN, Bool, 184085483) \ |
170 V(_Double, get:isNegative, Double_getIsNegative, 978911030) \ | 182 V(_Double, get:isNegative, Double_getIsNegative, Bool, 978911030) \ |
171 V(_Double, _mulFromInteger, Double_mulFromInteger, 856594998) \ | 183 V(_Double, _mulFromInteger, Double_mulFromInteger, Double, 856594998) \ |
172 V(_Double, .fromInteger, DoubleFromInteger, 2129942595) \ | 184 V(_Double, .fromInteger, DoubleFromInteger, Double, 2129942595) \ |
173 V(_List, []=, ObjectArraySetIndexed, 886228780) \ | 185 V(_List, []=, ObjectArraySetIndexed, Dynamic, 886228780) \ |
174 V(_GrowableList, .withData, GrowableArray_Allocate, 631736030) \ | 186 V(_GrowableList, .withData, GrowableArray_Allocate, GrowableObjectArray, \ |
175 V(_GrowableList, add, GrowableArray_add, 219371757) \ | 187 631736030) \ |
176 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 1614206970) \ | 188 V(_GrowableList, add, GrowableArray_add, Dynamic, 219371757) \ |
177 V(Object, ==, ObjectEquals, 291909336) \ | 189 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, Dynamic, 1614206970) \ |
178 V(Object, get:runtimeType, ObjectRuntimeType, 15188587) \ | 190 V(Object, ==, ObjectEquals, Bool, 291909336) \ |
179 V(_StringBase, get:hashCode, String_getHashCode, 2026040200) \ | 191 V(Object, get:runtimeType, ObjectRuntimeType, Type, 15188587) \ |
180 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1958879178) \ | 192 V(_StringBase, get:hashCode, String_getHashCode, Smi, 2026040200) \ |
181 V(_StringBase, _substringMatches, StringBaseSubstringMatches, 797253099) \ | 193 V(_StringBase, get:isEmpty, StringBaseIsEmpty, Bool, 1958879178) \ |
182 V(_StringBase, [], StringBaseCharAt, 754527301) \ | 194 V(_StringBase, _substringMatches, StringBaseSubstringMatches, Bool, \ |
183 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 2026040200) \ | 195 797253099) \ |
| 196 V(_StringBase, [], StringBaseCharAt, Dynamic, 754527301) \ |
| 197 V(_OneByteString, get:hashCode, OneByteString_getHashCode, Smi, 2026040200) \ |
184 V(_OneByteString, _substringUncheckedNative, \ | 198 V(_OneByteString, _substringUncheckedNative, \ |
185 OneByteString_substringUnchecked, 1670133538) \ | 199 OneByteString_substringUnchecked, OneByteString, 1670133538) \ |
186 V(_OneByteString, _setAt, OneByteStringSetAt, 1160066031) \ | 200 V(_OneByteString, _setAt, OneByteStringSetAt, Dynamic, 1160066031) \ |
187 V(_OneByteString, _allocate, OneByteString_allocate, 1028631946) \ | 201 V(_OneByteString, _allocate, OneByteString_allocate, OneByteString, \ |
188 V(_OneByteString, ==, OneByteString_equality, 1062844160) \ | 202 1028631946) \ |
189 V(_TwoByteString, ==, TwoByteString_equality, 1062844160) \ | 203 V(_OneByteString, ==, OneByteString_equality, Bool, 1062844160) \ |
| 204 V(_TwoByteString, ==, TwoByteString_equality, Bool, 1062844160) \ |
190 | 205 |
191 | 206 |
192 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ | 207 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ |
193 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ | 208 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ |
194 2042488139) \ | 209 Dynamic, 2042488139) \ |
195 V(_IntegerImplementation, +, Integer_add, 239272130) \ | 210 V(_IntegerImplementation, +, Integer_add, Dynamic, 239272130) \ |
196 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, 957923759)\ | 211 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, Dynamic, \ |
197 V(_IntegerImplementation, -, Integer_sub, 216175811) \ | 212 957923759) \ |
| 213 V(_IntegerImplementation, -, Integer_sub, Dynamic, 216175811) \ |
198 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ | 214 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ |
199 2032062140) \ | 215 Dynamic, 2032062140) \ |
200 V(_IntegerImplementation, *, Integer_mul, 1301152164) \ | 216 V(_IntegerImplementation, *, Integer_mul, Dynamic, 1301152164) \ |
201 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \ | 217 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \ |
202 779285842) \ | 218 Dynamic, 779285842) \ |
203 V(_IntegerImplementation, ~/, Integer_truncDivide, 1018128256) \ | 219 V(_IntegerImplementation, ~/, Integer_truncDivide, Dynamic, 1018128256) \ |
204 V(_IntegerImplementation, unary-, Integer_negate, 1507648892) \ | 220 V(_IntegerImplementation, unary-, Integer_negate, Dynamic, 1507648892) \ |
205 V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger, \ | 221 V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger, \ |
206 503046514) \ | 222 Dynamic, 503046514) \ |
207 V(_IntegerImplementation, &, Integer_bitAnd, 1500136766) \ | 223 V(_IntegerImplementation, &, Integer_bitAnd, Dynamic, 1500136766) \ |
208 V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger, \ | 224 V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger, \ |
209 1031383580) \ | 225 Dynamic, 1031383580) \ |
210 V(_IntegerImplementation, |, Integer_bitOr, 119412028) \ | 226 V(_IntegerImplementation, |, Integer_bitOr, Dynamic, 119412028) \ |
211 V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger, \ | 227 V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger, \ |
212 1339506501) \ | 228 Dynamic, 1339506501) \ |
213 V(_IntegerImplementation, ^, Integer_bitXor, 210430781) \ | 229 V(_IntegerImplementation, ^, Integer_bitXor, Dynamic, 210430781) \ |
214 V(_IntegerImplementation, _greaterThanFromInteger, \ | 230 V(_IntegerImplementation, _greaterThanFromInteger, \ |
215 Integer_greaterThanFromInt, 780147656) \ | 231 Integer_greaterThanFromInt, Bool, 780147656) \ |
216 V(_IntegerImplementation, >, Integer_greaterThan, 673741711) \ | 232 V(_IntegerImplementation, >, Integer_greaterThan, Bool, 673741711) \ |
217 V(_IntegerImplementation, ==, Integer_equal, 272474439) \ | 233 V(_IntegerImplementation, ==, Integer_equal, Bool, 272474439) \ |
218 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \ | 234 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, Bool, \ |
219 2004079901) \ | 235 2004079901) \ |
220 V(_IntegerImplementation, <, Integer_lessThan, 652059836) \ | 236 V(_IntegerImplementation, <, Integer_lessThan, Bool, 652059836) \ |
221 V(_IntegerImplementation, <=, Integer_lessEqualThan, 512138528) \ | 237 V(_IntegerImplementation, <=, Integer_lessEqualThan, Bool, 512138528) \ |
222 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096) \ | 238 V(_IntegerImplementation, >=, Integer_greaterEqualThan, Bool, 1815180096) \ |
223 V(_IntegerImplementation, <<, Integer_shl, 1127538624) \ | 239 V(_IntegerImplementation, <<, Integer_shl, Dynamic, 1127538624) \ |
224 V(_IntegerImplementation, >>, Integer_sar, 1243972513) \ | 240 V(_IntegerImplementation, >>, Integer_sar, Dynamic, 1243972513) \ |
225 V(_Double, toInt, DoubleToInteger, 653210699) | 241 V(_Double, toInt, DoubleToInteger, Dynamic, 653210699) |
226 | 242 |
227 | 243 |
228 #define MATH_LIB_INTRINSIC_LIST(V) \ | 244 #define MATH_LIB_INTRINSIC_LIST(V) \ |
229 V(::, sqrt, MathSqrt, 417912310) \ | 245 V(::, sqrt, MathSqrt, Double, 417912310) \ |
230 V(_Random, _nextState, Random_nextState, 508231939) \ | 246 V(_Random, _nextState, Random_nextState, Dynamic, 508231939) \ |
231 | 247 |
232 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ | 248 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ |
233 V(::, sin, MathSin, 65032) \ | 249 V(::, sin, MathSin, Double, 65032) \ |
234 V(::, cos, MathCos, 2006233918) \ | 250 V(::, cos, MathCos, Double, 2006233918) \ |
235 V(::, tan, MathTan, 1276867325) \ | 251 V(::, tan, MathTan, Double, 1276867325) \ |
236 V(::, asin, MathAsin, 1678592173) \ | 252 V(::, asin, MathAsin, Double, 1678592173) \ |
237 V(::, acos, MathAcos, 1121218433) \ | 253 V(::, acos, MathAcos, Double, 1121218433) \ |
238 V(::, atan, MathAtan, 1109653625) \ | 254 V(::, atan, MathAtan, Double, 1109653625) \ |
239 V(::, atan2, MathAtan2, 894696289) \ | 255 V(::, atan2, MathAtan2, Double, 894696289) \ |
240 | 256 |
241 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 257 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
242 V(Int8List, ., TypedData_Int8Array_factory, 779569635) \ | 258 V(Int8List, ., TypedData_Int8Array_factory, TypedDataInt8Array, 779569635) \ |
243 V(Uint8List, ., TypedData_Uint8Array_factory, 1790399545) \ | 259 V(Uint8List, ., TypedData_Uint8Array_factory, TypedDataUint8Array, \ |
244 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 405875159) \ | 260 1790399545) \ |
245 V(Int16List, ., TypedData_Int16Array_factory, 347431914) \ | 261 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, \ |
246 V(Uint16List, ., TypedData_Uint16Array_factory, 121990116) \ | 262 TypedDataUint8ClampedArray, 405875159) \ |
247 V(Int32List, ., TypedData_Int32Array_factory, 1540657744) \ | 263 V(Int16List, ., TypedData_Int16Array_factory, TypedDataInt16Array, \ |
248 V(Uint32List, ., TypedData_Uint32Array_factory, 1012511652) \ | 264 347431914) \ |
249 V(Int64List, ., TypedData_Int64Array_factory, 1473796807) \ | 265 V(Uint16List, ., TypedData_Uint16Array_factory, TypedDataUint16Array, \ |
250 V(Uint64List, ., TypedData_Uint64Array_factory, 738799620) \ | 266 121990116) \ |
251 V(Float32List, ., TypedData_Float32Array_factory, 1938690635) \ | 267 V(Int32List, ., TypedData_Int32Array_factory, TypedDataInt32Array, \ |
252 V(Float64List, ., TypedData_Float64Array_factory, 1344005361) \ | 268 1540657744) \ |
253 V(Float32x4List, ., TypedData_Float32x4Array_factory, 2055067416) \ | 269 V(Uint32List, ., TypedData_Uint32Array_factory, \ |
254 V(Int32x4List, ., TypedData_Int32x4Array_factory, 504220232) \ | 270 TypedDataUint32Array, 1012511652) \ |
255 V(Float64x2List, ., TypedData_Float64x2Array_factory, 416019673) \ | 271 V(Int64List, ., TypedData_Int64Array_factory, \ |
| 272 TypedDataInt64Array, 1473796807) \ |
| 273 V(Uint64List, ., TypedData_Uint64Array_factory, \ |
| 274 TypedDataUint64Array, 738799620) \ |
| 275 V(Float32List, ., TypedData_Float32Array_factory, \ |
| 276 TypedDataFloat32Array, 1938690635) \ |
| 277 V(Float64List, ., TypedData_Float64Array_factory, \ |
| 278 TypedDataFloat64Array, 1344005361) \ |
| 279 V(Float32x4List, ., TypedData_Float32x4Array_factory, \ |
| 280 TypedDataFloat32x4Array, 2055067416) \ |
| 281 V(Int32x4List, ., TypedData_Int32x4Array_factory, \ |
| 282 TypedDataInt32x4Array, 504220232) \ |
| 283 V(Float64x2List, ., TypedData_Float64x2Array_factory, \ |
| 284 TypedDataFloat64x2Array, 416019673) \ |
256 | 285 |
257 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ | 286 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ |
258 V(Uint8List, [], Uint8ArrayGetIndexed, 41288685) \ | 287 V(Uint8List, [], Uint8ArrayGetIndexed, Smi, 41288685) \ |
259 V(Uint8List, []=, Uint8ArraySetIndexed, 101536342) \ | 288 V(Uint8List, []=, Uint8ArraySetIndexed, Dynamic, 101536342) \ |
260 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 41288685) \ | 289 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, Smi, 41288685) \ |
261 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 101536342) \ | 290 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, Dynamic, \ |
262 V(Uint32List, [], Uint32ArrayGetIndexed, 1614870523) \ | 291 101536342) \ |
263 V(Uint32List, []=, Uint32ArraySetIndexed, 978194713) \ | 292 V(Uint32List, [], Uint32ArrayGetIndexed, Dynamic, 1614870523) \ |
264 V(Float64List, []=, Float64ArraySetIndexed, 328934501) \ | 293 V(Uint32List, []=, Uint32ArraySetIndexed, Dynamic, 978194713) \ |
265 V(Float64List, [], Float64ArrayGetIndexed, 2049378701) \ | 294 V(Float64List, [], Float64ArrayGetIndexed, Double, 2049378701) \ |
266 V(_TypedList, get:length, TypedDataLength, 546364442) \ | 295 V(Float64List, []=, Float64ArraySetIndexed, Dynamic, 328934501) \ |
267 V(Float32x4, get:x, Float32x4ShuffleX, 1674625343) \ | 296 V(_TypedList, get:length, TypedDataLength, Smi, 546364442) \ |
268 V(Float32x4, get:y, Float32x4ShuffleY, 540293915) \ | 297 V(Float32x4, get:x, Float32x4ShuffleX, Double, 1674625343) \ |
269 V(Float32x4, get:z, Float32x4ShuffleZ, 320347578) \ | 298 V(Float32x4, get:y, Float32x4ShuffleY, Double, 540293915) \ |
270 V(Float32x4, get:w, Float32x4ShuffleW, 1770606624) \ | 299 V(Float32x4, get:z, Float32x4ShuffleZ, Double, 320347578) \ |
271 V(Float32x4, _mul, Float32x4Mul, 42807622) \ | 300 V(Float32x4, get:w, Float32x4ShuffleW, Double, 1770606624) \ |
272 V(Float32x4, _sub, Float32x4Sub, 103774455) \ | 301 V(Float32x4, _mul, Float32x4Mul, Float32x4, 42807622) \ |
273 V(Float32x4, _add, Float32x4Add, 1352634374) \ | 302 V(Float32x4, _sub, Float32x4Sub, Float32x4, 103774455) \ |
| 303 V(Float32x4, _add, Float32x4Add, Float32x4, 1352634374) \ |
274 | 304 |
275 #define GRAPH_CORE_INTRINSICS_LIST(V) \ | 305 #define GRAPH_CORE_INTRINSICS_LIST(V) \ |
276 V(_List, get:length, ObjectArrayLength, 630471378) \ | 306 V(_List, get:length, ObjectArrayLength, Smi, 630471378) \ |
277 V(_List, [], ObjectArrayGetIndexed, 360400496) \ | 307 V(_List, [], ObjectArrayGetIndexed, Dynamic, 360400496) \ |
278 V(_ImmutableList, get:length, ImmutableArrayLength, 630471378) \ | 308 V(_ImmutableList, get:length, ImmutableArrayLength, Smi, 630471378) \ |
279 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ | 309 V(_ImmutableList, [], ImmutableArrayGetIndexed, Dynamic, 360400496) \ |
280 V(_GrowableList, get:length, GrowableArrayLength, 417111542) \ | 310 V(_GrowableList, get:length, GrowableArrayLength, Smi, 417111542) \ |
281 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 41110914) \ | 311 V(_GrowableList, get:_capacity, GrowableArrayCapacity, Smi, 41110914) \ |
282 V(_GrowableList, _setData, GrowableArraySetData, 210059283) \ | 312 V(_GrowableList, _setData, GrowableArraySetData, Dynamic, 210059283) \ |
283 V(_GrowableList, _setLength, GrowableArraySetLength, 335652822) \ | 313 V(_GrowableList, _setLength, GrowableArraySetLength, Dynamic, 335652822) \ |
284 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ | 314 V(_GrowableList, [], GrowableArrayGetIndexed, Dynamic, 1957529650) \ |
285 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ | 315 V(_GrowableList, []=, GrowableArraySetIndexed, Dynamic, 225246870) \ |
286 V(_StringBase, get:length, StringBaseLength, 707533587) \ | 316 V(_StringBase, get:length, StringBaseLength, Smi, 707533587) \ |
287 V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 1436590579) \ | 317 V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, Smi, 1436590579) \ |
288 V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 1436590579) \ | 318 V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, Smi, 1436590579) \ |
289 V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt, \ | 319 V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt, \ |
290 1436590579) \ | 320 Smi, 1436590579) \ |
291 V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt, \ | 321 V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt, \ |
292 1436590579) \ | 322 Smi, 1436590579) \ |
293 V(_Double, unary-, DoubleFlipSignBit, 1783281169) \ | 323 V(_Double, unary-, DoubleFlipSignBit, Double, 1783281169) \ |
294 V(_Double, truncateToDouble, DoubleTruncate, 791143891) \ | 324 V(_Double, truncateToDouble, DoubleTruncate, Double, 791143891) \ |
295 V(_Double, roundToDouble, DoubleRound, 797558034) \ | 325 V(_Double, roundToDouble, DoubleRound, Double, 797558034) \ |
296 V(_Double, floorToDouble, DoubleFloor, 1789426271) \ | 326 V(_Double, floorToDouble, DoubleFloor, Double, 1789426271) \ |
297 V(_Double, ceilToDouble, DoubleCeil, 453271198) \ | 327 V(_Double, ceilToDouble, DoubleCeil, Double, 453271198) \ |
298 V(_Double, _modulo, DoubleMod, 776062204) | 328 V(_Double, _modulo, DoubleMod, Double, 776062204) |
299 | 329 |
300 | 330 |
301 #define GRAPH_INTRINSICS_LIST(V) \ | 331 #define GRAPH_INTRINSICS_LIST(V) \ |
302 GRAPH_CORE_INTRINSICS_LIST(V) \ | 332 GRAPH_CORE_INTRINSICS_LIST(V) \ |
303 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ | 333 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ |
304 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ | 334 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ |
305 | 335 |
306 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \ | 336 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \ |
307 V(_UserTag, makeCurrent, UserTag_makeCurrent, 187721469) \ | 337 V(_UserTag, makeCurrent, UserTag_makeCurrent, Dynamic, 187721469) \ |
308 V(::, _getDefaultTag, UserTag_defaultTag, 350077879) \ | 338 V(::, _getDefaultTag, UserTag_defaultTag, Dynamic, 350077879) \ |
309 V(::, _getCurrentTag, Profiler_getCurrentTag, 1215225901) \ | 339 V(::, _getCurrentTag, Profiler_getCurrentTag, Dynamic, 1215225901) \ |
310 V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 1072246292) \ | 340 V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, Dynamic, \ |
| 341 1072246292) \ |
311 | 342 |
312 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ | 343 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
313 CORE_LIB_INTRINSIC_LIST(V) \ | 344 CORE_LIB_INTRINSIC_LIST(V) \ |
314 DEVELOPER_LIB_INTRINSIC_LIST(V) \ | 345 DEVELOPER_LIB_INTRINSIC_LIST(V) \ |
315 MATH_LIB_INTRINSIC_LIST(V) \ | 346 MATH_LIB_INTRINSIC_LIST(V) \ |
316 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 347 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
317 | 348 |
318 #define ALL_INTRINSICS_LIST(V) \ | 349 #define ALL_INTRINSICS_LIST(V) \ |
319 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ | 350 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ |
320 CORE_INTEGER_LIB_INTRINSIC_LIST(V) | 351 CORE_INTEGER_LIB_INTRINSIC_LIST(V) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 V(_ByteDataView, getInt8, ByteDataViewGetInt8, 29018237) \ | 416 V(_ByteDataView, getInt8, ByteDataViewGetInt8, 29018237) \ |
386 V(_ByteDataView, getUint8, ByteDataViewGetUint8, 312322868) \ | 417 V(_ByteDataView, getUint8, ByteDataViewGetUint8, 312322868) \ |
387 V(_ByteDataView, getInt16, ByteDataViewGetInt16, 1613243255) \ | 418 V(_ByteDataView, getInt16, ByteDataViewGetInt16, 1613243255) \ |
388 V(_ByteDataView, getUint16, ByteDataViewGetUint16, 284020105) \ | 419 V(_ByteDataView, getUint16, ByteDataViewGetUint16, 284020105) \ |
389 V(_ByteDataView, getInt32, ByteDataViewGetInt32, 2036535169) \ | 420 V(_ByteDataView, getInt32, ByteDataViewGetInt32, 2036535169) \ |
390 V(_ByteDataView, getUint32, ByteDataViewGetUint32, 571293096) \ | 421 V(_ByteDataView, getUint32, ByteDataViewGetUint32, 571293096) \ |
391 V(_ByteDataView, getInt64, ByteDataViewGetInt64, 1971181000) \ | 422 V(_ByteDataView, getInt64, ByteDataViewGetInt64, 1971181000) \ |
392 V(_ByteDataView, getUint64, ByteDataViewGetUint64, 799775022) \ | 423 V(_ByteDataView, getUint64, ByteDataViewGetUint64, 799775022) \ |
393 V(_ByteDataView, getFloat32, ByteDataViewGetFloat32, 947822534) \ | 424 V(_ByteDataView, getFloat32, ByteDataViewGetFloat32, 947822534) \ |
394 V(_ByteDataView, getFloat64, ByteDataViewGetFloat64, 1402356525) \ | 425 V(_ByteDataView, getFloat64, ByteDataViewGetFloat64, 1402356525) \ |
395 V(::, asin, MathASin, 1678592173) \ | 426 V(::, asin, MathAsin, 1678592173) \ |
396 V(::, acos, MathACos, 1121218433) \ | 427 V(::, acos, MathAcos, 1121218433) \ |
397 V(::, atan, MathATan, 1109653625) \ | 428 V(::, atan, MathAtan, 1109653625) \ |
398 V(::, atan2, MathATan2, 894696289) \ | 429 V(::, atan2, MathAtan2, 894696289) \ |
399 V(::, cos, MathCos, 2006233918) \ | 430 V(::, cos, MathCos, 2006233918) \ |
400 V(::, exp, MathExp, 1500946333) \ | 431 V(::, exp, MathExp, 1500946333) \ |
401 V(::, log, MathLog, 739403086) \ | 432 V(::, log, MathLog, 739403086) \ |
402 V(::, max, MathMax, 1410473322) \ | 433 V(::, max, MathMax, 1410473322) \ |
403 V(::, min, MathMin, 1115051548) \ | 434 V(::, min, MathMin, 1115051548) \ |
404 V(::, pow, MathPow, 2058759335) \ | 435 V(::, pow, MathPow, 2058759335) \ |
405 V(::, sin, MathSin, 65032) \ | 436 V(::, sin, MathSin, 65032) \ |
406 V(::, sqrt, MathSqrt, 417912310) \ | 437 V(::, sqrt, MathSqrt, 417912310) \ |
407 V(::, tan, MathTan, 1276867325) \ | 438 V(::, tan, MathTan, 1276867325) \ |
408 V(Lists, copy, ListsCopy, 564237562) \ | 439 V(Lists, copy, ListsCopy, 564237562) \ |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Forward declarations. | 513 // Forward declarations. |
483 class Function; | 514 class Function; |
484 | 515 |
485 // Class that recognizes the name and owner of a function and returns the | 516 // Class that recognizes the name and owner of a function and returns the |
486 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable | 517 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable |
487 // functions. | 518 // functions. |
488 class MethodRecognizer : public AllStatic { | 519 class MethodRecognizer : public AllStatic { |
489 public: | 520 public: |
490 enum Kind { | 521 enum Kind { |
491 kUnknown, | 522 kUnknown, |
492 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, | 523 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, type, fp) \ |
| 524 k##enum_name, |
493 RECOGNIZED_LIST(DEFINE_ENUM_LIST) | 525 RECOGNIZED_LIST(DEFINE_ENUM_LIST) |
494 #undef DEFINE_ENUM_LIST | 526 #undef DEFINE_ENUM_LIST |
495 kNumRecognizedMethods | 527 kNumRecognizedMethods |
496 }; | 528 }; |
497 | 529 |
498 static Kind RecognizeKind(const Function& function); | 530 static Kind RecognizeKind(const Function& function); |
499 static bool AlwaysInline(const Function& function); | 531 static bool AlwaysInline(const Function& function); |
500 static bool PolymorphicTarget(const Function& function); | 532 static bool PolymorphicTarget(const Function& function); |
| 533 static intptr_t ResultCid(const Function& function); |
501 static const char* KindToCString(Kind kind); | 534 static const char* KindToCString(Kind kind); |
502 #if defined(DART_NO_SNAPSHOT) | 535 #if defined(DART_NO_SNAPSHOT) |
503 static void InitializeState(); | 536 static void InitializeState(); |
504 #endif // defined(DART_NO_SNAPSHOT). | 537 #endif // defined(DART_NO_SNAPSHOT). |
505 }; | 538 }; |
506 | 539 |
507 | 540 |
508 #if defined(DART_NO_SNAPSHOT) | 541 #if defined(DART_NO_SNAPSHOT) |
509 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ | 542 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ |
510 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) | 543 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) |
(...skipping 26 matching lines...) Expand all Loading... |
537 // Class that recognizes factories and returns corresponding result cid. | 570 // Class that recognizes factories and returns corresponding result cid. |
538 class FactoryRecognizer : public AllStatic { | 571 class FactoryRecognizer : public AllStatic { |
539 public: | 572 public: |
540 // Return kDynamicCid if factory is not recognized. | 573 // Return kDynamicCid if factory is not recognized. |
541 static intptr_t ResultCid(const Function& factory); | 574 static intptr_t ResultCid(const Function& factory); |
542 }; | 575 }; |
543 | 576 |
544 } // namespace dart | 577 } // namespace dart |
545 | 578 |
546 #endif // VM_METHOD_RECOGNIZER_H_ | 579 #endif // VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |