[cells-cvs] CVS cells
ktilton
ktilton at common-lisp.net
Sun Apr 13 15:25:00 UTC 2008
Update of /project/cells/cvsroot/cells
In directory clnet:/tmp/cvs-serv8985
Modified Files:
md-slot-value.lisp
Log Message:
minor refinement of *not-to-be* handling
--- /project/cells/cvsroot/cells/md-slot-value.lisp 2008/04/13 10:22:03 1.43
+++ /project/cells/cvsroot/cells/md-slot-value.lisp 2008/04/13 15:25:00 1.44
@@ -77,13 +77,18 @@
(declare (ignorable debug-id ensurer))
(count-it :ensure-value-is-current)
;; (trc c "ensure-value-is-current > entry" c (c-state c) :now-pulse *data-pulse-id* debug-id ensurer)
-
+
(when *not-to-be*
- (return-from ensure-value-is-current (c-value c)))
-
- (when (and (not (symbolp (c-model c)))(eq :eternal-rest (md-state (c-model c))))
+ (when (c-unboundp c)
+ (error 'unbound-cell :cell c :instance (c-model c) :name (c-slot-name c)))
+ (return-from ensure-value-is-current
+ (when (c-validp c) ;; probably accomplishes nothing
+ (c-value c))))
+
+ (when (and (not (symbolp (c-model c))) ;; damn, just here because of playing around with global vars and cells
+ (eq :eternal-rest (md-state (c-model c))))
(break "model ~a of cell ~a is dead" (c-model c) c))
-
+
(cond
((c-currentp c)
(trc nil "EVIC yep: c-currentp" c)) ;; used to follow c-inputp, but I am toying with letting ephemerals (inputs) fall obsolete
@@ -94,7 +99,7 @@
(not (and (typep c 'c-dependent)
(eq (cd-optimize c) :when-value-t)
(null (c-value c))))))
-
+
((or (not (c-validp c))
;;
;; new for 2006-09-21: a cell ended up checking slots of a dead instance, which would have been
@@ -112,26 +117,26 @@
(when (> (c-pulse-last-changed used)(c-pulse c))
#+slow (trc c "used changed and newer !!!!!!" c :oldpulse (c-pulse used) debug-id used :lastchg (c-pulse-last-changed used))
#+shhh (when (trcp c)
- (describe used))
+ (describe used))
t))))))
(assert (typep c 'c-dependent))
(check-reversed (cd-useds c))))
#+shhh (trc c "kicking off calc-set of" (c-state c) (c-validp c) (c-slot-name c) :vstate (c-value-state c)
:stamped (c-pulse c) :current-pulse *data-pulse-id*)
(calculate-and-set c))
-
+
((mdead (c-value c))
(trc nil "ensure-value-is-current> trying recalc of ~a with current but dead value ~a" c (c-value c))
(let ((new-v (calculate-and-set c)))
(trc nil "ensure-value-is-current> GOT new value ~a to replace dead!!" new-v)
new-v))
-
+
(t (trc nil "ensuring current decided current, updating pulse" (c-slot-name c) debug-id)
(c-pulse-update c :valid-uninfluenced)))
-
+
(when (c-unboundp c)
(error 'unbound-cell :cell c :instance (c-model c) :name (c-slot-name c)))
-
+
(bwhen (v (c-value c))
(if (mdead v)
(progn
More information about the Cells-cvs
mailing list