Re: [Pharo-users] Generate Bytecodes manually

2013-07-20 Thread Udo Schneider
On 20.07.13 21:05, Marcus Denker wrote: It's not needed for the compiler... Thought so - I can work around it using the public IRBuilder API. So no problem. The decompielr right now is called when there is no byte code (the old decompiler). This will be fixed soonish. Good to know - I'll sta

Re: [Pharo-users] Generate Bytecodes manually

2013-07-20 Thread Marcus Denker
On Jul 20, 2013, at 8:59 PM, Udo Schneider wrote: > I just stumbled over some IRBuilder behaviour which I'm not sure about. > > 1) Jump/Target Pairs > As far as I understood each jump target can only be used by one jump. So if > multiple jumps need to jump to the same location I have to create

Re: [Pharo-users] Generate Bytecodes manually

2013-07-20 Thread Udo Schneider
I just stumbled over some IRBuilder behaviour which I'm not sure about. 1) Jump/Target Pairs As far as I understood each jump target can only be used by one jump. So if multiple jumps need to jump to the same location I have to create multiple targets (one per jump) pointing to the same locatio

Re: [Pharo-users] Generate Bytecodes manually

2013-07-17 Thread Udo Schneider
On 17.07.13 11:05, Marcus Denker wrote: What you need to do for that is to implement a class that has the same public API as OpalCompiler and Compiler… Then you can set this is the compiler of your class (override #compiler on the class side). This compiler then takes care to create the Compil

Re: [Pharo-users] Generate Bytecodes manually

2013-07-17 Thread Marcus Denker
On Jul 16, 2013, at 8:55 PM, Udo Schneider wrote: > On 16.07.13 17:15, Marcus Denker wrote: >> No. A decompiler has to be very specific for the code generated by the >> compiler. > I thought so. > >> For Pharo3, we even opted to not support decompilation at all… (IR -> AST). >> We will instea

Re: [Pharo-users] Generate Bytecodes manually

2013-07-16 Thread Udo Schneider
On 16.07.13 17:15, Marcus Denker wrote: No. A decompiler has to be very specific for the code generated by the compiler. I thought so. 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

Re: [Pharo-users] Generate Bytecodes manually

2013-07-16 Thread Marcus Denker
On Jul 16, 2013, at 5:10 PM, Udo Schneider 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

Re: [Pharo-users] Generate Bytecodes manually

2013-07-16 Thread Udo Schneider
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 a

Re: [Pharo-users] Generate Bytecodes manually

2013-07-16 Thread Marcus Denker
On Jul 16, 2013, at 4:10 PM, Udo Schneider wrote: > All, > > is there a supported interface to generate methods (incl. their bytecodes) > manually? > In 3.0 we have two nice additions: 1) you can easily create CompiledMethods from RB ASTs | cm methodNode | methodNode := RBMethodNode

[Pharo-users] Generate Bytecodes manually

2013-07-16 Thread Udo Schneider
All, is there a supported interface to generate methods (incl. their bytecodes) manually? Best Regards, Udo