Use same link_call() with and without CLOS. The use of static variables is

not thread safe.
This commit is contained in:
jjgarcia 2002-10-13 16:03:36 +00:00
parent a5aaa3edf3
commit 59a26b4751
3 changed files with 1 additions and 20 deletions

View file

@ -73,12 +73,7 @@ apply(int narg, cl_object fun, cl_object *args)
*----------------------------------------------------------------------*/
cl_object
#ifdef CLOS
link_call(cl_object sym, cl_objectfn *pLK, cl_object *gfun,
int narg, va_list args)
#else
link_call(cl_object sym, cl_objectfn *pLK, int narg, va_list args)
#endif /* CLOS */
{
cl_object fun = symbol_function(sym);
@ -94,11 +89,6 @@ link_call(cl_object sym, cl_objectfn *pLK, int narg, va_list args)
return va_APPLY(narg, fun->cfun.entry, args);
#ifdef CLOS
case t_gfun:
putprop(sym, CONS(CONS(make_unsigned_integer((cl_index)gfun),
make_unsigned_integer((cl_index)OBJNULL)),
getf(sym->symbol.plist, @'si::link-from', Cnil)),
@'si::link-from');
*gfun = fun;
return va_gcall(narg, fun, args);
#endif /* CLOS */
case t_cclosure:

View file

@ -42,17 +42,9 @@
cs_overflow()
#define LINK_ARGS &narg
#ifdef CLOS
#define TRAMPOLINK(narg, vv, lk) \
static cl_object gfun = OBJNULL; \
va_list args; va_start(args, narg); \
if (gfun) return(va_gcall(narg, gfun, args)); \
else return(link_call(vv, (cl_objectfn *)lk , &gfun, narg, args))
#else
#define TRAMPOLINK(narg, vv, lk) \
va_list args; va_start(args, narg); \
return(link_call(vv, (cl_objectfn *)lk, narg, args))
#endif
#define cclosure_call funcall

View file

@ -231,8 +231,7 @@ extern void FEend_of_file(cl_object strm);
#define funcall clLfuncall
extern cl_object apply(int narg, cl_object fun, cl_object *args);
extern cl_object link_call(cl_object sym, cl_objectfn *pLK, cl_object *gfun,
int narg, va_list args);
extern cl_object link_call(cl_object sym, cl_objectfn *pLK, int narg, va_list args);
extern cl_object cl_safe_eval(cl_object form, cl_object *bytecodes, cl_object env, cl_object err_value);
extern void init_eval(void);