compile.mli 621 Bytes
Newer Older
1 2
(* From Ast to Lambda. *)

3
open Ident 
4
open Lambda
5 6

type env
7
val global_size: env -> int
8

9
val empty : Compunit.t -> env
10
val empty_toplevel : env
11

12
val find : id -> env -> var_loc
13
val find_slot : id -> env -> int
14

15
val compile_eval_expr : env -> Typed.texpr -> Value.t
16

17 18 19
val comp_unit:
  ?run:bool ->
  ?show:(id option -> Types.t -> Value.t option -> unit) ->
20
  ?loading:(Compunit.t -> unit) ->
21 22
  ?directive:(Typer.t -> env -> Ast.toplevel_directive -> unit) ->

23 24
  Typer.t -> env -> Ast.pmodule_item list -> 
  Typer.t * env * Lambda.code_item list
25 26 27 28


val from_comp_unit: (Compunit.t -> env) ref
  (* Defined in Librarian *)