]> gitweb.factorcode.org Git - factor.git/commitdiff
slots: pre-create the "at", "nth", and "global" slots to make deterministic the curre...
authorJoe Groff <arcata@gmail.com>
Mon, 19 Sep 2011 02:00:30 +0000 (19:00 -0700)
committerJoe Groff <arcata@gmail.com>
Mon, 19 Sep 2011 17:03:43 +0000 (10:03 -0700)
39 files changed:
basis/bit-arrays/bit-arrays.factor
basis/checksums/md5/md5.factor
basis/compiler/cfg/dce/dce.factor
basis/compiler/cfg/linear-scan/allocation/state/state.factor
basis/compiler/cfg/linear-scan/linear-scan.factor
basis/compiler/cfg/representations/selection/selection.factor
basis/compiler/cfg/ssa/construction/construction.factor
basis/compiler/cfg/ssa/construction/tdmsc/tdmsc.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic.factor
basis/core-foundation/fsevents/fsevents.factor
basis/disjoint-sets/disjoint-sets.factor
basis/documents/documents.factor
basis/game/input/dinput/dinput.factor
basis/game/input/input.factor
basis/game/input/iokit/iokit.factor
basis/gobject-introspection/gobject-introspection.factor
basis/persistent/vectors/vectors.factor
basis/random/sfmt/sfmt.factor
basis/sequences/product/product.factor
basis/threads/threads.factor
basis/tools/deploy/shaker/shaker.factor
basis/ui/backend/windows/windows.factor
basis/ui/gadgets/tables/tables.factor
basis/ui/ui.factor
basis/unicode/breaks/breaks.factor
core/generic/single/single.factor
core/slots/slots.factor
core/words/words.factor
extra/benchmark/hashtables/hashtables.factor
extra/bloom-filters/bloom-filters.factor
extra/boyer-moore/boyer-moore.factor
extra/bunny/model/model.factor
extra/compiler/graphviz/graphviz.factor
extra/game/worlds/worlds.factor
extra/math/splines/splines.factor
extra/poker/poker.factor
extra/project-euler/common/common.factor
extra/twitter/twitter.factor
extra/wordtimer/wordtimer.factor

index 6097bed4f91f4907f2370e75b873f85657a8f815..70935ebfa71c15a47c39da2f34a420f3cab3e554 100644 (file)
@@ -4,6 +4,7 @@ USING: alien alien.data accessors io.binary math math.bitwise
 alien.accessors kernel kernel.private sequences
 sequences.private byte-arrays parser prettyprint.custom fry
 locals ;
+FROM: sequences.private => change-nth-unsafe ;
 IN: bit-arrays
 
 TUPLE: bit-array
index b2af09b7d59a710e4c7e9017eb4211d425276692..a1cb548e6a4930e3f7a69a3e55b5a922c3f63ce8 100644 (file)
@@ -6,6 +6,7 @@ splitting grouping strings sequences byte-arrays locals
 sequences.private macros fry io.encodings.binary math.bitwise
 checksums accessors checksums.common checksums.stream
 combinators combinators.smart specialized-arrays literals hints ;
+FROM: sequences.private => change-nth-unsafe ;
 SPECIALIZED-ARRAY: uint
 IN: checksums.md5
 
index db41b0c18dd873c8bc1c3dcf9301f8fee7d17977..1a5d2648911051146b1f3cfa007c731cab9dc2d2 100644 (file)
@@ -3,6 +3,7 @@
 USING: accessors arrays assocs kernel namespaces sequences
 compiler.cfg.instructions compiler.cfg.def-use
 compiler.cfg.rpo compiler.cfg.predecessors hash-sets sets ;
+FROM: assocs => change-at ;
 FROM: namespaces => set ;
 IN: compiler.cfg.dce
 
index 827b878d68da89ee66064d69806c66ba32f4fae8..7f98e53688ed6389f99d524427b0684204729006 100644 (file)
@@ -5,6 +5,7 @@ heaps kernel math math.order namespaces layouts sequences vectors
 linked-assocs compiler.cfg compiler.cfg.registers
 compiler.cfg.instructions
 compiler.cfg.linear-scan.live-intervals ;
+FROM: assocs => change-at ;
 IN: compiler.cfg.linear-scan.allocation.state
 
 ! Start index of current live interval. We ensure that all
