Fix load-everything

db4
Slava Pestov 2008-06-30 16:06:14 -05:00
parent dea3604264
commit 58159095ee
15 changed files with 43 additions and 67 deletions

View File

@ -6,10 +6,5 @@ TUPLE: color red green blue ;
[ T{ color f 1 2 3 } ] [ T{ color f 1 2 3 } ]
[ 1 2 3 [ color boa ] compile-call ] unit-test [ 1 2 3 [ color boa ] compile-call ] unit-test
[ 1 3 ] [
1 2 3 color boa
[ { color-red color-blue } get-slots ] compile-call
] unit-test
[ T{ color f f f f } ] [ T{ color f f f f } ]
[ [ color new ] compile-call ] unit-test [ [ color new ] compile-call ] unit-test

View File

@ -1,4 +1,6 @@
USING: words quotations kernel effects sequences parser ; ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors words quotations kernel effects sequences parser ;
IN: alias IN: alias
PREDICATE: alias < word "alias" word-prop ; PREDICATE: alias < word "alias" word-prop ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2007 Doug Coleman. ! Copyright (C) 2007 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel macros sequences slots words mirrors ; USING: kernel macros sequences slots words classes.tuple ;
IN: classes.tuple.lib IN: classes.tuple.lib
: reader-slots ( seq -- quot ) : reader-slots ( seq -- quot )

View File

@ -1,9 +1,10 @@
! Copyright (C) 2006 Chris Double. ! Copyright (C) 2006 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
! !
USING: kernel math sequences words arrays io io.files namespaces USING: accessors kernel math sequences words arrays io io.files
math.parser assocs quotations parser lexer parser-combinators namespaces math.parser assocs quotations parser lexer
tools.time io.encodings.binary sequences.deep symbols combinators ; parser-combinators tools.time io.encodings.binary sequences.deep
symbols combinators ;
IN: cpu.8080.emulator IN: cpu.8080.emulator
TUPLE: cpu b c d e f h l a pc sp halted? last-interrupt cycles ram ; TUPLE: cpu b c d e f h l a pc sp halted? last-interrupt cycles ram ;

View File

@ -1,8 +1,8 @@
! Copyright (C) 2006 Chris Double. All Rights Reserved. ! Copyright (C) 2006 Chris Double. All Rights Reserved.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel peg strings promises sequences math math.parser USING: accessors kernel peg strings promises sequences math
namespaces words quotations arrays hashtables io math.parser namespaces words quotations arrays hashtables io
io.streams.string assocs memoize ascii peg.parsers ; io.streams.string assocs memoize ascii peg.parsers ;
IN: fjsc IN: fjsc
TUPLE: ast-number value ; TUPLE: ast-number value ;
@ -346,7 +346,7 @@ M: hashtable (parse-factor-quotation) ( object -- ast )
] { } make <ast-hashtable> ; ] { } make <ast-hashtable> ;
M: wrapper (parse-factor-quotation) ( object -- ast ) M: wrapper (parse-factor-quotation) ( object -- ast )
wrapped dup name>> swap vocabulary>> <ast-word> ; wrapped>> dup name>> swap vocabulary>> <ast-word> ;
GENERIC: fjsc-parse ( object -- ast ) GENERIC: fjsc-parse ( object -- ast )

View File

@ -1,8 +1,11 @@
USING: kernel words inspector slots quotations sequences assocs ! Copyright (C) 2007, 2008 Daniel Ehrenberg.
math arrays inference effects shuffle continuations debugger ! See http://factorcode.org/license.txt for BSD license.
classes.tuple namespaces vectors bit-arrays byte-arrays strings USING: accessors kernel words inspector slots quotations
sbufs math.functions macros sequences.private combinators sequences assocs math arrays inference effects shuffle
mirrors combinators.lib combinators.short-circuit ; continuations debugger classes.tuple namespaces vectors
bit-arrays byte-arrays strings sbufs math.functions macros
sequences.private combinators mirrors combinators.lib
combinators.short-circuit ;
IN: inverse IN: inverse
TUPLE: fail ; TUPLE: fail ;
@ -209,7 +212,7 @@ DEFER: _
[ ] like [ drop ] compose ; [ ] like [ drop ] compose ;
: ?wrapped ( object -- wrapped ) : ?wrapped ( object -- wrapped )
dup wrapper? [ wrapped ] when ; dup wrapper? [ wrapped>> ] when ;
: boa-inverse ( class -- quot ) : boa-inverse ( class -- quot )
[ deconstruct-pred ] keep slot-readers compose ; [ deconstruct-pred ] keep slot-readers compose ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2006, 2007 Slava Pestov. ! Copyright (C) 2006, 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs hashtables assocs io kernel math USING: accessors arrays assocs hashtables assocs io kernel math
math.vectors math.matrices math.matrices.elimination namespaces math.vectors math.matrices math.matrices.elimination namespaces
parser prettyprint sequences words combinators math.parser parser prettyprint sequences words combinators math.parser
splitting sorting shuffle symbols sets math.order ; splitting sorting shuffle symbols sets math.order ;

View File

@ -168,7 +168,7 @@ M: method-body crossref?
: <method> ( specializer generic -- word ) : <method> ( specializer generic -- word )
[ method-word-props ] 2keep [ method-word-props ] 2keep
method-word-name f <word> method-word-name f <word>
[ set-word-props ] keep ; swap >>props ;
: with-methods ( word quot -- ) : with-methods ( word quot -- )
over >r >r "multi-methods" word-prop over >r >r "multi-methods" word-prop

