Commit 64a91684 authored by Juan Jose Garcia Ripoll's avatar Juan Jose Garcia Ripoll
Browse files

CHARACTERP, BASE_CHAR_P, BASE_CHAR_CODE_P, CODE_CHAR, CHAR_CODE, REAL_TYPE,...

CHARACTERP, BASE_CHAR_P, BASE_CHAR_CODE_P, CODE_CHAR, CHAR_CODE, REAL_TYPE, IMMEDIATE, IMMEDIATE_TAG, FIXNUM_TAG, FIXNUM_MINUSP, FIXNUM_PLUSP, FIXNUMP and fix get the ecl_ prefix
parent 6f2fd541
......@@ -80,8 +80,8 @@ mangle_name(cl_object output, unsigned char *source, int l)
cl_object output;
cl_object package;
cl_object found = Cnil;
cl_object maxarg = MAKE_FIXNUM(CALL_ARGUMENTS_LIMIT);
cl_object minarg = MAKE_FIXNUM(0);
cl_object maxarg = ecl_make_fixnum(CALL_ARGUMENTS_LIMIT);
cl_object minarg = ecl_make_fixnum(0);
bool is_symbol;
cl_object name;
@
......@@ -98,7 +98,7 @@ mangle_name(cl_object output, unsigned char *source, int l)
found = Ct;
output = cl_format(4, Cnil,
make_constant_base_string("ECL_SYM(~S,~D)"),
name, MAKE_FIXNUM(p));
name, ecl_make_fixnum(p));
@(return found output maxarg)
}
} else if (!Null(symbol)) {
......@@ -112,7 +112,7 @@ mangle_name(cl_object output, unsigned char *source, int l)
found = Ct;
if (fun->cfun.narg >= 0) {
minarg =
maxarg = MAKE_FIXNUM(fun->cfun.narg);
maxarg = ecl_make_fixnum(fun->cfun.narg);
}
break;
}
......
......@@ -234,7 +234,7 @@ ecl_alloc_object(cl_type t)
case t_fixnum:
return MAKE_FIXNUM(0); /* Immediate fixnum */
case t_character:
return CODE_CHAR('\0'); /* Immediate character */
return ECL_CODE_CHAR('\0'); /* Immediate character */
default:;
}
......
......@@ -189,10 +189,10 @@ ecl_object_byte_size(cl_type t)
{
if (t == t_fixnum || t == t_character)
FEerror("ecl_object_byte_size invoked with an immediate type ~D",
1, MAKE_FIXNUM(1));
1, ecl_make_fixnum(1));
if (t >= t_end)
FEerror("ecl_object_byte_size invoked with an unkown type ~D",
1, MAKE_FIXNUM(1));
1, ecl_make_fixnum(1));
return type_info[t].size;
}
......@@ -277,7 +277,7 @@ allocate_object_own(register struct ecl_type_information *type_info)
#endif /* GBC_BOEHM_OWN_ALLOCATOR */
#ifdef GBC_BOEHM_OWN_MARKER
#define IGNORABLE_POINTER(obj) (IMMEDIATE(obj) & 2)
#define IGNORABLE_POINTER(obj) (ECL_IMMEDIATE(obj) & 2)
#define GC_MARK_AND_PUSH(obj, msp, lim, src) \
((!IGNORABLE_POINTER(obj) && \
(GC_word)obj >= (GC_word)GC_least_plausible_heap_addr && \
......@@ -540,9 +540,9 @@ ecl_alloc_object(cl_type t)
/* GC_MALLOC already resets objects */
switch (t) {
case t_fixnum:
return MAKE_FIXNUM(0); /* Immediate fixnum */
return ecl_make_fixnum(0); /* Immediate fixnum */
case t_character:
return CODE_CHAR(' '); /* Immediate character */
return ECL_CODE_CHAR(' '); /* Immediate character */
#ifdef ECL_SSE2
case t_sse_pack:
#endif
......@@ -1113,7 +1113,7 @@ standard_finalizer(cl_object o)
# endif
case t_symbol: {
ecl_atomic_push(&cl_core.reused_indices,
MAKE_FIXNUM(o->symbol.binding));
ecl_make_fixnum(o->symbol.binding));
}
#endif /* ECL_THREADS */
default:;
......@@ -1193,8 +1193,8 @@ cl_object
si_gc_stats(cl_object enable)
{
cl_object old_status;
cl_object size1 = MAKE_FIXNUM(0);
cl_object size2 = MAKE_FIXNUM(0);
cl_object size1 = ecl_make_fixnum(0);
cl_object size2 = ecl_make_fixnum(0);
if (cl_core.gc_stats == 0) {
old_status = Cnil;
} else if (GC_print_stats) {
......@@ -1215,7 +1215,7 @@ si_gc_stats(cl_object enable)
if (enable == Cnil) {
GC_print_stats = 0;
cl_core.gc_stats = 0;
} else if (enable == MAKE_FIXNUM(0)) {
} else if (enable == ecl_make_fixnum(0)) {
mpz_set_ui(cl_core.bytes_consed->big.big_num, 0);
mpz_set_ui(cl_core.gc_counter->big.big_num, 0);
} else {
......@@ -1380,7 +1380,7 @@ ecl_alloc_weak_pointer(cl_object o)
ecl_enable_interrupts_env(the_env);
obj->t = t_weak_pointer;
obj->value = o;
if (!FIXNUMP(o) && !CHARACTERP(o) && !Null(o)) {
if (!ECL_FIXNUMP(o) && !ECL_CHARACTERP(o) && !Null(o)) {
GC_general_register_disappearing_link((void**)&(obj->value), (void*)o);
si_set_finalizer((cl_object)obj, Ct);
}
......
......@@ -191,7 +191,7 @@ ecl_dynamic_callback_execute(cl_object cbk_info, char *arg_buffer)
arg_buffer += 4; /* Skip return address */
for (i=0; !ecl_endp(argtypes); argtypes = CDR(argtypes), i++) {
tag = ecl_foreign_type_code(CAR(argtypes));
size = fix(si_size_of_foreign_elt_type(CAR(argtypes)));
size = ecl_fix(si_size_of_foreign_elt_type(CAR(argtypes)));
result = ecl_foreign_data_ref_elt(arg_buffer, tag);
ecl_stack_frame_push(frame,result);
{
......@@ -325,7 +325,7 @@ ecl_dynamic_callback_make(cl_object data, enum ecl_ffi_calling_convention cc_typ
int mask = 3;
while (CONSP(arg_types)) {
int sz = fix(si_size_of_foreign_elt_type(CAR(arg_types)));
int sz = ecl_fix(si_size_of_foreign_elt_type(CAR(arg_types)));
byte_size += ((sz+mask)&(~mask));
arg_types = CDR(arg_types);
}
......
......@@ -246,7 +246,7 @@ ecl_dynamic_callback_execute(long i1, long i2, long i3, long i4, long i5, long i
arg_buffer += 2*sizeof(void*); /* Skip return address and base pointer */
for (i=0; !ecl_endp(argtypes); argtypes = CDR(argtypes), i++) {
tag = ecl_foreign_type_code(CAR(argtypes));
size = fix(si_size_of_foreign_elt_type(CAR(argtypes)));
size = ecl_fix(si_size_of_foreign_elt_type(CAR(argtypes)));
if (tag <= ECL_FFI_OBJECT) {
if (i_reg_index < MAX_INT_REGISTERS)
result = ecl_foreign_data_ref_elt(&i_reg[i_reg_index++], tag);
......
......@@ -63,15 +63,15 @@ FEbad_aet()
static cl_index
out_of_bounds_error(cl_index ndx, cl_object x)
{
cl_object type = cl_list(3, @'integer', MAKE_FIXNUM(0),
MAKE_FIXNUM(x->array.dim));
cl_object type = cl_list(3, @'integer', ecl_make_fixnum(0),
ecl_make_fixnum(x->array.dim));
FEwrong_type_argument(ecl_make_integer(ndx), type);
}
void
FEwrong_dimensions(cl_object a, cl_index rank)
{
cl_object list = cl_make_list(3, MAKE_FIXNUM(rank),
cl_object list = cl_make_list(3, ecl_make_fixnum(rank),
@':initial-element', @'*');
cl_object type = cl_list(3, @'array', @'*', list);
FEwrong_type_argument(type, a);
......@@ -84,7 +84,7 @@ checked_index(cl_object function, cl_object a, int which, cl_object index,
cl_index output;
unlikely_if (!ECL_FIXNUMP(index) || ecl_fixnum_minusp(index))
FEwrong_index(function, a, which, index, nonincl_limit);
output = fix(index);
output = ecl_fix(index);
unlikely_if (output >= nonincl_limit)
FEwrong_index(function, a, which, index, nonincl_limit);
return output;
......@@ -95,7 +95,7 @@ ecl_to_index(cl_object n)
{
switch (type_of(n)) {
case t_fixnum: {
cl_fixnum out = fix(n);
cl_fixnum out = ecl_fix(n);
if (out < 0 || out >= ADIMLIM)
FEtype_error_index(Cnil, out);
return out;
......@@ -157,17 +157,17 @@ ecl_aref_unsafe(cl_object x, cl_index index)
case aet_object:
return x->array.self.t[index];
case aet_bc:
return CODE_CHAR(x->base_string.self[index]);
return ECL_CODE_CHAR(x->base_string.self[index]);
#ifdef ECL_UNICODE
case aet_ch:
return CODE_CHAR(x->string.self[index]);
return ECL_CODE_CHAR(x->string.self[index]);
#endif
case aet_bit:
index += x->vector.offset;
if (x->vector.self.bit[index/CHAR_BIT] & (0200>>index%CHAR_BIT))
return(MAKE_FIXNUM(1));
return(ecl_make_fixnum(1));
else
return(MAKE_FIXNUM(0));
return(ecl_make_fixnum(0));
case aet_fix:
return ecl_make_integer(x->array.self.fix[index]);
case aet_index:
......@@ -210,7 +210,7 @@ ecl_aref(cl_object x, cl_index index)
FEwrong_type_nth_arg(@[aref], 1, x, @[array]);
}
if (ecl_unlikely(index >= x->array.dim)) {
FEwrong_index(@[row-major-aref], x, -1, MAKE_FIXNUM(index),
FEwrong_index(@[row-major-aref], x, -1, ecl_make_fixnum(index),
x->array.dim);
}
return ecl_aref_unsafe(x, index);
......@@ -223,7 +223,7 @@ ecl_aref1(cl_object x, cl_index index)
FEwrong_type_nth_arg(@[aref], 1, x, @[array]);
}
if (ecl_unlikely(index >= x->array.dim)) {
FEwrong_index(@[aref], x, -1, MAKE_FIXNUM(index),
FEwrong_index(@[aref], x, -1, ecl_make_fixnum(index),
x->array.dim);
}
return ecl_aref_unsafe(x, index);
......@@ -249,7 +249,7 @@ ecl_row_major_ptr(cl_object x, cl_index index, cl_index bytes)
/* don't check bounds if bytes == 0 */
if (ecl_unlikely(bytes > 0 && offset + bytes > x->array.dim*elt_size)) {
FEwrong_index(@[row-major-aref], x, -1, MAKE_FIXNUM(index),
FEwrong_index(@[row-major-aref], x, -1, ecl_make_fixnum(index),
x->array.dim);
}
......@@ -402,7 +402,7 @@ si_make_pure_array(cl_object etype, cl_object dims, cl_object adj,
{
cl_index r, s, i, j;
cl_object x;
if (FIXNUMP(dims)) {
if (ECL_FIXNUMP(dims)) {
return si_make_vector(etype, dims, adj, fillp, displ, disploff);
} else if (ecl_unlikely(!ECL_LISTP(dims))) {
FEwrong_type_nth_arg(@[make-array], 1, dims,
......@@ -410,13 +410,13 @@ si_make_pure_array(cl_object etype, cl_object dims, cl_object adj,
}
r = ecl_length(dims);
if (ecl_unlikely(r >= ARANKLIM)) {
FEerror("The array rank, ~R, is too large.", 1, MAKE_FIXNUM(r));
FEerror("The array rank, ~R, is too large.", 1, ecl_make_fixnum(r));
} else if (r == 1) {
return si_make_vector(etype, ECL_CONS_CAR(dims), adj, fillp,
displ, disploff);
} else if (ecl_unlikely(!Null(fillp))) {
FEerror(":FILL-POINTER may not be specified for an array of rank ~D",
1, MAKE_FIXNUM(r));
1, ecl_make_fixnum(r));
}
x = ecl_alloc_object(t_array);
x->array.displaced = Cnil;
......@@ -429,19 +429,19 @@ si_make_pure_array(cl_object etype, cl_object dims, cl_object adj,
cl_object d = ECL_CONS_CAR(dims);
if (ecl_unlikely(!ECL_FIXNUMP(d) ||
ecl_fixnum_minusp(d) ||
ecl_fixnum_greater(d, MAKE_FIXNUM(ADIMLIM))))
ecl_fixnum_greater(d, ecl_make_fixnum(ADIMLIM))))
{
cl_object type = ecl_make_integer_type(MAKE_FIXNUM(0),
MAKE_FIXNUM(ADIMLIM));
cl_object type = ecl_make_integer_type(ecl_make_fixnum(0),
ecl_make_fixnum(ADIMLIM));
FEwrong_type_nth_arg(@[make-array], 1, d, type);
}
j = fix(d);
j = ecl_fix(d);
s *= (x->array.dims[i] = j);
if (ecl_unlikely(s > ATOTLIM)) {
cl_object type = ecl_make_integer_type(MAKE_FIXNUM(0),
MAKE_FIXNUM(ATOTLIM));
cl_object type = ecl_make_integer_type(ecl_make_fixnum(0),
ecl_make_fixnum(ATOTLIM));
FEwrong_type_key_arg(@[make-array], @[array-total-size],
MAKE_FIXNUM(s), type);
ecl_make_fixnum(s), type);
}
}
x->array.dim = s;
......@@ -472,11 +472,11 @@ si_make_vector(cl_object etype, cl_object dim, cl_object adj,
aet = ecl_symbol_to_elttype(etype);
if (ecl_unlikely(!ECL_FIXNUMP(dim) || ecl_fixnum_minusp(dim) ||
ecl_fixnum_greater(dim, ADIMLIM))) {
cl_object type = ecl_make_integer_type(MAKE_FIXNUM(0),
MAKE_FIXNUM(ADIMLIM));
cl_object type = ecl_make_integer_type(ecl_make_fixnum(0),
ecl_make_fixnum(ADIMLIM));
FEwrong_type_nth_arg(@[make-array], 1, dim, type);
}
d = fix(dim);
d = ecl_fix(dim);
if (aet == aet_bc) {
x = ecl_alloc_object(t_base_string);
x->base_string.elttype = (short)aet;
......@@ -504,13 +504,13 @@ si_make_vector(cl_object etype, cl_object dim, cl_object adj,
} else if (fillp == Ct) {
x->vector.flags |= ECL_FLAG_HAS_FILL_POINTER;
f = d;
} else if (FIXNUMP(fillp) && ecl_fixnum_geq(fillp,MAKE_FIXNUM(0)) &&
((f = fix(fillp)) <= d)) {
} else if (ECL_FIXNUMP(fillp) && ecl_fixnum_geq(fillp,ecl_make_fixnum(0)) &&
((f = ecl_fix(fillp)) <= d)) {
x->vector.flags |= ECL_FLAG_HAS_FILL_POINTER;
} else {
fillp = ecl_type_error(@'make-array',"fill pointer",fillp,
cl_list(3,@'or',cl_list(3,@'member',Cnil,Ct),
cl_list(3,@'integer',MAKE_FIXNUM(0),
cl_list(3,@'integer',ecl_make_fixnum(0),
dim)));
goto AGAIN;
}
......@@ -678,9 +678,9 @@ si_array_element_type_byte_size(cl_object type) {
cl_elttype aet = ECL_ARRAYP(type) ?
type->array.elttype :
ecl_symbol_to_elttype(type);
cl_object size = MAKE_FIXNUM(ecl_aet_size[aet]);
cl_object size = ecl_make_fixnum(ecl_aet_size[aet]);
if (aet == aet_bit)
size = ecl_make_ratio(MAKE_FIXNUM(1),MAKE_FIXNUM(CHAR_BIT));
size = ecl_make_ratio(ecl_make_fixnum(1),ecl_make_fixnum(CHAR_BIT));
@(return size ecl_elttype_to_symbol(aet))
}
......@@ -751,7 +751,7 @@ ecl_displace(cl_object from, cl_object to, cl_object offset)
void *base;
cl_elttype totype, fromtype;
fromtype = from->array.elttype;
if (ecl_unlikely(!ECL_FIXNUMP(offset) || ((j = fix(offset)) < 0))) {
if (ecl_unlikely(!ECL_FIXNUMP(offset) || ((j = ecl_fix(offset)) < 0))) {
FEwrong_type_key_arg(@[adjust-array], @[:displaced-index-offset],
offset, @[fixnum]);
}
......@@ -773,8 +773,8 @@ ecl_displace(cl_object from, cl_object to, cl_object offset)
"because the total size of the to-array"
"is too small.", 0);
if (j > maxdim) {
cl_object type = ecl_make_integer_type(MAKE_FIXNUM(0),
MAKE_FIXNUM(maxdim));
cl_object type = ecl_make_integer_type(ecl_make_fixnum(0),
ecl_make_fixnum(maxdim));
FEwrong_type_key_arg(@[adjust-array], @[:displaced-index-offset],
offset, type);
}
......@@ -824,14 +824,14 @@ si_array_raw_data(cl_object x)
cl_index displ = data - to_array->vector.self.b8;
cl_object fillp = Cnil;
if (ECL_ARRAY_HAS_FILL_POINTER_P(x)) {
fillp = MAKE_FIXNUM(x->vector.fillp * ecl_aet_size[et]);
fillp = ecl_make_fixnum(x->vector.fillp * ecl_aet_size[et]);
}
output = si_make_vector(@'ext::byte8',
MAKE_FIXNUM(total_size),
ecl_make_fixnum(total_size),
Cnil,
fillp,
si_array_raw_data(to_array),
MAKE_FIXNUM(displ));
ecl_make_fixnum(displ));
}
@(return output)
}
......@@ -849,14 +849,14 @@ cl_array_rank(cl_object a)
{
if (ecl_unlikely(!ECL_ARRAYP(a)))
FEwrong_type_only_arg(@[array-rank], a, @[array]);
@(return ((type_of(a) == t_array) ? MAKE_FIXNUM(a->array.rank)
: MAKE_FIXNUM(1)))
@(return ((type_of(a) == t_array) ? ecl_make_fixnum(a->array.rank)
: ecl_make_fixnum(1)))
}
cl_object
cl_array_dimension(cl_object a, cl_object index)
{
@(return MAKE_FIXNUM(ecl_array_dimension(a, ecl_to_size(index))))
@(return ecl_make_fixnum(ecl_array_dimension(a, ecl_to_size(index))))
}
cl_index
......@@ -887,7 +887,7 @@ cl_array_total_size(cl_object a)
{
if (ecl_unlikely(!ECL_ARRAYP(a)))
FEwrong_type_only_arg(@[array-total-size], a, @[array]);
@(return MAKE_FIXNUM(a->array.dim))
@(return ecl_make_fixnum(a->array.dim))
}
cl_object
......@@ -971,7 +971,7 @@ cl_array_displacement(cl_object a)
FEbad_aet();
}
}
ecl_return2(the_env, to_array, MAKE_FIXNUM(offset));
ecl_return2(the_env, to_array, ecl_make_fixnum(offset));
}
cl_object
......@@ -1040,7 +1040,7 @@ cl_fill_pointer(cl_object a)
const char *type = "(AND VECTOR (SATISFIES ARRAY-HAS-FILL-POINTER-P))";
FEwrong_type_nth_arg(@[fill-pointer], 1, a, ecl_read_from_cstring(type));
}
ecl_return1(the_env, MAKE_FIXNUM(a->vector.fillp));
ecl_return1(the_env, ecl_make_fixnum(a->vector.fillp));
}
/*
......@@ -1056,10 +1056,10 @@ si_fill_pointer_set(cl_object a, cl_object fp)
FEwrong_type_nth_arg(@[adjust-array], 1, a,
ecl_read_from_cstring(type));
}
if (ecl_unlikely(!ECL_FIXNUMP(fp) || ((i = fix(fp)) < 0) ||
if (ecl_unlikely(!ECL_FIXNUMP(fp) || ((i = ecl_fix(fp)) < 0) ||
(i > a->vector.dim))) {
cl_object type = ecl_make_integer_type(MAKE_FIXNUM(0),
MAKE_FIXNUM(a->vector.dim-1));
cl_object type = ecl_make_integer_type(ecl_make_fixnum(0),
ecl_make_fixnum(a->vector.dim-1));
FEwrong_type_key_arg(@[adjust-array], @[:fill-pointer], fp, type);
}
a->vector.fillp = i;
......
......@@ -74,15 +74,15 @@ big_normalize(cl_object x)
{
int s = x->big.big_size;
if (s == 0)
return(MAKE_FIXNUM(0));
return(ecl_make_fixnum(0));
if (s == 1) {
mp_limb_t y = x->big.big_limbs[0];
if (y <= MOST_POSITIVE_FIXNUM)
return MAKE_FIXNUM(y);
return ecl_make_fixnum(y);
} else if (s == -1) {
mp_limb_t y = x->big.big_limbs[0];
if (y <= -MOST_NEGATIVE_FIXNUM)
return MAKE_FIXNUM(-y);
return ecl_make_fixnum(-y);
}
return x;
}
......@@ -92,15 +92,15 @@ _ecl_big_register_normalize(cl_object x)
{
int s = x->big.big_size;
if (s == 0)
return(MAKE_FIXNUM(0));
return(ecl_make_fixnum(0));
if (s == 1) {
mp_limb_t y = x->big.big_limbs[0];
if (y <= MOST_POSITIVE_FIXNUM)
return MAKE_FIXNUM(y);
return ecl_make_fixnum(y);
} else if (s == -1) {
mp_limb_t y = x->big.big_limbs[0];
if (y <= -MOST_NEGATIVE_FIXNUM)
return MAKE_FIXNUM(-y);
return ecl_make_fixnum(-y);
}
return _ecl_big_register_copy(x);
}
......@@ -152,7 +152,7 @@ _ecl_big_times_fix(cl_object b, cl_fixnum i)
cl_object z;
if (i == 0)
return MAKE_FIXNUM(0);
return ecl_make_fixnum(0);
if (i == 1)
return b;
size = (b->big.big_size < 0)? -b->big.big_size : b->big.big_size;
......@@ -301,7 +301,7 @@ mp_free(void *ptr, size_t size)
cl_fixnum
fixint(cl_object x)
{
if (FIXNUMP(x))
if (ECL_FIXNUMP(x))
return ecl_fix(x);
if (ECL_BIGNUMP(x)) {
if (mpz_fits_slong_p(x->big.big_num)) {
......@@ -314,7 +314,7 @@ fixint(cl_object x)
cl_index
fixnnint(cl_object x)
{
if (FIXNUMP(x)) {
if (ECL_FIXNUMP(x)) {
cl_fixnum i = ecl_fix(x);
if (i >= 0)
return i;
......@@ -323,8 +323,8 @@ fixnnint(cl_object x)
return mpz_get_ui(x->big.big_num);
}
}
FEwrong_type_argument(cl_list(3, @'integer', MAKE_FIXNUM(0),
MAKE_FIXNUM(MOST_POSITIVE_FIXNUM)),
FEwrong_type_argument(cl_list(3, @'integer', ecl_make_fixnum(0),
ecl_make_fixnum(MOST_POSITIVE_FIXNUM)),
x);
}
......
......@@ -31,9 +31,9 @@ static cl_object
big_normalize(cl_object x)
{
if (x->big.big_num == 0ll)
return(MAKE_FIXNUM(0));
return(ecl_make_fixnum(0));
if (x->big.big_num <= MOST_POSITIVE_FIXNUM && x->big.big_num >= MOST_NEGATIVE_FIXNUM)
return(MAKE_FIXNUM(x->big.big_num));
return(ecl_make_fixnum(x->big.big_num));
return x;
}
......@@ -41,9 +41,9 @@ cl_object
_ecl_big_register_normalize(cl_object x)
{
if (x->big.big_num == 0ll)
return(MAKE_FIXNUM(0));
return(ecl_make_fixnum(0));
if (x->big.big_num <= MOST_POSITIVE_FIXNUM && x->big.big_num >= MOST_NEGATIVE_FIXNUM)
return(MAKE_FIXNUM(x->big.big_num));
return(ecl_make_fixnum(x->big.big_num));
return _ecl_big_register_copy(x);
}
......
......@@ -31,7 +31,7 @@ ecl_make_cfun(cl_objectfn_fixed c_function, cl_object name, cl_object cblock, in
cf->cfunfixed.name = name;
cf->cfunfixed.block = cblock;
cf->cfunfixed.file = Cnil;
cf->cfunfixed.file_position = MAKE_FIXNUM(-1);
cf->cfunfixed.file_position = ecl_make_fixnum(-1);
cf->cfunfixed.narg = narg;
if (ecl_unlikely(narg < 0 || narg > C_ARGUMENTS_LIMIT))
FEprogram_error_noreturn("ecl_make_cfun: function requires "
......@@ -50,7 +50,7 @@ ecl_make_cfun_va(cl_objectfn c_function, cl_object name, cl_object cblock)
cf->cfun.block = cblock;
cf->cfun.narg = -1;
cf->cfun.file = Cnil;
cf->cfun.file_position = MAKE_FIXNUM(-1);
cf->cfun.file_position = ecl_make_fixnum(-1);
return cf;
}
......@@ -64,7 +64,7 @@ ecl_make_cclosure_va(cl_objectfn c_function, cl_object env, cl_object block)
cc->cclosure.env = env;
cc->cclosure.block = block;
cc->cclosure.file = Cnil;
cc->cclosure.file_position = MAKE_FIXNUM(-1);
cc->cclosure.file_position = ecl_make_fixnum(-1);
return cc;
}
......
......@@ -22,17 +22,17 @@
ecl_character
ecl_char_code(cl_object c)
{
if (ecl_unlikely(!CHARACTERP(c)))
if (ecl_unlikely(!ECL_CHARACTERP(c)))
FEwrong_type_only_arg(@[char-code], c, @[character]);
return CHAR_CODE(c);
return ECL_CHAR_CODE(c);
}
ecl_base_char
ecl_base_char_code(cl_object c)
{
#ifdef ECL_UNICODE
if (CHARACTERP(c)) {
cl_fixnum code = CHAR_CODE(c);
if (ECL_CHARACTERP(c)) {
cl_fixnum code = ECL_CHAR_CODE(c);
if (code <= 255) {
return (int)code;
}
......@@ -118,19 +118,19 @@ ecl_string_case(cl_object s)
return upcase;
}
@(defun digit_char_p (c &optional (radix MAKE_FIXNUM(10)))
@(defun digit_char_p (c &optional (radix ecl_make_fixnum(10)))
@ {
cl_fixnum basis, value;
if (ecl_unlikely(!ECL_FIXNUMP(radix) ||
ecl_fixnum_lower(radix, MAKE_FIXNUM(2)) ||
ecl_fixnum_greater(radix, MAKE_FIXNUM(36)))) {
ecl_fixnum_lower(radix, ecl_make_fixnum(2)) ||
ecl_fixnum_greater(radix, ecl_make_fixnum(36)))) {
FEwrong_type_nth_arg(@[digit-char-p], 2, radix,
ecl_make_integer_type(MAKE_FIXNUM(2),
MAKE_FIXNUM(36)));
ecl_make_integer_type(ecl_make_fixnum(2),
ecl_make_fixnum(36)));
}
basis = fix(radix);
basis = ecl_fix(radix);
value = ecl_digitp(ecl_char_code(c), basis);
@(return ((value < 0)? Cnil: MAKE_FIXNUM(value)));
@(return ((value < 0)? Cnil: ecl_make_fixnum(value)));
} @)
/*
......@@ -345,14 +345,14 @@ cl_character(cl_object x)
#ifdef ECL_UNICODE
case t_string:
if (x->string.fillp == 1) {
x = CODE_CHAR(x->string.self[0]);
x = ECL_CODE_CHAR(x->string.self[0]);
break;
}
goto ERROR;
#endif
case t_base_string:
if (x->base_string.fillp == 1) {
x = CODE_CHAR(x->base_string.self[0]);
x = ECL_CODE_CHAR(x->base_string.self[0]);
break;
}
default: ERROR:
......@@ -365,7 +365,7 @@ cl_object
cl_char_code(cl_object c)
{
/* INV: ecl_char_code() checks the type of `c' */
@(return MAKE_FIXNUM(ecl_char_code(c)))
@(return ecl_make_fixnum(ecl_char_code(c)))
}
cl_object
......@@ -375,9 +375,9 @@ cl_code_char(cl_object c)
switch (type_of(c)) {
case t_fixnum:
fc = fix(c);
fc = ecl_fix(c);
if (fc < CHAR_CODE_LIMIT && fc >= 0) {
c = CODE_CHAR(fc);