From a6c3de58bc2ae5373edd98a5a50d907717705338 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 5 Jul 2008 05:02:44 -0500 Subject: [PATCH 1/2] Tetris is a bit bigger on Windows; that's ok, since its a new addition to size tests --- extra/tools/deploy/deploy-tests.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/tools/deploy/deploy-tests.factor b/extra/tools/deploy/deploy-tests.factor index ebcc924ce2..b66688b63a 100755 --- a/extra/tools/deploy/deploy-tests.factor +++ b/extra/tools/deploy/deploy-tests.factor @@ -37,7 +37,7 @@ namespaces continuations layouts accessors ; [ ] [ "tetris" shake-and-bake ] unit-test -[ t ] [ 1200000 small-enough? ] unit-test +[ t ] [ 1500000 small-enough? ] unit-test [ ] [ "bunny" shake-and-bake ] unit-test From a8b826e8edc1b3a7348983f4cddef616c8a23ddb Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 5 Jul 2008 17:08:01 -0500 Subject: [PATCH 2/2] Fix hang --- core/classes/algebra/algebra-tests.factor | 4 +++- core/classes/algebra/algebra.factor | 3 --- core/classes/intersection/intersection.factor | 3 +++ core/classes/union/union.factor | 3 +++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/classes/algebra/algebra-tests.factor b/core/classes/algebra/algebra-tests.factor index 78da6ee9b3..444cf50e58 100755 --- a/core/classes/algebra/algebra-tests.factor +++ b/core/classes/algebra/algebra-tests.factor @@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint sequences strings tools.test vectors words quotations classes classes.algebra classes.private classes.union classes.mixin classes.predicate vectors definitions source-files compiler.units growable -random inference effects kernel.private sbufs math.order +random inference effects kernel.private sbufs math.order classes.tuple ; IN: classes.algebra.tests @@ -288,6 +288,8 @@ INTERSECTION: generic-class generic class ; generic-class flatten-class ] unit-test +[ \ + flatten-class ] must-fail + INTERSECTION: empty-intersection ; [ t ] [ object empty-intersection class<= ] unit-test diff --git a/core/classes/algebra/algebra.factor b/core/classes/algebra/algebra.factor index 9dbe72d9cb..1076901678 100755 --- a/core/classes/algebra/algebra.factor +++ b/core/classes/algebra/algebra.factor @@ -207,9 +207,6 @@ GENERIC: (flatten-class) ( class -- ) M: anonymous-union (flatten-class) members>> [ (flatten-class) ] each ; -M: word (flatten-class) - normalize-class (flatten-class) ; - : flatten-class ( class -- assoc ) [ (flatten-class) ] H{ } make-assoc ; diff --git a/core/classes/intersection/intersection.factor b/core/classes/intersection/intersection.factor index 5df580d82f..bb7e0adc62 100644 --- a/core/classes/intersection/intersection.factor +++ b/core/classes/intersection/intersection.factor @@ -31,3 +31,6 @@ M: intersection-class rank-class drop 2 ; M: intersection-class instance? "participants" word-prop [ instance? ] with all? ; + +M: intersection-class (flatten-class) + participants (flatten-class) ; diff --git a/core/classes/union/union.factor b/core/classes/union/union.factor index e3deb25e7a..fbb1925363 100755 --- a/core/classes/union/union.factor +++ b/core/classes/union/union.factor @@ -32,3 +32,6 @@ M: union-class rank-class drop 2 ; M: union-class instance? "members" word-prop [ instance? ] with contains? ; + +M: union-class (flatten-class) + members (flatten-class) ;