This change enables %UNARY-ROUND to be inlined on several platforms.
;;;; -*- coding: utf-8; fill-column: 78 -*-
changes relative to sbcl-1.0.34:
+ * optimization: ROUND with a single single-float or double-float argument
+ is properly inlined when possible.
* optimization: Slightly better code is generated for integer<->float
conversions and for single-float<->double-float conversions on x86-64.
* optimization: SB-ROTATE-BYTE:ROTATE-BYTE now generates more efficient
(ftruncate-derive-type-quot-aux n divisor nil))
#'%unary-ftruncate)))
+(defoptimizer (%unary-round derive-type) ((number))
+ (one-arg-derive-type number
+ (lambda (n)
+ (block nil
+ (unless (numeric-type-real-p n)
+ (return *empty-type*))
+ (let* ((interval (numeric-type->interval n))
+ (low (interval-low interval))
+ (high (interval-high interval)))
+ (specifier-type
+ `(integer ,(if low
+ (round low)
+ '*)
+ ,(if high
+ (round high)
+ '*))))))
+ #'%unary-round))
+
;;; Define optimizers for FLOOR and CEILING.
(macrolet
((def (name q-name r-name)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.34.12"
+"1.0.34.13"