diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 543828e71c..d7b0e0db9f 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -65,8 +65,6 @@ - intrinsic char-slot set-char-slot integer-slot set-integer-slot - [ [ dup call ] dup call ] infer hangs - declarations - displaced, register and other predicates need to inherit from list - not cons, and need stronger branch partial eval - optimize away arithmetic dispatch - the invalid recursion form case needs to be fixed, for inlines too - #jump-f #jump-f-label @@ -83,6 +81,7 @@ + kernel: +- clear "predicating" word prop when redefining words - there is a problem with hashcodes of words and bootstrapping - delegating generic words with a non-standard picker - powerpc has weird callstack residue diff --git a/library/collections/sequences-epilogue.factor b/library/collections/sequences-epilogue.factor index f146237939..6e19104fe1 100644 --- a/library/collections/sequences-epilogue.factor +++ b/library/collections/sequences-epilogue.factor @@ -96,7 +96,7 @@ M: object find ( seq quot -- i elt ) : subset-with ( obj seq quot -- seq | quot: obj elt -- ? ) swap [ with rot ] subset 2nip ; inline -: fiber? ( seq quot -- ? | quot: elt elt -- ? ) +: every? ( seq quot -- ? | quot: elt elt -- ? ) #! Tests if all elements are equivalent under the relation. over empty? [ 2drop t ] [ >r [ first ] keep r> all-with? ] ifte ; inline diff --git a/library/httpd/html.factor b/library/httpd/html.factor index 50088a0c9b..65aeb0acec 100644 --- a/library/httpd/html.factor +++ b/library/httpd/html.factor @@ -13,9 +13,6 @@ presentation sequences strings styles unparser words ; [[ CHAR: " """ ]] ] ; -: char>entity ( ch -- str ) - dup >r html-entities assoc dup r> ? ; - : chars>entities ( str -- str ) #! Convert <, >, &, ' and " to HTML entities. [ diff --git a/library/inference/branches.factor b/library/inference/branches.factor index 6b25e6e3f7..d4df13cc91 100644 --- a/library/inference/branches.factor +++ b/library/inference/branches.factor @@ -13,7 +13,7 @@ namespaces prettyprint sequences strings vectors words ; : unify-results ( seq -- value ) #! If all values in list are equal, return the value. #! Otherwise, unify. - dup [ eq? ] fiber? [ first ] [ ] ifte ; + dup [ eq? ] every? [ first ] [ ] ifte ; : unify-stacks ( seq -- stack ) #! Replace differing literals in stacks with unknown @@ -21,7 +21,7 @@ namespaces prettyprint sequences strings vectors words ; unify-lengths seq-transpose [ unify-results ] map ; : balanced? ( in out -- ? ) - [ swap length swap length - ] 2map [ = ] fiber? ; + [ swap length swap length - ] 2map [ = ] every? ; : unify-effect ( in out -- in out ) 2dup balanced? diff --git a/library/inference/class-infer.factor b/library/inference/class-infer.factor index 6ffe9185bc..39524f0d3f 100644 --- a/library/inference/class-infer.factor +++ b/library/inference/class-infer.factor @@ -88,7 +88,7 @@ M: node child-ties ( node -- seq ) M: #call infer-classes* ( node -- ) dup create-ties dup node-param "infer-effect" word-prop 2unseq - pick node-out-d assume-classes + pick node-out-d intersect-classes swap node-in-d intersect-classes ; M: #push infer-classes* ( node -- ) diff --git a/library/inference/optimizer.factor b/library/inference/optimizer.factor index 4226ee19e2..ef1b788d6c 100644 --- a/library/inference/optimizer.factor +++ b/library/inference/optimizer.factor @@ -232,7 +232,7 @@ M: #values can-kill* ( literal node -- ? ) dupd uses-value? [ branch-returns get [ memq? ] subset-with - [ [ eq? ] fiber? ] all? + [ [ eq? ] every? ] all? ] [ drop t ] ifte ; diff --git a/library/io/stream.factor b/library/io/stream.factor index 94af037e41..daf910c9ad 100644 --- a/library/io/stream.factor +++ b/library/io/stream.factor @@ -56,4 +56,4 @@ C: wrapper-stream ( stream -- stream ) ] keep ; : with-wrapper ( stream quot -- ) - >r wrapper-stream-scope r> bind ; + >r wrapper-stream-scope r> bind ; inline diff --git a/library/syntax/prettyprint.factor b/library/syntax/prettyprint.factor index 02d311c22d..cb7b5f38df 100644 --- a/library/syntax/prettyprint.factor +++ b/library/syntax/prettyprint.factor @@ -77,7 +77,7 @@ M: word prettyprint* ( indent word -- indent ) over recursion-check [ cons ] change call recursion-check [ cdr ] change - ] ifte ; + ] ifte ; inline : prettyprint-sequence ( indent start list end -- indent ) #! Prettyprint a list, with start/end delimiters; eg, [ ], diff --git a/library/test/lists/combinators.factor b/library/test/lists/combinators.factor index 60f56e6273..42fda0e9e5 100644 --- a/library/test/lists/combinators.factor +++ b/library/test/lists/combinators.factor @@ -16,10 +16,10 @@ USE: sequences [ [ "2 + 2" ] ] [ [ "2 + 2" ] [ lexi> ] sort ] unit-test [ [ 1 2 3 4 5 6 7 ] ] [ [ 6 4 5 7 2 1 3 ] [ > ] sort ] unit-test -[ f ] [ [ { } { } "Hello" ] [ = ] fiber? ] unit-test -[ f ] [ [ { 2 } { } { } ] [ = ] fiber? ] unit-test -[ t ] [ [ ] [ = ] fiber? ] unit-test -[ t ] [ [ 1/2 ] [ = ] fiber? ] unit-test -[ t ] [ [ 1.0 10/10 1 ] [ = ] fiber? ] unit-test +[ f ] [ [ { } { } "Hello" ] [ = ] every? ] unit-test +[ f ] [ [ { 2 } { } { } ] [ = ] every? ] unit-test +[ t ] [ [ ] [ = ] every? ] unit-test +[ t ] [ [ 1/2 ] [ = ] every? ] unit-test +[ t ] [ [ 1.0 10/10 1 ] [ = ] every? ] unit-test [ [ 2 3 4 ] ] [ 1 [ 1 2 3 ] [ + ] map-with ] unit-test