Merge branch 'master' of factorcode.org:/git/factor

db4
Joe Groff 2011-07-29 13:24:30 -07:00
commit c690378674
9 changed files with 29 additions and 24 deletions

View File

@ -16,7 +16,7 @@ M: vim vim-command
] { } make ; ] { } make ;
: vim ( file line -- ) : vim ( file line -- )
vim-command run-detached drop ; vim-command run-process drop ;
"vim" vim-path set-global "vim" vim-path set-global
[ vim ] edit-hook set-global [ vim ] edit-hook set-global

View File

@ -8,6 +8,7 @@ arrays words quotations accessors math.parser backtrack assocs ;
IN: 24-game IN: 24-game
SYMBOL: commands SYMBOL: commands
: nop ( -- ) ; : nop ( -- ) ;
: spin ( a b c -- c b a ) swapd swap swap ;
: do-something ( a b -- c ) { + - * } amb-execute ; : do-something ( a b -- c ) { + - * } amb-execute ;
: maybe-swap ( a b -- a b ) { nop swap } amb-execute ; : maybe-swap ( a b -- a b ) { nop swap } amb-execute ;
: some-rots ( a b c -- a b c ) : some-rots ( a b c -- a b c )

View File

@ -1,26 +1,27 @@
IN: mason.child.tests IN: mason.child.tests
USING: mason.child mason.config tools.test namespaces io kernel sequences ; USING: mason.child mason.config tools.test namespaces io kernel
sequences system ;
[ { "nmake" "/f" "nmakefile" "x86-32" } ] [ [ { "nmake" "/f" "nmakefile" "x86-32" } ] [
[ [
"winnt" target-os set winnt target-os set
"x86.32" target-cpu set x86.32 target-cpu set
make-cmd make-cmd
] with-scope ] with-scope
] unit-test ] unit-test
[ { "make" "macosx-x86-32" } ] [ [ { "make" "macosx-x86-32" } ] [
[ [
"macosx" target-os set macosx target-os set
"x86.32" target-cpu set x86.32 target-cpu set
make-cmd make-cmd
] with-scope ] with-scope
] unit-test ] unit-test
[ { "./factor.com" "-i=boot.winnt-x86.32.image" "-no-user-init" } ] [ [ { "./factor.com" "-i=boot.winnt-x86.32.image" "-no-user-init" } ] [
[ [
"winnt" target-os set winnt target-os set
"x86.32" target-cpu set x86.32 target-cpu set
boot-cmd boot-cmd
] with-scope ] with-scope
] unit-test ] unit-test

View File

