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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 V(::, sin, MathSin, 939048573) \ | 55 V(::, sin, MathSin, 939048573) \ |
56 V(::, cos, MathCos, 1148850331) \ | 56 V(::, cos, MathCos, 1148850331) \ |
57 V(::, tan, MathTan, 179725235) \ | 57 V(::, tan, MathTan, 179725235) \ |
58 V(::, asin, MathAsin, 848695059) \ | 58 V(::, asin, MathAsin, 848695059) \ |
59 V(::, acos, MathAcos, 337299516) \ | 59 V(::, acos, MathAcos, 337299516) \ |
60 V(::, atan, MathAtan, 866406810) \ | 60 V(::, atan, MathAtan, 866406810) \ |
61 V(::, atan2, MathAtan2, 1901969510) \ | 61 V(::, atan2, MathAtan2, 1901969510) \ |
62 V(::, min, MathMin, 1115051548) \ | 62 V(::, min, MathMin, 1115051548) \ |
63 V(::, max, MathMax, 1410473322) \ | 63 V(::, max, MathMax, 1410473322) \ |
64 V(::, _doublePow, MathDoublePow, 562154128) \ | 64 V(::, _doublePow, MathDoublePow, 562154128) \ |
65 V(Float32x4, Float32x4., Float32x4Constructor, 1849420944) \ | 65 V(Float32x4, Float32x4., Float32x4Constructor, 93751705) \ |
66 V(Float32x4, Float32x4.zero, Float32x4Zero, 762161262) \ | 66 V(Float32x4, Float32x4.zero, Float32x4Zero, 1193954374) \ |
67 V(Float32x4, Float32x4.splat, Float32x4Splat, 255855286) \ | 67 V(Float32x4, Float32x4.splat, Float32x4Splat, 12296613) \ |
68 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1718571366)\ | 68 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1188039061)\ |
69 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1458098858) \ | 69 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1750763218) \ |
70 V(_Float32x4, shuffle, Float32x4Shuffle, 2015957023) \ | 70 V(Float32x4, shuffle, Float32x4Shuffle, 2015957023) \ |
71 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979) \ | 71 V(Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979) \ |
72 V(_Float32x4, get:signMask, Float32x4GetSignMask, 487049875) \ | 72 V(Float32x4, get:signMask, Float32x4GetSignMask, 487049875) \ |
73 V(_Float32x4, _cmpequal, Float32x4Equal, 1069901308) \ | 73 V(Float32x4, _cmpequal, Float32x4Equal, 1069901308) \ |
74 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 2112381651) \ | 74 V(Float32x4, _cmpgt, Float32x4GreaterThan, 2112381651) \ |
75 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1088241265) \ | 75 V(Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1088241265) \ |
76 V(_Float32x4, _cmplt, Float32x4LessThan, 2001171012) \ | 76 V(Float32x4, _cmplt, Float32x4LessThan, 2001171012) \ |
77 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1568686387) \ | 77 V(Float32x4, _cmplte, Float32x4LessThanOrEqual, 1568686387) \ |
78 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1833412828) \ | 78 V(Float32x4, _cmpnequal, Float32x4NotEqual, 1833412828) \ |
79 V(_Float32x4, _min, Float32x4Min, 1194113943) \ | 79 V(Float32x4, _min, Float32x4Min, 1194113943) \ |
80 V(_Float32x4, _max, Float32x4Max, 1876936155) \ | 80 V(Float32x4, _max, Float32x4Max, 1876936155) \ |
81 V(_Float32x4, _scale, Float32x4Scale, 1176743640) \ | 81 V(Float32x4, _scale, Float32x4Scale, 1176743640) \ |
82 V(_Float32x4, _sqrt, Float32x4Sqrt, 526238610) \ | 82 V(Float32x4, _sqrt, Float32x4Sqrt, 526238610) \ |
83 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 860560177) \ | 83 V(Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 860560177) \ |
84 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1703468100) \ | 84 V(Float32x4, _reciprocal, Float32x4Reciprocal, 1703468100) \ |
85 V(_Float32x4, _negate, Float32x4Negate, 1409902640) \ | 85 V(Float32x4, _negate, Float32x4Negate, 1409902640) \ |
86 V(_Float32x4, _abs, Float32x4Absolute, 2116840471) \ | 86 V(Float32x4, _abs, Float32x4Absolute, 2116840471) \ |
87 V(_Float32x4, _clamp, Float32x4Clamp, 1789892357) \ | 87 V(Float32x4, _clamp, Float32x4Clamp, 1789892357) \ |
88 V(_Float32x4, withX, Float32x4WithX, 1311992575) \ | 88 V(Float32x4, withX, Float32x4WithX, 1311992575) \ |
89 V(_Float32x4, withY, Float32x4WithY, 175290640) \ | 89 V(Float32x4, withY, Float32x4WithY, 175290640) \ |
90 V(_Float32x4, withZ, Float32x4WithZ, 837367384) \ | 90 V(Float32x4, withZ, Float32x4WithZ, 837367384) \ |
91 V(_Float32x4, withW, Float32x4WithW, 1625145605) \ | 91 V(Float32x4, withW, Float32x4WithW, 1625145605) \ |
92 V(Float64x2, Float64x2., Float64x2Constructor, 1428850802) \ | 92 V(Float64x2, Float64x2., Float64x2Constructor, 423355933) \ |
93 V(Float64x2, Float64x2.zero, Float64x2Zero, 29170676) \ | 93 V(Float64x2, Float64x2.zero, Float64x2Zero, 2066666975) \ |
94 V(Float64x2, Float64x2.splat, Float64x2Splat, 1077183856) \ | 94 V(Float64x2, Float64x2.splat, Float64x2Splat, 716962994) \ |
95 V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 1752000980) \ | 95 V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 792974246) \ |
96 V(_Float64x2, get:x, Float64x2GetX, 1488958362) \ | 96 V(Float64x2, get:x, Float64x2GetX, 1488958362) \ |
97 V(_Float64x2, get:y, Float64x2GetY, 1022688506) \ | 97 V(Float64x2, get:y, Float64x2GetY, 1022688506) \ |
98 V(_Float64x2, _negate, Float64x2Negate, 960840275) \ | 98 V(Float64x2, _negate, Float64x2Negate, 960840275) \ |
99 V(_Float64x2, abs, Float64x2Abs, 52403783) \ | 99 V(Float64x2, abs, Float64x2Abs, 52403783) \ |
100 V(_Float64x2, sqrt, Float64x2Sqrt, 2012680669) \ | 100 V(Float64x2, sqrt, Float64x2Sqrt, 2012680669) \ |
101 V(_Float64x2, get:signMask, Float64x2GetSignMask, 668856717) \ | 101 V(Float64x2, get:signMask, Float64x2GetSignMask, 668856717) \ |
102 V(_Float64x2, scale, Float64x2Scale, 646122081) \ | 102 V(Float64x2, scale, Float64x2Scale, 646122081) \ |
103 V(_Float64x2, withX, Float64x2WithX, 489409269) \ | 103 V(Float64x2, withX, Float64x2WithX, 489409269) \ |
104 V(_Float64x2, withY, Float64x2WithY, 943642284) \ | 104 V(Float64x2, withY, Float64x2WithY, 943642284) \ |
105 V(_Float64x2, min, Float64x2Min, 685235702) \ | 105 V(Float64x2, min, Float64x2Min, 685235702) \ |
106 V(_Float64x2, max, Float64x2Max, 198659675) \ | 106 V(Float64x2, max, Float64x2Max, 198659675) \ |
107 V(Int32x4, Int32x4., Int32x4Constructor, 80862812) \ | 107 V(Int32x4, Int32x4., Int32x4Constructor, 649173415) \ |
108 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1949580252) \ | 108 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 458597857) \ |
109 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, 1611205288) \ | 109 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, 2122470988) \ |
110 V(_Int32x4, get:flagX, Int32x4GetFlagX, 1446544324) \ | 110 V(Int32x4, get:flagX, Int32x4GetFlagX, 1446544324) \ |
111 V(_Int32x4, get:flagY, Int32x4GetFlagY, 1148149370) \ | 111 V(Int32x4, get:flagY, Int32x4GetFlagY, 1148149370) \ |
112 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 550901369) \ | 112 V(Int32x4, get:flagZ, Int32x4GetFlagZ, 550901369) \ |
113 V(_Int32x4, get:flagW, Int32x4GetFlagW, 1346664620) \ | 113 V(Int32x4, get:flagW, Int32x4GetFlagW, 1346664620) \ |
114 V(_Int32x4, get:signMask, Int32x4GetSignMask, 740215269) \ | 114 V(Int32x4, get:signMask, Int32x4GetSignMask, 740215269) \ |
115 V(_Int32x4, shuffle, Int32x4Shuffle, 549194518) \ | 115 V(Int32x4, shuffle, Int32x4Shuffle, 549194518) \ |
116 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 1550866145) \ | 116 V(Int32x4, shuffleMix, Int32x4ShuffleMix, 1550866145) \ |
117 V(_Int32x4, select, Int32x4Select, 614943686) \ | 117 V(Int32x4, select, Int32x4Select, 614943686) \ |
118 V(_Int32x4, withFlagX, Int32x4WithFlagX, 250974159) \ | 118 V(Int32x4, withFlagX, Int32x4WithFlagX, 250974159) \ |
119 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1686481348) \ | 119 V(Int32x4, withFlagY, Int32x4WithFlagY, 1686481348) \ |
120 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 645582330) \ | 120 V(Int32x4, withFlagZ, Int32x4WithFlagZ, 645582330) \ |
121 V(_Int32x4, withFlagW, Int32x4WithFlagW, 878364277) \ | 121 V(Int32x4, withFlagW, Int32x4WithFlagW, 878364277) \ |
122 V(_Float32Array, [], Float32ArrayGetIndexed, 1002307136) \ | 122 V(Float32List, [], Float32ArrayGetIndexed, 1002307136) \ |
123 V(_Float32Array, []=, Float32ArraySetIndexed, 279546769) \ | 123 V(Float32List, []=, Float32ArraySetIndexed, 279546769) \ |
124 V(_Int8Array, [], Int8ArrayGetIndexed, 1141846285) \ | 124 V(Int8List, [], Int8ArrayGetIndexed, 1141846285) \ |
125 V(_Int8Array, []=, Int8ArraySetIndexed, 1486839324) \ | 125 V(Int8List, []=, Int8ArraySetIndexed, 1486839324) \ |
126 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 513704632) \ | 126 V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 513704632) \ |
127 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1015846567) \ | 127 V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 1015846567) \ |
128 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ | 128 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ |
129 513704632) \ | 129 513704632) \ |
130 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ | 130 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ |
131 1015846567) \ | 131 1015846567) \ |
132 V(_Int16Array, [], Int16ArrayGetIndexed, 1826359619) \ | 132 V(Int16List, [], Int16ArrayGetIndexed, 1826359619) \ |
133 V(_Int16Array, []=, Int16ArraySetIndexed, 1108689116) \ | 133 V(Int16List, []=, Int16ArraySetIndexed, 1108689116) \ |
134 V(_Uint16Array, [], Uint16ArrayGetIndexed, 118958722) \ | 134 V(Uint16List, [], Uint16ArrayGetIndexed, 118958722) \ |
135 V(_Uint16Array, []=, Uint16ArraySetIndexed, 658824450) \ | 135 V(Uint16List, []=, Uint16ArraySetIndexed, 658824450) \ |
136 V(_Int32Array, [], Int32ArrayGetIndexed, 681203163) \ | 136 V(Int32List, [], Int32ArrayGetIndexed, 681203163) \ |
137 V(_Int32Array, []=, Int32ArraySetIndexed, 1786886245) \ | 137 V(Int32List, []=, Int32ArraySetIndexed, 1786886245) \ |
138 V(_Int64Array, [], Int64ArrayGetIndexed, 1883155004) \ | 138 V(Int64List, [], Int64ArrayGetIndexed, 1883155004) \ |
139 V(_Int64Array, []=, Int64ArraySetIndexed, 905815059) \ | 139 V(Int64List, []=, Int64ArraySetIndexed, 905815059) \ |
140 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 694822356) \ | 140 V(Float32x4List, [], Float32x4ArrayGetIndexed, 694822356) \ |
141 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1166109127) \ | 141 V(Float32x4List, []=, Float32x4ArraySetIndexed, 1166109127) \ |
142 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 668249259) \ | 142 V(Int32x4List, [], Int32x4ArrayGetIndexed, 668249259) \ |
143 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 654739449) \ | 143 V(Int32x4List, []=, Int32x4ArraySetIndexed, 654739449) \ |
144 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 196472005) \ | 144 V(Float64x2List, [], Float64x2ArrayGetIndexed, 196472005) \ |
145 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 1421858500) \ | 145 V(Float64x2List, []=, Float64x2ArraySetIndexed, 1421858500) \ |
146 V(_Bigint, get:_neg, Bigint_getNeg, 1681019799) \ | 146 V(_Bigint, get:_neg, Bigint_getNeg, 1681019799) \ |
147 V(_Bigint, get:_used, Bigint_getUsed, 1439136438) \ | 147 V(_Bigint, get:_used, Bigint_getUsed, 1439136438) \ |
148 V(_Bigint, get:_digits, Bigint_getDigits, 769722770) \ | 148 V(_Bigint, get:_digits, Bigint_getDigits, 769722770) \ |
149 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 2048715833) \ | 149 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 2048715833) \ |
150 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 1882796480) \ | 150 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 1882796480) \ |
151 V(_HashVMBase, get:_data, LinkedHashMap_getData, 942992497) \ | 151 V(_HashVMBase, get:_data, LinkedHashMap_getData, 942992497) \ |
152 V(_HashVMBase, set:_data, LinkedHashMap_setData, 1410623019) \ | 152 V(_HashVMBase, set:_data, LinkedHashMap_setData, 1410623019) \ |
153 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 1698421819) \ | 153 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 1698421819) \ |
154 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 1858754514) \ | 154 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 1858754514) \ |
155 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 98745045) \ | 155 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 98745045) \ |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 V(_IntegerImplementation, >>, Integer_sar, 125091101) \ | 238 V(_IntegerImplementation, >>, Integer_sar, 125091101) \ |
239 V(_Double, toInt, DoubleToInteger, 653210699) | 239 V(_Double, toInt, DoubleToInteger, 653210699) |
240 | 240 |
241 | 241 |
242 #define MATH_LIB_INTRINSIC_LIST(V) \ | 242 #define MATH_LIB_INTRINSIC_LIST(V) \ |
243 V(::, sqrt, MathSqrt, 1446681622) \ | 243 V(::, sqrt, MathSqrt, 1446681622) \ |
244 V(_Random, _nextState, Random_nextState, 1241583299) \ | 244 V(_Random, _nextState, Random_nextState, 1241583299) \ |
245 | 245 |
246 | 246 |
247 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 247 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
248 V(_Int8Array, ., TypedData_Int8Array_factory, 1058992179) \ | 248 V(Int8List, ., TypedData_Int8Array_factory, 779569635) \ |
249 V(_Uint8Array, ., TypedData_Uint8Array_factory, 1807546986) \ | 249 V(Uint8List, ., TypedData_Uint8Array_factory, 1790399545) \ |
250 V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 548459853) \ | 250 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 405875159) \ |
251 V(_Int16Array, ., TypedData_Int16Array_factory, 1796211480) \ | 251 V(Int16List, ., TypedData_Int16Array_factory, 347431914) \ |
252 V(_Uint16Array, ., TypedData_Uint16Array_factory, 1960868166) \ | 252 V(Uint16List, ., TypedData_Uint16Array_factory, 121990116) \ |
253 V(_Int32Array, ., TypedData_Int32Array_factory, 372258367) \ | 253 V(Int32List, ., TypedData_Int32Array_factory, 1540657744) \ |
254 V(_Uint32Array, ., TypedData_Uint32Array_factory, 1446612721) \ | 254 V(Uint32List, ., TypedData_Uint32Array_factory, 1012511652) \ |
255 V(_Int64Array, ., TypedData_Int64Array_factory, 964028713) \ | 255 V(Int64List, ., TypedData_Int64Array_factory, 1473796807) \ |
256 V(_Uint64Array, ., TypedData_Uint64Array_factory, 721823156) \ | 256 V(Uint64List, ., TypedData_Uint64Array_factory, 738799620) \ |
257 V(_Float32Array, ., TypedData_Float32Array_factory, 392399264) \ | 257 V(Float32List, ., TypedData_Float32Array_factory, 1938690635) \ |
258 V(_Float64Array, ., TypedData_Float64Array_factory, 42503976) \ | 258 V(Float64List, ., TypedData_Float64Array_factory, 1344005361) \ |
259 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1960198693) \ | 259 V(Float32x4List, ., TypedData_Float32x4Array_factory, 2055067416) \ |
260 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 1433742555) \ | 260 V(Int32x4List, ., TypedData_Int32x4Array_factory, 504220232) \ |
261 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 165463437) \ | 261 V(Float64x2List, ., TypedData_Float64x2Array_factory, 416019673) \ |
262 | 262 |
263 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ | 263 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ |
264 V(_Uint8Array, [], Uint8ArrayGetIndexed, 513704632) \ | 264 V(Uint8List, [], Uint8ArrayGetIndexed, 513704632) \ |
265 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2123520783) \ | 265 V(Uint8List, []=, Uint8ArraySetIndexed, 2123520783) \ |
266 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 513704632) \ | 266 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 513704632) \ |
267 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2123520783) \ | 267 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2123520783) \ |
268 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1179675338) \ | 268 V(Uint32List, [], Uint32ArrayGetIndexed, 1179675338) \ |
269 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1455695417) \ | 269 V(Uint32List, []=, Uint32ArraySetIndexed, 1455695417) \ |
270 V(_Float64Array, []=, Float64ArraySetIndexed, 1929239576) \ | 270 V(Float64List, []=, Float64ArraySetIndexed, 1929239576) \ |
271 V(_Float64Array, [], Float64ArrayGetIndexed, 816943529) \ | 271 V(Float64List, [], Float64ArrayGetIndexed, 816943529) \ |
272 V(_TypedList, get:length, TypedDataLength, 546364442) \ | 272 V(_TypedList, get:length, TypedDataLength, 546364442) \ |
273 V(_Float32x4, get:x, Float32x4ShuffleX, 1674625343) \ | 273 V(Float32x4, get:x, Float32x4ShuffleX, 1674625343) \ |
274 V(_Float32x4, get:y, Float32x4ShuffleY, 540293915) \ | 274 V(Float32x4, get:y, Float32x4ShuffleY, 540293915) \ |
275 V(_Float32x4, get:z, Float32x4ShuffleZ, 320347578) \ | 275 V(Float32x4, get:z, Float32x4ShuffleZ, 320347578) \ |
276 V(_Float32x4, get:w, Float32x4ShuffleW, 1770606624) \ | 276 V(Float32x4, get:w, Float32x4ShuffleW, 1770606624) \ |
277 V(_Float32x4, _mul, Float32x4Mul, 861549065) \ | 277 V(Float32x4, _mul, Float32x4Mul, 861549065) \ |
278 V(_Float32x4, _sub, Float32x4Sub, 460363214) \ | 278 V(Float32x4, _sub, Float32x4Sub, 460363214) \ |
279 V(_Float32x4, _add, Float32x4Add, 1487592255) \ | 279 V(Float32x4, _add, Float32x4Add, 1487592255) \ |
280 | 280 |
281 #define GRAPH_CORE_INTRINSICS_LIST(V) \ | 281 #define GRAPH_CORE_INTRINSICS_LIST(V) \ |
282 V(_List, get:length, ObjectArrayLength, 630471378) \ | 282 V(_List, get:length, ObjectArrayLength, 630471378) \ |
283 V(_List, [], ObjectArrayGetIndexed, 360400496) \ | 283 V(_List, [], ObjectArrayGetIndexed, 360400496) \ |
284 V(_ImmutableList, get:length, ImmutableArrayLength, 630471378) \ | 284 V(_ImmutableList, get:length, ImmutableArrayLength, 630471378) \ |
285 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ | 285 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ |
286 V(_GrowableList, get:length, GrowableArrayLength, 417111542) \ | 286 V(_GrowableList, get:length, GrowableArrayLength, 417111542) \ |
287 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 193746510) \ | 287 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 193746510) \ |
288 V(_GrowableList, _setData, GrowableArraySetData, 1496536873) \ | 288 V(_GrowableList, _setData, GrowableArraySetData, 1496536873) \ |
289 V(_GrowableList, _setLength, GrowableArraySetLength, 32203572) \ | 289 V(_GrowableList, _setLength, GrowableArraySetLength, 32203572) \ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 V(_List, []=, ObjectArraySetIndexed, 886228780) \ | 336 V(_List, []=, ObjectArraySetIndexed, 886228780) \ |
337 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 2021497798) \ | 337 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 2021497798) \ |
338 V(_List, get:iterator, ObjectArrayIterator, 1930956161) \ | 338 V(_List, get:iterator, ObjectArrayIterator, 1930956161) \ |
339 V(_List, forEach, ObjectArrayForEach, 180150673) \ | 339 V(_List, forEach, ObjectArrayForEach, 180150673) \ |
340 V(_List, _slice, ObjectArraySlice, 1785552519) \ | 340 V(_List, _slice, ObjectArraySlice, 1785552519) \ |
341 V(_ImmutableList, get:iterator, ImmutableArrayIterator, 1930956161) \ | 341 V(_ImmutableList, get:iterator, ImmutableArrayIterator, 1930956161) \ |
342 V(_ImmutableList, forEach, ImmutableArrayForEach, 180150673) \ | 342 V(_ImmutableList, forEach, ImmutableArrayForEach, 180150673) \ |
343 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ | 343 V(_ImmutableList, [], ImmutableArrayGetIndexed, 360400496) \ |
344 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ | 344 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ |
345 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ | 345 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ |
346 V(_Float32Array, [], Float32ArrayGetIndexed, 1002307136) \ | 346 V(Float32List, [], Float32ArrayGetIndexed, 1002307136) \ |
347 V(_Float32Array, []=, Float32ArraySetIndexed, 279546769) \ | 347 V(Float32List, []=, Float32ArraySetIndexed, 279546769) \ |
348 V(_Float64Array, [], Float64ArrayGetIndexed, 816943529) \ | 348 V(Float64List, [], Float64ArrayGetIndexed, 816943529) \ |
349 V(_Float64Array, []=, Float64ArraySetIndexed, 1929239576) \ | 349 V(Float64List, []=, Float64ArraySetIndexed, 1929239576) \ |
350 V(_Int8Array, [], Int8ArrayGetIndexed, 1141846285) \ | 350 V(Int8List, [], Int8ArrayGetIndexed, 1141846285) \ |
351 V(_Int8Array, []=, Int8ArraySetIndexed, 1486839324) \ | 351 V(Int8List, []=, Int8ArraySetIndexed, 1486839324) \ |
352 V(_Uint8Array, [], Uint8ArrayGetIndexed, 513704632) \ | 352 V(Uint8List, [], Uint8ArrayGetIndexed, 513704632) \ |
353 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2123520783) \ | 353 V(Uint8List, []=, Uint8ArraySetIndexed, 2123520783) \ |
354 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 513704632) \ | 354 V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 513704632) \ |
355 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1015846567) \ | 355 V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 1015846567) \ |
356 V(_Uint16Array, [], Uint16ArrayGetIndexed, 118958722) \ | 356 V(Uint16List, [], Uint16ArrayGetIndexed, 118958722) \ |
357 V(_Uint16Array, []=, Uint16ArraySetIndexed, 658824450) \ | 357 V(Uint16List, []=, Uint16ArraySetIndexed, 658824450) \ |
358 V(_Int16Array, [], Int16ArrayGetIndexed, 1826359619) \ | 358 V(Int16List, [], Int16ArrayGetIndexed, 1826359619) \ |
359 V(_Int16Array, []=, Int16ArraySetIndexed, 1108689116) \ | 359 V(Int16List, []=, Int16ArraySetIndexed, 1108689116) \ |
360 V(_Int32Array, [], Int32ArrayGetIndexed, 681203163) \ | 360 V(Int32List, [], Int32ArrayGetIndexed, 681203163) \ |
361 V(_Int32Array, []=, Int32ArraySetIndexed, 1786886245) \ | 361 V(Int32List, []=, Int32ArraySetIndexed, 1786886245) \ |
362 V(_Int64Array, [], Int64ArrayGetIndexed, 1883155004) \ | 362 V(Int64List, [], Int64ArrayGetIndexed, 1883155004) \ |
363 V(_Int64Array, []=, Int64ArraySetIndexed, 905815059) \ | 363 V(Int64List, []=, Int64ArraySetIndexed, 905815059) \ |
364 V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 215420949) \ | 364 V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 215420949) \ |
365 V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1138146450) \ | 365 V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1138146450) \ |
366 V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1003520035) \ | 366 V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1003520035) \ |
367 V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 225448326) \ | 367 V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 225448326) \ |
368 V(_ByteDataView, setInt8, ByteDataViewSetInt8, 1091734252) \ | 368 V(_ByteDataView, setInt8, ByteDataViewSetInt8, 1091734252) \ |
369 V(_ByteDataView, setUint8, ByteDataViewSetUint8, 549773093) \ | 369 V(_ByteDataView, setUint8, ByteDataViewSetUint8, 549773093) \ |
370 V(_ByteDataView, setInt16, ByteDataViewSetInt16, 1580120352) \ | 370 V(_ByteDataView, setInt16, ByteDataViewSetInt16, 1580120352) \ |
371 V(_ByteDataView, setUint16, ByteDataViewSetUint16, 948267909) \ | 371 V(_ByteDataView, setUint16, ByteDataViewSetUint16, 948267909) \ |
372 V(_ByteDataView, setInt32, ByteDataViewSetInt32, 2088513508) \ | 372 V(_ByteDataView, setInt32, ByteDataViewSetInt32, 2088513508) \ |
373 V(_ByteDataView, setUint32, ByteDataViewSetUint32, 1125319) \ | 373 V(_ByteDataView, setUint32, ByteDataViewSetUint32, 1125319) \ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 2048715833) \ | 405 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 2048715833) \ |
406 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 1882796480) \ | 406 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 1882796480) \ |
407 V(_HashVMBase, get:_data, LinkedHashMap_getData, 942992497) \ | 407 V(_HashVMBase, get:_data, LinkedHashMap_getData, 942992497) \ |
408 V(_HashVMBase, set:_data, LinkedHashMap_setData, 1410623019) \ | 408 V(_HashVMBase, set:_data, LinkedHashMap_setData, 1410623019) \ |
409 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 1698421819) \ | 409 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 1698421819) \ |
410 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 1858754514) \ | 410 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 1858754514) \ |
411 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 98745045) \ | 411 V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 98745045) \ |
412 V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 340628211) \ | 412 V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 340628211) \ |
413 V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 1340385546) \ | 413 V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 1340385546) \ |
414 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 638315987) \ | 414 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 638315987) \ |
415 V(Uint8List, ., Uint8ListFactory, 1885328419) \ | |
416 V(Int8List, ., Int8ListFactory, 551286096) \ | |
417 V(Uint16List, ., Uint16ListFactory, 2018994846) \ | |
418 V(Int16List, ., Int16ListFactory, 1934285336) \ | |
419 V(Uint32List, ., Uint32ListFactory, 990865607) \ | |
420 V(Int32List, ., Int32ListFactory, 2017670015) \ | |
421 V(Uint64List, ., Uint64ListFactory, 1593070032) \ | |
422 V(Int64List, ., Int64ListFactory, 1071205588) \ | |
423 V(Float32List, ., Float32ListFactory, 1015272745) \ | |
424 V(Float64List, ., Float64ListFactory, 626315429) \ | |
425 V(Int32x4List, ., Int32x4ListFactory, 1693091079) \ | |
426 V(Float32x4List, ., Float32x4ListFactory, 585154381) \ | |
427 V(Float64x2List, ., Float64x2ListFactory, 874435184) | |
428 | |
429 | 415 |
430 // A list of core function that should never be inlined. | 416 // A list of core function that should never be inlined. |
431 #define INLINE_BLACK_LIST(V) \ | 417 #define INLINE_BLACK_LIST(V) \ |
432 V(_Bigint, _lsh, Bigint_lsh, 834311957) \ | 418 V(_Bigint, _lsh, Bigint_lsh, 834311957) \ |
433 V(_Bigint, _rsh, Bigint_rsh, 333337658) \ | 419 V(_Bigint, _rsh, Bigint_rsh, 333337658) \ |
434 V(_Bigint, _absAdd, Bigint_absAdd, 473436659) \ | 420 V(_Bigint, _absAdd, Bigint_absAdd, 473436659) \ |
435 V(_Bigint, _absSub, Bigint_absSub, 1018678324) \ | 421 V(_Bigint, _absSub, Bigint_absSub, 1018678324) \ |
436 V(_Bigint, _mulAdd, Bigint_mulAdd, 571005736) \ | 422 V(_Bigint, _mulAdd, Bigint_mulAdd, 571005736) \ |
437 V(_Bigint, _sqrAdd, Bigint_sqrAdd, 372896038) \ | 423 V(_Bigint, _sqrAdd, Bigint_sqrAdd, 372896038) \ |
438 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 540033329) \ | 424 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 540033329) \ |
(...skipping 28 matching lines...) Expand all Loading... |
467 class Function; | 453 class Function; |
468 | 454 |
469 // Class that recognizes the name and owner of a function and returns the | 455 // Class that recognizes the name and owner of a function and returns the |
470 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable | 456 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable |
471 // functions. | 457 // functions. |
472 class MethodRecognizer : public AllStatic { | 458 class MethodRecognizer : public AllStatic { |
473 public: | 459 public: |
474 enum Kind { | 460 enum Kind { |
475 kUnknown, | 461 kUnknown, |
476 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, | 462 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, |
477 RECOGNIZED_LIST(DEFINE_ENUM_LIST) | 463 RECOGNIZED_LIST(DEFINE_ENUM_LIST) |
478 #undef DEFINE_ENUM_LIST | 464 #undef DEFINE_ENUM_LIST |
479 kNumRecognizedMethods | 465 kNumRecognizedMethods |
480 }; | 466 }; |
481 | 467 |
482 static Kind RecognizeKind(const Function& function); | 468 static Kind RecognizeKind(const Function& function); |
483 static bool AlwaysInline(const Function& function); | 469 static bool AlwaysInline(const Function& function); |
484 static bool PolymorphicTarget(const Function& function); | 470 static bool PolymorphicTarget(const Function& function); |
485 static const char* KindToCString(Kind kind); | 471 static const char* KindToCString(Kind kind); |
486 #if defined(DART_NO_SNAPSHOT) | 472 #if defined(DART_NO_SNAPSHOT) |
487 static void InitializeState(); | 473 static void InitializeState(); |
488 #endif // defined(DART_NO_SNAPSHOT). | 474 #endif // defined(DART_NO_SNAPSHOT). |
489 }; | 475 }; |
490 | 476 |
491 | 477 |
492 #if defined(DART_NO_SNAPSHOT) | 478 #if defined(DART_NO_SNAPSHOT) |
493 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ | 479 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ |
494 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) | 480 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) |
495 | 481 |
496 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ | 482 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ |
497 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) | 483 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) |
498 #endif // defined(DART_NO_SNAPSHOT). | 484 #endif // defined(DART_NO_SNAPSHOT). |
499 | 485 |
500 | 486 |
501 // List of recognized list factories: | 487 // List of recognized list factories: |
502 // (factory-name-symbol, result-cid, fingerprint). | 488 // (factory-name-symbol, result-cid, fingerprint). |
503 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ | 489 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ |
504 V(_ListFactory, kArrayCid, 184405219) \ | 490 V(_ListFactory, kArrayCid, 184405219) \ |
505 V(_GrowableListWithData, kGrowableObjectArrayCid, 131424500) \ | 491 V(_GrowableListWithData, kGrowableObjectArrayCid, 131424500) \ |
506 V(_GrowableListFactory, kGrowableObjectArrayCid, 664918385) \ | 492 V(_GrowableListFactory, kGrowableObjectArrayCid, 664918385) \ |
507 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 1058992179) \ | 493 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 779569635) \ |
508 V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 1807546986) \ | 494 V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 1790399545) \ |
509 V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 548459853) \ | 495 V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 405875159) \ |
510 V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 1796211480) \ | 496 V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 347431914) \ |
511 V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 1960868166) \ | 497 V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 121990116) \ |
512 V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 372258367) \ | 498 V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 1540657744) \ |
513 V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 1446612721) \ | 499 V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 1012511652) \ |
514 V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 964028713) \ | 500 V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 1473796807) \ |
515 V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 721823156) \ | 501 V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 738799620) \ |
516 V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 42503976) \ | 502 V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1344005361) \ |
517 V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 392399264) \ | 503 V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1938690635) \ |
518 V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1960198693) \ | 504 V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 2055067416) \ |
519 | 505 |
520 | 506 |
521 // Class that recognizes factories and returns corresponding result cid. | 507 // Class that recognizes factories and returns corresponding result cid. |
522 class FactoryRecognizer : public AllStatic { | 508 class FactoryRecognizer : public AllStatic { |
523 public: | 509 public: |
524 // Return kDynamicCid if factory is not recognized. | 510 // Return kDynamicCid if factory is not recognized. |
525 static intptr_t ResultCid(const Function& factory); | 511 static intptr_t ResultCid(const Function& factory); |
526 }; | 512 }; |
527 | 513 |
528 } // namespace dart | 514 } // namespace dart |
529 | 515 |
530 #endif // VM_METHOD_RECOGNIZER_H_ | 516 #endif // VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |