Declarations for all Common Lisp functions.

Split out a new file, proclamations.lsp, with the declarations oof the types of functions in the ANSI specification and in ECL's extensions.
This commit is contained in:
Juan Jose Garcia Ripoll 2010-04-27 22:01:24 +02:00
parent ed1bdcb0fe
commit e8cecf9935
11 changed files with 1294 additions and 19 deletions

View file

@ -35,6 +35,9 @@ ECL 10.4.2:
:c/c++ (print 2)))
The two currently available backends are :bytecodes and :c/c++.
- Added accurate type proclamations for all functions in the ANSI CL
specification.
ECL 10.4.1:
===========

View file

@ -67,7 +67,7 @@ c/ecl/external.h: $(top_srcdir)/h/external.h
ecl/external.h: c/ecl/external.h c/ecl/external.h
cp $(srcdir)/h/*.h ecl/
bin/ecl$(EXE): ecl_min$(EXE) compile.lsp sysfun.lsp ecl/external.h BUILD-STAMP
bin/ecl$(EXE): ecl_min$(EXE) compile.lsp sysfun.lsp proclamations.lsp ecl/external.h BUILD-STAMP
cp $(top_srcdir)/../contrib/unicode/ucd.dat .
if [ -f CROSS-COMPILER ]; then \
./CROSS-COMPILER compile; \
@ -118,6 +118,9 @@ bin/ecl-config: bin/ecl-config.pre
fi
sysfun.lsp:
$(LN_S) $(srcdir)/$(ECL_CMPDIR)/sysfun.lsp ./
proclamations.lsp:
$(LN_S) $(srcdir)/$(ECL_CMPDIR)/proclamations.lsp ./
rt.lisp:
cp $(srcdir)/../contrib/rt/rt.lisp ./

View file

@ -1011,12 +1011,12 @@ cl_symbols[] = {
{"REINITIALIZE-INSTANCE", CL_ORDINARY, NULL, -1, OBJNULL},
{"REMOVE-METHOD", CL_ORDINARY, NULL, -1, OBJNULL},
{"SHARED-INITIALIZE", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-BOUNDP", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-EXISTS-P", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-MAKUNBOUND", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-BOUNDP", CL_ORDINARY, ECL_NAME(cl_slot_boundp), 2, OBJNULL},
{"SLOT-EXISTS-P", CL_ORDINARY, ECL_NAME(cl_slot_exists_p), 2, OBJNULL},
{"SLOT-MAKUNBOUND", CL_ORDINARY, ECL_NAME(cl_slot_makunbound), 2, OBJNULL},
{"SLOT-MISSING", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-UNBOUND", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-VALUE", CL_ORDINARY, NULL, -1, OBJNULL},
{"SLOT-VALUE", CL_ORDINARY, ECL_NAME(cl_slot_value), 2, OBJNULL},
{"STANDARD", CL_ORDINARY, NULL, -1, OBJNULL},
{"STANDARD-CLASS", CL_ORDINARY, NULL, -1, OBJNULL},
{"STANDARD-GENERIC-FUNCTION", CL_ORDINARY, NULL, -1, OBJNULL},

View file

@ -1011,12 +1011,12 @@ cl_symbols[] = {
{"REINITIALIZE-INSTANCE",NULL},
{"REMOVE-METHOD",NULL},
{"SHARED-INITIALIZE",NULL},
{"SLOT-BOUNDP",NULL},
{"SLOT-EXISTS-P",NULL},
{"SLOT-MAKUNBOUND",NULL},
{"SLOT-BOUNDP","ECL_NAME(cl_slot_boundp)"},
{"SLOT-EXISTS-P","ECL_NAME(cl_slot_exists_p)"},
{"SLOT-MAKUNBOUND","ECL_NAME(cl_slot_makunbound)"},
{"SLOT-MISSING",NULL},
{"SLOT-UNBOUND",NULL},
{"SLOT-VALUE",NULL},
{"SLOT-VALUE","ECL_NAME(cl_slot_value)"},
{"STANDARD",NULL},
{"STANDARD-CLASS",NULL},
{"STANDARD-GENERIC-FUNCTION",NULL},

View file

@ -166,11 +166,11 @@
(unless declared
(if (= maxarg minarg)
(progn
(wt-h1 "extern cl_object ") (wt-h1 fun-c-name) (wt-h1 "(")
(wt-nl-h "extern cl_object " fun-c-name "(")
(dotimes (i maxarg)
(when (> i 0) (wt-h1 ","))
(wt-h1 "cl_object"))
(wt-h1 ")"))
(wt-h1 ");"))
(progn
(wt-nl-h "#ifdef __cplusplus")
(wt-nl-h "extern cl_object " fun-c-name "(...);")

View file

@ -929,6 +929,7 @@ from the C language code. NIL means \"do not create the file\"."
#-ecl-min
(with-standard-io-syntax
(load "sys:sysfun"))
(load "sys:sysfun")
(load "sys:proclamations"))
(provide 'cmp)

View file

@ -41,5 +41,6 @@
(let ((si::*keep-documentation* nil))
(mapc #'(lambda (x) (load x :verbose nil)) +cmp-module-files+)
(load "src:cmp;sysfun" :verbose nil))
(load "src:cmp;sysfun" :verbose nil)
(load "src:cmp;proclamations" :verbose nil))

1261
src/cmp/proclamations.lsp Normal file

File diff suppressed because it is too large Load diff

View file

@ -1638,6 +1638,11 @@
#-(or) standard-instance-access ; this function is a synonym for si:instance-ref
#-(or) funcallable-standard-instance-access ; same for this one
subclassp of-class-p
;; boot.lsp
slot-boundp
slot-makunbound
slot-value
slot-exists-p
)
))
@ -1668,11 +1673,6 @@
#+clos
,@'(;; defclass.lsp
clos::ensure-class
;; boot.lsp
clos::slot-boundp
clos::slot-makunbound
clos::slot-value
clos::slot-exists-p
;; combin.lsp
clos::simple-code-walker
;; standard.lsp

View file

@ -135,7 +135,7 @@
#+WANTS-CMP
(build-module "cmp" +cmp-module-files+
:dir "build:@ECL_CMPDIR@;" :prefix "CMP"
:additional-files '("sysfun.lsp")
:additional-files '("sysfun.lsp" "proclamations.lsp")
:builtin #+:BUILTIN-CMP t #-:BUILTIN-CMP nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -1965,6 +1965,12 @@ extern ECL_API cl_object cl_set_pprint_dispatch _ARGS((cl_narg narg, cl_object V
extern ECL_API cl_object cl_method_combination_error _ARGS((cl_narg narg, cl_object format, ...));
extern ECL_API cl_object cl_invalid_method_error _ARGS((cl_narg narg, cl_object method, cl_object format, ...));
/* boot.lsp */
extern ECL_API cl_object cl_slot_boundp(cl_object object, cl_object slot);
extern ECL_API cl_object cl_slot_makunbound(cl_object object, cl_object slot);
extern ECL_API cl_object cl_slot_value(cl_object object, cl_object slot);
extern ECL_API cl_object cl_slot_exists_p(cl_object object, cl_object slot);
#if 0
/* defclass.lsp */
extern ECL_API cl_object clos_ensure_class _ARGS((cl_narg narg, cl_object V1, ...));