Revision: 3599
Author: edi
URL: http://bknr.net/trac/changeset/3599
Update release date
U trunk/thirdparty/cl-interpol/CHANGELOG
Modified: trunk/thirdparty/cl-interpol/CHANGELOG
===================================================================
--- trunk/thirdparty/cl-interpol/CHANGELOG 2008-07-23 20:05:51 UTC (rev 3598)
+++ trunk/thirdparty/cl-interpol/CHANGELOG 2008-07-23 22:58:26 UTC (rev 3599)
@@ -1,5 +1,5 @@
Version 0.2.0
-2008-07-23
+2008-07-24
Base Unicode support on CL-UNICODE
Add new CL-PPCRE special characters for named registers and named properties
Re-architecture test suite
Revision: 3597
Author: ksprotte
URL: http://bknr.net/trac/changeset/3597
test allocation.disconnected-m2s.1 passes for the first time
U trunk/projects/bos/m2/allocation.lisp
U trunk/projects/bos/test/allocation.lisp
Modified: trunk/projects/bos/m2/allocation.lisp
===================================================================
--- trunk/projects/bos/m2/allocation.lisp 2008-07-23 18:55:53 UTC (rev 3596)
+++ trunk/projects/bos/m2/allocation.lisp 2008-07-23 19:12:54 UTC (rev 3597)
@@ -342,32 +342,35 @@
(labels ((allocatable-p (x y)
(and (in-polygon-p x y (allocation-area-vertices area))
(not (m2-contract (ensure-m2 x y))))))
- (loop
- (let ((x (+ area-left (random area-width)))
- (y (+ area-top (random area-height))))
- (when (allocatable-p x y)
- (let ((result (try-allocation n x y #'allocatable-p)))
- (when result
- (assert (alexandria:setp result :test #'equal))
- (assert (= n (length result)))
- (return (mapcar (lambda (x-y)
- (destructuring-bind (x y)
- x-y
- (ensure-m2 x y)))
- result))))))))))
+ (dotimes (i 10)
+ (let ((x (+ area-left (random area-width)))
+ (y (+ area-top (random area-height))))
+ (when (allocatable-p x y)
+ (let ((result (try-allocation n x y #'allocatable-p)))
+ (when result
+ (assert (alexandria:setp result :test #'equal))
+ (assert (= n (length result)))
+ (decf (allocation-area-free-m2s area) n)
+ (return-from allocate-in-area
+ (mapcar (lambda (x-y)
+ (destructuring-bind (x y)
+ x-y
+ (ensure-m2 x y)))
+ result))))))))))
(defun allocate-m2s-for-sale (n)
- "The main entry point to the allocation machinery. Will return
- a list of N m2 instances or NIL if the requested amount cannot
- be allocated. Returned m2s will not be allocated
- again (i.e. there are marked as in use) by the allocation
- algorithm, but see RETURN-CONTRACT-M2S."
+ "The main entry point to the allocation machinery. Will return a
+ list of N m2 instances or NIL if the requested amount cannot be
+ allocated."
(dolist (area (active-allocation-areas))
(let ((m2s (allocate-in-area area n)))
- (when m2s (return-from allocate-m2s-for-sale m2s))))
+ (when m2s
+ (return-from allocate-m2s-for-sale m2s))))
(dolist (area (inactive-nonempty-allocation-areas))
(let ((m2s (allocate-in-area area n)))
- (when m2s (return-from allocate-m2s-for-sale m2s)))))
+ (when m2s
+ (activate-allocation-area area)
+ (return-from allocate-m2s-for-sale m2s)))))
(defgeneric return-contract-m2s (m2s)
(:documentation "Mark the given square meters as free, so that
Modified: trunk/projects/bos/test/allocation.lisp
===================================================================
--- trunk/projects/bos/test/allocation.lisp 2008-07-23 18:55:53 UTC (rev 3596)
+++ trunk/projects/bos/test/allocation.lisp 2008-07-23 19:12:54 UTC (rev 3597)
@@ -238,8 +238,7 @@
(m2-counts '(12 43 29 3)))
(declare (ignore area))
(dolist (m2-count m2-counts)
- (let ((contract (make-contract sponsor m2-count)))
- (print (list 'make-contract-returned contract))))
+ (make-contract sponsor m2-count))
;; This following check reported:
;; WARNING: #<CONTRACT ID: 32131, unpaid> has m2s that are not
;; connected
Revision: 3592
Author: edi
URL: http://bknr.net/trac/changeset/3592
Update to dev version
U trunk/thirdparty/cl-interpol/CHANGELOG
D trunk/thirdparty/cl-interpol/README
A trunk/thirdparty/cl-interpol/alias.lisp
U trunk/thirdparty/cl-interpol/cl-interpol.asd
D trunk/thirdparty/cl-interpol/cl-interpol.system
U trunk/thirdparty/cl-interpol/doc/index.html
D trunk/thirdparty/cl-interpol/load.lisp
U trunk/thirdparty/cl-interpol/packages.lisp
U trunk/thirdparty/cl-interpol/read.lisp
U trunk/thirdparty/cl-interpol/specials.lisp
A trunk/thirdparty/cl-interpol/test/
A trunk/thirdparty/cl-interpol/test/create_perl_tests.pl
A trunk/thirdparty/cl-interpol/test/packages.lisp
A trunk/thirdparty/cl-interpol/test/perltests
A trunk/thirdparty/cl-interpol/test/simple
A trunk/thirdparty/cl-interpol/test/tests.lisp
D trunk/thirdparty/cl-interpol/test.lisp
D trunk/thirdparty/cl-interpol/test.pl
D trunk/thirdparty/cl-interpol/test2.lisp
D trunk/thirdparty/cl-interpol/unicode.lisp
U trunk/thirdparty/cl-interpol/util.lisp
Change set too large, please see URL above