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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
511 #undef DEFINE_ENUM_LIST | 511 #undef DEFINE_ENUM_LIST |
512 kNumRecognizedMethods | 512 kNumRecognizedMethods |
513 }; | 513 }; |
514 | 514 |
515 static Kind RecognizeKind(const Function& function); | 515 static Kind RecognizeKind(const Function& function); |
516 static bool AlwaysInline(const Function& function); | 516 static bool AlwaysInline(const Function& function); |
517 static bool PolymorphicTarget(const Function& function); | 517 static bool PolymorphicTarget(const Function& function); |
518 static intptr_t ResultCid(const Function& function); | 518 static intptr_t ResultCid(const Function& function); |
519 static intptr_t MethodKindToReceiverCid(Kind kind); | 519 static intptr_t MethodKindToReceiverCid(Kind kind); |
520 static const char* KindToCString(Kind kind); | 520 static const char* KindToCString(Kind kind); |
521 #if defined(DART_NO_SNAPSHOT) | |
522 static void InitializeState(); | 521 static void InitializeState(); |
523 #endif // defined(DART_NO_SNAPSHOT). | |
524 }; | 522 }; |
525 | 523 |
526 | 524 |
527 #if defined(DART_NO_SNAPSHOT) | |
Florian Schneider
2016/11/11 14:00:12
Why remove this #ifdef?
Or more general: Please m
Vyacheslav Egorov (Google)
2016/11/11 15:29:47
It is removed because now even if you run with sna
Florian Schneider
2016/11/11 15:54:25
My comments applies to all occurrences of DART_NO_
| |
528 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ | 525 #define CHECK_FINGERPRINT2(f, p0, p1, fp) \ |
529 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) | 526 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp)) |
530 | 527 |
531 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ | 528 #define CHECK_FINGERPRINT3(f, p0, p1, p2, fp) \ |
532 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) | 529 ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp)) |
533 #endif // defined(DART_NO_SNAPSHOT). | |
534 | 530 |
535 | 531 |
536 // clang-format off | 532 // clang-format off |
537 // List of recognized list factories: | 533 // List of recognized list factories: |
538 // (factory-name-symbol, result-cid, fingerprint). | 534 // (factory-name-symbol, result-cid, fingerprint). |
539 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ | 535 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ |
540 V(_ListFactory, kArrayCid, 0x63078b15) \ | 536 V(_ListFactory, kArrayCid, 0x63078b15) \ |
541 V(_GrowableListWithData, kGrowableObjectArrayCid, 0x25a786de) \ | 537 V(_GrowableListWithData, kGrowableObjectArrayCid, 0x25a786de) \ |
542 V(_GrowableListFactory, kGrowableObjectArrayCid, 0x4f4d4790) \ | 538 V(_GrowableListFactory, kGrowableObjectArrayCid, 0x4f4d4790) \ |
543 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 0x2e7749e3) \ | 539 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 0x2e7749e3) \ |
(...skipping 14 matching lines...) Expand all Loading... | |
558 // Class that recognizes factories and returns corresponding result cid. | 554 // Class that recognizes factories and returns corresponding result cid. |
559 class FactoryRecognizer : public AllStatic { | 555 class FactoryRecognizer : public AllStatic { |
560 public: | 556 public: |
561 // Return kDynamicCid if factory is not recognized. | 557 // Return kDynamicCid if factory is not recognized. |
562 static intptr_t ResultCid(const Function& factory); | 558 static intptr_t ResultCid(const Function& factory); |
563 }; | 559 }; |
564 | 560 |
565 } // namespace dart | 561 } // namespace dart |
566 | 562 |
567 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ | 563 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |