make sure wide property is always the first property.

This commit is contained in:
Vitor Santos Costa
2011-08-17 11:16:21 -07:00
parent cd4d55be9b
commit 5f3df98069
11 changed files with 27 additions and 26 deletions

View File

@@ -566,9 +566,8 @@ CreateNamedArray(PropEntry * pp, Int dim, AtomEntry *ae USES_REGS)
p = (ArrayEntry *) Yap_AllocAtomSpace(sizeof(*p));
p->KindOfPE = ArrayProperty;
p->NextOfPE = ae->PropsOfAE;
AddPropToAtom(ae, (PropEntry *)p);
INIT_RWLOCK(p->ArRWLock);
ae->PropsOfAE = AbsArrayProp(p);
#if THREADS
p->owner_id = worker_id;
#endif
@@ -629,15 +628,14 @@ CreateStaticArray(AtomEntry *ae, Int dim, static_array_types type, CODEADDR star
}
}
p->KindOfPE = ArrayProperty;
p->NextOfPE = ae->PropsOfAE;
INIT_RWLOCK(p->ArRWLock);
AddPropToAtom(ae, (PropEntry *)p);
p->NextAE = LOCAL_StaticArrays;
LOCAL_StaticArrays = p;
}
WRITE_LOCK(p->ArRWLock);
p->ArrayEArity = -dim;
p->ArrayType = type;
ae->PropsOfAE = AbsArrayProp((ArrayEntry *)p);
if (start_addr == NULL) {
int i;