On 30 December 2010 23:39, Erik Huelsmann ehuels@gmail.com wrote:
My idea would be to add a macro called WITH-STACK-PARAMETER-COLLECTION
Some snipping done. :)
The pass1 form rewriting could be eliminated and our decision rules
Here too. :)
Any comments?
This seems to correlate with the overall (vague) direction to which I have envisioned our compiler to evolve. The stack inconsistencies etc. are things that I at least have seen as bugs caused by our code being too manual/low-level. The with-stack-parameter-collection macro sounds very much like a proper tool to help with such problems, and seems to be on the same track as some similar cleanups we've done inside pass2.
So, regarding the snips above, I wholeheartedly support the macro idea. Regarding pass1/pass2, please remember that the split of the two was never clear-cut to begin with, the division of responsibilities was muddied at best and the file-split I did at some point ages ago was more a hatchet/chainsaw job than any artistic sculpture job. :) The use of unsafe-p in conjunction with half-depending on pass2 in pass1 is probably a clear sign of an incomplete design to begin with. Therefore this sounds very much like a step in the right direction.
If we ever aspire to have several pass2 back-ends, doing stack analysis in pass1 is probably a bad idea anyway.