On Jul 16, 2013, at 5:10 PM, Udo Schneider <udo.schneider@homeaddress.de> wrote:
On 16.07.13 16:39, Marcus Denker wrote:
In 3.0 we have two nice additions:
1) you can easily create CompiledMethods from RB ASTs Looks nice but isn't usable for me as I don't have an AST.
2) For low level stuff there is IRBuilder. IR is a bytecode-level representation (CFG) that abstracts away from the details yet is very close. Now we're talking!!! This looks exactly like what I need.
Just a theoretical question: Can every sequence of bytecodes be decompiled to a Smalltalk method? I doubt it but wanted to ask nevertheless.
No. A decompiler has to be very specific for the code generated by the compiler. For Pharo3, we even opted to not support decompilation at all⦠(IR -> AST). We will instead save a higher-level representation that has much more information (e.g. names of variables). For deployment, people can strip the names, giving them the same "obfuscation" the decompiler provides now. BC-> IR decompilation always works. Marcus