mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 06:22:33 -08:00
ecl_min: don't use ADJUST-ARRAY in the core
The function ADJUST-ARRAY is defined later in Lisp code. Instead of that we use a newly introduced SI:ADJUST-VECTOR. Fixes #678.
This commit is contained in:
parent
fe27ab8600
commit
52d0d64f9c
3 changed files with 5 additions and 11 deletions
|
|
@ -4667,11 +4667,7 @@ static void
|
|||
seq_out_enlarge_vector(cl_object strm)
|
||||
{
|
||||
cl_object vector = SEQ_OUTPUT_VECTOR(strm);
|
||||
if (!ECL_ADJUSTABLE_ARRAY_P(vector)) {
|
||||
FEerror("Can't adjust the dimensions of the sequence of sequence stream ~A", 1, strm);
|
||||
}
|
||||
vector = _ecl_funcall3(@'adjust-array', vector,
|
||||
ecl_ash(ecl_make_fixnum(vector->vector.dim), 1));
|
||||
si_adjust_vector(vector, ecl_ash(ecl_make_fixnum(vector->vector.dim), 1));
|
||||
SEQ_OUTPUT_VECTOR(strm) = vector;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,8 +97,7 @@ alloc(pool_t pool, cl_index size)
|
|||
cl_index next_fillp = fillp + bytes;
|
||||
if (next_fillp >= pool->data->vector.dim) {
|
||||
cl_index new_dim = next_fillp + next_fillp / 2;
|
||||
pool->data = _ecl_funcall3(@'adjust-array', pool->data,
|
||||
ecl_make_fixnum(new_dim));
|
||||
pool->data = si_adjust_vector(pool->data, ecl_make_fixnum(new_dim));
|
||||
}
|
||||
pool->data->vector.fillp = next_fillp;
|
||||
return fillp;
|
||||
|
|
|
|||
|
|
@ -922,10 +922,9 @@ nstring_case(cl_narg narg, cl_object fun, ecl_casefun casefun, ecl_va_list ARGS)
|
|||
if (output_size < output->base_string.dim) {
|
||||
break;
|
||||
}
|
||||
output = _ecl_funcall3(@'adjust-array', output,
|
||||
ecl_make_fixnum(input_size > output_size
|
||||
? input_size
|
||||
: output_size + 128));
|
||||
output = si_adjust_vector(output, ecl_make_fixnum(input_size > output_size
|
||||
? input_size
|
||||
: output_size + 128));
|
||||
} while (1);
|
||||
output->base_string.fillp = output_size;
|
||||
if (ecl_fits_in_base_string(output)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue