error.o: inputtype.h
error.o: main.h
error.o: node.h
-error.o: squeeze.h
+error.o: nostrict.h
error.o: strict3rd.h
error.o: warning.h
main.o: LLlex.h
type.o: idf.h
type.o: nocross.h
type.o: node.h
+type.o: nostrict.h
type.o: scope.h
type.o: squeeze.h
type.o: target_sizes.h
chk_expr.o: misc.h
chk_expr.o: nocross.h
chk_expr.o: node.h
+chk_expr.o: nostrict.h
chk_expr.o: scope.h
-chk_expr.o: squeeze.h
chk_expr.o: standards.h
chk_expr.o: strict3rd.h
chk_expr.o: target_sizes.h
options.o: idfsize.h
options.o: main.h
options.o: nocross.h
-options.o: squeeze.h
+options.o: nostrict.h
options.o: strict3rd.h
options.o: target_sizes.h
options.o: type.h
declar.o: misc.h
declar.o: nocross.h
declar.o: node.h
+declar.o: nostrict.h
declar.o: scope.h
-declar.o: squeeze.h
declar.o: strict3rd.h
declar.o: target_sizes.h
declar.o: type.h
-static char Version[] = "ACK Modula-2 compiler Version 0.25";
+static char Version[] = "ACK Modula-2 compiler Version 0.26";
assert(node->nd_right->nd_class == Value);
node->nd_type = node->nd_left->nd_type;
- for (node->nd_INT = node->nd_left->nd_INT;
- node->nd_INT != node->nd_right->nd_INT;
- node->nd_INT++) {
+ node->nd_INT = node->nd_left->nd_INT;
+ for (;;) {
if (! AddOneCase(sh, node, lbl)) return 0;
+ if (node->nd_INT == node->nd_right->nd_INT) {
+ break;
+ }
+ node->nd_INT++;
}
return 1;
}
return 0;
}
- if (!(df = lookup(expp->nd_IDF, left->nd_type->rec_scope, 1, flags))) {
+ if (!(df = lookup(expp->nd_IDF, left->nd_type->rec_scope, D_IMPORTED, flags))) {
id_not_declared(expp);
return 0;
}
#include <alloc.h>
#include <em_arith.h>
#include <em_label.h>
+#include <em_code.h>
#include <assert.h>
#include "LLlex.h"
*/
register t_def *df;
- df = lookup(id, scope, 2, 0);
+ df = lookup(id, scope, D_IMPORT, 0);
if ( /* Already in this scope */
df
- || /* A closed scope, and id defined in the pervasive scope */
- (
- scopeclosed(scope)
- &&
- (df = lookup(id, PervasiveScope, 2, 0)))
) {
switch(df->df_kind) {
case D_INUSE:
else {
char *name;
- df = lookup(id, CurrentScope, 1, 0);
+ df = lookup(id, CurrentScope, D_IMPORTED, 0);
if (df && df->df_kind == D_PROCHEAD) {
/* C_exp already generated when we saw the definition
in the definition module
t_scope *newsc = CurrentScope;
level += incr;
- df = lookup(id, GlobalScope, 1, 0);
+ df = lookup(id, GlobalScope, D_IMPORTED, 0);
if (!df) {
/* Read definition module. Make an exception for SYSTEM.
*/
DefId = id;
if (!strcmp(id->id_text, "SYSTEM")) {
do_SYSTEM();
- df = lookup(id, GlobalScope, 1, 0);
+ df = lookup(id, GlobalScope, D_IMPORTED, 0);
}
else {
extern int ForeignFlag;
if (!is_anon_idf(id) && GetFile(id->id_text)) {
DefModule();
- df = lookup(id, GlobalScope, 1, 0);
+ df = lookup(id, GlobalScope, D_IMPORTED, 0);
if (level == 1 &&
(!df || !(df->df_flags & D_FOREIGN))) {
/* The module is directly imported by
}
}
else {
- df = lookup(id, GlobalScope, 1, 0);
+ df = lookup(id, GlobalScope, D_IMPORTED, 0);
newsc->sc_name = id->id_text;
}
vis = CurrVis;
for (; idlist; idlist = idlist->nd_right) {
df = define(idlist->nd_IDF, CurrentScope, D_VARIABLE);
df->df_type = type;
- df->df_flags &= ~(D_USED | D_DEFINED);
+ /* df->df_flags &= ~(D_USED | D_DEFINED); */
if (idlist->nd_left) {
/* An address was supplied
*/
scope imports it.
*/
df1 = lookup(idlist->nd_IDF,
- enclosing(CurrVis)->sc_scope, 1, 0);
+ enclosing(CurrVis)->sc_scope,
+ D_IMPORTED,
+ 0);
if (df1) {
/* It was already defined in the enclosing
scope. There are two legal possibilities,
#include <system.h>
#include <em_arith.h>
#include <em_label.h>
+#include <em_code.h>
#include "strict3rd.h"
#include "input.h"
df && df->df_scope != scope;
df1 = df, df = df->df_next) { /* nothing */ }
+ if (! df && import && scopeclosed(scope)) {
+ for (df = id->id_def, df1 = 0;
+ df && df->df_scope != PervasiveScope;
+ df1 = df, df = df->df_next) { /* nothing */ }
+ }
+
if (df) {
/* Found it
*/
id->id_def = df;
}
df->df_flags |= flags;
- if (import) {
- while (df->df_kind & D_IMPORTED) {
- if (df->df_kind == D_INUSE && import != 1) break;
- assert(df->imp_def != 0);
- df = df->imp_def;
- }
+ while (df->df_kind & import) {
+ assert(df->imp_def != 0);
+ df = df->imp_def;
}
}
return df;
t_def *df;
while (sc) {
- df = lookup(id->nd_IDF, sc->sc_scope, 1, flags);
+ df = lookup(id->nd_IDF, sc->sc_scope, D_IMPORTED, flags);
if (df) {
- if (pass_1 &&
- message &&
- sc->sc_scope->sc_level < vis->sc_scope->sc_level &&
- ! scopeclosed(vis->sc_scope)) {
- define(id->nd_IDF, vis->sc_scope, D_INUSE)->
- imp_def = df;
+ if (pass_1 && message) {
+ while (vis->sc_scope->sc_level >
+ sc->sc_scope->sc_level) {
+ define( id->nd_IDF,
+ vis->sc_scope,
+ D_INUSE)-> imp_def = df;
+ vis = nextvisible(vis);
+ }
}
return df;
}
#include <system.h>
#include <em_arith.h>
#include <em_label.h>
+#include <em_code.h>
#include <alloc.h>
#include "strict3rd.h"
if (scopetype == OPENSCOPE) {
ls->sc_next = ls->sc_encl;
}
- else ls->sc_next = PervVis;
CurrVis = ls;
}
#include <em_arith.h>
#include <em_label.h>
+#include <em_code.h>
#include <em_reg.h>
#include <alloc.h>
#include <assert.h>
register t_node *nd;
register t_def *df, *df1;
- if ((df1 = lookup(dot.TOK_IDF, CurrentScope, 1, D_USED))) {
+ if ((df1 = lookup(dot.TOK_IDF, CurrentScope, D_IMPORTED, D_USED))) {
/* Either a Module or a Type, but in both cases defined
in this scope, so this is the correct identification
*/