From d9f8744ea219fb04057059cdcbf7162534c63852 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Tue, 7 Jan 2014 15:07:22 +0100 Subject: Document. --- cpu/netlist_gen.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cpu/netlist_gen.ml') diff --git a/cpu/netlist_gen.ml b/cpu/netlist_gen.ml index 1aad452..016c595 100644 --- a/cpu/netlist_gen.ml +++ b/cpu/netlist_gen.ml @@ -16,9 +16,8 @@ let add p id eq size = assert (not (Env.mem id p.p_vars) || (Env.find id p.p_vars = size)); assert (not (List.mem_assoc id p.p_eqs)); - { p_eqs = (id, eq)::p.p_eqs; - p_inputs = p.p_inputs; - p_outputs = p.p_outputs; + { p with + p_eqs = (id, eq)::p.p_eqs; p_vars = Env.add id size p.p_vars } let get id = @@ -195,9 +194,7 @@ let program entries outputs = p, outputs) (p, []) outputs in - { p_inputs = p.p_inputs; - p_eqs = p.p_eqs; - p_vars = p.p_vars; + { p with p_outputs = List.rev outputs } -- cgit v1.2.3