Remove further uses of cl_funcall in the C core

This commit is contained in:
Juan Jose Garcia Ripoll 2012-05-05 10:40:14 +02:00
parent 2d704fa13e
commit dbd51915dc
10 changed files with 21 additions and 20 deletions

View file

@ -31,7 +31,7 @@
extern cl_object
cl_upgraded_array_element_type(cl_narg narg, cl_object type, ...)
{
return cl_funcall(2, @'upgraded-array-element-type', type);
return _ecl_funcall2(@'upgraded-array-element-type', type);
}
extern cl_object
@ -41,9 +41,9 @@ si_safe_eval(cl_narg narg, cl_object form, cl_object env, ...)
cl_object err_value;
va_list args; va_start(args, env);
err_value = va_arg(args, cl_object);
return cl_funcall(4, @'ext::safe-eval', form, env, err_value);
return _ecl_funcall4(@'ext::safe-eval', form, env, err_value);
}
return cl_funcall(3, @'ext::safe-eval', form, env);
return _ecl_funcall3(@'ext::safe-eval', form, env);
}
extern cl_object
@ -71,9 +71,9 @@ si_string_to_object(cl_narg narg, cl_object string, ...)
cl_object err_value;
va_list args; va_start(args, string);
err_value = va_arg(args, cl_object);
return cl_funcall(3, @'si::string-to-object', string, err_value);
return _ecl_funcall3(@'si::string-to-object', string, err_value);
}
return cl_funcall(2, @'si::string-to-object', string);
return _ecl_funcall2(@'si::string-to-object', string);
}
extern cl_object

View file

@ -2177,7 +2177,7 @@ need_to_make_load_form_p(cl_object o)
case t_list:
if (Null(o)) return 0;
default:
return cl_funcall(3, @'clos::need-to-make-load-form-p', o, Cnil)
return _ecl_funcall3(@'clos::need-to-make-load-form-p', o, Cnil)
!= Cnil;
}
}
@ -2193,7 +2193,7 @@ maybe_make_load_forms(cl_env_ptr env, cl_object constant)
return;
if (!need_to_make_load_form_p(constant))
return;
make = cl_funcall(2, @'make-load-form', constant);
make = _ecl_funcall2(@'make-load-form', constant);
init = env->values[1];
c_env->load_time_forms = ecl_cons(cl_list(3, constant, make, init),
c_env->load_time_forms);

View file

@ -2229,8 +2229,8 @@ DIRECTIVE:
cl_apply(3, string, strm, cl_grab_rest_args(args));
} else {
#ifdef ECL_CMU_FORMAT
cl_funcall(4, @'si::formatter-aux', strm, string,
cl_grab_rest_args(args));
_ecl_funcall4(@'si::formatter-aux', strm, string,
cl_grab_rest_args(args));
#else
doformat(narg, strm, string, args, FALSE);
#endif

View file

@ -165,7 +165,7 @@ si_load_bytecodes(cl_object source, cl_object verbose, cl_object print, cl_objec
cl_object x = ECL_CONS_CAR(forms);
forms = ECL_CONS_CDR(forms);
if (type_of(x) == t_bytecodes) {
cl_funcall(1, x);
_ecl_funcall1(x);
continue;
}
}

View file

@ -18,6 +18,7 @@
#include <string.h>
#define ECL_INCLUDE_MATH_H
#include <ecl/ecl.h>
#include <ecl/internal.h>
cl_object
cl_identity(cl_object x)
@ -502,7 +503,7 @@ BEGIN:
cl_env_ptr env = ecl_process_env();
cl_object iterator = si_hash_table_iterator(x);
do {
cl_object ndx = cl_funcall(1, iterator);
cl_object ndx = _ecl_funcall1(iterator);
if (Null(ndx)) {
return TRUE;
} else {

View file

@ -70,7 +70,7 @@ si_print_unreadable_object_function(cl_object o, cl_object stream, cl_object typ
ecl_write_char(' ', stream);
}
if (!Null(function)) {
cl_funcall(1, function);
_ecl_funcall1(function);
}
if (!Null(id)) {
ecl_write_char(' ', stream);

View file

@ -32,7 +32,7 @@ write_readable_pathname(cl_object path, cl_object stream)
@':host', path->pathname.host,
@':device', path->pathname.device,
@':directory',
cl_funcall(2, @'ext::maybe-quote', path->pathname.directory),
_ecl_funcall2(@'ext::maybe-quote', path->pathname.directory),
@':name', path->pathname.name,
@':type', path->pathname.type,
@':version', path->pathname.version,
@ -299,7 +299,7 @@ write_stream(cl_object x, cl_object stream)
static void
write_instance(cl_object x, cl_object stream)
{
cl_funcall(3, @'print-object', x, stream);
_ecl_funcall3(@'print-object', x, stream);
}
#else
static void
@ -319,7 +319,7 @@ write_structure(cl_object x, cl_object stream)
x = structure_to_list(x);
si_write_object(x, stream);
} else {
cl_funcall(4, print_function, x, stream, MAKE_FIXNUM(0));
_ecl_funcall4(print_function, x, stream, MAKE_FIXNUM(0));
}
}
#endif /* !CLOS */

View file

@ -103,8 +103,8 @@ 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 = cl_funcall(3, @'adjust-array', pool->data,
MAKE_FIXNUM(new_dim));
pool->data = _ecl_funcall3(@'adjust-array', pool->data,
MAKE_FIXNUM(new_dim));
}
pool->data->vector.fillp = next_fillp;
return fillp;

View file

@ -418,7 +418,7 @@ handle_signal_now(cl_object signal_code)
case t_cclosure:
case t_bytecodes:
case t_bclosure:
cl_funcall(1, signal_code);
_ecl_funcall1(signal_code);
default:
break;
}

View file

@ -133,7 +133,7 @@ from_list_to_execve_argument(cl_object l, char ***environp)
static cl_object
make_external_process()
{
return cl_funcall(1, @'ext::make-external-process');
return _ecl_funcall1(@'ext::make-external-process');
}
static cl_object
@ -625,7 +625,7 @@ make_windows_handle(HANDLE h)
int child_stdin, child_stdout, child_stderr;
int pipe_fd[2];
argv = CONS(command, ecl_nconc(argv, ecl_list1(Cnil)));
argv = cl_funcall(3, @'coerce', argv, @'vector');
argv = _ecl_funcall3(@'coerce', argv, @'vector');
AGAIN_INPUT:
if (input == @':stream') {
int fd[2];