| 1 |
;;;; -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil; Package: C -*- |
| 2 |
;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab: |
| 3 |
|
| 4 |
;;;; |
| 5 |
;;;; Copyright (c) 1991, Giuseppe Attardi. All rights reserved. |
| 6 |
;;;; Copyright (c) 2003, Juan Jose Garcia Ripoll |
| 7 |
;;;; |
| 8 |
;;;; See the file 'LICENSE' for the copyright details. |
| 9 |
;;;; |
| 10 |
|
| 11 |
;;;; |
| 12 |
;;;; Database for Lisp functions accessible from C. |
| 13 |
;;;; |
| 14 |
|
| 15 |
(in-package "COMPILER") |
| 16 |
|
| 17 |
;;; |
| 18 |
;;; FUNCTIONS WHICH CAN BE CALLED FROM C |
| 19 |
;;; |
| 20 |
;;; The following two lists contain all functions in the core library which do |
| 21 |
;;; not belong to the C part of the library, but which should have an exported C |
| 22 |
;;; name that users (and compiled code) can refer to. This means, for instance, that |
| 23 |
;;; MAKE-ARRAY will be compiled to a function called cl_make_array, etc. |
| 24 |
;;; |
| 25 |
;;; Note that if the created C function should take only fixed |
| 26 |
;;; arguments, a proclamation for the function type must exist so that |
| 27 |
;;; the compiler can produce the correct function signature! |
| 28 |
;;; |
| 29 |
|
| 30 |
#+ecl-min |
| 31 |
(defvar *in-all-symbols-functions* |
| 32 |
;; These functions are visible from external.h and their function |
| 33 |
;; objects are created in init_all_symbols from the data in |
| 34 |
;; symbols_list.h |
| 35 |
`(;; arraylib.lsp |
| 36 |
cl:make-array cl:vector cl:array-dimensions cl:array-in-bounds-p cl:array-row-major-index |
| 37 |
cl:bit cl:sbit cl:bit-and cl:bit-ior cl:bit-xor cl:bit-eqv cl:bit-nand cl:bit-nor cl:bit-andc1 |
| 38 |
cl:bit-andc2 cl:bit-orc1 cl:bit-orc2 cl:bit-not |
| 39 |
cl:vector-pop cl:adjust-array |
| 40 |
;; assert.lsp |
| 41 |
si:do-check-type si:ecase-error si:etypecase-error |
| 42 |
si:wrong-type-argument si:ccase-error si:ctypecase-error |
| 43 |
;; config.lsp |
| 44 |
cl:short-site-name cl:long-site-name cl:machine-type cl:machine-instance cl:machine-version |
| 45 |
cl:software-type cl:software-version cl:lisp-implementation-type cl:lisp-implementation-version |
| 46 |
si:lisp-implementation-vcs-id |
| 47 |
;; assignment.lsp |
| 48 |
si:setf-definition |
| 49 |
;; conditions.lsp |
| 50 |
si:safe-eval cl:abort cl:continue cl:muffle-warning cl:store-value cl:use-value |
| 51 |
si:bind-simple-restarts si:bind-simple-handlers |
| 52 |
si:assert-failure cl:compute-restarts cl:find-restart cl:invoke-restart |
| 53 |
cl:invoke-restart-interactively cl:make-condition |
| 54 |
;; describe.lsp |
| 55 |
cl:describe cl:inspect |
| 56 |
;; iolib.lsp |
| 57 |
cl:read-from-string cl:write-to-string cl:prin1-to-string cl:princ-to-string |
| 58 |
cl:y-or-n-p cl:yes-or-no-p si:string-to-object cl:dribble |
| 59 |
ext:make-encoding ext:load-encoding |
| 60 |
;; listlib.lsp |
| 61 |
cl:union cl:nunion cl:intersection cl:nintersection cl:set-difference cl:nset-difference |
| 62 |
cl:set-exclusive-or cl:nset-exclusive-or cl:subsetp cl:rassoc-if cl:rassoc-if-not |
| 63 |
cl:assoc-if cl:assoc-if-not cl:member-if cl:member-if-not cl:subst-if cl:subst-if-not |
| 64 |
cl:nsubst-if cl:nsubst-if-not |
| 65 |
;; mislib.lsp |
| 66 |
cl:logical-pathname-translations cl:load-logical-pathname-translations cl:decode-universal-time |
| 67 |
cl:encode-universal-time cl:get-decoded-time |
| 68 |
cl:ensure-directories-exist si:simple-program-error si:signal-simple-error |
| 69 |
;; module.lsp |
| 70 |
cl:provide cl:require |
| 71 |
;; numlib.lsp |
| 72 |
cl:isqrt cl:phase cl:signum cl:cis |
| 73 |
cl:asin cl:acos cl:asinh cl:acosh cl:atanh cl:ffloor cl:fceiling cl:ftruncate cl:fround |
| 74 |
cl:logtest cl:byte cl:byte-size cl:byte-position cl:ldb cl:ldb-test cl:mask-field cl:dpb |
| 75 |
cl:deposit-field |
| 76 |
;; packlib.lsp |
| 77 |
cl:find-all-symbols cl:apropos cl:apropos-list |
| 78 |
;; pprint.lsp |
| 79 |
cl:pprint-fill cl:copy-pprint-dispatch cl:pprint-dispatch |
| 80 |
cl:pprint-linear cl:pprint-newline cl:pprint-tab cl:pprint-tabular |
| 81 |
cl:set-pprint-dispatch cl:pprint-indent |
| 82 |
;; predlib.lsp |
| 83 |
cl:upgraded-array-element-type cl:upgraded-complex-part-type cl:typep cl:subtypep cl:coerce |
| 84 |
si:do-deftype si:ratiop si:single-float-p si:short-float-p si:double-float-p |
| 85 |
si:long-float-p |
| 86 |
;; process.lsp |
| 87 |
ext:run-program |
| 88 |
ext:terminate-process |
| 89 |
;; seq.lsp |
| 90 |
cl:make-sequence cl:concatenate cl:map cl:some cl:every cl:notany cl:notevery cl:map-into cl:complement |
| 91 |
;; seqlib.lsp |
| 92 |
cl:reduce cl:fill cl:replace |
| 93 |
cl:remove cl:remove-if cl:remove-if-not cl:delete cl:delete-if cl:delete-if-not |
| 94 |
cl:count cl:count-if cl:count-if-not cl:substitute cl:substitute-if cl:substitute-if-not |
| 95 |
cl:nsubstitute cl:nsubstitute-if cl:nsubstitute-if-not cl:find cl:find-if cl:find-if-not |
| 96 |
cl:position cl:position-if cl:position-if-not cl:remove-duplicates |
| 97 |
cl:delete-duplicates cl:mismatch cl:search cl:sort cl:stable-sort cl:merge cl:constantly |
| 98 |
si:sequence-count |
| 99 |
;; setf.lsp |
| 100 |
si:do-defsetf si:do-define-setf-method |
| 101 |
;; trace.lsp |
| 102 |
si:traced-old-definition |
| 103 |
|
| 104 |
,@(when (member :clos *features*) |
| 105 |
'(;; combin.lsp |
| 106 |
cl:invalid-method-error |
| 107 |
cl:method-combination-error |
| 108 |
clos:compute-effective-method-function |
| 109 |
clos:std-compute-effective-method |
| 110 |
;; defclass.lsp |
| 111 |
clos::ensure-class |
| 112 |
clos:load-defclass |
| 113 |
;; kernel.lsp |
| 114 |
clos:std-compute-applicable-methods |
| 115 |
;; method.lsp |
| 116 |
clos:extract-lambda-list |
| 117 |
clos:extract-specializer-names |
| 118 |
;; predlib.lsp |
| 119 |
si:subclassp si:of-class-p |
| 120 |
;; slotvalue.lsp |
| 121 |
cl:slot-makunbound |
| 122 |
;; std-slot-value.lsp |
| 123 |
cl:slot-boundp |
| 124 |
cl:slot-exists-p |
| 125 |
cl:slot-value |
| 126 |
clos:slot-value-set |
| 127 |
clos:standard-instance-access ;; alias clos:funcallable-standard-instance-access |
| 128 |
clos:standard-instance-set)) |
| 129 |
|
| 130 |
;; cdr-5 |
| 131 |
ext:array-index-p |
| 132 |
ext:negative-fixnum-p ext:non-negative-fixnum-p |
| 133 |
ext:non-positive-fixnum-p ext:positive-fixnum-p |
| 134 |
ext:negative-integer-p ext:non-negative-integer-p |
| 135 |
ext:non-positive-integer-p ext:positive-integer-p |
| 136 |
ext:negative-rational-p ext:non-negative-rational-p |
| 137 |
ext:non-positive-rational-p ext:positive-rational-p |
| 138 |
ext:negative-ratio-p ext:non-negative-ratio-p |
| 139 |
ext:non-positive-ratio-p ext:positive-ratio-p |
| 140 |
ext:negative-real-p ext:non-negative-real-p |
| 141 |
ext:non-positive-real-p ext:positive-real-p |
| 142 |
ext:negative-float-p ext:non-negative-float-p |
| 143 |
ext:non-positive-float-p ext:positive-float-p |
| 144 |
ext:negative-short-float-p ext:non-negative-short-float-p |
| 145 |
ext:non-positive-short-float-p ext:positive-short-float-p |
| 146 |
ext:negative-single-float-p ext:non-negative-single-float-p |
| 147 |
ext:non-positive-single-float-p ext:positive-single-float-p |
| 148 |
ext:negative-double-float-p ext:non-negative-double-float-p |
| 149 |
ext:non-positive-double-float-p ext:positive-double-float-p |
| 150 |
ext:negative-long-float-p ext:non-negative-long-float-p |
| 151 |
ext:non-positive-long-float-p ext:positive-long-float-p)) |
| 152 |
|
| 153 |
(proclaim |
| 154 |
;; These functions are not visible in external.h and have no entry in |
| 155 |
;; symbols_list.h |
| 156 |
`(si::c-export-fname |
| 157 |
,@(when (member :ecl-min *features*) |
| 158 |
*in-all-symbols-functions*) |
| 159 |
;; defmacro.lsp |
| 160 |
si::find-documentation si::find-declarations |
| 161 |
si::search-keyword si::check-keyword |
| 162 |
si::dm-too-many-arguments si::dm-too-few-arguments |
| 163 |
si::remove-documentation |
| 164 |
;; defstruct.lsp |
| 165 |
si::structure-type-error si::define-structure |
| 166 |
;; helpfile.lsp |
| 167 |
si::get-documentation si::set-documentation |
| 168 |
si::expand-set-documentation |
| 169 |
;; packlib.lsp |
| 170 |
si::packages-iterator |
| 171 |
;; pprint.lsp |
| 172 |
si::pprint-logical-block-helper si::pprint-pop-helper |
| 173 |
;; seq.lsp |
| 174 |
si::make-seq-iterator si::seq-iterator-ref |
| 175 |
si::seq-iterator-set si::seq-iterator-next |
| 176 |
si::coerce-to-list si::coerce-to-vector |
| 177 |
,@(when (member :formatter *features*) |
| 178 |
'(si::format-princ si::format-prin1 si::format-print-named-character |
| 179 |
si::format-print-integer |
| 180 |
si::format-print-cardinal si::format-print-ordinal si::format-print-old-roman |
| 181 |
si::format-print-roman si::format-fixed si::format-exponential |
| 182 |
si::format-general si::format-dollars |
| 183 |
si::format-relative-tab si::format-absolute-tab |
| 184 |
si::format-justification)) |
| 185 |
,@(when (member :clos *features*) |
| 186 |
'(;; generic.lsp |
| 187 |
clos::associate-methods-to-gfun |
| 188 |
;; kernel.lsp |
| 189 |
clos::install-method |
| 190 |
;; std-slot-value.lsp |
| 191 |
clos::find-slot-definition |
| 192 |
;; clos::generic-function-lambda-list |
| 193 |
;; clos::generic-function-argument-precedence-order |
| 194 |
;; clos::generic-function-method-combination |
| 195 |
;; clos::generic-function-method-class |
| 196 |
;; clos::generic-function-methods |
| 197 |
;; clos::method-generic-function |
| 198 |
;; clos::method-lambda-list |
| 199 |
;; clos::method-specializers |
| 200 |
;; clos::method-qualifiers |
| 201 |
;; clos::method-function |
| 202 |
;; clos::method-plist |
| 203 |
)))) |