From 69487d1fd394546c81de0f8022abfa763d42606f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 25 Oct 2010 19:14:21 -0500 Subject: [PATCH] Fix a few tests that got broken in the *uint patches --- basis/compiler/tests/intrinsics.factor | 15 ++++++++------- basis/compiler/tree/cleanup/cleanup-tests.factor | 9 +++++---- basis/ui/backend/windows/windows.factor | 3 ++- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/basis/compiler/tests/intrinsics.factor b/basis/compiler/tests/intrinsics.factor index 191a7f535b..74d84e0d89 100644 --- a/basis/compiler/tests/intrinsics.factor +++ b/basis/compiler/tests/intrinsics.factor @@ -7,6 +7,7 @@ alien.accessors alien.c-types alien.data alien.syntax alien.strings namespaces libc io.encodings.ascii classes compiler.test ; FROM: math => float ; FROM: alien.c-types => short ; +QUALIFIED-WITH: alien.c-types c IN: compiler.tests.intrinsics ! Make sure that intrinsic ops compile to correct code. @@ -430,14 +431,14 @@ ERROR: bug-in-fixnum* x y a b ; [ ] [ "hello world" ascii malloc-string "s" set ] unit-test "s" get [ - [ "hello world" ] [ "s" get void* deref [ { byte-array } declare void* deref ] compile-call ascii alien>string ] unit-test - [ "hello world" ] [ "s" get void* deref [ { c-ptr } declare void* deref ] compile-call ascii alien>string ] unit-test + [ "hello world" ] [ "s" get void* [ { byte-array } declare void* deref ] compile-call ascii alien>string ] unit-test + [ "hello world" ] [ "s" get void* [ { c-ptr } declare void* deref ] compile-call ascii alien>string ] unit-test [ ] [ "s" get free ] unit-test ] when -[ ALIEN: 1234 ] [ ALIEN: 1234 [ { alien } declare void* deref ] compile-call void* deref ] unit-test -[ ALIEN: 1234 ] [ ALIEN: 1234 [ { c-ptr } declare void* deref ] compile-call void* deref ] unit-test +[ ALIEN: 1234 ] [ ALIEN: 1234 [ { alien } declare void* ] compile-call void* deref ] unit-test +[ ALIEN: 1234 ] [ ALIEN: 1234 [ { c-ptr } declare void* ] compile-call void* deref ] unit-test [ f ] [ f [ { POSTPONE: f } declare void* ] compile-call void* deref ] unit-test [ 252 ] [ B{ 1 2 3 -4 5 } 3 [ { byte-array fixnum } declare alien-unsigned-1 ] compile-call ] unit-test @@ -466,10 +467,10 @@ ERROR: bug-in-fixnum* x y a b ; [ t ] [ pi double [ { byte-array } declare double deref ] compile-call pi = ] unit-test ! Silly -[ t ] [ pi 4 [ [ { float byte-array } declare 0 set-alien-float ] compile-call ] keep float deref pi - -0.001 0.001 between? ] unit-test -[ t ] [ pi float [ { byte-array } declare float deref ] compile-call pi - -0.001 0.001 between? ] unit-test +[ t ] [ pi 4 [ [ { c:float byte-array } declare 0 set-alien-float ] compile-call ] keep c:float deref pi - -0.001 0.001 between? ] unit-test +[ t ] [ pi c:float [ { byte-array } declare c:float deref ] compile-call pi - -0.001 0.001 between? ] unit-test -[ t ] [ pi 8 [ [ { float byte-array } declare 0 set-alien-double ] compile-call ] keep double deref pi = ] unit-test +[ t ] [ pi 8 [ [ { c:float byte-array } declare 0 set-alien-double ] compile-call ] keep double deref pi = ] unit-test [ 4 ] [ 2 B{ 1 2 3 4 5 6 } [ diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index 46255d9fbc..aedab2b40c 100644 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -17,6 +17,7 @@ compiler.tree.propagation.info compiler.tree.checker compiler.tree.debugger ; FROM: math => float ; +QUALIFIED-WITH: alien.c-types c IN: compiler.tree.cleanup.tests [ t ] [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test @@ -244,22 +245,22 @@ cell-bits 32 = [ ] when [ t ] [ - [ B{ 1 0 } short deref 0 number= ] + [ B{ 1 0 } c:short deref 0 number= ] \ number= inlined? ] unit-test [ t ] [ - [ B{ 1 0 } short deref 0 { number number } declare number= ] + [ B{ 1 0 } c:short deref 0 { number number } declare number= ] \ number= inlined? ] unit-test [ t ] [ - [ B{ 1 0 } short deref 0 = ] + [ B{ 1 0 } c:short deref 0 = ] \ number= inlined? ] unit-test [ t ] [ - [ B{ 1 0 } short deref dup number? [ 0 number= ] [ drop f ] if ] + [ B{ 1 0 } c:short deref dup number? [ 0 number= ] [ drop f ] if ] \ number= inlined? ] unit-test diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index 09ba203857..68a0a756a9 100755 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -16,6 +16,7 @@ ui.pixel-formats.private memoize classes colors specialized-arrays classes.struct alien.data ; FROM: namespaces => set ; SPECIALIZED-ARRAY: POINT +QUALIFIED-WITH: alien.c-types c IN: ui.backend.windows SINGLETON: windows-ui-backend @@ -168,7 +169,7 @@ M: windows-ui-backend (pixel-format-attribute) PRIVATE> -: lo-word ( wparam -- lo ) short short deref ; inline +: lo-word ( wparam -- lo ) c:short c:short deref ; inline : hi-word ( wparam -- hi ) -16 shift lo-word ; inline : >lo-hi ( WORD -- array ) [ lo-word ] [ hi-word ] bi 2array ; : GET_APPCOMMAND_LPARAM ( lParam -- appCommand )