diff --git a/ml-proto/Makefile b/ml-proto/Makefile index a09b56d80f..6da0ff535d 100644 --- a/ml-proto/Makefile +++ b/ml-proto/Makefile @@ -7,7 +7,7 @@ NAME = wasm NAME_OPT = $(NAME).opt NAME_UNOPT = $(NAME) -DIRS = given host spec +DIRS = given host host/import spec LIBS = str bigarray OCB_FLAGS += # -use-ocamlfind diff --git a/ml-proto/README.md b/ml-proto/README.md index f947c479d1..b9672073a3 100644 --- a/ml-proto/README.md +++ b/ml-proto/README.md @@ -190,6 +190,14 @@ The representation for that kernel language AST is defined in [kernel.ml](https: ## Implementation +The implementation is split into three directories: + +* `spec`: the part of the implementation that corresponds to the actual language specification. + +* `host`: infrastructure for loading and running scripts, parsing S-expressions, and defining host environment modules. + +* `given`: auxiliary libraries. + The implementation consists of the following parts: * *Abstract Syntax* (`ast.ml`, `kernel.ml`, `types.ml`, `source.ml[i]`). Notably, the `phrase` wrapper type around each AST node carries the source position information. diff --git a/ml-proto/host/builtins.ml b/ml-proto/host/builtins.ml deleted file mode 100644 index fa71eba696..0000000000 --- a/ml-proto/host/builtins.ml +++ /dev/null @@ -1,25 +0,0 @@ -open Source -open Kernel -open Types - -module Unknown = Error.Make () -exception Unknown = Unknown.Error (* indicates unknown import name *) - -module Spectest = -struct - let print vs = - List.iter Print.print_value (List.map (fun v -> Some v) vs); - None -end - -let match_import m i = - let {module_name; func_name; itype} = i.it in - let {ins; out} = List.nth m.it.types itype.it in - match module_name, func_name, ins, out with - | "spectest", "print", _, None -> Spectest.print - | _ -> - Unknown.error i.at - ("no import \"" ^ module_name ^ "." ^ func_name ^ "\" of requested type") - -let match_imports m = List.map (match_import m) m.it.imports - diff --git a/ml-proto/host/builtins.mli b/ml-proto/host/builtins.mli deleted file mode 100644 index 87057790a9..0000000000 --- a/ml-proto/host/builtins.mli +++ /dev/null @@ -1,3 +0,0 @@ -exception Unknown of Source.region * string - -val match_imports : Kernel.module_ -> Eval.import list (* raises Unknown *) diff --git a/ml-proto/host/import.ml b/ml-proto/host/import.ml new file mode 100644 index 0000000000..ebd0969816 --- /dev/null +++ b/ml-proto/host/import.ml @@ -0,0 +1,21 @@ +open Source +open Kernel +open Values +open Types + +module Unknown = Error.Make () +exception Unknown = Unknown.Error (* indicates unknown import name *) + +module Registry = Map.Make(String) +let registry = ref Registry.empty + +let register name lookup = registry := Registry.add name lookup !registry + +let lookup m i = + let {module_name; func_name; itype} = i.it in + let ty = List.nth m.it.types itype.it in + try Registry.find module_name !registry func_name ty with Not_found -> + Unknown.error i.at + ("no function \"" ^ module_name ^ "." ^ func_name ^ "\" of requested type") + +let link m = List.map (lookup m) m.it.imports diff --git a/ml-proto/host/import.mli b/ml-proto/host/import.mli new file mode 100644 index 0000000000..a882eda6d6 --- /dev/null +++ b/ml-proto/host/import.mli @@ -0,0 +1,4 @@ +exception Unknown of Source.region * string + +val link : Kernel.module_ -> Eval.import list (* raises Unknown *) +val register: string -> (string -> Types.func_type -> Values.func) -> unit diff --git a/ml-proto/host/import/env.ml b/ml-proto/host/import/env.ml new file mode 100644 index 0000000000..ad4bbfc2a1 --- /dev/null +++ b/ml-proto/host/import/env.ml @@ -0,0 +1,44 @@ +(* + * Emulation of (a subset of) the `env` module currently used by Binaryen, + * so that we can run modules generated by Binaryen. + *) + +open Values +open Types + + +let error msg = raise (Eval.Crash (Source.no_region, msg)) + +let type_error v t = + error + ("type error, expected " ^ string_of_value_type t ^ + ", got " ^ string_of_value_type (type_of v)) + +let empty = function + | [] -> () + | vs -> error "type error, too many arguments" + +let single = function + | [] -> error "type error, missing arguments" + | [v] -> v + | vs -> error "type error, too many arguments" + +let int = function + | Int32 i -> Int32.to_int i + | v -> type_error v Int32Type + + +let abort vs = + empty vs; + print_endline "Abort!"; + exit (-1) + +let exit vs = + exit (int (single vs)) + + +let lookup name ty = + match name, ty.ins, ty.out with + | "abort", [], None -> abort + | "exit", [Int32Type], None -> exit + | _ -> raise Not_found diff --git a/ml-proto/host/import/spectest.ml b/ml-proto/host/import/spectest.ml new file mode 100644 index 0000000000..6b03ba8c6a --- /dev/null +++ b/ml-proto/host/import/spectest.ml @@ -0,0 +1,16 @@ +(* + * Simple collection of functions useful for writing test cases. + *) + +open Types + + +let print vs = + List.iter Print.print_value (List.map (fun v -> Some v) vs); + None + + +let lookup name ty = + match name, ty.ins, ty.out with + | "print", _, None -> print + | _ -> raise Not_found diff --git a/ml-proto/host/main.ml b/ml-proto/host/main.ml index 96573ffcbd..87b1b7c448 100644 --- a/ml-proto/host/main.ml +++ b/ml-proto/host/main.ml @@ -1,6 +1,10 @@ let name = "wasm" let version = "0.2" +let configure () = + Import.register "spectest" Spectest.lookup; + Import.register "env" Env.lookup + let banner () = print_endline (name ^ " " ^ version ^ " spec interpreter") @@ -32,7 +36,7 @@ let process file lexbuf start = | Check.Invalid (at, msg) -> error at "invalid module" msg | Eval.Trap (at, msg) -> error at "runtime trap" msg | Eval.Crash (at, msg) -> error at "runtime crash" msg - | Builtins.Unknown (at, msg) -> error at "unknown built-in" msg + | Import.Unknown (at, msg) -> error at "unknown import" msg let process_file file = Script.trace ("Loading (" ^ file ^ ")..."); @@ -89,6 +93,7 @@ let argspec = Arg.align let () = Printexc.record_backtrace true; try + configure (); let files = ref [] in Arg.parse argspec (fun file -> files := !files @ [file]) usage; if !files = [] then Flags.interactive := true; diff --git a/ml-proto/host/script.ml b/ml-proto/host/script.ml index 352fe16394..98f6f0063e 100644 --- a/ml-proto/host/script.ml +++ b/ml-proto/host/script.ml @@ -57,7 +57,7 @@ let run_cmd cmd = Print.print_module_sig m end; trace "Initializing..."; - let imports = Builtins.match_imports m in + let imports = Import.link m in let host_params = { Eval.has_feature = Params.has_feature } in diff --git a/ml-proto/spec/check.ml b/ml-proto/spec/check.ml index 35f6b54f15..f9db90cb5d 100644 --- a/ml-proto/spec/check.ml +++ b/ml-proto/spec/check.ml @@ -151,18 +151,18 @@ let rec check_expr c et e = | Call (x, es) -> let {ins; out} = func c x in - check_exprs c ins es; + check_exprs c ins es e.at; check_type out et e.at | CallImport (x, es) -> let {ins; out} = import c x in - check_exprs c ins es; + check_exprs c ins es e.at; check_type out et e.at | CallIndirect (x, e1, es) -> let {ins; out} = type_ c.types x in check_expr c (Some Int32Type) e1; - check_exprs c ins es; + check_exprs c ins es e.at; check_type out et e.at | GetLocal x -> @@ -221,13 +221,13 @@ let rec check_expr c et e = | Host (hostop, es) -> let {ins; out}, has_mem = type_hostop hostop in if has_mem then check_has_memory c e.at; - check_exprs c ins es; + check_exprs c ins es e.at; check_type out et e.at -and check_exprs c ts es = +and check_exprs c ts es at = let ets = List.map (fun x -> Some x) ts in try List.iter2 (check_expr c) ets es - with Invalid_argument _ -> error (Source.ats es) "arity mismatch" + with Invalid_argument _ -> error at "arity mismatch" and check_expr_opt c et eo at = match et, eo with diff --git a/ml-proto/spec/eval.ml b/ml-proto/spec/eval.ml index 3acb624593..072298de00 100644 --- a/ml-proto/spec/eval.ml +++ b/ml-proto/spec/eval.ml @@ -178,7 +178,7 @@ let rec eval_expr (c : config) (e : expr) = | CallImport (x, es) -> let vs = List.map (fun ev -> some (eval_expr c ev) ev.at) es in - (import c x) vs + (try (import c x) vs with Crash (_, msg) -> Crash.error e.at msg) | CallIndirect (ftype, e1, es) -> let i = int32 (eval_expr c e1) e1.at in diff --git a/ml-proto/spec/values.ml b/ml-proto/spec/values.ml index 5f6838379d..353b943fb2 100644 --- a/ml-proto/spec/values.ml +++ b/ml-proto/spec/values.ml @@ -7,6 +7,7 @@ type ('i32, 'i64, 'f32, 'f64) op = Int32 of 'i32 | Int64 of 'i64 | Float32 of 'f32 | Float64 of 'f64 type value = (I32.t, I64.t, F32.t, F64.t) op +type func = value list -> value option (* Typing *) diff --git a/ml-proto/winmake.bat b/ml-proto/winmake.bat index 6c9a314d01..18fb5d6b2e 100644 --- a/ml-proto/winmake.bat +++ b/ml-proto/winmake.bat @@ -1,68 +1,72 @@ rem Auto-generated from Makefile! set NAME=wasm if '%1' neq '' set NAME=%1 -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/float.cmo spec/float.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/numerics.cmi spec/numerics.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/int.cmo spec/int.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/types.cmo spec/types.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/f32.cmo spec/f32.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/f64.cmo spec/f64.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/i32.cmo spec/i32.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/i64.cmo spec/i64.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/values.cmo spec/values.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/memory.cmi spec/memory.mli -ocamlc.opt -c -bin-annot -I given -I spec -I host -o given/source.cmi given/source.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/kernel.cmo spec/kernel.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/eval.cmi spec/eval.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/float.cmo spec/float.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/numerics.cmi spec/numerics.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/int.cmo spec/int.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/types.cmo spec/types.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/f32.cmo spec/f32.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/f64.cmo spec/f64.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/i32.cmo spec/i32.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/i64.cmo spec/i64.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/values.cmo spec/values.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/memory.cmi spec/memory.mli +ocamlc.opt -c -bin-annot -I given -I spec -I host -I host/import -o given/source.cmi given/source.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/kernel.cmo spec/kernel.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/eval.cmi spec/eval.mli ocamlyacc host/parser.mly -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/ast.cmo spec/ast.ml -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/script.cmi host/script.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/parser.cmi host/parser.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/builtins.cmi host/builtins.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/check.cmi spec/check.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/flags.cmo host/flags.ml -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/lexer.cmi host/lexer.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/main.cmo host/main.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/main.d.cmo host/main.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/error.cmi spec/error.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/print.cmi host/print.mli -ocamlc.opt -c -bin-annot -I given -I spec -I host -o given/lib.cmi given/lib.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/arithmetic.cmi spec/arithmetic.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/ast.cmo spec/ast.ml +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/script.cmi host/script.mli +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/parser.cmi host/parser.mli +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/print.cmi host/print.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/check.cmi spec/check.mli +ocamlc.opt -c -bin-annot -I host/import -I spec -I given -I host -o host/import/env.cmo host/import/env.ml +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/flags.cmo host/flags.ml +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/import.cmi host/import.mli +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/lexer.cmi host/lexer.mli +ocamlc.opt -c -bin-annot -I host/import -I spec -I given -I host -o host/import/spectest.cmo host/import/spectest.ml +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/main.cmo host/main.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/main.d.cmo host/main.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/error.cmi spec/error.mli +ocamlc.opt -c -bin-annot -I given -I spec -I host -I host/import -o given/lib.cmi given/lib.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/arithmetic.cmi spec/arithmetic.mli ocamllex.opt -q host/lexer.mll -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/desugar.cmi spec/desugar.mli -ocamlc.opt -c -bin-annot -I host -I spec -I given -o host/params.cmo host/params.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/builtins.d.cmo host/builtins.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/check.d.cmo spec/check.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/eval.d.cmo spec/eval.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/flags.d.cmo host/flags.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/lexer.d.cmo host/lexer.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/parser.d.cmo host/parser.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/script.d.cmo host/script.ml -ocamlc.opt -c -g -bin-annot -I given -I spec -I host -o given/source.d.cmo given/source.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/error.d.cmo spec/error.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/kernel.d.cmo spec/kernel.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/print.d.cmo host/print.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/types.d.cmo spec/types.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/memory.d.cmo spec/memory.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/values.d.cmo spec/values.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/f32.d.cmo spec/f32.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/f64.d.cmo spec/f64.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/i64.d.cmo spec/i64.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/float.d.cmo spec/float.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/int.d.cmo spec/int.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/numerics.d.cmo spec/numerics.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/i32.d.cmo spec/i32.ml -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/f32_convert.cmi spec/f32_convert.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/f64_convert.cmi spec/f64_convert.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/i32_convert.cmi spec/i32_convert.mli -ocamlc.opt -c -bin-annot -I spec -I host -I given -o spec/i64_convert.cmi spec/i64_convert.mli -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/arithmetic.d.cmo spec/arithmetic.ml -ocamlc.opt -c -g -bin-annot -I given -I spec -I host -o given/lib.d.cmo given/lib.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/f32_convert.d.cmo spec/f32_convert.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/f64_convert.d.cmo spec/f64_convert.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/i32_convert.d.cmo spec/i32_convert.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/i64_convert.d.cmo spec/i64_convert.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/ast.d.cmo spec/ast.ml -ocamlc.opt -c -g -bin-annot -I spec -I host -I given -o spec/desugar.d.cmo spec/desugar.ml -ocamlc.opt -c -g -bin-annot -I host -I spec -I given -o host/params.d.cmo host/params.ml -ocamlc.opt str.cma bigarray.cma -g given/source.d.cmo spec/float.d.cmo spec/f32.d.cmo spec/f64.d.cmo spec/numerics.d.cmo spec/int.d.cmo spec/i64.d.cmo spec/types.d.cmo spec/i32.d.cmo spec/values.d.cmo spec/memory.d.cmo spec/kernel.d.cmo host/print.d.cmo spec/error.d.cmo given/lib.d.cmo spec/i32_convert.d.cmo spec/f32_convert.d.cmo spec/i64_convert.d.cmo spec/f64_convert.d.cmo spec/arithmetic.d.cmo spec/eval.d.cmo host/builtins.d.cmo host/flags.d.cmo host/params.d.cmo spec/ast.d.cmo spec/check.d.cmo spec/desugar.d.cmo host/script.d.cmo host/parser.d.cmo host/lexer.d.cmo host/main.d.cmo -o %NAME% +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/desugar.cmi spec/desugar.mli +ocamlc.opt -c -bin-annot -I host -I spec -I given -I host/import -o host/params.cmo host/params.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/check.d.cmo spec/check.ml +ocamlc.opt -c -g -bin-annot -I host/import -I spec -I given -I host -o host/import/env.d.cmo host/import/env.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/eval.d.cmo spec/eval.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/flags.d.cmo host/flags.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/import.d.cmo host/import.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/lexer.d.cmo host/lexer.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/parser.d.cmo host/parser.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/script.d.cmo host/script.ml +ocamlc.opt -c -g -bin-annot -I given -I spec -I host -I host/import -o given/source.d.cmo given/source.ml +ocamlc.opt -c -g -bin-annot -I host/import -I spec -I given -I host -o host/import/spectest.d.cmo host/import/spectest.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/error.d.cmo spec/error.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/kernel.d.cmo spec/kernel.ml +ocamlc.opt -c -g -bin-annot -I given -I spec -I host -I host/import -o given/lib.d.cmo given/lib.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/memory.d.cmo spec/memory.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/types.d.cmo spec/types.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/values.d.cmo spec/values.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/f32.d.cmo spec/f32.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/f64.d.cmo spec/f64.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/i64.d.cmo spec/i64.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/float.d.cmo spec/float.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/int.d.cmo spec/int.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/numerics.d.cmo spec/numerics.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/i32.d.cmo spec/i32.ml +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/f32_convert.cmi spec/f32_convert.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/f64_convert.cmi spec/f64_convert.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/i32_convert.cmi spec/i32_convert.mli +ocamlc.opt -c -bin-annot -I spec -I given -I host -I host/import -o spec/i64_convert.cmi spec/i64_convert.mli +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/arithmetic.d.cmo spec/arithmetic.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/f32_convert.d.cmo spec/f32_convert.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/f64_convert.d.cmo spec/f64_convert.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/i32_convert.d.cmo spec/i32_convert.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/i64_convert.d.cmo spec/i64_convert.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/ast.d.cmo spec/ast.ml +ocamlc.opt -c -g -bin-annot -I spec -I given -I host -I host/import -o spec/desugar.d.cmo spec/desugar.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/params.d.cmo host/params.ml +ocamlc.opt -c -g -bin-annot -I host -I spec -I given -I host/import -o host/print.d.cmo host/print.ml +ocamlc.opt str.cma bigarray.cma -g given/source.d.cmo host/flags.d.cmo spec/error.d.cmo given/lib.d.cmo spec/float.d.cmo spec/f32.d.cmo spec/f64.d.cmo spec/numerics.d.cmo spec/int.d.cmo spec/i32.d.cmo spec/i64.d.cmo spec/i32_convert.d.cmo spec/f32_convert.d.cmo spec/i64_convert.d.cmo spec/f64_convert.d.cmo spec/types.d.cmo spec/values.d.cmo spec/memory.d.cmo spec/kernel.d.cmo spec/arithmetic.d.cmo spec/eval.d.cmo host/import.d.cmo host/import/env.d.cmo host/print.d.cmo host/import/spectest.d.cmo host/params.d.cmo spec/ast.d.cmo spec/check.d.cmo spec/desugar.d.cmo host/script.d.cmo host/parser.d.cmo host/lexer.d.cmo host/main.d.cmo -o %NAME%