This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] REWRITE_INSN


Hi,

The attached patch adds the macro REWRITE_INSN into the interpreter. This macro simply replaces all the code in interpret-run.cc that look like "pc[-2].insn = FOO; pc[-1].BAR = BAZ;" with "REWRITE_INSN (FOO, BAR, BAZ);"

For the non-debugging case, REWRITE_INSN is simply the previous (current) code. For the debugging case, REWRITE_INSN checks to see if there is a breakpoint at pc[-2], and, if so, calls _Jv_RewriteBreakpointInsn so that the new insn is saved into the breakpoint. Without it, we would continue to try to run the "old" insn, which really cripples the effectiveness of breakpoints. :-)

This is my last critical patch before I'm ready to say "merge".

Questions/comments/concerns?
Keith

ChangeLog
2007-04-23  Keith Seitz  <keiths@redhat.com>

        * headers.txt (gnu/gcj/jvmti/Breakpoint.h)[DIRECT_THREADED]:
        Add _Jv_RewriteBreakpointInsn friend declaration.
        * gnu/gcj/jvmti/natBreakpoint.cc (_Jv_RewriteBreakpointInsn)
        [DIRECT_THREADED]: New function.
        * gnu/gcj/jvmti/Breakpoint.h: Regenerate.
        * interpret-run.cc: Define new REWRITE_INSN macro.
        Changed all occurrences of insn rewriting to call REWRITE_INSN.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]