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 23 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 | 36 |
37 void MethodRecognizer::InitializeState() { | 37 void MethodRecognizer::InitializeState() { |
38 GrowableArray<Library*> libs(3); | 38 GrowableArray<Library*> libs(3); |
39 libs.Add(&Library::ZoneHandle(Library::CoreLibrary())); | 39 libs.Add(&Library::ZoneHandle(Library::CoreLibrary())); |
40 libs.Add(&Library::ZoneHandle(Library::CollectionLibrary())); | 40 libs.Add(&Library::ZoneHandle(Library::CollectionLibrary())); |
41 libs.Add(&Library::ZoneHandle(Library::MathLibrary())); | 41 libs.Add(&Library::ZoneHandle(Library::MathLibrary())); |
42 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); | 42 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); |
43 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); | 43 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); |
44 libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary())); | 44 libs.Add(&Library::ZoneHandle(Library::DeveloperLibrary())); |
45 Function& func = Function::Handle(); | 45 Function& func = Function::Handle(); |
46 | 46 |
47 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ | 47 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ |
48 func = Library::GetFunction(libs, #class_name, #function_name); \ | 48 func = Library::GetFunction(libs, #class_name, #function_name); \ |
49 if (func.IsNull()) { \ | 49 if (func.IsNull()) { \ |
50 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ | 50 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ |
51 UNREACHABLE(); \ | 51 UNREACHABLE(); \ |
52 } \ | 52 } \ |
53 CHECK_FINGERPRINT3(func, class_name, function_name, enum_name, fp); \ | 53 CHECK_FINGERPRINT3(func, class_name, function_name, enum_name, fp); \ |
54 func.set_recognized_kind(k##enum_name); | 54 func.set_recognized_kind(k##enum_name); |
(...skipping 23 matching lines...) Expand all Loading... |
78 INLINE_BLACK_LIST(SET_IS_NEVER_INLINE); | 78 INLINE_BLACK_LIST(SET_IS_NEVER_INLINE); |
79 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); | 79 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); |
80 | 80 |
81 #undef SET_RECOGNIZED_KIND | 81 #undef SET_RECOGNIZED_KIND |
82 #undef SET_IS_ALWAYS_INLINE | 82 #undef SET_IS_ALWAYS_INLINE |
83 #undef SET_IS_POLYMORPHIC_TARGET | 83 #undef SET_IS_POLYMORPHIC_TARGET |
84 #undef SET_FUNCTION_BIT | 84 #undef SET_FUNCTION_BIT |
85 } | 85 } |
86 | 86 |
87 } // namespace dart | 87 } // namespace dart |
OLD | NEW |