diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1997-06-12 15:25:01 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1997-06-12 15:25:01 +0000 |
commit | 4eeb35cc6735bb376b6c2888e5c00a994f20a28a (patch) | |
tree | 5c74d1ce8870a30a012283ed5ca4b5f90e11d98f /bytecomp/bytegen.ml | |
parent | 944ddc7ecdab975ed5fffffc6aa25c98a70a30bb (diff) |
Fix de let rec dans ocamlc -g
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1585 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/bytegen.ml')
-rw-r--r-- | bytecomp/bytegen.ml | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/bytecomp/bytegen.ml b/bytecomp/bytegen.ml index 8052c8446..f2b2956b0 100644 --- a/bytecomp/bytegen.ml +++ b/bytecomp/bytegen.ml @@ -98,18 +98,14 @@ let add_const_unit = function (**** Auxiliary for compiling "let rec" ****) let rec size_of_lambda = function - Lfunction(kind, params, body) as funct -> + | Lfunction(kind, params, body) as funct -> 1 + IdentSet.cardinal(free_variables funct) - | Lprim(Pmakeblock(tag, mut), args) -> - List.length args - | Lprim(Pmakearray kind, args) -> - List.length args - | Llet(str, id, arg, body) -> - size_of_lambda body - | Lletrec(bindings, body) -> - size_of_lambda body - | _ -> - fatal_error "Bytegen.size_of_lambda" + | Lprim(Pmakeblock(tag, mut), args) -> List.length args + | Lprim(Pmakearray kind, args) -> List.length args + | Llet(str, id, arg, body) -> size_of_lambda body + | Lletrec(bindings, body) -> size_of_lambda body + | Levent (lam, _) -> size_of_lambda lam + | _ -> fatal_error "Bytegen.size_of_lambda" (**** Compilation of a lambda expression ****) |