slots: pre-create the "at", "nth", and "global" slots to make deterministic the currently nondeterministic ambiguity between accessors:change-* and assocs:change-at, sequences:change-nth, and namespaces:change-global
parent
867b5a1178
commit
2bd6de9a02
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 } ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
MAIN: hashtable-benchmark
|
||||
|
|
|
@ -6,6 +6,7 @@ IN: bloom-filters
|
|||
|
||||
FROM: math.ranges => [1,b] ;
|
||||
FROM: math.intervals => (a,b) interval-contains? ;
|
||||
FROM: sequences => change-nth ;
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
render-graph ;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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*
|
||||
|
|
Loading…
Reference in New Issue