Ticket #144 (closed task: fixed)
Fix BlockNode/move literals/constants to code generation
| Reported by: | dagss | Owned by: | scoder |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.12 |
| Component: | Code Generation | Keywords: | cleanup |
| Cc: |
Description
In summer 2008, I moved the things that BlockNode was made for doing over to code.funcstate. However, things are a bit ugly: Constants/literals are recorded in env during analysis, then each function environment pipes the literals to code.funcstate (possibly making duplicate reports from the env), which again makes efforts to merge duplicate entries.
This is ugly, and I'm not guaranteeing that it is working 100% either.
One side-effect is that if literals cannot be added in tree transformations, and if you remove literals in transformations then it is still allocated etc.
The best fix is to move registration of literals/constants over to code generation phase (modifying code.funcstate along the way). This can be done one literal type at the time, nice and incrementally. When all is done, BlockNode can be deleted.
