new text conversion and string code (big changes, take care please)

This commit is contained in:
Vítor Santos Costa
2013-12-02 14:49:41 +00:00
parent 8b7fa9be36
commit d7397b43af
65 changed files with 1498 additions and 2098 deletions

View File

@@ -1203,6 +1203,16 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
cl = NEXTOP(cl,oc);
argno--;
break;
case _unify_string:
case _unify_l_string:
if (argno == 1) {
clause->Tag = AbsAppl((CELL *)FunctorString);
clause->u.t_ptr = cl->u.ou.u;
return;
}
cl = NEXTOP(cl,ou);
argno--;
break;
case _unify_n_atoms:
if (argno <= cl->u.osc.s) {
clause->Tag = cl->u.osc.c;
@@ -2920,6 +2930,10 @@ install_clause(ClauseDef *cls, PredEntry *ap, istack_entry *stack)
if (cls->u.t_ptr &&
Yap_Double_key(sp->extra) != Yap_Double_key(cls->u.t_ptr))
break;
} else if (f == FunctorString) {
if (cls->u.t_ptr &&
Yap_String_key(sp->extra) != Yap_String_key(cls->u.t_ptr))
break;
} else {
if (cls->u.t_ptr &&
Yap_Int_key(sp->extra) != Yap_Int_key(cls->u.t_ptr))