index 5f1abd31658a8cc03d3abb977e1cf37ad7e0d277..d3ee2f6fbb4ee00fc2b742885fdc2fba9ed1fee0 100644 (file)
@@ -12,6 +12,7 @@ compiler.cfg.linear-scan.allocation
 compiler.cfg.linear-scan.allocation.state
 compiler.cfg.linear-scan.assignment
 compiler.cfg.linear-scan.resolve ;
+FROM: assocs => change-at ;
 IN: compiler.cfg.linear-scan
 
 ! References:
index 330e5d8e2ade70c4d6cfb534937cbe01acc6e874..d0e156f31ea77b84570b62af563532b734c576a8 100644 (file)
@@ -12,6 +12,7 @@ compiler.cfg.rpo
 compiler.cfg.utilities
 compiler.utilities
 cpu.architecture ;
+FROM: assocs => change-at ;
 FROM: namespaces => set ;
 IN: compiler.cfg.representations.selection
 
index 57932253495971b985913078def1c0b8b0da8597..4f156f38d64e131c784bc07eb2b74cd0b77d1fe4 100644 (file)
@@ -11,6 +11,7 @@ compiler.cfg.instructions
 compiler.cfg.renaming
 compiler.cfg.renaming.functor
 compiler.cfg.ssa.construction.tdmsc ;
+FROM: assocs => change-at ;
 FROM: namespaces => set ;
 IN: compiler.cfg.ssa.construction
 
index 4cdc290c41569588420117d878c868ef09f5805e..75d9d80f378ecc46a84c9b7803096cb5b18db5f0 100644 (file)
@@ -4,6 +4,7 @@ USING: accessors arrays assocs bit-arrays bit-sets fry
 hashtables hints kernel locals math namespaces sequences sets
 compiler.cfg compiler.cfg.dominance compiler.cfg.rpo ;
 FROM: namespaces => set ;
+FROM: assocs => change-at ;
 IN: compiler.cfg.ssa.construction.tdmsc
 
 ! TDMSC-I algorithm from "A Practical and Fast Iterative Algorithm for
index 961ce1ecd715fd2822003729540287452b3f33d4..aac165dff92515060b27bb473ef4f8a8281e6eef 100644 (file)
@@ -10,6 +10,7 @@ compiler.tree.def-use
 compiler.tree.def-use.simplified
 compiler.tree.late-optimizations ;
 FROM: namespaces => set ;
+FROM: assocs => change-at ;
 IN: compiler.tree.modular-arithmetic
 
 ! This is a late-stage optimization.
index fd17843bf3dceb3c2eff158edb50b4394d1c30bd..0c91197dee5544725106927817bbe267cc9202a8 100644 (file)
@@ -6,6 +6,7 @@ continuations combinators io.encodings.utf8 destructors locals
 arrays specialized-arrays classes.struct core-foundation
 core-foundation.arrays core-foundation.run-loop
 core-foundation.strings core-foundation.time unix.types ;
+FROM: namespaces => change-global ;
 IN: core-foundation.fsevents
 
 SPECIALIZED-ARRAY: void*
index a158302ecc02117523861f40ab5fc38dfc06c7b7..8332632d0690d38e078cf300bb4fe4ee5fb57035 100644 (file)
@@ -2,6 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays hints kernel locals math hashtables
 assocs fry sequences ;
+FROM: assocs => change-at ;
 IN: disjoint-sets
 
 TUPLE: disjoint-set
index e84a993eeaadfb4058b9422c9f8068da79585374..bdd94824da8d415df58bb3a1cf93d10dc1899b02 100644 (file)
@@ -4,6 +4,7 @@ USING: accessors arrays io kernel math models namespaces make
 sequences strings splitting combinators unicode.categories
 math.order math.ranges fry locals ;
 FROM: models => change-model ;
+FROM: sequences => change-nth ;
 IN: documents
 
 : +col ( loc n -- newloc ) [ first2 ] dip + 2array ;
index fd9d992f138941cb575bb2fbf982d94bc66e2e0f..f38b60844a3061ff066021ab94ebce14e0a8d44e 100755 (executable)
@@ -7,6 +7,7 @@ specialized-arrays ui.backend.windows vectors windows.com
 windows.directx.dinput windows.directx.dinput.constants
 windows.kernel32 windows.messages windows.ole32 windows.errors
 windows.user32 classes.struct ;
+FROM: namespaces => change-global ;
 SPECIALIZED-ARRAY: DIDEVICEOBJECTDATA
 IN: game.input.dinput
 
index eb01e94b992740b9819a688d0cbea7e5f8a1feba..cdbaebcf76e0bb4ed1d7e10484061e3929d9015f 100644 (file)
@@ -1,5 +1,6 @@
 USING: arrays accessors continuations kernel math system
 sequences namespaces init vocabs vocabs.loader combinators ;
