Re: Python::Bytecode

2004-07-12 Thread Dan Sugalski
On Mon, 12 Jul 2004, Gregor N. Purdy wrote: > Leo -- > > I had tinkered around with this stuff back in 2003, and ended up writing > Python::Bytecode::SAX to help me visualize bytecode. IIRC, I ran into > the same issue of only disassembling one code block. I've finished up (yay, free time at lunc

Re: Python::Bytecode

2004-07-12 Thread Gregor N. Purdy
Leo -- I had tinkered around with this stuff back in 2003, and ended up writing Python::Bytecode::SAX to help me visualize bytecode. IIRC, I ran into the same issue of only disassembling one code block. I'd be interested to know if P::B::S treats your example python bytecode any better than P::B. I

Re: Python::Bytecode

2004-07-10 Thread Matt Diephouse
Leopold Toetsch wrote: ... is on CPAN (said Dan) and is broken. I'd be glad if people could fix it and send me a running version ;) * constants are messed up * it doesn't disassemble all code objects of a .pbc - just one If you could give me a bit more to go on, I'd be willing to give this a sho

Re: Python::Bytecode

2004-07-10 Thread Matt Diephouse
Leopold Toetsch wrote: ... is on CPAN (said Dan) and is broken. I'd be glad if people could fix it and send me a running version ;) * constants are messed up * it doesn't disassemble all code objects of a .pbc - just one If you could give me a bit more to go on, I'd be willing to give this a shot

Re: Python bytecode notes, part one

2004-07-06 Thread brian wheeler
On Mon, 2004-07-05 at 19:27, Dan Sugalski wrote: UNARY_NEGATIVE: restore $Px; new $Py, Undef; $Py = $Px * -1; save $Py | $Px = -1 * $Px Wouldn't something this do what is desired? I'm just guessing, though. Brian

Re: Python bytecode notes, part one

2004-07-05 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > The translation for a number of the python ops depends on whether > we're going with runtime stack action or compile-time stack->register > translations. My experiments[1] show that the latter should be doable, the more because ... > BINARY_: >restor