From: stassats <sta...@us...> - 2013-11-07 22:51:25
|
The branch "master" has been updated in SBCL: via 99e23fa74844ef606b7f3f33768eab6466c9dfef (commit) from 7cd7b23c6930e88e2185d76524dc56b789193d51 (commit) - Log ----------------------------------------------------------------- commit 99e23fa74844ef606b7f3f33768eab6466c9dfef Author: Stas Boukarev <sta...@gm...> Date: Fri Nov 8 02:47:41 2013 +0400 Optimize testing of sealed structures. Don't check for the layout validity, redefining structures is undefined, and the non-sealed case doesn't check for it already. --- src/compiler/typetran.lisp | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/typetran.lisp b/src/compiler/typetran.lisp index 9090380..b6c1a8f 100644 --- a/src/compiler/typetran.lisp +++ b/src/compiler/typetran.lisp @@ -543,13 +543,8 @@ ((and (eq (classoid-state class) :sealed) layout (not (classoid-subclasses class))) ;; Sealed and has no subclasses. - (let ((n-layout (gensym))) - `(and (,pred object) - (let ((,n-layout (,get-layout object))) - ,@(when (policy *lexenv* (>= safety speed)) - `((when (layout-invalid ,n-layout) - (%layout-invalid-error object ',layout)))) - (eq ,n-layout ',layout))))) + `(and (,pred object) + (eq (,get-layout object) ',layout))) ((and (typep class 'structure-classoid) layout) ;; structure type tests; hierarchical layout depths (let ((depthoid (layout-depthoid layout)) ----------------------------------------------------------------------- hooks/post-receive -- SBCL |