diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2007-05-16 08:21:41 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2007-05-16 08:21:41 +0000 |
commit | 1dd68ccf50afba140553a7cac8586dce93ffbbf2 (patch) | |
tree | 3162e4240757c2d7a563438c64632333ee30d7fb /bytecomp/lambda.ml | |
parent | 5dbc715029728bd9e9944f31fe6ac22ceb0a994d (diff) |
ajout des annotations pour variables et appels terminaux
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/lambda.ml')
-rw-r--r-- | bytecomp/lambda.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bytecomp/lambda.ml b/bytecomp/lambda.ml index b66378c9e..c6017d918 100644 --- a/bytecomp/lambda.ml +++ b/bytecomp/lambda.ml @@ -124,7 +124,7 @@ type shared_code = (int * int) list type lambda = Lvar of Ident.t | Lconst of structured_constant - | Lapply of lambda * lambda list + | Lapply of lambda * lambda list * Location.t | Lfunction of function_kind * Ident.t list * lambda | Llet of let_kind * Ident.t * lambda * lambda | Lletrec of (Ident.t * lambda) list * lambda @@ -170,7 +170,7 @@ let rec same l1 l2 = Ident.same v1 v2 | Lconst c1, Lconst c2 -> c1 = c2 - | Lapply(a1, bl1), Lapply(a2, bl2) -> + | Lapply(a1, bl1, _), Lapply(a2, bl2, _) -> same a1 a2 && samelist same bl1 bl2 | Lfunction(k1, idl1, a1), Lfunction(k2, idl2, a2) -> k1 = k2 && samelist Ident.same idl1 idl2 && same a1 a2 @@ -240,7 +240,7 @@ let name_lambda_list args fn = let rec iter f = function Lvar _ | Lconst _ -> () - | Lapply(fn, args) -> + | Lapply(fn, args, _) -> f fn; List.iter f args | Lfunction(kind, params, body) -> f body @@ -374,7 +374,7 @@ let subst_lambda s lam = Lvar id as l -> begin try Ident.find_same id s with Not_found -> l end | Lconst sc as l -> l - | Lapply(fn, args) -> Lapply(subst fn, List.map subst args) + | Lapply(fn, args, loc) -> Lapply(subst fn, List.map subst args, loc) | Lfunction(kind, params, body) -> Lfunction(kind, params, subst body) | Llet(str, id, arg, body) -> Llet(str, id, subst arg, subst body) | Lletrec(decl, body) -> Lletrec(List.map subst_decl decl, subst body) |