Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2009-03-13 01:25:50 -05:00
commit 68b113d653
4 changed files with 21 additions and 11 deletions

View File

@ -7,7 +7,7 @@ sorting assocs definitions prettyprint io inspector
classes.tuple classes.union classes.predicate debugger
threads.private io.streams.string io.timeouts io.thread
sequences.private destructors combinators eval locals.backend
system ;
system compiler.units ;
IN: stack-checker.tests
\ infer. must-infer
@ -580,4 +580,11 @@ DEFER: eee'
[ [ ] debugging-curry-folding ] must-infer
[ [ exit ] [ 1 2 3 ] if ] must-infer
[ [ exit ] [ 1 2 3 ] if ] must-infer
! Stack effects are required now but FORGET: clears them...
: forget-test ( -- ) ;
[ forget-test ] must-infer
[ ] [ [ \ forget-test forget ] with-compilation-unit ] unit-test
[ forget-test ] must-infer

View File

@ -42,8 +42,11 @@ PREDICATE: class < word "class" word-prop ;
PREDICATE: predicate < word "predicating" word-prop >boolean ;
M: predicate forget*
[ call-next-method ] [ f "predicating" set-word-prop ] bi ;
M: predicate reset-word
[ call-next-method ] [ { "predicating" } reset-props ] bi ;
[ call-next-method ] [ f "predicating" set-word-prop ] bi ;
: define-predicate ( class quot -- )
[ "predicate" word-prop first ] dip

View File

@ -55,18 +55,18 @@ GENERIC: testing
[ f ] [ \ testing generic? ] unit-test
: forgotten ;
: another-forgotten ;
: forgotten ( -- ) ;
: another-forgotten ( -- ) ;
FORGET: forgotten
FORGET: another-forgotten
: another-forgotten ;
: another-forgotten ( -- ) ;
! I forgot remove-crossref calls!
: fee ;
: foe fee ;
: fie foe ;
: fee ( -- ) ;
: foe ( -- ) fee ;
: fie ( -- ) foe ;
[ t ] [ \ fee usage [ word? ] filter empty? ] unit-test
[ t ] [ \ foe usage empty? ] unit-test
@ -97,7 +97,7 @@ DEFER: calls-a-gensym
! more xref buggery
[ f ] [
GENERIC: xyzzle ( x -- x )
: a ; \ a
: a ( -- ) ; \ a
M: integer xyzzle a ;
FORGET: a
M: object xyzzle ;

View File

@ -248,7 +248,7 @@ M: word forget*
dup "forgotten" word-prop [ drop ] [
[ delete-xref ]
[ [ name>> ] [ vocabulary>> vocab-words ] bi delete-at ]
[ [ reset-word ] [ t "forgotten" set-word-prop ] bi ]
[ t "forgotten" set-word-prop ]
tri
] if ;