diff --git a/core/compiler/tests/tuples.factor b/core/compiler/tests/tuples.factor index 080e4ff630..602b438432 100755 --- a/core/compiler/tests/tuples.factor +++ b/core/compiler/tests/tuples.factor @@ -6,10 +6,5 @@ TUPLE: color red green blue ; [ T{ color f 1 2 3 } ] [ 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 } ] [ [ color new ] compile-call ] unit-test diff --git a/extra/alias/alias.factor b/extra/alias/alias.factor index a07c981b97..4de4d833fa 100755 --- a/extra/alias/alias.factor +++ b/extra/alias/alias.factor @@ -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 PREDICATE: alias < word "alias" word-prop ; diff --git a/extra/classes/tuple/lib/lib.factor b/extra/classes/tuple/lib/lib.factor index 10261a1df7..fbc3afe76c 100755 --- a/extra/classes/tuple/lib/lib.factor +++ b/extra/classes/tuple/lib/lib.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2007 Doug Coleman. ! 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 : reader-slots ( seq -- quot ) diff --git a/extra/cpu/8080/emulator/emulator.factor b/extra/cpu/8080/emulator/emulator.factor index d8f58d31ab..ca650a4f01 100755 --- a/extra/cpu/8080/emulator/emulator.factor +++ b/extra/cpu/8080/emulator/emulator.factor @@ -1,9 +1,10 @@ ! Copyright (C) 2006 Chris Double. ! See http://factorcode.org/license.txt for BSD license. ! -USING: kernel math sequences words arrays io io.files namespaces -math.parser assocs quotations parser lexer parser-combinators -tools.time io.encodings.binary sequences.deep symbols combinators ; +USING: accessors kernel math sequences words arrays io io.files +namespaces math.parser assocs quotations parser lexer +parser-combinators tools.time io.encodings.binary sequences.deep +symbols combinators ; IN: cpu.8080.emulator TUPLE: cpu b c d e f h l a pc sp halted? last-interrupt cycles ram ; diff --git a/extra/fjsc/fjsc.factor b/extra/fjsc/fjsc.factor index 5395997acc..ec3d92f78b 100755 --- a/extra/fjsc/fjsc.factor +++ b/extra/fjsc/fjsc.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2006 Chris Double. All Rights Reserved. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel peg strings promises sequences math math.parser - namespaces words quotations arrays hashtables io - io.streams.string assocs memoize ascii peg.parsers ; +USING: accessors kernel peg strings promises sequences math +math.parser namespaces words quotations arrays hashtables io +io.streams.string assocs memoize ascii peg.parsers ; IN: fjsc TUPLE: ast-number value ; @@ -346,7 +346,7 @@ M: hashtable (parse-factor-quotation) ( object -- ast ) ] { } make ; M: wrapper (parse-factor-quotation) ( object -- ast ) - wrapped dup name>> swap vocabulary>> ; + wrapped>> dup name>> swap vocabulary>> ; GENERIC: fjsc-parse ( object -- ast ) diff --git a/extra/inverse/inverse.factor b/extra/inverse/inverse.factor index d6c3d633b2..97d4ae9b3b 100755 --- a/extra/inverse/inverse.factor +++ b/extra/inverse/inverse.factor @@ -1,8 +1,11 @@ -USING: kernel words inspector slots quotations sequences assocs -math arrays inference effects shuffle continuations debugger -classes.tuple namespaces vectors bit-arrays byte-arrays strings -sbufs math.functions macros sequences.private combinators -mirrors combinators.lib combinators.short-circuit ; +! Copyright (C) 2007, 2008 Daniel Ehrenberg. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors kernel words inspector slots quotations +sequences assocs math arrays inference effects shuffle +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 TUPLE: fail ; @@ -209,7 +212,7 @@ DEFER: _ [ ] like [ drop ] compose ; : ?wrapped ( object -- wrapped ) - dup wrapper? [ wrapped ] when ; + dup wrapper? [ wrapped>> ] when ; : boa-inverse ( class -- quot ) [ deconstruct-pred ] keep slot-readers compose ; diff --git a/extra/koszul/koszul.factor b/extra/koszul/koszul.factor index dce589dc9e..a8edf6917f 100755 --- a/extra/koszul/koszul.factor +++ b/extra/koszul/koszul.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2006, 2007 Slava Pestov. ! 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 parser prettyprint sequences words combinators math.parser splitting sorting shuffle symbols sets math.order ; diff --git a/extra/multi-methods/multi-methods.factor b/extra/multi-methods/multi-methods.factor index 96a03bd806..c8128c33ee 100755 --- a/extra/multi-methods/multi-methods.factor +++ b/extra/multi-methods/multi-methods.factor @@ -168,7 +168,7 @@ M: method-body crossref? : ( specializer generic -- word ) [ method-word-props ] 2keep method-word-name f - [ set-word-props ] keep ; + swap >>props ; : with-methods ( word quot -- ) over >r >r "multi-methods" word-prop diff --git a/extra/odbc/odbc.factor b/extra/odbc/odbc.factor index 17eab5b0a4..5faca7109a 100644 --- a/extra/odbc/odbc.factor +++ b/extra/odbc/odbc.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2007 Chris Double. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel alien alien.strings alien.syntax combinators -alien.c-types strings sequences namespaces words math threads -io.encodings.ascii ; +USING: accessors kernel alien alien.strings alien.syntax +combinators alien.c-types strings sequences namespaces words +math threads io.encodings.ascii ; IN: odbc << "odbc" "odbc32.dll" "stdcall" add-library >> diff --git a/extra/optimizer/report/report.factor b/extra/optimizer/report/report.factor deleted file mode 100755 index 037427c6a9..0000000000 --- a/extra/optimizer/report/report.factor +++ /dev/null @@ -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 diff --git a/extra/reports/noise/noise.factor b/extra/reports/noise/noise.factor index e59d48d439..32a43a4fb4 100755 --- a/extra/reports/noise/noise.factor +++ b/extra/reports/noise/noise.factor @@ -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 io.styles prettyprint vocabs sorting io generic locals.private math.statistics math.order ; @@ -90,7 +90,7 @@ GENERIC: noise ( obj -- pair ) M: word noise badness 1 2array ; -M: wrapper noise wrapped noise ; +M: wrapper noise wrapped>> noise ; M: let noise let-body noise ; diff --git a/extra/reports/optimizer/optimizer.factor b/extra/reports/optimizer/optimizer.factor index 4ab75d5f4c..5016371052 100755 --- a/extra/reports/optimizer/optimizer.factor +++ b/extra/reports/optimizer/optimizer.factor @@ -1,6 +1,8 @@ -USING: assocs words sequences arrays compiler tools.time -io.styles io prettyprint vocabs kernel sorting generator -optimizer math math.order ; +! Copyright (C) 2008 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors assocs words sequences arrays compiler +tools.time io.styles io prettyprint vocabs kernel sorting +generator optimizer math math.order ; IN: report.optimizer : count-optimization-passes ( nodes n -- n ) diff --git a/extra/tools/deploy/shaker/shaker.factor b/extra/tools/deploy/shaker/shaker.factor index d03d3142f7..ba37784b11 100755 --- a/extra/tools/deploy/shaker/shaker.factor +++ b/extra/tools/deploy/shaker/shaker.factor @@ -1,9 +1,10 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: qualified io.streams.c init fry namespaces assocs kernel -parser lexer strings.parser tools.deploy.config vocabs sequences -words words.private memory kernel.private continuations io -prettyprint vocabs.loader debugger system strings sets ; +USING: accessors qualified io.streams.c init fry namespaces +assocs kernel parser lexer strings.parser tools.deploy.config +vocabs sequences words words.private memory kernel.private +continuations io prettyprint vocabs.loader debugger system +strings sets ; QUALIFIED: bootstrap.stage2 QUALIFIED: classes QUALIFIED: command-line @@ -62,12 +63,12 @@ IN: tools.deploy.shaker : strip-word-names ( words -- ) "Stripping word names" show - [ f over set-word-name f swap set-vocabulary>> ] each ; + [ f >>name f >>vocabulary drop ] each ; : strip-word-defs ( words -- ) "Stripping symbolic word definitions" show [ "no-def-strip" word-prop not ] filter - [ [ ] swap set-word-def ] each ; + [ [ ] >>def drop ] each ; : strip-word-props ( stripped-props words -- ) "Stripping word properties" show @@ -76,7 +77,7 @@ IN: tools.deploy.shaker props>> swap '[ drop , member? not ] assoc-filter f assoc-like - ] keep set-word-props + ] keep (>>props) ] with each ; : stripped-word-props ( -- seq ) diff --git a/extra/vars/vars.factor b/extra/vars/vars.factor index 243cdee2a9..7316cd6a6d 100644 --- a/extra/vars/vars.factor +++ b/extra/vars/vars.factor @@ -2,7 +2,7 @@ ! 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 diff --git a/extra/xmode/rules/rules.factor b/extra/xmode/rules/rules.factor index 42bbce1d12..3fcae02a54 100755 --- a/extra/xmode/rules/rules.factor +++ b/extra/xmode/rules/rules.factor @@ -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 ; IN: xmode.rules