This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: Class object creation updates
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 07 Mar 2005 17:14:47 -0700
- Subject: [gcjx] Patch: FYI: Class object creation updates
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This patch fixes an optimization that was commented out in the
bytecode generator.
Tom
Index: gcjx/ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/block.cc (optimize): Optimize goto-to-goto.
Index: gcjx/bytecode/block.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/bytecode/Attic/block.cc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 block.cc
--- gcjx/bytecode/block.cc 15 Jan 2005 07:34:06 -0000 1.1.2.2
+++ gcjx/bytecode/block.cc 8 Mar 2005 00:15:43 -0000
@@ -110,7 +110,8 @@
&& count < 10)
{
// The first relocation in the target must be a 'goto'.
- ref_relocation targ_reloc = iter->get_target ()->relocations.back ();
+ ref_relocation targ_reloc
+ = iter->get_target ()->relocations.front ();
if (targ_reloc->get_kind () != reloc_goto)
break;
++count;
@@ -118,11 +119,12 @@
}
if (iter != *i)
{
-#if 0 // FIXME this causes crashes
// ITER is the new target.
(*i)->set_target (iter->get_target ());
+ // Update here so that we don't have a chance to point to a
+ // dead block.
+ (*i)->update ();
changed = true;
-#endif
}
}