summary refs log tree commit diff
path: root/source/xi
diff options
context:
space:
mode:
Diffstat (limited to 'source/xi')
-rw-r--r--source/xi/.merlin15
-rw-r--r--source/xi/pipeline.ml14
-rw-r--r--source/xi/xi.ml2
3 files changed, 14 insertions, 17 deletions
diff --git a/source/xi/.merlin b/source/xi/.merlin
deleted file mode 100644
index 615c7ba..0000000
--- a/source/xi/.merlin
+++ /dev/null
@@ -1,15 +0,0 @@
-B /usr/home/pawel/.opam/4.07.0/lib/bytes
-B /usr/home/pawel/.opam/4.07.0/lib/cmdliner
-B /usr/home/pawel/.opam/4.07.0/lib/ocaml
-B /usr/home/pawel/.opam/4.07.0/lib/ocamlgraph
-B /usr/home/pawel/.opam/4.07.0/lib/result
-B ../../_build/default/source/xi/.xi.eobjs
-B ../../_build/default/source/xi_lib/.xi_lib.objs
-S /usr/home/pawel/.opam/4.07.0/lib/bytes
-S /usr/home/pawel/.opam/4.07.0/lib/cmdliner
-S /usr/home/pawel/.opam/4.07.0/lib/ocaml
-S /usr/home/pawel/.opam/4.07.0/lib/ocamlgraph
-S /usr/home/pawel/.opam/4.07.0/lib/result
-S .
-S ../xi_lib
-FLG -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -w -39-33-26-27
diff --git a/source/xi/pipeline.ml b/source/xi/pipeline.ml
index 34a06f9..ae9a4c9 100644
--- a/source/xi/pipeline.ml
+++ b/source/xi/pipeline.ml
@@ -31,10 +31,21 @@ module Make(Steps:COMPILER_STEPS)(Params:PARAMS) = struct
     Logger.dump_string "regmapping" @@ describe_register_mapping mapping
 
   let dump_schedule proc_ir schedule = 
-    let title = Format.sprintf "%s.schedule" (Ir_utils.string_of_procid @@ Ir.procid_of_procedure proc_ir) in
+    let title = Format.sprintf "%s.schedule" (Ir_utils.string_of_procid proc_ir) in
     let output = Ir_utils.string_of_labellist schedule in
     Logger.dump_string title output
 
+  let dump_node2type node2type =
+    let title = "types" in 
+    let f k v xs =
+      let line = Format.sprintf "%s -> %s"
+        (Ast.string_of_node_tag k)
+        (Types.string_of_normal_type v) in
+      line :: xs
+    in
+    let lines = Hashtbl.fold f node2type [] in
+    Logger.dump_string title @@ String.concat "\n" @@ List.sort compare lines
+
   module IrPhases = struct
 
     let regalloc proc =
@@ -111,6 +122,7 @@ module Make(Steps:COMPILER_STEPS)(Params:PARAMS) = struct
       List.iter prerr_endline xs;
       Error "typechecker"
     | Ok (node2type) ->
+      dump_node2type node2type;
       if Invariants.AllExpressionsAreTypecheck.verify_module_definition node2type ast then
         check_stop_point "typechecker" translate (ast, node2type)
       else
diff --git a/source/xi/xi.ml b/source/xi/xi.ml
index 86a23f1..d59dbf6 100644
--- a/source/xi/xi.ml
+++ b/source/xi/xi.ml
@@ -72,7 +72,7 @@ module CommandLine = struct
 
   let cmd =
     let doc = "Compile Xi Program" in
-    let version = "pracownia1.1-0-gc10b4f2" in
+    let version = "pracownia2.3-0-g63fd12e" in
     Term.(const compile $ xi_log $ extra_debug $ mod_uwr $ plugin $ reg_descr $ stop_after $ output $ source_file),
     Term.info "xi" ~doc ~version