small change to prepare for new feature

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@361 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2024-03-13 01:08:45 +00:00
parent 5e99b7bc1f
commit 77ef4a7013
3 changed files with 5 additions and 3 deletions

View File

@ -344,6 +344,7 @@ static void perform_pass(void)
// init variables
pass.undefined_count = 0;
//pass.needvalue_count = 0; FIXME - use
pass.changed_count = 0;
pass.error_count = 0;
pass.warning_count = 0;
// Process toplevel files
@ -362,7 +363,7 @@ static void perform_pass(void)
// in the future to two general expressions, this is the point where
// they would need to be evaluated.
if (config.process_verbosity >= 8)
printf("Found %d undefined expressions.\n", pass.undefined_count);
printf("Undefined expressions: %d. Symbol updates: %d.\n", pass.undefined_count, pass.changed_count);
if (pass.error_count)
exit(ACME_finalize(EXIT_FAILURE));
}
@ -387,7 +388,7 @@ static void do_actual_work(void)
undefs_before = pass.undefined_count + 1;
// keep doing passes as long as the number of undefined results keeps decreasing.
// stop on zero (FIXME - zero-check pass.needvalue_count instead!)
while (pass.undefined_count && (pass.undefined_count < undefs_before)) {
while ((pass.undefined_count && (pass.undefined_count < undefs_before)) || pass.changed_count) {
undefs_before = pass.undefined_count;
perform_pass();
if (--sanity.passes_left < 0) {

View File

@ -112,6 +112,7 @@ struct pass {
int number; // counts up from zero
int undefined_count; // counts undefined expression results (if this stops decreasing, next pass must list them as errors)
//int needvalue_count; // counts undefined expression results actually needed for output (when this hits zero, we're done) FIXME - use
int changed_count; // count symbol changes (if nonzero, another pass is needed)
int error_count;
int warning_count;
boolean complain_about_undefined; // will be FALSE until error pass is needed

View File

@ -9,7 +9,7 @@
#define RELEASE "0.97" // update before release FIXME
#define CODENAME "Zem" // update before release
#define CHANGE_DATE "4 Mar" // update before release FIXME
#define CHANGE_DATE "5 Mar" // update before release FIXME
#define CHANGE_YEAR "2024" // update before release
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/"
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME