More lint cleanups.

db4
John Benediktsson 2011-10-16 19:33:16 -07:00
parent 45aeea52ce
commit 81714b8dc3
14 changed files with 23 additions and 35 deletions

View File

@ -47,9 +47,7 @@ SYMBOL: binary-literal-table
[ add-binary-literal ] dip label-fixup ; [ add-binary-literal ] dip label-fixup ;
: emit-data ( obj label -- ) : emit-data ( obj label -- )
over length align-code over length align-code resolve-label % ;
resolve-label
building get push-all ;
: emit-binary-literals ( -- ) : emit-binary-literals ( -- )
binary-literal-table get [ emit-data ] assoc-each ; binary-literal-table get [ emit-data ] assoc-each ;

View File

@ -2,8 +2,8 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs byte-arrays combinators compiler.cfg.builder USING: accessors assocs byte-arrays combinators compiler.cfg.builder
continuations fry sequences compiler.tree.propagation.info continuations fry sequences compiler.tree.propagation.info
cpu.architecture kernel words make math math.intervals compiler.tree.propagation.nodes cpu.architecture kernel words
math.vectors.simd.intrinsics namespaces ; make math math.intervals math.vectors.simd.intrinsics namespaces ;
IN: compiler.tree.propagation.simd IN: compiler.tree.propagation.simd
CONSTANT: vector>vector-intrinsics CONSTANT: vector>vector-intrinsics
@ -105,7 +105,7 @@ vector>vector-intrinsics [ { byte-array } "default-output-classes" set-word-prop
] "outputs" set-word-prop ] "outputs" set-word-prop
: clone-with-value-infos ( node -- node' ) : clone-with-value-infos ( node -- node' )
clone dup in-d>> [ dup value-info ] H{ } map>assoc >>info ; clone dup in-d>> extract-value-info >>info ;
: try-intrinsic ( node intrinsic-quot -- ? ) : try-intrinsic ( node intrinsic-quot -- ? )
'[ '[

View File

@ -1,7 +1,7 @@
! Copyright (c) 2008 Slava Pestov ! Copyright (c) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel accessors namespaces sequences math.parser USING: kernel accessors namespaces sequences math.parser
calendar validators urls logging html.forms calendar checksums validators urls logging html.forms
http http.server http.server.dispatchers http http.server http.server.dispatchers
furnace.auth furnace.auth
furnace.asides furnace.asides
@ -16,8 +16,7 @@ IN: furnace.auth.login
SYMBOL: permit-id SYMBOL: permit-id
: permit-id-key ( realm -- string ) : permit-id-key ( realm -- string )
[ >hex 2 CHAR: 0 pad-head ] { } map-as concat hex-string "__p_" prepend ;
"__p_" prepend ;
: client-permit-id ( realm -- id/f ) : client-permit-id ( realm -- id/f )
permit-id-key client-state dup [ string>number ] when ; permit-id-key client-state dup [ string>number ] when ;

View File

@ -79,15 +79,15 @@ M: utf8-type parse-const-value drop ;
[ value>> ] [ type>> ] bi parse-const-value ; [ value>> ] [ type>> ] bi parse-const-value ;
: def-const ( const -- ) : def-const ( const -- )
[ c-identifier>> create-in dup reset-generic ] [ c-identifier>> create-function ] [ const-value ] bi
[ const-value ] bi define-constant ; define-constant ;
: def-consts ( consts -- ) : def-consts ( consts -- )
[ def-const ] each ; [ def-const ] each ;
: define-enum-member ( member -- ) : define-enum-member ( member -- )
[ c-identifier>> create-in dup reset-generic ] [ c-identifier>> create-function ] [ value>> ] bi
[ value>> ] bi define-constant ; define-constant ;
: def-enum-type ( enum -- ) : def-enum-type ( enum -- )
[ members>> [ define-enum-member ] each ] [ members>> [ define-enum-member ] each ]

View File

@ -281,7 +281,7 @@ M: lazy-concat nil? ( lazy-concat -- ? )
dup nil? [ dup nil? [
drop nil drop nil
] [ ] [
[ car ] [ cdr ] bi uncons
[ car lcartesian-product ] [ cdr ] bi [ car lcartesian-product ] [ cdr ] bi
list>array swap [ list>array swap [
swap [ swap [ suffix ] with lazy-map ] with lazy-map lconcat swap [ swap [ suffix ] with lazy-map ] with lazy-map lconcat

View File

@ -28,7 +28,7 @@ IN: math.primes
108 max 10000 min <vector> ] keep 108 max 10000 min <vector> ] keep
3 < [ [ 2 swap push ] keep ] when ; 3 < [ [ 2 swap push ] keep ] when ;
: simple? ( n -- ? ) { [ even? ] [ 3 mod 0 = ] [ 5 mod 0 = ] } 1|| ; : simple? ( n -- ? ) { [ even? ] [ 3 divisor? ] [ 5 divisor? ] } 1|| ;
PRIVATE> PRIVATE>

View File

@ -521,7 +521,7 @@ SYMBOL: deploy-vocab
: write-vocab-manifest ( vocab-manifest-out -- ) : write-vocab-manifest ( vocab-manifest-out -- )
"Writing vocabulary manifest to " write dup print flush "Writing vocabulary manifest to " write dup print flush
vocabs "VOCABS:" prefix vocabs "VOCABS:" prefix
deploy-libraries get [ libraries get at path>> ] map members "LIBRARIES:" prefix append deploy-libraries get [ library path>> ] map members "LIBRARIES:" prefix append
swap utf8 set-file-lines ; swap utf8 set-file-lines ;
: prepare-deploy-libraries ( -- ) : prepare-deploy-libraries ( -- )

View File

@ -543,20 +543,14 @@ PRIVATE>
[ last-line# ] dip = ; [ last-line# ] dip = ;
: prev-line-and-this ( document line -- start end ) : prev-line-and-this ( document line -- start end )
swap swap [ drop 1 - 0 2array ] [ line-end ] 2bi ;
[ drop 1 - 0 2array ]
[ [ drop ] [ doc-line length ] 2bi 2array ]
2bi ;
: join-with-prev ( document line -- ) : join-with-prev ( document line -- )
[ prev-line-and-this ] [ drop ] 2bi [ prev-line-and-this ] [ drop ] 2bi
[ join-lines ] change-doc-range ; [ join-lines ] change-doc-range ;
: this-line-and-next ( document line -- start end ) : this-line-and-next ( document line -- start end )
swap swap [ drop 0 2array ] [ [ 1 + ] dip line-end ] 2bi ;
[ drop 0 2array ]
[ [ 1 + ] dip [ drop ] [ doc-line length ] 2bi 2array ]
2bi ;
: join-with-next ( document line -- ) : join-with-next ( document line -- )
[ this-line-and-next ] [ drop ] 2bi [ this-line-and-next ] [ drop ] 2bi

View File

@ -31,7 +31,7 @@ M: incremental pref-dim*
>>loc drop ; >>loc drop ;
: prefer-incremental ( gadget -- ) : prefer-incremental ( gadget -- )
dup forget-pref-dim dup pref-dim >>dim drop ; dup forget-pref-dim prefer ;
M: incremental dim-changed drop ; M: incremental dim-changed drop ;

View File

@ -116,7 +116,7 @@ PRIVATE>
[ 0 = not ] filter ; [ 0 = not ] filter ;
: remove-exclusions ( alist -- alist ) : remove-exclusions ( alist -- alist )
exclusions [ dup ] H{ } map>assoc assoc-diff ; exclusions unique assoc-diff ;
: process-canonical ( data -- hash hash ) : process-canonical ( data -- hash hash )
(process-decomposed) [ first* ] filter (process-decomposed) [ first* ] filter

View File

@ -49,8 +49,7 @@ M: tag [undo-xml] ( tag -- quot: ( tag -- ) )
} cleave '[ _ _ _ tri ] ; } cleave '[ _ _ _ tri ] ;
: firstn-strong ( seq n -- ... ) : firstn-strong ( seq n -- ... )
[ swap length =/fail ] [ assure-length ] [ firstn ] 2bi ; inline
[ firstn ] 2bi ; inline
M: sequence [undo-xml] ( sequence -- quot: ( seq -- ) ) M: sequence [undo-xml] ( sequence -- quot: ( seq -- ) )
remove-blanks [ length ] [ [ [undo-xml] ] { } map-as ] bi remove-blanks [ length ] [ [ [undo-xml] ] { } map-as ] bi

View File

@ -103,9 +103,7 @@ ERROR: escaped-char-expected ;
] if ; ] if ;
: lexer-head? ( string -- ? ) : lexer-head? ( string -- ? )
[ [ lexer get rest-of-line ] dip head? ;
lexer get [ line-text>> ] [ column>> ] bi tail-slice
] dip head? ;
: advance-lexer ( n -- ) : advance-lexer ( n -- )
[ lexer get ] dip [ + ] curry change-column drop ; inline [ lexer get ] dip [ + ] curry change-column drop ; inline

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Slava Pestov, Doug Coleman. ! Copyright (C) 2009 Slava Pestov, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs classes classes.tuple USING: accessors alien.parser arrays assocs classes classes.tuple
effects.parser fry generalizations sequences.generalizations effects.parser fry generalizations sequences.generalizations
generic.standard kernel lexer locals macros parser sequences generic.standard kernel lexer locals macros parser sequences
sets slots vocabs words ; sets slots vocabs words ;
@ -60,7 +60,7 @@ ERROR: unknown-constructor-parameters class effect unknown ;
'[ @ _ [ execute( obj -- obj ) ] each ] effect define-declared ; '[ @ _ [ execute( obj -- obj ) ] each ] effect define-declared ;
: scan-constructor ( -- word class ) : scan-constructor ( -- word class )
scan-word [ name>> "<" ">" surround create-in dup reset-generic ] keep ; scan-word [ name>> "<" ">" surround create-function ] keep ;
: parse-constructor ( -- class word effect def ) : parse-constructor ( -- class word effect def )
scan-constructor complete-effect ensure-constructor-parameters scan-constructor complete-effect ensure-constructor-parameters

View File

@ -435,7 +435,7 @@ MACRO: fortran-invoke ( return library function parameters -- )
bi* <effect> ; bi* <effect> ;
:: define-fortran-function ( return library function parameters -- ) :: define-fortran-function ( return library function parameters -- )
function create-in dup reset-generic function create-function
return library function parameters return [ c:void ] unless* parse-arglist return library function parameters return [ c:void ] unless* parse-arglist
[ \ fortran-invoke 5 [ ] nsequence ] dip define-declared ; [ \ fortran-invoke 5 [ ] nsequence ] dip define-declared ;