Hi Armin!
Here is some (unreviewed) documentation about the new LowLevelType approach:
http://codespeak.net/pypy/index.cgi?doc/translation.html#the-rpython-typer
Just some nitpicking/asking for clarification/remarks:
From translation.html:
When a block has been transformed in this way, all the links are considered; if the concrete types of the Variables that exit do not match the canonical low-level types expected by the target block, conversions are inserted.
"Inserted" meaning that explicit cast operations are put append to the operations of the basic block? If that's the case you have to be careful in the presence of exception blocks because afterwards the cast is the last operation in the block and will be checked for exceptions. I had to do the same in genllvm and inserted "Cast Blocks" along the links, which contain only casting operations.
And a more general note: I think that the whole low level/rpython typer approach makes a lot of sense. I implemented some of the things that are now redone by the new approach. So I was really doing too much work since some of the things I did would have to be done for every (remotely C-ish) backend which is obviously not a good solution. In addition all the templating hacks I did started to get brittle -- I had to add more and more code that did string manipulations on the template I used for the implementation of RPython's lists in LLVM.
Regards,
Carl Friedrich _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
