[RFA] Remap variable table entries
Sat Jun 9 17:32:00 GMT 2007
For some time now I've been noticing a discrepancy between variables
that should be in scope and when Eclipse actually displays them in
scope. Very, very irritating.
Turns out that we were blindly using the bytecode offsets from the debug
info without ever taking into consideration that we were compiling the
methods. As a result, the variable tables never were quite right...
The attached patch fixes this by converting the variable table entries
when the method is compiled. I've also reworked _Jv_VarLineTableEntry to
be more like _Jv_LineTableEntry, with the union for the bytecode pc and
the direct-threaded pc.
2007-06-08 Keith Seitz <firstname.lastname@example.org>
* include/java-interp.h (_Jv_LocalVarTableEntry): Add union
for bytecode_pc and direct-threaded pc.
Add field descriptions inline.
* defineclass.cc (read_one_code_attribute): Change from
bytecode_start_pc to bytecode_pc.
Remove unused variable "len".
* interpret.cc (compile): Remap the variable table, too.
(get_local_var_table) [DIRECT_THREADED]: Use insn_index on the
start location to map from pc_t to code index.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3538 bytes
Desc: not available
More information about the Java-patches