From 45db6551fd1860159e9babd53b68a67302e57e37 Mon Sep 17 00:00:00 2001 From: Paweł Dybiec Date: Sat, 24 Nov 2018 17:52:48 +0100 Subject: Upgrade base --- source/xi/pipeline.ml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/xi/pipeline.ml') 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 -- cgit 1.4.1