Bug correction in Completion pass
Completion pass: do not propagate defnames to other equations (see test test_option_flatten_t4 : flatten t4, compile C target code)
This commit is contained in:
parent
857dccd0b2
commit
b60ee4b91d
2 changed files with 5 additions and 2 deletions
|
@ -86,7 +86,8 @@ let eqdesc funs _ ed = match ed with
|
|||
let ed, defnames =
|
||||
Hept_mapfold.eqdesc funs_collect Env.empty ed in
|
||||
(* add missing defnames *)
|
||||
Hept_mapfold.eqdesc funs defnames ed
|
||||
let ed, defnames = Hept_mapfold.eqdesc funs defnames ed in
|
||||
ed, Env.empty
|
||||
| _ -> raise Errors.Fallback
|
||||
|
||||
let funs = { Hept_mapfold.defaults with eqdesc = eqdesc; block = block; }
|
||||
|
|
|
@ -36,7 +36,9 @@ open Heptagon
|
|||
open Hept_utils
|
||||
open Hept_mapfold
|
||||
|
||||
let to_be_inlined s = !Compiler_options.flatten || (List.mem s !Compiler_options.inline)
|
||||
let to_be_inlined s =
|
||||
(!Compiler_options.flatten && not (s.qual = Pervasives))
|
||||
|| (List.mem s !Compiler_options.inline)
|
||||
|
||||
let fresh = Idents.gen_var "inline"
|
||||
|
||||
|
|
Loading…
Reference in a new issue