Permalink
Browse files

Make Nibbles work well both with ASDF 2.27 and with earlier versions.

Stop using the :if-component-dep-fails feature dropped in ASDF 2.27.
Instead use proper #+ read-time conditionals in the SBCL-only files.
This keeps all files tracked as part of the component tree.
Simplify some of the ASDF plumbing.
  • Loading branch information...
1 parent 535f975 commit 85d94f3d352f764da2b5810fe561d13d806b5481 @fare fare committed with Dec 22, 2012
Showing with 23 additions and 24 deletions.
  1. +5 −24 nibbles.asd
  2. +4 −0 sbcl-opt/fndb.lisp
  3. +4 −0 sbcl-opt/nib-tran.lisp
  4. +5 −0 sbcl-opt/x86-64-vm.lisp
  5. +5 −0 sbcl-opt/x86-vm.lisp
View
@@ -5,11 +5,8 @@
(cl:in-package :nibbles-system)
-(defclass txt-file (asdf:doc-file) ())
-(defclass css-file (asdf:doc-file) ())
-
-(defmethod asdf:source-file-type ((c txt-file) (s asdf:module)) "txt")
-(defmethod asdf:source-file-type ((c css-file) (s asdf:module)) "css")
+(defclass txt-file (asdf:doc-file) ((type :initform "txt")))
+(defclass css-file (asdf:doc-file) ((type :initform "css")))
(asdf:defsystem :nibbles
:version "0.10"
@@ -30,27 +27,15 @@
(:css-file "style")))
(:module "sbcl-opt"
:depends-on ("package" "macro-utils")
- :if-component-dep-fails :ignore
- :components ((:file "fndb"
- :in-order-to ((asdf:compile-op
- (asdf:feature :sbcl))))
+ :components ((:file "fndb")
(:file "nib-tran" :depends-on ("fndb"))
- (:file "x86-vm"
- :in-order-to ((asdf:compile-op (asdf:feature :x86))
- (asdf:compile-op (asdf:load-op "fndb"))))
- (:file "x86-64-vm" :depends-on ("fndb")
- :in-order-to ((asdf:compile-op (asdf:feature :x86-64))
- (asdf:compile-op (asdf:load-op "fndb"))))))))
+ (:file "x86-vm" :depends-on ("fndb"))
+ (:file "x86-64-vm" :depends-on ("fndb"))))))
(defmethod asdf:perform ((op asdf:test-op)
(c (eql (asdf:find-system :nibbles))))
(asdf:oos 'asdf:test-op 'nibbles-tests))
-;;; A tester's job is never done!
-(defmethod asdf:operation-done-p ((op asdf:test-op)
- (c (eql (asdf:find-system :nibbles))))
- nil)
-
(asdf:defsystem :nibbles-tests
:depends-on (:nibbles)
:version "0.1"
@@ -60,10 +45,6 @@
:components ((:file "rt")
(:file "tests" :depends-on ("rt"))))
-(defmethod asdf:operation-done-p ((op asdf:test-op)
- (c (eql (asdf:find-system :nibbles-tests))))
- nil)
-
(defmethod asdf:perform ((op asdf:test-op)
(c (eql (asdf:find-system :nibbles-tests))))
(or (funcall (intern "DO-TESTS" (find-package "RTEST")))
View
@@ -2,6 +2,8 @@
(cl:in-package :nibbles)
+#+sbcl (progn
+
;;; Efficient array bounds checking
(sb-c:defknown %check-bound
((simple-array (unsigned-byte 8) (*)) index (and fixnum sb-vm:word)
@@ -39,3 +41,5 @@
,internal-arg-types
,arg-type) into defknowns
finally (return `(progn ,@defknowns)))
+
+);#+sbcl
View
@@ -2,6 +2,8 @@
(cl:in-package :nibbles)
+#+sbcl (progn
+
(sb-c:deftransform %check-bound ((vector bound offset n-bytes)
((simple-array (unsigned-byte 8) (*)) index
(and fixnum sb-vm:word)
@@ -95,3 +97,5 @@
else if (<= bitsize sb-vm:n-word-bits)
collect generic-little-transform into transforms
finally (return `(progn ,@transforms))))
+
+);#+sbcl
View
@@ -1,7 +1,10 @@
;;;; x86-64-vm.lisp -- VOP definitions SBCL
+#+sbcl
(cl:in-package :sb-vm)
+#+(and sbcl x86-64) (progn
+
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
@@ -113,3 +116,5 @@
for big-endian-p = (logbitp 0 i)
collect (frob bitsize setterp signedp big-endian-p) into forms
finally (return `(progn ,@forms))))
+
+);#+(and sbcl x86-64)
View
@@ -1,7 +1,10 @@
;;;; x86-vm.lisp -- VOP definitions for SBCL
+#+sbcl
(cl:in-package :sb-vm)
+#+(and sbcl x86) (progn
+
(define-vop (%check-bound)
(:translate nibbles::%check-bound)
(:policy :fast-safe)
@@ -158,3 +161,5 @@
for big-endian-p = (logbitp 0 i)
collect (frob setterp signedp big-endian-p) into forms
finally (return `(progn ,@forms))))
+
+);#+(and sbcl x86)

0 comments on commit 85d94f3

Please sign in to comment.