Changeset 14756
- Timestamp:
- Apr 29, 2011, 2:49:16 PM (14 years ago)
- Location:
- trunk/source
- Files:
-
- 2 edited
-
compiler/optimizers.lisp (modified) (2 diffs)
-
level-1/sysutils.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/compiler/optimizers.lisp
r14725 r14756 941 941 (if first-p 942 942 (if rest call first))) 943 944 945 943 946 944 947 ;;; This isn't quite right... The idea is that (car (require-type foo … … 1003 1006 ((and (symbolp type)(find-class type nil env)) 1004 1007 `(%require-type-class-cell ,arg (load-time-value (find-class-cell ',type t)))) 1008 ((and (symbolp type) 1009 #-bootstrapped-this (fboundp 'require-structure-type) 1010 (structure-class-p type env)) 1011 `(require-structure-type ,arg (load-time-value (find-class-cell ',type t)))) 1005 1012 (t (let* ((val (gensym))) 1006 1013 `(the ,type -
trunk/source/level-1/sysutils.lisp
r14577 r14756 310 310 (%kernel-restart $xwrongtype arg type)))) 311 311 312 313 312 314 ;;; Might want to use an inverted mapping instead of (satisfies ccl::obscurely-named) 313 315 (defun %require-type (arg predsym) … … 321 323 (%kernel-restart $xwrongtype arg (car type-cell)))) 322 324 323 325 (defun require-structure-type (arg token) 326 (or(and (= (the fixnum (typecode arg)) target::subtag-struct) 327 (dolist (x (%svref arg 0)) 328 (declare (optimize (speed 3) (safety 0))) 329 (when (eq x token) (return arg)))) 330 (%kernel-restart $xwrongtype arg (if (typep token 'class-cell) (class-cell-name token) token)))) 324 331 325 332 ;;; In lieu of an inverted mapping, at least try to find cases involving
Note:
See TracChangeset
for help on using the changeset viewer.
