Merge git://factorcode.org/git/factor

release
Doug Coleman 2007-11-07 20:29:49 -06:00
commit 4acdb01afc
5 changed files with 18 additions and 7 deletions

View File

@ -64,3 +64,7 @@ cell 8 = [
[ 0 B{ 1 2 3 } <displaced-alien> alien-address ] unit-test-fails [ 0 B{ 1 2 3 } <displaced-alien> alien-address ] unit-test-fails
[ 1 1 <displaced-alien> ] unit-test-fails [ 1 1 <displaced-alien> ] unit-test-fails
[ f ] [ 0 B{ 1 2 3 } <displaced-alien> pinned-c-ptr? ] unit-test
[ "( displaced alien )" ] [ 0 B{ 1 2 3 } <displaced-alien> unparse ] unit-test

View File

@ -18,7 +18,7 @@ PREDICATE: alien pinned-alien
underlying-alien pinned-c-ptr? ; underlying-alien pinned-c-ptr? ;
UNION: pinned-c-ptr UNION: pinned-c-ptr
alien POSTPONE: f ; pinned-alien POSTPONE: f ;
UNION: c-ptr UNION: c-ptr
alien bit-array byte-array float-array POSTPONE: f ; alien bit-array byte-array float-array POSTPONE: f ;

View File

@ -68,3 +68,7 @@ TYPEDEF: int* MyIntArray
TYPEDEF: uchar* MyLPBYTE TYPEDEF: uchar* MyLPBYTE
[ t ] [ "char*" c-type "MyLPBYTE" c-type eq? ] unit-test [ t ] [ "char*" c-type "MyLPBYTE" c-type eq? ] unit-test
[
0 B{ 1 2 3 4 } <displaced-alien> <void*>
] unit-test-fails

View File

@ -3,7 +3,7 @@
USING: arrays alien alien.c-types alien.structs kernel math USING: arrays alien alien.c-types alien.structs kernel math
namespaces parser sequences words quotations math.parser namespaces parser sequences words quotations math.parser
splitting effects prettyprint prettyprint.sections splitting effects prettyprint prettyprint.sections
prettyprint.backend assocs ; prettyprint.backend assocs combinators ;
IN: alien.syntax IN: alien.syntax
<PRIVATE <PRIVATE
@ -53,10 +53,10 @@ PRIVATE>
parsing parsing
M: alien pprint* M: alien pprint*
dup expired? [ {
drop "( alien expired )" text { [ dup expired? ] [ drop "( alien expired )" text ] }
] [ { [ dup pinned-c-ptr? not ] [ drop "( displaced alien )" text ] }
\ ALIEN: [ alien-address pprint* ] pprint-prefix { [ t ] [ \ ALIEN: [ alien-address pprint* ] pprint-prefix ] }
] if ; } cond ;
M: dll pprint* dll-path dup "DLL\" " pprint-string ; M: dll pprint* dll-path dup "DLL\" " pprint-string ;

View File

@ -8,6 +8,9 @@ void flush_icache(CELL start, CELL len)
identically to the below assembly. */ identically to the below assembly. */
/* result = syscall(__ARM_NR_cacheflush,start,start + len,0); */ /* result = syscall(__ARM_NR_cacheflush,start,start + len,0); */
/* Assembly swiped from
http://lists.arm.linux.org.uk/pipermail/linux-arm/2002-July/003931.html
*/
__asm__ __volatile__ ( __asm__ __volatile__ (
"mov r0, %1\n" "mov r0, %1\n"
"sub r1, %2, #1\n" "sub r1, %2, #1\n"