Merge branch 'master' into new-alien-pointers
commit
971af554e1
|
@ -236,10 +236,11 @@ ERROR: no-objc-type name ;
|
||||||
] bi ;
|
] bi ;
|
||||||
|
|
||||||
: import-objc-class ( name quot -- )
|
: import-objc-class ( name quot -- )
|
||||||
over define-objc-class-word
|
2dup swap define-objc-class-word
|
||||||
|
over objc_getClass [ drop ] [ call( -- ) ] if
|
||||||
dup objc_getClass [
|
dup objc_getClass [
|
||||||
[ objc-class register-objc-methods ]
|
[ objc_getClass register-objc-methods ]
|
||||||
[ objc-meta-class register-objc-methods ] bi
|
[ objc_getMetaClass register-objc-methods ] bi
|
||||||
] [ drop ] if ;
|
] [ drop ] if ;
|
||||||
|
|
||||||
: root-class ( class -- root )
|
: root-class ( class -- root )
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs sequences kernel combinators make math
|
USING: accessors assocs sequences kernel combinators make math
|
||||||
math.order math.ranges system namespaces locals layouts words
|
math.order math.ranges system namespaces locals layouts words
|
||||||
alien alien.accessors alien.c-types alien.data literals cpu.architecture
|
alien alien.accessors alien.c-types alien.complex alien.data
|
||||||
cpu.ppc.assembler cpu.ppc.assembler.backend compiler.cfg.registers
|
literals cpu.architecture cpu.ppc.assembler
|
||||||
|
cpu.ppc.assembler.backend compiler.cfg.registers
|
||||||
compiler.cfg.instructions compiler.cfg.comparisons
|
compiler.cfg.instructions compiler.cfg.comparisons
|
||||||
compiler.codegen.fixup compiler.cfg.intrinsics
|
compiler.codegen.fixup compiler.cfg.intrinsics
|
||||||
compiler.cfg.stack-frame compiler.cfg.build-stack-frame
|
compiler.cfg.stack-frame compiler.cfg.build-stack-frame
|
||||||
|
@ -780,4 +781,4 @@ USE: vocabs.loader
|
||||||
{ [ os linux? ] [ "cpu.ppc.linux" require ] }
|
{ [ os linux? ] [ "cpu.ppc.linux" require ] }
|
||||||
} cond
|
} cond
|
||||||
|
|
||||||
"complex-double" c-type t >>return-in-registers? drop
|
complex-double c-type t >>return-in-registers? drop
|
||||||
|
|
|
@ -55,8 +55,8 @@ TUPLE: ConnectEx-args port
|
||||||
[ lpOverlapped>> ]
|
[ lpOverlapped>> ]
|
||||||
[ ptr>> ]
|
[ ptr>> ]
|
||||||
} cleave
|
} cleave
|
||||||
"int"
|
int
|
||||||
{ "SOCKET" "sockaddr_in*" "int" "PVOID" "DWORD" "LPDWORD" "void*" }
|
{ SOCKET void* int PVOID DWORD LPDWORD void* }
|
||||||
"stdcall" alien-indirect drop
|
"stdcall" alien-indirect drop
|
||||||
winsock-error-string [ throw ] when* ; inline
|
winsock-error-string [ throw ] when* ; inline
|
||||||
|
|
||||||
|
|
|
@ -305,10 +305,10 @@ M: MATRIX pprint-delims
|
||||||
: define-complex-blas-matrix ( TYPE T -- )
|
: define-complex-blas-matrix ( TYPE T -- )
|
||||||
"U" "C" (define-blas-matrix) ;
|
"U" "C" (define-blas-matrix) ;
|
||||||
|
|
||||||
"float" "S" define-real-blas-matrix
|
float "S" define-real-blas-matrix
|
||||||
"double" "D" define-real-blas-matrix
|
double "D" define-real-blas-matrix
|
||||||
"complex-float" "C" define-complex-blas-matrix
|
complex-float "C" define-complex-blas-matrix
|
||||||
"complex-double" "Z" define-complex-blas-matrix
|
complex-double "Z" define-complex-blas-matrix
|
||||||
|
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
|
|
@ -238,10 +238,10 @@ M: VECTOR Vasum
|
||||||
[ drop (define-blas-vector) ]
|
[ drop (define-blas-vector) ]
|
||||||
[ (define-complex-blas-vector) ] 3bi ;
|
[ (define-complex-blas-vector) ] 3bi ;
|
||||||
|
|
||||||
"float" "S" define-real-blas-vector
|
float "S" define-real-blas-vector
|
||||||
"double" "D" define-real-blas-vector
|
double "D" define-real-blas-vector
|
||||||
"complex-float" "C" "S" define-complex-blas-vector
|
complex-float "C" "S" define-complex-blas-vector
|
||||||
"complex-double" "Z" "D" define-complex-blas-vector
|
complex-double "Z" "D" define-complex-blas-vector
|
||||||
|
|
||||||
>>
|
>>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: windows.com windows.kernel32 windows.ole32
|
USING: windows.kernel32 windows.ole32 prettyprint.custom
|
||||||
prettyprint.custom prettyprint.sections sequences ;
|
prettyprint.sections sequences ;
|
||||||
IN: windows.com.prettyprint
|
IN: windows.com.prettyprint
|
||||||
|
|
||||||
M: GUID pprint* guid>string "GUID: " prepend text ;
|
M: GUID pprint* guid>string "GUID: " prepend text ;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
! Copyright (C) 2007, 2009 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2007, 2010 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: namespaces make sequences io io.files io.pathnames kernel
|
USING: namespaces make sequences io io.files io.pathnames kernel
|
||||||
assocs words vocabs definitions parser continuations hashtables
|
assocs words vocabs definitions parser continuations hashtables
|
||||||
|
@ -57,9 +57,15 @@ PRIVATE>
|
||||||
|
|
||||||
SYMBOL: load-help?
|
SYMBOL: load-help?
|
||||||
|
|
||||||
|
! Defined by vocabs.metadata
|
||||||
|
SYMBOL: check-vocab-hook
|
||||||
|
|
||||||
|
check-vocab-hook [ [ drop ] ] initialize
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: load-source ( vocab -- )
|
: load-source ( vocab -- )
|
||||||
|
dup check-vocab-hook get call( vocab -- )
|
||||||
[
|
[
|
||||||
+parsing+ >>source-loaded?
|
+parsing+ >>source-loaded?
|
||||||
dup vocab-source-path [ parse-file ] [ [ ] ] if*
|
dup vocab-source-path [ parse-file ] [ [ ] ] if*
|
||||||
|
@ -99,11 +105,6 @@ PRIVATE>
|
||||||
|
|
||||||
SYMBOL: blacklist
|
SYMBOL: blacklist
|
||||||
|
|
||||||
! Defined by vocabs.metadata
|
|
||||||
SYMBOL: check-vocab-hook
|
|
||||||
|
|
||||||
check-vocab-hook [ [ drop ] ] initialize
|
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: add-to-blacklist ( error vocab -- )
|
: add-to-blacklist ( error vocab -- )
|
||||||
|
@ -122,10 +123,7 @@ M: vocab (load-vocab)
|
||||||
M: vocab-link (load-vocab)
|
M: vocab-link (load-vocab)
|
||||||
vocab-name (load-vocab) ;
|
vocab-name (load-vocab) ;
|
||||||
|
|
||||||
M: string (load-vocab)
|
M: string (load-vocab) create-vocab (load-vocab) ;
|
||||||
[ check-vocab-hook get call( vocab -- ) ]
|
|
||||||
[ create-vocab (load-vocab) ]
|
|
||||||
bi ;
|
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue