Break the recursivity is the Eff.node_exp representation (which fix nested iter. pbs).
In short, the rationale for this change, is that it is having a recursive node_exp is - useless, - too complicated, - wrong w.r.t. nesting iterator calls In long: - It is useless because, at the Eff level, a node cannot call itself via one of its static arg (which was where the recursivity came from). - and indeed, it is much simpler to consider that a static arg node can only be ident.long that identifies a node alias. This means of course, that nested iterators have been unnested before, inventing alias node names along the way... And polymorphism makes thing difficult once again. - But the *big* problem with a recursive node_exp is that it make things very complicated to (lic)dump nested iterator call because of polymorphism! Actually, it even makes thing complicated when the iterators were themselves not nested in the source code ! Some ugly things were done in LicDump to unnest those calls when printing node_exp. But this uglyness have a price: tricky code, and bugs! Indeed, nested iterators calls were wong for example when using the --inline-iterator mode (but i would not be surprised that is wrong in other cases...). Hence, LicDump is simpler, but of course LazyCompiler is more complicated. But this is reasonable: a pretty-printer is not supposed to be complicated.
Showing
- src/Makefile 1 addition, 1 deletionsrc/Makefile
- src/TODO 12 additions, 22 deletionssrc/TODO
- src/eff.ml 20 additions, 6 deletionssrc/eff.ml
- src/evalConst.ml 13 additions, 13 deletionssrc/evalConst.ml
- src/evalType.ml 3 additions, 17 deletionssrc/evalType.ml
- src/getEff.ml 190 additions, 43 deletionssrc/getEff.ml
- src/getEff.mli 1 addition, 1 deletionsrc/getEff.mli
- src/inline.ml 7 additions, 5 deletionssrc/inline.ml
- src/lazyCompiler.ml 63 additions, 37 deletionssrc/lazyCompiler.ml
- src/licDump.ml 49 additions, 137 deletionssrc/licDump.ml
- src/licDump.mli 28 additions, 39 deletionssrc/licDump.mli
- src/main.ml 1 addition, 2 deletionssrc/main.ml
- src/name.ml 2 additions, 2 deletionssrc/name.ml
- src/name.mli 2 additions, 2 deletionssrc/name.mli
- src/predef.ml 21 additions, 2 deletionssrc/predef.ml
- src/predefEvalType.ml 31 additions, 32 deletionssrc/predefEvalType.ml
- src/predefEvalType.mli 1 addition, 1 deletionsrc/predefEvalType.mli
- src/split.ml 7 additions, 4 deletionssrc/split.ml
- src/symbolTab.mli 2 additions, 6 deletionssrc/symbolTab.mli
- src/syntaxTab.ml 8 additions, 8 deletionssrc/syntaxTab.ml
Loading
Please register or sign in to comment