Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: runtime/vm/method_recognizer.h

Issue 2220883004: Use metadata annotation @patch for patch classes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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, result type, 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, Bool, 0x12e69c8c) \ 16 V(::, identical, ObjectIdentical, Bool, 0x49c6e96a) \
17 V(ClassID, getID, ClassIDgetID, Smi, 0x528fd455) \ 17 V(ClassID, getID, ClassIDgetID, Smi, 0x528fd455) \
18 V(Object, Object., ObjectConstructor, Dynamic, 0x681617fe) \ 18 V(Object, Object., ObjectConstructor, Dynamic, 0x681617fe) \
19 V(_List, ., ObjectArrayAllocate, Array, 0x63078b15) \ 19 V(_List, ., ObjectArrayAllocate, Array, 0x63078b15) \
20 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, Smi, 0x59e7291d) \ 20 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, Smi, 0x59e7291d) \
21 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, Smi, 0x38d3e5bf) \ 21 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, Smi, 0x38d3e5bf) \
22 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, Smi, 0x19dde22c) \ 22 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, Smi, 0x19dde22c) \
23 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, Smi, 0x4f3dbe58) \ 23 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, Smi, 0x4f3dbe58) \
24 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, Dynamic, 0x082db131) \ 24 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, Dynamic, 0x082db131) \
25 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, Dynamic, 0x1dcbfb98) \ 25 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, Dynamic, 0x1dcbfb98) \
26 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, Dynamic, 0x61b71474) \ 26 V(_TypedList, _getInt64, ByteArrayBaseGetInt64, Dynamic, 0x61b71474) \
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 0x7773d51d) \ 232 0x7773d51d) \
233 V(_IntegerImplementation, <, Integer_lessThan, Bool, 0x26dda4bc) \ 233 V(_IntegerImplementation, <, Integer_lessThan, Bool, 0x26dda4bc) \
234 V(_IntegerImplementation, <=, Integer_lessEqualThan, Bool, 0x1e869d20) \ 234 V(_IntegerImplementation, <=, Integer_lessEqualThan, Bool, 0x1e869d20) \
235 V(_IntegerImplementation, >=, Integer_greaterEqualThan, Bool, 0x6c317340) \ 235 V(_IntegerImplementation, >=, Integer_greaterEqualThan, Bool, 0x6c317340) \
236 V(_IntegerImplementation, <<, Integer_shl, Dynamic, 0x4334dfc0) \ 236 V(_IntegerImplementation, <<, Integer_shl, Dynamic, 0x4334dfc0) \
237 V(_IntegerImplementation, >>, Integer_sar, Dynamic, 0x4a2583a1) \ 237 V(_IntegerImplementation, >>, Integer_sar, Dynamic, 0x4a2583a1) \
238 V(_Double, toInt, DoubleToInteger, Dynamic, 0x26ef344b) 238 V(_Double, toInt, DoubleToInteger, Dynamic, 0x26ef344b)
239 239
240 240
241 #define MATH_LIB_INTRINSIC_LIST(V) \ 241 #define MATH_LIB_INTRINSIC_LIST(V) \
242 V(::, sqrt, MathSqrt, Double, 0x18e8d5f6) \ 242 V(::, sqrt, MathSqrt, Double, 0x1afb83d4) \
243 V(_Random, _nextState, Random_nextState, Dynamic, 0x1e4b0103) \ 243 V(_Random, _nextState, Random_nextState, Dynamic, 0x1e4b0103) \
244 244
245 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ 245 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
246 V(::, sin, MathSin, Double, 0x0000fe08) \ 246 V(::, sin, MathSin, Double, 0x0213abe6) \
247 V(::, cos, MathCos, Double, 0x7794b33e) \ 247 V(::, cos, MathCos, Double, 0x79a7611c) \
248 V(::, tan, MathTan, Double, 0x4c1b72fd) \ 248 V(::, tan, MathTan, Double, 0x4e2e20db) \
249 V(::, asin, MathAsin, Double, 0x640d48ad) \ 249 V(::, asin, MathAsin, Double, 0x661ff68b) \
250 V(::, acos, MathAcos, Double, 0x42d46f81) \ 250 V(::, acos, MathAcos, Double, 0x44e71d5f) \
251 V(::, atan, MathAtan, Double, 0x4223f879) \ 251 V(::, atan, MathAtan, Double, 0x4436a657) \
252 V(::, atan2, MathAtan2, Double, 0x3553fb61) \ 252 V(::, atan2, MathAtan2, Double, 0x60a40743) \
253 253
254 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ 254 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
255 V(Int8List, ., TypedData_Int8Array_factory, TypedDataInt8Array, 0x2e7749e3) \ 255 V(Int8List, ., TypedData_Int8Array_factory, TypedDataInt8Array, 0x2e7749e3) \
256 V(Uint8List, ., TypedData_Uint8Array_factory, TypedDataUint8Array, \ 256 V(Uint8List, ., TypedData_Uint8Array_factory, TypedDataUint8Array, \
257 0x6ab75439) \ 257 0x6ab75439) \
258 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, \ 258 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, \
259 TypedDataUint8ClampedArray, 0x183129d7) \ 259 TypedDataUint8ClampedArray, 0x183129d7) \
260 V(Int16List, ., TypedData_Int16Array_factory, TypedDataInt16Array, \ 260 V(Int16List, ., TypedData_Int16Array_factory, TypedDataInt16Array, \
261 0x14b563ea) \ 261 0x14b563ea) \
262 V(Uint16List, ., TypedData_Uint16Array_factory, TypedDataUint16Array, \ 262 V(Uint16List, ., TypedData_Uint16Array_factory, TypedDataUint16Array, \
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 #define GRAPH_INTRINSICS_LIST(V) \ 328 #define GRAPH_INTRINSICS_LIST(V) \
329 GRAPH_CORE_INTRINSICS_LIST(V) \ 329 GRAPH_CORE_INTRINSICS_LIST(V) \
330 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ 330 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
331 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \ 331 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
332 332
333 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \ 333 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \
334 V(_UserTag, makeCurrent, UserTag_makeCurrent, Dynamic, 0x0b3066fd) \ 334 V(_UserTag, makeCurrent, UserTag_makeCurrent, Dynamic, 0x0b3066fd) \
335 V(::, _getDefaultTag, UserTag_defaultTag, Dynamic, 0x14ddc3b7) \ 335 V(::, _getDefaultTag, UserTag_defaultTag, Dynamic, 0x14ddc3b7) \
336 V(::, _getCurrentTag, Profiler_getCurrentTag, Dynamic, 0x486ee02d) \ 336 V(::, _getCurrentTag, Profiler_getCurrentTag, Dynamic, 0x486ee02d) \
337 V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, Dynamic, \ 337 V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, Dynamic, \
338 0x3fe92e14) \ 338 0x1667ce76) \
339 339
340 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ 340 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
341 CORE_LIB_INTRINSIC_LIST(V) \ 341 CORE_LIB_INTRINSIC_LIST(V) \
342 DEVELOPER_LIB_INTRINSIC_LIST(V) \ 342 DEVELOPER_LIB_INTRINSIC_LIST(V) \
343 MATH_LIB_INTRINSIC_LIST(V) \ 343 MATH_LIB_INTRINSIC_LIST(V) \
344 TYPED_DATA_LIB_INTRINSIC_LIST(V) \ 344 TYPED_DATA_LIB_INTRINSIC_LIST(V) \
345 345
346 #define ALL_INTRINSICS_LIST(V) \ 346 #define ALL_INTRINSICS_LIST(V) \
347 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ 347 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
348 CORE_INTEGER_LIB_INTRINSIC_LIST(V) 348 CORE_INTEGER_LIB_INTRINSIC_LIST(V)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 V(_ByteDataView, getInt8, ByteDataViewGetInt8, 0x01bac87d) \ 414 V(_ByteDataView, getInt8, ByteDataViewGetInt8, 0x01bac87d) \
415 V(_ByteDataView, getUint8, ByteDataViewGetUint8, 0x129dab34) \ 415 V(_ByteDataView, getUint8, ByteDataViewGetUint8, 0x129dab34) \
416 V(_ByteDataView, getInt16, ByteDataViewGetInt16, 0x60282377) \ 416 V(_ByteDataView, getInt16, ByteDataViewGetInt16, 0x60282377) \
417 V(_ByteDataView, getUint16, ByteDataViewGetUint16, 0x10edcd89) \ 417 V(_ByteDataView, getUint16, ByteDataViewGetUint16, 0x10edcd89) \
418 V(_ByteDataView, getInt32, ByteDataViewGetInt32, 0x79630f81) \ 418 V(_ByteDataView, getInt32, ByteDataViewGetInt32, 0x79630f81) \
419 V(_ByteDataView, getUint32, ByteDataViewGetUint32, 0x220d3da8) \ 419 V(_ByteDataView, getUint32, ByteDataViewGetUint32, 0x220d3da8) \
420 V(_ByteDataView, getInt64, ByteDataViewGetInt64, 0x757dd5c8) \ 420 V(_ByteDataView, getInt64, ByteDataViewGetInt64, 0x757dd5c8) \
421 V(_ByteDataView, getUint64, ByteDataViewGetUint64, 0x2fab992e) \ 421 V(_ByteDataView, getUint64, ByteDataViewGetUint64, 0x2fab992e) \
422 V(_ByteDataView, getFloat32, ByteDataViewGetFloat32, 0x387e9fc6) \ 422 V(_ByteDataView, getFloat32, ByteDataViewGetFloat32, 0x387e9fc6) \
423 V(_ByteDataView, getFloat64, ByteDataViewGetFloat64, 0x5396432d) \ 423 V(_ByteDataView, getFloat64, ByteDataViewGetFloat64, 0x5396432d) \
424 V(::, asin, MathAsin, 0x640d48ad) \ 424 V(::, asin, MathAsin, 0x661ff68b) \
425 V(::, acos, MathAcos, 0x42d46f81) \ 425 V(::, acos, MathAcos, 0x44e71d5f) \
426 V(::, atan, MathAtan, 0x4223f879) \ 426 V(::, atan, MathAtan, 0x4436a657) \
427 V(::, atan2, MathAtan2, 0x3553fb61) \ 427 V(::, atan2, MathAtan2, 0x60a40743) \
428 V(::, cos, MathCos, 0x7794b33e) \ 428 V(::, cos, MathCos, 0x79a7611c) \
429 V(::, exp, MathExp, 0x59769f9d) \ 429 V(::, exp, MathExp, 0x5b894d7b) \
430 V(::, log, MathLog, 0x2c12654e) \ 430 V(::, log, MathLog, 0x2e25132c) \
431 V(::, max, MathMax, 0x54121d6a) \ 431 V(::, max, MathMax, 0x54121d6a) \
432 V(::, min, MathMin, 0x4276561c) \ 432 V(::, min, MathMin, 0x4276561c) \
433 V(::, pow, MathPow, 0x7ab62ca7) \ 433 V(::, pow, MathPow, 0x438e3089) \
434 V(::, sin, MathSin, 0x0000fe08) \ 434 V(::, sin, MathSin, 0x0213abe6) \
435 V(::, sqrt, MathSqrt, 0x18e8d5f6) \ 435 V(::, sqrt, MathSqrt, 0x1afb83d4) \
436 V(::, tan, MathTan, 0x4c1b72fd) \ 436 V(::, tan, MathTan, 0x4e2e20db) \
437 V(Lists, copy, ListsCopy, 0x21a194fa) \ 437 V(Lists, copy, ListsCopy, 0x21a194fa) \
438 V(_Bigint, get:_neg, Bigint_getNeg, 0x7bf17a57) \ 438 V(_Bigint, get:_neg, Bigint_getNeg, 0x7bf17a57) \
439 V(_Bigint, get:_used, Bigint_getUsed, 0x55041013) \ 439 V(_Bigint, get:_used, Bigint_getUsed, 0x55041013) \
440 V(_Bigint, get:_digits, Bigint_getDigits, 0x46a6c1b3) \ 440 V(_Bigint, get:_digits, Bigint_getDigits, 0x46a6c1b3) \
441 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0x7d6bb76b) \ 441 V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0x7d6bb76b) \
442 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x4beb13f2) \ 442 V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x4beb13f2) \
443 V(_HashVMBase, get:_data, LinkedHashMap_getData, 0x4bf5ccb3) \ 443 V(_HashVMBase, get:_data, LinkedHashMap_getData, 0x4bf5ccb3) \
444 V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x6007556d) \ 444 V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x6007556d) \
445 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0x15e70845) \ 445 V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0x15e70845) \
446 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x3e8c6edc) \ 446 V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x3e8c6edc) \
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // Class that recognizes factories and returns corresponding result cid. 568 // Class that recognizes factories and returns corresponding result cid.
569 class FactoryRecognizer : public AllStatic { 569 class FactoryRecognizer : public AllStatic {
570 public: 570 public:
571 // Return kDynamicCid if factory is not recognized. 571 // Return kDynamicCid if factory is not recognized.
572 static intptr_t ResultCid(const Function& factory); 572 static intptr_t ResultCid(const Function& factory);
573 }; 573 };
574 574
575 } // namespace dart 575 } // namespace dart
576 576
577 #endif // VM_METHOD_RECOGNIZER_H_ 577 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698