Re: AST: jump offsets wrong when EXTENDED_ARG is used

Neal Norwitz <[email protected]> Sun, 23 Oct 2005 16:03:00 -0700
Newsgroups gmane.comp.python.compiler
Message-ID <[email protected]>
On 10/23/05, Neil Schemenauer <[email protected]> wrote:
> The summary of the bug is that instrsize() is wrong inside
> assemble_jump_offsets().  The instruction size depends on the length
> of the jump and the length of jumps depend on instruction sizes.  I
> think we need to iterate inside of assemble_jump_offsets().  We keep
> iterating while instructions are gaining EXTENDED_ARGs.  Normally
> iteration would not be required.
>
> Does that sound correct?

Yes.  I checked in some code that I believe works.  I don't know of
any other solution currently.  It would be great if you could review
and clean up my code.  I tried to do a little other cleanup but I'm
not sure if I really helped anything.  Reword the big comment (which
also tries to describe the issue) if you can express the issue more
clearly.

n