More lint cleanups.
parent
45aeea52ce
commit
81714b8dc3
|
@ -47,9 +47,7 @@ SYMBOL: binary-literal-table
|
|||
[ add-binary-literal ] dip label-fixup ;
|
||||
|
||||
: emit-data ( obj label -- )
|
||||
over length align-code
|
||||
resolve-label
|
||||
building get push-all ;
|
||||
over length align-code resolve-label % ;
|
||||
|
||||
: emit-binary-literals ( -- )
|
||||
binary-literal-table get [ emit-data ] assoc-each ;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors assocs byte-arrays combinators compiler.cfg.builder
|
||||
continuations fry sequences compiler.tree.propagation.info
|
||||
cpu.architecture kernel words make math math.intervals
|
||||
math.vectors.simd.intrinsics namespaces ;
|
||||
compiler.tree.propagation.nodes cpu.architecture kernel words
|
||||
make math math.intervals math.vectors.simd.intrinsics namespaces ;
|
||||
IN: compiler.tree.propagation.simd
|
||||
|
||||
CONSTANT: vector>vector-intrinsics
|
||||
|
@ -105,7 +105,7 @@ vector>vector-intrinsics [ { byte-array } "default-output-classes" set-word-prop
|
|||
] "outputs" set-word-prop
|
||||
|
||||
: 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 -- ? )
|
||||
'[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (c) 2008 Slava Pestov
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
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
|
||||
furnace.auth
|
||||
furnace.asides
|
||||
|
@ -16,8 +16,7 @@ IN: furnace.auth.login
|
|||
SYMBOL: permit-id
|
||||
|
||||
: permit-id-key ( realm -- string )
|
||||
[ >hex 2 CHAR: 0 pad-head ] { } map-as concat
|
||||
"__p_" prepend ;
|
||||
hex-string "__p_" prepend ;
|
||||
|
||||
: client-permit-id ( realm -- id/f )
|
||||
permit-id-key client-state dup [ string>number ] when ;
|
||||
|
|
|
@ -79,16 +79,16 @@ M: utf8-type parse-const-value drop ;
|
|||
[ value>> ] [ type>> ] bi parse-const-value ;
|
||||
|
||||
: def-const ( const -- )
|
||||
[ c-identifier>> create-in dup reset-generic ]
|
||||
[ const-value ] bi define-constant ;
|
||||
[ c-identifier>> create-function ] [ const-value ] bi
|
||||
define-constant ;
|
||||
|
||||
: def-consts ( consts -- )
|
||||
[ def-const ] each ;
|
||||
|
||||
: define-enum-member ( member -- )
|
||||
[ c-identifier>> create-in dup reset-generic ]
|
||||
[ value>> ] bi define-constant ;
|
||||
|
||||
[ c-identifier>> create-function ] [ value>> ] bi
|
||||
define-constant ;
|
||||
|
||||
: def-enum-type ( enum -- )
|
||||
[ members>> [ define-enum-member ] each ]
|
||||
[ c-type>> int def-c-type ] bi ;
|
||||
|
|
|
@ -281,7 +281,7 @@ M: lazy-concat nil? ( lazy-concat -- ? )
|
|||
dup nil? [
|
||||
drop nil
|
||||
] [
|
||||
[ car ] [ cdr ] bi
|
||||
uncons
|
||||
[ car lcartesian-product ] [ cdr ] bi
|
||||
list>array swap [
|
||||
swap [ swap [ suffix ] with lazy-map ] with lazy-map lconcat
|
||||
|
|
|
@ -28,7 +28,7 @@ IN: math.primes
|
|||
108 max 10000 min <vector> ] keep
|
||||
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>
|
||||
|
||||
|
|
|
@ -521,7 +521,7 @@ SYMBOL: deploy-vocab
|
|||
: write-vocab-manifest ( vocab-manifest-out -- )
|
||||
"Writing vocabulary manifest to " write dup print flush
|
||||
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 ;
|
||||
|
||||
: prepare-deploy-libraries ( -- )
|
||||
|
|
|
@ -543,20 +543,14 @@ PRIVATE>
|
|||
[ last-line# ] dip = ;
|
||||
|
||||
: prev-line-and-this ( document line -- start end )
|
||||
swap
|
||||
[ drop 1 - 0 2array ]
|
||||
[ [ drop ] [ doc-line length ] 2bi 2array ]
|
||||
2bi ;
|
||||
swap [ drop 1 - 0 2array ] [ line-end ] 2bi ;
|
||||
|
||||
: join-with-prev ( document line -- )
|
||||
[ prev-line-and-this ] [ drop ] 2bi
|
||||
[ join-lines ] change-doc-range ;
|
||||
|
||||
: this-line-and-next ( document line -- start end )
|
||||
swap
|
||||
[ drop 0 2array ]
|
||||
[ [ 1 + ] dip [ drop ] [ doc-line length ] 2bi 2array ]
|
||||
2bi ;
|
||||
swap [ drop 0 2array ] [ [ 1 + ] dip line-end ] 2bi ;
|
||||
|
||||
: join-with-next ( document line -- )
|
||||
[ this-line-and-next ] [ drop ] 2bi
|
||||
|
|
|
@ -31,7 +31,7 @@ M: incremental pref-dim*
|
|||
>>loc drop ;
|
||||
|
||||
: prefer-incremental ( gadget -- )
|
||||
dup forget-pref-dim dup pref-dim >>dim drop ;
|
||||
dup forget-pref-dim prefer ;
|
||||
|
||||
M: incremental dim-changed drop ;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ PRIVATE>
|
|||
[ 0 = not ] filter ;
|
||||
|
||||
: remove-exclusions ( alist -- alist )
|
||||
exclusions [ dup ] H{ } map>assoc assoc-diff ;
|
||||
exclusions unique assoc-diff ;
|
||||
|
||||
: process-canonical ( data -- hash hash )
|
||||
(process-decomposed) [ first* ] filter
|
||||
|
|
|
@ -49,8 +49,7 @@ M: tag [undo-xml] ( tag -- quot: ( tag -- ) )
|
|||
} cleave '[ _ _ _ tri ] ;
|
||||
|
||||
: firstn-strong ( seq n -- ... )
|
||||
[ swap length =/fail ]
|
||||
[ firstn ] 2bi ; inline
|
||||
[ assure-length ] [ firstn ] 2bi ; inline
|
||||
|
||||
M: sequence [undo-xml] ( sequence -- quot: ( seq -- ) )
|
||||
remove-blanks [ length ] [ [ [undo-xml] ] { } map-as ] bi
|
||||
|
|
|
@ -103,9 +103,7 @@ ERROR: escaped-char-expected ;
|
|||
] if ;
|
||||
|
||||
: lexer-head? ( string -- ? )
|
||||
[
|
||||
lexer get [ line-text>> ] [ column>> ] bi tail-slice
|
||||
] dip head? ;
|
||||
[ lexer get rest-of-line ] dip head? ;
|
||||
|
||||
: advance-lexer ( n -- )
|
||||
[ lexer get ] dip [ + ] curry change-column drop ; inline
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (C) 2009 Slava Pestov, Doug Coleman.
|
||||
! 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
|
||||
generic.standard kernel lexer locals macros parser sequences
|
||||
sets slots vocabs words ;
|
||||
|
@ -60,7 +60,7 @@ ERROR: unknown-constructor-parameters class effect unknown ;
|
|||
'[ @ _ [ execute( obj -- obj ) ] each ] effect define-declared ;
|
||||
|
||||
: 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 )
|
||||
scan-constructor complete-effect ensure-constructor-parameters
|
||||
|
|
|
@ -435,7 +435,7 @@ MACRO: fortran-invoke ( return library function parameters -- )
|
|||
bi* <effect> ;
|
||||
|
||||
:: 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
|
||||
[ \ fortran-invoke 5 [ ] nsequence ] dip define-declared ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue