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 RUNTIME_VM_METHOD_RECOGNIZER_H_ | 5 #ifndef RUNTIME_VM_METHOD_RECOGNIZER_H_ |
6 #define RUNTIME_VM_METHOD_RECOGNIZER_H_ | 6 #define RUNTIME_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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 static intptr_t ResultCid(const Function& function); | 520 static intptr_t ResultCid(const Function& function); |
521 static intptr_t MethodKindToReceiverCid(Kind kind); | 521 static intptr_t MethodKindToReceiverCid(Kind kind); |
522 static const char* KindToCString(Kind kind); | 522 static const char* KindToCString(Kind kind); |
523 | 523 |
524 #if !defined(DART_PRECOMPILED_RUNTIME) | 524 #if !defined(DART_PRECOMPILED_RUNTIME) |
525 static void InitializeState(); | 525 static void InitializeState(); |
526 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 526 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
527 }; | 527 }; |
528 | 528 |
529 | 529 |
530 #if defined(DART_NO_SNAPSHOT) && !defined(PRODUCT) | 530 #if !defined(DART_PRECOMPILED_RUNTIME) |
531 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ | 531 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ |
532 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) | 532 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) |
533 | 533 |
534 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ | 534 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ |
535 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) | 535 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) |
536 #endif // defined(DART_NO_SNAPSHOT) && !defined(PRODUCT) | 536 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
537 | 537 |
538 | 538 |
539 // clang-format off | 539 // clang-format off |
540 // List of recognized list factories: | 540 // List of recognized list factories: |
541 // (factory-name-symbol, result-cid, fingerprint). | 541 // (factory-name-symbol, result-cid, fingerprint). |
542 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ | 542 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ |
543 V(_ListFactory, kArrayCid, 0x63078b15) \ | 543 V(_ListFactory, kArrayCid, 0x63078b15) \ |
544 V(_GrowableListWithData, kGrowableObjectArrayCid, 0x25a786de) \ | 544 V(_GrowableListWithData, kGrowableObjectArrayCid, 0x25a786de) \ |
545 V(_GrowableListFactory, kGrowableObjectArrayCid, 0x4f4d4790) \ | 545 V(_GrowableListFactory, kGrowableObjectArrayCid, 0x4f4d4790) \ |
546 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 0x2e7749e3) \ | 546 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 0x2e7749e3) \ |
(...skipping 14 matching lines...) Expand all Loading... |
561 // Class that recognizes factories and returns corresponding result cid. | 561 // Class that recognizes factories and returns corresponding result cid. |
562 class FactoryRecognizer : public AllStatic { | 562 class FactoryRecognizer : public AllStatic { |
563 public: | 563 public: |
564 // Return kDynamicCid if factory is not recognized. | 564 // Return kDynamicCid if factory is not recognized. |
565 static intptr_t ResultCid(const Function& factory); | 565 static intptr_t ResultCid(const Function& factory); |
566 }; | 566 }; |
567 | 567 |
568 } // namespace dart | 568 } // namespace dart |
569 | 569 |
570 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ | 570 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |