[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cp-tools-discuss] gnu.bytecode

From: Per Bothner
Subject: Re: [Cp-tools-discuss] gnu.bytecode
Date: Thu, 30 Dec 2004 21:59:12 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803

Elliott Hughes wrote:

On Dec 29, 2004, at 22:36, C. Brian Jones wrote:

On Wed, 2004-12-29 at 22:57, Elliott Hughes wrote:

is this the right/a sensible place to talk about gnu.bytecode?

I'm not on the cp-tools-discuss list, so I'm afraid I don't know the

there are two problems. one is that nothing writes to the start_pc and end_pc fields in Variable,

These fields are now gone.

I suggest trying the latest version of gnu.bytecode from the Kawa
cvs repository.  Note this is on sources.redhat.com, for historial
reasons  See http://www.gnu.org/software/kawa/Getting-Kawa.html

i think the intent was probably that the start_pc and end_pc fields would be removed from Variable, and the Variable's Scope's start and end Label instances' position fields would be used for that information.


i'm not convinced that works in general. nothing i've seen says that the range of bytecode indexes for which a slot contains a given variable has to correspond to a scope in the usual sense.

Think of a scope as a range of bytecode, in that case.

my fix doesn't create any new Scope instances,

I'm not sure what the context is.
However, the ClassFileInput parses a .class files, and creates the
needed LocalVarsAttr.  It is rather simpleminded: it creates a
new Scope and a new pair of Labels each time the start_pc or end_pc
is diferent from the previous variable.

> try gnu.classpath.tools.JavapMain or gnu.bytecode.dump on a class
> compiled with "javac -g" to see

Hm.  Something does seem to be broken.  I'll look into it quickly.

at the same time, a more direct mapping to/from the class file format would be handy for my purposes. and something that's a complete and direct implementation of chapter 4, and which makes reference to it, would be nice.

gnu.bytecode strives to be a very direct (and low-overhead) mapping from
the classfile  format.
        --Per Bothner
address@hidden   http://per.bothner.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]