Merge git://factorcode.org/git/factor
commit
4acdb01afc
|
@ -64,3 +64,7 @@ cell 8 = [
|
|||
[ 0 B{ 1 2 3 } <displaced-alien> alien-address ] 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
|
||||
|
|
|
@ -18,7 +18,7 @@ PREDICATE: alien pinned-alien
|
|||
underlying-alien pinned-c-ptr? ;
|
||||
|
||||
UNION: pinned-c-ptr
|
||||
alien POSTPONE: f ;
|
||||
pinned-alien POSTPONE: f ;
|
||||
|
||||
UNION: c-ptr
|
||||
alien bit-array byte-array float-array POSTPONE: f ;
|
||||
|
|
|
@ -68,3 +68,7 @@ TYPEDEF: int* MyIntArray
|
|||
TYPEDEF: uchar* MyLPBYTE
|
||||
|
||||
[ t ] [ "char*" c-type "MyLPBYTE" c-type eq? ] unit-test
|
||||
|
||||
[
|
||||
0 B{ 1 2 3 4 } <displaced-alien> <void*>
|
||||
] unit-test-fails
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
USING: arrays alien alien.c-types alien.structs kernel math
|
||||
namespaces parser sequences words quotations math.parser
|
||||
splitting effects prettyprint prettyprint.sections
|
||||
prettyprint.backend assocs ;
|
||||
prettyprint.backend assocs combinators ;
|
||||
IN: alien.syntax
|
||||
|
||||
<PRIVATE
|
||||
|
@ -53,10 +53,10 @@ PRIVATE>
|
|||
parsing
|
||||
|
||||
M: alien pprint*
|
||||
dup expired? [
|
||||
drop "( alien expired )" text
|
||||
] [
|
||||
\ ALIEN: [ alien-address pprint* ] pprint-prefix
|
||||
] if ;
|
||||
{
|
||||
{ [ dup expired? ] [ drop "( alien expired )" text ] }
|
||||
{ [ dup pinned-c-ptr? not ] [ drop "( displaced alien )" text ] }
|
||||
{ [ t ] [ \ ALIEN: [ alien-address pprint* ] pprint-prefix ] }
|
||||
} cond ;
|
||||
|
||||
M: dll pprint* dll-path dup "DLL\" " pprint-string ;
|
||||
|
|
|
@ -8,6 +8,9 @@ void flush_icache(CELL start, CELL len)
|
|||
identically to the below assembly. */
|
||||
/* 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__ (
|
||||
"mov r0, %1\n"
|
||||
"sub r1, %2, #1\n"
|
||||
|
|
Loading…
Reference in New Issue