diff --git a/src/CHANGELOG b/src/CHANGELOG index 12a25d7be..b4483b820 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -8,6 +8,9 @@ ECL 9.6.3: either reads the state of this flag (if NEW-FLAG is missing) or also sets it. + - The compiler now uses cl_core to efficiently access certain lisp + constants (standard packages, standard readtables, etc) + ECL 9.6.2: ========== diff --git a/src/cmp/cmpct.lsp b/src/cmp/cmpct.lsp index a71686b38..b8accff8c 100644 --- a/src/cmp/cmpct.lsp +++ b/src/cmp/cmpct.lsp @@ -61,7 +61,7 @@ (type (lisp-type->rep-type (type-of value)))) (cons value `(c-inline () () ,type ,c-value :one-liner t :side-effects nil)))) - ((float name) + ((floatp name) (let* ((value name) (type (type-of value)) (loc-type (case type @@ -72,10 +72,11 @@ (cons value (make-c1form* 'LOCATION :type type :args (list loc-type value location))))) (t - (baboon))) + (cons name (make-c1form* 'LOCATION :type (type-of name) + :args `(VV ,c-value))))) +optimizable-constants+))) (reverse - '((MOST-POSITIVE-SHORT-FLOAT "FLT_MAX") + `((MOST-POSITIVE-SHORT-FLOAT "FLT_MAX") (MOST-POSITIVE-SINGLE-FLOAT "FLT_MAX") (MOST-NEGATIVE-SHORT-FLOAT "-FLT_MAX") @@ -105,11 +106,10 @@ (#.(coerce -0.0 'single-float) "cl_core.singlefloat_minus_zero") (#.(coerce -0.0 'double-float) "cl_core.doublefloat_minus_zero") - . - #-long-float - NIL + (#.(si::standard-readtable) "cl_core.standard_readtable") + #+long-float - ( + ,@'( (MOST-POSITIVE-LONG-FLOAT "LDBL_MAX") (MOST-NEGATIVE-LONG-FLOAT "-LDBL_MAX") (LEAST-POSITIVE-LONG-FLOAT "LDBL_MIN")