Flutter Engine
The Flutter Engine
resolver.h
Go to the documentation of this 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
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_RESOLVER_H_
6#define RUNTIME_VM_RESOLVER_H_
7
8#include "vm/allocation.h"
9#include "vm/tagged_pointer.h"
10
11namespace dart {
12
13// Forward declarations.
14class Array;
15class Class;
16class Instance;
17class Library;
18class String;
19class ArgumentsDescriptor;
20
21// Resolver abstracts functionality needed to resolve dart functions at
22// invocations.
23class Resolver : public AllStatic {
24 public:
25 // If 'allow_add' is true we may add a function to the class during lookup.
26 static FunctionPtr ResolveDynamicForReceiverClass(
27 const Class& receiver_class,
28 const String& function_name,
29 const ArgumentsDescriptor& args_desc,
30 bool allow_add);
31
33 const Class& receiver_class,
34 const String& function_name,
35 const ArgumentsDescriptor& args_desc);
36
37 // If 'allow_add' is true we may add a function to the class during lookup.
38 static FunctionPtr ResolveDynamicAnyArgs(Zone* zone,
39 const Class& receiver_class,
40 const String& function_name,
41 bool allow_add);
42
43 // Resolve instance function [function_name] with any args, it doesn't
44 // allow adding methods during resolution: [allow_add] is [false].
45 static FunctionPtr ResolveDynamicFunction(Zone* zone,
46 const Class& receiver_class,
47 const String& function_name);
48 // Resolve static or instance function [function_name] with any args, it
49 // doesn't allow adding methods during resolution: [allow_add] is [false].
50 static FunctionPtr ResolveFunction(Zone* zone,
51 const Class& receiver_class,
52 const String& function_name);
53};
54
55} // namespace dart
56
57#endif // RUNTIME_VM_RESOLVER_H_
static FunctionPtr ResolveDynamicAnyArgs(Zone *zone, const Class &receiver_class, const String &function_name, bool allow_add)
Definition: resolver.cc:185
static FunctionPtr ResolveDynamicFunction(Zone *zone, const Class &receiver_class, const String &function_name)
Definition: resolver.cc:176
static FunctionPtr ResolveFunction(Zone *zone, const Class &receiver_class, const String &function_name)
Definition: resolver.cc:167
static FunctionPtr ResolveDynamicForReceiverClassAllowPrivate(const Class &receiver_class, const String &function_name, const ArgumentsDescriptor &args_desc)
Definition: resolver.cc:158
static FunctionPtr ResolveDynamicForReceiverClass(const Class &receiver_class, const String &function_name, const ArgumentsDescriptor &args_desc, bool allow_add)
Definition: resolver.cc:148
Definition: dart_vm.cc:33
const char *const function_name