+FROM: namespaces => change-global ;
 IN: game.input
 
 SYMBOLS: game-input-backend game-input-opened ;
index 3a953e8babf4993c8143e782bfb27554d4da6ac4..47597b931ede53911b9aa3932d9e0df75cedcbf6 100644 (file)
@@ -6,6 +6,7 @@ namespaces assocs arrays combinators hints alien
 core-foundation.run-loop accessors sequences.private
 alien.c-types alien.data math parser game.input vectors
 bit-arrays unix.types ;
+FROM: namespaces => change-global ;
 IN: game.input.iokit
 
 SINGLETON: iokit-game-input-backend
index 48d8bae4625e4a2ed6b3bdde869735709fe051bd..4973545333110c28c7b7624173d76be1fb52f0e3 100755 (executable)
@@ -5,6 +5,7 @@ gobject-introspection.ffi gobject-introspection.loader
 gobject-introspection.types io io.files io.pathnames kernel lexer
 locals make namespaces parser sequences splitting summary vocabs
 vocabs.parser xml ;
+FROM: namespaces => change-global ;
 IN: gobject-introspection
 
 ERROR: gir-not-found name paths ;
index b02604e9bd8ca02f856a2cd27d1d8c7697cef08a..6b253aef99385aee86c3d8c2919374d990dfc8dd 100644 (file)
@@ -3,6 +3,7 @@
 USING: math accessors kernel sequences.private sequences arrays
 combinators combinators.short-circuit parser prettyprint.custom
 persistent.sequences ;
+FROM: sequences => change-nth ;
 IN: persistent.vectors
 
 <PRIVATE
index 2efe6f6facf96b70b3b32212bc0e7e019d1f141f..730c5b320b7d227fb2968654b9c196ecb065f259 100644 (file)
@@ -4,6 +4,7 @@ USING: accessors alien.c-types alien.data kernel locals math
 math.ranges math.bitwise math.vectors math.vectors.simd random
 sequences specialized-arrays sequences.private classes.struct
 combinators.short-circuit fry ;
+FROM: sequences => change-nth ;
 SPECIALIZED-ARRAY: uint
 SPECIALIZED-ARRAY: uint-4
 IN: random.sfmt
index 487d7b2ecaccc1e8aebb4713f1c7945dc995a3f7..b8865c7e4af2fa226f778e701389989f33bcb9d6 100644 (file)
@@ -1,5 +1,6 @@
 ! (c)2009 Joe Groff bsd license
 USING: accessors arrays assocs kernel locals math sequences ;
+FROM: sequences => change-nth ;
 IN: sequences.product
 
 TUPLE: product-sequence { sequences array read-only } { lengths array read-only } ;
index fe4f2a0f24045a0ff7862ab455669c7349d73f1f..4ab462ff66fe7a13e1ed4ff9c4afe0fa87f37706 100644 (file)
@@ -5,6 +5,7 @@ USING: alien.private arrays hashtables heaps kernel kernel.private
 math namespaces sequences vectors continuations continuations.private
 dlists assocs system combinators init boxes accessors math.order
 deques strings quotations fry ;
+FROM: assocs => change-at ;
 IN: threads
 
 <PRIVATE
index 21148e05ac2a34713fae1f130f80acb9aa682830..89684cf273077ceb95ebe9560175551b7cf58655 100755 (executable)
@@ -22,7 +22,9 @@ QUALIFIED: source-files
 QUALIFIED: source-files.errors
 QUALIFIED: vocabs
 QUALIFIED: vocabs.loader
+FROM: assocs => change-at ;
 FROM: namespaces => set ;
+FROM: sequences => change-nth ;
 FROM: sets => members ;
 IN: tools.deploy.shaker
 
index 9e49a1b0446a6a844e925b934d156f793d8e915f..559a89217e1d71dee8c518b8b5e4ccb44db34de8 100755 (executable)
@@ -14,7 +14,7 @@ accessors math.rectangles math.order calendar ascii sets
 io.encodings.utf16n windows.errors literals ui.pixel-formats
 ui.pixel-formats.private memoize classes colors
 specialized-arrays classes.struct ;
-FROM: namespaces => set ;
+FROM: namespaces => change-global set ;
 SPECIALIZED-ARRAY: POINT
 QUALIFIED-WITH: alien.c-types c
 IN: ui.backend.windows
