OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 VM_RESOLVER_H_ | 5 #ifndef VM_RESOLVER_H_ |
6 #define VM_RESOLVER_H_ | 6 #define VM_RESOLVER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 static RawFunction* ResolveDynamicForReceiverClass( | 31 static RawFunction* ResolveDynamicForReceiverClass( |
32 const Class& receiver_class, | 32 const Class& receiver_class, |
33 const String& function_name, | 33 const String& function_name, |
34 const ArgumentsDescriptor& args_desc); | 34 const ArgumentsDescriptor& args_desc); |
35 | 35 |
36 static RawFunction* ResolveDynamicAnyArgs( | 36 static RawFunction* ResolveDynamicAnyArgs( |
37 const Class& receiver_class, | 37 const Class& receiver_class, |
38 const String& function_name); | 38 const String& function_name); |
39 | 39 |
40 enum StaticResolveType { | |
41 kIsQualified, | |
42 kNotQualified | |
43 }; | |
44 | |
45 // Resolve specified dart static function. If library.IsNull, use | 40 // Resolve specified dart static function. If library.IsNull, use |
46 // either application library or core library if no application library | 41 // either application library or core library if no application library |
47 // exists. Passing negative num_arguments means that the function | 42 // exists. Passing negative num_arguments means that the function |
48 // will be resolved by name only. | 43 // will be resolved by name only. |
49 // Otherwise null is returned if the number or names of arguments are not | 44 // Otherwise null is returned if the number or names of arguments are not |
50 // valid for the resolved function. | 45 // valid for the resolved function. |
51 static RawFunction* ResolveStatic(const Library& library, | 46 static RawFunction* ResolveStatic(const Library& library, |
52 const String& cls_name, | 47 const String& cls_name, |
53 const String& function_name, | 48 const String& function_name, |
54 intptr_t num_arguments, | 49 intptr_t num_arguments, |
55 const Array& argument_names, | 50 const Array& argument_names); |
56 StaticResolveType resolve_type); | |
57 | |
58 // Resolve specified dart static function. | |
59 static RawFunction* ResolveStaticByName(const Class& cls, | |
60 const String& function_name, | |
61 StaticResolveType resolve_type); | |
62 | 51 |
63 // Resolve specified dart static function with specified arity. | 52 // Resolve specified dart static function with specified arity. |
64 static RawFunction* ResolveStatic(const Class& cls, | 53 static RawFunction* ResolveStatic(const Class& cls, |
65 const String& function_name, | 54 const String& function_name, |
66 intptr_t num_arguments, | 55 intptr_t num_arguments, |
67 const Array& argument_names, | 56 const Array& argument_names); |
68 StaticResolveType resolve_type); | |
69 }; | 57 }; |
70 | 58 |
71 } // namespace dart | 59 } // namespace dart |
72 | 60 |
73 #endif // VM_RESOLVER_H_ | 61 #endif // VM_RESOLVER_H_ |
OLD | NEW |