rename rellocate -> relocate
This commit is contained in:
parent
fc1f622e7e
commit
17c3a16d35
4
C/agc.c
4
C/agc.c
@ -330,7 +330,7 @@ mark_global_cell(CELL *pt)
|
||||
(sizeof(MP_INT)+
|
||||
(((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/sizeof(CELL);
|
||||
Opaque_CallOnGCMark f;
|
||||
Opaque_CallOnGCRellocate f2;
|
||||
Opaque_CallOnGCRelocate f2;
|
||||
Term t = AbsAppl(pt);
|
||||
|
||||
if ( (f = Yap_blob_gc_mark_handler(t)) ) {
|
||||
@ -346,7 +346,7 @@ mark_global_cell(CELL *pt)
|
||||
*pt = AtomTermAdjust(reg);
|
||||
}
|
||||
}
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) {
|
||||
if ( (f2 = Yap_blob_gc_relocate_handler(t)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n);
|
||||
if (out < 0)
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables in agc");
|
||||
|
@ -235,8 +235,8 @@ Yap_blob_gc_mark_handler(Term t)
|
||||
return GLOBAL_OpaqueHandlers[blob_info].gc_mark_handler;
|
||||
}
|
||||
|
||||
Opaque_CallOnGCRellocate
|
||||
Yap_blob_gc_rellocate_handler(Term t)
|
||||
Opaque_CallOnGCRelocate
|
||||
Yap_blob_gc_relocate_handler(Term t)
|
||||
{
|
||||
CELL blob_info, blob_tag;
|
||||
CELL *pt = RepAppl(t);
|
||||
@ -257,7 +257,7 @@ Yap_blob_gc_rellocate_handler(Term t)
|
||||
blob_info = blob_tag - USER_BLOB_START;
|
||||
if (!GLOBAL_OpaqueHandlers)
|
||||
return NULL;
|
||||
return GLOBAL_OpaqueHandlers[blob_info].gc_rellocate_handler;
|
||||
return GLOBAL_OpaqueHandlers[blob_info].gc_relocate_handler;
|
||||
}
|
||||
|
||||
extern Int Yap_blob_tag_from_slot(Int slot)
|
||||
|
4
C/grow.c
4
C/grow.c
@ -578,7 +578,7 @@ AdjustGlobal(long sz, int thread_copying USES_REGS)
|
||||
(sizeof(MP_INT)+
|
||||
(((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/CellSize;
|
||||
Opaque_CallOnGCMark f;
|
||||
Opaque_CallOnGCRellocate f2;
|
||||
Opaque_CallOnGCRelocate f2;
|
||||
Term t = AbsAppl(pt);
|
||||
|
||||
if ( (f = Yap_blob_gc_mark_handler(t)) ) {
|
||||
@ -606,7 +606,7 @@ AdjustGlobal(long sz, int thread_copying USES_REGS)
|
||||
else if (IsAtomTerm(reg))
|
||||
*pt = AtomTermAdjust(reg);
|
||||
}
|
||||
if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) {
|
||||
if ( (f2 = Yap_blob_gc_relocate_handler(t)) < 0 ) {
|
||||
int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n);
|
||||
if (out < 0)
|
||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables");
|
||||
|
@ -478,12 +478,12 @@ pop_registers(Int num_regs, yamop *nextop USES_REGS)
|
||||
|
||||
/* pop info on opaque variables */
|
||||
while (LOCAL_extra_gc_cells > LOCAL_extra_gc_cells_base) {
|
||||
Opaque_CallOnGCRellocate f;
|
||||
Opaque_CallOnGCRelocate f;
|
||||
CELL *ptr = LOCAL_extra_gc_cells-1;
|
||||
size_t n = ptr[0], t = ptr[-1];
|
||||
|
||||
LOCAL_extra_gc_cells -= (n+1);
|
||||
if ( (f = Yap_blob_gc_rellocate_handler(t)) ) {
|
||||
if ( (f = Yap_blob_gc_relocate_handler(t)) ) {
|
||||
int out = (f)(Yap_BlobTag(t), Yap_BlobInfo(t), LOCAL_extra_gc_cells, n);
|
||||
if (out < 0) {
|
||||
/* error: we don't have enough room */
|
||||
|
@ -36,18 +36,18 @@ typedef int (*SWI_PLGetStreamPositionFunction)(void *);
|
||||
typedef int (*Opaque_CallOnFail)(void *);
|
||||
typedef int (*Opaque_CallOnWrite)(void *, int, void *, int);
|
||||
typedef Int (*Opaque_CallOnGCMark)(int, void *, Term *, Int);
|
||||
typedef int (*Opaque_CallOnGCRellocate)(int, void *, Term *, Int);
|
||||
typedef int (*Opaque_CallOnGCRelocate)(int, void *, Term *, Int);
|
||||
|
||||
typedef struct opaque_handler_struct {
|
||||
Opaque_CallOnFail fail_handler;
|
||||
Opaque_CallOnWrite write_handler;
|
||||
Opaque_CallOnGCMark gc_mark_handler;
|
||||
Opaque_CallOnGCRellocate gc_rellocate_handler;
|
||||
Opaque_CallOnGCRelocate gc_relocate_handler;
|
||||
} opaque_handler_t;
|
||||
|
||||
extern Opaque_CallOnWrite Yap_blob_write_handler_from_slot(Int slot);
|
||||
extern Opaque_CallOnGCMark Yap_blob_gc_mark_handler(Term t);
|
||||
extern Opaque_CallOnGCRellocate Yap_blob_gc_rellocate_handler(Term t);
|
||||
extern Opaque_CallOnGCRelocate Yap_blob_gc_relocate_handler(Term t);
|
||||
extern Int Yap_blob_tag_from_slot(Int slot);
|
||||
extern void *Yap_blob_info_from_slot(Int slot);
|
||||
|
||||
|
@ -226,13 +226,13 @@ typedef YAP_Int YAP_opaque_tag_t;
|
||||
typedef int (*YAP_Opaque_CallOnFail)(void *);
|
||||
typedef int (*YAP_Opaque_CallOnWrite)(void *, YAP_opaque_tag_t, void *, int);
|
||||
typedef YAP_Int (*YAP_Opaque_CallOnGCMark)(YAP_opaque_tag_t, void *, YAP_Term *, YAP_Int);
|
||||
typedef int (*YAP_Opaque_CallOnGCRellocate)(YAP_opaque_tag_t, void *, YAP_Term *, YAP_Int);
|
||||
typedef int (*YAP_Opaque_CallOnGCRelocate)(YAP_opaque_tag_t, void *, YAP_Term *, YAP_Int);
|
||||
|
||||
typedef struct YAP_opaque_handler_struct {
|
||||
YAP_Opaque_CallOnFail fail_handler;
|
||||
YAP_Opaque_CallOnWrite write_handler;
|
||||
YAP_Opaque_CallOnGCMark mark_handler;
|
||||
YAP_Opaque_CallOnGCRellocate rellocate_handler;
|
||||
YAP_Opaque_CallOnGCRelocate relocate_handler;
|
||||
} YAP_opaque_handler_t;
|
||||
|
||||
/********* execution mode ***********************/
|
||||
|
Reference in New Issue
Block a user