mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
Add new declaration, si::c-export-fname, which produces lisp compiled files with
meaningful names for the exported functions. For instance, (proclaim '(si::c-export-fname union)) is used to produce a C function with name clLunion, which can be directly used in other compiled files. This feature has been applied to almost all functions in the Lisp runtime.
This commit is contained in:
parent
f2da18a591
commit
ea010dee34
30 changed files with 129 additions and 93 deletions
|
|
@ -14,8 +14,13 @@
|
|||
|
||||
(in-package "SYSTEM")
|
||||
|
||||
(eval-when (compile) (proclaim '(optimize (safety 2) (space 3))))
|
||||
|
||||
(c-declaim (si::c-export-fname make-array vector array-dimensions
|
||||
array-in-bounds-p array-row-major-index
|
||||
bit sbit bit-and bit-ior bit-xor bit-eqv
|
||||
bit-nand bit-nor bit-andc1 bit-andc2 bit-orc1
|
||||
bit-not
|
||||
vector-push vector-push-extend
|
||||
vector-pop adjust-array))
|
||||
|
||||
(defun make-array (dimensions
|
||||
&key (element-type t)
|
||||
|
|
@ -74,16 +79,6 @@
|
|||
(return nil)))))
|
||||
x))))
|
||||
|
||||
(defun type-for-array (element-type)
|
||||
(case element-type
|
||||
((t nil) t)
|
||||
((base-char standard-char extended-char character) 'base-char)
|
||||
(t (dolist (v '(BIT BASE-CHAR
|
||||
(SIGNED-BYTE 32) (UNSIGNED-BYTE 32)
|
||||
SHORT-FLOAT LONG-FLOAT) T)
|
||||
(when (subtypep element-type v)
|
||||
(return (if (symbolp v) v 'FIXNUM)))))))
|
||||
|
||||
(defun increment-cursor (cursor dimensions)
|
||||
(if (null cursor)
|
||||
t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue