mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Unboxed type SHORT-FLOAT removed from the core.
This commit is contained in:
parent
0e3b1c389f
commit
e83bd3dfb4
27 changed files with 13 additions and 687 deletions
|
|
@ -201,20 +201,18 @@
|
|||
,@(when (policy-type-assertions env)
|
||||
`((check-arrayp ,a)
|
||||
(check-expected-rank ,a ,expected-rank)))
|
||||
,@(loop with last-dim = nil
|
||||
for i from 0
|
||||
,@(loop for i from 0
|
||||
for l in indices
|
||||
for index in indices
|
||||
for dim-var in dim-names
|
||||
when last-dim
|
||||
when (plusp i)
|
||||
collect `(setf %output-var
|
||||
(the ext:array-index (* %output-var ,last-dim)))
|
||||
(the ext:array-index (* %output-var ,dim-var)))
|
||||
collect `(let ((%ndx-var ,index))
|
||||
(declare (ext:array-index %ndx-var))
|
||||
,(and check `(check-index-in-bounds ,a %ndx-var ,dim-var))
|
||||
(setf %output-var
|
||||
(the ext:array-index (+ %output-var %ndx-var))))
|
||||
do (setf last-dim dim-var))
|
||||
(the ext:array-index (+ %output-var %ndx-var)))))
|
||||
%output-var))))
|
||||
|
||||
;(trace c::expand-row-major-index c::expand-aset c::expand-aref)
|
||||
|
|
|
|||
|
|
@ -105,8 +105,7 @@
|
|||
output))
|
||||
|
||||
(defun to-fixnum-float-type (type)
|
||||
(dolist (i '(FIXNUM DOUBLE-FLOAT SINGLE-FLOAT
|
||||
#+short-float SHORT-FLOAT #+long-float LONG-FLOAT)
|
||||
(dolist (i '(FIXNUM DOUBLE-FLOAT SINGLE-FLOAT #+long-float LONG-FLOAT)
|
||||
nil)
|
||||
(when (type>= i type)
|
||||
(return i))))
|
||||
|
|
@ -121,9 +120,6 @@
|
|||
'DOUBLE-FLOAT)
|
||||
((or (eq t1 'SINGLE-FLOAT) (eq t2 'SINGLE-FLOAT))
|
||||
'SINGLE-FLOAT)
|
||||
#+short-float
|
||||
((or (eq t1 'SHORT-FLOAT) (eq t2 'SHORT-FLOAT))
|
||||
'SHORT-FLOAT)
|
||||
(T
|
||||
'FIXNUM)))
|
||||
|
||||
|
|
|
|||
|
|
@ -68,12 +68,10 @@
|
|||
(output nil)
|
||||
(default (if only-real 'REAL 'NUMBER))
|
||||
(types-list (if only-real
|
||||
'(FIXNUM INTEGER RATIONAL
|
||||
#+short-float SHORT-FLOAT SINGLE-FLOAT
|
||||
'(FIXNUM INTEGER RATIONAL SINGLE-FLOAT
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT FLOAT REAL
|
||||
NUMBER)
|
||||
'(FIXNUM INTEGER RATIONAL
|
||||
#+short-float SHORT-FLOAT SINGLE-FLOAT
|
||||
'(FIXNUM INTEGER RATIONAL SINGLE-FLOAT
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT FLOAT REAL))))
|
||||
(dolist (i types-list
|
||||
(values (if (and t1-eq t2-eq output) output default)
|
||||
|
|
|
|||
|
|
@ -126,8 +126,7 @@
|
|||
;;
|
||||
;; (INTEGER * *), etc
|
||||
((member first '(INTEGER RATIONAL FLOAT REAL SINGLE-FLOAT
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT
|
||||
#+short-float SHORT-FLOAT))
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT))
|
||||
(let ((var (gensym)))
|
||||
;; Small optimization: it is easier to check for fixnum
|
||||
;; than for integer. Use it when possible.
|
||||
|
|
@ -292,8 +291,7 @@
|
|||
;; does not match. However, if safety settings are low, we
|
||||
;; skip the interval test.
|
||||
((member first '(INTEGER RATIONAL FLOAT REAL SINGLE-FLOAT
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT
|
||||
#+short-float SHORT-FLOAT))
|
||||
DOUBLE-FLOAT #+long-float LONG-FLOAT))
|
||||
(let ((unchecked (expand-coerce form value `',first env)))
|
||||
(if (policy-assume-no-errors)
|
||||
unchecked
|
||||
|
|
|
|||
|
|
@ -781,10 +781,7 @@
|
|||
|
||||
(def-inline shift<< :always (fixnum fixnum) :fixnum "((#0) << (#1))")
|
||||
|
||||
#-short-float
|
||||
(def-inline short-float-p :always (t) :bool "@0;ECL_SINGLE_FLOAT_P(#0)")
|
||||
#+short-float
|
||||
(def-inline short-float-p :always (t) :bool "type_of(#0) == t_short_float")
|
||||
|
||||
(def-inline single-float-p :always (t) :bool "@0;ECL_SINGLE_FLOAT_P(#0)")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue