[gcjx] Patch: FYI: Class object creation updates
Tom Tromey
tromey@redhat.com
Tue Mar 8 00:28:00 GMT 2005
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
}
}
More information about the Java-patches
mailing list