Patch: jcf-write and last_bc

Matt Kraai kraai@alumni.carnegiemellon.edu
Mon Oct 8 16:30:00 GMT 2001


On Mon, Oct 08, 2001 at 05:26:53PM -0600, Tom Tromey wrote:
> While looking at some other problems with bytecode generation, I
> noticed that `state->last_bc' isn't always updated correctly.  OP1
> sets this, and OP1 is also used to emit data.  When this happens,
> last_bc will be set to some arbitrary byte value.
> 
> In this patch I've introduced OP1DATA, which doesn't set last_bc and
> which is used whenever we're output data (as opposed to an opcode).

Since OP2 and OP4 use OP1DATA, shouldn't they be changed to be
OP2DATA and OP4DATA respectively?  In any case, shouldn't their
leading comments at least be fixed to specify that they behave
like OP1DATA, not OP1?

Matt



More information about the Gcc-patches mailing list