index f4fee894102268c9d374581de08e522abd5a87f9..9f12eef3c3e562d771e7c62a1ccd87f245e99bea 100644 (file)
@@ -8,6 +8,7 @@ ui.gestures ui.render ui.pens.solid ui.text ui.commands ui.images
 ui.gadgets.menus ui.gadgets.line-support models combinators
 combinators.short-circuit fonts locals splitting strings sets
 sorting ;
+FROM: sequences => change-nth ;
 IN: ui.gadgets.tables
 
 ! Row rendererer protocol
index 68bb064328d1769d501494859b99ce399b026583..47f674bbcdf212c2a3e4ad612c5e52fcf5e3b619 100644 (file)
@@ -7,6 +7,7 @@ destructors dlists fry init kernel lexer make math namespaces
 parser sequences sets strings threads ui.backend ui.gadgets
 ui.gadgets.private ui.gadgets.worlds ui.gestures vocabs.parser
 words ;
+FROM: namespaces => change-global ;
 IN: ui
 
 <PRIVATE
index 13c7d1ac79d1372903c2f64670f149bb5a5231b4..b0943a7f984e0f901c1772ac71fddf8c71a364b5 100644 (file)
@@ -7,6 +7,7 @@ unicode.normalize.private values io.encodings.ascii
 unicode.data compiler.units fry unicode.categories.syntax
 alien.syntax sets accessors interval-maps memoize locals words
 simple-flat-file ;
+FROM: sequences => change-nth ;
 IN: unicode.breaks
 
 <PRIVATE
index 219c52b75e99fb585e5822278d5a8d090f8ee9b3..5599b48fe102a7593328b4dfe9be43897e1b6036 100644 (file)
@@ -5,6 +5,7 @@ combinators definitions generic hashtables kernel
 kernel.private layouts math namespaces quotations
 sequences words generic.single.private effects make
 combinators.private ;
+FROM: assocs => change-at ;
 IN: generic.single
 
 ERROR: no-method object generic ;
index 6c7881b3ad7af9338083598f8cad7e4d0b6376ce..35a459b8882dea41e5bf8289e5d680756aabf665 100644 (file)
@@ -229,3 +229,11 @@ M: slot-spec make-slot
 
 : slot-named ( name specs -- spec/f )
     slot-named* nip ;
+
+! Predefine some slots, because there are change-* words in other vocabs
+! that nondeterministically cause ambiguities when USEd alongside
+! accessors
+
+SLOT: at
+SLOT: nth
+SLOT: global
index e6ed220bc5acb4498c45caad9df00b3c34eb1fb6..46841af079b2f9e1fc0597077dd0b74fc4faadb1 100644 (file)
@@ -4,6 +4,7 @@ USING: accessors arrays definitions kernel kernel.private
 slots.private math namespaces sequences strings vectors sbufs
 quotations assocs hashtables sorting vocabs math.order sets
 words.private ;
+FROM: assocs => change-at ;
 IN: words
 
 : word ( -- word ) \ word get-global ;
index 065ad9c34a4202ad7e05cead99059ebccdf14d86..2ad485b5722bc5cc62728ce3aa08908b3b46b586 100644 (file)
@@ -3,6 +3,7 @@
 USING: accessors assocs combinators kernel locals math
 math.ranges memoize sequences strings hashtables
 math.parser grouping ;
+FROM: assocs => change-at ;
 IN: benchmark.hashtables
 
 MEMO: strings ( -- str )
@@ -72,4 +73,4 @@ M: collision hashcode* value>> hashcode* 15 bitand ;
     ] times
     drop ;
 
-MAIN: hashtable-benchmark
\ No newline at end of file
+MAIN: hashtable-benchmark
index 0f14ed1d975720323e0066f92c7ef4106c35390f..022bac47c64c2cc847e791b3ec42b24bc71e3189 100644 (file)
@@ -6,6 +6,7 @@ IN: bloom-filters
 
 FROM: math.ranges => [1,b] ;
 FROM: math.intervals => (a,b) interval-contains? ;
