This commit is contained in:
ceriel 1987-07-13 11:49:32 +00:00
parent c66066a91f
commit 8dfafeb4e3
3 changed files with 11 additions and 8 deletions

View file

@ -183,7 +183,8 @@ ChkLinkOrName(expp)
if (! ChkDesignator(left)) return 0;
if ((left->nd_type->tp_fund != T_RECORD ||
if ((left->nd_class==Def || left->nd_class==LinkDef) &&
(left->nd_type->tp_fund != T_RECORD ||
!(left->nd_def->df_kind & (D_MODULE|D_VARIABLE|D_FIELD))
)
) {
@ -211,7 +212,8 @@ Xerror(expp, "not exported from qualifying module", df);
}
}
if (left->nd_def->df_kind == D_MODULE) {
if ((left->nd_class == Def || left->nd_class == LinkDef) &&
left->nd_def->df_kind == D_MODULE) {
expp->nd_class = Def;
FreeNode(left);
expp->nd_left = 0;
@ -221,7 +223,7 @@ Xerror(expp, "not exported from qualifying module", df);
assert(expp->nd_class == Def);
return df->df_kind != D_ERROR;
return expp->nd_def->df_kind != D_ERROR;
}
STATIC int

View file

@ -155,7 +155,7 @@ GetDefinitionModule(id, incr)
id->id_text);
}
else if (df == Defined && level == 1) {
error("cannot import from currently defined module");
error("cannot import from current module \"%s\"", id->id_text);
df->df_kind = D_ERROR;
}
FileName = fn;

View file

@ -269,12 +269,13 @@ CodeMove(rhs, left, rtp)
/* Do a block move
*/
struct desig l, r;
arith sz;
sz = (size / word_size) * word_size;
l = *lhs; r = *rhs;
CodeAddress(&r);
CodeAddress(&l);
C_blm(sz);
C_blm((arith) sz);
rhs->dsg_offset += sz;
lhs->dsg_offset += sz;
size -= sz;
@ -284,16 +285,16 @@ CodeMove(rhs, left, rtp)
/* Then copy dwords, words.
Depend on peephole optimizer
*/
CodeCopy(lhs, rhs, sz, &size);
CodeCopy(lhs, rhs, (arith) sz, &size);
}
}
sz = word_size;
while (size && --sz) {
/* And then copy remaining parts
*/
while (word_size % sz) sz--;
while ((int) word_size % sz) sz--;
while (size >= sz) {
CodeCopy(lhs, rhs, sz, &size);
CodeCopy(lhs, rhs, (arith) sz, &size);
}
}
return;