cmp: remove unused interface *linking-calls*

Variable is always nil so blocks of code are never executed. Remove
it. TRAMPOLINK was used only in such bodies.
This commit is contained in:
Daniel Kochmański 2019-07-11 18:46:32 +02:00
parent 923a34130b
commit f3c6e4ccef
4 changed files with 1 additions and 32 deletions

View file

@ -265,7 +265,6 @@ lines are inserted, but the order is preserved")
(defvar *global-funs* nil) ; holds { fun }*
(defvar *use-c-global* nil) ; honor si::c-global declaration
(defvar *global-cfuns-array* nil) ; holds { fun }*
(defvar *linking-calls* nil) ; holds { ( global-fun-name fun symbol c-fun-name var-name ) }*
(defvar *local-funs* nil) ; holds { fun }*
(defvar *top-level-forms* nil) ; holds { top-level-form }*
(defvar *make-forms* nil) ; holds { top-level-form }*
@ -324,7 +323,6 @@ be deleted if they have been opened with LoadLibrary.")
(*global-vars* nil)
(*global-funs* nil)
(*global-cfuns-array* nil)
(*linking-calls* nil)
(*global-entries* nil)
(*undefined-vars* nil)
(*top-level-forms* nil)

View file

@ -46,8 +46,7 @@
`(with-stack ,frame
(stack-push-values ,frame ,(first args))
,@(rest args)
(stack-pop ,frame))))
)
(stack-pop ,frame)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -199,34 +199,10 @@
(wt-nl-h "#define VM " (data-permanent-storage-size))
(wt-nl-h "#define VMtemp " (data-temporary-storage-size)))))
(dolist (l *linking-calls*)
(let* ((c-name (fourth l))
(var-name (fifth l)))
(wt-nl-h "static cl_object " c-name "(cl_narg, ...);")
(wt-nl-h "static cl_object (*" var-name ")(cl_narg, ...)=" c-name ";")))
;;; Global entries for directly called functions.
(dolist (x *global-entries*)
(apply 'wt-global-entry x))
;;; Initial functions for linking calls.
(dolist (l *linking-calls*)
(let* ((var-name (fifth l))
(c-name (fourth l))
(lisp-name (third l)))
(wt-nl "static cl_object " c-name "(cl_narg narg, ...)"
"{TRAMPOLINK(narg," lisp-name ",&" var-name ",Cblock);}")))
#+(or)
(wt-nl-h "static cl_object ECL_SETF_DEFINITION(cl_object setf_vv, cl_object setf_form)
{
cl_object f1 = ecl_fdefinition(setf_form);
cl_object f2 = ECL_CONS_CAR(setf_vv);
if (f1 != f2) {
FEundefined_function(setf_form);
}
return f2;
}
")
(wt-nl-h "#define ECL_DEFINE_SETF_FUNCTIONS ")
(loop for (name setf-vv name-vv) in *setf-definitions*
do (wt-h #\\ #\Newline setf-vv "=ecl_setf_definition(" name-vv ",ECL_T);"))

View file

@ -34,10 +34,6 @@
#include <math.h> /* for inline mathematics */
#include <ecl/ecl-inl.h>
#define TRAMPOLINK(narg, vv, lk, cblock) \
ecl_va_list args; ecl_va_start(args, narg, narg, 0); \
return(_ecl_link_call(vv, (cl_objectfn *)lk, cblock, narg, args))
enum ecl_locative_type {
_ecl_object_loc = 0,
_ecl_fixnum_loc,