2005-01-29 16:39:30 -05:00
|
|
|
! Copyright (C) 2004, 2005 Slava Pestov.
|
|
|
|
! See http://factor.sf.net/license.txt for BSD license.
|
2004-12-15 16:57:29 -05:00
|
|
|
IN: image
|
2005-02-14 21:58:07 -05:00
|
|
|
USING: kernel lists math memory namespaces parser words vectors
|
2005-01-29 16:39:30 -05:00
|
|
|
hashtables generic ;
|
2004-12-15 16:57:29 -05:00
|
|
|
|
|
|
|
! Bring up a bare cross-compiling vocabulary.
|
|
|
|
"syntax" vocab
|
|
|
|
"generic" vocab
|
|
|
|
|
|
|
|
! This symbol needs the same hashcode in the target as in the
|
|
|
|
! host.
|
|
|
|
vocabularies
|
|
|
|
|
|
|
|
<namespace> vocabularies set
|
|
|
|
vocabularies get [
|
|
|
|
reveal
|
|
|
|
"generic" set
|
|
|
|
"syntax" set
|
|
|
|
] bind
|
|
|
|
|
2005-01-01 17:20:48 -05:00
|
|
|
<namespace> classes set
|
|
|
|
|
2004-12-15 16:57:29 -05:00
|
|
|
2 [
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "words" "execute" ]]
|
|
|
|
[[ "kernel" "call" ]]
|
|
|
|
[[ "kernel" "ifte" ]]
|
|
|
|
[[ "lists" "cons" ]]
|
|
|
|
[[ "vectors" "<vector>" ]]
|
|
|
|
[[ "strings" "str-nth" ]]
|
|
|
|
[[ "strings" "str-compare" ]]
|
|
|
|
[[ "strings" "str=" ]]
|
|
|
|
[[ "strings" "index-of*" ]]
|
|
|
|
[[ "strings" "substring" ]]
|
|
|
|
[[ "strings" "str-reverse" ]]
|
|
|
|
[[ "strings" "<sbuf>" ]]
|
|
|
|
[[ "strings" "sbuf-length" ]]
|
|
|
|
[[ "strings" "set-sbuf-length" ]]
|
|
|
|
[[ "strings" "sbuf-nth" ]]
|
|
|
|
[[ "strings" "set-sbuf-nth" ]]
|
|
|
|
[[ "strings" "sbuf-append" ]]
|
|
|
|
[[ "strings" "sbuf>str" ]]
|
|
|
|
[[ "strings" "sbuf-reverse" ]]
|
|
|
|
[[ "strings" "sbuf-clone" ]]
|
|
|
|
[[ "strings" "sbuf=" ]]
|
|
|
|
[[ "strings" "sbuf-hashcode" ]]
|
|
|
|
[[ "math-internals" "arithmetic-type" ]]
|
|
|
|
[[ "math" ">fixnum" ]]
|
|
|
|
[[ "math" ">bignum" ]]
|
|
|
|
[[ "math" ">float" ]]
|
|
|
|
[[ "math-internals" "(fraction>)" ]]
|
|
|
|
[[ "parser" "str>float" ]]
|
|
|
|
[[ "unparser" "(unparse-float)" ]]
|
2005-01-17 19:55:18 -05:00
|
|
|
[[ "math-internals" "<complex>" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "math-internals" "fixnum=" ]]
|
|
|
|
[[ "math-internals" "fixnum+" ]]
|
|
|
|
[[ "math-internals" "fixnum-" ]]
|
|
|
|
[[ "math-internals" "fixnum*" ]]
|
|
|
|
[[ "math-internals" "fixnum/i" ]]
|
|
|
|
[[ "math-internals" "fixnum/f" ]]
|
|
|
|
[[ "math-internals" "fixnum-mod" ]]
|
|
|
|
[[ "math-internals" "fixnum/mod" ]]
|
|
|
|
[[ "math-internals" "fixnum-bitand" ]]
|
|
|
|
[[ "math-internals" "fixnum-bitor" ]]
|
|
|
|
[[ "math-internals" "fixnum-bitxor" ]]
|
|
|
|
[[ "math-internals" "fixnum-bitnot" ]]
|
|
|
|
[[ "math-internals" "fixnum-shift" ]]
|
|
|
|
[[ "math-internals" "fixnum<" ]]
|
|
|
|
[[ "math-internals" "fixnum<=" ]]
|
|
|
|
[[ "math-internals" "fixnum>" ]]
|
|
|
|
[[ "math-internals" "fixnum>=" ]]
|
|
|
|
[[ "math-internals" "bignum=" ]]
|
|
|
|
[[ "math-internals" "bignum+" ]]
|
|
|
|
[[ "math-internals" "bignum-" ]]
|
|
|
|
[[ "math-internals" "bignum*" ]]
|
|
|
|
[[ "math-internals" "bignum/i" ]]
|
|
|
|
[[ "math-internals" "bignum/f" ]]
|
|
|
|
[[ "math-internals" "bignum-mod" ]]
|
|
|
|
[[ "math-internals" "bignum/mod" ]]
|
|
|
|
[[ "math-internals" "bignum-bitand" ]]
|
|
|
|
[[ "math-internals" "bignum-bitor" ]]
|
|
|
|
[[ "math-internals" "bignum-bitxor" ]]
|
|
|
|
[[ "math-internals" "bignum-bitnot" ]]
|
|
|
|
[[ "math-internals" "bignum-shift" ]]
|
|
|
|
[[ "math-internals" "bignum<" ]]
|
|
|
|
[[ "math-internals" "bignum<=" ]]
|
|
|
|
[[ "math-internals" "bignum>" ]]
|
|
|
|
[[ "math-internals" "bignum>=" ]]
|
|
|
|
[[ "math-internals" "float=" ]]
|
|
|
|
[[ "math-internals" "float+" ]]
|
|
|
|
[[ "math-internals" "float-" ]]
|
|
|
|
[[ "math-internals" "float*" ]]
|
|
|
|
[[ "math-internals" "float/f" ]]
|
|
|
|
[[ "math-internals" "float<" ]]
|
|
|
|
[[ "math-internals" "float<=" ]]
|
|
|
|
[[ "math-internals" "float>" ]]
|
|
|
|
[[ "math-internals" "float>=" ]]
|
|
|
|
[[ "math-internals" "facos" ]]
|
|
|
|
[[ "math-internals" "fasin" ]]
|
|
|
|
[[ "math-internals" "fatan" ]]
|
|
|
|
[[ "math-internals" "fatan2" ]]
|
|
|
|
[[ "math-internals" "fcos" ]]
|
|
|
|
[[ "math-internals" "fexp" ]]
|
|
|
|
[[ "math-internals" "fcosh" ]]
|
|
|
|
[[ "math-internals" "flog" ]]
|
|
|
|
[[ "math-internals" "fpow" ]]
|
|
|
|
[[ "math-internals" "fsin" ]]
|
|
|
|
[[ "math-internals" "fsinh" ]]
|
|
|
|
[[ "math-internals" "fsqrt" ]]
|
|
|
|
[[ "words" "<word>" ]]
|
|
|
|
[[ "words" "update-xt" ]]
|
|
|
|
[[ "profiler" "call-profiling" ]]
|
|
|
|
[[ "profiler" "allot-profiling" ]]
|
|
|
|
[[ "words" "compiled?" ]]
|
|
|
|
[[ "kernel" "drop" ]]
|
|
|
|
[[ "kernel" "dup" ]]
|
|
|
|
[[ "kernel" "swap" ]]
|
|
|
|
[[ "kernel" "over" ]]
|
|
|
|
[[ "kernel" "pick" ]]
|
|
|
|
[[ "kernel" ">r" ]]
|
|
|
|
[[ "kernel" "r>" ]]
|
|
|
|
[[ "kernel" "eq?" ]]
|
|
|
|
[[ "kernel-internals" "getenv" ]]
|
|
|
|
[[ "kernel-internals" "setenv" ]]
|
|
|
|
[[ "io-internals" "open-file" ]]
|
|
|
|
[[ "files" "stat" ]]
|
|
|
|
[[ "files" "(directory)" ]]
|
2005-02-14 21:58:07 -05:00
|
|
|
[[ "memory" "garbage-collection" ]]
|
|
|
|
[[ "memory" "gc-time" ]]
|
|
|
|
[[ "memory" "save-image" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "kernel" "datastack" ]]
|
|
|
|
[[ "kernel" "callstack" ]]
|
|
|
|
[[ "kernel" "set-datastack" ]]
|
|
|
|
[[ "kernel" "set-callstack" ]]
|
|
|
|
[[ "kernel" "exit*" ]]
|
|
|
|
[[ "io-internals" "client-socket" ]]
|
|
|
|
[[ "io-internals" "server-socket" ]]
|
|
|
|
[[ "io-internals" "close-port" ]]
|
|
|
|
[[ "io-internals" "add-accept-io-task" ]]
|
|
|
|
[[ "io-internals" "accept-fd" ]]
|
|
|
|
[[ "io-internals" "can-read-line?" ]]
|
|
|
|
[[ "io-internals" "add-read-line-io-task" ]]
|
|
|
|
[[ "io-internals" "read-line-fd-8" ]]
|
|
|
|
[[ "io-internals" "can-read-count?" ]]
|
|
|
|
[[ "io-internals" "add-read-count-io-task" ]]
|
|
|
|
[[ "io-internals" "read-count-fd-8" ]]
|
|
|
|
[[ "io-internals" "can-write?" ]]
|
|
|
|
[[ "io-internals" "add-write-io-task" ]]
|
|
|
|
[[ "io-internals" "write-fd-8" ]]
|
|
|
|
[[ "io-internals" "add-copy-io-task" ]]
|
|
|
|
[[ "io-internals" "pending-io-error" ]]
|
|
|
|
[[ "io-internals" "next-io-task" ]]
|
2005-02-14 21:58:07 -05:00
|
|
|
[[ "memory" "room" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "kernel" "os-env" ]]
|
|
|
|
[[ "kernel" "millis" ]]
|
|
|
|
[[ "random" "init-random" ]]
|
|
|
|
[[ "random" "(random-int)" ]]
|
|
|
|
[[ "kernel" "type" ]]
|
|
|
|
[[ "files" "cwd" ]]
|
|
|
|
[[ "files" "cd" ]]
|
|
|
|
[[ "assembler" "compiled-offset" ]]
|
|
|
|
[[ "assembler" "set-compiled-offset" ]]
|
|
|
|
[[ "assembler" "literal-top" ]]
|
|
|
|
[[ "assembler" "set-literal-top" ]]
|
2005-02-14 21:58:07 -05:00
|
|
|
[[ "memory" "address" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "alien" "dlopen" ]]
|
|
|
|
[[ "alien" "dlsym" ]]
|
|
|
|
[[ "alien" "dlclose" ]]
|
|
|
|
[[ "alien" "<alien>" ]]
|
|
|
|
[[ "alien" "<local-alien>" ]]
|
|
|
|
[[ "alien" "alien-cell" ]]
|
|
|
|
[[ "alien" "set-alien-cell" ]]
|
|
|
|
[[ "alien" "alien-4" ]]
|
|
|
|
[[ "alien" "set-alien-4" ]]
|
|
|
|
[[ "alien" "alien-2" ]]
|
|
|
|
[[ "alien" "set-alien-2" ]]
|
|
|
|
[[ "alien" "alien-1" ]]
|
|
|
|
[[ "alien" "set-alien-1" ]]
|
2005-02-14 21:58:07 -05:00
|
|
|
[[ "memory" "heap-stats" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "errors" "throw" ]]
|
|
|
|
[[ "kernel-internals" "string>memory" ]]
|
|
|
|
[[ "kernel-internals" "memory>string" ]]
|
|
|
|
[[ "alien" "local-alien?" ]]
|
|
|
|
[[ "alien" "alien-address" ]]
|
|
|
|
[[ "lists" ">cons" ]]
|
|
|
|
[[ "vectors" ">vector" ]]
|
|
|
|
[[ "strings" ">string" ]]
|
|
|
|
[[ "words" ">word" ]]
|
2005-01-27 20:06:10 -05:00
|
|
|
[[ "hashtables" ">hashtable" ]]
|
2005-01-13 19:49:47 -05:00
|
|
|
[[ "kernel-internals" "slot" ]]
|
|
|
|
[[ "kernel-internals" "set-slot" ]]
|
|
|
|
[[ "kernel-internals" "integer-slot" ]]
|
|
|
|
[[ "kernel-internals" "set-integer-slot" ]]
|
|
|
|
[[ "kernel-internals" "grow-array" ]]
|
2005-01-27 20:06:10 -05:00
|
|
|
[[ "hashtables" "<hashtable>" ]]
|
|
|
|
[[ "kernel-internals" "<array>" ]]
|
2005-01-29 16:39:30 -05:00
|
|
|
[[ "kernel-internals" "<tuple>" ]]
|
2005-01-30 15:57:25 -05:00
|
|
|
[[ "kernel-internals" ">array" ]]
|
|
|
|
[[ "kernel-internals" ">tuple" ]]
|
2005-02-14 21:58:07 -05:00
|
|
|
[[ "memory" "(instances)" ]]
|
2004-12-15 16:57:29 -05:00
|
|
|
] [
|
2004-12-29 03:35:46 -05:00
|
|
|
unswons create swap 1 + [ f define ] keep
|
2004-12-15 16:57:29 -05:00
|
|
|
] each drop
|