+FROM: sequences => change-nth ;
 
 /*
 
index aba3f614a12642c7e5bd9e0d55d97603f39545e6..54340a50ba7888d29e610e8d3df213b9011f2db8 100644 (file)
@@ -2,6 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs kernel locals math math.order
 math.ranges sequences sequences.private z-algorithm ;
+FROM: sequences.private => change-nth-unsafe ;
 IN: boyer-moore
 
 <PRIVATE
index 4d3c80cbaa2abf635e40be648770871b098e3870..a82de2044dba560f4a04d9ac5e7ebe11919e92a6 100644 (file)
@@ -3,6 +3,7 @@ http.client io io.encodings.ascii io.files io.files.temp kernel
 locals math math.matrices math.parser math.vectors opengl
 opengl.capabilities opengl.gl opengl.demo-support sequences
 splitting vectors words specialized-arrays ;
+FROM: sequences => change-nth ;
 QUALIFIED-WITH: alien.c-types c
 SPECIALIZED-ARRAY: c:float
 SPECIALIZED-ARRAY: c:uint
index 3e9dbc28491b5efdfca89feb19f75f253ce53e38..0288e1d0abd714c47bff9b7dd4468779d02b580b 100644 (file)
@@ -7,6 +7,7 @@ compiler.cfg.utilities compiler.tree.recursive images.viewer
 images.png io io.encodings.ascii io.files io.files.unique io.launcher
 kernel math.parser sequences assocs arrays make math namespaces
 quotations combinators locals words ;
+FROM: assocs => change-at ;
 IN: compiler.graphviz
 
 : quotes ( str -- str' ) "\"" "\"" surround ;
@@ -138,4 +139,4 @@ SYMBOL: vertex-names
     dup quotation? [ build-tree ] when
     analyze-recursive drop
     [ [ call-graph get call-graph-edges ] "Call graph" graph, ]
-    render-graph ;
\ No newline at end of file
+    render-graph ;
index b327846d942a5eec1c23bf3b5db2309bafef432c..8ce720f983a21dbf08ba2c23fd6008e8f8a88077 100644 (file)
@@ -3,6 +3,7 @@ USING: accessors audio.engine combinators concurrency.promises
 destructors fry game.input game.loop generic kernel math parser
 sequences threads ui ui.gadgets ui.gadgets.worlds ui.gestures
 words words.constant ;
+FROM: namespaces => change-global ;
 IN: game.worlds
 
 TUPLE: game-world < world
index dc22224416e1b5d28e192a90cb9688f4df51df40..530db255221d99c6de0c20ae300cb5ef9602cc00 100644 (file)
@@ -4,6 +4,7 @@ USING: accessors combinators kernel locals math math.combinatorics
 math.polynomials opengl.gl sequences ui.gadgets ui.gadgets.panes
 ui.render arrays grouping math.vectors assocs
 ui.gestures ;
+FROM: sequences => change-nth ;
 IN: math.splines
 
 <PRIVATE
index 75af1b604a0468529b265163b998c239919a365a..9b61a958235506dcca2ceafb3abbdf91679a6831 100644 (file)
@@ -5,6 +5,7 @@ USING: accessors arrays ascii assocs binary-search combinators
 fry kernel locals math math.bitwise math.combinatorics
 math.order math.statistics poker.arrays random sequences
 sequences.product splitting grouping lexer strings ;
+FROM: sequences => change-nth ;
 IN: poker
 
 ! The algorithm used is based on Cactus Kev's Poker Hand Evaluator with
index 7474850f8f1e34bc65fc7ec55122d7b13c2256e3..5b83a7d640747a769010bde818cd927ea2ec8951 100644 (file)
@@ -6,6 +6,7 @@ USING: accessors arrays byte-arrays fry hints kernel lists make math
     math.primes.lists math.primes.miller-rabin math.ranges math.ratios
     namespaces parser prettyprint quotations sequences sorting strings
     unicode.case vocabs vocabs.parser words ;
+FROM: sequences => change-nth ;
 IN: project-euler.common
 
 ! A collection of words used by more than one Project Euler solution
index 81a676ec24589893cc5d26621a16d824733e5048..5cba69d8e30c0f0639e71ff37b89dff63f8732a3 100644 (file)
@@ -3,6 +3,7 @@
 USING: accessors assocs combinators hashtables http
 http.client json.reader kernel macros namespaces sequences
 io.sockets.secure fry oauth urls ;
+FROM: assocs => change-at ;
 IN: twitter
 
 ! Configuration
index abf6a536578fb4372d21e6a7a529a98f7141ce97..6de6a88d616f9849f1df03c55539ae4d9727f7ab 100644 (file)
@@ -1,6 +1,7 @@
 USING: kernel sequences namespaces make math assocs words arrays
 tools.annotations vocabs sorting prettyprint io system
 math.statistics accessors tools.time fry ;
+FROM: namespaces => change-global ;
 IN: wordtimer
 
 SYMBOL: *wordtimes*