[gcjx] Patch: FYI: fix String +=
Tom Tromey
tromey@redhat.com
Tue Oct 11 01:49:00 GMT 2005
I'm checking this in on the gcjx branch.
This fixes String += by using stabilize_reference.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* tree.cc (visit_op_assignment): Use stabilize_reference.
Index: tree.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/tree.cc,v
retrieving revision 1.1.2.60
diff -u -r1.1.2.60 tree.cc
--- tree.cc 11 Oct 2005 01:25:41 -0000 1.1.2.60
+++ tree.cc 11 Oct 2005 01:41:37 -0000
@@ -1737,9 +1737,9 @@
model_class *sb_class;
tree buffer_tree = create_stringbuffer (&sb_class, elt);
- // Wrap the LHS in a SAVE_EXPR so we only evaluate it once.
+ // Wrap the LHS so we only evaluate it once.
lhs->visit (this);
- tree lhs_tree = save_expr (current);
+ tree lhs_tree = stabilize_reference (current);
// Add the LHS and RHS to the StringBuffer.
stringbuffer_append (lhs.get (), buffer_tree, sb_class, lhs_tree);
More information about the Java-patches
mailing list