[gcjx] Patch: FYI: keep going on error
Tom Tromey
tromey@redhat.com
Fri Dec 2 21:34:00 GMT 2005
I'm checking this in on the gcjx branch.
This lets the compiler keep going even if there is an error.
In particular it will analyze other classes.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* compiler.cc (semantic_analysis): Keep going on failure.
(do_analyze_unit): Likewise.
Index: compiler.cc
===================================================================
--- compiler.cc (revision 107604)
+++ compiler.cc (working copy)
@@ -300,7 +300,7 @@
need_class_method_bodies = false;
for (std::list<ref_unit>::const_iterator i = code_generation_units.begin ();
- ok && i != code_generation_units.end ();
+ i != code_generation_units.end ();
++i)
// Note that we do this single-threaded, as we don't have support
// for MT semantic analysis.
@@ -626,10 +626,9 @@
std::cout << " [analyzing " << unit->get_file_name () << "]"
<< std::endl;
- // fixme is this inefficient? look up the idiom
std::list<ref_class> types = unit->get_types ();
for (std::list<ref_class>::const_iterator j = types.begin ();
- ok && j != types.end ();
+ j != types.end ();
++j)
{
try
@@ -648,7 +647,7 @@
{
exc.set_lexer (unit->get_lexer ());
std::cerr << exc;
- ok = false;
+ break;
}
}
More information about the Java-patches
mailing list