Skip to content

Commit

Permalink
Another renaming frenzy
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 14, 2023
1 parent 63ddc46 commit 505dbd1
Show file tree
Hide file tree
Showing 19 changed files with 1,111 additions and 1,111 deletions.
20 changes: 10 additions & 10 deletions src/atts.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static const char *do_attribute(query *q, cell *c, unsigned arity)
return q->st.m->name;
}

bool fn_attribute_3(query *q)
bool bif_attribute_3(query *q)
{
GET_FIRST_ARG(p1,atom_or_var);
GET_NEXT_ARG(p2,atom);
Expand All @@ -35,7 +35,7 @@ bool fn_attribute_3(query *q)
return unify(q, p1, p1_ctx, &tmp, q->st.curr_frame);
}

bool fn_put_atts_2(query *q)
bool bif_put_atts_2(query *q)
{
GET_FIRST_ARG(p1,var);
GET_NEXT_ARG(p2,callable);
Expand Down Expand Up @@ -109,7 +109,7 @@ bool fn_put_atts_2(query *q)
return true;
}

bool fn_get_atts_2(query *q)
bool bif_get_atts_2(query *q)
{
GET_FIRST_ARG(p1,var);
GET_NEXT_ARG(p2,callable_or_var);
Expand Down Expand Up @@ -166,7 +166,7 @@ bool fn_get_atts_2(query *q)
return is_minus ? true : false;
}

bool fn_sys_list_attributed_1(query *q)
bool bif_sys_list_attributed_1(query *q)
{
GET_FIRST_ARG(p1,var);
parser *p = q->p;
Expand Down Expand Up @@ -196,15 +196,15 @@ bool fn_sys_list_attributed_1(query *q)
return unify(q, p1, p1_ctx, l, 0);
}

bool fn_sys_unattributed_var_1(query *q)
bool bif_sys_unattributed_var_1(query *q)
{
GET_FIRST_ARG(p1,var);
const frame *f = GET_FRAME(p1_ctx);
const slot *e = GET_SLOT(f, p1->var_nbr);
return e->c.attrs ? false : true;
}

bool fn_sys_attributed_var_1(query *q)
bool bif_sys_attributed_var_1(query *q)
{
GET_FIRST_ARG(p1,var);
const frame *f = GET_FRAME(p1_ctx);
Expand All @@ -228,7 +228,7 @@ typedef struct {
slot e[];
} bind_state;

bool fn_sys_undo_trail_2(query *q)
bool bif_sys_undo_trail_2(query *q)
{
GET_FIRST_ARG(p1,var);
GET_NEXT_ARG(p2,var);
Expand Down Expand Up @@ -286,7 +286,7 @@ bool fn_sys_undo_trail_2(query *q)
return true;
}

bool fn_sys_redo_trail_1(query * q)
bool bif_sys_redo_trail_1(query * q)
{
GET_FIRST_ARG(p1,any);

Expand Down Expand Up @@ -325,9 +325,9 @@ bool do_post_unification_hook(query *q, bool is_builtin)
static void *s_fn_ptr1 = NULL;

if (!s_fn_ptr1)
s_fn_ptr1 = get_fn_ptr(fn_iso_true_0);
s_fn_ptr1 = get_fn_ptr(bif_iso_true_0);

tmp[0].fn_ptr = s_fn_ptr1;
tmp[0].bif_ptr = s_fn_ptr1;

tmp[1].tag = TAG_INTERNED;
tmp[1].nbr_cells = 1;
Expand Down
16 changes: 8 additions & 8 deletions src/atts.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

#include "query.h"

bool fn_put_atts_2(query *q);
bool fn_get_atts_2(query *q);
bool fn_attribute_3(query *q);
bool bif_put_atts_2(query *q);
bool bif_get_atts_2(query *q);
bool bif_attribute_3(query *q);

bool fn_sys_list_attributed_1(query *q);
bool fn_sys_unattributed_var_1(query *q);
bool fn_sys_attributed_var_1(query *q);
bool bif_sys_list_attributed_1(query *q);
bool bif_sys_unattributed_var_1(query *q);
bool bif_sys_attributed_var_1(query *q);
bool bif_sys_undo_trail_2(query *q);
bool bif_sys_redo_trail_1(query *q);

bool do_post_unification_hook(query *q, bool is_builtin);
bool fn_sys_undo_trail_2(query *q);
bool fn_sys_redo_trail_1(query *q);

22 changes: 11 additions & 11 deletions src/builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
void clr_accum(cell *p);

#if USE_FFI
bool wrap_ffi_function(query *q, builtins *fn_ptr);
bool wrap_ffi_predicate(query *q, builtins *fn_ptr);
bool wrap_ffi_function(query *q, builtins *bif_ptr);
bool wrap_ffi_predicate(query *q, builtins *bif_ptr);
#endif

#define is_callable_or_var(c) (is_interned(c) || is_cstring(c) || is_var(c))
Expand Down Expand Up @@ -57,16 +57,16 @@ bool wrap_ffi_predicate(query *q, builtins *fn_ptr);
#define is_iso_atomic_or_var(c) (is_iso_atom(c) || is_number(c) || is_var(c))

#if USE_FFI
bool fn_sys_dlopen_3(query *q);
bool fn_sys_dlsym_3(query *q);
bool fn_sys_dlclose_1(query *q);
bool fn_sys_ffi_register_function_4(query *q);
bool fn_sys_ffi_register_predicate_4(query *q);
bool bif_sys_dlopen_3(query *q);
bool bif_sys_dlsym_3(query *q);
bool bif_sys_dlclose_1(query *q);
bool bif_sys_ffi_register_function_4(query *q);
bool bif_sys_ffi_register_predicate_4(query *q);
#endif

bool fn_iso_add_2(query *q);
bool fn_iso_float_1(query *q);
bool fn_iso_integer_1(query *q);
bool bif_iso_add_2(query *q);
bool bif_iso_float_1(query *q);
bool bif_iso_integer_1(query *q);

inline static void make_indirect(cell *tmp, cell *v, pl_idx v_ctx)
{
Expand Down Expand Up @@ -237,7 +237,7 @@ inline static cell *get_raw_arg(const query *q, int n)
return true; \
if (is_var(c)) \
return throw_error(q, c, q->st.curr_frame, "instantiation_error", "number"); \
if (is_builtin(c) && c->fn_ptr && (c->fn_ptr->fn != fn_iso_float_1) && (c->fn_ptr->fn != fn_iso_integer_1)) \
if (is_builtin(c) && c->bif_ptr && (c->bif_ptr->fn != bif_iso_float_1) && (c->bif_ptr->fn != bif_iso_integer_1)) \
return throw_error(q, c, q->st.curr_frame, "type_error", "evaluable");

#define check_heap_error(expr, ...) \
Expand Down
Loading

0 comments on commit 505dbd1

Please sign in to comment.