|
[Sbcl-commits] master: Declare types for
sb-kernel:coerce-to-condition.
From: stassats <stassats@us...> - 2012-07-16 20:35
|
The branch "master" has been updated in SBCL:
via 7acdf15e27993655c9249f79d36fe2117843dbdf (commit)
from 2273f3a907d7465dc06864132737a52575a8cd4a (commit)
- Log -----------------------------------------------------------------
commit 7acdf15e27993655c9249f79d36fe2117843dbdf
Author: Stas Boukarev <stassats@...>
Date: Tue Jul 17 00:34:43 2012 +0400
Declare types for sb-kernel:coerce-to-condition.
Add
(defknown coerce-to-condition ((or condition symbol string function)
list type-specifier symbol)
condition
(explicit-check))
Which helps to remove optimization notes in some cases with
restart-case.
Fixes lp#1025416.
---
src/code/error.lisp | 4 ++--
src/compiler/fndb.lisp | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/code/error.lisp b/src/code/error.lisp
index e701982..9086a94 100644
--- a/src/code/error.lisp
+++ b/src/code/error.lisp
@@ -51,10 +51,10 @@
(t
(error 'simple-type-error
:datum datum
- :expected-type '(or symbol string)
+ :expected-type '(or symbol string function)
:format-control "Condition designator ~s is not of type ~s."
:format-arguments (list datum
- '(or symbol string))))))
+ '(or symbol string function))))))
(define-condition layout-invalid (type-error)
()
diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp
index 8fede70..ac471cf 100644
--- a/src/compiler/fndb.lisp
+++ b/src/compiler/fndb.lisp
@@ -1589,6 +1589,11 @@
())
(defknown style-warn (t &rest t) null ())
+(defknown coerce-to-condition ((or condition symbol string function)
+ list type-specifier symbol)
+ condition
+ (explicit-check))
+
(defknown sc-number-or-lose (symbol) sc-number
(foldable))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] master: Declare types for sb-kernel:coerce-to-condition. | stassats <stassats@us...> |