Wasm_of_ocaml_compiler.Code_generationtype context = {constants : Wasm_ast.expression Js_of_ocaml_compiler.Code.Var.Hashtbl.t;mutable data_segments : string Js_of_ocaml_compiler.Code.Var.Map.t;mutable constant_globals : constant_global Js_of_ocaml_compiler.Code.Var.Map.t;mutable other_fields : Wasm_ast.module_field list;mutable imports : (Js_of_ocaml_compiler.Code.Var.t * Wasm_ast.import_desc)
Js_of_ocaml_compiler.Stdlib.StringMap.t
Js_of_ocaml_compiler.Stdlib.StringMap.t;type_names : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.String.Hashtbl.t;types : Wasm_ast.type_field Js_of_ocaml_compiler.Code.Var.Hashtbl.t;mutable closure_envs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Code.Var.Map.t;GC: mapping of recursive functions to their shared environment
*)closure_types : (Wasm_ast.value_type option list, int)
Js_of_ocaml_compiler.Stdlib.Hashtbl.t;mutable apply_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable cps_apply_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable curry_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable cps_curry_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable dummy_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable cps_dummy_funs : Js_of_ocaml_compiler.Code.Var.t
Js_of_ocaml_compiler.Stdlib.IntMap.t;mutable init_code : Wasm_ast.instruction list;mutable fragments : Js_of_ocaml_compiler.Javascript.expression
Js_of_ocaml_compiler.Stdlib.StringMap.t;mutable globalized_variables : Js_of_ocaml_compiler.Code.Var.Set.t;value_type : Wasm_ast.value_type;mutable unit_name : string option;}val make_context : value_type:Wasm_ast.value_type -> contexttype expression = Wasm_ast.expression tval return : 'a -> 'a tval instr : Wasm_ast.instruction -> unit tval seq : unit t -> expression -> expressionmodule Arith : sig ... endval cast : ?nullable:bool -> Wasm_ast.heap_type -> expression -> expressionval load : Wasm_ast.var -> expressionval tee : ?typ:Wasm_ast.value_type -> Wasm_ast.var -> expression -> expressionval store :
?always:bool ->
?typ:Wasm_ast.value_type ->
Wasm_ast.var ->
expression ->
unit tval assign : Wasm_ast.var -> expression -> unit tval drop : expression -> unit tval push : expression -> unit tval loop : Wasm_ast.func_type -> unit t -> unit tval block : Wasm_ast.func_type -> unit t -> unit tval block_expr : Wasm_ast.func_type -> unit t -> expressionval if_ : Wasm_ast.func_type -> expression -> unit t -> unit t -> unit tval try_expr :
Wasm_ast.func_type ->
unit t ->
(Js_of_ocaml_compiler.Code.Var.t * int * Wasm_ast.value_type) list ->
expressionval add_var : ?typ:Wasm_ast.value_type -> Wasm_ast.var -> Wasm_ast.var tval define_var : Wasm_ast.var -> expression -> unit tval is_small_constant : Wasm_ast.expression -> bool tval event : Js_of_ocaml_compiler.Parse_info.t -> unit tval no_event : unit tval register_type : string -> (unit -> type_def t) -> Wasm_ast.var tval heap_type_sub : Wasm_ast.heap_type -> Wasm_ast.heap_type -> bool tval register_import :
?import_module:string ->
name:string ->
Wasm_ast.import_desc ->
Wasm_ast.var tval register_global :
Wasm_ast.var ->
?exported_name:string ->
?constant:bool ->
Wasm_ast.global_type ->
Wasm_ast.expression ->
unit tval get_global :
Js_of_ocaml_compiler.Code.Var.t ->
Wasm_ast.expression option tval register_data_segment : Js_of_ocaml_compiler.Code.Var.t -> string -> unit tval register_fragment :
string ->
(unit -> Js_of_ocaml_compiler.Javascript.expression) ->
unit tval set_closure_env :
Js_of_ocaml_compiler.Code.Var.t ->
Js_of_ocaml_compiler.Code.Var.t ->
unit tval get_closure_env :
Js_of_ocaml_compiler.Code.Var.t ->
Js_of_ocaml_compiler.Code.Var.t tval is_closure : Js_of_ocaml_compiler.Code.Var.t -> bool tval unit_name : string option tval need_apply_fun : cps:bool -> arity:int -> Js_of_ocaml_compiler.Code.Var.t tval need_curry_fun : cps:bool -> arity:int -> Js_of_ocaml_compiler.Code.Var.t tval need_dummy_fun : cps:bool -> arity:int -> Js_of_ocaml_compiler.Code.Var.t tval function_body :
context:context ->
param_names:Js_of_ocaml_compiler.Code.Var.t list ->
body:unit t ->
(Wasm_ast.var * Wasm_ast.value_type) list * Wasm_ast.instruction listval variable_type :
Js_of_ocaml_compiler.Code.Var.t ->
Wasm_ast.value_type option tval array_placeholder : Js_of_ocaml_compiler.Code.Var.t -> expressionval default_value :
Wasm_ast.value_type ->
(Wasm_ast.expression * Wasm_ast.value_type * Wasm_ast.ref_type option) t