Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 // Resolve specified dart instance function.
26 static FunctionPtr ResolveDynamic(const Instance& receiver,
27 const String& function_name,
28 const ArgumentsDescriptor& args_desc);
29
30 // If 'allow_add' is true we may add a function to the class during lookup.
31 static FunctionPtr ResolveDynamicForReceiverClass(
32 const Class& receiver_class,
33 const String& function_name,
34 const ArgumentsDescriptor& args_desc,
35 bool allow_add = true);
37 const Class& receiver_class,
38 const String& function_name,
39 const ArgumentsDescriptor& args_desc,
40 bool allow_add);
41
42 // If 'allow_add' is true we may add a function to the class during lookup.
43 static FunctionPtr ResolveDynamicAnyArgs(Zone* zone,
44 const Class& receiver_class,
45 const String& function_name,
46 bool allow_add = true);
47 static FunctionPtr ResolveDynamicAnyArgsAllowPrivate(
48 Zone* zone,
49 const Class& receiver_class,
50 const String& function_name,
51 bool allow_add);
52
53 // Resolve instance function [function_name] with any args, it doesn't
54 // allow adding methods during resolution: [allow_add] is [false].
55 static FunctionPtr ResolveDynamicFunction(Zone* zone,
56 const Class& receiver_class,
57 const String& function_name);
58 // Resolve static or instance function [function_name] with any args, it
59 // doesn't allow adding methods during resolution: [allow_add] is [false].
60 static FunctionPtr ResolveFunction(Zone* zone,
61 const Class& receiver_class,
62 const String& function_name);
63};
64
65} // namespace dart
66
67#endif // RUNTIME_VM_RESOLVER_H_
static FunctionPtr ResolveDynamicFunction(Zone *zone, const Class &receiver_class, const String &function_name)
Definition resolver.cc:189
static FunctionPtr ResolveFunction(Zone *zone, const Class &receiver_class, const String &function_name)
Definition resolver.cc:180
static FunctionPtr ResolveDynamicForReceiverClassAllowPrivate(const Class &receiver_class, const String &function_name, const ArgumentsDescriptor &args_desc, bool allow_add)
Definition resolver.cc:170
static FunctionPtr ResolveDynamicAnyArgs(Zone *zone, const Class &receiver_class, const String &function_name, bool allow_add=true)
Definition resolver.cc:198
static FunctionPtr ResolveDynamicForReceiverClass(const Class &receiver_class, const String &function_name, const ArgumentsDescriptor &args_desc, bool allow_add=true)
Definition resolver.cc:160
static FunctionPtr ResolveDynamicAnyArgsAllowPrivate(Zone *zone, const Class &receiver_class, const String &function_name, bool allow_add)
Definition resolver.cc:207
static FunctionPtr ResolveDynamic(const Instance &receiver, const String &function_name, const ArgumentsDescriptor &args_desc)
Definition resolver.cc:25
const char *const function_name