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

@@ -395,6 +395,14 @@ copy_complex_term(register CELL *pt0, register CELL *pt0_end, int share, int cop
H += 3;
#endif
break;
case (CELL)FunctorString:
if (ASP - H > MIN_ARENA_SIZE+3+ap2[1]) {
goto overflow;
}
*ptf++ = AbsAppl(H);
memcpy(H, ap2, sizeof(CELL)*(3+ap2[1]));
H+=ap2[1]+3;
break;
default:
{
/* big int */
@@ -680,6 +688,14 @@ CopyTermToArena(Term t, Term arena, int share, int copy_att_vars, UInt arity, Te
H += 3;
#endif
break;
case (CELL)FunctorString:
if (H > ASP - MIN_ARENA_SIZE+3+ap[1]) {
res = -1;
goto error_handler;
}
memcpy(H, ap, sizeof(CELL)*(3+ap[1]));
H += ap[1]+3;
break;
default:
{
UInt sz = ArenaSz(t), i;