This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: bug fix in 'locals'
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 12 Feb 2005 20:20:27 -0700
- Subject: [gcjx] Patch: FYI: bug fix in 'locals'
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This patch has a minor rearrangement for 'locals' and also a bug fix.
This patch is the first of many from the last week or so. When
gcc.gnu.org went down I switched to using a local monotone
database... this patch series will come directly from that database,
as there doesn't seem to be much point in rediffing just to get the
same result.
Tom
#
# patch "gcc/gcjx/ChangeLog"
# from [58f506479b03a0b0e0bb95dc8d18a6787d666571]
# to [3a67adeac606215841ee9d41c38cf184961cab46]
#
# patch "gcc/gcjx/bytecode/generate.cc"
# from [c7a8388bb191f7690707732accf3d3a305a096b7]
# to [ac0ed40bc02361856f326d7b2238edf7b3471047]
#
# patch "gcc/gcjx/bytecode/locals.cc"
# from [2ca0dcee22a06c52fb2b26ec841209619313c5ab]
# to [0acb9eac8932a6cfcef28e79c23ddb7f79719585]
#
--- gcc/gcjx/ChangeLog
+++ gcc/gcjx/ChangeLog
@@ -1,3 +1,10 @@
+2005-02-04 Tom Tromey <tromey@redhat.com>
+
+ * bytecode/locals.cc (request): Minor rearrangement.
+ (remove): Pop 'scope'.
+ * bytecode/generate.cc (visit_variable_stmt): Removed old
+ comment.
+
2005-01-30 Tom Tromey <tromey@redhat.com>
* aot/mangle.cc (mangler): Special case array types.
--- gcc/gcjx/bytecode/generate.cc
+++ gcc/gcjx/bytecode/generate.cc
@@ -1279,8 +1279,6 @@
{
note_line (stmt);
- // when debugging, set up new relocs for the debug info.
-
for (std::list<ref_variable_decl>::const_iterator i = decls.begin ();
i != decls.end ();
++i)
--- gcc/gcjx/bytecode/locals.cc
+++ gcc/gcjx/bytecode/locals.cc
@@ -62,12 +62,13 @@
if (decl)
{
- debug_info &info = vars[decl];
+ debug_info info;
info.variable = decl;
info.start = gen->get_current ();
info.end = NULL;
info.scope = scope.back ();
info.index = n;
+ vars[decl] = info;
}
return n;
}
@@ -112,6 +113,10 @@
void
locals::remove (const model_stmt *stmt)
{
+ assert (stmt != NULL);
+ assert (stmt == scope.back ());
+ scope.pop_back ();
+
std::list<model_variable_decl *> dels;
for (std::map<model_variable_decl *, debug_info>::iterator i
= vars.begin ();