parent
f5c8ee91b1
commit
f51e1a50f9
|
@ -7,7 +7,7 @@ math.vectors math.vectors.simd math.vectors.simd.cords
|
||||||
math.parser make sequences words combinators ;
|
math.parser make sequences words combinators ;
|
||||||
in: benchmark.raytracer-simd
|
in: benchmark.raytracer-simd
|
||||||
|
|
||||||
<< SYNTAX: no-compile last-word t "no-compile" set-word-prop ; >>
|
COMPILE< SYNTAX: no-compile last-word t "no-compile" set-word-prop ; COMPILE>
|
||||||
|
|
||||||
! parameters
|
! parameters
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ USING: io io.encodings.ascii io.files io.files.temp math
|
||||||
math.parser kernel sequences ;
|
math.parser kernel sequences ;
|
||||||
in: benchmark.sum-file
|
in: benchmark.sum-file
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"sum-file.txt" temp-file ascii [
|
"sum-file.txt" temp-file ascii [
|
||||||
100000 iota [ number>string print ] each
|
100000 iota [ number>string print ] each
|
||||||
] with-file-writer
|
] with-file-writer
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
: sum-file ( file -- n )
|
: sum-file ( file -- n )
|
||||||
ascii [ 0 [ string>number + ] each-line ] with-file-reader ;
|
ascii [ 0 [ string>number + ] each-line ] with-file-reader ;
|
||||||
|
|
|
@ -5,7 +5,7 @@ sequences.private growable bit-arrays prettyprint.custom
|
||||||
parser accessors vectors.functor classes.parser ;
|
parser accessors vectors.functor classes.parser ;
|
||||||
in: bit-vectors
|
in: bit-vectors
|
||||||
|
|
||||||
<< "bit-vector" create-class-in \ bit-array \ <bit-array> define-vector >>
|
COMPILE< "bit-vector" create-class-in \ bit-array \ <bit-array> define-vector COMPILE>
|
||||||
|
|
||||||
SYNTAX: \ ?V{ \ } [ >bit-vector ] parse-literal ;
|
SYNTAX: \ ?V{ \ } [ >bit-vector ] parse-literal ;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ ERROR: bad-length bytes n ;
|
||||||
: check-length ( bytes n -- bytes n )
|
: check-length ( bytes n -- bytes n )
|
||||||
2dup [ length ] dip > [ bad-length ] when ; inline
|
2dup [ length ] dip > [ bad-length ] when ; inline
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
: be-range ( n -- range )
|
: be-range ( n -- range )
|
||||||
1 - 8 * 0 -8 <range> ; inline
|
1 - 8 * 0 -8 <range> ; inline
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ ERROR: bad-length bytes n ;
|
||||||
MACRO: reassemble-be ( n -- quot ) be-range reassemble-bytes ;
|
MACRO: reassemble-be ( n -- quot ) be-range reassemble-bytes ;
|
||||||
|
|
||||||
MACRO: reassemble-le ( n -- quot ) le-range reassemble-bytes ;
|
MACRO: reassemble-le ( n -- quot ) le-range reassemble-bytes ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
:: n-be> ( bytes n -- x )
|
:: n-be> ( bytes n -- x )
|
||||||
bytes n check-length drop n firstn-unsafe n reassemble-be ; inline
|
bytes n check-length drop n firstn-unsafe n reassemble-be ; inline
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
USING: layouts kernel parser math math.bitwise sequences ;
|
USING: layouts kernel parser math math.bitwise sequences ;
|
||||||
in: persistent.hashtables.config
|
in: persistent.hashtables.config
|
||||||
|
|
||||||
: radix-bits ( -- n ) << cell 4 = 4 5 ? suffix! >> ; foldable
|
CONSTANT: radix-bits $[ cell 4 = 4 5 ? ]
|
||||||
: radix-mask ( -- n ) radix-bits on-bits ; foldable
|
: radix-mask ( -- n ) radix-bits on-bits ; foldable
|
||||||
: full-bitmap-mask ( -- n ) radix-bits 2^ on-bits ; inline
|
: full-bitmap-mask ( -- n ) radix-bits 2^ on-bits ; inline
|
||||||
|
|
|
@ -12,7 +12,7 @@ tools.test kernel locals namespaces random math.ranges sequences fry ;
|
||||||
|
|
||||||
! We have to define these first so that they're compiled before
|
! We have to define these first so that they're compiled before
|
||||||
! the below hashtables are parsed...
|
! the below hashtables are parsed...
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
TUPLE: hash-0-a ;
|
TUPLE: hash-0-a ;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ TUPLE: hash-0-b ;
|
||||||
|
|
||||||
M: hash-0-b hashcode* 2drop 0 ;
|
M: hash-0-b hashcode* 2drop 0 ;
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
{ } [
|
{ } [
|
||||||
PH{ }
|
PH{ }
|
||||||
|
|
|
@ -132,7 +132,7 @@ TUPLE: sequence-parser sequence n ;
|
||||||
sequence-parser [ n + ] change-n drop
|
sequence-parser [ n + ] change-n drop
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
<< "length" [ length ] define-sorting >>
|
COMPILE< "length" [ length ] define-sorting COMPILE>
|
||||||
|
|
||||||
: sort-tokens ( seq -- seq' )
|
: sort-tokens ( seq -- seq' )
|
||||||
{ length>=< <=> } sort-by ;
|
{ length>=< <=> } sort-by ;
|
||||||
|
|
|
@ -8,9 +8,9 @@ PRIVATE<
|
||||||
: (unrolled-each-integer) ( quot n -- )
|
: (unrolled-each-integer) ( quot n -- )
|
||||||
swap '[ _ call( i -- ) ] each-integer ;
|
swap '[ _ call( i -- ) ] each-integer ;
|
||||||
|
|
||||||
<< \ (unrolled-each-integer) [
|
COMPILE< \ (unrolled-each-integer) [
|
||||||
iota [ '[ _ swap call( i -- ) ] ] [ ] map-as '[ _ cleave ]
|
iota [ '[ _ swap call( i -- ) ] ] [ ] map-as '[ _ cleave ]
|
||||||
] 1 define-partial-eval >>
|
] 1 define-partial-eval COMPILE>
|
||||||
|
|
||||||
: (unrolled-collect) ( quot into -- quot' )
|
: (unrolled-collect) ( quot into -- quot' )
|
||||||
'[ dup @ swap _ set-nth-unsafe ] ; inline
|
'[ dup @ swap _ set-nth-unsafe ] ; inline
|
||||||
|
|
|
@ -2,29 +2,29 @@ auto-use
|
||||||
in: syntax
|
in: syntax
|
||||||
use: delegate.private
|
use: delegate.private
|
||||||
|
|
||||||
<< forget: postpone\ MACRO: >>
|
COMPILE< forget: postpone\ MACRO: COMPILE>
|
||||||
<< forget: postpone\ MACRO:: >>
|
COMPILE< forget: postpone\ MACRO:: COMPILE>
|
||||||
<< forget: postpone\ MEMO: >>
|
COMPILE< forget: postpone\ MEMO: COMPILE>
|
||||||
<< forget: postpone\ MEMO:: >>
|
COMPILE< forget: postpone\ MEMO:: COMPILE>
|
||||||
<< forget: postpone\ M:: >>
|
COMPILE< forget: postpone\ M:: COMPILE>
|
||||||
<< forget: postpone\ IDENTITY-MEMO: >>
|
COMPILE< forget: postpone\ IDENTITY-MEMO: COMPILE>
|
||||||
<< forget: postpone\ IDENTITY-MEMO:: >>
|
COMPILE< forget: postpone\ IDENTITY-MEMO:: COMPILE>
|
||||||
<< forget: postpone\ TYPED: >>
|
COMPILE< forget: postpone\ TYPED: COMPILE>
|
||||||
<< forget: postpone\ TYPED:: >>
|
COMPILE< forget: postpone\ TYPED:: COMPILE>
|
||||||
|
|
||||||
<< forget: postpone\ '[ >>
|
COMPILE< forget: postpone\ '[ COMPILE>
|
||||||
<< forget: postpone\ :: >>
|
COMPILE< forget: postpone\ :: COMPILE>
|
||||||
<< forget: postpone\ :> >>
|
COMPILE< forget: postpone\ :> COMPILE>
|
||||||
<< forget: _ >>
|
COMPILE< forget: _ COMPILE>
|
||||||
<< forget: @ >>
|
COMPILE< forget: @ COMPILE>
|
||||||
<< forget: postpone\ |[ >>
|
COMPILE< forget: postpone\ |[ COMPILE>
|
||||||
<< forget: postpone\ let[ >>
|
COMPILE< forget: postpone\ let[ COMPILE>
|
||||||
<< forget: postpone\ IH{ >>
|
COMPILE< forget: postpone\ IH{ COMPILE>
|
||||||
<< forget: postpone\ PROTOCOL: >>
|
COMPILE< forget: postpone\ PROTOCOL: COMPILE>
|
||||||
<< forget: postpone\ CONSULT: >>
|
COMPILE< forget: postpone\ CONSULT: COMPILE>
|
||||||
<< forget: postpone\ BROADCAST: >>
|
COMPILE< forget: postpone\ BROADCAST: COMPILE>
|
||||||
<< forget: postpone\ SLOT-PROTOCOL: >>
|
COMPILE< forget: postpone\ SLOT-PROTOCOL: COMPILE>
|
||||||
<< forget: postpone\ HINTS: >>
|
COMPILE< forget: postpone\ HINTS: COMPILE>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,8 @@ in: bootstrap.syntax
|
||||||
"{"
|
"{"
|
||||||
"}"
|
"}"
|
||||||
"CS{"
|
"CS{"
|
||||||
"<<"
|
"<<" ">>"
|
||||||
">>"
|
"COMPILE<" "COMPILE>"
|
||||||
"call-next-method"
|
"call-next-method"
|
||||||
"not{"
|
"not{"
|
||||||
"maybe{"
|
"maybe{"
|
||||||
|
|
|
@ -811,7 +811,7 @@ TUPLE: rclasstest a b ;
|
||||||
{ f } [ \ rclasstest \ b>> ?lookup-method ] unit-test
|
{ f } [ \ rclasstest \ b>> ?lookup-method ] unit-test
|
||||||
{ f } [ \ rclasstest \ b<< ?lookup-method ] unit-test
|
{ f } [ \ rclasstest \ b<< ?lookup-method ] unit-test
|
||||||
|
|
||||||
<< \ rclasstest forget >>
|
COMPILE< \ rclasstest forget COMPILE>
|
||||||
|
|
||||||
! initial: should type check
|
! initial: should type check
|
||||||
TUPLE: initial-class ;
|
TUPLE: initial-class ;
|
||||||
|
|
|
@ -254,7 +254,7 @@ CONSTANT: case-const-2 2 ;
|
||||||
|
|
||||||
defer: corner-case-1
|
defer: corner-case-1
|
||||||
|
|
||||||
<< \ corner-case-1 2 [ + ] curry 1array [ case ] curry ( a -- b ) define-declared >>
|
COMPILE< \ corner-case-1 2 [ + ] curry 1array [ case ] curry ( a -- b ) define-declared COMPILE>
|
||||||
|
|
||||||
{ t } [ \ corner-case-1 word-optimized? ] unit-test
|
{ t } [ \ corner-case-1 word-optimized? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ GENERIC: uncompiled-generic-test ( a -- b ) ;
|
||||||
|
|
||||||
M: integer uncompiled-generic-test 1 + ;
|
M: integer uncompiled-generic-test 1 + ;
|
||||||
|
|
||||||
<< [ uncompiled-generic-test ] [ jit-compile ] [ suffix! ] bi >>
|
COMPILE< [ uncompiled-generic-test ] [ jit-compile ] [ suffix! ] bi COMPILE>
|
||||||
"q" set
|
"q" set
|
||||||
|
|
||||||
{ 4 } [ 3 "q" get call ] unit-test
|
{ 4 } [ 3 "q" get call ] unit-test
|
||||||
|
|
|
@ -54,7 +54,7 @@ in: continuations.tests
|
||||||
: foo ( -- ) get-callstack "c" set don't-compile-me ;
|
: foo ( -- ) get-callstack "c" set don't-compile-me ;
|
||||||
: bar ( -- a b ) 1 foo 2 ;
|
: bar ( -- a b ) 1 foo 2 ;
|
||||||
|
|
||||||
<< { don't-compile-me foo bar } [ t "no-compile" set-word-prop ] each >>
|
COMPILE< { don't-compile-me foo bar } [ t "no-compile" set-word-prop ] each COMPILE>
|
||||||
|
|
||||||
{ 1 2 } [ bar ] unit-test
|
{ 1 2 } [ bar ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ cpu.x86.assembler.operands help.markup help.syntax kernel layouts
|
||||||
literals math multiline sequences strings system vm words ;
|
literals math multiline sequences strings system vm words ;
|
||||||
in: cpu.architecture
|
in: cpu.architecture
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
STRING: ex-%allot
|
STRING: ex-%allot
|
||||||
USING: cpu.architecture make ;
|
USING: cpu.architecture make ;
|
||||||
[ RAX 40 tuple RCX %allot ] B{ } make disassemble
|
[ RAX 40 tuple RCX %allot ] B{ } make disassemble
|
||||||
|
@ -71,7 +71,7 @@ init-relocation [ RAX RBX 3 -14 RCX RDX %write-barrier ] B{ } make disassemble
|
||||||
000000000143f97c: 48ba0000000000000000 mov rdx, 0x0
|
000000000143f97c: 48ba0000000000000000 mov rdx, 0x0
|
||||||
000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0
|
000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0
|
||||||
;
|
;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
HELP: %alien-invoke
|
HELP: %alien-invoke
|
||||||
{ $values
|
{ $values
|
||||||
|
|
|
@ -10,7 +10,7 @@ in: generalizations
|
||||||
! the input parameters, e.g. n.
|
! the input parameters, e.g. n.
|
||||||
! If math is done, the word needs to be a macro so the math can
|
! If math is done, the word needs to be a macro so the math can
|
||||||
! be done at compile-time.
|
! be done at compile-time.
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
ALIAS: n*quot (n*quot) ;
|
ALIAS: n*quot (n*quot) ;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ MACRO: call-n ( n -- quot )
|
||||||
|
|
||||||
: repeat ( n obj quot -- ) swapd times ; inline
|
: repeat ( n obj quot -- ) swapd times ; inline
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
MACRO: nsum ( n -- quot )
|
MACRO: nsum ( n -- quot )
|
||||||
1 - [ + ] n*quot ;
|
1 - [ + ] n*quot ;
|
||||||
|
|
|
@ -49,10 +49,10 @@ in: kernel.tests
|
||||||
|
|
||||||
: overflow-r ( -- ) 3 load-local overflow-r ;
|
: overflow-r ( -- ) 3 load-local overflow-r ;
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
{ overflow-d (overflow-d-alt) overflow-d-alt overflow-r }
|
{ overflow-d (overflow-d-alt) overflow-d-alt overflow-r }
|
||||||
[ t "no-compile" set-word-prop ] each
|
[ t "no-compile" set-word-prop ] each
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
[ overflow-d ] [
|
[ overflow-d ] [
|
||||||
2 head ${ KERNEL-ERROR ERROR-DATASTACK-OVERFLOW } =
|
2 head ${ KERNEL-ERROR ERROR-DATASTACK-OVERFLOW } =
|
||||||
|
@ -125,7 +125,7 @@ in: kernel.tests
|
||||||
! Doesn't compile; important
|
! Doesn't compile; important
|
||||||
: foo ( a -- b ) ;
|
: foo ( a -- b ) ;
|
||||||
|
|
||||||
<< \ foo t "no-compile" set-word-prop >>
|
COMPILE< \ foo t "no-compile" set-word-prop COMPILE>
|
||||||
|
|
||||||
[ drop foo ] must-fail
|
[ drop foo ] must-fail
|
||||||
{ } [ :c ] unit-test
|
{ } [ :c ] unit-test
|
||||||
|
|
|
@ -36,13 +36,13 @@ symbol: header-bits
|
||||||
|
|
||||||
! We do this in its own compilation unit so that they can be
|
! We do this in its own compilation unit so that they can be
|
||||||
! folded below
|
! folded below
|
||||||
<<
|
COMPILE<
|
||||||
: cell ( -- n ) OBJ-CELL-SIZE special-object ; foldable
|
: cell ( -- n ) OBJ-CELL-SIZE special-object ; foldable
|
||||||
|
|
||||||
: (fixnum-bits) ( m -- n ) tag-bits get - ; foldable
|
: (fixnum-bits) ( m -- n ) tag-bits get - ; foldable
|
||||||
|
|
||||||
: (first-bignum) ( m -- n ) (fixnum-bits) 1 - 2^ ; foldable
|
: (first-bignum) ( m -- n ) (fixnum-bits) 1 - 2^ ; foldable
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
: cells ( m -- n ) cell * ; inline
|
: cells ( m -- n ) cell * ; inline
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ in: locals.parser.tests
|
||||||
|
|
||||||
! XXX: remove the << and >> below and make test-all pass
|
! XXX: remove the << and >> below and make test-all pass
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
! (::)
|
! (::)
|
||||||
{
|
{
|
||||||
"dobiedoo"
|
"dobiedoo"
|
||||||
|
@ -26,7 +26,7 @@ in: locals.parser.tests
|
||||||
qualified-vocabs last words>> keys "um" swap member?
|
qualified-vocabs last words>> keys "um" swap member?
|
||||||
] with-compilation-unit
|
] with-compilation-unit
|
||||||
] unit-test
|
] unit-test
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
! check-local-name
|
! check-local-name
|
||||||
{ "hello" } [
|
{ "hello" } [
|
||||||
|
@ -58,7 +58,7 @@ in: locals.parser.tests
|
||||||
[ locals>> [ name>> ] map ] [ keys ] bi*
|
[ locals>> [ name>> ] map ] [ keys ] bi*
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
{
|
{
|
||||||
"V{ 99 :> kkk kkk }"
|
"V{ 99 :> kkk kkk }"
|
||||||
} [
|
} [
|
||||||
|
@ -69,4 +69,4 @@ in: locals.parser.tests
|
||||||
] with-lexer
|
] with-lexer
|
||||||
] with-compilation-unit unparse
|
] with-compilation-unit unparse
|
||||||
] unit-test
|
] unit-test
|
||||||
>>
|
COMPILE>
|
||||||
|
|
|
@ -31,7 +31,7 @@ in: modern.compiler
|
||||||
! over changed-definition
|
! over changed-definition
|
||||||
! swap def>> first swapd set-at
|
! swap def>> first swapd set-at
|
||||||
! ] with-definition ;
|
! ] with-definition ;
|
||||||
! >>
|
! COMPILE>
|
||||||
|
|
||||||
|
|
||||||
TUPLE: holder literal ;
|
TUPLE: holder literal ;
|
||||||
|
|
|
@ -8,7 +8,7 @@ quotations sequences sequences.extras splitting
|
||||||
splitting.monotonic strings unicode generalizations ;
|
splitting.monotonic strings unicode generalizations ;
|
||||||
in: modern
|
in: modern
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
! Base rules, everything should have a generator macro
|
! Base rules, everything should have a generator macro
|
||||||
TUPLE: lexer generator ;
|
TUPLE: lexer generator ;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ TUPLE: right-decorator-literal < decorator-literal ;
|
||||||
|
|
||||||
TUPLE: compound-sequence-literal sequence ;
|
TUPLE: compound-sequence-literal sequence ;
|
||||||
CONSTRUCTOR: <compound-sequence-literal> compound-sequence-literal ( sequence -- obj ) ;
|
CONSTRUCTOR: <compound-sequence-literal> compound-sequence-literal ( sequence -- obj ) ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
GENERIC: lexed-underlying ( obj -- slice ) ;
|
GENERIC: lexed-underlying ( obj -- slice ) ;
|
||||||
M: f lexed-underlying ;
|
M: f lexed-underlying ;
|
||||||
|
@ -132,7 +132,7 @@ M: array collapse-decorators
|
||||||
[ [ length 2 - ] keep [ char: \: = ] find-last-from ] keep
|
[ [ length 2 - ] keep [ char: \: = ] find-last-from ] keep
|
||||||
swap [ swap tail strict-upper? ] [ nip strict-upper? ] if
|
swap [ swap tail strict-upper? ] [ nip strict-upper? ] if
|
||||||
] [
|
] [
|
||||||
drop t
|
"<" sequence= not
|
||||||
] if
|
] if
|
||||||
] [
|
] [
|
||||||
drop f
|
drop f
|
||||||
|
@ -406,13 +406,13 @@ PRIVATE>
|
||||||
[ make-tag-literal ]
|
[ make-tag-literal ]
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
: lexer-rules>delimiters ( seq -- string )
|
: lexer-rules>delimiters ( seq -- string )
|
||||||
[ delimiter>> ] "" map-as ;
|
[ delimiter>> ] "" map-as ;
|
||||||
|
|
||||||
: lexer-rules>assoc ( seq -- seq' )
|
: lexer-rules>assoc ( seq -- seq' )
|
||||||
[ [ delimiter>> ] [ generator>> 1quotation ] bi ] { } map>assoc ;
|
[ [ delimiter>> ] [ generator>> 1quotation ] bi ] { } map>assoc ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
! 0 "HI: ;" slice-til-either -> 3 "HI: ;" "HI:" CHAR: \:
|
! 0 "HI: ;" slice-til-either -> 3 "HI: ;" "HI:" CHAR: \:
|
||||||
MACRO: rules>call-lexer ( seq -- quot: ( top? n/f string -- top?' n'/f string literal ) )
|
MACRO: rules>call-lexer ( seq -- quot: ( top? n/f string -- top?' n'/f string literal ) )
|
||||||
|
|
|
@ -539,7 +539,7 @@ EXCLUDE: qualified.tests.bar => x ;
|
||||||
|
|
||||||
! Two similar bugs
|
! Two similar bugs
|
||||||
|
|
||||||
! Replace : def with something in << >>
|
! Replace : def with something in << COMPILE>
|
||||||
/* { [ ] } [
|
/* { [ ] } [
|
||||||
"in: parser.tests : was-once-a-word-bug ( -- ) ;"
|
"in: parser.tests : was-once-a-word-bug ( -- ) ;"
|
||||||
<string-reader> "was-once-a-word-test" parse-stream
|
<string-reader> "was-once-a-word-test" parse-stream
|
||||||
|
|
|
@ -30,7 +30,7 @@ ARTICLE: "syntax-immediate" "Parse time evaluation"
|
||||||
"Code can be evaluated at parse time. This is a rarely-used feature; one use-case is " { $link "loading-libs" } ", where you want to execute some code before the words in a source file are compiled."
|
"Code can be evaluated at parse time. This is a rarely-used feature; one use-case is " { $link "loading-libs" } ", where you want to execute some code before the words in a source file are compiled."
|
||||||
{ $subsections
|
{ $subsections
|
||||||
\ <<
|
\ <<
|
||||||
\ >>
|
\ COMPILE>
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ARTICLE: "syntax-integers" "Integer syntax"
|
ARTICLE: "syntax-integers" "Integer syntax"
|
||||||
|
@ -870,7 +870,7 @@ HELP: <<
|
||||||
{ $description "Evaluates some code at parse time." }
|
{ $description "Evaluates some code at parse time." }
|
||||||
{ $notes "Calling words defined in the same source file at parse time is prohibited; see compilation unit as where it was defined; see " { $link "compilation-units" } "." } ;
|
{ $notes "Calling words defined in the same source file at parse time is prohibited; see compilation unit as where it was defined; see " { $link "compilation-units" } "." } ;
|
||||||
|
|
||||||
HELP: >>
|
HELP: COMPILE>
|
||||||
{ $syntax ">>" }
|
{ $syntax ">>" }
|
||||||
{ $description "Marks the end of a parse time code block." } ;
|
{ $description "Marks the end of a parse time code block." } ;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ in: bootstrap.syntax
|
||||||
dup [ define-fry-specifier ] curry each ;
|
dup [ define-fry-specifier ] curry each ;
|
||||||
|
|
||||||
[
|
[
|
||||||
{ "]" "}" ";" ">>" } [ define-delimiter ] each
|
{ "]" "}" ";" ">>" "COMPILE>" } [ define-delimiter ] each
|
||||||
|
|
||||||
{ "_" "@" } define-fry-specifiers
|
{ "_" "@" } define-fry-specifiers
|
||||||
! "@" [ "Only valid inside a fry" throw ] ( -- * ) define-fry-specifier
|
! "@" [ "Only valid inside a fry" throw ] ( -- * ) define-fry-specifier
|
||||||
|
@ -320,6 +320,14 @@ in: bootstrap.syntax
|
||||||
] with-nested-compilation-unit call( -- )
|
] with-nested-compilation-unit call( -- )
|
||||||
] define-core-syntax
|
] define-core-syntax
|
||||||
|
|
||||||
|
"COMPILE<" [
|
||||||
|
[
|
||||||
|
\ COMPILE> parse-until >quotation
|
||||||
|
] with-nested-compilation-unit call( -- )
|
||||||
|
] define-core-syntax
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"call-next-method" [
|
"call-next-method" [
|
||||||
current-method get [
|
current-method get [
|
||||||
literalize suffix!
|
literalize suffix!
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: namespaces parser ;
|
USING: namespaces parser ;
|
||||||
in: vocabs.loader.test.a
|
in: vocabs.loader.test.a
|
||||||
|
|
||||||
<< global [ "count-me" inc ] with-variables >>
|
COMPILE< global [ "count-me" inc ] with-variables COMPILE>
|
||||||
|
|
||||||
: v-l-t-a-hello ( -- a ) 4 ;
|
: v-l-t-a-hello ( -- a ) 4 ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: namespaces ;
|
USING: namespaces ;
|
||||||
in: vocabs.loader.test.b
|
in: vocabs.loader.test.b
|
||||||
|
|
||||||
<< global [ "count-me" inc ] with-variables >>
|
COMPILE< global [ "count-me" inc ] with-variables COMPILE>
|
||||||
|
|
||||||
: fred ( -- ) bob ;
|
: fred ( -- ) bob ;
|
||||||
|
|
|
@ -196,7 +196,7 @@ FUNCTOR;"
|
||||||
}
|
}
|
||||||
{ $slide "Example of sorting functor"
|
{ $slide "Example of sorting functor"
|
||||||
{ $code "USING: sorting.functor ;
|
{ $code "USING: sorting.functor ;
|
||||||
<< \"length\" [ length ] define-sorting >>"
|
COMPILE< \"length\" [ length ] define-sorting >>"
|
||||||
}
|
}
|
||||||
{ $code
|
{ $code
|
||||||
"{ { 1 2 3 } { 1 2 } { 1 } }
|
"{ { 1 2 3 } { 1 2 } { 1 } }
|
||||||
|
|
|
@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: atk.ffi
|
in: atk.ffi
|
||||||
|
|
||||||
<< "gobject.ffi" require >>
|
COMPILE< "gobject.ffi" require COMPILE>
|
||||||
|
|
||||||
library: atk
|
library: atk
|
||||||
|
|
||||||
<< "atk" {
|
COMPILE< "atk" {
|
||||||
{ [ os windows? ] [ "libatk-1.0-0.dll" ] }
|
{ [ os windows? ] [ "libatk-1.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libatk-1.0.dylib" ] }
|
{ [ os macosx? ] [ "libatk-1.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libatk-1.0.so" ] }
|
{ [ os unix? ] [ "libatk-1.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
gir: vocab:atk/Atk-1.0.gir
|
gir: vocab:atk/Atk-1.0.gir
|
||||||
|
|
|
@ -8,11 +8,11 @@ in: cairo.ffi
|
||||||
|
|
||||||
! Adapted from cairo.h, version 1.8.10
|
! Adapted from cairo.h, version 1.8.10
|
||||||
|
|
||||||
<< "cairo" {
|
COMPILE< "cairo" {
|
||||||
{ [ os windows? ] [ "libcairo-2.dll" ] }
|
{ [ os windows? ] [ "libcairo-2.dll" ] }
|
||||||
{ [ os macosx? ] [ "libcairo.dylib" ] }
|
{ [ os macosx? ] [ "libcairo.dylib" ] }
|
||||||
{ [ os unix? ] [ "libcairo.so" ] }
|
{ [ os unix? ] [ "libcairo.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: cairo
|
library: cairo
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: clutter.cally.ffi
|
in: clutter.cally.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"atk.ffi" require
|
"atk.ffi" require
|
||||||
"clutter.ffi" require
|
"clutter.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: clutter.cally
|
library: clutter.cally
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter.cally" {
|
"clutter.cally" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: Cally-1.0.gir
|
gir: Cally-1.0.gir
|
||||||
|
|
|
@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel opengl.gl system vocabs ;
|
gobject-introspection kernel opengl.gl system vocabs ;
|
||||||
in: clutter.cogl.ffi
|
in: clutter.cogl.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gobject.ffi" require
|
"gobject.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: clutter.cogl
|
library: clutter.cogl
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter.cogl" {
|
"clutter.cogl" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
FOREIGN-ATOMIC-TYPE: GL.uint GLuint ;
|
FOREIGN-ATOMIC-TYPE: GL.uint GLuint ;
|
||||||
FOREIGN-ATOMIC-TYPE: GL.enum GLenum ;
|
FOREIGN-ATOMIC-TYPE: GL.enum GLenum ;
|
||||||
|
|
|
@ -4,23 +4,23 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: clutter.ffi
|
in: clutter.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gtk" require
|
"gtk" require
|
||||||
"atk.ffi" require
|
"atk.ffi" require
|
||||||
"pango.cairo.ffi" require
|
"pango.cairo.ffi" require
|
||||||
"clutter.cogl.ffi" require
|
"clutter.cogl.ffi" require
|
||||||
"clutter.json.ffi" require
|
"clutter.json.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: clutter
|
library: clutter
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter" {
|
"clutter" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
FOREIGN-RECORD-TYPE: cairo.Path cairo_path_t ;
|
FOREIGN-RECORD-TYPE: cairo.Path cairo_path_t ;
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: clutter.gtk.ffi
|
in: clutter.gtk.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter.ffi" require
|
"clutter.ffi" require
|
||||||
"gtk.ffi" require
|
"gtk.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: clutter.gtk
|
library: clutter.gtk
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter.gtk" {
|
"clutter.gtk" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libclutter-gtk-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libclutter-gtk-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: GtkClutter-1.0.gir
|
gir: GtkClutter-1.0.gir
|
||||||
|
|
|
@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: clutter.json.ffi
|
in: clutter.json.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gobject.ffi" require
|
"gobject.ffi" require
|
||||||
"gio.ffi" require
|
"gio.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: clutter.json
|
library: clutter.json
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"clutter.json" {
|
"clutter.json" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: Json-1.0.gir
|
gir: Json-1.0.gir
|
||||||
|
|
|
@ -6,7 +6,7 @@ FROM: alien.c-types => float ;
|
||||||
in: core-graphics.types
|
in: core-graphics.types
|
||||||
|
|
||||||
symbol: CGFloat
|
symbol: CGFloat
|
||||||
<< cell 4 = float double ? \ CGFloat typedef >>
|
COMPILE< cell 4 = float double ? \ CGFloat typedef COMPILE>
|
||||||
|
|
||||||
STRUCT: CGPoint
|
STRUCT: CGPoint
|
||||||
{ x CGFloat }
|
{ x CGFloat }
|
||||||
|
|
|
@ -3,13 +3,13 @@ USING: accessors alien alien.c-types alien.libraries alien.syntax
|
||||||
classes.struct combinators kernel system ;
|
classes.struct combinators kernel system ;
|
||||||
in: cuda.ffi
|
in: cuda.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"cuda" {
|
"cuda" {
|
||||||
{ [ os windows? ] [ "nvcuda.dll" stdcall ] }
|
{ [ os windows? ] [ "nvcuda.dll" stdcall ] }
|
||||||
{ [ os macosx? ] [ "/usr/local/cuda/lib/libcuda.dylib" cdecl ] }
|
{ [ os macosx? ] [ "/usr/local/cuda/lib/libcuda.dylib" cdecl ] }
|
||||||
{ [ os unix? ] [ "libcuda.so" cdecl ] }
|
{ [ os unix? ] [ "libcuda.so" cdecl ] }
|
||||||
} cond add-library
|
} cond add-library
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: cuda
|
library: cuda
|
||||||
|
|
||||||
|
@ -28,14 +28,14 @@ TYPEDEF: void* CUgraphicsResource ;
|
||||||
|
|
||||||
SYMBOLS: CUdouble CUlonglong CUulonglong ;
|
SYMBOLS: CUdouble CUlonglong CUulonglong ;
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
: always-8-byte-align ( c-type -- c-type )
|
: always-8-byte-align ( c-type -- c-type )
|
||||||
8 >>align 8 >>align-first ;
|
8 >>align 8 >>align-first ;
|
||||||
|
|
||||||
longlong lookup-c-type clone always-8-byte-align \ CUlonglong typedef
|
longlong lookup-c-type clone always-8-byte-align \ CUlonglong typedef
|
||||||
ulonglong lookup-c-type clone always-8-byte-align \ CUulonglong typedef
|
ulonglong lookup-c-type clone always-8-byte-align \ CUulonglong typedef
|
||||||
double lookup-c-type clone always-8-byte-align \ CUdouble typedef
|
double lookup-c-type clone always-8-byte-align \ CUdouble typedef
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
STRUCT: CUuuid
|
STRUCT: CUuuid
|
||||||
{ bytes char[16] } ;
|
{ bytes char[16] } ;
|
||||||
|
|
|
@ -4,10 +4,10 @@ system words ;
|
||||||
|
|
||||||
in: curl.ffi
|
in: curl.ffi
|
||||||
|
|
||||||
<< "curl" {
|
COMPILE< "curl" {
|
||||||
{ [ os macosx? ] [ "libcurl.dylib" ] }
|
{ [ os macosx? ] [ "libcurl.dylib" ] }
|
||||||
{ [ os unix? ] [ "libcurl.so" ] }
|
{ [ os unix? ] [ "libcurl.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: curl
|
library: curl
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ USING: accessors alien alien.c-types alien.libraries alien.libraries.finder
|
||||||
alien.syntax classes.struct combinators kernel math system unix.types ;
|
alien.syntax classes.struct combinators kernel math system unix.types ;
|
||||||
in: curses.ffi
|
in: curses.ffi
|
||||||
|
|
||||||
<< "curses" {
|
COMPILE< "curses" {
|
||||||
{ [ os windows? ] [ "libcurses.dll" ] }
|
{ [ os windows? ] [ "libcurses.dll" ] }
|
||||||
{ [ os macosx? ] [ "libcurses.dylib" ] }
|
{ [ os macosx? ] [ "libcurses.dylib" ] }
|
||||||
{ [ os unix? ] [ "ncursesw" find-library ] }
|
{ [ os unix? ] [ "ncursesw" find-library ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
c-type: SCREEN
|
c-type: SCREEN
|
||||||
TYPEDEF: void* va_list ;
|
TYPEDEF: void* va_list ;
|
||||||
|
|
|
@ -8,11 +8,11 @@ in: fftw.ffi
|
||||||
|
|
||||||
library: fftw3
|
library: fftw3
|
||||||
|
|
||||||
<< "fftw3" {
|
COMPILE< "fftw3" {
|
||||||
{ [ os windows? ] [ "libfftw3-3.dll" ] }
|
{ [ os windows? ] [ "libfftw3-3.dll" ] }
|
||||||
{ [ os macosx? ] [ "libfftw3.dylib" ] }
|
{ [ os macosx? ] [ "libfftw3.dylib" ] }
|
||||||
{ [ os unix? ] [ "libfftw3.so" ] }
|
{ [ os unix? ] [ "libfftw3.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
TYPEDEF: double[2] fftw_complex ;
|
TYPEDEF: double[2] fftw_complex ;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ in: forestdb.ffi
|
||||||
|
|
||||||
! Functions with LIBFDB_API are exported.
|
! Functions with LIBFDB_API are exported.
|
||||||
|
|
||||||
<< "forestdb" dup find-library cdecl add-library >>
|
COMPILE< "forestdb" dup find-library cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: forestdb
|
library: forestdb
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ USING: alien alien.c-types alien.syntax kernel system combinators
|
||||||
alien.libraries classes.struct ;
|
alien.libraries classes.struct ;
|
||||||
in: freetype
|
in: freetype
|
||||||
|
|
||||||
<< "freetype" {
|
COMPILE< "freetype" {
|
||||||
{ [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] }
|
{ [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] }
|
||||||
{ [ os windows? ] [ "freetype6.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "freetype6.dll" cdecl add-library ] }
|
||||||
{ [ t ] [ drop ] }
|
{ [ t ] [ drop ] }
|
||||||
} cond >>
|
} cond COMPILE>
|
||||||
|
|
||||||
library: freetype
|
library: freetype
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ USING: alien alien.c-types alien.libraries alien.libraries.finder
|
||||||
alien.syntax classes.struct combinators kernel system ;
|
alien.syntax classes.struct combinators kernel system ;
|
||||||
in: gdbm.ffi
|
in: gdbm.ffi
|
||||||
|
|
||||||
<< "libgdbm"
|
COMPILE< "libgdbm"
|
||||||
{ "gdbm" "gdbm3" "libgdbm-3" } find-library-from-list
|
{ "gdbm" "gdbm3" "libgdbm-3" } find-library-from-list
|
||||||
cdecl add-library >>
|
cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: libgdbm
|
library: libgdbm
|
||||||
|
|
||||||
|
|
|
@ -6,20 +6,20 @@ gobject-introspection gobject-introspection.standard-types
|
||||||
kernel system vocabs vocabs.loader ;
|
kernel system vocabs vocabs.loader ;
|
||||||
in: gdk.ffi
|
in: gdk.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"pango.ffi" require
|
"pango.ffi" require
|
||||||
"gdk.pixbuf.ffi" require
|
"gdk.pixbuf.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gdk
|
library: gdk
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gdk" {
|
"gdk" {
|
||||||
{ [ os windows? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgdk-x11-2.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgdk-x11-2.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
! <workaround these types are from cairo 1.10
|
! <workaround these types are from cairo 1.10
|
||||||
STRUCT: cairo_rectangle_int_t
|
STRUCT: cairo_rectangle_int_t
|
||||||
|
|
|
@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs vocabs.loader ;
|
gobject-introspection kernel system vocabs vocabs.loader ;
|
||||||
in: gdk.gl.ffi
|
in: gdk.gl.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gdk.ffi" require
|
"gdk.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gdk.gl
|
library: gdk.gl
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gdk.gl" {
|
"gdk.gl" {
|
||||||
{ [ os windows? ] [ "libgdkglext-win32-1.0-0.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "libgdkglext-win32-1.0-0.dll" cdecl add-library ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgdkglext-x11-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgdkglext-x11-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: vocab:gdk/gl/GdkGLExt-1.0.gir
|
gir: vocab:gdk/gl/GdkGLExt-1.0.gir
|
||||||
|
|
|
@ -6,15 +6,15 @@ gobject-introspection.standard-types kernel libc sequences
|
||||||
system vocabs ;
|
system vocabs ;
|
||||||
in: gdk.pixbuf.ffi
|
in: gdk.pixbuf.ffi
|
||||||
|
|
||||||
<< "gio.ffi" require >>
|
COMPILE< "gio.ffi" require COMPILE>
|
||||||
|
|
||||||
library: gdk.pixbuf
|
library: gdk.pixbuf
|
||||||
|
|
||||||
<< "gdk.pixbuf" {
|
COMPILE< "gdk.pixbuf" {
|
||||||
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" ] }
|
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" ] }
|
{ [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libgdk_pixbuf-2.0.so" ] }
|
{ [ os unix? ] [ "libgdk_pixbuf-2.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
gir: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir
|
gir: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gio.ffi
|
in: gio.ffi
|
||||||
|
|
||||||
<< "gobject.ffi" require >>
|
COMPILE< "gobject.ffi" require COMPILE>
|
||||||
|
|
||||||
library: gio
|
library: gio
|
||||||
|
|
||||||
<< "gio" {
|
COMPILE< "gio" {
|
||||||
{ [ os windows? ] [ "libgio-2.0-0.dll" ] }
|
{ [ os windows? ] [ "libgio-2.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libgio-2.0.dylib" ] }
|
{ [ os macosx? ] [ "libgio-2.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libgio-2.0.so" ] }
|
{ [ os unix? ] [ "libgio-2.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
gir: vocab:gio/Gio-2.0.gir
|
gir: vocab:gio/Gio-2.0.gir
|
||||||
|
|
|
@ -8,11 +8,11 @@ in: glib.ffi
|
||||||
|
|
||||||
library: glib
|
library: glib
|
||||||
|
|
||||||
<< "glib" {
|
COMPILE< "glib" {
|
||||||
{ [ os windows? ] [ "libglib-2.0-0.dll" ] }
|
{ [ os windows? ] [ "libglib-2.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libglib-2.0.0.dylib" ] }
|
{ [ os macosx? ] [ "libglib-2.0.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libglib-2.0.so" ] }
|
{ [ os unix? ] [ "libglib-2.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ;
|
IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ;
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gmodule.ffi
|
in: gmodule.ffi
|
||||||
|
|
||||||
<< "glib.ffi" require >>
|
COMPILE< "glib.ffi" require COMPILE>
|
||||||
|
|
||||||
library: gmodule
|
library: gmodule
|
||||||
|
|
||||||
<< "gmodule" {
|
COMPILE< "gmodule" {
|
||||||
{ [ os windows? ] [ "libgmodule-2.0-0.dll" ] }
|
{ [ os windows? ] [ "libgmodule-2.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libgmodule-2.0.dylib" ] }
|
{ [ os macosx? ] [ "libgmodule-2.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libgmodule-2.0.so" ] }
|
{ [ os unix? ] [ "libgmodule-2.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
gir: vocab:gmodule/GModule-2.0.gir
|
gir: vocab:gmodule/GModule-2.0.gir
|
||||||
|
|
|
@ -4,7 +4,7 @@ tools.test ;
|
||||||
in: gobject-introspection.ffi.tests
|
in: gobject-introspection.ffi.tests
|
||||||
|
|
||||||
! callback
|
! callback
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
{
|
{
|
||||||
T{ return
|
T{ return
|
||||||
|
@ -31,4 +31,4 @@ in: gobject-introspection.ffi.tests
|
||||||
"none" f simple-type boa "none" return boa return-c-type
|
"none" f simple-type boa "none" return boa return-c-type
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: accessors alien.c-types alien.syntax
|
||||||
classes.struct gobject-introspection.types kernel parser ;
|
classes.struct gobject-introspection.types kernel parser ;
|
||||||
in: gobject-introspection.standard-types
|
in: gobject-introspection.standard-types
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
TYPEDEF: char gchar ;
|
TYPEDEF: char gchar ;
|
||||||
TYPEDEF: uchar guchar ;
|
TYPEDEF: uchar guchar ;
|
||||||
TYPEDEF: short gshort ;
|
TYPEDEF: short gshort ;
|
||||||
|
@ -41,7 +41,7 @@ int lookup-c-type clone
|
||||||
"gboolean" create-word-in typedef
|
"gboolean" create-word-in typedef
|
||||||
|
|
||||||
STRUCT: longdouble { data char[10] } ;
|
STRUCT: longdouble { data char[10] } ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gchar "gchar" register-standard-type
|
gchar "gchar" register-standard-type
|
||||||
guchar "guchar" register-standard-type
|
guchar "guchar" register-standard-type
|
||||||
|
|
|
@ -103,10 +103,10 @@ ERROR: unknown-type-error type ;
|
||||||
|
|
||||||
ERROR: deferred-type-error ;
|
ERROR: deferred-type-error ;
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
void* lookup-c-type clone
|
void* lookup-c-type clone
|
||||||
[ drop deferred-type-error ] >>unboxer-quot
|
[ drop deferred-type-error ] >>unboxer-quot
|
||||||
[ drop deferred-type-error ] >>boxer-quot
|
[ drop deferred-type-error ] >>boxer-quot
|
||||||
object >>boxed-class
|
object >>boxed-class
|
||||||
"deferred-type" create-word-in typedef
|
"deferred-type" create-word-in typedef
|
||||||
>>
|
COMPILE>
|
||||||
|
|
|
@ -6,16 +6,16 @@ in: gobject.ffi
|
||||||
|
|
||||||
! these two are needed for the definition of GError and others.
|
! these two are needed for the definition of GError and others.
|
||||||
! otherwise we generate GError and some others in this vocab as well.
|
! otherwise we generate GError and some others in this vocab as well.
|
||||||
<< "glib.ffi" require >>
|
COMPILE< "glib.ffi" require COMPILE>
|
||||||
use: glib.ffi
|
use: glib.ffi
|
||||||
|
|
||||||
library: gobject
|
library: gobject
|
||||||
|
|
||||||
<< "gobject" {
|
COMPILE< "gobject" {
|
||||||
{ [ os windows? ] [ "libgobject-2.0-0.dll" ] }
|
{ [ os windows? ] [ "libgobject-2.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libgobject-2.0.dylib" ] }
|
{ [ os macosx? ] [ "libgobject-2.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libgobject-2.0.so" ] }
|
{ [ os unix? ] [ "libgobject-2.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
IMPLEMENT-STRUCTS: GValue GParamSpecVariant ;
|
IMPLEMENT-STRUCTS: GValue GParamSpecVariant ;
|
||||||
|
|
||||||
|
|
|
@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gstreamer.base.ffi
|
in: gstreamer.base.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.ffi" require
|
"gstreamer.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gstreamer.base
|
library: gstreamer.base
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.base" {
|
"gstreamer.base" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgstbase-0.10.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgstbase-0.10.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: GstBase-0.10.gir
|
gir: GstBase-0.10.gir
|
||||||
|
|
|
@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gstreamer.controller.ffi
|
in: gstreamer.controller.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.ffi" require
|
"gstreamer.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gstreamer.controller
|
library: gstreamer.controller
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.controller" {
|
"gstreamer.controller" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgstcontroller-0.10.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgstcontroller-0.10.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: GstController-0.10.gir
|
gir: GstController-0.10.gir
|
||||||
|
|
|
@ -4,21 +4,21 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gstreamer.ffi
|
in: gstreamer.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"glib.ffi" require
|
"glib.ffi" require
|
||||||
"gobject.ffi" require
|
"gobject.ffi" require
|
||||||
"gmodule.ffi" require
|
"gmodule.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gstreamer
|
library: gstreamer
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer" {
|
"gstreamer" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
PRIVATE<
|
PRIVATE<
|
||||||
|
|
||||||
|
|
|
@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gstreamer.net.ffi
|
in: gstreamer.net.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.ffi" require
|
"gstreamer.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gstreamer.net
|
library: gstreamer.net
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gstreamer.net" {
|
"gstreamer.net" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgstnet-0.10.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgstnet-0.10.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: GstNet-0.10.gir
|
gir: GstNet-0.10.gir
|
||||||
|
|
|
@ -6,20 +6,20 @@ gobject-introspection.standard-types kernel pango.ffi system
|
||||||
vocabs ;
|
vocabs ;
|
||||||
in: gtk.ffi
|
in: gtk.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"atk.ffi" require
|
"atk.ffi" require
|
||||||
"gdk.ffi" require
|
"gdk.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gtk
|
library: gtk
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gtk" {
|
"gtk" {
|
||||||
{ [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
{ [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
||||||
{ [ os linux? ] [ "libgtk-x11-2.0.so" cdecl add-library ] }
|
{ [ os linux? ] [ "libgtk-x11-2.0.so" cdecl add-library ] }
|
||||||
[ drop ]
|
[ drop ]
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
IMPLEMENT-STRUCTS: GtkTreeIter ;
|
IMPLEMENT-STRUCTS: GtkTreeIter ;
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators
|
||||||
gobject-introspection kernel system vocabs ;
|
gobject-introspection kernel system vocabs ;
|
||||||
in: gtk.gl.ffi
|
in: gtk.gl.ffi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gtk.ffi" require
|
"gtk.ffi" require
|
||||||
"gdk.gl.ffi" require
|
"gdk.gl.ffi" require
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: gtk.gl
|
library: gtk.gl
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"gtk.gl" {
|
"gtk.gl" {
|
||||||
{ [ os windows? ] [ drop ] }
|
{ [ os windows? ] [ drop ] }
|
||||||
{ [ os macosx? ] [ drop ] }
|
{ [ os macosx? ] [ drop ] }
|
||||||
{ [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] }
|
{ [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
gir: vocab:gtk/gl/GtkGLExt-1.0.gir
|
gir: vocab:gtk/gl/GtkGLExt-1.0.gir
|
||||||
|
|
|
@ -3,11 +3,11 @@ core-foundation.bundles core-foundation.dictionaries system
|
||||||
combinators kernel sequences io accessors unix.types ;
|
combinators kernel sequences io accessors unix.types ;
|
||||||
in: iokit
|
in: iokit
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
os macosx?
|
os macosx?
|
||||||
[ "/System/Library/Frameworks/IOKit.framework" load-framework ]
|
[ "/System/Library/Frameworks/IOKit.framework" load-framework ]
|
||||||
when
|
when
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
CONSTANT: kIOKitBuildVersionKey "IOKitBuildVersion" ;
|
CONSTANT: kIOKitBuildVersionKey "IOKitBuildVersion" ;
|
||||||
CONSTANT: kIOKitDiagnosticsKey "IOKitDiagnostics" ;
|
CONSTANT: kIOKitDiagnosticsKey "IOKitDiagnostics" ;
|
||||||
|
|
|
@ -3,11 +3,11 @@ alien.syntax combinators io.sockets.secure system unix.types ;
|
||||||
|
|
||||||
in: libtls.ffi
|
in: libtls.ffi
|
||||||
|
|
||||||
<< "libtls" {
|
COMPILE< "libtls" {
|
||||||
{ [ os windows? ] [ "libtls-10.dll" ] }
|
{ [ os windows? ] [ "libtls-10.dll" ] }
|
||||||
{ [ os macosx? ] [ "libtls.dylib" ] }
|
{ [ os macosx? ] [ "libtls.dylib" ] }
|
||||||
{ [ os unix? ] [ "libtls.so" ] }
|
{ [ os unix? ] [ "libtls.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
c-type: tls_config
|
c-type: tls_config
|
||||||
c-type: tls_ctx
|
c-type: tls_ctx
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax
|
||||||
fry kernel sequences unix.types ;
|
fry kernel sequences unix.types ;
|
||||||
in: libudev
|
in: libudev
|
||||||
|
|
||||||
<< "libudev" "libudev.so" cdecl add-library >>
|
COMPILE< "libudev" "libudev.so" cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: libudev
|
library: libudev
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ system unix.time unix.types ;
|
||||||
FROM: alien.c-types => short ;
|
FROM: alien.c-types => short ;
|
||||||
in: libusb
|
in: libusb
|
||||||
|
|
||||||
<< "libusb" {
|
COMPILE< "libusb" {
|
||||||
{ [ os windows? ] [ "libusb-1.0.dll" ] }
|
{ [ os windows? ] [ "libusb-1.0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libusb-1.0.dylib" ] }
|
{ [ os macosx? ] [ "libusb-1.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libusb-1.0.so" ] }
|
{ [ os unix? ] [ "libusb-1.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
library: libusb
|
library: libusb
|
||||||
|
|
||||||
: libusb_cpu_to_le16 ( x -- y )
|
: libusb_cpu_to_le16 ( x -- y )
|
||||||
|
|
|
@ -5,11 +5,11 @@ alien.syntax classes.struct combinators io.encodings.ascii kernel
|
||||||
locals math system ;
|
locals math system ;
|
||||||
in: lua
|
in: lua
|
||||||
|
|
||||||
<< "liblua5.1" {
|
COMPILE< "liblua5.1" {
|
||||||
{ [ os windows? ] [ "lua5.1.dll" ] }
|
{ [ os windows? ] [ "lua5.1.dll" ] }
|
||||||
{ [ os macosx? ] [ "liblua5.1.dylib" ] }
|
{ [ os macosx? ] [ "liblua5.1.dylib" ] }
|
||||||
{ [ os unix? ] [ "liblua5.1.so" ] }
|
{ [ os unix? ] [ "liblua5.1.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: liblua5.1
|
library: liblua5.1
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ USING:
|
||||||
;
|
;
|
||||||
in: ogg
|
in: ogg
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"ogg" {
|
"ogg" {
|
||||||
{ [ os windows? ] [ "ogg.dll" ] }
|
{ [ os windows? ] [ "ogg.dll" ] }
|
||||||
{ [ os macosx? ] [ "libogg.0.dylib" ] }
|
{ [ os macosx? ] [ "libogg.0.dylib" ] }
|
||||||
|
@ -21,7 +21,7 @@ in: ogg
|
||||||
} cond cdecl add-library
|
} cond cdecl add-library
|
||||||
|
|
||||||
"ogg" deploy-library
|
"ogg" deploy-library
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: ogg
|
library: ogg
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ USING:
|
||||||
;
|
;
|
||||||
in: ogg.theora
|
in: ogg.theora
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"theoradec" {
|
"theoradec" {
|
||||||
{ [ os windows? ] [ "theoradec.dll" ] }
|
{ [ os windows? ] [ "theoradec.dll" ] }
|
||||||
{ [ os macosx? ] [ "libtheoradec.0.dylib" ] }
|
{ [ os macosx? ] [ "libtheoradec.0.dylib" ] }
|
||||||
|
@ -26,7 +26,7 @@ in: ogg.theora
|
||||||
{ [ os macosx? ] [ "libtheoraenc.0.dylib" ] }
|
{ [ os macosx? ] [ "libtheoraenc.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libtheoraenc.so" ] }
|
{ [ os unix? ] [ "libtheoraenc.so" ] }
|
||||||
} cond cdecl add-library
|
} cond cdecl add-library
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
CONSTANT: TH-EFAULT -1 ;
|
CONSTANT: TH-EFAULT -1 ;
|
||||||
CONSTANT: TH-EINVAL -10 ;
|
CONSTANT: TH-EINVAL -10 ;
|
||||||
|
|
|
@ -14,7 +14,7 @@ USING:
|
||||||
;
|
;
|
||||||
in: ogg.vorbis
|
in: ogg.vorbis
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
"vorbis" {
|
"vorbis" {
|
||||||
{ [ os windows? ] [ "vorbis.dll" ] }
|
{ [ os windows? ] [ "vorbis.dll" ] }
|
||||||
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
|
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
|
||||||
|
@ -22,7 +22,7 @@ in: ogg.vorbis
|
||||||
} cond cdecl add-library
|
} cond cdecl add-library
|
||||||
|
|
||||||
"vorbis" deploy-library
|
"vorbis" deploy-library
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: vorbis
|
library: vorbis
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,15 @@ FROM: alien.c-types => float short ;
|
||||||
specialized-array: uint
|
specialized-array: uint
|
||||||
in: openal.alut
|
in: openal.alut
|
||||||
|
|
||||||
<< "alut" {
|
COMPILE< "alut" {
|
||||||
{ [ os windows? ] [ "alut.dll" ] }
|
{ [ os windows? ] [ "alut.dll" ] }
|
||||||
{ [ os macosx? ] [
|
{ [ os macosx? ] [
|
||||||
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
||||||
] }
|
] }
|
||||||
{ [ os unix? ] [ "libalut.so" ] }
|
{ [ os unix? ] [ "libalut.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
<< os macosx? [ "alut" deploy-library ] unless >>
|
COMPILE< os macosx? [ "alut" deploy-library ] unless COMPILE>
|
||||||
|
|
||||||
library: alut
|
library: alut
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@ ushort void ;
|
||||||
specialized-array: uint
|
specialized-array: uint
|
||||||
in: openal
|
in: openal
|
||||||
|
|
||||||
<< "openal" {
|
COMPILE< "openal" {
|
||||||
{ [ os windows? ] [ "OpenAL32.dll" ] }
|
{ [ os windows? ] [ "OpenAL32.dll" ] }
|
||||||
{ [ os macosx? ] [
|
{ [ os macosx? ] [
|
||||||
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
||||||
] }
|
] }
|
||||||
{ [ os unix? ] [ "libopenal.so" ] }
|
{ [ os unix? ] [ "libopenal.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
<< os unix? [ "openal" deploy-library ] unless >>
|
COMPILE< os unix? [ "openal" deploy-library ] unless COMPILE>
|
||||||
|
|
||||||
library: openal
|
library: openal
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ classes.struct combinators system alien.accessors byte-arrays
|
||||||
kernel ;
|
kernel ;
|
||||||
in: opencl.ffi
|
in: opencl.ffi
|
||||||
|
|
||||||
<< "opencl" {
|
COMPILE< "opencl" {
|
||||||
{ [ os windows? ] [ "OpenCL.dll" stdcall ] }
|
{ [ os windows? ] [ "OpenCL.dll" stdcall ] }
|
||||||
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenCL.framework/OpenCL" cdecl ] }
|
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenCL.framework/OpenCL" cdecl ] }
|
||||||
{ [ os unix? ] [ "libOpenCL.so" cdecl ] }
|
{ [ os unix? ] [ "libOpenCL.so" cdecl ] }
|
||||||
} cond add-library >>
|
} cond add-library COMPILE>
|
||||||
library: opencl
|
library: opencl
|
||||||
|
|
||||||
! cl_platform.h
|
! cl_platform.h
|
||||||
|
|
|
@ -16,7 +16,7 @@ symbol: G-world
|
||||||
[ break ] dip
|
[ break ] dip
|
||||||
set-gl-context ;
|
set-gl-context ;
|
||||||
|
|
||||||
<< \ gl-break t "break?" set-word-prop >>
|
COMPILE< \ gl-break t "break?" set-word-prop COMPILE>
|
||||||
|
|
||||||
SYNTAX: GB
|
SYNTAX: GB
|
||||||
\ gl-break suffix! ;
|
\ gl-break suffix! ;
|
||||||
|
|
|
@ -4,12 +4,12 @@ math arrays assocs continuations lexer fry locals vocabs.parser ;
|
||||||
in: opengl.gl.extensions
|
in: opengl.gl.extensions
|
||||||
|
|
||||||
ERROR: unknown-gl-platform ;
|
ERROR: unknown-gl-platform ;
|
||||||
<< {
|
COMPILE< {
|
||||||
{ [ os windows? ] [ "opengl.gl.windows" ] }
|
{ [ os windows? ] [ "opengl.gl.windows" ] }
|
||||||
{ [ os macosx? ] [ "opengl.gl.macosx" ] }
|
{ [ os macosx? ] [ "opengl.gl.macosx" ] }
|
||||||
{ [ os unix? ] [ "opengl.gl.gtk" ] }
|
{ [ os unix? ] [ "opengl.gl.gtk" ] }
|
||||||
[ unknown-gl-platform ]
|
[ unknown-gl-platform ]
|
||||||
} cond use-vocab >>
|
} cond use-vocab COMPILE>
|
||||||
|
|
||||||
symbol: +gl-function-counter+
|
symbol: +gl-function-counter+
|
||||||
symbol: +gl-function-pointers+
|
symbol: +gl-function-pointers+
|
||||||
|
|
|
@ -627,11 +627,11 @@ CONSTANT: GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF ;
|
||||||
|
|
||||||
library: gl
|
library: gl
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
os linux? [
|
os linux? [
|
||||||
"gl" "libGL.so" cdecl add-library
|
"gl" "libGL.so" cdecl add-library
|
||||||
] when
|
] when
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
! Miscellaneous
|
! Miscellaneous
|
||||||
|
|
||||||
|
@ -1125,7 +1125,7 @@ FUNCTION: void glLoadName ( GLuint name ) ;
|
||||||
FUNCTION: void glPushName ( GLuint name ) ;
|
FUNCTION: void glPushName ( GLuint name ) ;
|
||||||
FUNCTION: void glPopName ( ) ;
|
FUNCTION: void glPopName ( ) ;
|
||||||
|
|
||||||
<< reset-gl-function-number-counter >>
|
COMPILE< reset-gl-function-number-counter COMPILE>
|
||||||
|
|
||||||
! OpenGL 1.2
|
! OpenGL 1.2
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax kernel
|
||||||
sequences words system combinators opengl.gl alien.destructors ;
|
sequences words system combinators opengl.gl alien.destructors ;
|
||||||
in: opengl.glu
|
in: opengl.glu
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
os {
|
os {
|
||||||
{ [ dup macosx? ] [ drop ] }
|
{ [ dup macosx? ] [ drop ] }
|
||||||
|
@ -12,7 +12,7 @@ os {
|
||||||
{ [ dup unix? ] [ drop "glu" "libGLU.so.1" cdecl add-library ] }
|
{ [ dup unix? ] [ drop "glu" "libGLU.so.1" cdecl add-library ] }
|
||||||
} cond
|
} cond
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
library: glu
|
library: glu
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,11 @@ alien.syntax classes.struct combinators system ;
|
||||||
|
|
||||||
in: openssl.libcrypto
|
in: openssl.libcrypto
|
||||||
|
|
||||||
<< "libcrypto" {
|
COMPILE< "libcrypto" {
|
||||||
{ [ os windows? ] [ "libcrypto-37.dll" ] }
|
{ [ os windows? ] [ "libcrypto-37.dll" ] }
|
||||||
{ [ os macosx? ] [ "libcrypto.dylib" ] }
|
{ [ os macosx? ] [ "libcrypto.dylib" ] }
|
||||||
{ [ os unix? ] [ "libcrypto.so" ] }
|
{ [ os unix? ] [ "libcrypto.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
STRUCT: bio-method
|
STRUCT: bio-method
|
||||||
{ type int }
|
{ type int }
|
||||||
|
|
|
@ -8,11 +8,11 @@ sequences system words ;
|
||||||
|
|
||||||
in: openssl.libssl
|
in: openssl.libssl
|
||||||
|
|
||||||
<< "libssl" {
|
COMPILE< "libssl" {
|
||||||
{ [ os windows? ] [ "libssl-38.dll" ] }
|
{ [ os windows? ] [ "libssl-38.dll" ] }
|
||||||
{ [ os macosx? ] [ "libssl.dylib" ] }
|
{ [ os macosx? ] [ "libssl.dylib" ] }
|
||||||
{ [ os unix? ] [ "libssl.so" ] }
|
{ [ os unix? ] [ "libssl.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
CONSTANT: X509_FILETYPE_PEM 1 ;
|
CONSTANT: X509_FILETYPE_PEM 1 ;
|
||||||
CONSTANT: X509_FILETYPE_ASN1 2 ;
|
CONSTANT: X509_FILETYPE_ASN1 2 ;
|
||||||
|
@ -529,7 +529,7 @@ CONSTANT: SSL_SESS_CACHE_NO_INTERNAL
|
||||||
! x509_vfy.h
|
! x509_vfy.h
|
||||||
! ===============================================
|
! ===============================================
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
symbol: verify-messages
|
symbol: verify-messages
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ SYNTAX: X509_V_:
|
||||||
[ verify-messages get set-at ]
|
[ verify-messages get set-at ]
|
||||||
2bi ;
|
2bi ;
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
X509_V_: OK 0
|
X509_V_: OK 0
|
||||||
X509_V_: ERR_UNABLE_TO_GET_ISSUER_CERT 2
|
X509_V_: ERR_UNABLE_TO_GET_ISSUER_CERT 2
|
||||||
|
@ -601,10 +601,10 @@ CONSTANT: NID_issuer_alt_name 86 ;
|
||||||
! are placed in libcrypto-37.dll
|
! are placed in libcrypto-37.dll
|
||||||
! ===============================================
|
! ===============================================
|
||||||
|
|
||||||
<< os windows? [
|
COMPILE< os windows? [
|
||||||
"libssl-windows"
|
"libssl-windows"
|
||||||
[ "libcrypto-37.dll" cdecl add-library ] [ current-library set ] bi
|
[ "libcrypto-37.dll" cdecl add-library ] [ current-library set ] bi
|
||||||
] when >>
|
] when COMPILE>
|
||||||
|
|
||||||
! x509.h
|
! x509.h
|
||||||
FUNCTION: int X509_NAME_get_text_by_NID ( X509_NAME* name, int nid, void* buf, int len ) ;
|
FUNCTION: int X509_NAME_get_text_by_NID ( X509_NAME* name, int nid, void* buf, int len ) ;
|
||||||
|
|
|
@ -4,15 +4,15 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators
|
||||||
kernel gobject-introspection system vocabs ;
|
kernel gobject-introspection system vocabs ;
|
||||||
in: pango.cairo.ffi
|
in: pango.cairo.ffi
|
||||||
|
|
||||||
<< "pango.ffi" require >>
|
COMPILE< "pango.ffi" require COMPILE>
|
||||||
|
|
||||||
library: pango.cairo
|
library: pango.cairo
|
||||||
|
|
||||||
<< "pango.cairo" {
|
COMPILE< "pango.cairo" {
|
||||||
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" ] }
|
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libpangocairo-1.0.dylib" ] }
|
{ [ os macosx? ] [ "libpangocairo-1.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libpangocairo-1.0.so" ] }
|
{ [ os unix? ] [ "libpangocairo-1.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
FOREIGN-RECORD-TYPE: cairo.Context cairo_t ;
|
FOREIGN-RECORD-TYPE: cairo.Context cairo_t ;
|
||||||
FOREIGN-RECORD-TYPE: cairo.ScaledFont cairo_scaled_font_t ;
|
FOREIGN-RECORD-TYPE: cairo.ScaledFont cairo_scaled_font_t ;
|
||||||
|
|
|
@ -5,15 +5,15 @@ alien.syntax combinators gobject-introspection
|
||||||
gobject-introspection.standard-types system vocabs ;
|
gobject-introspection.standard-types system vocabs ;
|
||||||
in: pango.ffi
|
in: pango.ffi
|
||||||
|
|
||||||
<< "gobject.ffi" require >>
|
COMPILE< "gobject.ffi" require COMPILE>
|
||||||
|
|
||||||
library: pango
|
library: pango
|
||||||
|
|
||||||
<< "pango" {
|
COMPILE< "pango" {
|
||||||
{ [ os windows? ] [ "libpango-1.0-0.dll" ] }
|
{ [ os windows? ] [ "libpango-1.0-0.dll" ] }
|
||||||
{ [ os macosx? ] [ "libpango-1.0.dylib" ] }
|
{ [ os macosx? ] [ "libpango-1.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libpango-1.0.so" ] }
|
{ [ os unix? ] [ "libpango-1.0.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
IMPLEMENT-STRUCTS: PangoRectangle ;
|
IMPLEMENT-STRUCTS: PangoRectangle ;
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@ USING:
|
||||||
system ;
|
system ;
|
||||||
in: pcre.ffi
|
in: pcre.ffi
|
||||||
|
|
||||||
<< "pcre" {
|
COMPILE< "pcre" {
|
||||||
{ [ os windows? ] [ "pcre.dll" ] }
|
{ [ os windows? ] [ "pcre.dll" ] }
|
||||||
{ [ os macosx? ] [ "libpcre.dylib" ] }
|
{ [ os macosx? ] [ "libpcre.dylib" ] }
|
||||||
{ [ os unix? ] [ "libpcre.so" ] }
|
{ [ os unix? ] [ "libpcre.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: pcre
|
library: pcre
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ system ;
|
||||||
in: python.ffi
|
in: python.ffi
|
||||||
|
|
||||||
! << "python" { "3.0" "3" "2.7" "2.6" } ! Python 3 has a different api, enable someday
|
! << "python" { "3.0" "3" "2.7" "2.6" } ! Python 3 has a different api, enable someday
|
||||||
<< "python"
|
COMPILE< "python"
|
||||||
{ "python2.7" "python2.6" "python27" "python26" } find-library-from-list
|
{ "python2.7" "python2.6" "python27" "python26" } find-library-from-list
|
||||||
cdecl add-library >>
|
cdecl add-library COMPILE>
|
||||||
|
|
||||||
! Functions that return borrowed references needs to be called like this:
|
! Functions that return borrowed references needs to be called like this:
|
||||||
! Py_Func dup Py_IncRef &Py_DecRef
|
! Py_Func dup Py_IncRef &Py_DecRef
|
||||||
|
|
|
@ -5,11 +5,11 @@ alien.syntax classes.struct combinators kernel libc math
|
||||||
namespaces system unix.types ;
|
namespaces system unix.types ;
|
||||||
in: readline.ffi
|
in: readline.ffi
|
||||||
|
|
||||||
<< "readline" {
|
COMPILE< "readline" {
|
||||||
{ [ os windows? ] [ "readline.dll" ] }
|
{ [ os windows? ] [ "readline.dll" ] }
|
||||||
{ [ os macosx? ] [ "libreadline.dylib" ] }
|
{ [ os macosx? ] [ "libreadline.dylib" ] }
|
||||||
{ [ os unix? ] [ "libreadline.so" ] }
|
{ [ os unix? ] [ "libreadline.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: readline
|
library: readline
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ alien.syntax classes.struct sequences system unix.time
|
||||||
unix.types vocabs ;
|
unix.types vocabs ;
|
||||||
in: unix.ffi
|
in: unix.ffi
|
||||||
|
|
||||||
<< "unix.ffi." os name>> append require >>
|
COMPILE< "unix.ffi." os name>> append require COMPILE>
|
||||||
|
|
||||||
CONSTANT: PROT_NONE 0 ;
|
CONSTANT: PROT_NONE 0 ;
|
||||||
CONSTANT: PROT_READ 1 ;
|
CONSTANT: PROT_READ 1 ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien.c-types alien.syntax system sequences vocabs.loader words
|
||||||
accessors vocabs ;
|
accessors vocabs ;
|
||||||
in: unix.kqueue
|
in: unix.kqueue
|
||||||
|
|
||||||
<< "unix.kqueue." os name>> append require >>
|
COMPILE< "unix.kqueue." os name>> append require COMPILE>
|
||||||
|
|
||||||
FUNCTION: int kqueue ( ) ;
|
FUNCTION: int kqueue ( ) ;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ STRUCT: fsid
|
||||||
TYPEDEF: fsid __fsid_t ;
|
TYPEDEF: fsid __fsid_t ;
|
||||||
TYPEDEF: fsid fsid_t ;
|
TYPEDEF: fsid fsid_t ;
|
||||||
|
|
||||||
<< "unix.stat." os name>> append require >>
|
COMPILE< "unix.stat." os name>> append require COMPILE>
|
||||||
|
|
||||||
: file-status ( pathname -- stat )
|
: file-status ( pathname -- stat )
|
||||||
\ stat <struct> [ [ stat-func ] unix-system-call drop ] keep ;
|
\ stat <struct> [ [ stat-func ] unix-system-call drop ] keep ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax
|
||||||
classes.struct kernel math windows.types windows.ole32 ;
|
classes.struct kernel math windows.types windows.ole32 ;
|
||||||
in: windows.ddk.hid
|
in: windows.ddk.hid
|
||||||
|
|
||||||
<< "hid" "hid.dll" stdcall add-library >>
|
COMPILE< "hid" "hid.dll" stdcall add-library COMPILE>
|
||||||
library: hid
|
library: hid
|
||||||
|
|
||||||
TYPEDEF: LONG NTSTATUS ;
|
TYPEDEF: LONG NTSTATUS ;
|
||||||
|
|
|
@ -5,7 +5,7 @@ classes.struct alien alien.c-types windows.errors windows.ole32
|
||||||
windows.advapi32 alien.libraries ;
|
windows.advapi32 alien.libraries ;
|
||||||
in: windows.ddk.setupapi
|
in: windows.ddk.setupapi
|
||||||
|
|
||||||
<< "setupapi" "setupapi.dll" stdcall add-library >>
|
COMPILE< "setupapi" "setupapi.dll" stdcall add-library COMPILE>
|
||||||
library: setupapi
|
library: setupapi
|
||||||
|
|
||||||
TYPEDEF: DWORDLONG SP_LOG_TOKEN ;
|
TYPEDEF: DWORDLONG SP_LOG_TOKEN ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien alien.c-types alien.syntax classes.struct
|
||||||
windows.kernel32 windows.types alien.libraries ;
|
windows.kernel32 windows.types alien.libraries ;
|
||||||
in: windows.ddk.winusb
|
in: windows.ddk.winusb
|
||||||
|
|
||||||
<< "winusb" "winusb.dll" stdcall add-library >>
|
COMPILE< "winusb" "winusb.dll" stdcall add-library COMPILE>
|
||||||
library: winusb
|
library: winusb
|
||||||
|
|
||||||
TYPEDEF: PVOID WINUSB_INTERFACE_HANDLE ;
|
TYPEDEF: PVOID WINUSB_INTERFACE_HANDLE ;
|
||||||
|
|
|
@ -23,7 +23,7 @@ PRIVATE<
|
||||||
: initialize ( variable quot -- )
|
: initialize ( variable quot -- )
|
||||||
call swap set-global ; inline
|
call swap set-global ; inline
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
GENERIC: array-base-type ( c-type -- c-type' ) ;
|
GENERIC: array-base-type ( c-type -- c-type' ) ;
|
||||||
M: object array-base-type ;
|
M: object array-base-type ;
|
||||||
|
@ -68,7 +68,7 @@ M: array array-base-type first ;
|
||||||
[ ] tri
|
[ ] tri
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
MACRO: <DIDATAFORMAT> ( dwFlags dwDataSize struct rgodf-array -- alien )
|
MACRO: <DIDATAFORMAT> ( dwFlags dwDataSize struct rgodf-array -- alien )
|
||||||
[ DIDATAFORMAT heap-size DIOBJECTDATAFORMAT heap-size ] 4 ndip
|
[ DIDATAFORMAT heap-size DIOBJECTDATAFORMAT heap-size ] 4 ndip
|
||||||
|
|
|
@ -22,7 +22,7 @@ STRUCT: DWM_BLURBEHIND
|
||||||
: full-window-margins ( -- MARGINS )
|
: full-window-margins ( -- MARGINS )
|
||||||
-1 -1 -1 -1 <MARGINS> ; inline
|
-1 -1 -1 -1 <MARGINS> ; inline
|
||||||
|
|
||||||
<< "dwmapi" "dwmapi.dll" stdcall add-library >>
|
COMPILE< "dwmapi" "dwmapi.dll" stdcall add-library COMPILE>
|
||||||
|
|
||||||
library: dwmapi
|
library: dwmapi
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ in: windows.iphlpapi
|
||||||
|
|
||||||
library: iphlpapi
|
library: iphlpapi
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
CONSTANT: DEFAULT_MINIMUM_ENTITIES 32 ;
|
CONSTANT: DEFAULT_MINIMUM_ENTITIES 32 ;
|
||||||
CONSTANT: MAX_ADAPTER_ADDRESS_LENGTH 8 ;
|
CONSTANT: MAX_ADAPTER_ADDRESS_LENGTH 8 ;
|
||||||
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH 128 ;
|
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH 128 ;
|
||||||
|
@ -28,7 +28,7 @@ CONSTANT: IF_TOKEN_RING_ADAPTERTYPE 2 ;
|
||||||
CONSTANT: IF_FDDI_ADAPTERTYPE 3 ;
|
CONSTANT: IF_FDDI_ADAPTERTYPE 3 ;
|
||||||
CONSTANT: IF_PPP_ADAPTERTYPE 4 ;
|
CONSTANT: IF_PPP_ADAPTERTYPE 4 ;
|
||||||
CONSTANT: IF_LOOPBACK_ADAPTERTYPE 5 ;
|
CONSTANT: IF_LOOPBACK_ADAPTERTYPE 5 ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
CONSTANT: MAX_DOMAIN_NAME_LEN+4 132 ;
|
CONSTANT: MAX_DOMAIN_NAME_LEN+4 132 ;
|
||||||
CONSTANT: MAX_HOSTNAME_LEN+4 132 ;
|
CONSTANT: MAX_HOSTNAME_LEN+4 132 ;
|
||||||
|
|
|
@ -8,10 +8,10 @@ windows.errors windows.kernel32 windows.types ;
|
||||||
FROM: alien.c-types => short ;
|
FROM: alien.c-types => short ;
|
||||||
in: windows.winsock
|
in: windows.winsock
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
! Some differences between Win32 and Win64
|
! Some differences between Win32 and Win64
|
||||||
cpu x86.64? "windows.winsock.64" "windows.winsock.32" ? use-vocab
|
cpu x86.64? "windows.winsock.64" "windows.winsock.32" ? use-vocab
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
TYPEDEF: int* SOCKET ;
|
TYPEDEF: int* SOCKET ;
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ symbol: xim
|
||||||
XNResourceClass over 0 XCreateIC
|
XNResourceClass over 0 XCreateIC
|
||||||
[ "XCreateIC() failed" throw ] unless* ;
|
[ "XCreateIC() failed" throw ] unless* ;
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
CONSTANT: buf-size 100 ;
|
CONSTANT: buf-size 100 ;
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
CONSTANT: buf $[ buf-size <byte-array> ] ;
|
CONSTANT: buf $[ buf-size <byte-array> ] ;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ classes.struct locals sequences x11.syntax x11.xlib ;
|
||||||
EXCLUDE: math => float ;
|
EXCLUDE: math => float ;
|
||||||
in: x11.xinput2.ffi
|
in: x11.xinput2.ffi
|
||||||
|
|
||||||
<< "xinput2" "libXi.so" cdecl add-library >>
|
COMPILE< "xinput2" "libXi.so" cdecl add-library COMPILE>
|
||||||
|
|
||||||
library: xinput2
|
library: xinput2
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ USING: alien alien.c-types alien.libraries alien.syntax
|
||||||
combinators system ;
|
combinators system ;
|
||||||
in: db.postgresql.ffi
|
in: db.postgresql.ffi
|
||||||
|
|
||||||
<< "postgresql" {
|
COMPILE< "postgresql" {
|
||||||
{ [ os windows? ] [ "libpq.dll" ] }
|
{ [ os windows? ] [ "libpq.dll" ] }
|
||||||
{ [ os macosx? ] [ "libpq.dylib" ] }
|
{ [ os macosx? ] [ "libpq.dylib" ] }
|
||||||
{ [ os unix? ] [ "libpq.so" ] }
|
{ [ os unix? ] [ "libpq.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
! ConnSatusType
|
! ConnSatusType
|
||||||
CONSTANT: CONNECTION_OK 0x0 ;
|
CONSTANT: CONNECTION_OK 0x0 ;
|
||||||
|
|
|
@ -6,11 +6,11 @@ USING: alien alien.c-types alien.libraries alien.syntax
|
||||||
combinators system ;
|
combinators system ;
|
||||||
in: db.sqlite.ffi
|
in: db.sqlite.ffi
|
||||||
|
|
||||||
<< "sqlite" {
|
COMPILE< "sqlite" {
|
||||||
{ [ os windows? ] [ "sqlite3.dll" ] }
|
{ [ os windows? ] [ "sqlite3.dll" ] }
|
||||||
{ [ os macosx? ] [ "libsqlite3.dylib" ] }
|
{ [ os macosx? ] [ "libsqlite3.dylib" ] }
|
||||||
{ [ os unix? ] [ "libsqlite3.so" ] }
|
{ [ os unix? ] [ "libsqlite3.so" ] }
|
||||||
} cond cdecl add-library >>
|
} cond cdecl add-library COMPILE>
|
||||||
|
|
||||||
! Return values from sqlite functions
|
! Return values from sqlite functions
|
||||||
CONSTANT: SQLITE_OK 0 ; ! Successful result
|
CONSTANT: SQLITE_OK 0 ; ! Successful result
|
||||||
|
|
|
@ -2,7 +2,7 @@ USING: furnace.utilities io.encodings.utf8 io.files io.files.temp kernel
|
||||||
multiline parser tools.test webapps.counter ;
|
multiline parser tools.test webapps.counter ;
|
||||||
in: furnace.utilities.tests
|
in: furnace.utilities.tests
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
STRING: dummy-vocab
|
STRING: dummy-vocab
|
||||||
in: dummy-vocab
|
in: dummy-vocab
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ in: dummy-vocab
|
||||||
;
|
;
|
||||||
|
|
||||||
dummy-vocab "dummy.factor" temp-file [ utf8 set-file-contents ] keep run-file
|
dummy-vocab "dummy.factor" temp-file [ utf8 set-file-contents ] keep run-file
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
{ t } [
|
{ t } [
|
||||||
use: dummy-vocab
|
use: dummy-vocab
|
||||||
|
|
|
@ -3,11 +3,11 @@ vocabs vocabs.parser words namespaces ;
|
||||||
in: ui.pixel-formats
|
in: ui.pixel-formats
|
||||||
|
|
||||||
! break circular dependency
|
! break circular dependency
|
||||||
<<
|
COMPILE<
|
||||||
"ui.gadgets.worlds" create-vocab drop
|
"ui.gadgets.worlds" create-vocab drop
|
||||||
"world" "ui.gadgets.worlds" create-word drop
|
"world" "ui.gadgets.worlds" create-word drop
|
||||||
"ui.gadgets.worlds" vocab-words-assoc use-words
|
"ui.gadgets.worlds" vocab-words-assoc use-words
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
ARTICLE: "ui.pixel-formats-attributes" "Pixel format attributes"
|
ARTICLE: "ui.pixel-formats-attributes" "Pixel format attributes"
|
||||||
"The following pixel format attributes can be requested and queried of " { $link pixel-format } "s. Binary attributes are represented by the presence of a symbol in an attribute sequence:"
|
"The following pixel format attributes can be requested and queried of " { $link pixel-format } "s. Binary attributes are represented by the presence of a symbol in an attribute sequence:"
|
||||||
|
|
|
@ -4,12 +4,12 @@ USING: accessors alien.c-types alien.complex.functor kernel
|
||||||
sequences ;
|
sequences ;
|
||||||
in: alien.complex
|
in: alien.complex
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
{ "float" "double" } [ dup "complex-" prepend define-complex-type ] each
|
{ "float" "double" } [ dup "complex-" prepend define-complex-type ] each
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
! This overrides the fact that small structures are never returned
|
! This overrides the fact that small structures are never returned
|
||||||
! in registers on Linux running on 32-bit x86.
|
! in registers on Linux running on 32-bit x86.
|
||||||
\ complex-float lookup-c-type t >>return-in-registers? drop
|
\ complex-float lookup-c-type t >>return-in-registers? drop
|
||||||
>>
|
COMPILE>
|
||||||
|
|
|
@ -40,12 +40,12 @@ ENUM: colores { rojo red } { verde green } { azul blue } { colorado rojo } ;
|
||||||
|
|
||||||
SYMBOLS: couleurs rouge vert bleu jaune azure ;
|
SYMBOLS: couleurs rouge vert bleu jaune azure ;
|
||||||
|
|
||||||
<< \ couleurs int {
|
COMPILE< \ couleurs int {
|
||||||
{ rouge red }
|
{ rouge red }
|
||||||
{ vert green }
|
{ vert green }
|
||||||
{ bleu blue }
|
{ bleu blue }
|
||||||
{ jaune 14 }
|
{ jaune 14 }
|
||||||
{ azure bleu }
|
{ azure bleu }
|
||||||
} define-enum >>
|
} define-enum COMPILE>
|
||||||
|
|
||||||
{ { 0 3 4 14 4 } } [ { rouge vert bleu jaune azure } [ enum>number ] map ] unit-test
|
{ { 0 3 4 14 4 } } [ { rouge vert bleu jaune azure } [ enum>number ] map ] unit-test
|
||||||
|
|
|
@ -8,7 +8,7 @@ QUALIFIED-WITH: alien.c-types c ;
|
||||||
QUALIFIED-WITH: alien.syntax s ;
|
QUALIFIED-WITH: alien.syntax s ;
|
||||||
in: alien.fortran.tests
|
in: alien.fortran.tests
|
||||||
|
|
||||||
<< intel-unix-abi "(alien.fortran-tests)" (add-fortran-library) >>
|
COMPILE< intel-unix-abi "(alien.fortran-tests)" (add-fortran-library) COMPILE>
|
||||||
library: (alien.fortran-tests)
|
library: (alien.fortran-tests)
|
||||||
STRUCT: fortran_test_record
|
STRUCT: fortran_test_record
|
||||||
{ FOO int }
|
{ FOO int }
|
||||||
|
|
|
@ -5,7 +5,7 @@ lexer namespaces parser sequences sets tools.test vocabs.parser words
|
||||||
;
|
;
|
||||||
in: alien.parser.tests
|
in: alien.parser.tests
|
||||||
|
|
||||||
<<
|
COMPILE<
|
||||||
|
|
||||||
: with-parsing ( lines quot -- )
|
: with-parsing ( lines quot -- )
|
||||||
[ <lexer> ] [ '[ _ with-compilation-unit ] ] bi* with-lexer ; inline
|
[ <lexer> ] [ '[ _ with-compilation-unit ] ] bi* with-lexer ; inline
|
||||||
|
@ -46,7 +46,7 @@ in: alien.parser.tests
|
||||||
{ "ayae" } [ parse-enum-name new-definitions get first in? ] with-parsing
|
{ "ayae" } [ parse-enum-name new-definitions get first in? ] with-parsing
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
>>
|
COMPILE>
|
||||||
|
|
||||||
TYPEDEF: char char2 ;
|
TYPEDEF: char char2 ;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue