diff --git a/src/c/arch/ffi_x86.d b/src/c/arch/ffi_x86.d index 6926bc8b2..1f66ed472 100644 --- a/src/c/arch/ffi_x86.d +++ b/src/c/arch/ffi_x86.d @@ -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 = ecl_fix(si_size_of_foreign_elt_type(CAR(argtypes))); + size = ecl_fixnum(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 = ecl_fix(si_size_of_foreign_elt_type(CAR(arg_types))); + int sz = ecl_fixnum(si_size_of_foreign_elt_type(CAR(arg_types))); byte_size += ((sz+mask)&(~mask)); arg_types = CDR(arg_types); } diff --git a/src/c/arch/ffi_x86_64.d b/src/c/arch/ffi_x86_64.d index 8c6f77211..26b689fcc 100644 --- a/src/c/arch/ffi_x86_64.d +++ b/src/c/arch/ffi_x86_64.d @@ -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 = ecl_fix(si_size_of_foreign_elt_type(CAR(argtypes))); + size = ecl_fixnum(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); diff --git a/src/c/array.d b/src/c/array.d index 44774a642..6b90a9c99 100644 --- a/src/c/array.d +++ b/src/c/array.d @@ -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 = ecl_fix(index); + output = ecl_fixnum(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 = ecl_fix(n); + cl_fixnum out = ecl_fixnum(n); if (out < 0 || out >= ADIMLIM) FEtype_error_index(Cnil, out); return out; @@ -435,7 +435,7 @@ si_make_pure_array(cl_object etype, cl_object dims, cl_object adj, ecl_make_fixnum(ADIMLIM)); FEwrong_type_nth_arg(@[make-array], 1, d, type); } - j = ecl_fix(d); + j = ecl_fixnum(d); s *= (x->array.dims[i] = j); if (ecl_unlikely(s > ATOTLIM)) { cl_object type = ecl_make_integer_type(ecl_make_fixnum(0), @@ -476,7 +476,7 @@ si_make_vector(cl_object etype, cl_object dim, cl_object adj, ecl_make_fixnum(ADIMLIM)); FEwrong_type_nth_arg(@[make-array], 1, dim, type); } - d = ecl_fix(dim); + d = ecl_fixnum(dim); if (aet == aet_bc) { x = ecl_alloc_object(t_base_string); x->base_string.elttype = (short)aet; @@ -505,7 +505,7 @@ si_make_vector(cl_object etype, cl_object dim, cl_object adj, x->vector.flags |= ECL_FLAG_HAS_FILL_POINTER; f = d; } else if (ECL_FIXNUMP(fillp) && ecl_fixnum_geq(fillp,ecl_make_fixnum(0)) && - ((f = ecl_fix(fillp)) <= d)) { + ((f = ecl_fixnum(fillp)) <= d)) { x->vector.flags |= ECL_FLAG_HAS_FILL_POINTER; } else { fillp = ecl_type_error(@'make-array',"fill pointer",fillp, @@ -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 = ecl_fix(offset)) < 0))) { + if (ecl_unlikely(!ECL_FIXNUMP(offset) || ((j = ecl_fixnum(offset)) < 0))) { FEwrong_type_key_arg(@[adjust-array], @[:displaced-index-offset], offset, @[fixnum]); } @@ -1056,7 +1056,7 @@ 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 = ecl_fix(fp)) < 0) || + if (ecl_unlikely(!ECL_FIXNUMP(fp) || ((i = ecl_fixnum(fp)) < 0) || (i > a->vector.dim))) { cl_object type = ecl_make_integer_type(ecl_make_fixnum(0), ecl_make_fixnum(a->vector.dim-1)); diff --git a/src/c/big.d b/src/c/big.d index b28dd0c85..ccb27346e 100644 --- a/src/c/big.d +++ b/src/c/big.d @@ -304,7 +304,7 @@ cl_fixnum fixint(cl_object x) { if (ECL_FIXNUMP(x)) - return ecl_fix(x); + return ecl_fixnum(x); if (ECL_BIGNUMP(x)) { if (mpz_fits_slong_p(x->big.big_num)) { return mpz_get_si(x->big.big_num); @@ -317,7 +317,7 @@ cl_index fixnnint(cl_object x) { if (ECL_FIXNUMP(x)) { - cl_fixnum i = ecl_fix(x); + cl_fixnum i = ecl_fixnum(x); if (i >= 0) return i; } else if (ECL_BIGNUMP(x)) { diff --git a/src/c/character.d b/src/c/character.d index 089b0096c..a94e32d28 100644 --- a/src/c/character.d +++ b/src/c/character.d @@ -128,7 +128,7 @@ ecl_string_case(cl_object s) ecl_make_integer_type(ecl_make_fixnum(2), ecl_make_fixnum(36))); } - basis = ecl_fix(radix); + basis = ecl_fixnum(radix); value = ecl_digitp(ecl_char_code(c), basis); @(return ((value < 0)? Cnil: ecl_make_fixnum(value))); } @) @@ -375,7 +375,7 @@ cl_code_char(cl_object c) switch (type_of(c)) { case t_fixnum: - fc = ecl_fix(c); + fc = ecl_fixnum(c); if (fc < CHAR_CODE_LIMIT && fc >= 0) { c = ECL_CODE_CHAR(fc); break; @@ -416,10 +416,10 @@ cl_char_downcase(cl_object c) ecl_make_integer_type(ecl_make_fixnum(2), ecl_make_fixnum(36))); } - basis = ecl_fix(radix); + basis = ecl_fixnum(radix); switch (type_of(weight)) { case t_fixnum: { - cl_fixnum value = ecl_fix(weight); + cl_fixnum value = ecl_fixnum(weight); if (value >= 0) { int dw = ecl_digit_char(value, basis); if (dw >= 0) { @@ -495,7 +495,7 @@ cl_name_char(cl_object name) name = cl_string(name); c = ecl_gethash_safe(name, cl_core.char_names, Cnil); if (c != Cnil) { - c = ECL_CODE_CHAR(ecl_fix(c)); + c = ECL_CODE_CHAR(ecl_fixnum(c)); } else if (ecl_stringp(name) && (l = ecl_length(name))) { c = cl_char(name, ecl_make_fixnum(0)); if (l == 1) { @@ -511,7 +511,7 @@ cl_name_char(cl_object name) if (!ECL_FIXNUMP(c) || (used_l == (l - 1))) { c = Cnil; } else { - c = ECL_CODE_CHAR(ecl_fix(c)); + c = ECL_CODE_CHAR(ecl_fixnum(c)); } } } diff --git a/src/c/cinit.d b/src/c/cinit.d index 000b52630..3044c476c 100644 --- a/src/c/cinit.d +++ b/src/c/cinit.d @@ -115,7 +115,7 @@ static cl_object si_simple_toplevel () "ECL (Embeddable Common Lisp)\n", output); ecl_force_output(output); - for (i = 1; ivalue; if (ECL_FIXNUMP(index)) { - value = instance->instance.slots[ecl_fix(index)]; + value = instance->instance.slots[ecl_fixnum(index)]; } else { unlikely_if (!ECL_CONSP(index)) { FEerror("Error when accessing method cache for ~A", 1, gfun); @@ -164,7 +164,7 @@ ecl_slot_writer_dispatch(cl_narg narg, cl_object value, cl_object instance) } index = e->value; if (ECL_FIXNUMP(index)) { - instance->instance.slots[ecl_fix(index)] = value; + instance->instance.slots[ecl_fixnum(index)] = value; } else { unlikely_if (!ECL_CONSP(index)) { FEerror("Error when accessing method cache for ~A", 1, gfun); diff --git a/src/c/clos/cache.d b/src/c/clos/cache.d index f144344fa..36c30c541 100644 --- a/src/c/clos/cache.d +++ b/src/c/clos/cache.d @@ -20,7 +20,7 @@ #define RECORD_KEY(e) ((e)[0]) #define RECORD_VALUE(e) ((e)[1]) -#define RECORD_GEN(e) ecl_fix((e+2)[0]) +#define RECORD_GEN(e) ecl_fixnum((e+2)[0]) #define RECORD_GEN_SET(e,v) ((e+2)[0]=ecl_make_fixnum(v)) static void diff --git a/src/c/cmpaux.d b/src/c/cmpaux.d index d1a864191..c3d905a30 100644 --- a/src/c/cmpaux.d +++ b/src/c/cmpaux.d @@ -59,7 +59,7 @@ ecl_to_char(cl_object x) { switch (type_of(x)) { case t_fixnum: - return ecl_fix(x); + return ecl_fixnum(x); case t_character: return ECL_CHAR_CODE(x); default: @@ -115,10 +115,10 @@ ecl_to_unsigned_integer(cl_object x) float ecl_to_float(cl_object x) { - if (ECL_FIXNUMP(x)) return(ecl_fix(x)); /* Immediate fixnum */ + if (ECL_FIXNUMP(x)) return(ecl_fixnum(x)); /* Immediate fixnum */ switch (type_of(x)) { -/* case t_fixnum: return ecl_fix(x); */ +/* case t_fixnum: return ecl_fixnum(x); */ /* case t_character: return ECL_CHAR_CODE(x); */ case t_bignum: case t_ratio: diff --git a/src/c/compiler.d b/src/c/compiler.d index fb8ffd84f..b49d74c6a 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -456,7 +456,7 @@ c_register_block(cl_env_ptr env, cl_object name) cl_object loc = new_location(c_env); c_env->variables = CONS(cl_list(4, @':block', name, Cnil, loc), c_env->variables); - return ecl_fix(ECL_CONS_CDR(loc)); + return ecl_fixnum(ECL_CONS_CDR(loc)); } static cl_index @@ -466,7 +466,7 @@ c_register_tags(cl_env_ptr env, cl_object all_tags) cl_object loc = new_location(c_env); c_env->variables = CONS(cl_list(4, @':tag', all_tags, Cnil, loc), c_env->variables); - return ecl_fix(ECL_CONS_CDR(loc)); + return ecl_fixnum(ECL_CONS_CDR(loc)); } static void @@ -1423,7 +1423,7 @@ asm_function(cl_env_ptr env, cl_object function, int flags) { return FLAG_REG0; } else { /* Function from a FLET/LABELS form */ - asm_op2(env, OP_LFUNCTION, ecl_fix(ndx)); + asm_op2(env, OP_LFUNCTION, ecl_fixnum(ndx)); return FLAG_REG0; } } @@ -1463,8 +1463,8 @@ c_go(cl_env_ptr env, cl_object args, int flags) { FEprogram_error_noreturn("GO: Unknown tag ~S.", 1, tag); if (!Null(args)) FEprogram_error_noreturn("GO: Too many arguments.",0); - asm_op2(env, OP_GO, ecl_fix(CAR(info))); - asm_arg(env, ecl_fix(CDR(info))); + asm_op2(env, OP_GO, ecl_fixnum(CAR(info))); + asm_arg(env, ecl_fixnum(CDR(info))); return flags; } @@ -1952,7 +1952,7 @@ c_return_aux(cl_env_ptr env, cl_object name, cl_object stmt, int flags) if (stmt != Cnil) FEprogram_error_noreturn("RETURN-FROM: Too many arguments.", 0); compile_form(env, output, FLAG_VALUES); - asm_op2(env, OP_RETURN, ecl_fix(ndx)); + asm_op2(env, OP_RETURN, ecl_fixnum(ndx)); return FLAG_VALUES; } @@ -2208,7 +2208,7 @@ compile_constant(cl_env_ptr env, cl_object stmt, int flags) maybe_make_load_forms(env, stmt); if (stmt == Cnil) { asm_op(env, push? OP_PUSHNIL : OP_NIL); - } else if (ECL_FIXNUMP(stmt) && (n = ecl_fix(stmt)) <= MAX_OPARG + } else if (ECL_FIXNUMP(stmt) && (n = ecl_fixnum(stmt)) <= MAX_OPARG && n >= -MAX_OPARG) { asm_op2(env, push? OP_PINT : OP_INT, n); } else { @@ -2283,7 +2283,7 @@ compile_form(cl_env_ptr env, cl_object stmt, int flags) { if (SYMBOLP(function)) { cl_object index = ecl_gethash(function, cl_core.compiler_dispatch); if (index != OBJNULL) { - compiler_record *l = database + ecl_fix(index); + compiler_record *l = database + ecl_fixnum(index); c_env->lexical_level += l->lexical_increment; if (c_env->stepping && function != @'function' && c_env->lexical_level) @@ -2465,7 +2465,7 @@ compile_with_load_time_forms(cl_env_ptr env, cl_object form, int flags) } while (p != Cnil); p = forms_list; do { - cl_index loc = ecl_fix(ECL_CONS_CAR(p)); + cl_index loc = ecl_fixnum(ECL_CONS_CAR(p)); /* Clear created constants (they cannot be printed) */ c_env->constants->vector.self.t[loc] = ecl_make_fixnum(0); p = ECL_CONS_CDR(p); diff --git a/src/c/error.d b/src/c/error.d index dc9dd68ff..9c9e06bb2 100644 --- a/src/c/error.d +++ b/src/c/error.d @@ -31,7 +31,7 @@ static cl_object cl_symbol_or_object(cl_object x) { if (ECL_FIXNUMP(x)) - return (cl_object)(cl_symbols + ecl_fix(x)); + return (cl_object)(cl_symbols + ecl_fixnum(x)); return x; } diff --git a/src/c/file.d b/src/c/file.d index ec4469acc..1d736d8e6 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -367,7 +367,7 @@ generic_write_byte_le(cl_object c, cl_object strm) bs = strm->stream.byte_size; do { cl_object b = cl_logand(2, c, ecl_make_fixnum(0xFF)); - unsigned char aux = (unsigned char)ecl_fix(b); + unsigned char aux = (unsigned char)ecl_fixnum(b); if (write_byte8(strm, &aux, 1) < 1) break; c = cl_ash(c, ecl_make_fixnum(-8)); @@ -411,7 +411,7 @@ generic_write_byte(cl_object c, cl_object strm) cl_object b; bs -= 8; b = cl_logand(2, ecl_make_fixnum(0xFF), bs? cl_ash(c, ecl_make_fixnum(-bs)) : c); - aux = (unsigned char)ecl_fix(b); + aux = (unsigned char)ecl_fixnum(b); if (write_byte8(strm, &aux, 1) < 1) break; } while (bs); @@ -951,7 +951,7 @@ user_encoder(cl_object stream, unsigned char *buffer, ecl_character c) if (Null(byte)) { return encoding_error(stream, buffer, c); } else { - cl_fixnum code = ecl_fix(byte); + cl_fixnum code = ecl_fixnum(byte); if (code > 0xFF) { buffer[1] = code & 0xFF; code >>= 8; buffer[0] = code; @@ -1012,13 +1012,13 @@ user_multistate_encoder(cl_object stream, unsigned char *buffer, ecl_character c cl_object table = ECL_CONS_CAR(p); cl_object byte = ecl_gethash_safe(ECL_CODE_CHAR(c), table, Cnil); if (!Null(byte)) { - cl_fixnum code = ecl_fix(byte); + cl_fixnum code = ecl_fixnum(byte); ecl_character n = 0; if (p != table_list) { /* Must output a escape sequence */ cl_object x = ecl_gethash_safe(Ct, table, Cnil); while (!Null(x)) { - buffer[0] = ecl_fix(ECL_CONS_CAR(x)); + buffer[0] = ecl_fixnum(ECL_CONS_CAR(x)); buffer++; x = ECL_CONS_CDR(x); n++; @@ -1137,7 +1137,7 @@ clos_stream_read_byte8(cl_object strm, unsigned char *c, cl_index n) cl_object byte = _ecl_funcall2(@'gray::stream-read-byte', strm); if (!ECL_FIXNUMP(byte)) break; - c[i] = ecl_fix(byte); + c[i] = ecl_fixnum(byte); } return i; } @@ -1177,7 +1177,7 @@ clos_stream_read_char(cl_object strm) if (ECL_CHARACTERP(output)) value = ECL_CHAR_CODE(output); else if (ECL_FIXNUMP(output)) - value = ecl_fix(output); + value = ecl_fixnum(output); else if (output == Cnil || output == @':eof') return EOF; else @@ -2627,7 +2627,7 @@ consume_byte_stack(cl_object strm, unsigned char *c, cl_index n) cl_object l = strm->stream.byte_stack; if (l == Cnil) return out + strm->stream.ops->read_byte8(strm, c, n); - *(c++) = ecl_fix(ECL_CONS_CAR(l)); + *(c++) = ecl_fixnum(ECL_CONS_CAR(l)); out++; n--; strm->stream.byte_stack = l = ECL_CONS_CDR(l); @@ -4754,7 +4754,7 @@ si_do_write_sequence(cl_object seq, cl_object stream, cl_object s, cl_object e) object, and seq == Cnil i.f.f. t = t_symbol */ limit = ecl_length(seq); if (ecl_unlikely(!ECL_FIXNUMP(s) || - ((start = ecl_fix(s)) < 0) || + ((start = ecl_fixnum(s)) < 0) || (start > limit))) { FEwrong_type_key_arg(@[write-sequence], @[:start], s, ecl_make_integer_type(ecl_make_fixnum(0), @@ -4763,7 +4763,7 @@ si_do_write_sequence(cl_object seq, cl_object stream, cl_object s, cl_object e) if (e == Cnil) { end = limit; } else if (ecl_unlikely(!ECL_FIXNUMP(e) || - ((end = ecl_fix(e)) < 0) || + ((end = ecl_fixnum(e)) < 0) || (end > limit))) { FEwrong_type_key_arg(@[write-sequence], @[:end], e, ecl_make_integer_type(ecl_make_fixnum(0), @@ -4807,7 +4807,7 @@ si_do_read_sequence(cl_object seq, cl_object stream, cl_object s, cl_object e) object, and seq == Cnil i.f.f. t = t_symbol */ limit = ecl_length(seq); if (ecl_unlikely(!ECL_FIXNUMP(s) || - ((start = ecl_fix(s)) < 0) || + ((start = ecl_fixnum(s)) < 0) || (start > limit))) { FEwrong_type_key_arg(@[read-sequence], @[:start], s, ecl_make_integer_type(ecl_make_fixnum(0), @@ -4816,7 +4816,7 @@ si_do_read_sequence(cl_object seq, cl_object stream, cl_object s, cl_object e) if (e == Cnil) { end = limit; } else if (ecl_unlikely(!ECL_FIXNUMP(e) || - ((end = ecl_fix(e)) < 0) || + ((end = ecl_fixnum(e)) < 0) || (end > limit))) { FEwrong_type_key_arg(@[read-sequence], @[:end], e, ecl_make_integer_type(ecl_make_fixnum(0), diff --git a/src/c/format.d b/src/c/format.d index a39852423..63b3e8519 100644 --- a/src/c/format.d +++ b/src/c/format.d @@ -638,7 +638,7 @@ fmt_radix(format_stack fmt, bool colon, bool atsign) assert_type_integer(x); if (atsign) { if (ECL_FIXNUMP(x)) - i = ecl_fix(x); + i = ecl_fixnum(x); else i = -1; if ((!colon && (i <= 0 || i >= 4000)) || @@ -1634,7 +1634,7 @@ fmt_conditional(format_stack fmt, bool colon, bool atsign) x = fmt_advance(fmt); if (!ECL_FIXNUMP(x)) fmt_error(fmt, "illegal argument for conditional"); - n = ecl_fix(x); + n = ecl_fixnum(x); } else n = ecl_to_fix(set_param(fmt, 0, INT, ecl_make_fixnum(0))); i = fmt->ctl_index; diff --git a/src/c/gfun.d b/src/c/gfun.d index 0b05e3352..d585fe0a4 100644 --- a/src/c/gfun.d +++ b/src/c/gfun.d @@ -124,7 +124,7 @@ fill_spec_vector(cl_object vector, cl_object frame, cl_object gf) loop_for_on_unsafe(spec_how_list) { cl_object spec_how = ECL_CONS_CAR(spec_how_list); cl_object spec_type = ECL_CONS_CAR(spec_how); - int spec_position = ecl_fix(ECL_CONS_CDR(spec_how)); + int spec_position = ecl_fixnum(ECL_CONS_CDR(spec_how)); unlikely_if (spec_position >= narg) FEwrong_num_arguments(gf); unlikely_if (spec_no >= vector->vector.dim) diff --git a/src/c/hash.d b/src/c/hash.d index 3ae7d5923..51fe0ff50 100644 --- a/src/c/hash.d +++ b/src/c/hash.d @@ -184,7 +184,7 @@ _hash_equalp(int depth, cl_hashkey h, cl_object x) } return h; case t_fixnum: - return hash_word(h, ecl_fix(x)); + return hash_word(h, ecl_fixnum(x)); case t_singlefloat: /* FIXME! We should be more precise here! */ return hash_word(h, (cl_index)ecl_single_float(x)); @@ -695,7 +695,7 @@ ecl_extend_hashtable(cl_object hashtable) /* New size is too large */ new_size = old_size * 2; } else { - new_size = ecl_fix(new_size_obj); + new_size = ecl_fixnum(new_size_obj); } if (hashtable->hash.test == htt_pack) { new = ecl_alloc_object(t_hashtable); @@ -828,7 +828,7 @@ cl__make_hash_table(cl_object test, cl_object size, cl_object rehash_size, ecl_make_integer_type(ecl_make_fixnum(0), ecl_make_fixnum(ATOTLIM))); } - hsize = ecl_fix(size); + hsize = ecl_fixnum(size); if (hsize < 16) { hsize = 16; } @@ -989,7 +989,7 @@ si_hash_table_iterate(cl_narg narg) cl_object ht = CADR(env); cl_fixnum i; if (!Null(index)) { - i = ecl_fix(index); + i = ecl_fixnum(index); if (i < 0) i = -1; for (; ++i < ht->hash.size; ) { diff --git a/src/c/instance.d b/src/c/instance.d index b2b1ac76d..81b4793ba 100644 --- a/src/c/instance.d +++ b/src/c/instance.d @@ -93,7 +93,7 @@ si_instance_ref(cl_object x, cl_object index) FEwrong_type_nth_arg(@[si::instance-ref], 1, x, @[ext::instance]); if (ecl_unlikely(!ECL_FIXNUMP(index))) FEwrong_type_nth_arg(@[si::instance-ref], 2, index, @[fixnum]); - i = ecl_fix(index); + i = ecl_fixnum(index); if (ecl_unlikely(i < 0 || i >= (cl_fixnum)x->instance.length)) FEtype_error_index(x, i); @(return x->instance.slots[i]) @@ -108,7 +108,7 @@ si_instance_ref_safe(cl_object x, cl_object index) FEwrong_type_nth_arg(@[si::instance-ref], 1, x, @[ext::instance]); if (ecl_unlikely(!ECL_FIXNUMP(index))) FEwrong_type_nth_arg(@[si::instance-ref], 2, index, @[fixnum]); - i = ecl_fix(index); + i = ecl_fixnum(index); if (ecl_unlikely(i < 0 || i >= x->instance.length)) FEtype_error_index(x, i); x = x->instance.slots[i]; @@ -137,7 +137,7 @@ si_instance_set(cl_object x, cl_object index, cl_object value) FEwrong_type_nth_arg(@[si::instance-set], 1, x, @[ext::instance]); if (ecl_unlikely(!ECL_FIXNUMP(index))) FEwrong_type_nth_arg(@[si::instance-set], 2, index, @[fixnum]); - i = ecl_fix(index); + i = ecl_fixnum(index); if (ecl_unlikely(i >= (cl_fixnum)x->instance.length || i < 0)) FEtype_error_index(x, i); x->instance.slots[i] = value; @@ -173,7 +173,7 @@ si_sl_makunbound(cl_object x, cl_object index) FEwrong_type_nth_arg(@[si::sl-makunbound], 1, x, @[ext::instance]); if (ecl_unlikely(!ECL_FIXNUMP(index))) FEwrong_type_nth_arg(@[si::sl-makunbound], 2, index, @[fixnum]); - i = ecl_fix(index); + i = ecl_fixnum(index); unlikely_if (i >= x->instance.length || i < 0) FEtype_error_index(x, i); x->instance.slots[i] = ECL_UNBOUND; diff --git a/src/c/interpreter.d b/src/c/interpreter.d index 614cae36a..4c18bcf6e 100644 --- a/src/c/interpreter.d +++ b/src/c/interpreter.d @@ -472,7 +472,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) the stack (They all have been deposited by OP_PUSHVALUES) */ CASE(OP_MCALL); { - narg = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + narg = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); reg0 = ECL_STACK_REF(the_env,-narg-1); goto DO_CALL; } @@ -1032,7 +1032,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) are computed at compile time. */ cl_opcode *table = (cl_opcode *)ECL_STACK_REF(the_env,-1); lex_env = ECL_STACK_REF(the_env,-2); - table = table + ecl_fix(the_env->values[0]) * OPARG_SIZE; + table = table + ecl_fixnum(the_env->values[0]) * OPARG_SIZE; vector = table + *(cl_oparg *)table; } THREAD_NEXT; @@ -1077,7 +1077,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) Adds more values to the ones pushed by OP_PUSHVALUES. */ CASE(OP_PUSHMOREVALUES); { - cl_index n = ecl_fix(ECL_STACK_REF(the_env,-1)); + cl_index n = ecl_fixnum(ECL_STACK_REF(the_env,-1)); cl_index i = the_env->nvalues; ECL_STACK_PUSH_N(the_env, i); the_env->values[0] = reg0; @@ -1090,7 +1090,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) */ CASE(OP_POPVALUES); { cl_object *dest = the_env->values; - int n = the_env->nvalues = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + int n = the_env->nvalues = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); if (n == 0) { *dest = reg0 = Cnil; THREAD_NEXT; @@ -1122,7 +1122,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) The index N-th is extracted from the top of the stack. */ CASE(OP_NTHVAL); { - cl_fixnum n = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + cl_fixnum n = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); if (ecl_unlikely(n < 0)) { FEerror("Wrong index passed to NTH-VAL", 1, ecl_make_fixnum(n)); } else if ((cl_index)n >= the_env->nvalues) { @@ -1169,11 +1169,11 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) goto PUSH_VALUES; } CASE(OP_PROTECT_EXIT); { - volatile cl_fixnum n = the_env->nvalues = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + volatile cl_fixnum n = the_env->nvalues = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); while (n--) the_env->values[n] = ECL_STACK_POP_UNSAFE(the_env); reg0 = the_env->values[0]; - n = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + n = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); if (n <= 0) ecl_unwind(the_env, the_env->frs_top + n); THREAD_NEXT; @@ -1193,7 +1193,7 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) THREAD_NEXT; } CASE(OP_EXIT_PROGV); { - cl_index n = ecl_fix(ECL_STACK_POP_UNSAFE(the_env)); + cl_index n = ecl_fixnum(ECL_STACK_POP_UNSAFE(the_env)); ecl_bds_unwind(the_env, n); THREAD_NEXT; } diff --git a/src/c/main.d b/src/c/main.d index 0df9defc1..c8ccd8c29 100644 --- a/src/c/main.d +++ b/src/c/main.d @@ -814,7 +814,7 @@ cl_boot(int argc, char **argv) @(defun ext::exit (&optional (code ECL_SYM_VAL(ecl_process_env(),@'ext::*program-exit-code*'))) @ cl_shutdown(); - exit(ECL_FIXNUMP(code)? ecl_fix(code) : 0); + exit(ECL_FIXNUMP(code)? ecl_fixnum(code) : 0); @) cl_object @@ -827,7 +827,7 @@ cl_object si_argv(cl_object index) { if (ECL_FIXNUMP(index)) { - cl_fixnum i = ecl_fix(index); + cl_fixnum i = ecl_fixnum(index); if (i >= 0 && i < ARGC) @(return make_base_string_copy(ARGV[i])); } diff --git a/src/c/num_arith.d b/src/c/num_arith.d index 60a6cf830..c46016290 100644 --- a/src/c/num_arith.d +++ b/src/c/num_arith.d @@ -29,9 +29,9 @@ ecl_integer_divide(cl_object x, cl_object y) if (ty == t_fixnum) { if (y == ecl_make_fixnum(0)) FEdivision_by_zero(x, y); - return ecl_make_fixnum(ecl_fix(x) / ecl_fix(y)); + return ecl_make_fixnum(ecl_fixnum(x) / ecl_fixnum(y)); } else if (ty == t_bignum) { - return _ecl_fix_divided_by_big(ecl_fix(x), y); + return _ecl_fix_divided_by_big(ecl_fixnum(x), y); } else { FEwrong_type_nth_arg(@[round], 2, y, @[integer]); } @@ -40,7 +40,7 @@ ecl_integer_divide(cl_object x, cl_object y) if (ty == t_bignum) { return _ecl_big_divided_by_big(x, y); } else if (ty == t_fixnum) { - return _ecl_big_divided_by_fix(x, ecl_fix(y)); + return _ecl_big_divided_by_fix(x, ecl_fixnum(y)); } else { FEwrong_type_nth_arg(@[round], 2, y, @[integer]); } @@ -72,7 +72,7 @@ ecl_gcd(cl_object x, cl_object y) switch (type_of(x)) { case t_fixnum: - _ecl_big_set_fixnum(x_big, ecl_fix(x)); + _ecl_big_set_fixnum(x_big, ecl_fixnum(x)); x = x_big; case t_bignum: break; @@ -81,7 +81,7 @@ ecl_gcd(cl_object x, cl_object y) } switch (type_of(y)) { case t_fixnum: - _ecl_big_set_fixnum(y_big, ecl_fix(y)); + _ecl_big_set_fixnum(y_big, ecl_fixnum(y)); y = y_big; case t_bignum: break; diff --git a/src/c/num_co.d b/src/c/num_co.d index 71c28518d..11fa384be 100644 --- a/src/c/num_co.d +++ b/src/c/num_co.d @@ -183,7 +183,7 @@ ecl_floor2(cl_object x, cl_object y) case t_fixnum: switch(ty) { case t_fixnum: { /* FIX / FIX */ - cl_fixnum a = ecl_fix(x), b = ecl_fix(y); + cl_fixnum a = ecl_fixnum(x), b = ecl_fixnum(y); cl_fixnum q = a / b, r = a % b; if ((r^b) < 0 && r) { /* opposite sign and some remainder*/ v0 = ecl_make_fixnum(q-1); @@ -201,7 +201,7 @@ ecl_floor2(cl_object x, cl_object y) * y = - MOST_NEGATIVE_FIXNUM */ ECL_WITH_TEMP_BIGNUM(bx,4); - _ecl_big_set_fixnum(bx, ecl_fix(x)); + _ecl_big_set_fixnum(bx, ecl_fixnum(x)); v0 = _ecl_big_floor(bx, y, &v1); break; } @@ -211,7 +211,7 @@ ecl_floor2(cl_object x, cl_object y) break; case t_singlefloat: { /* FIX / SF */ float n = ecl_single_float(y); - float p = ecl_fix(x) / n; + float p = ecl_fixnum(x) / n; float q = floorf(p); v0 = float_to_integer(q); v1 = ecl_make_singlefloat((p - q)*n); @@ -219,7 +219,7 @@ ecl_floor2(cl_object x, cl_object y) } case t_doublefloat: { /* FIX / DF */ double n = ecl_double_float(y); - double p = ecl_fix(x) / n; + double p = ecl_fixnum(x) / n; double q = floor(p); v0 = double_to_integer(q); v1 = ecl_make_doublefloat((p - q)*n); @@ -228,7 +228,7 @@ ecl_floor2(cl_object x, cl_object y) #ifdef ECL_LONG_FLOAT case t_longfloat: { /* FIX / LF */ long double n = ecl_long_float(y); - long double p = ecl_fix(x) / n; + long double p = ecl_fixnum(x) / n; long double q = floorl(p); v0 = long_double_to_integer(q); v1 = ecl_make_longfloat((p - q)*n); @@ -243,7 +243,7 @@ ecl_floor2(cl_object x, cl_object y) switch(ty) { case t_fixnum: { /* BIG / FIX */ ECL_WITH_TEMP_BIGNUM(by,4); - _ecl_big_set_fixnum(by, ecl_fix(y)); + _ecl_big_set_fixnum(by, ecl_fixnum(y)); v0 = _ecl_big_floor(x, by, &v1); break; } @@ -397,7 +397,7 @@ ecl_ceiling2(cl_object x, cl_object y) case t_fixnum: switch(ty) { case t_fixnum: { /* FIX / FIX */ - cl_fixnum a = ecl_fix(x); cl_fixnum b = ecl_fix(y); + cl_fixnum a = ecl_fixnum(x); cl_fixnum b = ecl_fixnum(y); cl_fixnum q = a / b; cl_fixnum r = a % b; if ((r^b) > 0 && r) { /* same signs and some remainder */ v0 = ecl_make_fixnum(q+1); @@ -415,7 +415,7 @@ ecl_ceiling2(cl_object x, cl_object y) * y = - MOST_NEGATIVE_FIXNUM */ ECL_WITH_TEMP_BIGNUM(bx,4); - _ecl_big_set_fixnum(bx, ecl_fix(x)); + _ecl_big_set_fixnum(bx, ecl_fixnum(x)); v0 = _ecl_big_ceiling(bx, y, &v1); break; } @@ -425,7 +425,7 @@ ecl_ceiling2(cl_object x, cl_object y) break; case t_singlefloat: { /* FIX / SF */ float n = ecl_single_float(y); - float p = ecl_fix(x)/n; + float p = ecl_fixnum(x)/n; float q = ceilf(p); v0 = float_to_integer(q); v1 = ecl_make_singlefloat(p*n - q*n); @@ -433,7 +433,7 @@ ecl_ceiling2(cl_object x, cl_object y) } case t_doublefloat: { /* FIX / DF */ double n = ecl_double_float(y); - double p = ecl_fix(x)/n; + double p = ecl_fixnum(x)/n; double q = ceil(p); v0 = double_to_integer(q); v1 = ecl_make_doublefloat(p*n - q*n); @@ -442,7 +442,7 @@ ecl_ceiling2(cl_object x, cl_object y) #ifdef ECL_LONG_FLOAT case t_longfloat: { /* FIX / LF */ long double n = ecl_long_float(y); - long double p = ecl_fix(x)/n; + long double p = ecl_fixnum(x)/n; long double q = ceill(p); v0 = long_double_to_integer(q); v1 = ecl_make_longfloat(p*n - q*n); @@ -457,7 +457,7 @@ ecl_ceiling2(cl_object x, cl_object y) switch(type_of(y)) { case t_fixnum: { /* BIG / FIX */ ECL_WITH_TEMP_BIGNUM(by,4); - _ecl_big_set_fixnum(by, ecl_fix(y)); + _ecl_big_set_fixnum(by, ecl_fixnum(y)); v0 = _ecl_big_ceiling(x, by, &v1); break; } @@ -817,7 +817,7 @@ cl_scale_float(cl_object x, cl_object y) cl_fixnum k; if (ECL_FIXNUMP(y)) { - k = ecl_fix(y); + k = ecl_fixnum(y); } else { FEwrong_type_nth_arg(@[scale-float],2,y,@[fixnum]); } diff --git a/src/c/num_log.d b/src/c/num_log.d index 80c1b433e..7c4ab1216 100644 --- a/src/c/num_log.d +++ b/src/c/num_log.d @@ -164,12 +164,12 @@ ecl_boole(int op, cl_object x, cl_object y) case t_fixnum: switch (type_of(y)) { case t_fixnum: { - cl_fixnum z = fixnum_operations[op](ecl_fix(x), ecl_fix(y)); + cl_fixnum z = fixnum_operations[op](ecl_fixnum(x), ecl_fixnum(y)); return ecl_make_fixnum(z); } case t_bignum: { cl_object x_copy = _ecl_big_register0(); - _ecl_big_set_fixnum(x_copy, ecl_fix(x)); + _ecl_big_set_fixnum(x_copy, ecl_fixnum(x)); (_ecl_big_boole_operator(op))(x_copy, x_copy, y); return _ecl_big_register_normalize(x_copy); } @@ -182,7 +182,7 @@ ecl_boole(int op, cl_object x, cl_object y) switch (type_of(y)) { case t_fixnum: { cl_object z = _ecl_big_register1(); - _ecl_big_set_fixnum(z,ecl_fix(y)); + _ecl_big_set_fixnum(z,ecl_fixnum(y)); (_ecl_big_boole_operator(op))(x_copy, x, z); _ecl_big_register_free(z); break; @@ -214,7 +214,7 @@ count_bits(cl_object x) switch (type_of(x)) { case t_fixnum: { - cl_fixnum i = ecl_fix(x); + cl_fixnum i = ecl_fixnum(x); cl_fixnum j = (i < 0) ? ~i : i; for (count=0 ; j ; j >>= 1) if (j & 1) count++; @@ -257,7 +257,7 @@ ecl_ash(cl_object x, cl_fixnum w) * Furthermore, in general, shifting negative numbers leads * to implementation-specific results :-/ */ - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (bits >= FIXNUM_BITS) { y = (y < 0)? -1 : 0; } else { @@ -268,7 +268,7 @@ ecl_ash(cl_object x, cl_fixnum w) mpz_div_2exp(y->big.big_num, x->big.big_num, bits); } else { if (ECL_FIXNUMP(x)) { - _ecl_big_set_fixnum(y, ecl_fix(x)); + _ecl_big_set_fixnum(y, ecl_fixnum(x)); x = y; } mpz_mul_2exp(y->big.big_num, x->big.big_num, (unsigned long)w); @@ -381,7 +381,7 @@ cl_logbitp(cl_object p, cl_object x) if (ECL_FIXNUMP(p)) { cl_index n = ecl_to_size(p); if (ECL_FIXNUMP(x)) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (n >= FIXNUM_BITS) { i = (y < 0); } else { @@ -393,7 +393,7 @@ cl_logbitp(cl_object p, cl_object x) } else { assert_type_non_negative_integer(p); if (ECL_FIXNUMP(x)) - i = (ecl_fix(x) < 0); + i = (ecl_fixnum(x) < 0); else i = (_ecl_big_sign(x) < 0); } @@ -409,7 +409,7 @@ cl_ash(cl_object x, cl_object y) assert_type_integer(x); assert_type_integer(y); if (ECL_FIXNUMP(y)) - r = ecl_ash(x, ecl_fix(y)); + r = ecl_ash(x, ecl_fixnum(y)); else { /* bit position represented by bignum is probably @@ -452,7 +452,7 @@ ecl_integer_length(cl_object x) switch (type_of(x)) { case t_fixnum: - i = ecl_fix(x); + i = ecl_fixnum(x); count = ecl_fixnum_bit_length(i); break; case t_bignum: diff --git a/src/c/num_pred.d b/src/c/num_pred.d index 43b6fce6a..171e3028b 100644 --- a/src/c/num_pred.d +++ b/src/c/num_pred.d @@ -24,7 +24,7 @@ int ecl_oddp(cl_object x) { if (ECL_FIXNUMP(x)) - return ecl_fix(x) & 1; + return ecl_fixnum(x) & 1; unlikely_if (!ECL_BIGNUMP(x)) FEwrong_type_only_arg(@[oddp], x, @[integer]); return _ecl_big_odd_p(x); @@ -34,7 +34,7 @@ int ecl_evenp(cl_object x) { if (ECL_FIXNUMP(x)) - return ~ecl_fix(x) & 1; + return ~ecl_fixnum(x) & 1; unlikely_if (!ECL_BIGNUMP(x)) FEwrong_type_only_arg(@[evenp], x, @[integer]); return _ecl_big_even_p(x); diff --git a/src/c/num_rand.d b/src/c/num_rand.d index 4a6c5c2fa..52a89e0f4 100644 --- a/src/c/num_rand.d +++ b/src/c/num_rand.d @@ -188,7 +188,7 @@ rando(cl_object x, cl_object rs) switch (type_of(x)) { case t_fixnum: #if FIXNUM_BITS <= 32 - z = ecl_make_fixnum(generate_int32(rs->random.value) % ecl_fix(x)); + z = ecl_make_fixnum(generate_int32(rs->random.value) % ecl_fixnum(x)); break; #endif case t_bignum: diff --git a/src/c/number.d b/src/c/number.d index 8e1eb89d6..89531db05 100644 --- a/src/c/number.d +++ b/src/c/number.d @@ -49,7 +49,7 @@ ecl_to_fix(cl_object f) { if (ecl_unlikely(!ECL_FIXNUMP(f))) FEtype_error_fixnum(f); - return ecl_fix(f); + return ecl_fixnum(f); } cl_index @@ -57,7 +57,7 @@ ecl_to_size(cl_object f) { cl_fixnum aux; if (ecl_likely(ECL_FIXNUMP(f))) { - cl_fixnum aux = ecl_fix(f); + cl_fixnum aux = ecl_fixnum(f); if (ecl_likely(aux >= 0)) return aux; } @@ -97,7 +97,7 @@ ecl_to_bit(cl_object x) { ecl_uint8_t ecl_to_uint8_t(cl_object x) { if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum aux = ecl_fix(x); + cl_fixnum aux = ecl_fixnum(x); if (ecl_likely(aux >= 0 && aux <= 255)) return (ecl_uint8_t)aux; } @@ -108,7 +108,7 @@ ecl_to_uint8_t(cl_object x) { ecl_int8_t ecl_to_int8_t(cl_object x) { if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum aux = ecl_fix(x); + cl_fixnum aux = ecl_fixnum(x); if (ecl_likely(aux >= -128 && aux <= 127)) return (ecl_uint8_t)aux; } @@ -120,7 +120,7 @@ unsigned short ecl_to_ushort(cl_object x) { const unsigned short ushort_max = USHRT_MAX; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= 0 && y <= ushort_max)) { return (unsigned short)y; } @@ -136,7 +136,7 @@ ecl_to_short(cl_object x) { const short short_min = SHRT_MIN; const short short_max = SHRT_MAX; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= short_min && y <= short_max)) { return (short)y; } @@ -156,7 +156,7 @@ ecl_uint16_t ecl_to_uint16_t(cl_object x) { const uint16_t uint16_max = 0xFFFFL; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= 0 && y <= uint16_max)) { return (ecl_uint16_t)y; } @@ -172,7 +172,7 @@ ecl_to_int16_t(cl_object x) { const int16_t int16_min = -0x8000; const int16_t int16_max = 0x7FFF; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= int16_min && y <= int16_max)) { return (ecl_int16_t)y; } @@ -189,7 +189,7 @@ ecl_uint32_t ecl_to_uint32_t(cl_object x) { const uint32_t uint32_max = 0xFFFFFFFFUL; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= 0 && y <= uint32_max)) { return (ecl_uint32_t)y; } @@ -204,7 +204,7 @@ ecl_to_int32_t(cl_object x) { const int32_t int32_min = -0x80000000L; const int32_t int32_max = 0x7FFFFFFFL; if (ecl_likely(ECL_FIXNUMP(x))) { - cl_fixnum y = ecl_fix(x); + cl_fixnum y = ecl_fixnum(x); if (ecl_likely(y >= int32_min && y <= int32_max)) { return (ecl_int32_t)y; } @@ -221,7 +221,7 @@ ecl_uint64_t ecl_to_uint64_t(cl_object x) { if (!ecl_minusp(x)) { if (ECL_FIXNUMP(x)) { - return (ecl_uint64_t)ecl_fix(x); + return (ecl_uint64_t)ecl_fixnum(x); } else if (!ECL_BIGNUMP(x)) { (void)0; } else if (mpz_fits_ulong_p(x->big.big_num)) { @@ -246,7 +246,7 @@ ecl_to_uint64_t(cl_object x) { ecl_int64_t ecl_to_int64_t(cl_object x) { if (ECL_FIXNUMP(x)) { - return (ecl_int64_t)ecl_fix(x); + return (ecl_int64_t)ecl_fixnum(x); } else if (!ECL_BIGNUMP(x)) { (void)0; } else if (mpz_fits_slong_p(x->big.big_num)) { @@ -335,7 +335,7 @@ ecl_ulong_long_t ecl_to_unsigned_long_long(cl_object x) { if (!ecl_minusp(x)) { if (ECL_FIXNUMP(x)) { - return (ecl_ulong_long_t)ecl_fix(x); + return (ecl_ulong_long_t)ecl_fixnum(x); } else if (!ECL_BIGNUMP(x)) { (void)0; } else if (mpz_fits_ulong_p(x->big.big_num)) { @@ -365,7 +365,7 @@ ecl_long_long_t ecl_to_long_long(cl_object x) { if (ECL_FIXNUMP(x)) { - return (ecl_long_long_t)ecl_fix(x); + return (ecl_long_long_t)ecl_fixnum(x); } else if (!ECL_BIGNUMP(x)) { (void)0; } else if (mpz_fits_slong_p(x->big.big_num)) { @@ -624,7 +624,7 @@ static cl_object into_bignum(cl_object bignum, cl_object integer) { if (ECL_FIXNUMP(integer)) { - _ecl_big_set_fixnum(bignum, ecl_fix(integer)); + _ecl_big_set_fixnum(bignum, ecl_fixnum(integer)); } else { mpz_set(bignum->big.big_num, integer->big.big_num); } @@ -703,9 +703,9 @@ ratio_to_float(cl_object num, cl_object den) cl_object bits = prepare_ratio_to_float(num, den, FLT_MANT_DIG, &scale); #if (FIXNUM_BITS-ECL_TAG_BITS) >= FLT_MANT_DIG /* The output of prepare_ratio_to_float will always fit an integer */ - float output = ecl_fix(bits); + float output = ecl_fixnum(bits); #else - float output = ECL_FIXNUMP(bits)? ecl_fix(bits) : _ecl_big_to_double(bits); + float output = ECL_FIXNUMP(bits)? ecl_fixnum(bits) : _ecl_big_to_double(bits); #endif return ldexpf(output, scale); } @@ -718,9 +718,9 @@ ratio_to_double(cl_object num, cl_object den) cl_object bits = prepare_ratio_to_float(num, den, DBL_MANT_DIG, &scale); #if (FIXNUM_BITS-ECL_TAG_BITS) >= DBL_MANT_DIG /* The output of prepare_ratio_to_float will always fit an integer */ - double output = ecl_fix(bits); + double output = ecl_fixnum(bits); #else - double output = ECL_FIXNUMP(bits)? ecl_fix(bits) : _ecl_big_to_double(bits); + double output = ECL_FIXNUMP(bits)? ecl_fixnum(bits) : _ecl_big_to_double(bits); #endif return ldexp(output, scale); } @@ -733,10 +733,10 @@ ratio_to_long_double(cl_object num, cl_object den) cl_object bits = prepare_ratio_to_float(num, den, LDBL_MANT_DIG, &scale); #if (FIXNUM_BITS-ECL_TAG_BITS) >= LDBL_MANT_DIG /* The output of prepare_ratio_to_float will always fit an integer */ - long double output = ecl_fix(bits); + long double output = ecl_fixnum(bits); #else long double output = ECL_FIXNUMP(bits)? - (long double)ecl_fix(bits) : + (long double)ecl_fixnum(bits) : _ecl_big_to_long_double(bits); #endif return ldexpl(output, scale); @@ -748,7 +748,7 @@ ecl_to_double(cl_object x) { switch(type_of(x)) { case t_fixnum: - return((double)(ecl_fix(x))); + return((double)(ecl_fixnum(x))); case t_bignum: return ratio_to_double(x, ecl_make_fixnum(1)); case t_ratio: @@ -772,7 +772,7 @@ ecl_to_long_double(cl_object x) { switch(type_of(x)) { case t_fixnum: - return (long double)ecl_fix(x); + return (long double)ecl_fixnum(x); case t_bignum: return ratio_to_long_double(x, ecl_make_fixnum(1)); case t_ratio: diff --git a/src/c/numbers/abs.d b/src/c/numbers/abs.d index 87c7343f0..1e170bda1 100644 --- a/src/c/numbers/abs.d +++ b/src/c/numbers/abs.d @@ -30,7 +30,7 @@ cl_abs(cl_object x) static cl_object ecl_abs_fixnum(cl_object x) { - return ecl_fixnum_minusp(x)? ecl_make_integer(-ecl_fix(x)) : x; + return ecl_fixnum_minusp(x)? ecl_make_integer(-ecl_fixnum(x)) : x; } static cl_object diff --git a/src/c/numbers/divide.d b/src/c/numbers/divide.d index eae93e9ad..364cf8c96 100644 --- a/src/c/numbers/divide.d +++ b/src/c/numbers/divide.d @@ -60,10 +60,10 @@ MATH_DISPATCH2_BEGIN(x,y) y->ratio.num); } CASE_FIXNUM_SINGLE_FLOAT { - return ecl_make_singlefloat(ecl_fix(x) / ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) / ecl_single_float(y)); } CASE_FIXNUM_DOUBLE_FLOAT { - return ecl_make_doublefloat(ecl_fix(x) / ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) / ecl_double_float(y)); } CASE_BIGNUM_SINGLE_FLOAT; CASE_RATIO_SINGLE_FLOAT { @@ -88,7 +88,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_ratio(num, den); } CASE_SINGLE_FLOAT_FIXNUM { - return ecl_make_singlefloat(ecl_single_float(x) / ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) / ecl_fixnum(y)); } CASE_SINGLE_FLOAT_BIGNUM; CASE_SINGLE_FLOAT_RATIO { @@ -101,7 +101,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_doublefloat(ecl_single_float(x) / ecl_double_float(y)); } CASE_DOUBLE_FLOAT_FIXNUM { - return ecl_make_doublefloat(ecl_double_float(x) / ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) / ecl_fixnum(y)); } CASE_DOUBLE_FLOAT_BIGNUM; CASE_DOUBLE_FLOAT_RATIO { @@ -115,7 +115,7 @@ MATH_DISPATCH2_BEGIN(x,y) } #ifdef ECL_LONG_FLOAT CASE_FIXNUM_LONG_FLOAT { - return ecl_make_longfloat(ecl_fix(x) / ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) / ecl_long_float(y)); } CASE_BIGNUM_LONG_FLOAT; CASE_RATIO_LONG_FLOAT { @@ -128,7 +128,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_longfloat(ecl_double_float(x) / ecl_long_float(y)); } CASE_LONG_FLOAT_FIXNUM { - return ecl_make_longfloat(ecl_long_float(x) / ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) / ecl_fixnum(y)); } CASE_LONG_FLOAT_BIGNUM; CASE_LONG_FLOAT_RATIO { @@ -239,7 +239,7 @@ ecl_divide(cl_object x, cl_object y) case t_singlefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_singlefloat(ecl_single_float(x) / ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) / ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_singlefloat(ecl_single_float(x) / ecl_to_double(y)); @@ -259,7 +259,7 @@ ecl_divide(cl_object x, cl_object y) case t_doublefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_doublefloat(ecl_double_float(x) / ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) / ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_doublefloat(ecl_double_float(x) / ecl_to_double(y)); @@ -280,7 +280,7 @@ ecl_divide(cl_object x, cl_object y) case t_longfloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_longfloat(ecl_long_float(x) / ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) / ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_longfloat(ecl_long_float(x) / ecl_to_double(y)); diff --git a/src/c/numbers/minus.d b/src/c/numbers/minus.d index 914aa246d..11d3a7b8f 100644 --- a/src/c/numbers/minus.d +++ b/src/c/numbers/minus.d @@ -35,10 +35,10 @@ ecl_minus(cl_object x, cl_object y) MATH_DISPATCH2_BEGIN(x,y) { CASE_FIXNUM_FIXNUM { - return ecl_make_integer(ecl_fix(x) - ecl_fix(y)); + return ecl_make_integer(ecl_fixnum(x) - ecl_fixnum(y)); } CASE_FIXNUM_BIGNUM { - return _ecl_fix_minus_big(ecl_fix(x), y); + return _ecl_fix_minus_big(ecl_fixnum(x), y); } CASE_FIXNUM_RATIO; CASE_BIGNUM_RATIO { @@ -47,13 +47,13 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_ratio(z, y->ratio.den); } CASE_FIXNUM_SINGLE_FLOAT { - return ecl_make_singlefloat(ecl_fix(x) - ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) - ecl_single_float(y)); } CASE_FIXNUM_DOUBLE_FLOAT { - return ecl_make_doublefloat(ecl_fix(x) - ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) - ecl_double_float(y)); } CASE_BIGNUM_FIXNUM { - return _ecl_big_plus_fix(x, -ecl_fix(y)); + return _ecl_big_plus_fix(x, -ecl_fixnum(y)); } CASE_BIGNUM_BIGNUM { return _ecl_big_minus_big(x, y); @@ -80,7 +80,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_ratio(z, z1); } CASE_SINGLE_FLOAT_FIXNUM { - return ecl_make_singlefloat(ecl_single_float(x) - ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) - ecl_fixnum(y)); } CASE_SINGLE_FLOAT_BIGNUM; CASE_SINGLE_FLOAT_RATIO { @@ -93,7 +93,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_doublefloat(ecl_single_float(x) - ecl_double_float(y)); } CASE_DOUBLE_FLOAT_FIXNUM { - return ecl_make_doublefloat(ecl_double_float(x) - ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) - ecl_fixnum(y)); } CASE_DOUBLE_FLOAT_BIGNUM; CASE_DOUBLE_FLOAT_RATIO { @@ -107,7 +107,7 @@ MATH_DISPATCH2_BEGIN(x,y) } #ifdef ECL_LONG_FLOAT CASE_FIXNUM_LONG_FLOAT { - return ecl_make_longfloat(ecl_fix(x) - ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) - ecl_long_float(y)); } CASE_BIGNUM_LONG_FLOAT { return ecl_make_longfloat(ecl_to_long_double(x) - ecl_long_float(y)); @@ -122,7 +122,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_longfloat(ecl_double_float(x) - ecl_long_float(y)); } CASE_LONG_FLOAT_FIXNUM { - return ecl_make_longfloat(ecl_long_float(x) - ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) - ecl_fixnum(y)); } CASE_LONG_FLOAT_BIGNUM; CASE_LONG_FLOAT_RATIO { @@ -184,20 +184,20 @@ ecl_minus(cl_object x, cl_object y) case t_fixnum: switch(type_of(y)) { case t_fixnum: - return ecl_make_integer(ecl_fix(x) - ecl_fix(y)); + return ecl_make_integer(ecl_fixnum(x) - ecl_fixnum(y)); case t_bignum: - return _ecl_fix_minus_big(ecl_fix(x), y); + return _ecl_fix_minus_big(ecl_fixnum(x), y); case t_ratio: z = ecl_times(x, y->ratio.den); z = ecl_minus(z, y->ratio.num); return ecl_make_ratio(z, y->ratio.den); case t_singlefloat: - return ecl_make_singlefloat(ecl_fix(x) - ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) - ecl_single_float(y)); case t_doublefloat: - return ecl_make_doublefloat(ecl_fix(x) - ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) - ecl_double_float(y)); #ifdef ECL_LONG_FLOAT case t_longfloat: - return ecl_make_longfloat(ecl_fix(x) - ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) - ecl_long_float(y)); #endif case t_complex: goto COMPLEX; @@ -207,7 +207,7 @@ ecl_minus(cl_object x, cl_object y) case t_bignum: switch (type_of(y)) { case t_fixnum: - return _ecl_big_plus_fix(x, -ecl_fix(y)); + return _ecl_big_plus_fix(x, -ecl_fixnum(y)); case t_bignum: return _ecl_big_minus_big(x, y); case t_ratio: @@ -256,7 +256,7 @@ ecl_minus(cl_object x, cl_object y) case t_singlefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_singlefloat(ecl_single_float(x) - ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) - ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_singlefloat(ecl_single_float(x) - ecl_to_double(y)); @@ -276,7 +276,7 @@ ecl_minus(cl_object x, cl_object y) case t_doublefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_doublefloat(ecl_double_float(x) - ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) - ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_doublefloat(ecl_double_float(x) - ecl_to_double(y)); diff --git a/src/c/numbers/negate.d b/src/c/numbers/negate.d index 40ff1846b..c3986d4fb 100644 --- a/src/c/numbers/negate.d +++ b/src/c/numbers/negate.d @@ -21,7 +21,7 @@ static cl_object ecl_negate_fix(cl_object x) { - return ecl_make_integer(-ecl_fix(x)); + return ecl_make_integer(-ecl_fixnum(x)); } static cl_object diff --git a/src/c/numbers/number_compare.d b/src/c/numbers/number_compare.d index c4a4b6f65..56d87ad73 100644 --- a/src/c/numbers/number_compare.d +++ b/src/c/numbers/number_compare.d @@ -41,10 +41,10 @@ ecl_number_compare(cl_object x, cl_object y) ty = type_of(y); switch (type_of(x)) { case t_fixnum: - ix = ecl_fix(x); + ix = ecl_fixnum(x); switch (ty) { case t_fixnum: - iy = ecl_fix(y); + iy = ecl_fixnum(y); if (ix < iy) return(-1); else return(ix != iy); @@ -116,7 +116,7 @@ ecl_number_compare(cl_object x, cl_object y) DOUBLEFLOAT0: switch (ty) { case t_fixnum: - return -double_fix_compare(ecl_fix(y), dx); + return -double_fix_compare(ecl_fixnum(y), dx); case t_bignum: case t_ratio: x = cl_rational(x); @@ -148,7 +148,7 @@ ecl_number_compare(cl_object x, cl_object y) ldx = ecl_long_float(x); switch (ty) { case t_fixnum: - return -long_double_fix_compare(ecl_fix(y), ldx); + return -long_double_fix_compare(ecl_fixnum(y), ldx); case t_bignum: case t_ratio: x = cl_rational(x); diff --git a/src/c/numbers/number_equalp.d b/src/c/numbers/number_equalp.d index f860d9838..97530833f 100644 --- a/src/c/numbers/number_equalp.d +++ b/src/c/numbers/number_equalp.d @@ -48,12 +48,12 @@ ecl_number_equalp(cl_object x, cl_object y) case t_ratio: return 0; case t_singlefloat: - return double_fix_compare(ecl_fix(x), ecl_single_float(y)) == 0; + return double_fix_compare(ecl_fixnum(x), ecl_single_float(y)) == 0; case t_doublefloat: - return double_fix_compare(ecl_fix(x), ecl_double_float(y)) == 0; + return double_fix_compare(ecl_fixnum(x), ecl_double_float(y)) == 0; #ifdef ECL_LONG_FLOAT case t_longfloat: - return long_double_fix_compare(ecl_fix(x), ecl_long_float(y)) == 0; + return long_double_fix_compare(ecl_fixnum(x), ecl_long_float(y)) == 0; #endif case t_complex: goto Y_COMPLEX; @@ -108,7 +108,7 @@ ecl_number_equalp(cl_object x, cl_object y) FLOAT: switch (type_of(y)) { case t_fixnum: - return double_fix_compare(ecl_fix(y), dx) == 0; + return double_fix_compare(ecl_fixnum(y), dx) == 0; case t_bignum: case t_ratio: x = cl_rational(x); @@ -131,7 +131,7 @@ ecl_number_equalp(cl_object x, cl_object y) long double dx = ecl_long_float(x); switch (type_of(y)) { case t_fixnum: - return long_double_fix_compare(ecl_fix(y), dx) == 0; + return long_double_fix_compare(ecl_fixnum(y), dx) == 0; case t_bignum: case t_ratio: x = cl_rational(x); diff --git a/src/c/numbers/plus.d b/src/c/numbers/plus.d index 5dd786c37..6821f1273 100644 --- a/src/c/numbers/plus.d +++ b/src/c/numbers/plus.d @@ -33,10 +33,10 @@ ecl_plus(cl_object x, cl_object y) MATH_DISPATCH2_BEGIN(x,y) { CASE_FIXNUM_FIXNUM { - return ecl_make_integer(ecl_fix(x) + ecl_fix(y)); + return ecl_make_integer(ecl_fixnum(x) + ecl_fixnum(y)); } CASE_FIXNUM_BIGNUM { - return _ecl_big_plus_fix(y, ecl_fix(x)); + return _ecl_big_plus_fix(y, ecl_fixnum(x)); } CASE_FIXNUM_RATIO; CASE_BIGNUM_RATIO { @@ -45,13 +45,13 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_ratio(z, y->ratio.den); } CASE_FIXNUM_SINGLE_FLOAT { - return ecl_make_singlefloat(ecl_fix(x) + ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) + ecl_single_float(y)); } CASE_FIXNUM_DOUBLE_FLOAT { - return ecl_make_doublefloat(ecl_fix(x) + ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) + ecl_double_float(y)); } CASE_BIGNUM_FIXNUM { - return _ecl_big_plus_fix(x, ecl_fix(y)); + return _ecl_big_plus_fix(x, ecl_fixnum(y)); } CASE_BIGNUM_BIGNUM { return _ecl_big_plus_big(x, y); @@ -78,7 +78,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_ratio(z, z1); } CASE_SINGLE_FLOAT_FIXNUM { - return ecl_make_singlefloat(ecl_single_float(x) + ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) + ecl_fixnum(y)); } CASE_SINGLE_FLOAT_BIGNUM; CASE_SINGLE_FLOAT_RATIO { @@ -91,7 +91,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_doublefloat(ecl_single_float(x) + ecl_double_float(y)); } CASE_DOUBLE_FLOAT_FIXNUM { - return ecl_make_doublefloat(ecl_double_float(x) + ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) + ecl_fixnum(y)); } CASE_DOUBLE_FLOAT_BIGNUM; CASE_DOUBLE_FLOAT_RATIO { @@ -105,7 +105,7 @@ MATH_DISPATCH2_BEGIN(x,y) } #ifdef ECL_LONG_FLOAT CASE_FIXNUM_LONG_FLOAT { - return ecl_make_longfloat(ecl_fix(x) + ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) + ecl_long_float(y)); } CASE_BIGNUM_LONG_FLOAT { return ecl_make_longfloat(ecl_to_long_double(x) + ecl_long_float(y)); @@ -120,7 +120,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_longfloat(ecl_double_float(x) + ecl_long_float(y)); } CASE_LONG_FLOAT_FIXNUM { - return ecl_make_longfloat(ecl_long_float(x) + ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) + ecl_fixnum(y)); } CASE_LONG_FLOAT_BIGNUM; CASE_LONG_FLOAT_RATIO { @@ -182,20 +182,20 @@ ecl_plus(cl_object x, cl_object y) case t_fixnum: switch (type_of(y)) { case t_fixnum: - return ecl_make_integer(ecl_fix(x) + ecl_fix(y)); + return ecl_make_integer(ecl_fixnum(x) + ecl_fixnum(y)); case t_bignum: - return _ecl_big_plus_fix(y, ecl_fix(x)); + return _ecl_big_plus_fix(y, ecl_fixnum(x)); case t_ratio: z = ecl_times(x, y->ratio.den); z = ecl_plus(z, y->ratio.num); return ecl_make_ratio(z, y->ratio.den); case t_singlefloat: - return ecl_make_singlefloat(ecl_fix(x) + ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) + ecl_single_float(y)); case t_doublefloat: - return ecl_make_doublefloat(ecl_fix(x) + ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) + ecl_double_float(y)); #ifdef ECL_LONG_FLOAT case t_longfloat: - return ecl_make_longfloat(ecl_fix(x) + ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) + ecl_long_float(y)); #endif case t_complex: COMPLEX: /* INV: x is real, y is complex */ @@ -207,7 +207,7 @@ ecl_plus(cl_object x, cl_object y) case t_bignum: switch (type_of(y)) { case t_fixnum: - return _ecl_big_plus_fix(x, ecl_fix(y)); + return _ecl_big_plus_fix(x, ecl_fixnum(y)); case t_bignum: return _ecl_big_plus_big(x, y); case t_ratio: @@ -256,7 +256,7 @@ ecl_plus(cl_object x, cl_object y) case t_singlefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_singlefloat(ecl_single_float(x) + ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) + ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_singlefloat(ecl_single_float(x) + ecl_to_double(y)); @@ -276,7 +276,7 @@ ecl_plus(cl_object x, cl_object y) case t_doublefloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_doublefloat(ecl_double_float(x) + ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) + ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_doublefloat(ecl_double_float(x) + ecl_to_double(y)); @@ -297,7 +297,7 @@ ecl_plus(cl_object x, cl_object y) case t_longfloat: switch (type_of(y)) { case t_fixnum: - return ecl_make_longfloat(ecl_long_float(x) + ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) + ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_longfloat(ecl_long_float(x) + ecl_to_double(y)); diff --git a/src/c/numbers/times.d b/src/c/numbers/times.d index 755574d1e..14188949c 100644 --- a/src/c/numbers/times.d +++ b/src/c/numbers/times.d @@ -33,10 +33,10 @@ ecl_times(cl_object x, cl_object y) MATH_DISPATCH2_BEGIN(x,y) { CASE_FIXNUM_FIXNUM { - return _ecl_fix_times_fix(ecl_fix(x), ecl_fix(y)); + return _ecl_fix_times_fix(ecl_fixnum(x), ecl_fixnum(y)); } CASE_FIXNUM_BIGNUM { - return _ecl_big_times_fix(y, ecl_fix(x)); + return _ecl_big_times_fix(y, ecl_fixnum(x)); } CASE_FIXNUM_RATIO; CASE_BIGNUM_RATIO { @@ -44,13 +44,13 @@ MATH_DISPATCH2_BEGIN(x,y) y->ratio.den); } CASE_FIXNUM_SINGLE_FLOAT { - return ecl_make_singlefloat(ecl_fix(x) * ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) * ecl_single_float(y)); } CASE_FIXNUM_DOUBLE_FLOAT { - return ecl_make_doublefloat(ecl_fix(x) * ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) * ecl_double_float(y)); } CASE_BIGNUM_FIXNUM { - return _ecl_big_times_fix(x, ecl_fix(y)); + return _ecl_big_times_fix(x, ecl_fixnum(y)); } CASE_BIGNUM_BIGNUM { return _ecl_big_times_big(x, y); @@ -78,7 +78,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_doublefloat(ecl_to_double(x) * ecl_double_float(y)); } CASE_SINGLE_FLOAT_FIXNUM { - return ecl_make_singlefloat(ecl_single_float(x) * ecl_fix(y)); + return ecl_make_singlefloat(ecl_single_float(x) * ecl_fixnum(y)); } CASE_SINGLE_FLOAT_BIGNUM; CASE_SINGLE_FLOAT_RATIO { @@ -91,7 +91,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_doublefloat(ecl_single_float(x) * ecl_double_float(y)); } CASE_DOUBLE_FLOAT_FIXNUM { - return ecl_make_doublefloat(ecl_double_float(x) * ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) * ecl_fixnum(y)); } CASE_DOUBLE_FLOAT_BIGNUM; CASE_DOUBLE_FLOAT_RATIO { @@ -105,7 +105,7 @@ MATH_DISPATCH2_BEGIN(x,y) } #ifdef ECL_LONG_FLOAT CASE_FIXNUM_LONG_FLOAT { - return ecl_make_longfloat(ecl_fix(x) * ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) * ecl_long_float(y)); } CASE_BIGNUM_LONG_FLOAT; CASE_RATIO_LONG_FLOAT { @@ -118,7 +118,7 @@ MATH_DISPATCH2_BEGIN(x,y) return ecl_make_longfloat(ecl_double_float(x) * ecl_long_float(y)); } CASE_LONG_FLOAT_FIXNUM { - return ecl_make_longfloat(ecl_long_float(x) * ecl_fix(y)); + return ecl_make_longfloat(ecl_long_float(x) * ecl_fixnum(y)); } CASE_LONG_FLOAT_BIGNUM; CASE_LONG_FLOAT_RATIO { @@ -181,19 +181,19 @@ ecl_times(cl_object x, cl_object y) case t_fixnum: switch (type_of(y)) { case t_fixnum: - return _ecl_fix_times_fix(ecl_fix(x),ecl_fix(y)); + return _ecl_fix_times_fix(ecl_fixnum(x),ecl_fixnum(y)); case t_bignum: - return _ecl_big_times_fix(y, ecl_fix(x)); + return _ecl_big_times_fix(y, ecl_fixnum(x)); case t_ratio: z = ecl_times(x, y->ratio.num); return ecl_make_ratio(z, y->ratio.den); case t_singlefloat: - return ecl_make_singlefloat(ecl_fix(x) * ecl_single_float(y)); + return ecl_make_singlefloat(ecl_fixnum(x) * ecl_single_float(y)); case t_doublefloat: - return ecl_make_doublefloat(ecl_fix(x) * ecl_double_float(y)); + return ecl_make_doublefloat(ecl_fixnum(x) * ecl_double_float(y)); #ifdef ECL_LONG_FLOAT case t_longfloat: - return ecl_make_longfloat(ecl_fix(x) * ecl_long_float(y)); + return ecl_make_longfloat(ecl_fixnum(x) * ecl_long_float(y)); #endif case t_complex: goto COMPLEX; @@ -203,7 +203,7 @@ ecl_times(cl_object x, cl_object y) case t_bignum: switch (type_of(y)) { case t_fixnum: - return _ecl_big_times_fix(x, ecl_fix(y)); + return _ecl_big_times_fix(x, ecl_fixnum(y)); case t_bignum: return _ecl_big_times_big(x, y); case t_ratio: @@ -249,7 +249,7 @@ ecl_times(cl_object x, cl_object y) float fx = ecl_single_float(x); switch (type_of(y)) { case t_fixnum: - return ecl_make_singlefloat(fx * ecl_fix(y)); + return ecl_make_singlefloat(fx * ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_singlefloat(fx * ecl_to_double(y)); @@ -270,7 +270,7 @@ ecl_times(cl_object x, cl_object y) case t_doublefloat: { switch (type_of(y)) { case t_fixnum: - return ecl_make_doublefloat(ecl_double_float(x) * ecl_fix(y)); + return ecl_make_doublefloat(ecl_double_float(x) * ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_doublefloat(ecl_double_float(x) * ecl_to_double(y)); @@ -296,7 +296,7 @@ ecl_times(cl_object x, cl_object y) long double lx = ecl_long_float(x); switch (type_of(y)) { case t_fixnum: - return ecl_make_longfloat(lx * ecl_fix(y)); + return ecl_make_longfloat(lx * ecl_fixnum(y)); case t_bignum: case t_ratio: return ecl_make_longfloat(lx * ecl_to_double(y)); diff --git a/src/c/pathname.d b/src/c/pathname.d index dae0d8d89..4cb8d1959 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -632,7 +632,7 @@ ecl_parse_namestring(cl_object s, cl_index start, cl_index end, cl_index *ep, } else { version = cl_parse_integer(3, aux, @':junk-allowed', Ct); if (cl_integerp(version) != Cnil && ecl_plusp(version) && - ecl_fix(VALUES(1)) == ecl_length(aux)) + ecl_fixnum(VALUES(1)) == ecl_length(aux)) ; else if (cl_string_equal(2, aux, @':newest') != Cnil) version = @':newest'; @@ -1111,7 +1111,7 @@ NO_DIRECTORY: /* Since the printer is not reentrant, * we cannot use cl_write and friends. */ - int n = ecl_fix(y), i; + int n = ecl_fixnum(y), i; char b[FIXNUM_BITS/2]; for (i = 0; n; i++) { b[i] = n%10 + '0'; diff --git a/src/c/print.d b/src/c/print.d index 5bb9c79bb..a44411a26 100644 --- a/src/c/print.d +++ b/src/c/print.d @@ -33,7 +33,7 @@ ecl_print_base(void) { cl_object object = ecl_symbol_value(@'*print-base*'); cl_fixnum base; - unlikely_if (!ECL_FIXNUMP(object) || (base = ecl_fix(object)) < 2 || base > 36) { + unlikely_if (!ECL_FIXNUMP(object) || (base = ecl_fixnum(object)) < 2 || base > 36) { ECL_SETQ(ecl_process_env(), @'*print-base*', ecl_make_fixnum(10)); FEerror("The value of *PRINT-BASE*~% ~S~%" "is not of the expected type (INTEGER 2 36)", 1, object); @@ -49,7 +49,7 @@ ecl_print_level(void) if (object == Cnil) { level = MOST_POSITIVE_FIXNUM; } else if (ECL_FIXNUMP(object)) { - level = ecl_fix(object); + level = ecl_fixnum(object); if (level < 0) { ERROR: ECL_SETQ(ecl_process_env(), @'*print-level*', Cnil); FEerror("The value of *PRINT-LEVEL*~% ~S~%" @@ -72,7 +72,7 @@ ecl_print_length(void) if (object == Cnil) { length = MOST_POSITIVE_FIXNUM; } else if (ECL_FIXNUMP(object)) { - length = ecl_fix(object); + length = ecl_fixnum(object); unlikely_if (length < 0) { ERROR: ECL_SETQ(ecl_process_env(), @'*print-length*', Cnil); FEerror("The value of *PRINT-LENGTH*~% ~S~%" diff --git a/src/c/printer/float_string_old.d b/src/c/printer/float_string_old.d index 6d09dd794..37a50a22e 100644 --- a/src/c/printer/float_string_old.d +++ b/src/c/printer/float_string_old.d @@ -102,7 +102,7 @@ assert_floating_point_width(cl_object width) "~%~A~%is not an integer within bounds", 1, width); } - return ecl_fix(width); + return ecl_fixnum(width); } static cl_object @@ -242,21 +242,21 @@ float_string(cl_object digits_string, * fraction digits as permitted */ if (low || high || (cutoffp && (k + cutoff <= 0))) break; - ecl_string_push_extend(digits_string, ecl_digit_char(ecl_fix(u), 10)); + ecl_string_push_extend(digits_string, ecl_digit_char(ecl_fixnum(u), 10)); digits++; } while(1); /* If cutof occured before first digit, then no digits generated at all */ if (!cutoffp || (k + cutoff) >= 0) { /* Last digit may need rounding */ - int digit = ecl_fix(u); + int digit = ecl_fixnum(u); if (low && !high) - digit = ecl_fix(u); + digit = ecl_fixnum(u); else if (high && !low) - digit = ecl_fix(u)+1; + digit = ecl_fixnum(u)+1; else if (ecl_lower(ecl_ash(r,1), s)) - digit = ecl_fix(u); + digit = ecl_fixnum(u); else - digit = ecl_fix(u) + 1; + digit = ecl_fixnum(u) + 1; ecl_string_push_extend(digits_string, ecl_digit_char(digit, 10)); digits++; } diff --git a/src/c/printer/float_to_digits.d b/src/c/printer/float_to_digits.d index 023d44639..370de257b 100644 --- a/src/c/printer/float_to_digits.d +++ b/src/c/printer/float_to_digits.d @@ -37,7 +37,7 @@ static float_approx * setup(cl_object number, float_approx *approx) { cl_object f = cl_integer_decode_float(number); - cl_fixnum e = ecl_fix(VALUES(1)), min_e; + cl_fixnum e = ecl_fixnum(VALUES(1)), min_e; bool limit_f = 0; switch (type_of(number)) { case t_singlefloat: @@ -143,16 +143,16 @@ generate(cl_object digits, float_approx *approx) if (tc1 || tc2) { break; } - ecl_string_push_extend(digits, ecl_digit_char(ecl_fix(d), 10)); + ecl_string_push_extend(digits, ecl_digit_char(ecl_fixnum(d), 10)); } while (1); if (tc2 && !tc1) { - digit = ecl_fix(d) + 1; + digit = ecl_fixnum(d) + 1; } else if (tc1 && !tc2) { - digit = ecl_fix(d); + digit = ecl_fixnum(d); } else if (ecl_lower(times2(approx->r), approx->s)) { - digit = ecl_fix(d); + digit = ecl_fixnum(d); } else { - digit = ecl_fix(d) + 1; + digit = ecl_fixnum(d) + 1; } ecl_string_push_extend(digits, ecl_digit_char(digit, 10)); return digits; @@ -164,7 +164,7 @@ change_precision(float_approx *approx, cl_object position, cl_object relativep) cl_fixnum pos; if (Null(position)) return; - pos = ecl_fix(position); + pos = ecl_fixnum(position); if (!Null(relativep)) { cl_object k = ecl_make_fixnum(0); cl_object l = ecl_make_fixnum(1); diff --git a/src/c/printer/float_to_string.d b/src/c/printer/float_to_string.d index 8e15022b7..a00b21685 100644 --- a/src/c/printer/float_to_string.d +++ b/src/c/printer/float_to_string.d @@ -103,7 +103,7 @@ si_float_to_string_free(cl_object buffer_or_nil, cl_object number, base = ecl_length(buffer_or_nil); exp = si_float_to_digits(buffer_or_nil, number, Cnil, Cnil); buffer = VALUES(1); - e = ecl_fix(exp); + e = ecl_fixnum(exp); if (ecl_signbit(number)) { insert_char(buffer, base++, '-'); diff --git a/src/c/printer/integer_to_string.d b/src/c/printer/integer_to_string.d index 087395e79..143347834 100644 --- a/src/c/printer/integer_to_string.d +++ b/src/c/printer/integer_to_string.d @@ -20,7 +20,7 @@ bignum_to_string(cl_object buffer, cl_object x, cl_object base) { cl_index str_size; int b; - if (!ECL_FIXNUMP(base) || ((b = ecl_fix(base)) < 2) || (b > 36)) { + if (!ECL_FIXNUMP(base) || ((b = ecl_fixnum(base)) < 2) || (b > 36)) { FEwrong_type_nth_arg(@[si::integer-to-string], 3, base, cl_list(3, @'integer', ecl_make_fixnum(2), ecl_make_fixnum(36))); @@ -70,7 +70,7 @@ si_integer_to_string(cl_object buffer, cl_object integer, if (!Null(radix)) { if (Null(decimalp) || base != ecl_make_fixnum(10)) { buffer = _ecl_ensure_buffer(buffer, 10); - write_base_prefix(buffer, ecl_fix(base)); + write_base_prefix(buffer, ecl_fixnum(base)); } buffer = si_integer_to_string(buffer, integer, base, Cnil, Cnil); if (!Null(decimalp) && base == ecl_make_fixnum(10)) { @@ -81,7 +81,7 @@ si_integer_to_string(cl_object buffer, cl_object integer, switch (type_of(integer)) { case t_fixnum: { cl_object big = _ecl_big_register0(); - _ecl_big_set_fixnum(big, ecl_fix(integer)); + _ecl_big_set_fixnum(big, ecl_fixnum(integer)); buffer = bignum_to_string(buffer, big, base); _ecl_big_register_free(big); return buffer; diff --git a/src/c/printer/write_object.d b/src/c/printer/write_object.d index 5f4640e04..130a2e925 100644 --- a/src/c/printer/write_object.d +++ b/src/c/printer/write_object.d @@ -72,14 +72,14 @@ search_print_circle(cl_object x) return 0; } else if (code == Ct) { /* This object is referenced twice, but has no code yet */ - cl_fixnum new_code = ecl_fix(circle_counter) + 1; + cl_fixnum new_code = ecl_fixnum(circle_counter) + 1; circle_counter = ecl_make_fixnum(new_code); _ecl_sethash(x, circle_stack, circle_counter); ECL_SETQ(ecl_process_env(), @'si::*circle-counter*', circle_counter); return -new_code; } else { - return ecl_fix(code); + return ecl_fixnum(code); } } } diff --git a/src/c/read.d b/src/c/read.d index 28aa84fd5..16bedee3c 100644 --- a/src/c/read.d +++ b/src/c/read.d @@ -137,8 +137,8 @@ invert_buffer_case(cl_object x, cl_object escape_list, int sign) do { if (escape_list != Cnil) { cl_object escape_interval = CAR(escape_list); - high_limit = ecl_fix(CAR(escape_interval)); - low_limit = ecl_fix(CDR(escape_interval)); + high_limit = ecl_fixnum(CAR(escape_interval)); + low_limit = ecl_fixnum(CDR(escape_interval)); escape_list = CDR(escape_list); } else { high_limit = low_limit = -1; @@ -446,7 +446,7 @@ cl_object comma_reader(cl_object in, cl_object c) { cl_object x, y; const cl_env_ptr env = ecl_process_env(); - cl_fixnum backq_level = ecl_fix(ECL_SYM_VAL(env, @'si::*backq-level*')); + cl_fixnum backq_level = ecl_fixnum(ECL_SYM_VAL(env, @'si::*backq-level*')); unlikely_if (backq_level <= 0) FEreader_error("A comma has appeared out of a backquote.", in, 0); @@ -471,7 +471,7 @@ static cl_object backquote_reader(cl_object in, cl_object c) { const cl_env_ptr the_env = ecl_process_env(); - cl_fixnum backq_level = ecl_fix(ECL_SYM_VAL(the_env, @'si::*backq-level*')); + cl_fixnum backq_level = ecl_fixnum(ECL_SYM_VAL(the_env, @'si::*backq-level*')); ECL_SETQ(the_env, @'si::*backq-level*', ecl_make_fixnum(backq_level+1)); in = ecl_read_object(in); ECL_SETQ(the_env, @'si::*backq-level*', ecl_make_fixnum(backq_level)); @@ -786,7 +786,7 @@ sharp_left_parenthesis_reader(cl_object in, cl_object c, cl_object d) extern int _cl_backq_car(cl_object *); const cl_env_ptr the_env = ecl_process_env(); cl_object v; - if (ecl_fix(ECL_SYM_VAL(the_env, @'si::*backq-level*')) > 0) { + if (ecl_fixnum(ECL_SYM_VAL(the_env, @'si::*backq-level*')) > 0) { /* First case: ther might be unquoted elements in the vector. * Then we just create a form that generates the vector. */ @@ -820,7 +820,7 @@ sharp_left_parenthesis_reader(cl_object in, cl_object c, cl_object d) be smaller, and in that case...*/ cl_object last; cl_index dim, i; - unlikely_if (!ECL_FIXNUMP(d) || ((dim = ecl_fix(d)) < 0) || + unlikely_if (!ECL_FIXNUMP(d) || ((dim = ecl_fixnum(d)) < 0) || (dim > ADIMLIM)) { FEreader_error("Invalid dimension size ~D in #()", in, 1, d); } @@ -878,7 +878,7 @@ sharp_asterisk_reader(cl_object in, cl_object c, cl_object d) if (Null(d)) { dim = dimcount; } else { - unlikely_if (!ECL_FIXNUMP(d) || ((dim = ecl_fix(d)) < 0) || + unlikely_if (!ECL_FIXNUMP(d) || ((dim = ecl_fixnum(d)) < 0) || (dim > ADIMLIM)) { FEreader_error("Wrong vector dimension size ~D in #*.", @@ -1037,7 +1037,7 @@ sharp_R_reader(cl_object in, cl_object c, cl_object d) } else unlikely_if (!ECL_FIXNUMP(d)) { FEreader_error("No radix was supplied in the #R readmacro.", in, 0); } else { - radix = ecl_fix(d); + radix = ecl_fixnum(d); unlikely_if (radix > 36 || radix < 2) { FEreader_error("~S is an illegal radix.", in, 1, d); } @@ -1428,7 +1428,7 @@ ecl_current_read_base(void) cl_object x = ECL_SYM_VAL(the_env, @'*read-base*'); cl_fixnum b; - unlikely_if (!ECL_FIXNUMP(x) || ((b = ecl_fix(x)) < 2) || (b > 36)) + unlikely_if (!ECL_FIXNUMP(x) || ((b = ecl_fixnum(x)) < 2) || (b > 36)) { ECL_SETQ(the_env, @'*read-base*', ecl_make_fixnum(10)); FEerror("The value of *READ-BASE*~& ~S~%" @@ -1829,7 +1829,7 @@ ecl_readtable_get(cl_object readtable, int c, cl_object *macro_or_table) if (!Null(hash)) { cl_object pair = ecl_gethash_safe(ECL_CODE_CHAR(c), hash, Cnil); if (!Null(pair)) { - cat = ecl_fix(ECL_CONS_CAR(pair)); + cat = ecl_fixnum(ECL_CONS_CAR(pair)); m = ECL_CONS_CDR(pair); } } @@ -2362,9 +2362,9 @@ ecl_init_module(cl_object block, void (*entry_point)(cl_object)) for (i = 0; i < block->cblock.cfuns_size; i++) { const struct ecl_cfun *prototype = block->cblock.cfuns+i; - cl_index fname_location = ecl_fix(prototype->block); + cl_index fname_location = ecl_fixnum(prototype->block); cl_object fname = VV[fname_location]; - cl_index location = ecl_fix(prototype->name); + cl_index location = ecl_fixnum(prototype->name); cl_object position = prototype->file_position; int narg = prototype->narg; VV[location] = narg<0? diff --git a/src/c/reader/parse_integer.d b/src/c/reader/parse_integer.d index 47eb9b0d5..566071df6 100644 --- a/src/c/reader/parse_integer.d +++ b/src/c/reader/parse_integer.d @@ -91,7 +91,7 @@ ecl_parse_integer(cl_object str, cl_index start, cl_index end, else goto CANNOT_PARSE; } - x = ecl_parse_integer(strng, s, e, &ep, ecl_fix(radix)); + x = ecl_parse_integer(strng, s, e, &ep, ecl_fixnum(radix)); if (x == OBJNULL) { if (junk_allowed != Cnil) { @(return Cnil ecl_make_fixnum(ep)); diff --git a/src/c/reader/parse_number.d b/src/c/reader/parse_number.d index 7e513a13d..19565d53a 100644 --- a/src/c/reader/parse_number.d +++ b/src/c/reader/parse_number.d @@ -76,7 +76,7 @@ make_float(cl_object num, cl_object exp, cl_index exp_char, int sign) if (!ECL_FIXNUMP(exp)) { return infinity(exp_char, sign); } else { - cl_fixnum fix_exp = ecl_fix(exp); + cl_fixnum fix_exp = ecl_fixnum(exp); if (fix_exp > 0) { num = ecl_times(num, expt10(fix_exp)); } else if (fix_exp < 0) { diff --git a/src/c/sequence.d b/src/c/sequence.d index f2131b39f..84339f2ba 100644 --- a/src/c/sequence.d +++ b/src/c/sequence.d @@ -30,7 +30,7 @@ ecl_sequence_start_end(cl_object fun, cl_object sequence, unlikely_if (!ECL_FIXNUMP(start) || ecl_fixnum_minusp(start)) { FEwrong_type_key_arg(fun, @[:start], start, @[unsigned-byte]); } - p.start = ecl_fix(start); + p.start = ecl_fixnum(start); if (Null(end)) { p.end = l; } else { @@ -38,7 +38,7 @@ ecl_sequence_start_end(cl_object fun, cl_object sequence, FEwrong_type_key_arg(fun, @[:end], end, ecl_read_from_cstring("(OR NULL UNSIGNED-BYTE)")); } - p.end = ecl_fix(end); + p.end = ecl_fixnum(end); unlikely_if (p.end > l) { cl_object fillp = ecl_make_fixnum(l); FEwrong_type_key_arg(fun, @[:end], end, diff --git a/src/c/stacks.d b/src/c/stacks.d index 174452074..264864118 100644 --- a/src/c/stacks.d +++ b/src/c/stacks.d @@ -203,7 +203,7 @@ get_bds_ptr(cl_object x) { if (ECL_FIXNUMP(x)) { cl_env_ptr env = ecl_process_env(); - bds_ptr p = env->bds_org + ecl_fix(x); + bds_ptr p = env->bds_org + ecl_fixnum(x); if (env->bds_org <= p && p <= env->bds_top) return(p); } @@ -249,7 +249,7 @@ ecl_new_binding_index(cl_env_ptr env, cl_object symbol) if (new_index == ECL_MISSING_SPECIAL_BINDING) { pool = ecl_atomic_pop(&cl_core.reused_indices); if (!Null(pool)) { - new_index = ecl_fix(ECL_CONS_CAR(pool)); + new_index = ecl_fixnum(ECL_CONS_CAR(pool)); } else { new_index = ecl_atomic_index_incf(&cl_core.last_var_index); } @@ -556,7 +556,7 @@ get_frame_ptr(cl_object x) { if (ECL_FIXNUMP(x)) { cl_env_ptr env = ecl_process_env(); - ecl_frame_ptr p = env->frs_org + ecl_fix(x); + ecl_frame_ptr p = env->frs_org + ecl_fixnum(x); if (env->frs_org <= p && p <= env->frs_top) return p; } diff --git a/src/c/structure.d b/src/c/structure.d index 3c4aa0c3f..d41695200 100644 --- a/src/c/structure.d +++ b/src/c/structure.d @@ -145,7 +145,7 @@ si_structure_ref(cl_object x, cl_object type, cl_object index) if (ecl_unlikely(type_of(x) != T_STRUCTURE || !structure_subtypep(STYPE(x), type))) FEwrong_type_nth_arg(@[si::structure-ref], 1, x, type); - @(return SLOT(x, ecl_fix(index))) + @(return SLOT(x, ecl_fixnum(index))) } cl_object @@ -164,7 +164,7 @@ si_structure_set(cl_object x, cl_object type, cl_object index, cl_object val) if (ecl_unlikely(type_of(x) != T_STRUCTURE || !structure_subtypep(STYPE(x), type))) FEwrong_type_nth_arg(@[si::structure-set], 1, x, type); - SLOT(x, ecl_fix(index)) = val; + SLOT(x, ecl_fixnum(index)) = val; @(return val) } diff --git a/src/c/tcp.d b/src/c/tcp.d index 09872bafa..00c111af6 100644 --- a/src/c/tcp.d +++ b/src/c/tcp.d @@ -279,13 +279,13 @@ si_open_client_stream(cl_object host, cl_object port) FEwrong_type_nth_arg(@[si::open-client-stream], 2, port, ecl_read_from_cstring("(INTEGER 0 65535)")); } - p = ecl_fix(port); + p = ecl_fixnum(port); if (host->base_string.fillp > BUFSIZ - 1) FEerror("~S is a too long file name.", 1, host); ecl_disable_interrupts(); - fd = connect_to_server((char*)host->base_string.self, ecl_fix(port)); + fd = connect_to_server((char*)host->base_string.self, ecl_fixnum(port)); ecl_enable_interrupts(); if (fd == 0) @@ -312,7 +312,7 @@ si_open_server_stream(cl_object port) FEwrong_type_only_arg(@[si::open-client-stream], port, ecl_read_from_cstring("(INTEGER 0 65535)")); } - p = ecl_fix(port); + p = ecl_fixnum(port); ecl_disable_interrupts(); fd = create_server_port(p); ecl_enable_interrupts(); @@ -379,7 +379,7 @@ si_lookup_host_entry(cl_object host_or_address) he = gethostbyname((char*)host_or_address->base_string.self); break; case t_fixnum: - l = ecl_fix(host_or_address); + l = ecl_fixnum(host_or_address); goto addr; case t_bignum: l = _ecl_big_to_ulong(host_or_address); diff --git a/src/c/threads/queue.d b/src/c/threads/queue.d index de4c57ede..12fbbd89d 100755 --- a/src/c/threads/queue.d +++ b/src/c/threads/queue.d @@ -360,12 +360,12 @@ print_lock(char *prefix, cl_object l, ...) if (l == Cnil || ECL_FIXNUMP(l->lock.name)) { cl_env_ptr env = ecl_process_env(); ecl_get_spinlock(env, &lock); - printf("\n%ld\t", ecl_fix(env->own_process->process.name)); + printf("\n%ld\t", ecl_fixnum(env->own_process->process.name)); vprintf(prefix, args); if (l != Cnil) { cl_object p = l->lock.queue_list; while (p != Cnil) { - printf(" %lx", ecl_fix(ECL_CONS_CAR(p)->process.name)); + printf(" %lx", ecl_fixnum(ECL_CONS_CAR(p)->process.name)); p = ECL_CONS_CDR(p); } } diff --git a/src/c/unify.d b/src/c/unify.d index fe38a85ed..0b8cdd3e2 100644 --- a/src/c/unify.d +++ b/src/c/unify.d @@ -148,7 +148,7 @@ RETRY: switch (type_of(x)) { @(defun get_instance (x class arity) @ - @(return (get_instance(x, class, ecl_fix(arity))?Ct:Cnil)) + @(return (get_instance(x, class, ecl_fixnum(arity))?Ct:Cnil)) @) @@ -248,7 +248,7 @@ unify(object x, object y) @(defun make_locative (&optional (n 0)) @ - @(return (MAKE_LOCATIVE(ecl_fix(n)))) + @(return (MAKE_LOCATIVE(ecl_fixnum(n)))) @) @(defun locativep (obje) diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index c4d87d8c6..9349e6223 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -1022,7 +1022,7 @@ si_mkdir(cl_object directory, cl_object mode) ecl_make_integer_type(ecl_make_fixnum(0), ecl_make_fixnum(0777))); } - modeint = ecl_fix(mode); + modeint = ecl_fixnum(mode); { /* Ensure a clean string, without trailing slashes, * and null terminated. */ diff --git a/src/c/unixint.d b/src/c/unixint.d index a50e4b7ae..fff4e1a8e 100644 --- a/src/c/unixint.d +++ b/src/c/unixint.d @@ -893,7 +893,7 @@ si_set_signal_handler(cl_object code, cl_object handler) unlikely_if (ecl_gethash_safe(code, cl_core.known_signals, OBJNULL) == OBJNULL) { illegal_signal_code(code); } - code_int = ecl_fix(code); + code_int = ecl_fixnum(code); #ifdef GBC_BOEHM # ifdef SIGSEGV unlikely_if ((code == ecl_make_fixnum(SIGSEGV)) && @@ -1223,7 +1223,7 @@ si_trap_fpe(cl_object condition, cl_object flag) else if (condition == @'floating-point-inexact') bits = FE_INEXACT; else if (ECL_FIXNUMP(condition)) - bits = ecl_fix(condition) & all; + bits = ecl_fixnum(condition) & all; if (flag == Cnil) { bits = the_env->trap_fpe_bits & ~bits; } else { diff --git a/src/c/vector_push.d b/src/c/vector_push.d index f28264808..74123158c 100644 --- a/src/c/vector_push.d +++ b/src/c/vector_push.d @@ -68,7 +68,7 @@ ecl_string_push_extend(cl_object s, ecl_character c) cl_object cl_vector_push(cl_object value, cl_object v) { - cl_index f = ecl_fix(cl_fill_pointer(v)); + cl_index f = ecl_fixnum(cl_fill_pointer(v)); if (f >= v->vector.dim) { @(return Cnil); } else { @@ -80,7 +80,7 @@ cl_vector_push(cl_object value, cl_object v) @(defun vector-push-extend (value v &optional (extent ecl_make_fixnum(0))) @ { - cl_index f = ecl_fix(cl_fill_pointer(v)); + cl_index f = ecl_fixnum(cl_fill_pointer(v)); if (f >= v->vector.dim) { v = extend_vector(v, ecl_to_size(extent)); } diff --git a/src/cmp/cmpffi.lsp b/src/cmp/cmpffi.lsp index 39c936320..067c9e313 100755 --- a/src/cmp/cmpffi.lsp +++ b/src/cmp/cmpffi.lsp @@ -51,11 +51,11 @@ '(;; These types can be used by ECL to unbox data ;; They are sorted from the most specific, to the least specific one. :byte - #1=((signed-byte 8) "int8_t" "ecl_make_int8_t" "ecl_to_int8_t" "ecl_fix") + #1=((signed-byte 8) "int8_t" "ecl_make_int8_t" "ecl_to_int8_t" "ecl_fixnum") :unsigned-byte - #2=((unsigned-byte 8) "uint8_t" "ecl_make_uint8_t" "ecl_to_uint8_t" "ecl_fix") + #2=((unsigned-byte 8) "uint8_t" "ecl_make_uint8_t" "ecl_to_uint8_t" "ecl_fixnum") :fixnum - (fixnum "cl_fixnum" "ecl_make_fixnum" "ecl_to_fixnum" "ecl_fix") + (fixnum "cl_fixnum" "ecl_make_fixnum" "ecl_to_fixnum" "ecl_fixnum") :int ((integer #.si:c-int-min #.si:c-int-max) "int" "ecl_make_int" "ecl_to_int" "ecl_to_int") @@ -65,15 +65,15 @@ :long ((integer #.si:c-long-min #.si:c-long-max) "long" "ecl_make_long" "ecl_to_long" #.(if (<= si::c-long-min most-negative-fixnum most-positive-fixnum si::c-long-max) - "ecl_fix" + "ecl_fixnum" "ecl_to_long")) :unsigned-long ((integer 0 #.si:c-ulong-max) "unsigned long" "ecl_make_ulong" "ecl_to_ulong" - #.(if (<= most-positive-fixnum si::c-long-max) "ecl_fix" "ecl_to_ulong")) + #.(if (<= most-positive-fixnum si::c-long-max) "ecl_fixnum" "ecl_to_ulong")) :cl-index ((integer 0 #.most-positive-fixnum) "cl_index" - "ecl_make_unsigned_integer" "ecl_to_cl_index" "ecl_fix") + "ecl_make_unsigned_integer" "ecl_to_cl_index" "ecl_fixnum") #+long-long :long-long #+long-long @@ -136,22 +136,22 @@ :int16-t #+:uint16-t ((unsigned-byte 16) "ecl_int16_t" "ecl_make_int16_t" "ecl_to_int16_t" - #.(if (subtypep '(unsigned-byte 16) 'fixnum) "ecl_fix" "ecl_to_int32_t")) + #.(if (subtypep '(unsigned-byte 16) 'fixnum) "ecl_fixnum" "ecl_to_int32_t")) #+:uint16-t :uint16-t #+:uint16-t - ((signed-byte 16) "ecl_uint16_t" "ecl_make_uint16_t" "ecl_to_uint16_t" "ecl_fix" - #.(if (subtypep '(signed-byte 16) 'fixnum) "ecl_fix" "ecl_to_unt16_t")) + ((signed-byte 16) "ecl_uint16_t" "ecl_make_uint16_t" "ecl_to_uint16_t" "ecl_fixnum" + #.(if (subtypep '(signed-byte 16) 'fixnum) "ecl_fixnum" "ecl_to_unt16_t")) #+:uint32-t :int32-t #+:uint32-t ((unsigned-byte 32) "ecl_int32_t" "ecl_make_int32_t" "ecl_to_int32_t" - #.(if (subtypep '(unsigned-byte 32) 'fixnum) "ecl_fix" "ecl_to_int32_t")) + #.(if (subtypep '(unsigned-byte 32) 'fixnum) "ecl_fixnum" "ecl_to_int32_t")) #+:uint32-t :uint32-t #+:uint32-t ((signed-byte 32) "ecl_uint32_t" "ecl_make_uint32_t" "ecl_to_uint32_t" - #.(if (subtypep '(signed-byte 32) 'fixnum) "ecl_fix" "ecl_to_uint32_t")) + #.(if (subtypep '(signed-byte 32) 'fixnum) "ecl_fixnum" "ecl_to_uint32_t")) #+:uint64-t :int64-t #+:uint64-t @@ -162,10 +162,10 @@ ((signed-byte 64) "ecl_uint64_t" "ecl_make_uint64_t" "ecl_to_uint64_t" "ecl_to_uint64_t") :short ((integer #.si:c-short-min #.si:c-short-max) "short" - "ecl_make_short" "ecl_to_short" "ecl_fix") + "ecl_make_short" "ecl_to_short" "ecl_fixnum") :unsigned-short ((integer 0 #.si:c-ushort-max) "unsigned short" - "ecl_make_ushort" "ecl_to_ushort" "ecl_fix") + "ecl_make_ushort" "ecl_to_ushort" "ecl_fixnum") )) (defparameter +representation-type-hash+ diff --git a/src/cmp/sysfun.lsp b/src/cmp/sysfun.lsp index 0a6e1eeb6..cb3661861 100644 --- a/src/cmp/sysfun.lsp +++ b/src/cmp/sysfun.lsp @@ -71,11 +71,11 @@ ;;; (def-inline aref :unsafe (t t t) t - "@0;ecl_aref_unsafe(#0,ecl_fix(#1)*(#0)->array.dims[1]+ecl_fix(#2))") + "@0;ecl_aref_unsafe(#0,ecl_fixnum(#1)*(#0)->array.dims[1]+ecl_fixnum(#2))") (def-inline aref :unsafe ((array t) t t) t - "@0;(#0)->array.self.t[ecl_fix(#1)*(#0)->array.dims[1]+ecl_fix(#2)]") + "@0;(#0)->array.self.t[ecl_fixnum(#1)*(#0)->array.dims[1]+ecl_fixnum(#2)]") (def-inline aref :unsafe ((array bit) t t) :fixnum - "@0;ecl_aref_bv(#0,ecl_fix(#1)*(#0)->array.dims[1]+ecl_fix(#2))") + "@0;ecl_aref_bv(#0,ecl_fixnum(#1)*(#0)->array.dims[1]+ecl_fixnum(#2))") (def-inline aref :unsafe ((array t) fixnum fixnum) t "@0;(#0)->array.self.t[#1*(#0)->array.dims[1]+#2]") (def-inline aref :unsafe ((array bit) fixnum fixnum) :fixnum @@ -91,8 +91,8 @@ (def-inline aref :always (t t) t "ecl_aref1(#0,ecl_to_size(#1))") (def-inline aref :always (t fixnum) t "ecl_aref1(#0,#1)") -(def-inline aref :unsafe (t t) t "ecl_aref1(#0,ecl_fix(#1))") -(def-inline aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fix(#1))") +(def-inline aref :unsafe (t t) t "ecl_aref1(#0,ecl_fixnum(#1))") +(def-inline aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fixnum(#1))") (def-inline aref :unsafe ((array bit) fixnum) :fixnum "ecl_aref_bv(#0,#1)") #+unicode (def-inline aref :unsafe ((array character) fixnum) :wchar @@ -108,9 +108,9 @@ (def-inline row-major-aref :always (t t) t "ecl_aref(#0,ecl_to_size(#1))") (def-inline row-major-aref :always (t fixnum) t "ecl_aref(#0,#1)") -(def-inline row-major-aref :unsafe (t t) t "ecl_aref_unsafe(#0,ecl_fix(#1))") +(def-inline row-major-aref :unsafe (t t) t "ecl_aref_unsafe(#0,ecl_fixnum(#1))") (def-inline row-major-aref :unsafe (t fixnum) t "ecl_aref_unsafe(#0,#1)") -(def-inline row-major-aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fix(#1))") +(def-inline row-major-aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fixnum(#1))") (def-inline row-major-aref :unsafe ((array bit) fixnum) :fixnum "ecl_aref_bv(#0,#1)") #+unicode (def-inline row-major-aref :unsafe ((array character) fixnum) :wchar @@ -148,12 +148,12 @@ (def-inline si:row-major-aset :always (t t t) t "ecl_aset(#0,ecl_to_size(#1),#2)") (def-inline si:row-major-aset :always (t fixnum t) t "ecl_aset(#0,#1,#2)") -(def-inline si:row-major-aset :unsafe (t t t) t "ecl_aset_unsafe(#0,ecl_fix(#1),#2)") +(def-inline si:row-major-aset :unsafe (t t t) t "ecl_aset_unsafe(#0,ecl_fixnum(#1),#2)") (def-inline si:row-major-aset :unsafe (t fixnum t) t "ecl_aset_unsafe(#0,#1,#2)") (def-inline si:row-major-aset :unsafe ((array t) fixnum t) t "(#0)->vector.self.t[#1]= #2") (def-inline si:row-major-aset :unsafe ((array bit) fixnum t) :fixnum - "ecl_aset_bv(#0,#1,ecl_fix(#2))") + "ecl_aset_bv(#0,#1,ecl_fixnum(#2))") (def-inline si:row-major-aset :unsafe ((array bit) fixnum fixnum) :fixnum "ecl_aset_bv(#0,#1,#2)") (def-inline si:row-major-aset :unsafe ((array base-char) fixnum base-char) :unsigned-char @@ -205,12 +205,12 @@ (def-inline svref :always (t t) t "ecl_aref1(#0,ecl_to_size(#1))") (def-inline svref :always (t fixnum) t "ecl_aref1(#0,#1)") -(def-inline svref :unsafe (t t) t "(#0)->vector.self.t[ecl_fix(#1)]") +(def-inline svref :unsafe (t t) t "(#0)->vector.self.t[ecl_fixnum(#1)]") (def-inline svref :unsafe (t fixnum) t "(#0)->vector.self.t[#1]") (def-inline si:svset :always (t t t) t "ecl_aset1(#0,ecl_to_size(#1),#2)") (def-inline si:svset :always (t fixnum t) t "ecl_aset1(#0,#1,#2)") -(def-inline si:svset :unsafe (t t t) t "((#0)->vector.self.t[ecl_fix(#1)]=(#2))") +(def-inline si:svset :unsafe (t t t) t "((#0)->vector.self.t[ecl_fixnum(#1)]=(#2))") (def-inline si:svset :unsafe (t fixnum t) t "(#0)->vector.self.t[#1]= #2") (def-inline array-has-fill-pointer-p :always (t) :bool "@0;(ECL_ARRAYP(#0)?(void)0:FEtype_error_array(#0),ECL_ARRAY_HAS_FILL_POINTER_P(#0))") @@ -364,12 +364,12 @@ (def-inline nth :always (t t) t "ecl_nth(ecl_to_size(#0),#1)") (def-inline nth :always (fixnum t) t "ecl_nth(#0,#1)") -(def-inline nth :unsafe (t t) t "ecl_nth(ecl_fix(#0),#1)") +(def-inline nth :unsafe (t t) t "ecl_nth(ecl_fixnum(#0),#1)") (def-inline nth :unsafe (fixnum t) t "ecl_nth(#0,#1)") (def-inline nthcdr :always (t t) t "ecl_nthcdr(ecl_to_size(#0),#1)") (def-inline nthcdr :always (fixnum t) t "ecl_nthcdr(#0,#1)") -(def-inline nthcdr :unsafe (t t) t "ecl_nthcdr(ecl_fix(#0),#1)") +(def-inline nthcdr :unsafe (t t) t "ecl_nthcdr(ecl_fixnum(#0),#1)") (def-inline nthcdr :unsafe (fixnum t) t "ecl_nthcdr(#0,#1)") (def-inline last :always (t) t "ecl_last(#0,1)") @@ -655,16 +655,16 @@ ;; file sequence.d -(def-inline elt :always (t t) t "ecl_elt(#0,ecl_fix(#1))") +(def-inline elt :always (t t) t "ecl_elt(#0,ecl_fixnum(#1))") (def-inline elt :always (t fixnum) t "ecl_elt(#0,#1)") -(def-inline elt :always (vector t) t "ecl_aref1(#0,ecl_fix(#1))") +(def-inline elt :always (vector t) t "ecl_aref1(#0,ecl_fixnum(#1))") (def-inline elt :always (vector fixnum) t "ecl_aref1(#0,#1)") -(def-inline elt :unsafe (t t) t "ecl_elt(#0,ecl_fix(#1))") +(def-inline elt :unsafe (t t) t "ecl_elt(#0,ecl_fixnum(#1))") (def-inline elt :unsafe (t fixnum) t "ecl_elt(#0,#1)") -(def-inline elt :unsafe (vector t) t "ecl_aref_unsafe(#0,ecl_fix(#1))") +(def-inline elt :unsafe (vector t) t "ecl_aref_unsafe(#0,ecl_fixnum(#1))") (def-inline elt :unsafe (vector fixnum) t "ecl_aref_unsafe(#0,#1)") -(def-inline aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fix(#1))") +(def-inline aref :unsafe ((array bit) t) :fixnum "ecl_aref_bv(#0,ecl_fixnum(#1))") (def-inline aref :unsafe ((array bit) fixnum) :fixnum "ecl_aref_bv(#0,#1)") #+unicode (def-inline aref :unsafe ((array character) fixnum) :wchar @@ -683,7 +683,7 @@ (def-inline si:elt-set :always (vector t t) t "ecl_aset1(#0,ecl_to_size(#1),#2)") (def-inline si:elt-set :always (vector fixnum t) t "ecl_aset1(#0,#1,#2)") -(def-inline si:elt-set :unsafe (t t t) t "ecl_elt_set(#0,ecl_fix(#1),#2)") +(def-inline si:elt-set :unsafe (t t t) t "ecl_elt_set(#0,ecl_fixnum(#1),#2)") (def-inline si:elt-set :unsafe (vector t t) t "ecl_aset_unsafe(#0,ecl_to_size(#1),#2)") (def-inline si:elt-set :unsafe (vector fixnum t) t "ecl_aset_unsafe(#0,#1,#2)") @@ -697,7 +697,7 @@ (def-inline char :always (t fixnum) t "ecl_aref1(#0,#1)") (def-inline char :always (t fixnum) :wchar "ecl_char(#0,#1)") #-unicode -(def-inline char :unsafe (t t) t "ECL_CODE_CHAR((#0)->base_string.self[ecl_fix(#1)])") +(def-inline char :unsafe (t t) t "ECL_CODE_CHAR((#0)->base_string.self[ecl_fixnum(#1)])") #-unicode (def-inline char :unsafe (t fixnum) :unsigned-char "(#0)->base_string.self[#1]") (def-inline char :unsafe (base-string fixnum) :unsigned-char "(#0)->base_string.self[#1]") @@ -709,23 +709,23 @@ (def-inline si:char-set :always (t fixnum character) :wchar "ecl_char_set(#0,#1,#2)") #-unicode (def-inline si:char-set :unsafe (t t t) t - "@2;((#0)->base_string.self[ecl_fix(#1)]=ecl_char_code(#2),(#2))") + "@2;((#0)->base_string.self[ecl_fixnum(#1)]=ecl_char_code(#2),(#2))") #-unicode (def-inline si:char-set :unsafe (t fixnum character) :unsigned-char "(#0)->base_string.self[#1]= #2") (def-inline si:char-set :unsafe (base-string t t) t - "@2;((#0)->base_string.self[ecl_fix(#1)]=ecl_char_code(#2),(#2))") + "@2;((#0)->base_string.self[ecl_fixnum(#1)]=ecl_char_code(#2),(#2))") (def-inline si:char-set :unsafe (base-string fixnum base-char) :unsigned-char "(#0)->base_string.self[#1]= #2") (def-inline si:char-set :unsafe (ext:extended-string t t) t - "@2;((#0)->string.self[ecl_fix(#1)]=ecl_char_code(#2),(#2))") + "@2;((#0)->string.self[ecl_fixnum(#1)]=ecl_char_code(#2),(#2))") (def-inline si:char-set :unsafe (ext:extended-string fixnum character) :unsigned-char "(#0)->string.self[#1]= #2") (def-inline schar :always (t t) t "ecl_elt(#0,ecl_to_size(#1))") (def-inline schar :always (t fixnum) t "ecl_elt(#0,#1)") (def-inline schar :always (t fixnum) :wchar "ecl_char(#0,#1)") -(def-inline schar :unsafe (base-string t) t "ECL_CODE_CHAR((#0)->base_string.self[ecl_fix(#1)])") +(def-inline schar :unsafe (base-string t) t "ECL_CODE_CHAR((#0)->base_string.self[ecl_fixnum(#1)])") #-unicode (def-inline schar :unsafe (t fixnum) :unsigned-char "(#0)->base_string.self[#1]") (def-inline schar :unsafe (base-string fixnum) :unsigned-char "(#0)->base_string.self[#1]") @@ -737,12 +737,12 @@ (def-inline si:schar-set :always (t fixnum character) :wchar "ecl_char_set(#0,#1,#2)") #-unicode (def-inline si:schar-set :unsafe (t t t) t - "@2;((#0)->base_string.self[ecl_fix(#1)]=ecl_char_code(#2),(#2))") + "@2;((#0)->base_string.self[ecl_fixnum(#1)]=ecl_char_code(#2),(#2))") #-unicode (def-inline si:schar-set :unsafe (t fixnum base-char) :unsigned-char "(#0)->base_string.self[#1]= #2") (def-inline si:schar-set :unsafe (base-string t t) t - "@2;((#0)->base_string.self[ecl_fix(#1)]=ecl_char_code(#2),(#2))") + "@2;((#0)->base_string.self[ecl_fixnum(#1)]=ecl_char_code(#2),(#2))") (def-inline si:schar-set :unsafe (base-string fixnum base-char) :unsigned-char "(#0)->base_string.self[#1]= #2") #+unicode diff --git a/src/h/legacy.h b/src/h/legacy.h index a3c15b2c4..41f91a8bd 100644 --- a/src/h/legacy.h +++ b/src/h/legacy.h @@ -32,7 +32,7 @@ #define MAKE_FIXNUM(n) ecl_make_fixnum(n) #define FIXNUM_MINUSP(n) ecl_fixnum_minusp(n) #define FIXNUM_PLUSP(n) ecl_fixnum_plusp(n) -#define fix(o) ecl_fix(o) +#define fix(o) ecl_fixnum(o) #define FIXNUMP(o) ECL_FINXUMP(o) #define sf(obje) (obje)->SF.SFVAL diff --git a/src/h/number.h b/src/h/number.h index b4cc8f9a6..3eed78980 100644 --- a/src/h/number.h +++ b/src/h/number.h @@ -78,14 +78,14 @@ ecl_to_fix(cl_object f) { if (ecl_unlikely(!ECL_FIXNUMP(f))) FEtype_error_fixnum(f); - return ecl_fix(f); + return ecl_fixnum(f); } static ECL_INLINE cl_index ecl_to_size(cl_object f) { cl_fixnum aux; - if (ecl_unlikely(!ECL_FIXNUMP(f) || ((aux = ecl_fix(f)) < 0))) + if (ecl_unlikely(!ECL_FIXNUMP(f) || ((aux = ecl_fixnum(f)) < 0))) FEtype_error_size(f); return aux; } diff --git a/src/h/object.h b/src/h/object.h index 9ad11d4d6..6108453d6 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -73,6 +73,7 @@ typedef enum { t_cclosure, #ifdef CLOS t_instance, + t_structure = t_instance, #else t_structure, #endif /* CLOS */ @@ -135,7 +136,7 @@ typedef cl_object (*cl_objectfn_fixed)(); #define ecl_fixnum_geq(a,b) ((cl_fixnum)(a) >= (cl_fixnum)(b)) #define ecl_fixnum_plusp(a) ((cl_fixnum)(a) > (cl_fixnum)ecl_make_fixnum(0)) #define ecl_fixnum_minusp(a) ((cl_fixnum)(a) < (cl_fixnum)(0)) -#define ecl_fix(a) (((cl_fixnum)(a)) >> 2) +#define ecl_fixnum(a) (((cl_fixnum)(a)) >> 2) /* Immediate characters: */ #define ECL_CHARACTER_TAG t_character