This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] REWRITE_INSN
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 23 Apr 2007 16:32:56 -0600
- Subject: Re: [RFA] REWRITE_INSN
- References: <462D2612.8080504@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> The attached patch adds the macro REWRITE_INSN into the
Keith> interpreter. This macro simply replaces all the code in
Keith> interpret-run.cc that look like "pc[-2].insn = FOO; pc[-1].BAR = BAZ;"
Keith> with "REWRITE_INSN (FOO, BAR, BAZ);"
This code is so awful. I regret writing it actually ... it is racy
for one thing. Perhaps we should disable it. Or make it non-racy,
which is possible though a bit tricky.
Anyway ... you didn't attach a patch, but I'm sure it is ok.
Keith> For the non-debugging case, REWRITE_INSN is simply the previous
Keith> (current) code. For the debugging case, REWRITE_INSN checks to see if
Keith> there is a breakpoint at pc[-2], and, if so, calls
Keith> _Jv_RewriteBreakpointInsn so that the new insn is saved into the
Keith> breakpoint. Without it, we would continue to try to run the "old"
Keith> insn, which really cripples the effectiveness of breakpoints. :-)
We could also simply disable rewriting for the debug case.
Tom