OK, OK, you (the hordes of complaining users) win.
... no more optimization notes in default compilation policy.
print using #P"..." syntax.
changes in sbcl-0.8.12 relative to sbcl-0.8.11:
+ * minor incompatible change: the system no longer provides
+ optimization hints (conditions which are TYPEP
+ SB-EXT:COMPILER-NOTE) for conforming code in default compilation
+ mode; these hints are emitted when higher SPEED optimization is
+ requested, as before.
* the behaviour of the standard function ED is now customizeable by
third parties through a hook variable: see ED's documentation
string for information on the protocol.
;; WHN, and also CSR 2002-05-26
((or vector simple-array) index (or index null))
*
- :important t
:node node
:policy (> speed space))
"inline non-SIMPLE-vector-handling logic"
((simple-array character (*)) (data-vector-ref string index))
((simple-array nil (*)) (data-vector-ref string index))))))
-(deftransform hairy-data-vector-ref ((array index) (array t) * :important t)
+(deftransform hairy-data-vector-ref ((array index) (array t) *)
"avoid runtime dispatch on array element type"
(let ((element-ctype (extract-upgraded-element-type array))
(declared-element-ctype (extract-declared-element-type array)))
(deftransform hairy-data-vector-set ((array index new-value)
(array t t)
- *
- :important t)
+ *)
"avoid runtime dispatch on array element type"
(let ((element-ctype (extract-upgraded-element-type array))
(declared-element-ctype (extract-declared-element-type array)))
(deftransform %data-vector-and-index ((%array %index)
(simple-array t)
- *
- :important t)
+ *)
;; KLUDGE: why the percent signs? Well, ARRAY and INDEX are
;; respectively exported from the CL and SB!INT packages, which
;; means that they're visible to all sorts of things. If the
`(deftransform ,name ((predicate sequence from-end start end key)
(function list t t t function)
*
- :policy (> speed space)
- :important t)
+ :policy (> speed space))
"expand inline"
`(let ((index 0)
(find nil)
(deftransform %find-position ((item sequence from-end start end key test)
(t list t t t t t)
*
- :policy (> speed space)
- :important t)
+ :policy (> speed space))
"expand inline"
'(%find-position-if (let ((test-fun (%coerce-callable-to-fun test)))
;; The order of arguments for asymmetric tests
(deftransform %find-position-if ((predicate sequence from-end start end key)
(function vector t t t function)
*
- :policy (> speed space)
- :important t)
+ :policy (> speed space))
"expand inline"
(check-inlineability-of-find-position-if sequence from-end)
'(%find-position-if-vector-macro predicate sequence
(deftransform %find-position-if-not ((predicate sequence from-end start end key)
(function vector t t t function)
*
- :policy (> speed space)
- :important t)
+ :policy (> speed space))
"expand inline"
(check-inlineability-of-find-position-if sequence from-end)
'(%find-position-if-not-vector-macro predicate sequence
(deftransform %find-position ((item sequence from-end start end key test)
(t vector t t t function function)
*
- :policy (> speed space)
- :important t)
+ :policy (> speed space))
"expand inline"
(check-inlineability-of-find-position-if sequence from-end)
'(%find-position-vector-macro item sequence
0 0))))
391833530 -32785211)))
-;;; Efficiency notes for FUNCALL
-(handler-case
- (compile nil '(lambda (x) (funcall x)))
- (sb-ext:compiler-note (e)
- (error "bogus compiler note: ~S." e)))
-
-(catch :got-note
- (handler-case
- (compile nil '(lambda (x) (declare (optimize speed)) (funcall x)))
- (sb-ext:compiler-note (e)
- (throw :got-note nil)))
- (error "missing compiler note for FUNCALL"))
+;;; efficiency notes for ordinary code
+(macrolet ((frob (arglist &body body)
+ `(progn
+ (handler-case
+ (compile nil '(lambda ,arglist ,@body))
+ (sb-ext:compiler-note (e)
+ (error "bad compiler note for ~S:~% ~A" ',body e)))
+ (catch :got-note
+ (handler-case
+ (compile nil '(lambda ,arglist (declare (optimize speed))
+ ,@body))
+ (sb-ext:compiler-note (e) (throw :got-note nil)))
+ (error "missing compiler note for ~S" ',body)))))
+ (frob (x) (funcall x))
+ (frob (x y) (find x y))
+ (frob (x y) (find-if x y))
+ (frob (x y) (find-if-not x y))
+ (frob (x y) (position x y))
+ (frob (x y) (position-if x y))
+ (frob (x y) (position-if-not x y))
+ (frob (x) (aref x 0)))
;;; 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".)
-"0.8.11.12"
+"0.8.11.13"