View File

@ -1,8 +1,8 @@
! Copyright (C) 2007 Chris Double. ! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel alien alien.strings alien.syntax combinators USING: accessors kernel alien alien.strings alien.syntax
alien.c-types strings sequences namespaces words math threads combinators alien.c-types strings sequences namespaces words
io.encodings.ascii ; math threads io.encodings.ascii ;
IN: odbc IN: odbc
<< "odbc" "odbc32.dll" "stdcall" add-library >> << "odbc" "odbc32.dll" "stdcall" add-library >>

View File

@ -1,28 +0,0 @@
USING: assocs words sequences arrays compiler tools.time
io.styles io prettyprint vocabs kernel sorting generator
optimizer math math.order ;
IN: optimizer.report
: count-optimization-passes ( nodes n -- n )
>r optimize-1
[ r> 1+ count-optimization-passes ] [ drop r> ] if ;
: results ( seq -- )
[ [ second ] prepose compare ] curry sort 20 tail*
print
standard-table-style
[
[ [ [ pprint-cell ] each ] with-row ] each
] tabular-output ;
: optimizer-report ( -- )
all-words [ compiled>> ] filter
[
dup [
word-dataflow nip 1 count-optimization-passes
] benchmark 2array
] { } map>assoc
[ first ] "Worst number of optimizer passes:" results
[ second ] "Worst compile times:" results ;
MAIN: optimizer-report

View File

@ -1,4 +1,4 @@
USING: assocs math kernel shuffle combinators.lib USING: accessors assocs math kernel shuffle combinators.lib
words quotations arrays combinators sequences math.vectors words quotations arrays combinators sequences math.vectors
io.styles prettyprint vocabs sorting io generic locals.private io.styles prettyprint vocabs sorting io generic locals.private
math.statistics math.order ; math.statistics math.order ;
@ -90,7 +90,7 @@ GENERIC: noise ( obj -- pair )
M: word noise badness 1 2array ; M: word noise badness 1 2array ;
M: wrapper noise wrapped noise ; M: wrapper noise wrapped>> noise ;
M: let noise let-body noise ; M: let noise let-body noise ;

View File

@ -1,6 +1,8 @@
USING: assocs words sequences arrays compiler tools.time ! Copyright (C) 2008 Slava Pestov.
io.styles io prettyprint vocabs kernel sorting generator ! See http://factorcode.org/license.txt for BSD license.
optimizer math math.order ; USING: accessors assocs words sequences arrays compiler
tools.time io.styles io prettyprint vocabs kernel sorting
generator optimizer math math.order ;
IN: report.optimizer IN: report.optimizer
: count-optimization-passes ( nodes n -- n ) : count-optimization-passes ( nodes n -- n )

View File

@ -1,9 +1,10 @@
! Copyright (C) 2007, 2008 Slava Pestov. ! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: qualified io.streams.c init fry namespaces assocs kernel USING: accessors qualified io.streams.c init fry namespaces
parser lexer strings.parser tools.deploy.config vocabs sequences assocs kernel parser lexer strings.parser tools.deploy.config
words words.private memory kernel.private continuations io vocabs sequences words words.private memory kernel.private
prettyprint vocabs.loader debugger system strings sets ; continuations io prettyprint vocabs.loader debugger system
strings sets ;
QUALIFIED: bootstrap.stage2 QUALIFIED: bootstrap.stage2
QUALIFIED: classes QUALIFIED: classes
QUALIFIED: command-line QUALIFIED: command-line
@ -62,12 +63,12 @@ IN: tools.deploy.shaker
: strip-word-names ( words -- ) : strip-word-names ( words -- )
"Stripping word names" show "Stripping word names" show
[ f over set-word-name f swap set-vocabulary>> ] each ; [ f >>name f >>vocabulary drop ] each ;
: strip-word-defs ( words -- ) : strip-word-defs ( words -- )
"Stripping symbolic word definitions" show "Stripping symbolic word definitions" show
[ "no-def-strip" word-prop not ] filter [ "no-def-strip" word-prop not ] filter
[ [ ] swap set-word-def ] each ; [ [ ] >>def drop ] each ;
: strip-word-props ( stripped-props words -- ) : strip-word-props ( stripped-props words -- )
"Stripping word properties" show "Stripping word properties" show
@ -76,7 +77,7 @@ IN: tools.deploy.shaker
props>> swap props>> swap
'[ drop , member? not ] assoc-filter '[ drop , member? not ] assoc-filter
f assoc-like f assoc-like
] keep set-word-props ] keep (>>props)
] with each ; ] with each ;
: stripped-word-props ( -- seq ) : stripped-word-props ( -- seq )

View File

@ -2,7 +2,7 @@
! Thanks to Mackenzie Straight for the idea ! Thanks to Mackenzie Straight for the idea
USING: kernel parser lexer words namespaces sequences quotations ; USING: accessors kernel parser lexer words namespaces sequences quotations ;
IN: vars IN: vars

View File

@ -1,4 +1,4 @@
USING: xmode.tokens xmode.keyword-map kernel USING: accessors xmode.tokens xmode.keyword-map kernel
sequences vectors assocs strings memoize regexp unicode.case ; sequences vectors assocs strings memoize regexp unicode.case ;
IN: xmode.rules IN: xmode.rules