Inlining: warn when trying to inline iterators.

This commit is contained in:
Adrien Guatto 2010-07-19 15:22:57 +02:00
parent 9301ed0b09
commit 8d07052a0f

View file

@ -46,6 +46,12 @@ let mk_unique_node nd =
fst (Hept_mapfold.node_dec funs () nd)
let exp funs (env, newvars, newequs) exp = match exp.e_desc with
| Eiterator (it, { a_op = Enode nn; }, _, _, _) when to_be_inlined nn ->
Printf.eprintf
"WARN: inlining iterators (\"%s %s\" here) is unsupported.\n"
(Hept_printer.iterator_to_string it) (fullname nn);
(exp, (env, newvars, newequs))
| Eapp ({ a_op = Enode nn; } as op, argl, rso) when to_be_inlined nn ->
let add_reset eq = match rso with
| None -> eq