@ -9,14 +9,14 @@ IN: mason.child
: nmake-cmd ( -- args ) : nmake-cmd ( -- args )
{ "nmake" "/f" "nmakefile" } { "nmake" "/f" "nmakefile" }
target-cpu get "." split "-" join suffix ; target-cpu get name>> "." split "-" join suffix ;
: gnu-make-cmd ( -- args ) : gnu-make-cmd ( -- args )
gnu-make platform 2array ; gnu-make platform 2array ;
: make-cmd ( -- args ) : make-cmd ( -- args )
{ {
{ [ target-os get "winnt" = ] [ nmake-cmd ] } { [ target-os get winnt = ] [ nmake-cmd ] }
[ gnu-make-cmd ] [ gnu-make-cmd ]
} cond ; } cond ;
@ -30,7 +30,7 @@ IN: mason.child
] with-directory ; ] with-directory ;
: factor-vm ( -- string ) : factor-vm ( -- string )
target-os get "winnt" = "./factor.com" "./factor" ? ; target-os get winnt = "./factor.com" "./factor" ? ;
: boot-cmd ( -- cmd ) : boot-cmd ( -- cmd )
[ [

View File

@ -1,10 +1,11 @@
IN: mason.email.tests IN: mason.email.tests
USING: mason.email mason.common mason.config namespaces tools.test ; USING: mason.email mason.common mason.config namespaces
tools.test system ;
[ "mason on linux-x86-64: 12345 -- error" ] [ [ "mason on linux-x86-64: 12345 -- error" ] [
[ [
"linux" target-os set linux target-os set
"x86.64" target-cpu set x86.64 target-cpu set
"12345" current-git-id set "12345" current-git-id set
status-error report-subject status-error report-subject
] with-scope ] with-scope

View File

@ -5,13 +5,14 @@ mason.config bootstrap.image assocs ;
IN: mason.platform IN: mason.platform
: (platform) ( os cpu -- string ) : (platform) ( os cpu -- string )
[ name>> ] bi@
{ { CHAR: . CHAR: - } } substitute "-" glue ; { { CHAR: . CHAR: - } } substitute "-" glue ;
: platform ( -- string ) : platform ( -- string )
target-os get target-cpu get (platform) ; target-os get target-cpu get (platform) ;
: gnu-make ( -- string ) : gnu-make ( -- string )
target-os get { "freebsd" "openbsd" "netbsd" } member? "gmake" "make" ? ; target-os get { freebsd openbsd netbsd } member? "gmake" "make" ? ;
: boot-image-arch ( -- string ) : boot-image-arch ( -- string )
target-os get target-cpu get arch ; target-os get target-cpu get arch ;

View File

@ -1,13 +1,14 @@
IN: mason.release.branch.tests IN: mason.release.branch.tests
USING: mason.release.branch mason.config tools.test namespaces ; USING: mason.release.branch mason.config tools.test namespaces
system ;
[ { "git" "push" "-f" "joe@blah.com:/my/git" "master:clean-linux-x86-32" } ] [ [ { "git" "push" "-f" "joe@blah.com:/my/git" "master:clean-linux-x86-32" } ] [
[ [
"joe" branch-username set "joe" branch-username set
"blah.com" branch-host set "blah.com" branch-host set
"/my/git" branch-directory set "/my/git" branch-directory set
"linux" target-os set linux target-os set
"x86.32" target-cpu set x86.32 target-cpu set
push-to-clean-branch-cmd push-to-clean-branch-cmd
] with-scope ] with-scope
] unit-test ] unit-test
@ -18,8 +19,8 @@ USING: mason.release.branch mason.config tools.test namespaces ;
"joe" image-username set "joe" image-username set
"blah.com" image-host set "blah.com" image-host set
"/stuff/clean" image-directory set "/stuff/clean" image-directory set
"netbsd" target-os set netbsd target-os set
"x86.64" target-cpu set x86.64 target-cpu set
upload-clean-image-cmd upload-clean-image-cmd
] with-scope ] with-scope
] unit-test ] unit-test

View File

@ -136,7 +136,7 @@ GENERIC: avl-delete ( key node -- node shorter? deleted? )
M: f avl-delete ( key f -- f f f ) nip f f ; M: f avl-delete ( key f -- f f f ) nip f f ;
: (avl-delete) ( key node -- node shorter? deleted? ) : (avl-delete) ( key node -- node shorter? deleted? )
tuck node-link avl-delete [ swap over node-link avl-delete [
[ over set-node-link ] dip [ balance-delete ] [ f ] if [ over set-node-link ] dip [ balance-delete ] [ f ] if
] dip ; ] dip ;

View File

@ -14,7 +14,7 @@ else
LIBS = -lm -framework Cocoa -framework AppKit LIBS = -lm -framework Cocoa -framework AppKit
endif endif
LINKER = $(CPP) $(CFLAGS) -dynamiclib -single_module -std=gnu99 \ LINKER = $(CPP) $(CFLAGS) -dynamiclib -single_module \
-current_version $(VERSION) \ -current_version $(VERSION) \
-compatibility_version $(VERSION) \ -compatibility_version $(VERSION) \
-fvisibility=hidden \ -fvisibility=hidden \