Skip to content

Commit 9b65f7b

Browse files
committed
More builtin declarations
1 parent d7356aa commit 9b65f7b

File tree

7 files changed

+51
-18
lines changed

7 files changed

+51
-18
lines changed

lisp/c/eus_proto.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ extern "C" {
33
#endif
44
/* arith.c */
55
extern pointer NUMEQUAL(context */*ctx*/, int /*n*/, pointer /*argv*/*);
6+
extern pointer NUMNEQUAL(context */*ctx*/, int /*n*/, pointer /*argv*/*);
67
extern pointer GREATERP(context */*ctx*/, int /*n*/, pointer /*argv*/*);
78
extern pointer LESSP(context */*ctx*/, int /*n*/, pointer /*argv*/*);
89
extern pointer GREQP(context */*ctx*/, int /*n*/, pointer /*argv*/*);

lisp/comp/builtins.l

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
(putprop sym lab 'builtin-function-entry ))
1616

1717
(def-builtin-entry 'LISP:= "NUMEQUAL")
18+
(def-builtin-entry 'LISP:/= "NUMNEQUAL")
1819
(def-builtin-entry 'LISP:> "GREATERP")
1920
(def-builtin-entry 'LISP:< "LESSP")
2021
(def-builtin-entry 'LISP:>= "GREQP")
@@ -30,6 +31,12 @@
3031
(def-builtin-entry 'LISP:COS "COS")
3132
(def-builtin-entry 'LISP:TAN "TAN")
3233
(def-builtin-entry 'LISP:ATAN "ATAN")
34+
(def-builtin-entry 'LISP:SINH "SINH")
35+
(def-builtin-entry 'LISP:COSH "COSH")
36+
(def-builtin-entry 'LISP:TANH "TANH")
37+
(def-builtin-entry 'LISP:ATANH "ATANH")
38+
(def-builtin-entry 'LISP:ASINH "ASINH")
39+
(def-builtin-entry 'LISP:ACOSH "ACOSH")
3340
(def-builtin-entry 'LISP:SQRT "SQRT")
3441
(def-builtin-entry 'LISP:LOG "LOG")
3542
(def-builtin-entry 'LISP:EXP "EXP")
@@ -45,6 +52,9 @@
4552
(def-builtin-entry 'LISP:LOGAND "LOGAND")
4653
(def-builtin-entry 'LISP:LOGIOR "LOGIOR")
4754
(def-builtin-entry 'LISP:LOGXOR "LOGXOR")
55+
(def-builtin-entry 'LISP:LOGEQV "LOGEQV")
56+
(def-builtin-entry 'LISP:LOGNAND "LOGNAND")
57+
(def-builtin-entry 'LISP:LOGNOR "LOGNOR")
4858
(def-builtin-entry 'LISP:LOGNOT "LOGNOT")
4959
(def-builtin-entry 'LISP:LOGTEST "LOGTEST")
5060
(def-builtin-entry 'LISP:LOGBITP "LOGBITP")
@@ -68,24 +78,29 @@
6878
(def-builtin-entry 'LISP:CHAR-DOWNCASE "CHDOWNCASE")
6979

7080
(def-builtin-entry 'LISP:COPY-OBJECT "COPYOBJ")
81+
(def-builtin-entry 'LISP:REPLACE-OBJECT "REPLACEOBJECT")
82+
(def-builtin-entry 'LISP:BECOME "BECOME")
7183
(def-builtin-entry 'LISP:CLASS "GETCLASS")
84+
(def-builtin-entry 'LISP:ENTER-CLASS "ENTERCLASS")
7285
(def-builtin-entry 'LISP:SEND "SEND")
7386
(def-builtin-entry 'LISP:SEND-MSG "SEND")
7487
(def-builtin-entry 'LISP:SEND-MESSAGE "SENDMESSAGE")
88+
(def-builtin-entry 'LISP:SEND-IF-FOUND "SEND_IF_FOUND")
7589
(def-builtin-entry 'LISP:INSTANTIATE "INSTANTIATE")
7690
(def-builtin-entry 'LISP:CLASSP "CLASSP")
7791
(def-builtin-entry 'LISP:SUBCLASSP "SUBCLASSP")
7892
(def-builtin-entry 'LISP:DERIVEDP "DERIVEDP")
7993
(def-builtin-entry 'LISP:SLOT "SLOT")
8094
(def-builtin-entry 'LISP:SETSLOT "SETSLOT")
8195
(def-builtin-entry 'LISP:CLONE "CLONE")
82-
;;(def-builtin-entry 'SYSTEM::METHOD "FINDMETHOD")
96+
(def-builtin-entry 'LISP::FIND-METHOD "FINDMETHOD")
8397
(def-builtin-entry 'SYSTEM::METHOD-CACHE "METHCACHE")
8498

8599
; (def-builtin-entry 'LISP:OPEN "OPEN") ;rewritten in euslisp
86100
(def-builtin-entry 'LISP:CLOSE "CLOSE")
87101
(def-builtin-entry 'LISP:READ "READ")
88102
(def-builtin-entry 'LISP:READ-LINE "READLINE")
103+
(def-builtin-entry 'LISP:READ-DELIMITED-LIST "READ_DELIMITED_LIST")
89104
(def-builtin-entry 'LISP:READ-CHAR "READCH")
90105
(def-builtin-entry 'LISP:UNREAD-CHAR "UNREADCH")
91106
(def-builtin-entry 'LISP:PEEK-CHAR "PEEKCH")
@@ -99,6 +114,7 @@
99114
(def-builtin-entry 'LISP:WRITE-WORD "WRTWORD")
100115
(def-builtin-entry 'LISP:WRITE-LONG "WRTLONG")
101116
(def-builtin-entry 'LISP:SET-MACRO-CHARACTER "SETMACROCH")
117+
(def-builtin-entry 'LISP:GET-MACRO-CHARACTER "GETMACROCH")
102118
(def-builtin-entry 'LISP:SET-DISPATCH-MACRO-CHARACTER "SETDISPMACRO")
103119
(def-builtin-entry 'LISP:GET-DISPATCH-MACRO-CHARACTER "GETDISPMACRO")
104120
(def-builtin-entry 'LISP:FORMAT "XFORMAT")
@@ -111,6 +127,8 @@
111127
(def-builtin-entry 'LISP:V.* "SCA3PROD")
112128
(def-builtin-entry 'LISP:V< "VLESSP")
113129
(def-builtin-entry 'LISP:V> "VGREATERP")
130+
(def-builtin-entry 'LISP:V-ABS "VMINUS_ABS")
131+
(def-builtin-entry 'LISP:V++ "VPLUSPLUS")
114132
(def-builtin-entry 'LISP:VMIN "VMIN")
115133
(def-builtin-entry 'LISP:VMAX "VMAX")
116134
(def-builtin-entry 'LISP:MINIMAL-BOX "MINIMALBOX")
@@ -120,6 +138,8 @@
120138
(def-builtin-entry 'LISP:NORMALIZE-VECTOR "VNORMALIZE")
121139
(def-builtin-entry 'LISP:DISTANCE "VDISTANCE")
122140
(def-builtin-entry 'LISP:DISTANCE2 "VDISTANCE2")
141+
(def-builtin-entry 'LISP:DIRECTION "VDIRECTION")
142+
(def-builtin-entry 'LISP:MIDPOINT "MIDPOINT")
123143
;; (def-builtin-entry 'LISP:TRIANGLE "TRIANGLE") ;obsolete
124144
(def-builtin-entry 'LISP:FLOATVECTOR "MKFLTVEC")
125145
(def-builtin-entry 'LISP:FLOAT-VECTOR "MKFLTVEC")
@@ -200,9 +220,18 @@
200220
(def-builtin-entry 'LISP:ELT "ELT")
201221
(def-builtin-entry 'LISP:SETELT "SETELT")
202222
(def-builtin-entry 'LISP:CHAR "EUSCHAR")
223+
(def-builtin-entry 'LISP:SCHAR "EUSCHAR")
203224
(def-builtin-entry 'LISP:SETCHAR "SETCHAR")
204225
(def-builtin-entry 'LISP:BIT "BIT")
226+
(def-builtin-entry 'LISP:SBIT "SBIT")
205227
(def-builtin-entry 'LISP:SETBIT "SETBIT")
228+
(def-builtin-entry 'LISP:BIT-AND "BITAND")
229+
(def-builtin-entry 'LISP:BIT-IOR "BITIOR")
230+
(def-builtin-entry 'LISP:BIT-XOR "BITXOR")
231+
(def-builtin-entry 'LISP:BIT-EQV "BITEQV")
232+
(def-builtin-entry 'LISP:BIT-NAND "BITNAND")
233+
(def-builtin-entry 'LISP:BIT-NOR "BITNOR")
234+
(def-builtin-entry 'LISP:BIT-NOT "BITNOT")
206235
(def-builtin-entry 'LISP:VECTOR "MKVECTOR")
207236
(def-builtin-entry 'LISP:INTEGER-VECTOR "MKINTVECTOR")
208237
(def-builtin-entry 'LISP:SYMBOLP "SYMBOLP")
@@ -222,6 +251,8 @@
222251
;; (def-builtin-entry 'LISP:STRING= "STR_EQ")
223252
(def-builtin-entry 'LISP:STRING> "STR_GT")
224253
(def-builtin-entry 'LISP:STRING>= "STR_GE")
254+
(def-builtin-entry 'LISP:STRINGEQ "STRINGEQ")
255+
(def-builtin-entry 'LISP:STRINGEQUAL "STRINGEQUAL")
225256
(def-builtin-entry 'LISP:EVAL "EVAL")
226257
(def-builtin-entry 'LISP:APPLY "APPLY")
227258
(def-builtin-entry 'LISP:FUNCALL "FUNCALL")

lisp/comp/trans.l

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@
284284
(let ((entry))
285285
(setq entry (get sym 'user-function-entry))
286286
(if (null entry) (setq entry (get sym 'builtin-function-entry)))
287+
(if (and (null entry) (get sym 'function-alias))
288+
(setq entry (get (get sym 'function-alias) 'builtin-function-entry)))
287289
(send self :clearpush)
288290
(send self :reset-vsp)
289291
(if (and (not (functionp sym)) (not avant-mode))

lisp/l/common.l

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,10 @@
359359
; more list functions
360360
;
361361
(eval-when (load eval)
362-
(defun alias (new old) (setslot new symbol 'function
363-
(symbol-function old)))
362+
(defun alias (new old)
363+
(prog1 (setslot new symbol 'function
364+
(symbol-function old))
365+
(putprop new old 'compiler::function-alias)))
364366
(alias 'list-length 'length)
365367
(alias 'values 'list)
366368
)

lisp/l/constants.l

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,12 @@
339339

340340
(defconstant *default-readtable* (copy-readtable))
341341

342-
(setf (symbol-function 'char=) (symbol-function '=))
343-
(setf (symbol-function 'char<) (symbol-function '<))
344-
(setf (symbol-function 'char>) (symbol-function '>))
345-
(setf (symbol-function 'char<=) (symbol-function '<=))
346-
(setf (symbol-function 'char>=) (symbol-function '>=))
347-
(setf (symbol-function 'char/=) (symbol-function '/=))
348-
349-
(setf (symbol-function 'quit) (symbol-function 'unix::exit))
350-
(setf (symbol-function 'bye) (symbol-function 'unix::exit))
351-
352-
342+
(alias 'char= '=)
343+
(alias 'char< '<)
344+
(alias 'char> '>)
345+
(alias 'char<= '<=)
346+
(alias 'char>= '>=)
347+
(alias 'char/= '/=)
348+
349+
(alias 'quit 'unix::exit)
350+
(alias 'bye 'unix::exit)

lisp/l/eusstart.l

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@
323323
(system::exec-module-init "coordinates" "l/coordinates.l")
324324

325325
(in-package "LISP")
326-
(setf (symbol-function 'get-internal-run-time)
327-
(symbol-function 'unix::runtime))
326+
(alias 'get-internal-run-time 'unix::runtime)
328327
;; toplevel needs the compiler package
329328
;; (format t ";;; Loading compiler modules.~%")
330329
;;
@@ -349,7 +348,7 @@
349348
)
350349
(export '(compile comfile compile-file compile-file-if-src-newer
351350
gc alloc runtime))
352-
(setf (symbol-function 'exit) (symbol-function 'unix::exit))
351+
(alias 'exit 'unix::exit)
353352
;;
354353
;(when (substringp "P" (string-upcase *program-name*))
355354
(in-package "SYSTEM")

lisp/l/process.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
;;
154154

155155
#+(or :linux :solaris2 :cygwin :alpha)
156-
(setf (symbol-function 'directory) (symbol-function 'unix::readdir))
156+
(alias 'directory 'unix::readdir)
157157
#-(or :linux :solaris2 :cygwin :alpha)
158158
(defun directory (&optional (dir "."))
159159
(let ((fnlist) (ls) (eof (cons nil nil)) (fn))

0 commit comments

Comments
 (0)