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 #include "vm/method_recognizer.h" | 5 #include "vm/method_recognizer.h" |
6 | 6 |
7 #include "vm/object.h" | 7 #include "vm/object.h" |
8 #include "vm/symbols.h" | 8 #include "vm/symbols.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 | 41 |
42 #if defined(DART_NO_SNAPSHOT) | 42 #if defined(DART_NO_SNAPSHOT) |
43 void MethodRecognizer::InitializeState() { | 43 void MethodRecognizer::InitializeState() { |
44 GrowableArray<Library*> libs(3); | 44 GrowableArray<Library*> libs(3); |
45 libs.Add(&Library::ZoneHandle(Library::CoreLibrary())); | 45 libs.Add(&Library::ZoneHandle(Library::CoreLibrary())); |
46 libs.Add(&Library::ZoneHandle(Library::CollectionLibrary())); | 46 libs.Add(&Library::ZoneHandle(Library::CollectionLibrary())); |
47 libs.Add(&Library::ZoneHandle(Library::MathLibrary())); | 47 libs.Add(&Library::ZoneHandle(Library::MathLibrary())); |
48 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); | 48 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); |
49 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); | 49 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); |
50 libs.Add(&Library::ZoneHandle(Library::DeveloperLibrary())); | 50 libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary())); |
51 Function& func = Function::Handle(); | 51 Function& func = Function::Handle(); |
52 | 52 |
53 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ | 53 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ |
54 func = Library::GetFunction(libs, #class_name, #function_name); \ | 54 func = Library::GetFunction(libs, #class_name, #function_name); \ |
55 if (func.IsNull()) { \ | 55 if (func.IsNull()) { \ |
56 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ | 56 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ |
57 UNREACHABLE(); \ | 57 UNREACHABLE(); \ |
58 } \ | 58 } \ |
59 CHECK_FINGERPRINT3(func, class_name, function_name, enum_name, fp); \ | 59 CHECK_FINGERPRINT3(func, class_name, function_name, enum_name, fp); \ |
60 func.set_recognized_kind(k##enum_name); | 60 func.set_recognized_kind(k##enum_name); |
(...skipping 24 matching lines...) Expand all Loading... |
85 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); | 85 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); |
86 | 86 |
87 #undef SET_RECOGNIZED_KIND | 87 #undef SET_RECOGNIZED_KIND |
88 #undef SET_IS_ALWAYS_INLINE | 88 #undef SET_IS_ALWAYS_INLINE |
89 #undef SET_IS_POLYMORPHIC_TARGET | 89 #undef SET_IS_POLYMORPHIC_TARGET |
90 #undef SET_FUNCTION_BIT | 90 #undef SET_FUNCTION_BIT |
91 } | 91 } |
92 #endif // defined(DART_NO_SNAPSHOT). | 92 #endif // defined(DART_NO_SNAPSHOT). |
93 | 93 |
94 } // namespace dart | 94 } // namespace dart |
OLD | NEW |