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 19 matching lines...) Expand all Loading... |
30 if (kind == k##enum_name) return #enum_name; | 30 if (kind == k##enum_name) return #enum_name; |
31 RECOGNIZED_LIST(KIND_TO_STRING) | 31 RECOGNIZED_LIST(KIND_TO_STRING) |
32 #undef KIND_TO_STRING | 32 #undef KIND_TO_STRING |
33 return "?"; | 33 return "?"; |
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::MathLibrary())); | 41 libs.Add(&Library::ZoneHandle(Library::MathLibrary())); |
41 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); | 42 libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); |
42 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); | 43 libs.Add(&Library::ZoneHandle(Library::InternalLibrary())); |
43 libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary())); | 44 libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary())); |
44 Function& func = Function::Handle(); | 45 Function& func = Function::Handle(); |
45 | 46 |
46 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ | 47 #define SET_RECOGNIZED_KIND(class_name, function_name, enum_name, fp) \ |
47 func = Library::GetFunction(libs, #class_name, #function_name); \ | 48 func = Library::GetFunction(libs, #class_name, #function_name); \ |
48 if (func.IsNull()) { \ | 49 if (func.IsNull()) { \ |
49 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ | 50 OS::PrintErr("Missing %s::%s\n", #class_name, #function_name); \ |
(...skipping 27 matching lines...) Expand all Loading... |
77 INLINE_BLACK_LIST(SET_IS_NEVER_INLINE); | 78 INLINE_BLACK_LIST(SET_IS_NEVER_INLINE); |
78 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); | 79 POLYMORPHIC_TARGET_LIST(SET_IS_POLYMORPHIC_TARGET); |
79 | 80 |
80 #undef SET_RECOGNIZED_KIND | 81 #undef SET_RECOGNIZED_KIND |
81 #undef SET_IS_ALWAYS_INLINE | 82 #undef SET_IS_ALWAYS_INLINE |
82 #undef SET_IS_POLYMORPHIC_TARGET | 83 #undef SET_IS_POLYMORPHIC_TARGET |
83 #undef SET_FUNCTION_BIT | 84 #undef SET_FUNCTION_BIT |
84 } | 85 } |
85 | 86 |
86 } // namespace dart | 87 } // namespace dart |
OLD | NEW |