static void
no_applicable_method(cl_env_ptr env, cl_object gfun, cl_object args)
{
- env->values[0] = _ecl_funcall3(@'no-applicable-method', gfun, args);
+ env->values[0] = cl_apply(3, @'no-applicable-method', gfun, args);
}
static cl_object
methods = _ecl_funcall3(@'compute-applicable-methods',
gf, arglist);
unlikely_if (methods == ECL_NIL) {
- cl_object func = _ecl_funcall3(@'no-applicable-method',
- gf, arglist);
- frame->frame.base[0] = OBJNULL;
- env->values[1] = ECL_NIL;
- return func;
+ env->values[1] = ECL_NIL;
+ return methods;
}
}
methods = clos_compute_effective_method_function(gf, GFUN_COMB(gf), methods);
cl_object arglist = frame_to_list(frame);
cl_object methods = clos_std_compute_applicable_methods(gf, arglist);
unlikely_if (methods == ECL_NIL) {
- cl_object func = _ecl_funcall3(@'no-applicable-method', gf, arglist);
- frame->frame.base[0] = OBJNULL;
env->values[1] = ECL_NIL;
- return func;
+ return methods;
}
methods = clos_std_compute_effective_method(gf, GFUN_COMB(gf), methods);
env->values[1] = ECL_T;
frame = new_frame;
}
#endif
-
+
vector = fill_spec_vector(cache->keys, frame, gf);
e = ecl_search_cache(cache);
if (e->key != OBJNULL) {
e->value = func;
}
}
- func = _ecl_funcall3(func, frame, ECL_NIL);
+ if (func == ECL_NIL)
+ func = cl_apply(3, @'no-applicable-method', gf, frame);
+ else
+ func = _ecl_funcall3(func, frame, ECL_NIL);
+
/* Only need to close the copy */
#if !defined(ECL_USE_VARARG_AS_POINTER)
if (frame == (cl_object)&frame_aux)
;;; ----------------------------------------------------------------------
;;; Error messages
-(defmethod no-applicable-method (gf args)
- (error "No applicable method for ~S with arguments of types~{~& ~A~}"
- (generic-function-name gf)
+(defmethod no-applicable-method (gf &rest args)
+ (error "No applicable method for ~S with ~
+ ~:[no arguments~;arguments of types ~:*~{~& ~A~}~]."
+ (generic-function-name gf)
(mapcar #'type-of args)))
(defmethod no-next-method (gf method &rest args)
(setf method-list
(compute-applicable-methods generic-function args))
(unless method-list
- (no-applicable-methods generic-function args)))
+ (apply #'no-applicable-method generic-function args)))
(funcall (compute-effective-method-function
generic-function
(generic-function-method-combination generic-function)