fixes
This commit is contained in:
parent
c66066a91f
commit
8dfafeb4e3
3 changed files with 11 additions and 8 deletions
|
@ -183,7 +183,8 @@ ChkLinkOrName(expp)
|
||||||
|
|
||||||
if (! ChkDesignator(left)) return 0;
|
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))
|
!(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;
|
expp->nd_class = Def;
|
||||||
FreeNode(left);
|
FreeNode(left);
|
||||||
expp->nd_left = 0;
|
expp->nd_left = 0;
|
||||||
|
@ -221,7 +223,7 @@ Xerror(expp, "not exported from qualifying module", df);
|
||||||
|
|
||||||
assert(expp->nd_class == Def);
|
assert(expp->nd_class == Def);
|
||||||
|
|
||||||
return df->df_kind != D_ERROR;
|
return expp->nd_def->df_kind != D_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC int
|
STATIC int
|
||||||
|
|
|
@ -155,7 +155,7 @@ GetDefinitionModule(id, incr)
|
||||||
id->id_text);
|
id->id_text);
|
||||||
}
|
}
|
||||||
else if (df == Defined && level == 1) {
|
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;
|
df->df_kind = D_ERROR;
|
||||||
}
|
}
|
||||||
FileName = fn;
|
FileName = fn;
|
||||||
|
|
|
@ -269,12 +269,13 @@ CodeMove(rhs, left, rtp)
|
||||||
/* Do a block move
|
/* Do a block move
|
||||||
*/
|
*/
|
||||||
struct desig l, r;
|
struct desig l, r;
|
||||||
|
arith sz;
|
||||||
|
|
||||||
sz = (size / word_size) * word_size;
|
sz = (size / word_size) * word_size;
|
||||||
l = *lhs; r = *rhs;
|
l = *lhs; r = *rhs;
|
||||||
CodeAddress(&r);
|
CodeAddress(&r);
|
||||||
CodeAddress(&l);
|
CodeAddress(&l);
|
||||||
C_blm(sz);
|
C_blm((arith) sz);
|
||||||
rhs->dsg_offset += sz;
|
rhs->dsg_offset += sz;
|
||||||
lhs->dsg_offset += sz;
|
lhs->dsg_offset += sz;
|
||||||
size -= sz;
|
size -= sz;
|
||||||
|
@ -284,16 +285,16 @@ CodeMove(rhs, left, rtp)
|
||||||
/* Then copy dwords, words.
|
/* Then copy dwords, words.
|
||||||
Depend on peephole optimizer
|
Depend on peephole optimizer
|
||||||
*/
|
*/
|
||||||
CodeCopy(lhs, rhs, sz, &size);
|
CodeCopy(lhs, rhs, (arith) sz, &size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sz = word_size;
|
sz = word_size;
|
||||||
while (size && --sz) {
|
while (size && --sz) {
|
||||||
/* And then copy remaining parts
|
/* And then copy remaining parts
|
||||||
*/
|
*/
|
||||||
while (word_size % sz) sz--;
|
while ((int) word_size % sz) sz--;
|
||||||
while (size >= sz) {
|
while (size >= sz) {
|
||||||
CodeCopy(lhs, rhs, sz, &size);
|
CodeCopy(lhs, rhs, (arith) sz, &size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue