From bcc994fb9f74d5c02ee2b19e3e67d481f212aaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Fri, 16 Jul 2010 14:34:07 +0200 Subject: [PATCH] No need to collect calls without params There is no need to collect calls without parameters as we only need the signature of the function and the code will be generated when compiling the first file. --- compiler/minils/transformations/callgraph_mapfold.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/minils/transformations/callgraph_mapfold.ml b/compiler/minils/transformations/callgraph_mapfold.ml index be37b2a..fb5dba9 100644 --- a/compiler/minils/transformations/callgraph_mapfold.ml +++ b/compiler/minils/transformations/callgraph_mapfold.ml @@ -92,9 +92,12 @@ let node_by_longname ln = corresponding params (static parameters appear as free variables). *) let collect_node_calls ln = let add_called_node ln params acc = - match ln with - | Modname { qual = "Pervasives" } -> acc - | _ -> (ln, params)::acc + match params with + | [] -> acc + | _ -> + (match ln with + | Modname { qual = "Pervasives" } -> acc + | _ -> (ln, params)::acc) in let edesc funs acc ed = match ed with | Eapp ({ a_op = (Enode ln | Efun ln); a_params = params }, _, _) ->