fix big int indexing

This commit is contained in:
Ubuntu32 2011-11-01 17:25:59 -07:00
parent 016cd42226
commit 29dc250a66
4 changed files with 7 additions and 3 deletions

View File

@ -428,6 +428,8 @@ write_functor(Functor f)
Yap_DebugPlWrite(MkAtomTerm(AtomDBREF));
} else if (f == FunctorLongInt) {
Yap_DebugPlWrite(MkAtomTerm(AtomLONGINT));
} else if (f == FunctorBigInt) {
Yap_DebugPlWrite(MkAtomTerm(AtomLONGINT));
} else if (f == FunctorDouble) {
Yap_DebugPlWrite(MkAtomTerm(AtomDOUBLE));
}

View File

@ -671,7 +671,8 @@
break;
case _get_bigint:
if (is_regcopy(myregs, nofregs, cl->u.xN.x)) {
clause->Tag = cl->u.xN.b;
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
clause->u.t_ptr = (CELL)NULL;
return;
}
cl = NEXTOP(cl,xN);

View File

@ -562,7 +562,8 @@
break;
case _get_bigint:
if (iarg == cl->u.xN.x) {
clause->Tag = cl->u.xN.b;
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
clause->u.t_ptr = (CELL)NULL;
return;
}
cl = NEXTOP(cl,xN);

View File

@ -877,7 +877,7 @@ opinfo("gl_void_vary",[bind("y","AbsPair(NULL)",workpc=currentop),new("y")]).
opinfo("get_struct",[bind("x","AbsAppl((CELL *)cl->u.xfa.f)",workpc=nextop)]).
opinfo("get_float",[bind("x","AbsAppl((CELL *)FunctorDouble)",t_ptr="d")]).
opinfo("get_longint",[bind("x","AbsAppl((CELL *)FunctorLongInt)",t_ptr="i")]).
opinfo("get_bigint",[bind("x","b",[])]).
opinfo("get_bigint",[bind("x","AbsAppl((CELL *)FunctorBigInt)",t_ptr=[])]).
opinfo("copy_idb_term",[logical]).
opinfo("unify_idb_term",[logical]).
opinfo("put_atom",[new("x")]).