enter.o: debug.h
enter.o: debugcst.h
enter.o: def.h
+enter.o: f_info.h
enter.o: idf.h
enter.o: main.h
enter.o: misc.h
-static char Version[] = "ACK Modula-2 compiler Version 0.12";
+static char Version[] = "ACK Modula-2 compiler Version 0.13";
ds->dsg_kind = DSG_LOADED;
break;
- case Xset:
case Set: {
register unsigned i = (unsigned) (tp->tp_size) / (int) word_size;
register arith *st = nd->nd_set + i;
if (left->nd_symb == STRING) {
CodeString(left);
}
- else if (left->nd_class == Call || left->nd_class == Value) {
- /* ouch! forgot about these ones! */
+ else switch(left->nd_class) {
+ case Arrsel:
+ case Arrow:
+ case Def:
+ case LinkDef:
+ CodeDAddress(left);
+ break;
+ default:{
arith tmp, TmpSpace();
CodePExpr(left);
C_lal(tmp);
C_sti(WA(left->nd_type->tp_size));
C_lal(tmp);
+ }
+ break;
}
- else CodeDAddress(left);
return;
}
if (IsVarParam(param)) {
type-identifiers
*/
PointerType(register struct type **ptp;) :
+ { *ptp = construct_type(T_POINTER, NULLTYPE); }
POINTER TO
[ %if (type_or_forward(ptp))
type(&((*ptp)->tp_next))
#include "node.h"
#include "main.h"
#include "misc.h"
+#include "f_info.h"
struct def *
Enter(name, kind, type, pnam)
register struct node *idlist = Idlist;
struct scope *sc = enclosing(CurrVis)->sc_scope;
extern struct def *GetDefinitionModule();
+ struct f_info f;
+
+ f = file_info;
for (; idlist; idlist = idlist->nd_left) {
DoImport(local ?
ForwDef(idlist, sc) :
GetDefinitionModule(idlist->nd_IDF, 1) ,
CurrentScope);
+ file_info = f;
}
FreeNode(Idlist);
}
register struct node *nd;
register struct def *df1;
- *ptp = construct_type(T_POINTER, NULLTYPE);
if ((df1 = lookup(dot.TOK_IDF, CurrentScope, 1))) {
/* Either a Module or a Type, but in both cases defined
in this scope, so this is the correct identification
CodePString(right, func_type);
}
else CodePExpr(right);
+ RangeCheck(func_type, right->nd_type);
}
C_bra(RETURN_LABEL);
break;