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 RUNTIME_VM_RESOLVER_H_ | 5 #ifndef RUNTIME_VM_RESOLVER_H_ |
6 #define RUNTIME_VM_RESOLVER_H_ | 6 #define RUNTIME_VM_RESOLVER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 18 matching lines...) Expand all Loading... |
29 const ArgumentsDescriptor& args_desc); | 29 const ArgumentsDescriptor& args_desc); |
30 | 30 |
31 // If 'allow_add' is true we may add a function to the class during lookup. | 31 // If 'allow_add' is true we may add a function to the class during lookup. |
32 static RawFunction* ResolveDynamicForReceiverClass( | 32 static RawFunction* ResolveDynamicForReceiverClass( |
33 const Class& receiver_class, | 33 const Class& receiver_class, |
34 const String& function_name, | 34 const String& function_name, |
35 const ArgumentsDescriptor& args_desc, | 35 const ArgumentsDescriptor& args_desc, |
36 bool allow_add = true); | 36 bool allow_add = true); |
37 | 37 |
38 // If 'allow_add' is true we may add a function to the class during lookup. | 38 // If 'allow_add' is true we may add a function to the class during lookup. |
39 static RawFunction* ResolveDynamicAnyArgs( | 39 static RawFunction* ResolveDynamicAnyArgs(Zone* zone, |
40 Zone* zone, | 40 const Class& receiver_class, |
41 const Class& receiver_class, | 41 const String& function_name, |
42 const String& function_name, | 42 bool allow_add = true); |
43 bool allow_add = true); | |
44 | 43 |
45 // Resolve specified dart static function. If library.IsNull, use | 44 // Resolve specified dart static function. If library.IsNull, use |
46 // either application library or core library if no application library | 45 // either application library or core library if no application library |
47 // exists. Passing negative num_arguments means that the function | 46 // exists. Passing negative num_arguments means that the function |
48 // will be resolved by name only. | 47 // will be resolved by name only. |
49 // Otherwise null is returned if the number or names of arguments are not | 48 // Otherwise null is returned if the number or names of arguments are not |
50 // valid for the resolved function. | 49 // valid for the resolved function. |
51 static RawFunction* ResolveStatic(const Library& library, | 50 static RawFunction* ResolveStatic(const Library& library, |
52 const String& cls_name, | 51 const String& cls_name, |
53 const String& function_name, | 52 const String& function_name, |
54 intptr_t num_arguments, | 53 intptr_t num_arguments, |
55 const Array& argument_names); | 54 const Array& argument_names); |
56 | 55 |
57 // Resolve specified dart static function with specified arity. Only resolves | 56 // Resolve specified dart static function with specified arity. Only resolves |
58 // public functions. | 57 // public functions. |
59 static RawFunction* ResolveStatic(const Class& cls, | 58 static RawFunction* ResolveStatic(const Class& cls, |
60 const String& function_name, | 59 const String& function_name, |
61 intptr_t num_arguments, | 60 intptr_t num_arguments, |
62 const Array& argument_names); | 61 const Array& argument_names); |
63 | 62 |
64 // Resolve specified dart static function with specified arity. Resolves both | 63 // Resolve specified dart static function with specified arity. Resolves both |
65 // public and private functions. | 64 // public and private functions. |
66 static RawFunction* ResolveStaticAllowPrivate(const Class& cls, | 65 static RawFunction* ResolveStaticAllowPrivate(const Class& cls, |
67 const String& function_name, | 66 const String& function_name, |
68 intptr_t num_arguments, | 67 intptr_t num_arguments, |
69 const Array& argument_names); | 68 const Array& argument_names); |
70 }; | 69 }; |
71 | 70 |
72 } // namespace dart | 71 } // namespace dart |
73 | 72 |
74 #endif // RUNTIME_VM_RESOLVER_H_ | 73 #endif // RUNTIME_VM_RESOLVER_H_ |
OLD | NEW |