declare_folded_class NO LONGER _in_file
[hiphop-php.git] / hphp / hack / src / providers / decl_provider.mli
blob2d938c5d9020d4bd985bd75ddf30033545161185
1 (*
2 * Copyright (c) Facebook, Inc. and its affiliates.
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the "hack" directory of this source tree.
7 *)
9 (** Provides decls from the configured backend, e.g. shared memory, local memory, service, etc. *)
11 type fun_key = string
13 type type_key = string
15 type gconst_key = string
17 type module_key = string
19 module Class : sig
20 include module type of Typing_classes_heap.Api
21 end
23 type fun_decl = Typing_defs.fun_elt
25 type class_decl = Class.t
27 type typedef_decl = Typing_defs.typedef_type
29 type gconst_decl = Typing_defs.const_decl
31 type module_decl = Typing_defs.module_def_type
33 val prepare_for_typecheck :
34 Provider_context.t -> Relative_path.t -> string -> unit
36 val get_fun :
37 ?tracing_info:Decl_counters.tracing_info ->
38 Provider_context.t ->
39 fun_key ->
40 fun_decl option
42 val get_class :
43 ?tracing_info:Decl_counters.tracing_info ->
44 Provider_context.t ->
45 type_key ->
46 class_decl option
48 val get_typedef :
49 ?tracing_info:Decl_counters.tracing_info ->
50 Provider_context.t ->
51 type_key ->
52 typedef_decl option
54 val get_gconst :
55 ?tracing_info:Decl_counters.tracing_info ->
56 Provider_context.t ->
57 gconst_key ->
58 gconst_decl option
60 val get_module :
61 ?tracing_info:Decl_counters.tracing_info ->
62 Provider_context.t ->
63 module_key ->
64 module_decl option
66 (** This assumes that [class_name] defines and overrides [method_name]
67 and returns the method from an ancestor of [class_name] that would
68 have been inherited by [class_name] had it not overridden it. *)
69 val get_overridden_method :
70 Provider_context.t ->
71 class_name:type_key ->
72 method_name:string ->
73 is_static:bool ->
74 Typing_defs.class_elt option
76 val local_changes_push_sharedmem_stack : unit -> unit
78 val local_changes_pop_sharedmem_stack : unit -> unit
80 val lookup_or_populate_class_cache :
81 type_key ->
82 (type_key -> Typing_classes_heap.class_t option) ->
83 Typing_classes_heap.class_t option
85 val declare_folded_class_in_file_FOR_TESTS_ONLY :
86 Provider_context.t -> type_key -> Decl_defs.decl_class_type