From f51e1a50f9a2c3b14e7ac75f380c320e3694aec8 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 13 Jun 2016 16:48:59 -0700 Subject: [PATCH] factor: << -> COMPILE< fix modern parser bug --- .../raytracer-simd/raytracer-simd.factor | 2 +- benchmarks/benchmark/sum-file/sum-file.factor | 4 +- collections/bit-vectors/bit-vectors.factor | 2 +- collections/io/binary/fast/fast.factor | 4 +- .../hashtables/config/config.factor | 2 +- .../hashtables/hashtables-tests.factor | 4 +- collections/sequences/parser/parser.factor | 2 +- .../sequences/unrolled/unrolled.factor | 4 +- core-locals.factor | 44 +++++++++---------- core/bootstrap/syntax.factor | 4 +- core/classes/tuple/tuple-tests.factor | 2 +- core/combinators/combinators-tests.factor | 2 +- core/compiler/units/units-tests.factor | 2 +- core/continuations/continuations-tests.factor | 2 +- .../cpu/architecture/architecture-docs.factor | 4 +- core/generalizations/generalizations.factor | 4 +- core/kernel/kernel-tests.factor | 6 +-- core/layouts/layouts.factor | 4 +- core/locals/parser/parser-tests.factor | 8 ++-- core/modern/compiler/compiler.factor | 2 +- core/modern/modern.factor | 10 ++--- core/parser/parser-tests.factor | 2 +- core/syntax/syntax-docs.factor | 4 +- core/syntax/syntax.factor | 10 ++++- core/vocabs/loader/test/a/a.factor | 2 +- core/vocabs/loader/test/b/b.factor | 2 +- demos/talks/tc-lisp-talk/tc-lisp-talk.factor | 2 +- ffi/atk/ffi/ffi.factor | 6 +-- ffi/cairo/ffi/ffi.factor | 4 +- ffi/clutter/cally/ffi/ffi.factor | 8 ++-- ffi/clutter/cogl/ffi/ffi.factor | 8 ++-- ffi/clutter/ffi/ffi.factor | 8 ++-- ffi/clutter/gtk/ffi/ffi.factor | 8 ++-- ffi/clutter/json/ffi/ffi.factor | 8 ++-- ffi/core-graphics/types/types.factor | 2 +- ffi/cuda/ffi/ffi.factor | 8 ++-- ffi/curl/ffi/ffi.factor | 4 +- ffi/curses/ffi/ffi.factor | 4 +- ffi/fftw/ffi/ffi.factor | 4 +- ffi/forestdb/ffi/ffi.factor | 2 +- ffi/freetype/freetype.factor | 4 +- ffi/gdbm/ffi/ffi.factor | 4 +- ffi/gdk/ffi/ffi.factor | 8 ++-- ffi/gdk/gl/ffi/ffi.factor | 8 ++-- ffi/gdk/pixbuf/ffi/ffi.factor | 6 +-- ffi/gio/ffi/ffi.factor | 6 +-- ffi/glib/ffi/ffi.factor | 4 +- ffi/gmodule/ffi/ffi.factor | 6 +-- .../ffi/ffi-tests.factor | 4 +- .../standard-types/standard-types.factor | 4 +- ffi/gobject-introspection/types/types.factor | 4 +- ffi/gobject/ffi/ffi.factor | 6 +-- ffi/gstreamer/base/ffi/ffi.factor | 8 ++-- ffi/gstreamer/controller/ffi/ffi.factor | 8 ++-- ffi/gstreamer/ffi/ffi.factor | 8 ++-- ffi/gstreamer/net/ffi/ffi.factor | 8 ++-- ffi/gtk/ffi/ffi.factor | 8 ++-- ffi/gtk/gl/ffi/ffi.factor | 8 ++-- ffi/iokit/iokit.factor | 4 +- ffi/libtls/ffi/ffi.factor | 4 +- ffi/libudev/libudev.factor | 2 +- ffi/libusb/libusb.factor | 4 +- ffi/lua/lua.factor | 4 +- ffi/ogg/ogg.factor | 4 +- ffi/ogg/theora/theora.factor | 4 +- ffi/ogg/vorbis/vorbis.factor | 4 +- ffi/openal/alut/alut.factor | 6 +-- ffi/openal/openal.factor | 6 +-- ffi/opencl/ffi/ffi.factor | 4 +- ffi/opengl/debug/debug.factor | 2 +- ffi/opengl/gl/extensions/extensions.factor | 4 +- ffi/opengl/gl/gl.factor | 6 +-- ffi/opengl/glu/glu.factor | 4 +- ffi/openssl/libcrypto/libcrypto.factor | 4 +- ffi/openssl/libssl/libssl.factor | 12 ++--- ffi/pango/cairo/ffi/ffi.factor | 6 +-- ffi/pango/ffi/ffi.factor | 6 +-- ffi/pcre/ffi/ffi.factor | 4 +- ffi/python/ffi/ffi.factor | 4 +- ffi/readline/ffi/ffi.factor | 4 +- ffi/unix/ffi/ffi.factor | 2 +- ffi/unix/kqueue/kqueue.factor | 2 +- ffi/unix/stat/stat.factor | 2 +- ffi/windows/ddk/hid/hid.factor | 2 +- ffi/windows/ddk/setupapi/setupapi.factor | 2 +- ffi/windows/ddk/winusb/winusb.factor | 2 +- .../directx/dinput/constants/constants.factor | 4 +- ffi/windows/dwmapi/dwmapi.factor | 2 +- ffi/windows/iphlpapi/iphlpapi.factor | 4 +- ffi/windows/winsock/winsock.factor | 4 +- ffi/x11/xim/xim.factor | 4 +- ffi/x11/xinput2/ffi/ffi.factor | 2 +- frameworks/db/postgresql/ffi/ffi.factor | 4 +- frameworks/db/sqlite/ffi/ffi.factor | 4 +- .../furnace/utilities/utilities-tests.factor | 4 +- .../pixel-formats/pixel-formats-docs.factor | 4 +- language/alien/complex/complex.factor | 8 ++-- language/alien/enums/enums-tests.factor | 4 +- language/alien/fortran/fortran-tests.factor | 2 +- language/alien/parser/parser-tests.factor | 4 +- language/alien/syntax/syntax.factor | 2 +- .../bootstrap/assembler/ppc.32.linux.factor | 2 +- .../bootstrap/assembler/ppc.64.linux.factor | 2 +- .../bootstrap/assembler/x86.32.unix.factor | 6 +-- .../bootstrap/assembler/x86.32.windows.factor | 6 +-- .../bootstrap/assembler/x86.64.unix.factor | 6 +-- .../bootstrap/assembler/x86.64.windows.factor | 6 +-- language/classes/struct/struct-tests.factor | 2 +- .../cfg/builder/alien/alien-docs.factor | 4 +- .../cfg/builder/blocks/blocks-docs.factor | 4 +- .../compiler/cfg/builder/builder-docs.factor | 4 +- .../cfg/gvn/expressions/expressions.factor | 4 +- language/compiler/cfg/hats/hats.factor | 4 +- .../cfg/instructions/instructions.factor | 4 +- .../instructions/syntax/syntax-docs.factor | 4 +- .../expressions/expressions.factor | 4 +- language/compiler/codegen/codegen-docs.factor | 4 +- language/compiler/codegen/codegen.factor | 8 ++-- language/compiler/test/test.factor | 2 +- language/compiler/tests/alien.factor | 4 +- language/compiler/tests/linkage-errors.factor | 2 +- language/compiler/tests/pic-problem-1.factor | 2 +- language/compiler/tests/redefine0.factor | 4 +- language/compiler/tests/redefine13.factor | 2 +- language/compiler/tests/redefine17.factor | 2 +- language/compiler/tests/redefine21.factor | 4 +- .../tree/propagation/propagation-docs.factor | 4 +- .../constructors/constructors-tests.factor | 4 +- language/cpu/arm/assembler/assembler.factor | 4 +- language/definitions/icons/icons.factor | 4 +- language/functors/functors-tests.factor | 32 +++++++------- language/io/backend/unix/macosx/macosx.factor | 2 +- language/io/sockets/icmp/icmp.factor | 4 +- language/io/sockets/sockets.factor | 4 +- language/literals/literals-tests.factor | 4 +- .../multi-methods/tests/definitions.factor | 2 +- language/multiline/multiline-tests.factor | 4 +- language/peg/ebnf/ebnf-tests.factor | 4 +- language/serialize/serialize-tests.factor | 2 +- libs/annotations/annotations.factor | 4 +- libs/base64/base64.factor | 4 +- libs/base85/base85.factor | 4 +- libs/c/lexer/lexer.factor | 2 +- libs/calendar/holidays/holidays.factor | 4 +- libs/chipmunk/ffi/ffi.factor | 4 +- libs/compression/snappy/ffi/ffi.factor | 4 +- libs/compression/zlib/ffi/ffi.factor | 4 +- libs/english/english.factor | 4 +- libs/gml/runtime/runtime.factor | 4 +- libs/html/elements/elements.factor | 4 +- libs/libc/libc.factor | 2 +- libs/magic/ffi/ffi.factor | 4 +- libs/math/bitwise/bitwise.factor | 4 +- libs/math/blas/ffi/ffi.factor | 4 +- libs/math/blas/matrices/matrices.factor | 4 +- libs/math/blas/vectors/vectors.factor | 4 +- libs/math/floats/half/half.factor | 4 +- libs/math/libm/libm.factor | 4 +- libs/math/vectors/simd/cords/cords.factor | 4 +- libs/math/vectors/simd/simd.factor | 12 ++--- libs/path-finding/path-finding-tests.factor | 12 ++--- libs/random/data/data.factor | 4 +- libs/roman/roman.factor | 4 +- libs/sorting/human/human.factor | 4 +- libs/sorting/slots/slots-tests.factor | 2 +- libs/sorting/title/title.factor | 4 +- libs/text-analysis/text-analysis.factor | 4 +- libs/tokyo/abstractdb/abstractdb.factor | 2 +- libs/tokyo/alien/tcrdb/tcrdb.factor | 4 +- libs/tokyo/alien/tcutil/tcutil.factor | 4 +- libs/tokyo/remotedb/remotedb.factor | 2 +- libs/unicode/breaks/breaks.factor | 12 ++--- libs/unicode/script/script.factor | 4 +- libs/xml/errors/errors.factor | 4 +- libs/xmode/tokens/tokens.factor | 4 +- libs/yaml/ffi/ffi.factor | 4 +- libs/yaml/yaml-docs.factor | 2 +- libs/yaml/yaml-tests.factor | 4 +- libs/zeromq/ffi/ffi.factor | 6 +-- misc/fuel/strange-syntax.factor | 4 +- tools/graphviz/notation/notation.factor | 4 +- tools/mason/release/sign/sign.factor | 4 +- .../tools/continuations/continuations.factor | 4 +- tools/tools/disassembler/udis/udis.factor | 4 +- .../data-heap-reader/data-heap-reader.factor | 4 +- .../image-analyzer/graphviz/graphviz.factor | 4 +- tools/tools/test/test.factor | 4 +- tools/tools/trace/trace.factor | 2 +- tools/tools/walker/walker.factor | 2 +- .../alien/inline/syntax/syntax-tests.factor | 2 +- unmaintained/alien/marshall/marshall.factor | 4 +- unmaintained/cryptlib/libcl/libcl.factor | 4 +- unmaintained/db/mysql/ffi/ffi.factor | 4 +- .../gstreamer/plugins/app/ffi/ffi.factor | 4 +- .../gstreamer/plugins/audio/ffi/ffi.factor | 4 +- .../gstreamer/plugins/fft/ffi/ffi.factor | 4 +- .../plugins/interfaces/ffi/ffi.factor | 4 +- .../plugins/netbuffer/ffi/ffi.factor | 4 +- .../gstreamer/plugins/pbutils/ffi/ffi.factor | 4 +- .../gstreamer/plugins/riff/ffi/ffi.factor | 4 +- .../gstreamer/plugins/rtp/ffi/ffi.factor | 4 +- .../gstreamer/plugins/rtsp/ffi/ffi.factor | 4 +- .../gstreamer/plugins/sdp/ffi/ffi.factor | 4 +- .../gstreamer/plugins/tag/ffi/ffi.factor | 4 +- .../gstreamer/plugins/video/ffi/ffi.factor | 4 +- .../processing/rotation/rotation-tests.factor | 4 +- unmaintained/javascriptcore/ffi/ffi.factor | 4 +- unmaintained/ldap/libldap/libldap.factor | 4 +- unmaintained/llvm/clang/ffi/ffi.factor | 4 +- unmaintained/llvm/core/core.factor | 4 +- unmaintained/llvm/engine/engine.factor | 4 +- .../llvm/invoker/invoker-tests.factor | 2 +- unmaintained/llvm/invoker/invoker.factor | 2 +- .../models/combinators/combinators.factor | 3 +- unmaintained/odbc/odbc.factor | 2 +- unmaintained/pdf/libhpdf/libhpdf.factor | 4 +- unmaintained/sandbox/sandbox-tests.factor | 2 +- 217 files changed, 492 insertions(+), 485 deletions(-) diff --git a/benchmarks/benchmark/raytracer-simd/raytracer-simd.factor b/benchmarks/benchmark/raytracer-simd/raytracer-simd.factor index 9126ae7b71..ca8673b9b7 100644 --- a/benchmarks/benchmark/raytracer-simd/raytracer-simd.factor +++ b/benchmarks/benchmark/raytracer-simd/raytracer-simd.factor @@ -7,7 +7,7 @@ math.vectors math.vectors.simd math.vectors.simd.cords math.parser make sequences words combinators ; 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 diff --git a/benchmarks/benchmark/sum-file/sum-file.factor b/benchmarks/benchmark/sum-file/sum-file.factor index 5860e8d26f..ddaeb3dc98 100644 --- a/benchmarks/benchmark/sum-file/sum-file.factor +++ b/benchmarks/benchmark/sum-file/sum-file.factor @@ -2,11 +2,11 @@ USING: io io.encodings.ascii io.files io.files.temp math math.parser kernel sequences ; in: benchmark.sum-file -<< +COMPILE< "sum-file.txt" temp-file ascii [ 100000 iota [ number>string print ] each ] with-file-writer ->> +COMPILE> : sum-file ( file -- n ) ascii [ 0 [ string>number + ] each-line ] with-file-reader ; diff --git a/collections/bit-vectors/bit-vectors.factor b/collections/bit-vectors/bit-vectors.factor index 9ee20819f2..1846907688 100644 --- a/collections/bit-vectors/bit-vectors.factor +++ b/collections/bit-vectors/bit-vectors.factor @@ -5,7 +5,7 @@ sequences.private growable bit-arrays prettyprint.custom parser accessors vectors.functor classes.parser ; in: bit-vectors -<< "bit-vector" create-class-in \ bit-array \ define-vector >> +COMPILE< "bit-vector" create-class-in \ bit-array \ define-vector COMPILE> SYNTAX: \ ?V{ \ } [ >bit-vector ] parse-literal ; diff --git a/collections/io/binary/fast/fast.factor b/collections/io/binary/fast/fast.factor index 35c9c8e8e7..afae5b51a6 100644 --- a/collections/io/binary/fast/fast.factor +++ b/collections/io/binary/fast/fast.factor @@ -16,7 +16,7 @@ ERROR: bad-length bytes n ; : check-length ( bytes n -- bytes n ) 2dup [ length ] dip > [ bad-length ] when ; inline -<< +COMPILE< : be-range ( n -- range ) 1 - 8 * 0 -8 ; inline @@ -30,7 +30,7 @@ ERROR: bad-length bytes n ; MACRO: reassemble-be ( n -- quot ) be-range reassemble-bytes ; MACRO: reassemble-le ( n -- quot ) le-range reassemble-bytes ; ->> +COMPILE> :: n-be> ( bytes n -- x ) bytes n check-length drop n firstn-unsafe n reassemble-be ; inline diff --git a/collections/persistent/hashtables/config/config.factor b/collections/persistent/hashtables/config/config.factor index 078bd9f721..a838b47b4a 100644 --- a/collections/persistent/hashtables/config/config.factor +++ b/collections/persistent/hashtables/config/config.factor @@ -3,6 +3,6 @@ USING: layouts kernel parser math math.bitwise sequences ; 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 : full-bitmap-mask ( -- n ) radix-bits 2^ on-bits ; inline diff --git a/collections/persistent/hashtables/hashtables-tests.factor b/collections/persistent/hashtables/hashtables-tests.factor index 519afb381d..fd20c83ca2 100644 --- a/collections/persistent/hashtables/hashtables-tests.factor +++ b/collections/persistent/hashtables/hashtables-tests.factor @@ -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 ! the below hashtables are parsed... -<< +COMPILE< TUPLE: hash-0-a ; @@ -22,7 +22,7 @@ TUPLE: hash-0-b ; M: hash-0-b hashcode* 2drop 0 ; ->> +COMPILE> { } [ PH{ } diff --git a/collections/sequences/parser/parser.factor b/collections/sequences/parser/parser.factor index 5c68a89e0f..94663ef00d 100644 --- a/collections/sequences/parser/parser.factor +++ b/collections/sequences/parser/parser.factor @@ -132,7 +132,7 @@ TUPLE: sequence-parser sequence n ; sequence-parser [ n + ] change-n drop ] if ; -<< "length" [ length ] define-sorting >> +COMPILE< "length" [ length ] define-sorting COMPILE> : sort-tokens ( seq -- seq' ) { length>=< <=> } sort-by ; diff --git a/collections/sequences/unrolled/unrolled.factor b/collections/sequences/unrolled/unrolled.factor index 24c0ec51af..62f9a8e2f2 100644 --- a/collections/sequences/unrolled/unrolled.factor +++ b/collections/sequences/unrolled/unrolled.factor @@ -8,9 +8,9 @@ PRIVATE< : (unrolled-each-integer) ( quot n -- ) swap '[ _ call( i -- ) ] each-integer ; -<< \ (unrolled-each-integer) [ +COMPILE< \ (unrolled-each-integer) [ iota [ '[ _ swap call( i -- ) ] ] [ ] map-as '[ _ cleave ] -] 1 define-partial-eval >> +] 1 define-partial-eval COMPILE> : (unrolled-collect) ( quot into -- quot' ) '[ dup @ swap _ set-nth-unsafe ] ; inline diff --git a/core-locals.factor b/core-locals.factor index 7850f1ae52..33f9d41828 100644 --- a/core-locals.factor +++ b/core-locals.factor @@ -2,29 +2,29 @@ auto-use in: syntax use: delegate.private -<< forget: postpone\ MACRO: >> -<< forget: postpone\ MACRO:: >> -<< forget: postpone\ MEMO: >> -<< forget: postpone\ MEMO:: >> -<< forget: postpone\ M:: >> -<< forget: postpone\ IDENTITY-MEMO: >> -<< forget: postpone\ IDENTITY-MEMO:: >> -<< forget: postpone\ TYPED: >> -<< forget: postpone\ TYPED:: >> +COMPILE< forget: postpone\ MACRO: COMPILE> +COMPILE< forget: postpone\ MACRO:: COMPILE> +COMPILE< forget: postpone\ MEMO: COMPILE> +COMPILE< forget: postpone\ MEMO:: COMPILE> +COMPILE< forget: postpone\ M:: COMPILE> +COMPILE< forget: postpone\ IDENTITY-MEMO: COMPILE> +COMPILE< forget: postpone\ IDENTITY-MEMO:: COMPILE> +COMPILE< forget: postpone\ TYPED: COMPILE> +COMPILE< forget: postpone\ TYPED:: COMPILE> -<< forget: postpone\ '[ >> -<< forget: postpone\ :: >> -<< forget: postpone\ :> >> -<< forget: _ >> -<< forget: @ >> -<< forget: postpone\ |[ >> -<< forget: postpone\ let[ >> -<< forget: postpone\ IH{ >> -<< forget: postpone\ PROTOCOL: >> -<< forget: postpone\ CONSULT: >> -<< forget: postpone\ BROADCAST: >> -<< forget: postpone\ SLOT-PROTOCOL: >> -<< forget: postpone\ HINTS: >> +COMPILE< forget: postpone\ '[ COMPILE> +COMPILE< forget: postpone\ :: COMPILE> +COMPILE< forget: postpone\ :> COMPILE> +COMPILE< forget: _ COMPILE> +COMPILE< forget: @ COMPILE> +COMPILE< forget: postpone\ |[ COMPILE> +COMPILE< forget: postpone\ let[ COMPILE> +COMPILE< forget: postpone\ IH{ COMPILE> +COMPILE< forget: postpone\ PROTOCOL: COMPILE> +COMPILE< forget: postpone\ CONSULT: COMPILE> +COMPILE< forget: postpone\ BROADCAST: COMPILE> +COMPILE< forget: postpone\ SLOT-PROTOCOL: COMPILE> +COMPILE< forget: postpone\ HINTS: COMPILE> diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 0eef87b34a..db70416931 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -95,8 +95,8 @@ in: bootstrap.syntax "{" "}" "CS{" - "<<" - ">>" + "<<" ">>" + "COMPILE<" "COMPILE>" "call-next-method" "not{" "maybe{" diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index 1f15f184db..2ddb6e6bea 100644 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -811,7 +811,7 @@ TUPLE: rclasstest a b ; { f } [ \ rclasstest \ b>> ?lookup-method ] unit-test { f } [ \ rclasstest \ b<< ?lookup-method ] unit-test -<< \ rclasstest forget >> +COMPILE< \ rclasstest forget COMPILE> ! initial: should type check TUPLE: initial-class ; diff --git a/core/combinators/combinators-tests.factor b/core/combinators/combinators-tests.factor index 848af6c9de..eca0683409 100644 --- a/core/combinators/combinators-tests.factor +++ b/core/combinators/combinators-tests.factor @@ -254,7 +254,7 @@ CONSTANT: case-const-2 2 ; 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 diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index 8fea8fa6d0..c9f0128e1c 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -64,7 +64,7 @@ GENERIC: uncompiled-generic-test ( a -- b ) ; M: integer uncompiled-generic-test 1 + ; -<< [ uncompiled-generic-test ] [ jit-compile ] [ suffix! ] bi >> +COMPILE< [ uncompiled-generic-test ] [ jit-compile ] [ suffix! ] bi COMPILE> "q" set { 4 } [ 3 "q" get call ] unit-test diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index 4e0e422372..788f9f3534 100644 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -54,7 +54,7 @@ in: continuations.tests : foo ( -- ) get-callstack "c" set don't-compile-me ; : 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 diff --git a/core/cpu/architecture/architecture-docs.factor b/core/cpu/architecture/architecture-docs.factor index fe4e165581..46aeb74a6b 100644 --- a/core/cpu/architecture/architecture-docs.factor +++ b/core/cpu/architecture/architecture-docs.factor @@ -4,7 +4,7 @@ cpu.x86.assembler.operands help.markup help.syntax kernel layouts literals math multiline sequences strings system vm words ; in: cpu.architecture -<< +COMPILE< STRING: ex-%allot USING: cpu.architecture make ; [ 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 000000000143f986: 48c60411c0 mov byte [rcx+rdx], 0xc0 ; ->> +COMPILE> HELP: %alien-invoke { $values diff --git a/core/generalizations/generalizations.factor b/core/generalizations/generalizations.factor index 42901b7447..a6c4dfe583 100644 --- a/core/generalizations/generalizations.factor +++ b/core/generalizations/generalizations.factor @@ -10,7 +10,7 @@ in: generalizations ! the input parameters, e.g. n. ! If math is done, the word needs to be a macro so the math can ! be done at compile-time. -<< +COMPILE< ALIAS: n*quot (n*quot) ; @@ -19,7 +19,7 @@ MACRO: call-n ( n -- quot ) : repeat ( n obj quot -- ) swapd times ; inline ->> +COMPILE> MACRO: nsum ( n -- quot ) 1 - [ + ] n*quot ; diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index d3aacdfbf0..590bca660f 100644 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -49,10 +49,10 @@ in: kernel.tests : overflow-r ( -- ) 3 load-local overflow-r ; -<< +COMPILE< { overflow-d (overflow-d-alt) overflow-d-alt overflow-r } [ t "no-compile" set-word-prop ] each ->> +COMPILE> [ overflow-d ] [ 2 head ${ KERNEL-ERROR ERROR-DATASTACK-OVERFLOW } = @@ -125,7 +125,7 @@ in: kernel.tests ! Doesn't compile; important : foo ( a -- b ) ; -<< \ foo t "no-compile" set-word-prop >> +COMPILE< \ foo t "no-compile" set-word-prop COMPILE> [ drop foo ] must-fail { } [ :c ] unit-test diff --git a/core/layouts/layouts.factor b/core/layouts/layouts.factor index 3b15f05561..723edd6432 100644 --- a/core/layouts/layouts.factor +++ b/core/layouts/layouts.factor @@ -36,13 +36,13 @@ symbol: header-bits ! We do this in its own compilation unit so that they can be ! folded below -<< +COMPILE< : cell ( -- n ) OBJ-CELL-SIZE special-object ; foldable : (fixnum-bits) ( m -- n ) tag-bits get - ; foldable : (first-bignum) ( m -- n ) (fixnum-bits) 1 - 2^ ; foldable ->> +COMPILE> : cells ( m -- n ) cell * ; inline diff --git a/core/locals/parser/parser-tests.factor b/core/locals/parser/parser-tests.factor index 86a5b9464a..431954ef4f 100644 --- a/core/locals/parser/parser-tests.factor +++ b/core/locals/parser/parser-tests.factor @@ -5,7 +5,7 @@ in: locals.parser.tests ! XXX: remove the << and >> below and make test-all pass -<< +COMPILE< ! (::) { "dobiedoo" @@ -26,7 +26,7 @@ in: locals.parser.tests qualified-vocabs last words>> keys "um" swap member? ] with-compilation-unit ] unit-test ->> +COMPILE> ! check-local-name { "hello" } [ @@ -58,7 +58,7 @@ in: locals.parser.tests [ locals>> [ name>> ] map ] [ keys ] bi* ] unit-test -<< +COMPILE< { "V{ 99 :> kkk kkk }" } [ @@ -69,4 +69,4 @@ in: locals.parser.tests ] with-lexer ] with-compilation-unit unparse ] unit-test ->> +COMPILE> diff --git a/core/modern/compiler/compiler.factor b/core/modern/compiler/compiler.factor index 03d0ee5e31..3a45ae018f 100644 --- a/core/modern/compiler/compiler.factor +++ b/core/modern/compiler/compiler.factor @@ -31,7 +31,7 @@ in: modern.compiler ! over changed-definition ! swap def>> first swapd set-at ! ] with-definition ; -! >> +! COMPILE> TUPLE: holder literal ; diff --git a/core/modern/modern.factor b/core/modern/modern.factor index fac65a498e..94e1b3d11e 100644 --- a/core/modern/modern.factor +++ b/core/modern/modern.factor @@ -8,7 +8,7 @@ quotations sequences sequences.extras splitting splitting.monotonic strings unicode generalizations ; in: modern -<< +COMPILE< ! Base rules, everything should have a generator macro TUPLE: lexer generator ; @@ -52,7 +52,7 @@ TUPLE: right-decorator-literal < decorator-literal ; TUPLE: compound-sequence-literal sequence ; CONSTRUCTOR: compound-sequence-literal ( sequence -- obj ) ; ->> +COMPILE> GENERIC: lexed-underlying ( obj -- slice ) ; M: f lexed-underlying ; @@ -132,7 +132,7 @@ M: array collapse-decorators [ [ length 2 - ] keep [ char: \: = ] find-last-from ] keep swap [ swap tail strict-upper? ] [ nip strict-upper? ] if ] [ - drop t + "<" sequence= not ] if ] [ drop f @@ -406,13 +406,13 @@ PRIVATE> [ make-tag-literal ] } cond ; -<< +COMPILE< : lexer-rules>delimiters ( seq -- string ) [ delimiter>> ] "" map-as ; : lexer-rules>assoc ( seq -- seq' ) [ [ delimiter>> ] [ generator>> 1quotation ] bi ] { } map>assoc ; ->> +COMPILE> ! 0 "HI: ;" slice-til-either -> 3 "HI: ;" "HI:" CHAR: \: MACRO: rules>call-lexer ( seq -- quot: ( top? n/f string -- top?' n'/f string literal ) ) diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 348a905111..10191fe65f 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -539,7 +539,7 @@ EXCLUDE: qualified.tests.bar => x ; ! Two similar bugs -! Replace : def with something in << >> +! Replace : def with something in << COMPILE> /* { [ ] } [ "in: parser.tests : was-once-a-word-bug ( -- ) ;" "was-once-a-word-test" parse-stream diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 5ef1d6c17d..63448fb8f0 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -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." { $subsections \ << - \ >> + \ COMPILE> } ; ARTICLE: "syntax-integers" "Integer syntax" @@ -870,7 +870,7 @@ HELP: << { $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" } "." } ; -HELP: >> +HELP: COMPILE> { $syntax ">>" } { $description "Marks the end of a parse time code block." } ; diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index b68040eb7b..7dfbc4d8b3 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -53,7 +53,7 @@ in: bootstrap.syntax dup [ define-fry-specifier ] curry each ; [ - { "]" "}" ";" ">>" } [ define-delimiter ] each + { "]" "}" ";" ">>" "COMPILE>" } [ define-delimiter ] each { "_" "@" } define-fry-specifiers ! "@" [ "Only valid inside a fry" throw ] ( -- * ) define-fry-specifier @@ -320,6 +320,14 @@ in: bootstrap.syntax ] with-nested-compilation-unit call( -- ) ] define-core-syntax + "COMPILE<" [ + [ + \ COMPILE> parse-until >quotation + ] with-nested-compilation-unit call( -- ) + ] define-core-syntax + + + "call-next-method" [ current-method get [ literalize suffix! diff --git a/core/vocabs/loader/test/a/a.factor b/core/vocabs/loader/test/a/a.factor index 53d8f5c6fa..5611b797f5 100644 --- a/core/vocabs/loader/test/a/a.factor +++ b/core/vocabs/loader/test/a/a.factor @@ -1,7 +1,7 @@ USING: namespaces parser ; 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 ; diff --git a/core/vocabs/loader/test/b/b.factor b/core/vocabs/loader/test/b/b.factor index 0f9282833e..257df558d2 100644 --- a/core/vocabs/loader/test/b/b.factor +++ b/core/vocabs/loader/test/b/b.factor @@ -1,6 +1,6 @@ USING: namespaces ; in: vocabs.loader.test.b -<< global [ "count-me" inc ] with-variables >> +COMPILE< global [ "count-me" inc ] with-variables COMPILE> : fred ( -- ) bob ; diff --git a/demos/talks/tc-lisp-talk/tc-lisp-talk.factor b/demos/talks/tc-lisp-talk/tc-lisp-talk.factor index e64543b7ff..c278669ab9 100644 --- a/demos/talks/tc-lisp-talk/tc-lisp-talk.factor +++ b/demos/talks/tc-lisp-talk/tc-lisp-talk.factor @@ -196,7 +196,7 @@ FUNCTOR;" } { $slide "Example of sorting functor" { $code "USING: sorting.functor ; -<< \"length\" [ length ] define-sorting >>" +COMPILE< \"length\" [ length ] define-sorting >>" } { $code "{ { 1 2 3 } { 1 2 } { 1 } } diff --git a/ffi/atk/ffi/ffi.factor b/ffi/atk/ffi/ffi.factor index 1ce359b66a..6085236add 100644 --- a/ffi/atk/ffi/ffi.factor +++ b/ffi/atk/ffi/ffi.factor @@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: atk.ffi -<< "gobject.ffi" require >> +COMPILE< "gobject.ffi" require COMPILE> library: atk -<< "atk" { +COMPILE< "atk" { { [ os windows? ] [ "libatk-1.0-0.dll" ] } { [ os macosx? ] [ "libatk-1.0.dylib" ] } { [ os unix? ] [ "libatk-1.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> gir: vocab:atk/Atk-1.0.gir diff --git a/ffi/cairo/ffi/ffi.factor b/ffi/cairo/ffi/ffi.factor index 37ce93b84f..b9acdac4a5 100644 --- a/ffi/cairo/ffi/ffi.factor +++ b/ffi/cairo/ffi/ffi.factor @@ -8,11 +8,11 @@ in: cairo.ffi ! Adapted from cairo.h, version 1.8.10 -<< "cairo" { +COMPILE< "cairo" { { [ os windows? ] [ "libcairo-2.dll" ] } { [ os macosx? ] [ "libcairo.dylib" ] } { [ os unix? ] [ "libcairo.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: cairo diff --git a/ffi/clutter/cally/ffi/ffi.factor b/ffi/clutter/cally/ffi/ffi.factor index 197db85b73..b87effb0e1 100644 --- a/ffi/clutter/cally/ffi/ffi.factor +++ b/ffi/clutter/cally/ffi/ffi.factor @@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: clutter.cally.ffi -<< +COMPILE< "atk.ffi" require "clutter.ffi" require ->> +COMPILE> library: clutter.cally -<< +COMPILE< "clutter.cally" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> gir: Cally-1.0.gir diff --git a/ffi/clutter/cogl/ffi/ffi.factor b/ffi/clutter/cogl/ffi/ffi.factor index daf0b0d7a1..1e4ceca662 100644 --- a/ffi/clutter/cogl/ffi/ffi.factor +++ b/ffi/clutter/cogl/ffi/ffi.factor @@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel opengl.gl system vocabs ; in: clutter.cogl.ffi -<< +COMPILE< "gobject.ffi" require ->> +COMPILE> library: clutter.cogl -<< +COMPILE< "clutter.cogl" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> FOREIGN-ATOMIC-TYPE: GL.uint GLuint ; FOREIGN-ATOMIC-TYPE: GL.enum GLenum ; diff --git a/ffi/clutter/ffi/ffi.factor b/ffi/clutter/ffi/ffi.factor index fd73fcccc8..20ba4f10e0 100644 --- a/ffi/clutter/ffi/ffi.factor +++ b/ffi/clutter/ffi/ffi.factor @@ -4,23 +4,23 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators gobject-introspection kernel system vocabs ; in: clutter.ffi -<< +COMPILE< "gtk" require "atk.ffi" require "pango.cairo.ffi" require "clutter.cogl.ffi" require "clutter.json.ffi" require ->> +COMPILE> library: clutter -<< +COMPILE< "clutter" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> FOREIGN-RECORD-TYPE: cairo.Path cairo_path_t ; diff --git a/ffi/clutter/gtk/ffi/ffi.factor b/ffi/clutter/gtk/ffi/ffi.factor index ca73b8d2a7..346d86e944 100644 --- a/ffi/clutter/gtk/ffi/ffi.factor +++ b/ffi/clutter/gtk/ffi/ffi.factor @@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: clutter.gtk.ffi -<< +COMPILE< "clutter.ffi" require "gtk.ffi" require ->> +COMPILE> library: clutter.gtk -<< +COMPILE< "clutter.gtk" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libclutter-gtk-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> gir: GtkClutter-1.0.gir diff --git a/ffi/clutter/json/ffi/ffi.factor b/ffi/clutter/json/ffi/ffi.factor index d999869a18..26ce843253 100644 --- a/ffi/clutter/json/ffi/ffi.factor +++ b/ffi/clutter/json/ffi/ffi.factor @@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: clutter.json.ffi -<< +COMPILE< "gobject.ffi" require "gio.ffi" require ->> +COMPILE> library: clutter.json -<< +COMPILE< "clutter.json" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> gir: Json-1.0.gir diff --git a/ffi/core-graphics/types/types.factor b/ffi/core-graphics/types/types.factor index e5d7a0c946..e2ae2ea8e8 100644 --- a/ffi/core-graphics/types/types.factor +++ b/ffi/core-graphics/types/types.factor @@ -6,7 +6,7 @@ FROM: alien.c-types => float ; in: core-graphics.types symbol: CGFloat -<< cell 4 = float double ? \ CGFloat typedef >> +COMPILE< cell 4 = float double ? \ CGFloat typedef COMPILE> STRUCT: CGPoint { x CGFloat } diff --git a/ffi/cuda/ffi/ffi.factor b/ffi/cuda/ffi/ffi.factor index c870a0cc89..34dce1a7c2 100644 --- a/ffi/cuda/ffi/ffi.factor +++ b/ffi/cuda/ffi/ffi.factor @@ -3,13 +3,13 @@ USING: accessors alien alien.c-types alien.libraries alien.syntax classes.struct combinators kernel system ; in: cuda.ffi -<< +COMPILE< "cuda" { { [ os windows? ] [ "nvcuda.dll" stdcall ] } { [ os macosx? ] [ "/usr/local/cuda/lib/libcuda.dylib" cdecl ] } { [ os unix? ] [ "libcuda.so" cdecl ] } } cond add-library ->> +COMPILE> library: cuda @@ -28,14 +28,14 @@ TYPEDEF: void* CUgraphicsResource ; SYMBOLS: CUdouble CUlonglong CUulonglong ; -<< +COMPILE< : always-8-byte-align ( c-type -- c-type ) 8 >>align 8 >>align-first ; longlong lookup-c-type clone always-8-byte-align \ CUlonglong typedef ulonglong lookup-c-type clone always-8-byte-align \ CUulonglong typedef double lookup-c-type clone always-8-byte-align \ CUdouble typedef ->> +COMPILE> STRUCT: CUuuid { bytes char[16] } ; diff --git a/ffi/curl/ffi/ffi.factor b/ffi/curl/ffi/ffi.factor index 75e8e944a7..8af53c9b2a 100644 --- a/ffi/curl/ffi/ffi.factor +++ b/ffi/curl/ffi/ffi.factor @@ -4,10 +4,10 @@ system words ; in: curl.ffi -<< "curl" { +COMPILE< "curl" { { [ os macosx? ] [ "libcurl.dylib" ] } { [ os unix? ] [ "libcurl.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: curl diff --git a/ffi/curses/ffi/ffi.factor b/ffi/curses/ffi/ffi.factor index bcebf90750..2b25388933 100644 --- a/ffi/curses/ffi/ffi.factor +++ b/ffi/curses/ffi/ffi.factor @@ -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 ; in: curses.ffi -<< "curses" { +COMPILE< "curses" { { [ os windows? ] [ "libcurses.dll" ] } { [ os macosx? ] [ "libcurses.dylib" ] } { [ os unix? ] [ "ncursesw" find-library ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> c-type: SCREEN TYPEDEF: void* va_list ; diff --git a/ffi/fftw/ffi/ffi.factor b/ffi/fftw/ffi/ffi.factor index d005a6d69b..ec94d8571a 100644 --- a/ffi/fftw/ffi/ffi.factor +++ b/ffi/fftw/ffi/ffi.factor @@ -8,11 +8,11 @@ in: fftw.ffi library: fftw3 -<< "fftw3" { +COMPILE< "fftw3" { { [ os windows? ] [ "libfftw3-3.dll" ] } { [ os macosx? ] [ "libfftw3.dylib" ] } { [ os unix? ] [ "libfftw3.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> TYPEDEF: double[2] fftw_complex ; diff --git a/ffi/forestdb/ffi/ffi.factor b/ffi/forestdb/ffi/ffi.factor index afc9658978..886f34b59e 100644 --- a/ffi/forestdb/ffi/ffi.factor +++ b/ffi/forestdb/ffi/ffi.factor @@ -6,7 +6,7 @@ in: forestdb.ffi ! Functions with LIBFDB_API are exported. -<< "forestdb" dup find-library cdecl add-library >> +COMPILE< "forestdb" dup find-library cdecl add-library COMPILE> library: forestdb diff --git a/ffi/freetype/freetype.factor b/ffi/freetype/freetype.factor index 62a33438f3..7d938f3977 100644 --- a/ffi/freetype/freetype.factor +++ b/ffi/freetype/freetype.factor @@ -4,11 +4,11 @@ USING: alien alien.c-types alien.syntax kernel system combinators alien.libraries classes.struct ; in: freetype -<< "freetype" { +COMPILE< "freetype" { { [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] } { [ os windows? ] [ "freetype6.dll" cdecl add-library ] } { [ t ] [ drop ] } -} cond >> +} cond COMPILE> library: freetype diff --git a/ffi/gdbm/ffi/ffi.factor b/ffi/gdbm/ffi/ffi.factor index bd07e0eba8..f04f9cb264 100755 --- a/ffi/gdbm/ffi/ffi.factor +++ b/ffi/gdbm/ffi/ffi.factor @@ -4,9 +4,9 @@ USING: alien alien.c-types alien.libraries alien.libraries.finder alien.syntax classes.struct combinators kernel system ; in: gdbm.ffi -<< "libgdbm" +COMPILE< "libgdbm" { "gdbm" "gdbm3" "libgdbm-3" } find-library-from-list -cdecl add-library >> +cdecl add-library COMPILE> library: libgdbm diff --git a/ffi/gdk/ffi/ffi.factor b/ffi/gdk/ffi/ffi.factor index 90a9729415..6b43f46255 100644 --- a/ffi/gdk/ffi/ffi.factor +++ b/ffi/gdk/ffi/ffi.factor @@ -6,20 +6,20 @@ gobject-introspection gobject-introspection.standard-types kernel system vocabs vocabs.loader ; in: gdk.ffi -<< +COMPILE< "pango.ffi" require "gdk.pixbuf.ffi" require ->> +COMPILE> library: gdk -<< +COMPILE< "gdk" { { [ os windows? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgdk-x11-2.0.so" cdecl add-library ] } } cond ->> +COMPILE> ! > +COMPILE> library: gdk.gl -<< +COMPILE< "gdk.gl" { { [ os windows? ] [ "libgdkglext-win32-1.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgdkglext-x11-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gdk/gl/GdkGLExt-1.0.gir diff --git a/ffi/gdk/pixbuf/ffi/ffi.factor b/ffi/gdk/pixbuf/ffi/ffi.factor index 009fd310ae..8643f66794 100644 --- a/ffi/gdk/pixbuf/ffi/ffi.factor +++ b/ffi/gdk/pixbuf/ffi/ffi.factor @@ -6,15 +6,15 @@ gobject-introspection.standard-types kernel libc sequences system vocabs ; in: gdk.pixbuf.ffi -<< "gio.ffi" require >> +COMPILE< "gio.ffi" require COMPILE> library: gdk.pixbuf -<< "gdk.pixbuf" { +COMPILE< "gdk.pixbuf" { { [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" ] } { [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" ] } { [ os unix? ] [ "libgdk_pixbuf-2.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> gir: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir diff --git a/ffi/gio/ffi/ffi.factor b/ffi/gio/ffi/ffi.factor index 2a29b10d90..d432cf8f7a 100644 --- a/ffi/gio/ffi/ffi.factor +++ b/ffi/gio/ffi/ffi.factor @@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gio.ffi -<< "gobject.ffi" require >> +COMPILE< "gobject.ffi" require COMPILE> library: gio -<< "gio" { +COMPILE< "gio" { { [ os windows? ] [ "libgio-2.0-0.dll" ] } { [ os macosx? ] [ "libgio-2.0.dylib" ] } { [ os unix? ] [ "libgio-2.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> gir: vocab:gio/Gio-2.0.gir diff --git a/ffi/glib/ffi/ffi.factor b/ffi/glib/ffi/ffi.factor index ad1e865489..65dd22cc6f 100644 --- a/ffi/glib/ffi/ffi.factor +++ b/ffi/glib/ffi/ffi.factor @@ -8,11 +8,11 @@ in: glib.ffi library: glib -<< "glib" { +COMPILE< "glib" { { [ os windows? ] [ "libglib-2.0-0.dll" ] } { [ os macosx? ] [ "libglib-2.0.0.dylib" ] } { [ os unix? ] [ "libglib-2.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ; diff --git a/ffi/gmodule/ffi/ffi.factor b/ffi/gmodule/ffi/ffi.factor index 2cb5a96366..f42662f496 100644 --- a/ffi/gmodule/ffi/ffi.factor +++ b/ffi/gmodule/ffi/ffi.factor @@ -4,14 +4,14 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gmodule.ffi -<< "glib.ffi" require >> +COMPILE< "glib.ffi" require COMPILE> library: gmodule -<< "gmodule" { +COMPILE< "gmodule" { { [ os windows? ] [ "libgmodule-2.0-0.dll" ] } { [ os macosx? ] [ "libgmodule-2.0.dylib" ] } { [ os unix? ] [ "libgmodule-2.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> gir: vocab:gmodule/GModule-2.0.gir diff --git a/ffi/gobject-introspection/ffi/ffi-tests.factor b/ffi/gobject-introspection/ffi/ffi-tests.factor index a8b52ae0fd..4e72c7079b 100644 --- a/ffi/gobject-introspection/ffi/ffi-tests.factor +++ b/ffi/gobject-introspection/ffi/ffi-tests.factor @@ -4,7 +4,7 @@ tools.test ; in: gobject-introspection.ffi.tests ! callback -<< +COMPILE< { T{ return @@ -31,4 +31,4 @@ in: gobject-introspection.ffi.tests "none" f simple-type boa "none" return boa return-c-type ] unit-test ->> +COMPILE> diff --git a/ffi/gobject-introspection/standard-types/standard-types.factor b/ffi/gobject-introspection/standard-types/standard-types.factor index fd232f706e..70fa26dba7 100644 --- a/ffi/gobject-introspection/standard-types/standard-types.factor +++ b/ffi/gobject-introspection/standard-types/standard-types.factor @@ -4,7 +4,7 @@ USING: accessors alien.c-types alien.syntax classes.struct gobject-introspection.types kernel parser ; in: gobject-introspection.standard-types -<< +COMPILE< TYPEDEF: char gchar ; TYPEDEF: uchar guchar ; TYPEDEF: short gshort ; @@ -41,7 +41,7 @@ int lookup-c-type clone "gboolean" create-word-in typedef STRUCT: longdouble { data char[10] } ; ->> +COMPILE> gchar "gchar" register-standard-type guchar "guchar" register-standard-type diff --git a/ffi/gobject-introspection/types/types.factor b/ffi/gobject-introspection/types/types.factor index be3c066c29..4ace5dbacd 100644 --- a/ffi/gobject-introspection/types/types.factor +++ b/ffi/gobject-introspection/types/types.factor @@ -103,10 +103,10 @@ ERROR: unknown-type-error type ; ERROR: deferred-type-error ; -<< +COMPILE< void* lookup-c-type clone [ drop deferred-type-error ] >>unboxer-quot [ drop deferred-type-error ] >>boxer-quot object >>boxed-class "deferred-type" create-word-in typedef ->> +COMPILE> diff --git a/ffi/gobject/ffi/ffi.factor b/ffi/gobject/ffi/ffi.factor index cad6546eb3..31e355e51e 100644 --- a/ffi/gobject/ffi/ffi.factor +++ b/ffi/gobject/ffi/ffi.factor @@ -6,16 +6,16 @@ in: gobject.ffi ! these two are needed for the definition of GError and others. ! otherwise we generate GError and some others in this vocab as well. -<< "glib.ffi" require >> +COMPILE< "glib.ffi" require COMPILE> use: glib.ffi library: gobject -<< "gobject" { +COMPILE< "gobject" { { [ os windows? ] [ "libgobject-2.0-0.dll" ] } { [ os macosx? ] [ "libgobject-2.0.dylib" ] } { [ os unix? ] [ "libgobject-2.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> IMPLEMENT-STRUCTS: GValue GParamSpecVariant ; diff --git a/ffi/gstreamer/base/ffi/ffi.factor b/ffi/gstreamer/base/ffi/ffi.factor index ea41127baa..d03ae04e60 100644 --- a/ffi/gstreamer/base/ffi/ffi.factor +++ b/ffi/gstreamer/base/ffi/ffi.factor @@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gstreamer.base.ffi -<< +COMPILE< "gstreamer.ffi" require ->> +COMPILE> library: gstreamer.base -<< +COMPILE< "gstreamer.base" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstbase-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: GstBase-0.10.gir diff --git a/ffi/gstreamer/controller/ffi/ffi.factor b/ffi/gstreamer/controller/ffi/ffi.factor index 97be07cc34..ee250228b6 100644 --- a/ffi/gstreamer/controller/ffi/ffi.factor +++ b/ffi/gstreamer/controller/ffi/ffi.factor @@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gstreamer.controller.ffi -<< +COMPILE< "gstreamer.ffi" require ->> +COMPILE> library: gstreamer.controller -<< +COMPILE< "gstreamer.controller" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstcontroller-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: GstController-0.10.gir diff --git a/ffi/gstreamer/ffi/ffi.factor b/ffi/gstreamer/ffi/ffi.factor index ca696a9d6e..424db09b47 100644 --- a/ffi/gstreamer/ffi/ffi.factor +++ b/ffi/gstreamer/ffi/ffi.factor @@ -4,21 +4,21 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gstreamer.ffi -<< +COMPILE< "glib.ffi" require "gobject.ffi" require "gmodule.ffi" require ->> +COMPILE> library: gstreamer -<< +COMPILE< "gstreamer" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> PRIVATE< diff --git a/ffi/gstreamer/net/ffi/ffi.factor b/ffi/gstreamer/net/ffi/ffi.factor index 7181e9057d..fab721ad67 100644 --- a/ffi/gstreamer/net/ffi/ffi.factor +++ b/ffi/gstreamer/net/ffi/ffi.factor @@ -4,18 +4,18 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gstreamer.net.ffi -<< +COMPILE< "gstreamer.ffi" require ->> +COMPILE> library: gstreamer.net -<< +COMPILE< "gstreamer.net" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstnet-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: GstNet-0.10.gir diff --git a/ffi/gtk/ffi/ffi.factor b/ffi/gtk/ffi/ffi.factor index c6b1206a8b..862fbca3ac 100644 --- a/ffi/gtk/ffi/ffi.factor +++ b/ffi/gtk/ffi/ffi.factor @@ -6,20 +6,20 @@ gobject-introspection.standard-types kernel pango.ffi system vocabs ; in: gtk.ffi -<< +COMPILE< "atk.ffi" require "gdk.ffi" require ->> +COMPILE> library: gtk -<< +COMPILE< "gtk" { { [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] } { [ os linux? ] [ "libgtk-x11-2.0.so" cdecl add-library ] } [ drop ] } cond ->> +COMPILE> IMPLEMENT-STRUCTS: GtkTreeIter ; diff --git a/ffi/gtk/gl/ffi/ffi.factor b/ffi/gtk/gl/ffi/ffi.factor index f9a5f4ea83..0268657e55 100644 --- a/ffi/gtk/gl/ffi/ffi.factor +++ b/ffi/gtk/gl/ffi/ffi.factor @@ -4,19 +4,19 @@ USING: alien alien.libraries alien.syntax combinators gobject-introspection kernel system vocabs ; in: gtk.gl.ffi -<< +COMPILE< "gtk.ffi" require "gdk.gl.ffi" require ->> +COMPILE> library: gtk.gl -<< +COMPILE< "gtk.gl" { { [ os windows? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gtk/gl/GtkGLExt-1.0.gir diff --git a/ffi/iokit/iokit.factor b/ffi/iokit/iokit.factor index c422f1ef55..029b26cca6 100644 --- a/ffi/iokit/iokit.factor +++ b/ffi/iokit/iokit.factor @@ -3,11 +3,11 @@ core-foundation.bundles core-foundation.dictionaries system combinators kernel sequences io accessors unix.types ; in: iokit -<< +COMPILE< os macosx? [ "/System/Library/Frameworks/IOKit.framework" load-framework ] when ->> +COMPILE> CONSTANT: kIOKitBuildVersionKey "IOKitBuildVersion" ; CONSTANT: kIOKitDiagnosticsKey "IOKitDiagnostics" ; diff --git a/ffi/libtls/ffi/ffi.factor b/ffi/libtls/ffi/ffi.factor index 379597c8fd..2b1de3f406 100644 --- a/ffi/libtls/ffi/ffi.factor +++ b/ffi/libtls/ffi/ffi.factor @@ -3,11 +3,11 @@ alien.syntax combinators io.sockets.secure system unix.types ; in: libtls.ffi -<< "libtls" { +COMPILE< "libtls" { { [ os windows? ] [ "libtls-10.dll" ] } { [ os macosx? ] [ "libtls.dylib" ] } { [ os unix? ] [ "libtls.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> c-type: tls_config c-type: tls_ctx diff --git a/ffi/libudev/libudev.factor b/ffi/libudev/libudev.factor index 9636321767..981ae0fe25 100644 --- a/ffi/libudev/libudev.factor +++ b/ffi/libudev/libudev.factor @@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax fry kernel sequences unix.types ; in: libudev -<< "libudev" "libudev.so" cdecl add-library >> +COMPILE< "libudev" "libudev.so" cdecl add-library COMPILE> library: libudev diff --git a/ffi/libusb/libusb.factor b/ffi/libusb/libusb.factor index b6ead17f5c..187d3c9233 100644 --- a/ffi/libusb/libusb.factor +++ b/ffi/libusb/libusb.factor @@ -7,11 +7,11 @@ system unix.time unix.types ; FROM: alien.c-types => short ; in: libusb -<< "libusb" { +COMPILE< "libusb" { { [ os windows? ] [ "libusb-1.0.dll" ] } { [ os macosx? ] [ "libusb-1.0.dylib" ] } { [ os unix? ] [ "libusb-1.0.so" ] } - } cond cdecl add-library >> + } cond cdecl add-library COMPILE> library: libusb : libusb_cpu_to_le16 ( x -- y ) diff --git a/ffi/lua/lua.factor b/ffi/lua/lua.factor index a92fe026f9..6051d45c7a 100644 --- a/ffi/lua/lua.factor +++ b/ffi/lua/lua.factor @@ -5,11 +5,11 @@ alien.syntax classes.struct combinators io.encodings.ascii kernel locals math system ; in: lua -<< "liblua5.1" { +COMPILE< "liblua5.1" { { [ os windows? ] [ "lua5.1.dll" ] } { [ os macosx? ] [ "liblua5.1.dylib" ] } { [ os unix? ] [ "liblua5.1.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: liblua5.1 diff --git a/ffi/ogg/ogg.factor b/ffi/ogg/ogg.factor index b5acbc21d7..856bfd262b 100644 --- a/ffi/ogg/ogg.factor +++ b/ffi/ogg/ogg.factor @@ -13,7 +13,7 @@ USING: ; in: ogg -<< +COMPILE< "ogg" { { [ os windows? ] [ "ogg.dll" ] } { [ os macosx? ] [ "libogg.0.dylib" ] } @@ -21,7 +21,7 @@ in: ogg } cond cdecl add-library "ogg" deploy-library ->> +COMPILE> library: ogg diff --git a/ffi/ogg/theora/theora.factor b/ffi/ogg/theora/theora.factor index bd1a9166e0..756b92fc14 100644 --- a/ffi/ogg/theora/theora.factor +++ b/ffi/ogg/theora/theora.factor @@ -14,7 +14,7 @@ USING: ; in: ogg.theora -<< +COMPILE< "theoradec" { { [ os windows? ] [ "theoradec.dll" ] } { [ os macosx? ] [ "libtheoradec.0.dylib" ] } @@ -26,7 +26,7 @@ in: ogg.theora { [ os macosx? ] [ "libtheoraenc.0.dylib" ] } { [ os unix? ] [ "libtheoraenc.so" ] } } cond cdecl add-library ->> +COMPILE> CONSTANT: TH-EFAULT -1 ; CONSTANT: TH-EINVAL -10 ; diff --git a/ffi/ogg/vorbis/vorbis.factor b/ffi/ogg/vorbis/vorbis.factor index 6e649d5304..dc8ed09026 100644 --- a/ffi/ogg/vorbis/vorbis.factor +++ b/ffi/ogg/vorbis/vorbis.factor @@ -14,7 +14,7 @@ USING: ; in: ogg.vorbis -<< +COMPILE< "vorbis" { { [ os windows? ] [ "vorbis.dll" ] } { [ os macosx? ] [ "libvorbis.0.dylib" ] } @@ -22,7 +22,7 @@ in: ogg.vorbis } cond cdecl add-library "vorbis" deploy-library ->> +COMPILE> library: vorbis diff --git a/ffi/openal/alut/alut.factor b/ffi/openal/alut/alut.factor index b954d4b309..2b12d08cf0 100755 --- a/ffi/openal/alut/alut.factor +++ b/ffi/openal/alut/alut.factor @@ -8,15 +8,15 @@ FROM: alien.c-types => float short ; specialized-array: uint in: openal.alut -<< "alut" { +COMPILE< "alut" { { [ os windows? ] [ "alut.dll" ] } { [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] } { [ 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 diff --git a/ffi/openal/openal.factor b/ffi/openal/openal.factor index ab78804e76..7f92d09eb1 100755 --- a/ffi/openal/openal.factor +++ b/ffi/openal/openal.factor @@ -9,15 +9,15 @@ ushort void ; specialized-array: uint in: openal -<< "openal" { +COMPILE< "openal" { { [ os windows? ] [ "OpenAL32.dll" ] } { [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] } { [ 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 diff --git a/ffi/opencl/ffi/ffi.factor b/ffi/opencl/ffi/ffi.factor index 4e07dca4e7..f3e2c38612 100644 --- a/ffi/opencl/ffi/ffi.factor +++ b/ffi/opencl/ffi/ffi.factor @@ -5,11 +5,11 @@ classes.struct combinators system alien.accessors byte-arrays kernel ; in: opencl.ffi -<< "opencl" { +COMPILE< "opencl" { { [ os windows? ] [ "OpenCL.dll" stdcall ] } { [ os macosx? ] [ "/System/Library/Frameworks/OpenCL.framework/OpenCL" cdecl ] } { [ os unix? ] [ "libOpenCL.so" cdecl ] } - } cond add-library >> + } cond add-library COMPILE> library: opencl ! cl_platform.h diff --git a/ffi/opengl/debug/debug.factor b/ffi/opengl/debug/debug.factor index 1eabbf5cbf..bd46648edf 100644 --- a/ffi/opengl/debug/debug.factor +++ b/ffi/opengl/debug/debug.factor @@ -16,7 +16,7 @@ symbol: G-world [ break ] dip set-gl-context ; -<< \ gl-break t "break?" set-word-prop >> +COMPILE< \ gl-break t "break?" set-word-prop COMPILE> SYNTAX: GB \ gl-break suffix! ; diff --git a/ffi/opengl/gl/extensions/extensions.factor b/ffi/opengl/gl/extensions/extensions.factor index 67eefe3402..8dde14bbb5 100644 --- a/ffi/opengl/gl/extensions/extensions.factor +++ b/ffi/opengl/gl/extensions/extensions.factor @@ -4,12 +4,12 @@ math arrays assocs continuations lexer fry locals vocabs.parser ; in: opengl.gl.extensions ERROR: unknown-gl-platform ; -<< { +COMPILE< { { [ os windows? ] [ "opengl.gl.windows" ] } { [ os macosx? ] [ "opengl.gl.macosx" ] } { [ os unix? ] [ "opengl.gl.gtk" ] } [ unknown-gl-platform ] -} cond use-vocab >> +} cond use-vocab COMPILE> symbol: +gl-function-counter+ symbol: +gl-function-pointers+ diff --git a/ffi/opengl/gl/gl.factor b/ffi/opengl/gl/gl.factor index 6150873b0a..67b267fe8b 100644 --- a/ffi/opengl/gl/gl.factor +++ b/ffi/opengl/gl/gl.factor @@ -627,11 +627,11 @@ CONSTANT: GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF ; library: gl -<< +COMPILE< os linux? [ "gl" "libGL.so" cdecl add-library ] when ->> +COMPILE> ! Miscellaneous @@ -1125,7 +1125,7 @@ FUNCTION: void glLoadName ( GLuint name ) ; FUNCTION: void glPushName ( GLuint name ) ; FUNCTION: void glPopName ( ) ; -<< reset-gl-function-number-counter >> +COMPILE< reset-gl-function-number-counter COMPILE> ! OpenGL 1.2 diff --git a/ffi/opengl/glu/glu.factor b/ffi/opengl/glu/glu.factor index 0776c2b99f..56e8785f3c 100644 --- a/ffi/opengl/glu/glu.factor +++ b/ffi/opengl/glu/glu.factor @@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax kernel sequences words system combinators opengl.gl alien.destructors ; in: opengl.glu -<< +COMPILE< os { { [ dup macosx? ] [ drop ] } @@ -12,7 +12,7 @@ os { { [ dup unix? ] [ drop "glu" "libGLU.so.1" cdecl add-library ] } } cond ->> +COMPILE> library: glu diff --git a/ffi/openssl/libcrypto/libcrypto.factor b/ffi/openssl/libcrypto/libcrypto.factor index cee4ef4e4d..c0f2ea98aa 100644 --- a/ffi/openssl/libcrypto/libcrypto.factor +++ b/ffi/openssl/libcrypto/libcrypto.factor @@ -10,11 +10,11 @@ alien.syntax classes.struct combinators system ; in: openssl.libcrypto -<< "libcrypto" { +COMPILE< "libcrypto" { { [ os windows? ] [ "libcrypto-37.dll" ] } { [ os macosx? ] [ "libcrypto.dylib" ] } { [ os unix? ] [ "libcrypto.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> STRUCT: bio-method { type int } diff --git a/ffi/openssl/libssl/libssl.factor b/ffi/openssl/libssl/libssl.factor index 60c6c6a25d..ac1500fe5f 100644 --- a/ffi/openssl/libssl/libssl.factor +++ b/ffi/openssl/libssl/libssl.factor @@ -8,11 +8,11 @@ sequences system words ; in: openssl.libssl -<< "libssl" { +COMPILE< "libssl" { { [ os windows? ] [ "libssl-38.dll" ] } { [ os macosx? ] [ "libssl.dylib" ] } { [ os unix? ] [ "libssl.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> CONSTANT: X509_FILETYPE_PEM 1 ; CONSTANT: X509_FILETYPE_ASN1 2 ; @@ -529,7 +529,7 @@ CONSTANT: SSL_SESS_CACHE_NO_INTERNAL ! x509_vfy.h ! =============================================== -<< +COMPILE< symbol: verify-messages @@ -544,7 +544,7 @@ SYNTAX: X509_V_: [ verify-messages get set-at ] 2bi ; ->> +COMPILE> X509_V_: OK 0 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 ! =============================================== -<< os windows? [ +COMPILE< os windows? [ "libssl-windows" [ "libcrypto-37.dll" cdecl add-library ] [ current-library set ] bi -] when >> +] when COMPILE> ! x509.h FUNCTION: int X509_NAME_get_text_by_NID ( X509_NAME* name, int nid, void* buf, int len ) ; diff --git a/ffi/pango/cairo/ffi/ffi.factor b/ffi/pango/cairo/ffi/ffi.factor index 045c55e9ee..e2e6e216e9 100644 --- a/ffi/pango/cairo/ffi/ffi.factor +++ b/ffi/pango/cairo/ffi/ffi.factor @@ -4,15 +4,15 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators kernel gobject-introspection system vocabs ; in: pango.cairo.ffi -<< "pango.ffi" require >> +COMPILE< "pango.ffi" require COMPILE> library: pango.cairo -<< "pango.cairo" { +COMPILE< "pango.cairo" { { [ os windows? ] [ "libpangocairo-1.0-0.dll" ] } { [ os macosx? ] [ "libpangocairo-1.0.dylib" ] } { [ 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.ScaledFont cairo_scaled_font_t ; diff --git a/ffi/pango/ffi/ffi.factor b/ffi/pango/ffi/ffi.factor index 3714405315..0d68c6c764 100644 --- a/ffi/pango/ffi/ffi.factor +++ b/ffi/pango/ffi/ffi.factor @@ -5,15 +5,15 @@ alien.syntax combinators gobject-introspection gobject-introspection.standard-types system vocabs ; in: pango.ffi -<< "gobject.ffi" require >> +COMPILE< "gobject.ffi" require COMPILE> library: pango -<< "pango" { +COMPILE< "pango" { { [ os windows? ] [ "libpango-1.0-0.dll" ] } { [ os macosx? ] [ "libpango-1.0.dylib" ] } { [ os unix? ] [ "libpango-1.0.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> IMPLEMENT-STRUCTS: PangoRectangle ; diff --git a/ffi/pcre/ffi/ffi.factor b/ffi/pcre/ffi/ffi.factor index 5428e30fff..99939a5f71 100644 --- a/ffi/pcre/ffi/ffi.factor +++ b/ffi/pcre/ffi/ffi.factor @@ -8,11 +8,11 @@ USING: system ; in: pcre.ffi -<< "pcre" { +COMPILE< "pcre" { { [ os windows? ] [ "pcre.dll" ] } { [ os macosx? ] [ "libpcre.dylib" ] } { [ os unix? ] [ "libpcre.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: pcre diff --git a/ffi/python/ffi/ffi.factor b/ffi/python/ffi/ffi.factor index 8f39d2932a..9b8a8bd3a9 100644 --- a/ffi/python/ffi/ffi.factor +++ b/ffi/python/ffi/ffi.factor @@ -4,9 +4,9 @@ system ; in: python.ffi ! << "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 -cdecl add-library >> +cdecl add-library COMPILE> ! Functions that return borrowed references needs to be called like this: ! Py_Func dup Py_IncRef &Py_DecRef diff --git a/ffi/readline/ffi/ffi.factor b/ffi/readline/ffi/ffi.factor index 8d340cd1e9..005ad0975b 100644 --- a/ffi/readline/ffi/ffi.factor +++ b/ffi/readline/ffi/ffi.factor @@ -5,11 +5,11 @@ alien.syntax classes.struct combinators kernel libc math namespaces system unix.types ; in: readline.ffi -<< "readline" { +COMPILE< "readline" { { [ os windows? ] [ "readline.dll" ] } { [ os macosx? ] [ "libreadline.dylib" ] } { [ os unix? ] [ "libreadline.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: readline diff --git a/ffi/unix/ffi/ffi.factor b/ffi/unix/ffi/ffi.factor index 3b003f48ab..837c02ada2 100644 --- a/ffi/unix/ffi/ffi.factor +++ b/ffi/unix/ffi/ffi.factor @@ -5,7 +5,7 @@ alien.syntax classes.struct sequences system unix.time unix.types vocabs ; in: unix.ffi -<< "unix.ffi." os name>> append require >> +COMPILE< "unix.ffi." os name>> append require COMPILE> CONSTANT: PROT_NONE 0 ; CONSTANT: PROT_READ 1 ; diff --git a/ffi/unix/kqueue/kqueue.factor b/ffi/unix/kqueue/kqueue.factor index fa023f5fd7..67904369c0 100644 --- a/ffi/unix/kqueue/kqueue.factor +++ b/ffi/unix/kqueue/kqueue.factor @@ -4,7 +4,7 @@ USING: alien.c-types alien.syntax system sequences vocabs.loader words accessors vocabs ; in: unix.kqueue -<< "unix.kqueue." os name>> append require >> +COMPILE< "unix.kqueue." os name>> append require COMPILE> FUNCTION: int kqueue ( ) ; diff --git a/ffi/unix/stat/stat.factor b/ffi/unix/stat/stat.factor index f1921732f6..2637b70ebd 100644 --- a/ffi/unix/stat/stat.factor +++ b/ffi/unix/stat/stat.factor @@ -21,7 +21,7 @@ STRUCT: fsid 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 ) \ stat [ [ stat-func ] unix-system-call drop ] keep ; diff --git a/ffi/windows/ddk/hid/hid.factor b/ffi/windows/ddk/hid/hid.factor index ac54e4066a..521179c6d3 100755 --- a/ffi/windows/ddk/hid/hid.factor +++ b/ffi/windows/ddk/hid/hid.factor @@ -4,7 +4,7 @@ USING: alien alien.c-types alien.libraries alien.syntax classes.struct kernel math windows.types windows.ole32 ; in: windows.ddk.hid -<< "hid" "hid.dll" stdcall add-library >> +COMPILE< "hid" "hid.dll" stdcall add-library COMPILE> library: hid TYPEDEF: LONG NTSTATUS ; diff --git a/ffi/windows/ddk/setupapi/setupapi.factor b/ffi/windows/ddk/setupapi/setupapi.factor index a9ab03332d..b3de0d8821 100755 --- a/ffi/windows/ddk/setupapi/setupapi.factor +++ b/ffi/windows/ddk/setupapi/setupapi.factor @@ -5,7 +5,7 @@ classes.struct alien alien.c-types windows.errors windows.ole32 windows.advapi32 alien.libraries ; in: windows.ddk.setupapi -<< "setupapi" "setupapi.dll" stdcall add-library >> +COMPILE< "setupapi" "setupapi.dll" stdcall add-library COMPILE> library: setupapi TYPEDEF: DWORDLONG SP_LOG_TOKEN ; diff --git a/ffi/windows/ddk/winusb/winusb.factor b/ffi/windows/ddk/winusb/winusb.factor index a88308c425..70d583dd94 100755 --- a/ffi/windows/ddk/winusb/winusb.factor +++ b/ffi/windows/ddk/winusb/winusb.factor @@ -4,7 +4,7 @@ USING: alien alien.c-types alien.syntax classes.struct windows.kernel32 windows.types alien.libraries ; in: windows.ddk.winusb -<< "winusb" "winusb.dll" stdcall add-library >> +COMPILE< "winusb" "winusb.dll" stdcall add-library COMPILE> library: winusb TYPEDEF: PVOID WINUSB_INTERFACE_HANDLE ; diff --git a/ffi/windows/directx/dinput/constants/constants.factor b/ffi/windows/directx/dinput/constants/constants.factor index a7722dc7a4..7889ddf373 100755 --- a/ffi/windows/directx/dinput/constants/constants.factor +++ b/ffi/windows/directx/dinput/constants/constants.factor @@ -23,7 +23,7 @@ PRIVATE< : initialize ( variable quot -- ) call swap set-global ; inline -<< +COMPILE< GENERIC: array-base-type ( c-type -- c-type' ) ; M: object array-base-type ; @@ -68,7 +68,7 @@ M: array array-base-type first ; [ ] tri ] ; ->> +COMPILE> MACRO: ( dwFlags dwDataSize struct rgodf-array -- alien ) [ DIDATAFORMAT heap-size DIOBJECTDATAFORMAT heap-size ] 4 ndip diff --git a/ffi/windows/dwmapi/dwmapi.factor b/ffi/windows/dwmapi/dwmapi.factor index 9c6ea951dc..d9fbaa022f 100755 --- a/ffi/windows/dwmapi/dwmapi.factor +++ b/ffi/windows/dwmapi/dwmapi.factor @@ -22,7 +22,7 @@ STRUCT: DWM_BLURBEHIND : full-window-margins ( -- MARGINS ) -1 -1 -1 -1 ; inline -<< "dwmapi" "dwmapi.dll" stdcall add-library >> +COMPILE< "dwmapi" "dwmapi.dll" stdcall add-library COMPILE> library: dwmapi diff --git a/ffi/windows/iphlpapi/iphlpapi.factor b/ffi/windows/iphlpapi/iphlpapi.factor index e3ef45d30e..3db765b1da 100644 --- a/ffi/windows/iphlpapi/iphlpapi.factor +++ b/ffi/windows/iphlpapi/iphlpapi.factor @@ -10,7 +10,7 @@ in: windows.iphlpapi library: iphlpapi -<< +COMPILE< CONSTANT: DEFAULT_MINIMUM_ENTITIES 32 ; CONSTANT: MAX_ADAPTER_ADDRESS_LENGTH 8 ; CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH 128 ; @@ -28,7 +28,7 @@ CONSTANT: IF_TOKEN_RING_ADAPTERTYPE 2 ; CONSTANT: IF_FDDI_ADAPTERTYPE 3 ; CONSTANT: IF_PPP_ADAPTERTYPE 4 ; CONSTANT: IF_LOOPBACK_ADAPTERTYPE 5 ; ->> +COMPILE> CONSTANT: MAX_DOMAIN_NAME_LEN+4 132 ; CONSTANT: MAX_HOSTNAME_LEN+4 132 ; diff --git a/ffi/windows/winsock/winsock.factor b/ffi/windows/winsock/winsock.factor index f6f750a768..356876e1cd 100644 --- a/ffi/windows/winsock/winsock.factor +++ b/ffi/windows/winsock/winsock.factor @@ -8,10 +8,10 @@ windows.errors windows.kernel32 windows.types ; FROM: alien.c-types => short ; in: windows.winsock -<< +COMPILE< ! Some differences between Win32 and Win64 cpu x86.64? "windows.winsock.64" "windows.winsock.32" ? use-vocab ->> +COMPILE> TYPEDEF: int* SOCKET ; diff --git a/ffi/x11/xim/xim.factor b/ffi/x11/xim/xim.factor index fc4844b0d6..bd5a89b687 100644 --- a/ffi/x11/xim/xim.factor +++ b/ffi/x11/xim/xim.factor @@ -34,9 +34,9 @@ symbol: xim XNResourceClass over 0 XCreateIC [ "XCreateIC() failed" throw ] unless* ; -<< +COMPILE< CONSTANT: buf-size 100 ; ->> +COMPILE> CONSTANT: buf $[ buf-size ] ; diff --git a/ffi/x11/xinput2/ffi/ffi.factor b/ffi/x11/xinput2/ffi/ffi.factor index f85442af79..5425f6abd2 100644 --- a/ffi/x11/xinput2/ffi/ffi.factor +++ b/ffi/x11/xinput2/ffi/ffi.factor @@ -5,7 +5,7 @@ classes.struct locals sequences x11.syntax x11.xlib ; EXCLUDE: math => float ; in: x11.xinput2.ffi -<< "xinput2" "libXi.so" cdecl add-library >> +COMPILE< "xinput2" "libXi.so" cdecl add-library COMPILE> library: xinput2 diff --git a/frameworks/db/postgresql/ffi/ffi.factor b/frameworks/db/postgresql/ffi/ffi.factor index 483eee2245..b08ad1d0b9 100644 --- a/frameworks/db/postgresql/ffi/ffi.factor +++ b/frameworks/db/postgresql/ffi/ffi.factor @@ -5,11 +5,11 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators system ; in: db.postgresql.ffi -<< "postgresql" { +COMPILE< "postgresql" { { [ os windows? ] [ "libpq.dll" ] } { [ os macosx? ] [ "libpq.dylib" ] } { [ os unix? ] [ "libpq.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> ! ConnSatusType CONSTANT: CONNECTION_OK 0x0 ; diff --git a/frameworks/db/sqlite/ffi/ffi.factor b/frameworks/db/sqlite/ffi/ffi.factor index 175490343d..15a39000ed 100644 --- a/frameworks/db/sqlite/ffi/ffi.factor +++ b/frameworks/db/sqlite/ffi/ffi.factor @@ -6,11 +6,11 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators system ; in: db.sqlite.ffi -<< "sqlite" { +COMPILE< "sqlite" { { [ os windows? ] [ "sqlite3.dll" ] } { [ os macosx? ] [ "libsqlite3.dylib" ] } { [ os unix? ] [ "libsqlite3.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> ! Return values from sqlite functions CONSTANT: SQLITE_OK 0 ; ! Successful result diff --git a/frameworks/furnace/utilities/utilities-tests.factor b/frameworks/furnace/utilities/utilities-tests.factor index 19e50614bb..1a401b9050 100644 --- a/frameworks/furnace/utilities/utilities-tests.factor +++ b/frameworks/furnace/utilities/utilities-tests.factor @@ -2,7 +2,7 @@ USING: furnace.utilities io.encodings.utf8 io.files io.files.temp kernel multiline parser tools.test webapps.counter ; in: furnace.utilities.tests -<< +COMPILE< STRING: 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 ->> +COMPILE> { t } [ use: dummy-vocab diff --git a/frameworks/ui/pixel-formats/pixel-formats-docs.factor b/frameworks/ui/pixel-formats/pixel-formats-docs.factor index d1cee15245..182c0d04b0 100644 --- a/frameworks/ui/pixel-formats/pixel-formats-docs.factor +++ b/frameworks/ui/pixel-formats/pixel-formats-docs.factor @@ -3,11 +3,11 @@ vocabs vocabs.parser words namespaces ; in: ui.pixel-formats ! break circular dependency -<< +COMPILE< "ui.gadgets.worlds" create-vocab drop "world" "ui.gadgets.worlds" create-word drop "ui.gadgets.worlds" vocab-words-assoc use-words ->> +COMPILE> 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:" diff --git a/language/alien/complex/complex.factor b/language/alien/complex/complex.factor index dffea33549..b638c9a01a 100644 --- a/language/alien/complex/complex.factor +++ b/language/alien/complex/complex.factor @@ -4,12 +4,12 @@ USING: accessors alien.c-types alien.complex.functor kernel sequences ; in: alien.complex -<< +COMPILE< { "float" "double" } [ dup "complex-" prepend define-complex-type ] each ->> +COMPILE> -<< +COMPILE< ! This overrides the fact that small structures are never returned ! in registers on Linux running on 32-bit x86. \ complex-float lookup-c-type t >>return-in-registers? drop ->> +COMPILE> diff --git a/language/alien/enums/enums-tests.factor b/language/alien/enums/enums-tests.factor index fa2e395edd..7163cd77e0 100644 --- a/language/alien/enums/enums-tests.factor +++ b/language/alien/enums/enums-tests.factor @@ -40,12 +40,12 @@ ENUM: colores { rojo red } { verde green } { azul blue } { colorado rojo } ; SYMBOLS: couleurs rouge vert bleu jaune azure ; -<< \ couleurs int { +COMPILE< \ couleurs int { { rouge red } { vert green } { bleu blue } { jaune 14 } { azure bleu } -} define-enum >> +} define-enum COMPILE> { { 0 3 4 14 4 } } [ { rouge vert bleu jaune azure } [ enum>number ] map ] unit-test diff --git a/language/alien/fortran/fortran-tests.factor b/language/alien/fortran/fortran-tests.factor index 375f7cb8dc..417530f641 100644 --- a/language/alien/fortran/fortran-tests.factor +++ b/language/alien/fortran/fortran-tests.factor @@ -8,7 +8,7 @@ QUALIFIED-WITH: alien.c-types c ; QUALIFIED-WITH: alien.syntax s ; 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) STRUCT: fortran_test_record { FOO int } diff --git a/language/alien/parser/parser-tests.factor b/language/alien/parser/parser-tests.factor index 8500520771..807301d1fe 100644 --- a/language/alien/parser/parser-tests.factor +++ b/language/alien/parser/parser-tests.factor @@ -5,7 +5,7 @@ lexer namespaces parser sequences sets tools.test vocabs.parser words ; in: alien.parser.tests -<< +COMPILE< : with-parsing ( lines quot -- ) [ ] [ '[ _ 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 ] unit-test ->> +COMPILE> TYPEDEF: char char2 ; diff --git a/language/alien/syntax/syntax.factor b/language/alien/syntax/syntax.factor index 271045d17a..4968824a83 100755 --- a/language/alien/syntax/syntax.factor +++ b/language/alien/syntax/syntax.factor @@ -3,7 +3,7 @@ USING: alien alien.c-types alien.enums alien.libraries alien.parser fry kernel lexer namespaces parser sequences strings.parser vocabs words ; -<< "alien.arrays" require >> ! needed for bootstrap +COMPILE< "alien.arrays" require COMPILE> ! needed for bootstrap in: alien.syntax SYNTAX: \ DLL" lexer get skip-blank parse-string dlopen suffix! ; diff --git a/language/bootstrap/assembler/ppc.32.linux.factor b/language/bootstrap/assembler/ppc.32.linux.factor index 58f5b5afa6..340222a822 100644 --- a/language/bootstrap/assembler/ppc.32.linux.factor +++ b/language/bootstrap/assembler/ppc.32.linux.factor @@ -69,5 +69,5 @@ CONSTANT: frame-reg 31 ; : param-size ( -- n ) 32 ; : saved-int-regs-size ( -- n ) 96 ; -<< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! >> +COMPILE< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! COMPILE> call diff --git a/language/bootstrap/assembler/ppc.64.linux.factor b/language/bootstrap/assembler/ppc.64.linux.factor index dbae3285f8..2dec2908c5 100644 --- a/language/bootstrap/assembler/ppc.64.linux.factor +++ b/language/bootstrap/assembler/ppc.64.linux.factor @@ -76,5 +76,5 @@ CONSTANT: frame-reg 31 ; : param-size ( -- n ) 64 ; : saved-int-regs-size ( -- n ) 192 ; -<< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! >> +COMPILE< "vocab:bootstrap/assembler/ppc.factor" parse-file suffix! COMPILE> call diff --git a/language/bootstrap/assembler/x86.32.unix.factor b/language/bootstrap/assembler/x86.32.unix.factor index 708e97cd6f..84d1c943b1 100644 --- a/language/bootstrap/assembler/x86.32.unix.factor +++ b/language/bootstrap/assembler/x86.32.unix.factor @@ -3,6 +3,6 @@ USING: kernel parser sequences ; in: bootstrap.x86 -<< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +COMPILE< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! COMPILE> call diff --git a/language/bootstrap/assembler/x86.32.windows.factor b/language/bootstrap/assembler/x86.32.windows.factor index 4224a5527d..88193d4c4c 100644 --- a/language/bootstrap/assembler/x86.32.windows.factor +++ b/language/bootstrap/assembler/x86.32.windows.factor @@ -8,7 +8,7 @@ in: bootstrap.x86 : tib-segment ( -- ) FS ; : tib-temp ( -- reg ) EAX ; -<< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call +COMPILE< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! COMPILE> call : jit-install-seh ( -- ) ! VM pointer must be in vm-reg already @@ -34,5 +34,5 @@ in: bootstrap.x86 ! Store exception record in TIB. tib-exception-list-offset [] tib-temp tib-segment MOV ; -<< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +COMPILE< "vocab:bootstrap/assembler/x86.32.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! COMPILE> call diff --git a/language/bootstrap/assembler/x86.64.unix.factor b/language/bootstrap/assembler/x86.64.unix.factor index c5eb35f6b8..f6d99a8c43 100644 --- a/language/bootstrap/assembler/x86.64.unix.factor +++ b/language/bootstrap/assembler/x86.64.unix.factor @@ -16,6 +16,6 @@ in: bootstrap.x86 : arg4 ( -- reg ) RCX ; : red-zone-size ( -- n ) 128 ; -<< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +COMPILE< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! COMPILE> call diff --git a/language/bootstrap/assembler/x86.64.windows.factor b/language/bootstrap/assembler/x86.64.windows.factor index 46cfe1a2a3..744e348a9f 100644 --- a/language/bootstrap/assembler/x86.64.windows.factor +++ b/language/bootstrap/assembler/x86.64.windows.factor @@ -22,6 +22,6 @@ defer: stack-reg : red-zone-size ( -- n ) 0 ; -<< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! >> call -<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call +COMPILE< "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! COMPILE> call +COMPILE< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! COMPILE> call diff --git a/language/classes/struct/struct-tests.factor b/language/classes/struct/struct-tests.factor index f150cc7059..e798ddbff2 100644 --- a/language/classes/struct/struct-tests.factor +++ b/language/classes/struct/struct-tests.factor @@ -532,7 +532,7 @@ STRUCT: some-accessors { aaa uint } { bbb int } ; { f } [ \ some-accessors \ clone ?lookup-method ] unit-test { f } [ \ some-accessors \ struct-slot-values ?lookup-method ] unit-test -<< \ some-accessors forget >> +COMPILE< \ some-accessors forget COMPILE> ! hashcode tests { 0 } [ struct-test-equality-1 new hashcode ] unit-test diff --git a/language/compiler/cfg/builder/alien/alien-docs.factor b/language/compiler/cfg/builder/alien/alien-docs.factor index 25802b910d..201c5e3e98 100644 --- a/language/compiler/cfg/builder/alien/alien-docs.factor +++ b/language/compiler/cfg/builder/alien/alien-docs.factor @@ -3,7 +3,7 @@ compiler.cfg.instructions compiler.tree help.markup help.syntax literals make multiline sequences stack-checker.alien strings ; in: compiler.cfg.builder.alien -<< +COMPILE< STRING: ex-caller-return USING: compiler.cfg.builder.alien make prettyprint ; [ @@ -15,7 +15,7 @@ USING: compiler.cfg.builder.alien make prettyprint ; T{ ##box-alien { dst 116 } { src 1 } { temp 115 } } } ; ->> +COMPILE> HELP: caller-linkage { $values diff --git a/language/compiler/cfg/builder/blocks/blocks-docs.factor b/language/compiler/cfg/builder/blocks/blocks-docs.factor index e52bcde5f4..285ed852e6 100644 --- a/language/compiler/cfg/builder/blocks/blocks-docs.factor +++ b/language/compiler/cfg/builder/blocks/blocks-docs.factor @@ -2,7 +2,7 @@ USING: compiler.cfg compiler.cfg.stacks.local compiler.tree help.markup help.syntax literals make math multiline quotations sequences ; in: compiler.cfg.builder.blocks -<< +COMPILE< STRING: ex-emit-trivial-block USING: compiler.cfg.builder.blocks make prettyprint ; begin-stack-analysis dup set-basic-block [ gensym ##call, drop ] emit-trivial-block predecessors>> first . @@ -25,7 +25,7 @@ T{ basic-block } } ; ->> +COMPILE> HELP: begin-basic-block { $values { "block" basic-block } { "block'" basic-block } } diff --git a/language/compiler/cfg/builder/builder-docs.factor b/language/compiler/cfg/builder/builder-docs.factor index 1da91fc63d..1aa407633f 100644 --- a/language/compiler/cfg/builder/builder-docs.factor +++ b/language/compiler/cfg/builder/builder-docs.factor @@ -4,7 +4,7 @@ help.markup help.syntax kernel literals math multiline quotations sequences vectors words ; in: compiler.cfg.builder -<< +COMPILE< STRING: ex-emit-call USING: compiler.cfg.builder compiler.cfg.builder.blocks compiler.cfg.stacks kernel make prettyprint ; @@ -43,7 +43,7 @@ H{ { 92 T{ ds-loc } } } ; ->> +COMPILE> HELP: build-cfg { $values { "nodes" sequence } { "word" word } { "procedures" sequence } } diff --git a/language/compiler/cfg/gvn/expressions/expressions.factor b/language/compiler/cfg/gvn/expressions/expressions.factor index 4880d4e5a0..5bdc170b29 100644 --- a/language/compiler/cfg/gvn/expressions/expressions.factor +++ b/language/compiler/cfg/gvn/expressions/expressions.factor @@ -10,7 +10,7 @@ compiler.cfg.gvn.graph ; FROM: sequences.private => set-array-nth ; in: compiler.cfg.gvn.expressions -<< +COMPILE< GENERIC: >expr ( insn -- expr ) ; @@ -57,7 +57,7 @@ insn-classes get define->expr-method ] each ->> +COMPILE> TUPLE: integer-expr value ; diff --git a/language/compiler/cfg/hats/hats.factor b/language/compiler/cfg/hats/hats.factor index 3065becb59..cbbbfc6240 100644 --- a/language/compiler/cfg/hats/hats.factor +++ b/language/compiler/cfg/hats/hats.factor @@ -6,7 +6,7 @@ compiler.cfg.registers compiler.constants effects kernel layouts math namespaces parser sequences splitting words ; in: compiler.cfg.hats -<< +COMPILE< PRIVATE< @@ -39,7 +39,7 @@ insn-classes get [ [ define-hat ] [ drop ] if ] each ->> +COMPILE> : ^^load-literal ( obj -- dst ) dup fixnum? [ ^^load-integer ] [ ^^load-reference ] if ; diff --git a/language/compiler/cfg/instructions/instructions.factor b/language/compiler/cfg/instructions/instructions.factor index 6f0f22fd3a..42a7c66e83 100644 --- a/language/compiler/cfg/instructions/instructions.factor +++ b/language/compiler/cfg/instructions/instructions.factor @@ -4,10 +4,10 @@ USING: accessors compiler.cfg.instructions.syntax kernel math namespaces ; in: compiler.cfg.instructions -<< +COMPILE< symbol: insn-classes V{ } clone insn-classes set-global ->> +COMPILE> : new-insn ( ... class -- insn ) f swap boa ; inline diff --git a/language/compiler/cfg/instructions/syntax/syntax-docs.factor b/language/compiler/cfg/instructions/syntax/syntax-docs.factor index 29a27630d6..0095a65c7d 100644 --- a/language/compiler/cfg/instructions/syntax/syntax-docs.factor +++ b/language/compiler/cfg/instructions/syntax/syntax-docs.factor @@ -1,7 +1,7 @@ USING: help.markup help.syntax literals multiline sequences splitting ; in: compiler.cfg.instructions.syntax -<< +COMPILE< STRING: parse-insn-slot-specs-code USING: compiler.cfg.instructions.syntax prettyprint splitting ; "use: src/int-rep temp: temp/int-rep" " " split parse-insn-slot-specs . @@ -21,7 +21,7 @@ STRING: parse-insn-slot-specs-result } } ; ->> +COMPILE> HELP: parse-insn-slot-specs { $values diff --git a/language/compiler/cfg/value-numbering/expressions/expressions.factor b/language/compiler/cfg/value-numbering/expressions/expressions.factor index cd38ce7286..bb360305fe 100644 --- a/language/compiler/cfg/value-numbering/expressions/expressions.factor +++ b/language/compiler/cfg/value-numbering/expressions/expressions.factor @@ -7,7 +7,7 @@ math namespaces quotations sequences sequences.private sets slots words ; in: compiler.cfg.value-numbering.expressions -<< +COMPILE< GENERIC: >expr ( insn -- expr ) ; @@ -54,7 +54,7 @@ insn-classes get define->expr-method ] each ->> +COMPILE> TUPLE: integer-expr value ; diff --git a/language/compiler/codegen/codegen-docs.factor b/language/compiler/codegen/codegen-docs.factor index 12b93c035e..d5e3e40dad 100644 --- a/language/compiler/codegen/codegen-docs.factor +++ b/language/compiler/codegen/codegen-docs.factor @@ -3,7 +3,7 @@ compiler.codegen.labels compiler.codegen.relocation cpu.architecture hashtables help.markup help.syntax literals make multiline sequences ; in: compiler.codegen -<< +COMPILE< STRING: generate-ex USING: compiler.cfg.debugger io prettyprint ; [ "hello\n" write ] test-regs first dup cfg set generate [ . ] [ 4 swap nth disassemble ] bi @@ -51,7 +51,7 @@ STRING: generate-ex-answer 0000000001cc4cfc: 0000 add [rax], al 0000000001cc4cfe: 0000 add [rax], al ; ->> +COMPILE> HELP: emit-branch { $values { "bb" basic-block } { "successor" basic-block } } diff --git a/language/compiler/codegen/codegen.factor b/language/compiler/codegen/codegen.factor index 52456bc0fa..1403850ad9 100755 --- a/language/compiler/codegen/codegen.factor +++ b/language/compiler/codegen/codegen.factor @@ -117,7 +117,7 @@ M: ##epilogue generate-insn ! Some meta-programming to generate simple code generators, where ! the instruction is unpacked and then a %word is called -<< +COMPILE< : insn-slot-quot ( spec -- quot ) name>> reader-word 1quotation ; @@ -132,7 +132,7 @@ SYNTAX: \ CODEGEN: scan-word [ \ generate-insn create-method-in ] keep scan-word ";" expect codegen-method-body define ; ->> +COMPILE> CODEGEN: ##load-integer %load-immediate ; CODEGEN: ##load-tagged %load-immediate ; @@ -277,13 +277,13 @@ CODEGEN: ##spill %spill ; CODEGEN: ##reload %reload ; ! Conditional branches -<< +COMPILE< SYNTAX: \ CONDITIONAL: scan-word [ \ generate-conditional-insn create-method-in ] keep scan-word ";" expect codegen-method-body define ; ->> +COMPILE> CONDITIONAL: ##compare-branch %compare-branch ; CONDITIONAL: ##compare-imm-branch %compare-imm-branch ; diff --git a/language/compiler/test/test.factor b/language/compiler/test/test.factor index e6b8c8af4b..c949b8bc0d 100644 --- a/language/compiler/test/test.factor +++ b/language/compiler/test/test.factor @@ -13,7 +13,7 @@ in: compiler.test : compile-call ( quot -- ) [ dup infer define-temp ] with-compilation-unit execute ; -<< \ compile-call t "no-compile" set-word-prop >> +COMPILE< \ compile-call t "no-compile" set-word-prop COMPILE> : compiler-test ( name -- ) "resource:basis/compiler/tests/" ".factor" surround run-test-file ; diff --git a/language/compiler/tests/alien.factor b/language/compiler/tests/alien.factor index 4b3a98902f..8301d9c56b 100755 --- a/language/compiler/tests/alien.factor +++ b/language/compiler/tests/alien.factor @@ -18,7 +18,7 @@ in: compiler.tests.alien [ [ void* { "int" } cdecl alien-indirect ] infer ] must-fail [ [ void* { int } cdecl { } alien-callback ] infer ] must-fail -<< +COMPILE< : libfactor-ffi-tests-path ( -- string ) "resource:" absolute-path { @@ -34,7 +34,7 @@ in: compiler.tests.alien "f-stdcall" libfactor-ffi-tests-path stdcall add-library "f-fastcall" libfactor-ffi-tests-path fastcall add-library ->> +COMPILE> library: f-cdecl diff --git a/language/compiler/tests/linkage-errors.factor b/language/compiler/tests/linkage-errors.factor index 41aee21102..ce288129f1 100644 --- a/language/compiler/tests/linkage-errors.factor +++ b/language/compiler/tests/linkage-errors.factor @@ -21,7 +21,7 @@ FUNCTION: void this_does_not_exist ( ) ; ! clone f >>message ] unit-test -<< "no_such_library" "no_such_library" cdecl add-library >> +COMPILE< "no_such_library" "no_such_library" cdecl add-library COMPILE> library: no_such_library diff --git a/language/compiler/tests/pic-problem-1.factor b/language/compiler/tests/pic-problem-1.factor index 86c5940fd2..56e9381854 100644 --- a/language/compiler/tests/pic-problem-1.factor +++ b/language/compiler/tests/pic-problem-1.factor @@ -7,7 +7,7 @@ M: x length drop 0 ; INSTANCE: x sequence ; -<< gc >> +COMPILE< gc COMPILE> CONSTANT: blah T{ x } ; diff --git a/language/compiler/tests/redefine0.factor b/language/compiler/tests/redefine0.factor index 318afe6e30..076483fa8b 100644 --- a/language/compiler/tests/redefine0.factor +++ b/language/compiler/tests/redefine0.factor @@ -76,9 +76,9 @@ M: integer test-7 + ; ! Indirect dependency on an unoptimized word : test-9 ( -- ) ; -<< symbol: quot +COMPILE< symbol: quot [ test-9 ] quot set-global -MACRO: test-10 ( -- quot ) quot get ; >> +MACRO: test-10 ( -- quot ) quot get ; COMPILE> : test-11 ( -- ) test-10 ; [ ] [ test-11 ] unit-test diff --git a/language/compiler/tests/redefine13.factor b/language/compiler/tests/redefine13.factor index 00b0ec1753..18035cbe2b 100644 --- a/language/compiler/tests/redefine13.factor +++ b/language/compiler/tests/redefine13.factor @@ -3,7 +3,7 @@ in: compiler.tests.redefine13 : breakage-word ( a b -- c ) + ; -<< MACRO: breakage-macro ( a -- quot ) '[ _ breakage-word ] ; >> +COMPILE< MACRO: breakage-macro ( a -- quot ) '[ _ breakage-word ] ; COMPILE> GENERIC: breakage-caller ( a -- c ) ; diff --git a/language/compiler/tests/redefine17.factor b/language/compiler/tests/redefine17.factor index a4814c13a9..c875f9664e 100644 --- a/language/compiler/tests/redefine17.factor +++ b/language/compiler/tests/redefine17.factor @@ -2,7 +2,7 @@ USING: tools.test classes.mixin compiler.units arrays kernel.private strings sequences vocabs definitions kernel ; in: compiler.tests.redefine17 -<< "compiler.tests.redefine17" vocab-words forget-all >> +COMPILE< "compiler.tests.redefine17" vocab-words forget-all COMPILE> GENERIC: bong ( a -- b ) ; diff --git a/language/compiler/tests/redefine21.factor b/language/compiler/tests/redefine21.factor index a26411a014..dca56590de 100644 --- a/language/compiler/tests/redefine21.factor +++ b/language/compiler/tests/redefine21.factor @@ -1,10 +1,10 @@ USING: kernel tools.test definitions compiler.units ; in: compiler.tests.redefine21 -[ ] [ : a ( -- ) ; << : b ( quot -- ) call a ; inline >> [ ] b ] unit-test +[ ] [ : a ( -- ) ; << : b ( quot -- ) call a ; inline COMPILE> [ ] b ] unit-test [ ] [ [ { a b } forget-all ] with-compilation-unit ] unit-test -[ ] [ : A ( -- ) ; << : B ( -- ) A ; inline >> B ] unit-test +[ ] [ : A ( -- ) ; << : B ( -- ) A ; inline COMPILE> B ] unit-test [ ] [ [ { A B } forget-all ] with-compilation-unit ] unit-test diff --git a/language/compiler/tree/propagation/propagation-docs.factor b/language/compiler/tree/propagation/propagation-docs.factor index 890ac9a646..3a0f18ac72 100644 --- a/language/compiler/tree/propagation/propagation-docs.factor +++ b/language/compiler/tree/propagation/propagation-docs.factor @@ -1,7 +1,7 @@ USING: help.markup help.syntax literals multiline ; in: compiler.tree.propagation -<< +COMPILE< STRING: propagate-ex USING: compiler.tree.builder compiler.tree.propagation math prettyprint ; [ 3 + ] build-tree propagate third . @@ -43,7 +43,7 @@ T{ #call } } ; ->> +COMPILE> HELP: propagate { $values { "nodes" "a sequence of nodes" } } diff --git a/language/constructors/constructors-tests.factor b/language/constructors/constructors-tests.factor index 881f4aac0d..ac9d0d0e2f 100644 --- a/language/constructors/constructors-tests.factor +++ b/language/constructors/constructors-tests.factor @@ -49,9 +49,9 @@ TUPLE: a-monster < monster ; TUPLE: b-monster < monster ; -<< +COMPILE< slot-constructor: a-monster ->> +COMPILE> : ( name hp max-hp -- obj ) 2dup + diff --git a/language/cpu/arm/assembler/assembler.factor b/language/cpu/arm/assembler/assembler.factor index 02a568a913..53b9ee995e 100644 --- a/language/cpu/arm/assembler/assembler.factor +++ b/language/cpu/arm/assembler/assembler.factor @@ -5,7 +5,7 @@ namespaces sequences words words.symbol parser ; in: cpu.arm.assembler ! Registers -<< +COMPILE< symbol: registers @@ -18,7 +18,7 @@ SYNTAX: register: [ registers get push ] tri ; ->> +COMPILE> register: R0 register: R1 diff --git a/language/definitions/icons/icons.factor b/language/definitions/icons/icons.factor index e45256d2ff..8a188da311 100644 --- a/language/definitions/icons/icons.factor +++ b/language/definitions/icons/icons.factor @@ -10,7 +10,7 @@ GENERIC: definition-icon ( definition -- path ) ; : definition-icon-path ( string -- string' ) "vocab:definitions/icons/" prepend-path ".png" append ; -<< +COMPILE< symbol: icons @@ -26,7 +26,7 @@ icons [ H{ } clone ] initialize SYNTAX: \ ICON: scan-word scan-token ";" expect define-icon ; ->> +COMPILE> ICON: predicate-class class-predicate-word ; ICON: generic generic-word ; diff --git a/language/functors/functors-tests.factor b/language/functors/functors-tests.factor index 48efd0f821..ea55b0e890 100644 --- a/language/functors/functors-tests.factor +++ b/language/functors/functors-tests.factor @@ -3,7 +3,7 @@ words kernel multiline parser io.streams.string generic ; QUALIFIED-WITH: alien.c-types c ; in: functors.tests -<< +COMPILE< FUNCTOR: define-box ( T -- ) @@ -20,7 +20,7 @@ FUNCTOR; \ float define-box ->> +COMPILE> { 1 0 } [ define-box ] must-infer-as @@ -28,7 +28,7 @@ FUNCTOR; : twice ( word -- ) [ execute ] [ execute ] bi ; inline -<< +COMPILE< FUNCTOR: wrapper-test ( W -- ) @@ -42,11 +42,11 @@ FUNCTOR; \ sq wrapper-test ->> +COMPILE> [ 16 ] [ 2 sqsq ] unit-test -<< +COMPILE< FUNCTOR: wrapper-test-2 ( W -- ) @@ -60,11 +60,11 @@ FUNCTOR; "blah" wrapper-test-2 ->> +COMPILE> [ 4 ] [ 1 3 blah ] unit-test -<< +COMPILE< FUNCTOR: symbol-test ( W -- ) @@ -78,11 +78,11 @@ FUNCTOR; "blorgh" symbol-test ->> +COMPILE> [ blorgh ] [ blorgh ] unit-test -<< +COMPILE< FUNCTOR: generic-test ( W -- ) @@ -98,7 +98,7 @@ FUNCTOR; "snurv" generic-test ->> +COMPILE> [ 2 ] [ 1 snurv ] unit-test [ 3.0 ] [ 3.0 snurv ] unit-test @@ -150,7 +150,7 @@ FUNCTOR; test-redefinition -<< +COMPILE< FUNCTOR: define-a-struct ( T NAME TYPE N -- ) @@ -169,7 +169,7 @@ FUNCTOR; "a-struct" "nemo" c:char 2 define-a-struct ->> +COMPILE> [ { @@ -211,7 +211,7 @@ FUNCTOR; } ] [ a-struct struct-slots ] unit-test -<< +COMPILE< FUNCTOR: define-an-inline-word ( W -- ) @@ -227,12 +227,12 @@ FUNCTOR; "an-inline-word" define-an-inline-word ->> +COMPILE> [ t ] [ \ an-inline-word inline? ] unit-test [ f ] [ \ an-inline-word-an-inline-word inline? ] unit-test -<< +COMPILE< FUNCTOR: define-a-final-class ( T W -- ) @@ -249,6 +249,6 @@ FUNCTOR; "a-final-tuple" "a-word" define-a-final-class ->> +COMPILE> [ t ] [ a-final-tuple final-class? ] unit-test diff --git a/language/io/backend/unix/macosx/macosx.factor b/language/io/backend/unix/macosx/macosx.factor index 8cf257b2ed..83cd260ea8 100644 --- a/language/io/backend/unix/macosx/macosx.factor +++ b/language/io/backend/unix/macosx/macosx.factor @@ -3,7 +3,7 @@ USING: init io.backend io.backend.unix io.backend.unix.multiplexers io.backend.unix.multiplexers.kqueue io.backend.unix.multiplexers.run-loop namespaces system vocabs ; -<< "io.files.unix" require >> ! needed for deploy +COMPILE< "io.files.unix" require COMPILE> ! needed for deploy in: io.backend.unix.macosx singleton: macosx-kqueue diff --git a/language/io/sockets/icmp/icmp.factor b/language/io/sockets/icmp/icmp.factor index 130a172d4f..276d52d51e 100644 --- a/language/io/sockets/icmp/icmp.factor +++ b/language/io/sockets/icmp/icmp.factor @@ -6,10 +6,10 @@ io.sockets.private memoize sequences system vocabs.parser ; in: io.sockets.icmp -<< { +COMPILE< { { [ os windows? ] [ "windows.winsock" ] } { [ os unix? ] [ "unix.ffi" ] } -} cond use-vocab >> +} cond use-vocab COMPILE> PRIVATE< diff --git a/language/io/sockets/sockets.factor b/language/io/sockets/sockets.factor index 781bbb6478..9f1ebf644b 100644 --- a/language/io/sockets/sockets.factor +++ b/language/io/sockets/sockets.factor @@ -11,10 +11,10 @@ sequences sequences.private splitting strings summary system vocabs vocabs.parser ip-parser ip-parser.private random ; in: io.sockets -<< { +COMPILE< { { [ os windows? ] [ "windows.winsock" ] } { [ os unix? ] [ "unix.ffi" ] } -} cond use-vocab >> +} cond use-vocab COMPILE> GENERIC# with-port 1 ( addrspec port -- addrspec ) ; diff --git a/language/literals/literals-tests.factor b/language/literals/literals-tests.factor index 62bd34f637..e0a3c7b652 100644 --- a/language/literals/literals-tests.factor +++ b/language/literals/literals-tests.factor @@ -1,9 +1,9 @@ USING: accessors kernel literals math tools.test ; in: literals.tests -<< +COMPILE< : six-six-six ( -- a b c ) 6 6 6 ; ->> +COMPILE> : five ( -- a ) 5 ; : seven-eleven ( -- b c ) 7 11 ; diff --git a/language/multi-methods/tests/definitions.factor b/language/multi-methods/tests/definitions.factor index 48962c2e91..382b370bc7 100644 --- a/language/multi-methods/tests/definitions.factor +++ b/language/multi-methods/tests/definitions.factor @@ -4,7 +4,7 @@ in: multi-methods.tests defer: fake \ fake H{ } clone "multi-methods" set-word-prop -<< ( -- ) \ fake set-stack-effect >> +COMPILE< ( -- ) \ fake set-stack-effect COMPILE> [ [ "fake-{ }" ] [ { } \ fake method-word-name ] unit-test diff --git a/language/multiline/multiline-tests.factor b/language/multiline/multiline-tests.factor index 6841083d47..bfa67986f4 100644 --- a/language/multiline/multiline-tests.factor +++ b/language/multiline/multiline-tests.factor @@ -72,9 +72,9 @@ xyz ] unit-test /* -<< +COMPILE< SYNTAX: MULTILINE-LITERAL: parse-here suffix! ; ->> +COMPILE> { { "bar" } } [ diff --git a/language/peg/ebnf/ebnf-tests.factor b/language/peg/ebnf/ebnf-tests.factor index 5347259e3c..44b225354b 100644 --- a/language/peg/ebnf/ebnf-tests.factor +++ b/language/peg/ebnf/ebnf-tests.factor @@ -468,11 +468,11 @@ main = Primary "foo=!(keyword) name:n => [[ n ]]" rule-parser parse = ] unit-test -<< +COMPILE< : parser1 ( string -- obj ) EBNF{{ foo='a' }} ; ->> +COMPILE> : parser2 ( string -- obj ) EBNF{{ foo= 'b' diff --git a/language/serialize/serialize-tests.factor b/language/serialize/serialize-tests.factor index 1589315f7c..86b6196153 100644 --- a/language/serialize/serialize-tests.factor +++ b/language/serialize/serialize-tests.factor @@ -59,7 +59,7 @@ CONSTANT: objects B{ 50 13 55 64 1 } ?{ t f t f f t f } double-array{ 1.0 3.0 4.0 1.0 2.35 0.33 } - << 1 [ 2 ] curry suffix! >> + << 1 [ 2 ] curry suffix! COMPILE> { { "a" "bc" } { "de" "fg" } } H{ { "a" "bc" } { "de" "fg" } } } ; diff --git a/libs/annotations/annotations.factor b/libs/annotations/annotations.factor index 4698884737..afeaef43d1 100644 --- a/libs/annotations/annotations.factor +++ b/libs/annotations/annotations.factor @@ -4,7 +4,7 @@ kernel lexer namespaces parser prettyprint tools.crossref sequences words ; in: annotations -<< +COMPILE< : (parse-annotation) ( accum -- accum ) lexer get [ line-text>> suffix! ] [ next-line ] bi ; @@ -40,4 +40,4 @@ CONSTANT: annotation-tags { annotation-tags [ define-annotation ] each ->> +COMPILE> diff --git a/libs/base64/base64.factor b/libs/base64/base64.factor index b8f97a964a..cfae33ae97 100644 --- a/libs/base64/base64.factor +++ b/libs/base64/base64.factor @@ -9,7 +9,7 @@ ERROR: malformed-base64 ; PRIVATE< -<< +COMPILE< CONSTANT: alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ; @@ -17,7 +17,7 @@ CONSTANT: alphabet dup supremum 1 + f [ '[ swap _ set-nth ] each-index ] keep ; ->> +COMPILE> : ch>base64 ( ch -- ch ) alphabet nth ; inline diff --git a/libs/base85/base85.factor b/libs/base85/base85.factor index 8d600f9761..016a2afbcb 100644 --- a/libs/base85/base85.factor +++ b/libs/base85/base85.factor @@ -9,10 +9,10 @@ ERROR: malformed-base85 ; PRIVATE< -<< +COMPILE< CONSTANT: alphabet "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~\";" ; ->> +COMPILE> : ch>base85 ( ch -- ch ) alphabet nth ; inline diff --git a/libs/c/lexer/lexer.factor b/libs/c/lexer/lexer.factor index 89d24c96ff..d0db68849e 100644 --- a/libs/c/lexer/lexer.factor +++ b/libs/c/lexer/lexer.factor @@ -92,7 +92,7 @@ in: c.lexer : take-c-identifier ( sequence-parser -- string/f ) [ (take-c-identifier) ] with-sequence-parser ; -<< "length" [ length ] define-sorting >> +COMPILE< "length" [ length ] define-sorting COMPILE> : sort-tokens ( seq -- seq' ) { length>=< <=> } sort-by ; diff --git a/libs/calendar/holidays/holidays.factor b/libs/calendar/holidays/holidays.factor index c400d63e3a..56837e77ea 100644 --- a/libs/calendar/holidays/holidays.factor +++ b/libs/calendar/holidays/holidays.factor @@ -6,7 +6,7 @@ in: calendar.holidays SINGLETONS: all world commonwealth-of-nations ; -<< +COMPILE< SYNTAX: \ HOLIDAY: scan-new-word dup "holiday" word-prop [ @@ -18,7 +18,7 @@ SYNTAX: \ HOLIDAY-NAME: let[ scan-word "holiday" word-prop :> holidays scan-word :> name scan-object :> value ";" expect value name holidays set-at ] ; ->> +COMPILE> GENERIC: holidays ( n singleton -- seq ) ; diff --git a/libs/chipmunk/ffi/ffi.factor b/libs/chipmunk/ffi/ffi.factor index 4632ffbdec..c7e5bbd18c 100644 --- a/libs/chipmunk/ffi/ffi.factor +++ b/libs/chipmunk/ffi/ffi.factor @@ -7,7 +7,7 @@ system ; specialized-array: void* in: chipmunk.ffi -<< +COMPILE< "chipmunk" { { [ os windows? ] [ "chipmunk.dll" ] } { [ os macosx? ] [ "libchipmunk.dylib" ] } @@ -15,7 +15,7 @@ in: chipmunk.ffi } cond cdecl add-library "chipmunk" deploy-library ->> +COMPILE> library: chipmunk ! chipmunk_types.h diff --git a/libs/compression/snappy/ffi/ffi.factor b/libs/compression/snappy/ffi/ffi.factor index 71fdfc782f..60698422cd 100644 --- a/libs/compression/snappy/ffi/ffi.factor +++ b/libs/compression/snappy/ffi/ffi.factor @@ -4,11 +4,11 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators classes.struct system ; in: compression.snappy.ffi -<< "snappy" { +COMPILE< "snappy" { { [ os windows? ] [ "snappy.dll" ] } { [ os macosx? ] [ "libsnappy.dylib" ] } { [ os unix? ] [ "libsnappy.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: snappy diff --git a/libs/compression/zlib/ffi/ffi.factor b/libs/compression/zlib/ffi/ffi.factor index d908e3b1c3..402e2e1ee5 100644 --- a/libs/compression/zlib/ffi/ffi.factor +++ b/libs/compression/zlib/ffi/ffi.factor @@ -4,11 +4,11 @@ USING: alien alien.c-types alien.libraries alien.syntax classes.struct combinators system ; in: compression.zlib.ffi -<< "zlib" { +COMPILE< "zlib" { { [ os windows? ] [ "zlib1.dll" ] } { [ os macosx? ] [ "libz.dylib" ] } { [ os unix? ] [ "libz.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: zlib diff --git a/libs/english/english.factor b/libs/english/english.factor index f39474d29a..c7fd3dac03 100644 --- a/libs/english/english.factor +++ b/libs/english/english.factor @@ -7,7 +7,7 @@ in: english PRIVATE< -<< +COMPILE< ! Irregular pluralizations CONSTANT: singular-to-plural H{ @@ -91,7 +91,7 @@ CONSTANT: singular-to-plural H{ { "louse" "lice" } { "mouse" "mice" } } ; ->> +COMPILE> CONSTANT: plural-to-singular $[ singular-to-plural assoc-invert ] ; diff --git a/libs/gml/runtime/runtime.factor b/libs/gml/runtime/runtime.factor index c6191a3cca..5bad9dd56f 100644 --- a/libs/gml/runtime/runtime.factor +++ b/libs/gml/runtime/runtime.factor @@ -31,7 +31,7 @@ FROM: kernel.private => declare ; : is-gml ( registers gml obj -- registers gml obj ) { array gml object } declare ; inline -<< +COMPILE< : (EXEC:) ( quot -- method def ) scan-word \ (exec) create-method-in @@ -41,7 +41,7 @@ SYNTAX: \ EXEC: [ parse-definition ] (EXEC:) define ; SYNTAX: \ EXEC:: [ [ parse-definition ] parse-locals-definition drop ] (EXEC:) define ; ->> +COMPILE> ! Literals EXEC: object over push-operand ; diff --git a/libs/html/elements/elements.factor b/libs/html/elements/elements.factor index 58d39ddef5..0b66a38e82 100644 --- a/libs/html/elements/elements.factor +++ b/libs/html/elements/elements.factor @@ -14,7 +14,7 @@ symbol: html : print-html ( str -- ) write-html "\n" write-html ; -<< +COMPILE< CONSTANT: elements-vocab "html.elements" ; @@ -125,4 +125,4 @@ CONSTANT: elements-vocab "html.elements" ; "nofollow" "alt" "target" ] [ define-attribute-word ] each ->> +COMPILE> diff --git a/libs/libc/libc.factor b/libs/libc/libc.factor index 62f3f89ade..36a8eee686 100644 --- a/libs/libc/libc.factor +++ b/libs/libc/libc.factor @@ -120,4 +120,4 @@ FUNCTION: int system ( c-string command ) ; destructor: free ! For libc.linux, libc.windows, libc.macosx... -<< "libc." os name>> append require >> +COMPILE< "libc." os name>> append require COMPILE> diff --git a/libs/magic/ffi/ffi.factor b/libs/magic/ffi/ffi.factor index 2361d20622..33cc9fcb86 100644 --- a/libs/magic/ffi/ffi.factor +++ b/libs/magic/ffi/ffi.factor @@ -6,10 +6,10 @@ alien.syntax combinators kernel literals system ; in: magic.ffi -<< "magic" { +COMPILE< "magic" { { [ os macosx? ] [ "libmagic.dylib" ] } { [ os unix? ] [ "libmagic.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: magic diff --git a/libs/math/bitwise/bitwise.factor b/libs/math/bitwise/bitwise.factor index 1c08947258..9acd397154 100644 --- a/libs/math/bitwise/bitwise.factor +++ b/libs/math/bitwise/bitwise.factor @@ -80,7 +80,7 @@ PRIVATE< defer: byte-bit-count -<< +COMPILE< \ byte-bit-count 256 iota [ @@ -90,7 +90,7 @@ defer: byte-bit-count \ byte-bit-count make-inline ->> +COMPILE> GENERIC: (bit-count) ( x -- n ) ; diff --git a/libs/math/blas/ffi/ffi.factor b/libs/math/blas/ffi/ffi.factor index 788c53e172..318e336f9b 100644 --- a/libs/math/blas/ffi/ffi.factor +++ b/libs/math/blas/ffi/ffi.factor @@ -2,12 +2,12 @@ USING: alien.fortran kernel math.blas.config namespaces ; FROM: alien.libraries => deploy-library ; in: math.blas.ffi -<< +COMPILE< "blas" blas-library blas-fortran-abi [ get ] bi@ add-fortran-library deploy-blas? get [ "blas" deploy-library ] when ->> +COMPILE> library: blas diff --git a/libs/math/blas/matrices/matrices.factor b/libs/math/blas/matrices/matrices.factor index 2edf967361..ad4d61e0b6 100644 --- a/libs/math/blas/matrices/matrices.factor +++ b/libs/math/blas/matrices/matrices.factor @@ -245,7 +245,7 @@ M: blas-matrix-base equal? [ [ Mcols ] bi@ [ = ] 2all? ] } 2&& ; -<< +COMPILE< FUNCTOR: (define-blas-matrix) ( TYPE T U C -- ) @@ -309,7 +309,7 @@ double "D" define-real-blas-matrix complex-float "C" define-complex-blas-matrix complex-double "Z" define-complex-blas-matrix ->> +COMPILE> M: blas-matrix-base >pprint-sequence Mrows ; M: blas-matrix-base pprint* pprint-object ; diff --git a/libs/math/blas/vectors/vectors.factor b/libs/math/blas/vectors/vectors.factor index aad41a009d..4bebc8a576 100644 --- a/libs/math/blas/vectors/vectors.factor +++ b/libs/math/blas/vectors/vectors.factor @@ -127,7 +127,7 @@ M: blas-vector-base virtual@ : arg>float ( f -- f ) ; inline : arg>double ( f -- f ) ; inline -<< +COMPILE< FUNCTOR: (define-blas-vector) ( TYPE T -- ) @@ -242,7 +242,7 @@ double "D" define-real-blas-vector complex-float "C" "S" define-complex-blas-vector complex-double "Z" "D" define-complex-blas-vector ->> +COMPILE> M: blas-vector-base >pprint-sequence ; M: blas-vector-base pprint* pprint-object ; diff --git a/libs/math/floats/half/half.factor b/libs/math/floats/half/half.factor index c7c3c4e491..584dc4d0f4 100644 --- a/libs/math/floats/half/half.factor +++ b/libs/math/floats/half/half.factor @@ -30,7 +30,7 @@ in: math.floats.half symbol: half -<< +COMPILE< float >>class @@ -43,4 +43,4 @@ symbol: half [ >float ] >>unboxer-quot \ half typedef ->> +COMPILE> diff --git a/libs/math/libm/libm.factor b/libs/math/libm/libm.factor index d08f1d280e..9fd2e98d59 100644 --- a/libs/math/libm/libm.factor +++ b/libs/math/libm/libm.factor @@ -57,9 +57,9 @@ M: float mod fmod ; inline ! fsqrt has an intrinsic so we don't actually want to inline it ! unconditionally -<< +COMPILE< \ fsqrt f "inline" set-word-prop ->> +COMPILE> ! Windows doesn't have these... FUNCTION-ALIAS: flog1+ diff --git a/libs/math/vectors/simd/cords/cords.factor b/libs/math/vectors/simd/cords/cords.factor index c106b136b7..9988c6d9a1 100644 --- a/libs/math/vectors/simd/cords/cords.factor +++ b/libs/math/vectors/simd/cords/cords.factor @@ -5,7 +5,7 @@ prettyprint.custom quotations sequences sequences.cords words classes ; in: math.vectors.simd.cords -<< +COMPILE< PRIVATE< FUNCTOR: (define-simd-128-cord) ( A/2 A -- ) @@ -82,7 +82,7 @@ SYNTAX: \ SIMD-128-CORD: scan-word scan-token ";" expect define-simd-128-cord ; PRIVATE> ->> +COMPILE> SIMD-128-CORD: char-16 char-32 ; SIMD-128-CORD: uchar-16 uchar-32 ; diff --git a/libs/math/vectors/simd/simd.factor b/libs/math/vectors/simd/simd.factor index e954e0931a..d6daad6ac4 100644 --- a/libs/math/vectors/simd/simd.factor +++ b/libs/math/vectors/simd/simd.factor @@ -11,7 +11,7 @@ in: math.vectors.simd ERROR: bad-simd-length got expected ; ERROR: bad-simd-vector obj ; -<< +COMPILE< PRIVATE< ! Primitive SIMD constructors @@ -22,7 +22,7 @@ GENERIC: new-underlying ( underlying seq -- seq' ) ; : change-underlying ( seq quot -- seq' ) '[ underlying>> @ ] keep new-underlying ; inline PRIVATE> ->> +COMPILE> PRIVATE< @@ -55,7 +55,7 @@ GENERIC: simd-with ( n exemplar -- v ) ; M: object simd-element-type drop f ; M: object simd-rep drop f ; -<< +COMPILE< PRIVATE< defer: simd-construct-op @@ -125,9 +125,9 @@ defer: simd-construct-op } case ; inline PRIVATE> ->> +COMPILE> -<< +COMPILE< ! SIMD vectors as sequences @@ -336,7 +336,7 @@ SYNTAX: SIMD-128: PRIVATE> ->> +COMPILE> ! SIMD instances diff --git a/libs/path-finding/path-finding-tests.factor b/libs/path-finding/path-finding-tests.factor index d56ce0ce50..a76a44071f 100644 --- a/libs/path-finding/path-finding-tests.factor +++ b/libs/path-finding/path-finding-tests.factor @@ -11,7 +11,7 @@ in: path-finding.tests ! - going down costs 1 point ! - going left or right costs 2 points -<< +COMPILE< TUPLE: maze < astar ; @@ -45,7 +45,7 @@ M: maze cost : test1 ( to -- path considered ) { 1 1 } swap maze new [ find-path ] [ considered ] bi ; ->> +COMPILE> ! Existing path from s to f { @@ -93,7 +93,7 @@ M: maze cost ! A ---> D ---------> E ---> F ! (2) (1) (1) -<< +COMPILE< ! In this version, we will use the quotations-aware version through . @@ -107,7 +107,7 @@ MEMO: routes ( -- hash ) $[ { "ABD" "BC" "C" "DCE" "ECF" } [ unclip swap 2array : test2 ( fromto -- path considered ) first2 [ n ] [ c ] [ 2drop 0 ] [ find-path ] [ considered natural-sort >string ] bi ; ->> +COMPILE> ! Check path from A to C -- all nodes but F must have been examined { "ADC" "ABCDE" } [ "AC" test2 [ >string ] dip ] unit-test @@ -121,7 +121,7 @@ MEMO: routes ( -- hash ) $[ { "ABD" "BC" "C" "DCE" "ECF" } [ unclip swap 2array { f } [ "FA" first2 routes find-path ] unit-test { "DC" } [ "DC" first2 routes find-path >string ] unit-test -<< +COMPILE< ! Build the costs as expected by the dijkstra word. @@ -131,7 +131,7 @@ MEMO: costs ( -- costs ) : test3 ( fromto -- path considered ) first2 costs [ find-path ] [ considered natural-sort >string ] bi ; ->> +COMPILE> ! Check path from A to C -- all nodes but F must have been examined { "ADC" "ABCDE" } [ "AC" test3 [ >string ] dip ] unit-test diff --git a/libs/random/data/data.factor b/libs/random/data/data.factor index 9dbfcd606c..3292ae21a0 100644 --- a/libs/random/data/data.factor +++ b/libs/random/data/data.factor @@ -4,10 +4,10 @@ USING: combinators combinators.random effects.parser kernel literals math random sequences ; in: random.data -<< +COMPILE< CONSTANT: digits-count 10 ; CONSTANT: letters-count 26 ; ->> +COMPILE> : random-digit ( -- ch ) digits-count random char: 0 + ; diff --git a/libs/roman/roman.factor b/libs/roman/roman.factor index bcb6f78292..4cb7422140 100644 --- a/libs/roman/roman.factor +++ b/libs/roman/roman.factor @@ -54,14 +54,14 @@ MACRO: binary-roman-op ( quot -- quot' ) PRIVATE> -<< +COMPILE< SYNTAX: \ ROMAN-OP: scan-word [ name>> "roman" prepend create-word-in ] keep 1quotation '[ _ binary-roman-op ] scan-effect ";" expect define-declared ; ->> +COMPILE> ROMAN-OP: + ( x y -- z ) ; ROMAN-OP: - ( x y -- z ) ; diff --git a/libs/sorting/human/human.factor b/libs/sorting/human/human.factor index b6151a3835..46cd8fb5ad 100644 --- a/libs/sorting/human/human.factor +++ b/libs/sorting/human/human.factor @@ -42,5 +42,5 @@ M: alphanum <=> <=> ] if ; -<< "human" [ find-numbers [ ] map ] define-sorting >> -<< "humani" [ find-numbers [ ] map ] define-sorting >> +COMPILE< "human" [ find-numbers [ ] map ] define-sorting COMPILE> +COMPILE< "humani" [ find-numbers [ ] map ] define-sorting COMPILE> diff --git a/libs/sorting/slots/slots-tests.factor b/libs/sorting/slots/slots-tests.factor index 8dd5351732..ab20262ce8 100644 --- a/libs/sorting/slots/slots-tests.factor +++ b/libs/sorting/slots/slots-tests.factor @@ -74,7 +74,7 @@ TUPLE: tuple2 d ; { { "a" "b" "c" } } [ { "b" "c" "a" } { <=> <=> } sort-by ] unit-test { { "b" "c" "a" } } [ { "b" "c" "a" } { } sort-by ] unit-test -<< "length-test" [ length ] define-sorting >> +COMPILE< "length-test" [ length ] define-sorting COMPILE> { { { 1 } { 1 2 3 } { 1 3 2 } { 3 2 1 } } } [ diff --git a/libs/sorting/title/title.factor b/libs/sorting/title/title.factor index 61512e2129..b085407268 100644 --- a/libs/sorting/title/title.factor +++ b/libs/sorting/title/title.factor @@ -4,7 +4,7 @@ USING: sorting.functor regexp kernel accessors sequences unicode ; in: sorting.title -<< "title" [ +COMPILE< "title" [ >lower dup R[[ ^(the|a|an|el|la|los|las|il) ]] first-match [ to>> tail-slice ] when* -] define-sorting >> +] define-sorting COMPILE> diff --git a/libs/text-analysis/text-analysis.factor b/libs/text-analysis/text-analysis.factor index 52a70739ce..c8784bbf98 100644 --- a/libs/text-analysis/text-analysis.factor +++ b/libs/text-analysis/text-analysis.factor @@ -16,7 +16,7 @@ PRIVATE< : split-paragraphs ( str -- seq ) R[[ \r?\n\r?\n]] re-split trimmed ; -<< +COMPILE< CONSTANT: ABBREVIATIONS { "jr" "mr" "mrs" "ms" "dr" "prof" "sr" "sen" "rep" "rev" "gov" "atty" "supt" "det" "rev" "col','gen" "lt" "cmdr" @@ -34,7 +34,7 @@ CONSTANT: ABBREVIATIONS { "ave" "bld" "blvd" "cl" "ct" "cres" "dr" "rd" "st" ! streets } ; ->> +COMPILE> : split-sentences ( str -- seq ) diff --git a/libs/tokyo/abstractdb/abstractdb.factor b/libs/tokyo/abstractdb/abstractdb.factor index f62d815a45..cc67abd21a 100644 --- a/libs/tokyo/abstractdb/abstractdb.factor +++ b/libs/tokyo/abstractdb/abstractdb.factor @@ -3,7 +3,7 @@ USING: accessors kernel tokyo.alien.tcadb tokyo.assoc-functor ; in: tokyo.abstractdb -<< "tcadb" "abstractdb" define-tokyo-assoc-api >> +COMPILE< "tcadb" "abstractdb" define-tokyo-assoc-api COMPILE> : ( name -- tokyo-abstractdb ) tcadbnew [ swap tcadbopen drop ] keep diff --git a/libs/tokyo/alien/tcrdb/tcrdb.factor b/libs/tokyo/alien/tcrdb/tcrdb.factor index b81a4f7cba..f4f2419270 100644 --- a/libs/tokyo/alien/tcrdb/tcrdb.factor +++ b/libs/tokyo/alien/tcrdb/tcrdb.factor @@ -5,11 +5,11 @@ combinators kernel system tokyo.alien.tchdb tokyo.alien.tcutil tokyo.alien.tctdb classes.struct ; in: tokyo.alien.tcrdb -<< "tokyotyrant" { +COMPILE< "tokyotyrant" { { [ os macosx? ] [ "libtokyotyrant.dylib" ] } { [ os unix? ] [ "libtokyotyrant.so" ] } { [ os windows? ] [ "tokyotyrant.dll" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: tokyotyrant diff --git a/libs/tokyo/alien/tcutil/tcutil.factor b/libs/tokyo/alien/tcutil/tcutil.factor index 36d828d379..8ec53ae1af 100644 --- a/libs/tokyo/alien/tcutil/tcutil.factor +++ b/libs/tokyo/alien/tcutil/tcutil.factor @@ -4,11 +4,11 @@ USING: alien alien.c-types alien.libraries alien.syntax combinators kernel system ; in: tokyo.alien.tcutil -<< "tokyocabinet" { +COMPILE< "tokyocabinet" { { [ os macosx? ] [ "libtokyocabinet.dylib" ] } { [ os unix? ] [ "libtokyocabinet.so" ] } { [ os windows? ] [ "tokyocabinet.dll" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: tokyocabinet diff --git a/libs/tokyo/remotedb/remotedb.factor b/libs/tokyo/remotedb/remotedb.factor index b6014874da..3558d1b3c4 100644 --- a/libs/tokyo/remotedb/remotedb.factor +++ b/libs/tokyo/remotedb/remotedb.factor @@ -3,7 +3,7 @@ USING: accessors kernel tokyo.alien.tcrdb tokyo.assoc-functor ; in: tokyo.remotedb -<< "tcrdb" "remotedb" define-tokyo-assoc-api >> +COMPILE< "tcrdb" "remotedb" define-tokyo-assoc-api COMPILE> : ( host port -- tokyo-remotedb ) [ tcrdbnew dup ] 2dip tcrdbopen drop diff --git a/libs/unicode/breaks/breaks.factor b/libs/unicode/breaks/breaks.factor index 4cf39e1e0e..bead5622a0 100644 --- a/libs/unicode/breaks/breaks.factor +++ b/libs/unicode/breaks/breaks.factor @@ -9,7 +9,7 @@ in: unicode.breaks PRIVATE< ! Grapheme breaks -<< +COMPILE< CONSTANT: Any 0 ; CONSTANT: L 1 ; CONSTANT: V 2 ; @@ -97,13 +97,13 @@ symbol: table graphemes init-table table [ make-grapheme-table finish-table ] with-variable define-constant ->> +COMPILE> : grapheme-break? ( class1 class2 -- ? ) grapheme-table nth nth not ; ! Word breaks -<< +COMPILE< CONSTANT: wOther 0 ; CONSTANT: wCR 1 ; CONSTANT: wLF 2 ; @@ -133,12 +133,12 @@ CONSTANT: word-break-classes H{ load-interval-file dup array>> [ 2 swap [ word-break-classes at ] change-nth ] each define-constant ->> +COMPILE> : word-break-prop ( char -- word-break-prop ) word-break-table interval-at wOther or ; -<< +COMPILE< symbol: check-letter-before symbol: check-letter-after symbol: check-number-before @@ -166,7 +166,7 @@ symbol: check-number-after unicode-words init-table table [ make-word-table finish-word-table ] with-variable define-constant ->> +COMPILE> : word-table-nth ( class1 class2 -- ? ) word-table nth nth ; diff --git a/libs/unicode/script/script.factor b/libs/unicode/script/script.factor index 05fb7c98f0..4d8c20c6a5 100644 --- a/libs/unicode/script/script.factor +++ b/libs/unicode/script/script.factor @@ -4,8 +4,8 @@ USING: interval-maps namespaces parser simple-flat-file words.constant ; in: unicode.script -<< +COMPILE< "script-table" create-word-in "vocab:unicode/script/Scripts.txt" load-interval-file define-constant ->> +COMPILE> diff --git a/libs/xml/errors/errors.factor b/libs/xml/errors/errors.factor index 72039a3466..caa7c64e5a 100644 --- a/libs/xml/errors/errors.factor +++ b/libs/xml/errors/errors.factor @@ -5,7 +5,7 @@ classes.tuple.private combinators generalizations kernel math namespaces parser sequences vocabs.loader words xml.state ; in: xml.errors -<< +COMPILE< PREDICATE: generated-xml-error < tuple class-of "xml-error-class" word-prop ; @@ -29,7 +29,7 @@ SYNTAX: \ XML-ERROR: parse-tuple-definition pick save-location define-xml-error-class ; ->> +COMPILE> XML-ERROR: expected should-be was ; diff --git a/libs/xmode/tokens/tokens.factor b/libs/xmode/tokens/tokens.factor index 1ebd4da18d..a9459bd704 100644 --- a/libs/xmode/tokens/tokens.factor +++ b/libs/xmode/tokens/tokens.factor @@ -4,7 +4,7 @@ compiler.units ; in: xmode.tokens ! Based on org.gjt.sp.jedit.syntax.Token -<< +COMPILE< symbol: tokens { @@ -15,7 +15,7 @@ symbol: tokens } [ dup create-word-in dup define-symbol ] H{ } map>assoc tokens set-global ->> +COMPILE> : string>token ( string -- id ) tokens get at ; diff --git a/libs/yaml/ffi/ffi.factor b/libs/yaml/ffi/ffi.factor index b20adadf5e..251439449d 100644 --- a/libs/yaml/ffi/ffi.factor +++ b/libs/yaml/ffi/ffi.factor @@ -7,9 +7,9 @@ alien.syntax classes.struct combinators literals system alien.libraries.finder ; in: yaml.ffi -<< +COMPILE< "libyaml" { "yaml" "yaml-0" "libyaml-0-2" } find-library-from-list cdecl add-library ->> +COMPILE> c-type: FILE diff --git a/libs/yaml/yaml-docs.factor b/libs/yaml/yaml-docs.factor index dadf39c97c..439ed8c86c 100644 --- a/libs/yaml/yaml-docs.factor +++ b/libs/yaml/yaml-docs.factor @@ -159,7 +159,7 @@ ARTICLE: "yaml-keys" "Special mapping keys" { $example "USING: yaml prettyprint ; \" foo: 1 -<<: +COMPILE<: bar: 2 <<: baz: 3 diff --git a/libs/yaml/yaml-tests.factor b/libs/yaml/yaml-tests.factor index cd6d7a2e57..f3ff6a4bb3 100644 --- a/libs/yaml/yaml-tests.factor +++ b/libs/yaml/yaml-tests.factor @@ -468,7 +468,7 @@ ${ construct-merge-obj } [ $ construct-merge-obj2 >yaml yaml> ] unit-test ! More merge tests ! see http://sourceforge.net/p/yaml/mailman/message/12308050 CONSTANT: nested-merge-str "foo: 1 -<<: +COMPILE<: bar: 2 <<: baz: 3" ; @@ -483,7 +483,7 @@ ${ nested-merge-obj } [ $ nested-merge-str yaml> ] unit-test ${ nested-merge-obj } [ $ nested-merge-obj >yaml yaml> ] unit-test CONSTANT: recursive-merge-str "--- &A -<<: *A" ; +COMPILE<: *A" ; CONSTANT: recursive-merge-obj H{ } ; ${ recursive-merge-obj } [ $ recursive-merge-str yaml> ] unit-test diff --git a/libs/zeromq/ffi/ffi.factor b/libs/zeromq/ffi/ffi.factor index e86f154a38..d31081c404 100644 --- a/libs/zeromq/ffi/ffi.factor +++ b/libs/zeromq/ffi/ffi.factor @@ -7,11 +7,11 @@ combinators kernel literals math system ; in: zeromq.ffi -<< "zmq" { +COMPILE< "zmq" { { [ os windows? ] [ "libzmq.dll" ] } { [ os macosx? ] [ "libzmq.dylib" ] } { [ os unix? ] [ "libzmq.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: zmq @@ -28,7 +28,7 @@ FUNCTION: void zmq_version ( int* major, int* minor, int* patch ) ; ! A number random enough not to collide with different errno ranges on ! different OSes. The assumption is that error_t is at least 32-bit type. -<< CONSTANT: ZMQ_HAUSNUMERO 156384712 ; >> +COMPILE< CONSTANT: ZMQ_HAUSNUMERO 156384712 ; COMPILE> ! Native 0MQ error codes. CONSTANT: EFSM $[ ZMQ_HAUSNUMERO 51 + ] ; diff --git a/misc/fuel/strange-syntax.factor b/misc/fuel/strange-syntax.factor index 28c2ae33de..43ffac06ab 100644 --- a/misc/fuel/strange-syntax.factor +++ b/misc/fuel/strange-syntax.factor @@ -42,9 +42,9 @@ main: majn slot: komba ! ! SYNTAX -<< +COMPILE< SYNTAX: ID-SYNTAX ; ->> +COMPILE> ID-SYNTAX ID-SYNTAX diff --git a/tools/graphviz/notation/notation.factor b/tools/graphviz/notation/notation.factor index b6f4ff526d..d0c76aa2ef 100644 --- a/tools/graphviz/notation/notation.factor +++ b/tools/graphviz/notation/notation.factor @@ -7,7 +7,7 @@ graphviz.attributes ; in: graphviz.notation -<< +COMPILE< PRIVATE< @@ -67,7 +67,7 @@ graph graph-attributes define-=attrs edge edge-attributes define-=attrs node node-attributes define-=attrs ->> +COMPILE> ALIAS: -> add-edge ; ALIAS: -- add-edge ; diff --git a/tools/mason/release/sign/sign.factor b/tools/mason/release/sign/sign.factor index 9117a310fa..5a56714774 100644 --- a/tools/mason/release/sign/sign.factor +++ b/tools/mason/release/sign/sign.factor @@ -4,7 +4,7 @@ USING: io.backend io.pathnames kernel literals locals mason.common namespaces sequences system ; in: mason.release.sign -<< +COMPILE< ! Two cases to allow signing in mason or in the UI : make-factor-path ( path -- path ) build-dir [ @@ -24,7 +24,7 @@ M: macosx cert-path M: windows cert-path home "config/FactorSPC.pfx" append-path ; ->> +COMPILE> HOOK: sign-factor-app os ( -- ) ; diff --git a/tools/tools/continuations/continuations.factor b/tools/tools/continuations/continuations.factor index a7373fd133..721b527f5f 100644 --- a/tools/tools/continuations/continuations.factor +++ b/tools/tools/continuations/continuations.factor @@ -68,7 +68,7 @@ M: object add-breakpoint ; : (step-into-call-next-method) ( method -- ) next-method-quot (step-into-quotation) ; -<< { +COMPILE< { (step-into-quotation) (step-into-dip) (step-into-2dip) @@ -78,7 +78,7 @@ M: object add-breakpoint ; (step-into-execute) (step-into-continuation) (step-into-call-next-method) -} [ t "no-compile" set-word-prop ] each >> +} [ t "no-compile" set-word-prop ] each COMPILE> : >innermost-frame< ( callstack -- n quot ) [ innermost-frame-scan 1 + ] [ innermost-frame-executing ] bi ; diff --git a/tools/tools/disassembler/udis/udis.factor b/tools/tools/disassembler/udis/udis.factor index 729c588c8f..1e8872d7fe 100644 --- a/tools/tools/disassembler/udis/udis.factor +++ b/tools/tools/disassembler/udis/udis.factor @@ -7,11 +7,11 @@ tools.disassembler.private tools.disassembler.utils tools.memory ; in: tools.disassembler.udis -<< "libudis86" { +COMPILE< "libudis86" { { [ os windows? ] [ "libudis86.dll" ] } { [ os macosx? ] [ "libudis86.dylib" ] } { [ os unix? ] [ "libudis86.so" ] } -} cond cdecl add-library >> +} cond cdecl add-library COMPILE> library: libudis86 diff --git a/tools/tools/image-analyzer/data-heap-reader/data-heap-reader.factor b/tools/tools/image-analyzer/data-heap-reader/data-heap-reader.factor index 31e0fecd7d..fa1e7948f1 100644 --- a/tools/tools/image-analyzer/data-heap-reader/data-heap-reader.factor +++ b/tools/tools/image-analyzer/data-heap-reader/data-heap-reader.factor @@ -8,13 +8,13 @@ FROM: kernel => ? boa bi dup keep nip swap ; FROM: layouts => data-alignment ; FROM: math => + - * align neg shift ; -<< +COMPILE< ! For the two annoying structs that differ on 32 and 64 bit. cpu x86.32? "tools.image-analyzer.vm.32" "tools.image-analyzer.vm.64" ? use-vocab ->> +COMPILE> : tag>class ( tag -- class ) { diff --git a/tools/tools/image-analyzer/graphviz/graphviz.factor b/tools/tools/image-analyzer/graphviz/graphviz.factor index d75f2e7b2f..ede85b0673 100644 --- a/tools/tools/image-analyzer/graphviz/graphviz.factor +++ b/tools/tools/image-analyzer/graphviz/graphviz.factor @@ -10,13 +10,13 @@ FROM: byte-arrays => >byte-array ; FROM: kernel => ? = 2drop bi bi* dup if keep nip object over swap tri with ; FROM: math => <= - shift ; -<< +COMPILE< ! For the two annoying structs that differ on 32 and 64 bit. cpu x86.32? "tools.image-analyzer.vm.32" "tools.image-analyzer.vm.64" ? use-vocab ->> +COMPILE> : array>string ( array -- str ) 0 suffix >byte-array alien>native-string ; diff --git a/tools/tools/test/test.factor b/tools/tools/test/test.factor index 22f8ccb96e..8cb7998a53 100644 --- a/tools/tools/test/test.factor +++ b/tools/tools/test/test.factor @@ -106,14 +106,14 @@ MACRO: ( word -- quot ) lexer get line>> suffix! \ experiment suffix! ; inline -<< +COMPILE< SYNTAX: \ test: scan-token [ create-word-in ] [ "(" ")" surround search '[ _ parse-test ] ] bi define-syntax ; ->> +COMPILE> : fake-unit-test ( quot -- test-failures ) [ diff --git a/tools/tools/trace/trace.factor b/tools/tools/trace/trace.factor index a19ad06e1f..6d86e120e4 100644 --- a/tools/tools/trace/trace.factor +++ b/tools/tools/trace/trace.factor @@ -87,4 +87,4 @@ PRIVATE> [ break ] [ end drop ] surround with-variable ; -<< \ trace t "no-compile" set-word-prop >> +COMPILE< \ trace t "no-compile" set-word-prop COMPILE> diff --git a/tools/tools/walker/walker.factor b/tools/tools/walker/walker.factor index 571facc54a..955ceac693 100644 --- a/tools/tools/walker/walker.factor +++ b/tools/tools/walker/walker.factor @@ -35,7 +35,7 @@ defer: start-walker-thread : walk ( quot -- quot' ) \ break prefix [ break rethrow ] recover ; -<< \ walk t "no-compile" set-word-prop >> +COMPILE< \ walk t "no-compile" set-word-prop COMPILE> break-hook [ [ diff --git a/unmaintained/alien/inline/syntax/syntax-tests.factor b/unmaintained/alien/inline/syntax/syntax-tests.factor index ff9616a846..95a2b5542e 100644 --- a/unmaintained/alien/inline/syntax/syntax-tests.factor +++ b/unmaintained/alien/inline/syntax/syntax-tests.factor @@ -69,4 +69,4 @@ C-FUNCTION: char* breakme ( ) return not a string; ; -<< [ compile-c-library ] must-fail >> +COMPILE< [ compile-c-library ] must-fail COMPILE> diff --git a/unmaintained/alien/marshall/marshall.factor b/unmaintained/alien/marshall/marshall.factor index 63d942a268..2838cb3b1d 100644 --- a/unmaintained/alien/marshall/marshall.factor +++ b/unmaintained/alien/marshall/marshall.factor @@ -23,8 +23,8 @@ specialized-array: ushort specialized-array: void* in: alien.marshall -<< primitive-types [ [ void* = ] [ bool = ] bi or not ] -filter [ define-primitive-marshallers ] each >> +COMPILE< primitive-types [ [ void* = ] [ bool = ] bi or not ] +filter [ define-primitive-marshallers ] each COMPILE> TUPLE: alien-wrapper { underlying alien } ; TUPLE: struct-wrapper < alien-wrapper disposed ; diff --git a/unmaintained/cryptlib/libcl/libcl.factor b/unmaintained/cryptlib/libcl/libcl.factor index 613fa575e4..32661ffbf8 100644 --- a/unmaintained/cryptlib/libcl/libcl.factor +++ b/unmaintained/cryptlib/libcl/libcl.factor @@ -12,11 +12,11 @@ USING: alien kernel system combinators alien.syntax ; in: cryptlib.libcl -<< "libcl" { +COMPILE< "libcl" { { [ win32? ] [ "cl32.dll" stdcall ] } { [ macosx? ] [ "libcl.dylib" cdecl ] } { [ unix? ] [ "libcl.so" cdecl ] } - } cond add-library >> + } cond add-library COMPILE> ! =============================================== ! Machine-dependant types diff --git a/unmaintained/db/mysql/ffi/ffi.factor b/unmaintained/db/mysql/ffi/ffi.factor index d1aa7b132f..e6bcb0ef05 100644 --- a/unmaintained/db/mysql/ffi/ffi.factor +++ b/unmaintained/db/mysql/ffi/ffi.factor @@ -5,11 +5,11 @@ USING: alien alien.syntax combinators kernel system ; in: db.mysql.ffi -<< "mysql" { +COMPILE< "mysql" { { [ os winnt? ] [ "libmySQL.dll" stdcall ] } { [ os macosx? ] [ "libmysqlclient.14.dylib" cdecl ] } { [ os unix? ] [ "libmysqlclient.so.14" cdecl ] } -} cond add-library >> +} cond add-library COMPILE> library: mysql diff --git a/unmaintained/gstreamer/plugins/app/ffi/ffi.factor b/unmaintained/gstreamer/plugins/app/ffi/ffi.factor index 2c5d92b01a..c620b53ee4 100644 --- a/unmaintained/gstreamer/plugins/app/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/app/ffi/ffi.factor @@ -5,13 +5,13 @@ system gobject-introspection glib.ffi gstreamer.ffi ; in: gstreamer.app.ffi -<< +COMPILE< "gstreamer.app" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstapp-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/app/GstApp-0.10.gir diff --git a/unmaintained/gstreamer/plugins/audio/ffi/ffi.factor b/unmaintained/gstreamer/plugins/audio/ffi/ffi.factor index 407fff22b0..0b7eafec4f 100644 --- a/unmaintained/gstreamer/plugins/audio/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/audio/ffi/ffi.factor @@ -6,13 +6,13 @@ gobject-introspection glib.ffi gstreamer.ffi gstreamer.base.ffi gstreamer.interfaces.ffi ; in: gstreamer.audio.ffi -<< +COMPILE< "gstreamer.audio" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstaudio-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/audio/GstAudio-0.10.gir diff --git a/unmaintained/gstreamer/plugins/fft/ffi/ffi.factor b/unmaintained/gstreamer/plugins/fft/ffi/ffi.factor index 4e30c2ddb9..3e704f4e9e 100644 --- a/unmaintained/gstreamer/plugins/fft/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/fft/ffi/ffi.factor @@ -5,13 +5,13 @@ system gobject-introspection glib.ffi gstreamer.ffi ; in: gstreamer.fft.ffi -<< +COMPILE< "gstreamer.fft" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstfft-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/fft/GstFft-0.10.gir diff --git a/unmaintained/gstreamer/plugins/interfaces/ffi/ffi.factor b/unmaintained/gstreamer/plugins/interfaces/ffi/ffi.factor index c72d219263..0d0b06d527 100644 --- a/unmaintained/gstreamer/plugins/interfaces/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/interfaces/ffi/ffi.factor @@ -5,13 +5,13 @@ system gobject-introspection glib.ffi gobject.ffi gstreamer.ffi ; in: gstreamer.interfaces.ffi -<< +COMPILE< "gstreamer.interfaces" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstinterfaces-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/interfaces/GstInterfaces-0.10.gir diff --git a/unmaintained/gstreamer/plugins/netbuffer/ffi/ffi.factor b/unmaintained/gstreamer/plugins/netbuffer/ffi/ffi.factor index c177f5dd91..5e3f7b9f9f 100644 --- a/unmaintained/gstreamer/plugins/netbuffer/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/netbuffer/ffi/ffi.factor @@ -4,13 +4,13 @@ USING: alien alien.libraries combinators kernel system gobject-introspection glib.ffi ; in: gstreamer.netbuffer.ffi -<< +COMPILE< "gstreamer.netbuffer" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstnetbuffer-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/netbuffer/GstNetbuffer-0.10.gir diff --git a/unmaintained/gstreamer/plugins/pbutils/ffi/ffi.factor b/unmaintained/gstreamer/plugins/pbutils/ffi/ffi.factor index 09f339455e..87b3481f38 100644 --- a/unmaintained/gstreamer/plugins/pbutils/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/pbutils/ffi/ffi.factor @@ -4,13 +4,13 @@ USING: alien alien.libraries combinators kernel system gobject-introspection glib.ffi gstreamer.ffi ; in: gstreamer.pbutils.ffi -<< +COMPILE< "gstreamer.pbutils" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstpbutils-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/pbutils/GstPbutils-0.10.gir diff --git a/unmaintained/gstreamer/plugins/riff/ffi/ffi.factor b/unmaintained/gstreamer/plugins/riff/ffi/ffi.factor index 02135c70cb..6a2c06e80e 100644 --- a/unmaintained/gstreamer/plugins/riff/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/riff/ffi/ffi.factor @@ -6,13 +6,13 @@ gobject-introspection glib.ffi gmodule.ffi gobject.ffi ; EXCLUDE: alien.c-types => pointer ; in: gstreamer.ffi -<< +COMPILE< "gstreamer" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> TYPEDEF: gpointer GstClockID ; TYPEDEF: guint64 GstClockTime ; diff --git a/unmaintained/gstreamer/plugins/rtp/ffi/ffi.factor b/unmaintained/gstreamer/plugins/rtp/ffi/ffi.factor index 0a0893ebb3..4fa25c7afc 100644 --- a/unmaintained/gstreamer/plugins/rtp/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/rtp/ffi/ffi.factor @@ -4,13 +4,13 @@ USING: alien alien.libraries combinators kernel system gobject-introspection glib.ffi gstreamer.base.ffi gstreamer.ffi ; in: gstreamer.rtp.ffi -<< +COMPILE< "gstreamer.rtp" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstrtp-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/rtp/GstRtp-0.10.gir diff --git a/unmaintained/gstreamer/plugins/rtsp/ffi/ffi.factor b/unmaintained/gstreamer/plugins/rtsp/ffi/ffi.factor index 130fd950d2..01ba009bcd 100644 --- a/unmaintained/gstreamer/plugins/rtsp/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/rtsp/ffi/ffi.factor @@ -5,13 +5,13 @@ system gobject-introspection glib.ffi gstreamer.ffi gstreamer.sdp.ffi ; in: gstreamer.rtsp.ffi -<< +COMPILE< "gstreamer.rtsp" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstrtsp-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> ! git error (there is _GstRTSPTransport only in .gir) c-type: GstRTSPTransport diff --git a/unmaintained/gstreamer/plugins/sdp/ffi/ffi.factor b/unmaintained/gstreamer/plugins/sdp/ffi/ffi.factor index 312e935f04..355c116d6a 100644 --- a/unmaintained/gstreamer/plugins/sdp/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/sdp/ffi/ffi.factor @@ -4,13 +4,13 @@ USING: alien alien.libraries combinators kernel system gobject-introspection glib.ffi ; in: gstreamer.sdp.ffi -<< +COMPILE< "gstreamer.sdp" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstsdp-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/sdp/GstSdp-0.10.gir diff --git a/unmaintained/gstreamer/plugins/tag/ffi/ffi.factor b/unmaintained/gstreamer/plugins/tag/ffi/ffi.factor index cb52fcdfa0..4c806332e7 100644 --- a/unmaintained/gstreamer/plugins/tag/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/tag/ffi/ffi.factor @@ -4,13 +4,13 @@ USING: alien alien.libraries combinators kernel system gobject-introspection glib.ffi gstreamer.ffi ; in: gstreamer.tag.ffi -<< +COMPILE< "gstreamer.tag" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgsttag-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> gir: vocab:gstreamer/tag/GstTag-0.10.gir diff --git a/unmaintained/gstreamer/plugins/video/ffi/ffi.factor b/unmaintained/gstreamer/plugins/video/ffi/ffi.factor index d88bad284d..a4484fb148 100644 --- a/unmaintained/gstreamer/plugins/video/ffi/ffi.factor +++ b/unmaintained/gstreamer/plugins/video/ffi/ffi.factor @@ -5,13 +5,13 @@ system gobject-introspection glib.ffi gobject.ffi gstreamer.ffi ; in: gstreamer.video.ffi -<< +COMPILE< "gstreamer.video" { { [ os winnt? ] [ drop ] } { [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgstvideo-0.10.so" cdecl add-library ] } } cond ->> +COMPILE> IMPLEMENT-STRUCTS: GstVideoRectangle ; diff --git a/unmaintained/images/processing/rotation/rotation-tests.factor b/unmaintained/images/processing/rotation/rotation-tests.factor index efea871421..0bb2968131 100644 --- a/unmaintained/images/processing/rotation/rotation-tests.factor +++ b/unmaintained/images/processing/rotation/rotation-tests.factor @@ -14,12 +14,12 @@ in: images.processing.rotation.tests : end-of-last-row ( seq^2 -- item ) last-row last ; : first-of-last-row ( seq^2 -- item ) last-row first ; -<< +COMPILE< : clone-image ( image -- new-image ) clone [ clone ] change-bitmap ; ->> +COMPILE> : pasted-image ( -- image ) "vocab:images/processing/rotation/test-bitmaps/PastedImage.bmp" diff --git a/unmaintained/javascriptcore/ffi/ffi.factor b/unmaintained/javascriptcore/ffi/ffi.factor index c23e1aa891..625b99585c 100644 --- a/unmaintained/javascriptcore/ffi/ffi.factor +++ b/unmaintained/javascriptcore/ffi/ffi.factor @@ -5,7 +5,7 @@ classes.struct combinators io.encodings.utf16n io.encodings.utf8 kernel system ; in: javascriptcore.ffi -<< +COMPILE< "javascriptcore" { { [ os macosx? ] [ "/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/JavaScriptCore" cdecl add-library @@ -14,7 +14,7 @@ in: javascriptcore.ffi ! { [ os unix? ] [ "libsqlite3.so" ] } [ drop ] } cond ->> +COMPILE> library: javascriptcore diff --git a/unmaintained/ldap/libldap/libldap.factor b/unmaintained/ldap/libldap/libldap.factor index 93f66a5756..3dac7cc07b 100644 --- a/unmaintained/ldap/libldap/libldap.factor +++ b/unmaintained/ldap/libldap/libldap.factor @@ -9,11 +9,11 @@ USING: alien alien.syntax combinators kernel system ; in: ldap.libldap -<< "libldap" { +COMPILE< "libldap" { { [ win32? ] [ "libldap.dll" stdcall ] } { [ macosx? ] [ "libldap.dylib" cdecl ] } { [ unix? ] [ "libldap.so" cdecl ] } -} cond add-library >> +} cond add-library COMPILE> : LDAP_VERSION1 1 ; inline : LDAP_VERSION2 2 ; inline diff --git a/unmaintained/llvm/clang/ffi/ffi.factor b/unmaintained/llvm/clang/ffi/ffi.factor index c6acdeac26..32416054f8 100644 --- a/unmaintained/llvm/clang/ffi/ffi.factor +++ b/unmaintained/llvm/clang/ffi/ffi.factor @@ -2,13 +2,13 @@ USING: alien alien.c-types alien.libraries alien.syntax classes.struct combinators system unix.types ; in: llvm.clang.ffi -<< +COMPILE< "libclang" { { [ os macosx? ] [ "libclang.dylib" ] } { [ os windows? ] [ "clang.dll" ] } { [ os unix? ] [ "/usrlibclang.so" ] } } cond cdecl add-library ->> +COMPILE> library: libclang c-type: CXTranslationUnitImpl diff --git a/unmaintained/llvm/core/core.factor b/unmaintained/llvm/core/core.factor index 27896db083..6207e6cba8 100644 --- a/unmaintained/llvm/core/core.factor +++ b/unmaintained/llvm/core/core.factor @@ -6,7 +6,7 @@ combinators kernel sequences system ; in: llvm.core -<< +COMPILE< : add-llvm-library ( name -- ) dup { { [ os macosx? ] [ "lib" ".dylib" surround ] } @@ -16,7 +16,7 @@ in: llvm.core { "LLVMSystem" "LLVMSupport" "LLVMCore" "LLVMBitReader" } [ add-llvm-library ] each ->> +COMPILE> ! llvm-c/Core.h diff --git a/unmaintained/llvm/engine/engine.factor b/unmaintained/llvm/engine/engine.factor index 98958d2a96..a07cd76e69 100644 --- a/unmaintained/llvm/engine/engine.factor +++ b/unmaintained/llvm/engine/engine.factor @@ -4,14 +4,14 @@ USING: alien alien.c-types alien.libraries alien.syntax kernel llvm.core sequences ; in: llvm.engine -<< +COMPILE< { "LLVMExecutionEngine" "LLVMTarget" "LLVMAnalysis" "LLVMipa" "LLVMTransformUtils" "LLVMScalarOpts" "LLVMCodeGen" "LLVMAsmPrinter" "LLVMSelectionDAG" "LLVMX86CodeGen" "LLVMJIT" "LLVMInterpreter" } [ add-llvm-library ] each ->> +COMPILE> ! llvm-c/ExecutionEngine.h diff --git a/unmaintained/llvm/invoker/invoker-tests.factor b/unmaintained/llvm/invoker/invoker-tests.factor index dca1df2c99..76e5bbe5ad 100644 --- a/unmaintained/llvm/invoker/invoker-tests.factor +++ b/unmaintained/llvm/invoker/invoker-tests.factor @@ -3,5 +3,5 @@ USING: alien.llvm io.pathnames llvm.invoker llvm.reader tools.test ; { 3 } [ - << "resource:extra/llvm/reader/add.bc" install-bc >> 1 2 add + COMPILE< "resource:extra/llvm/reader/add.bc" install-bc COMPILE> 1 2 add ] unit-test diff --git a/unmaintained/llvm/invoker/invoker.factor b/unmaintained/llvm/invoker/invoker.factor index d3fc1c486a..fe1c171261 100644 --- a/unmaintained/llvm/invoker/invoker.factor +++ b/unmaintained/llvm/invoker/invoker.factor @@ -54,4 +54,4 @@ TUPLE: function name alien return params ; [ normalize-path ] [ file-name ] bi [ load-into-jit ] keep install-module ; -<< "alien.llvm" create-vocab drop >> +COMPILE< "alien.llvm" create-vocab drop COMPILE> diff --git a/unmaintained/models/combinators/combinators.factor b/unmaintained/models/combinators/combinators.factor index 8e856e00f2..70db0477d8 100644 --- a/unmaintained/models/combinators/combinators.factor +++ b/unmaintained/models/combinators/combinators.factor @@ -1,6 +1,5 @@ USING: accessors arrays kernel models models.product monads sequences sequences.extras shuffle ; -FROM: syntax => >> ; in: models.combinators TUPLE: multi-model < model important? ; @@ -102,4 +101,4 @@ M: (when-model) (model-changed) [ quot>> ] 2keep : with-self ( quot: ( model -- model ) -- model ) [ f dup ] dip call swap [ add-dependency ] keep ; inline use: models.combinators.templates -<< { "$>" "<$" "fmap" } [ fmaps ] each >> +COMPILE< { "$>" "<$" "fmap" } [ fmaps ] each COMPILE> diff --git a/unmaintained/odbc/odbc.factor b/unmaintained/odbc/odbc.factor index 859882785c..8ce399bac0 100644 --- a/unmaintained/odbc/odbc.factor +++ b/unmaintained/odbc/odbc.factor @@ -5,7 +5,7 @@ combinators alien.c-types strings sequences namespaces make words math threads io.encodings.ascii ; in: odbc -<< "odbc" "odbc32.dll" stdcall add-library >> +COMPILE< "odbc" "odbc32.dll" stdcall add-library COMPILE> library: odbc diff --git a/unmaintained/pdf/libhpdf/libhpdf.factor b/unmaintained/pdf/libhpdf/libhpdf.factor index eeb6c30cf3..a71a83d472 100644 --- a/unmaintained/pdf/libhpdf/libhpdf.factor +++ b/unmaintained/pdf/libhpdf/libhpdf.factor @@ -9,11 +9,11 @@ USING: alien alien.syntax combinators system ; in: pdf.libhpdf -<< "libhpdf" { +COMPILE< "libhpdf" { { [ win32? ] [ "libhpdf.dll" stdcall ] } { [ macosx? ] [ "libhpdf.dylib" cdecl ] } { [ unix? ] [ "$LD_LIBRARY_PATH/libhpdf.so" cdecl ] } -} cond add-library >> +} cond add-library COMPILE> ! compression mode : HPDF_COMP_NONE 0x00 ; inline ! No contents are compressed diff --git a/unmaintained/sandbox/sandbox-tests.factor b/unmaintained/sandbox/sandbox-tests.factor index c653c838e0..0ee6cee0b3 100644 --- a/unmaintained/sandbox/sandbox-tests.factor +++ b/unmaintained/sandbox/sandbox-tests.factor @@ -6,7 +6,7 @@ USING: kernel accessors continuations lexer vocabs vocabs.parser in: sandbox.tests -<< "sandbox.syntax" load-vocab drop >> +COMPILE< "sandbox.syntax" load-vocab drop COMPILE> use: sandbox.syntax.private : run-script ( x lines -- y )