@@ -21,13 +21,13 @@ open Stdlib
2121type constant_global
2222
2323type context =
24- { constants : (Code.Var .t , Wa_ast .expression ) Hashtbl .t
24+ { constants : (Code.Var .t , Wasm_ast .expression ) Hashtbl .t
2525 ; mutable data_segments : string Code.Var.Map .t
2626 ; mutable constant_globals : constant_global Code.Var.Map .t
27- ; mutable other_fields : Wa_ast .module_field list
28- ; mutable imports : (Code.Var .t * Wa_ast .import_desc ) StringMap .t StringMap .t
27+ ; mutable other_fields : Wasm_ast .module_field list
28+ ; mutable imports : (Code.Var .t * Wasm_ast .import_desc ) StringMap .t StringMap .t
2929 ; type_names : (string , Code.Var .t ) Hashtbl .t
30- ; types : (Code.Var .t , Wa_ast .type_field ) Hashtbl .t
30+ ; types : (Code.Var .t , Wasm_ast .type_field ) Hashtbl .t
3131 ; mutable closure_envs : Code.Var .t Code.Var.Map .t
3232 (* * GC: mapping of recursive functions to their shared environment *)
3333 ; mutable apply_funs : Code.Var .t Stdlib.IntMap .t
@@ -36,31 +36,31 @@ type context =
3636 ; mutable cps_curry_funs : Code.Var .t Stdlib.IntMap .t
3737 ; mutable dummy_funs : Code.Var .t Stdlib.IntMap .t
3838 ; mutable cps_dummy_funs : Code.Var .t Stdlib.IntMap .t
39- ; mutable init_code : Wa_ast .instruction list
39+ ; mutable init_code : Wasm_ast .instruction list
4040 ; mutable string_count : int
4141 ; mutable strings : string list
4242 ; mutable string_index : int StringMap .t
4343 ; mutable fragments : Javascript .expression StringMap .t
4444 ; mutable globalized_variables : Code.Var.Set .t
45- ; value_type : Wa_ast .value_type
45+ ; value_type : Wasm_ast .value_type
4646 ; mutable unit_name : string option
4747 }
4848
49- val make_context : value_type :Wa_ast .value_type -> context
49+ val make_context : value_type :Wasm_ast .value_type -> context
5050
5151type 'a t
5252
53- type expression = Wa_ast .expression t
53+ type expression = Wasm_ast .expression t
5454
5555val ( let * ) : 'a t -> ('a -> 'b t) -> 'b t
5656
5757val return : 'a -> 'a t
5858
59- val instr : Wa_ast .instruction -> unit t
59+ val instr : Wasm_ast .instruction -> unit t
6060
6161val seq : unit t -> expression -> expression
6262
63- val expression_list : ('a -> expression ) -> 'a list -> Wa_ast .expression list t
63+ val expression_list : ('a -> expression ) -> 'a list -> Wasm_ast .expression list t
6464
6565module Arith : sig
6666 val const : int32 -> expression
@@ -106,38 +106,42 @@ module Arith : sig
106106 val eqz : expression -> expression
107107end
108108
109- val cast : ?nullable : bool -> Wa_ast .heap_type -> expression -> expression
109+ val cast : ?nullable : bool -> Wasm_ast .heap_type -> expression -> expression
110110
111- val load : Wa_ast .var -> expression
111+ val load : Wasm_ast .var -> expression
112112
113- val tee : ?typ : Wa_ast .value_type -> Wa_ast .var -> expression -> expression
113+ val tee : ?typ : Wasm_ast .value_type -> Wasm_ast .var -> expression -> expression
114114
115- val store : ?always : bool -> ?typ : Wa_ast .value_type -> Wa_ast .var -> expression -> unit t
115+ val store :
116+ ?always : bool -> ?typ : Wasm_ast .value_type -> Wasm_ast .var -> expression -> unit t
116117
117- val assign : Wa_ast .var -> expression -> unit t
118+ val assign : Wasm_ast .var -> expression -> unit t
118119
119120val drop : expression -> unit t
120121
121122val push : expression -> unit t
122123
123- val loop : Wa_ast .func_type -> unit t -> unit t
124+ val loop : Wasm_ast .func_type -> unit t -> unit t
124125
125- val block : Wa_ast .func_type -> unit t -> unit t
126+ val block : Wasm_ast .func_type -> unit t -> unit t
126127
127- val block_expr : Wa_ast .func_type -> unit t -> expression
128+ val block_expr : Wasm_ast .func_type -> unit t -> expression
128129
129- val if_ : Wa_ast .func_type -> expression -> unit t -> unit t -> unit t
130+ val if_ : Wasm_ast .func_type -> expression -> unit t -> unit t -> unit t
130131
131132val try_expr :
132- Wa_ast .func_type -> unit t -> (Code.Var .t * int * Wa_ast .value_type ) list -> expression
133+ Wasm_ast .func_type
134+ -> unit t
135+ -> (Code.Var .t * int * Wasm_ast .value_type ) list
136+ -> expression
133137
134- val add_var : ?typ : Wa_ast .value_type -> Wa_ast .var -> Wa_ast .var t
138+ val add_var : ?typ : Wasm_ast .value_type -> Wasm_ast .var -> Wasm_ast .var t
135139
136- val define_var : Wa_ast .var -> expression -> unit t
140+ val define_var : Wasm_ast .var -> expression -> unit t
137141
138- val is_small_constant : Wa_ast .expression -> bool t
142+ val is_small_constant : Wasm_ast .expression -> bool t
139143
140- val get_i31_value : Wa_ast .var -> Wa_ast .var option t
144+ val get_i31_value : Wasm_ast .var -> Wasm_ast .var option t
141145
142146val event : Parse_info .t -> unit t
143147
@@ -146,27 +150,27 @@ val no_event : unit t
146150val hidden_location : Parse_info .t
147151
148152type type_def =
149- { supertype : Wa_ast .var option
153+ { supertype : Wasm_ast .var option
150154 ; final : bool
151- ; typ : Wa_ast .str_type
155+ ; typ : Wasm_ast .str_type
152156 }
153157
154- val register_type : string -> (unit -> type_def t ) -> Wa_ast .var t
158+ val register_type : string -> (unit -> type_def t ) -> Wasm_ast .var t
155159
156- val heap_type_sub : Wa_ast .heap_type -> Wa_ast .heap_type -> bool t
160+ val heap_type_sub : Wasm_ast .heap_type -> Wasm_ast .heap_type -> bool t
157161
158162val register_import :
159- ?import_module : string -> name :string -> Wa_ast .import_desc -> Wa_ast .var t
163+ ?import_module : string -> name :string -> Wasm_ast .import_desc -> Wasm_ast .var t
160164
161165val register_global :
162- Wa_ast .var
166+ Wasm_ast .var
163167 -> ?exported_name : string
164168 -> ?constant : bool
165- -> Wa_ast .global_type
166- -> Wa_ast .expression
169+ -> Wasm_ast .global_type
170+ -> Wasm_ast .expression
167171 -> unit t
168172
169- val get_global : Code.Var .t -> Wa_ast .expression option t
173+ val get_global : Code.Var .t -> Wasm_ast .expression option t
170174
171175val register_data_segment : Code.Var .t -> string -> unit t
172176
@@ -198,4 +202,4 @@ val function_body :
198202 context :context
199203 -> param_names :Code .Var .t list
200204 -> body :unit t
201- -> (Wa_ast .var * Wa_ast .value_type ) list * Wa_ast .instruction list
205+ -> (Wasm_ast .var * Wasm_ast .value_type ) list * Wasm_ast .instruction list
0 commit comments