From 740a175e569aeaa8c3f10083ecb7d51699e41821 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 8 Sep 2009 17:02:31 -0500 Subject: [PATCH 1/4] duplicate using --- basis/cpu/x86/32/32.factor | 2 -- 1 file changed, 2 deletions(-) diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index ce1993ece4..9939154512 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -295,6 +295,4 @@ os windows? [ 4 "double" c-type (>>align) ] unless -USE: vocabs.loader - "cpu.x86.features" require From 5a7ac3965db72b3bd94cb526278eaf0950a30115 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 8 Sep 2009 17:05:05 -0500 Subject: [PATCH 2/4] use raw pathnames for file-systems word --- basis/io/files/info/windows/windows.factor | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 7ecd46f7e7..27fbae0324 100755 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -129,8 +129,7 @@ ERROR: not-absolute-path ; [ first Letter? ] } 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ; -M: winnt file-system-info ( path -- file-system-info ) - normalize-path root-directory +: (file-system-info) ( path -- file-system-info ) dup [ volume-information ] [ file-system-space ] bi \ win32-file-system-info new swap *ulonglong >>free-space @@ -144,6 +143,9 @@ M: winnt file-system-info ( path -- file-system-info ) swap >>mount-point calculate-file-system-info ; +M: winnt file-system-info ( path -- file-system-info ) + normalize-path root-directory (file-system-info) ; + : volume>paths ( string -- array ) 16384 tuck dup length 0 dup [ GetVolumePathNamesForVolumeName 0 = ] dip swap [ @@ -180,7 +182,7 @@ M: winnt file-system-info ( path -- file-system-info ) M: winnt file-systems ( -- array ) find-volumes [ volume>paths ] map concat [ - [ file-system-info ] + [ (file-system-info) ] [ drop \ file-system-info new swap >>mount-point ] recover ] map ; From 1fc0940b2ac1c012e999d30154795fe2040d3fba Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 8 Sep 2009 17:10:19 -0500 Subject: [PATCH 3/4] make something private --- basis/io/files/info/windows/windows.factor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 27fbae0324..385a1eb196 100755 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -129,6 +129,8 @@ ERROR: not-absolute-path ; [ first Letter? ] } 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ; +>mount-point calculate-file-system-info ; +PRIVATE> + M: winnt file-system-info ( path -- file-system-info ) normalize-path root-directory (file-system-info) ; From 74fa73aeaf35ee586c5dc72c01caf53f4e802930 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 8 Sep 2009 19:18:56 -0500 Subject: [PATCH 4/4] Fix various test failures --- basis/cpu/x86/features/features-tests.factor | 4 ++-- basis/math/vectors/specialization/specialization.factor | 2 +- basis/specialized-arrays/specialized-arrays-tests.factor | 3 ++- basis/ui/gadgets/buttons/buttons.factor | 5 ++++- extra/mason/child/child-tests.factor | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/basis/cpu/x86/features/features-tests.factor b/basis/cpu/x86/features/features-tests.factor index 680e655995..60c4bab8a1 100644 --- a/basis/cpu/x86/features/features-tests.factor +++ b/basis/cpu/x86/features/features-tests.factor @@ -1,7 +1,7 @@ -USING: cpu.x86.features tools.test kernel sequences math system ; +USING: cpu.x86.features tools.test kernel sequences math math.order system ; IN: cpu.x86.features.tests cpu x86? [ - [ t ] [ sse2? { t f } member? ] unit-test + [ t ] [ sse-version 0 42 between? ] unit-test [ t ] [ [ 10000 [ ] times ] count-instructions integer? ] unit-test ] when diff --git a/basis/math/vectors/specialization/specialization.factor b/basis/math/vectors/specialization/specialization.factor index b8c179d9fd..acf8dada38 100644 --- a/basis/math/vectors/specialization/specialization.factor +++ b/basis/math/vectors/specialization/specialization.factor @@ -76,7 +76,7 @@ PREDICATE: vector-word < word vector-words key? ; dup "specializations" word-prop [ ] [ V{ } clone [ "specializations" set-word-prop ] keep ] ?if ; -M: vector-word subwords specializations values ; +M: vector-word subwords specializations values [ word? ] filter ; : add-specialization ( new-word signature word -- ) specializations set-at ; diff --git a/basis/specialized-arrays/specialized-arrays-tests.factor b/basis/specialized-arrays/specialized-arrays-tests.factor index 9ca356506e..19f98ff31f 100755 --- a/basis/specialized-arrays/specialized-arrays-tests.factor +++ b/basis/specialized-arrays/specialized-arrays-tests.factor @@ -2,7 +2,8 @@ IN: specialized-arrays.tests USING: tools.test alien.syntax specialized-arrays sequences specialized-arrays.int specialized-arrays.bool specialized-arrays.ushort alien.c-types accessors kernel -specialized-arrays.char specialized-arrays.uint arrays combinators ; +specialized-arrays.char specialized-arrays.uint +specialized-arrays.float arrays combinators compiler ; [ t ] [ { 1 2 3 } >int-array int-array? ] unit-test diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index 494dc20c05..26cbafc0d5 100644 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -129,8 +129,11 @@ CONSTANT: button-clicked-background COLOR: FactorDarkSlateBlue dup dup ; +: border-button-label-theme ( gadget -- ) + dup label? [ [ clone t >>bold? ] change-font ] when drop ; + : border-button-theme ( gadget -- gadget ) - dup children>> first font>> t >>bold? drop + dup children>> first border-button-label-theme horizontal >>orientation >>interior dup dup interior>> pen-pref-dim >>min-dim diff --git a/extra/mason/child/child-tests.factor b/extra/mason/child/child-tests.factor index 2d5a7c6635..e8e1a9e0e9 100644 --- a/extra/mason/child/child-tests.factor +++ b/extra/mason/child/child-tests.factor @@ -33,7 +33,7 @@ USING: mason.child mason.config tools.test namespaces io kernel sequences ; ] with-scope ] unit-test -[ { "./factor.com" "-i=boot.x86.32.image" "-no-user-init" } ] [ +[ { "./factor.com" "-i=boot.x86.32.image" "-no-user-init" "-sse-version=30" } ] [ [ "winnt" target-os set "x86.32" target-cpu set