vocabs words ;
IN: bootstrap.image
-: arch ( os cpu -- arch )
+: arch-name ( os cpu -- arch )
2dup [ windows? ] [ ppc? ] bi* or [
[ drop unix ] dip
] unless
[ name>> ] bi@ "-" glue ;
-: my-arch ( -- arch )
- os cpu arch ;
+: my-arch-name ( -- arch )
+ os cpu arch-name ;
: boot-image-name ( arch -- string )
"boot." ".image" surround ;
: my-boot-image-name ( -- string )
- my-arch boot-image-name ;
+ my-arch-name boot-image-name ;
-CONSTANT: image-strings
+CONSTANT: image-names
{
"windows-x86.32" "unix-x86.32"
"windows-x86.64" "unix-x86.64"
] with-variables ;
: make-images ( -- )
- image-strings [ make-image ] each ;
+ image-names [ make-image ] each ;
: make-my-image ( -- )
- my-arch make-image ;
+ my-arch-name make-image ;
: checksums-path ( -- temp ) "checksums.txt" temp-file ;
: boot-image-names ( -- seq )
- images [ boot-image-name ] map ;
+ image-names [ boot-image-name ] map ;
: compute-checksums ( -- )
checksums-path ascii [
USING: tools.test namespaces assocs alien.syntax kernel
compiler.errors accessors alien alien.c-types alien.strings
-debugger literals kernel.private ;
+debugger literals kernel.private alien.libraries ;
IN: compiler.tests.linkage-errors
! Regression: calling an undefined function would raise a protection fault
{ "<img src=\"/icons/class-word.tiff\"/>" } [
[
"text"
- { { image "vocab:definitions/icons/class-word.tiff" } }
+ { { image-style "vocab:definitions/icons/class-word.tiff" } }
format
] make-html-string
] unit-test
IN: io.launcher.unix.tests
: arch-temp-file ( str -- str' )
- "-" my-arch 3append temp-file ;
+ "-" my-arch-name 3append temp-file ;
{ } [
[ "launcher-test-1" arch-temp-file delete-file ] ignore-errors
] { } make ;
: staging-image-name ( profile -- name )
- "-" join "." my-arch 3append
+ "-" join "." my-arch-name 3append
"staging." ".image" surround cache-file ;
: delete-staging-images ( -- )
cache-directory [
[ "staging." head? ] filter
- "." my-arch ".image" 3append [ tail? ] curry filter
+ "." my-arch-name ".image" 3append [ tail? ] curry filter
[ delete-file ] each
] with-directory-files ;
IN: tools.deploy.test
: test-image ( -- str )
- my-arch "test." ".image" surround ;
+ my-arch-name "test." ".image" surround ;
: shake-and-bake ( vocab -- )
[ test-image temp-file delete-file ] ignore-errors
USING: accessors assocs combinators kernel locals math
math.ranges memoize sequences strings hashtables
math.parser grouping ;
+QUALIFIED: assocs
IN: benchmark.hashtables
MEMO: strings ( -- str )
] map drop
keys [
- hash [ 1 + ] change-at
+ hash [ 1 + ] assocs:change-at
] each ;
: string-mix ( hash -- )
compiler.cfg.renaming.functor
compiler.cfg.rpo ;
FROM: namespaces => set ;
+QUALIFIED: assocs
IN: compiler.cfg.gvn.avail
: defined ( bb -- vregs )
keep swap [ available-uses? ] [ drop f ] if ; inline
: make-available ( vreg -- )
- basic-block get avail-ins get [ dupd clone ?set-at ] change-at ;
+ basic-block get avail-ins get [ dupd clone ?set-at ] assocs:change-at ;
RENAMING: >avail [ ] [ dup >avail-vreg swap or ] [ ]
compiler.tree.builder compiler.tree.recursive graphviz.render io
io.encodings.ascii io.files io.files.unique io.launcher kernel
make math math.parser namespaces quotations sequences words ;
+QUALIFIED: assocs
IN: compiler.graphviz
: quotes ( str -- str' ) "\"" "\"" surround ;
: vertex-name ( call-graph-node -- string )
label>> vertex-names get [
word>> name>>
- dup word-counts get [ 0 or 1 + dup ] change-at number>string " #" glue
+ dup word-counts get [ 0 or 1 + dup ] assocs:change-at
+ number>string " #" glue
] cache ;
: vertex-attrs ( obj -- string )
"make" ;
: target-arch ( -- arch )
- target-os get target-cpu get arch ;
+ target-os get target-cpu get arch-name ;
: target-boot-image-name ( -- string )
target-arch boot-image-name ;
: useless-files ( -- seq )
"build-support/cleanup" ascii file-lines
- images [ boot-image-name ] map append
+ image-names [ boot-image-name ] map append
target-os get macosx? [ "Factor.app" suffix ] unless ;
: tidy ( -- )
dup image-path exists? [ drop ] [ make-image ] if ;
: loadable-images ( -- images )
- images cpu name>> '[ _ tail? ] filter ;
+ image-names cpu name>> '[ _ tail? ] filter ;
{ t } [
loadable-images [ [ ?make-image ] each ] [
: backup-boot-image ( -- )
my-boot-image-name
- { "boot." my-arch "-" [ "datestamp" get ] ".image" } to-string
+ { "boot." my-arch-name "-" [ "datestamp" get ] ".image" } to-string
move-file ;
: backup-image ( -- )
".gitignore" delete-file ;
: download-images ( -- )
- images [ boot-image-name download-image ] each ;
+ image-names [ boot-image-name download-image ] each ;
: prepare-source ( git-id -- )
"factor" [