merged stack continuations combinators and logic vocabularies into kernel vocabulary

cvs
Slava Pestov 2004-12-11 00:29:07 +00:00
parent 3843ebb744
commit e965801789
148 changed files with 84 additions and 353 deletions

View File

@ -26,10 +26,7 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: lists IN: lists
USE: logic
USE: combinators
USE: kernel USE: kernel
USE: stack
! An association list is a list of conses where the car of each ! An association list is a list of conses where the car of each
! cons is a key, and the cdr is a value. See the Factor ! cons is a key, and the cdr is a value. See the Factor

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: init IN: init
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
"Cold boot in progress..." print "Cold boot in progress..." print

View File

@ -30,19 +30,18 @@ USE: image
USE: parser USE: parser
USE: namespaces USE: namespaces
USE: stdio USE: stdio
USE: combinators
USE: kernel USE: kernel
USE: vectors USE: vectors
primitives, primitives,
[ [
"/version.factor" "/version.factor"
"/library/kernel.factor"
"/library/stack.factor" "/library/stack.factor"
"/library/kernel.factor"
"/library/types.factor" "/library/types.factor"
"/library/combinators.factor"
"/library/math/math.factor" "/library/math/math.factor"
"/library/cons.factor" "/library/cons.factor"
"/library/combinators.factor"
"/library/logic.factor" "/library/logic.factor"
"/library/vector-combinators.factor" "/library/vector-combinators.factor"
"/library/lists.factor" "/library/lists.factor"

View File

@ -25,7 +25,6 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
@ -33,12 +32,10 @@ USE: math
USE: math-internals USE: math-internals
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings
USE: vectors USE: vectors
USE: vectors
USE: words USE: words
IN: alien IN: alien
@ -76,6 +73,19 @@ DEFER: type
DEFER: size DEFER: size
DEFER: address DEFER: address
DEFER: heap-stats DEFER: heap-stats
DEFER: drop
DEFER: dup
DEFER: over
DEFER: pick
DEFER: swap
DEFER: >r
DEFER: r>
DEFER: ifte
DEFER: call
DEFER: datastack
DEFER: callstack
DEFER: set-datastack
DEFER: set-callstack
IN: strings IN: strings
DEFER: str= DEFER: str=
@ -394,7 +404,7 @@ IN: image
heap-stats heap-stats
throw throw
] [ ] [
swap succ tuck f define, USE: stack swap succ tuck f define,
] each drop ; ] each drop ;
: make-image ( name -- ) : make-image ( name -- )

View File

@ -39,17 +39,14 @@
! run platform/native/boot-stage2.factor. ! run platform/native/boot-stage2.factor.
IN: image IN: image
USE: combinators
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: prettyprint USE: prettyprint
USE: random USE: random
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings
@ -58,6 +55,10 @@ USE: vectors
USE: unparser USE: unparser
USE: words USE: words
USE: stack
USE: combinators
USE: logic
! The image being constructed; a vector of word-size integers ! The image being constructed; a vector of word-size integers
SYMBOL: image SYMBOL: image
@ -191,7 +192,13 @@ SYMBOL: boot-quot
dup pooled-object dup [ dup pooled-object dup [
nip nip
] [ ] [
drop "Not in image: " swap word-name cat2 throw drop
[
"Not in image: " ,
dup word-vocabulary ,
" " ,
word-name ,
] make-string throw
] ifte ; ] ifte ;
: fixup-words ( -- ) : fixup-words ( -- )

View File

@ -27,7 +27,6 @@
IN: init IN: init
USE: ansi USE: ansi
USE: combinators
USE: compiler USE: compiler
USE: errors USE: errors
USE: inference USE: inference
@ -38,7 +37,6 @@ USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: random USE: random
USE: stack
USE: streams USE: streams
USE: stdio USE: stdio
USE: presentation USE: presentation

View File

@ -26,7 +26,6 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: init IN: init
USE: combinators
USE: compiler USE: compiler
USE: errors USE: errors
USE: kernel USE: kernel

View File

@ -26,9 +26,7 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: init IN: init
USE: combinators
USE: compiler USE: compiler
USE: continuations
USE: errors USE: errors
USE: files USE: files
USE: listener USE: listener
@ -38,7 +36,6 @@ USE: namespaces
USE: parser USE: parser
USE: prettyprint USE: prettyprint
USE: random USE: random
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -25,10 +25,8 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: combinators IN: kernel
USE: kernel
USE: lists USE: lists
USE: stack
: slip ( quot x -- x ) : slip ( quot x -- x )
>r call r> ; inline >r call r> ; inline

View File

@ -26,13 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: alien IN: alien
USE: combinators
USE: compiler USE: compiler
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
: UNBOX ( name -- ) : UNBOX ( name -- )
#! Move top of datastack to C stack. #! Move top of datastack to C stack.

View File

@ -26,17 +26,14 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: alien IN: alien
USE: combinators
USE: compiler USE: compiler
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: strings USE: strings
USE: words USE: words

View File

@ -26,14 +26,13 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: alien IN: alien
USE: combinators
USE: compiler USE: compiler
USE: errors USE: errors
USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: words USE: words
: BEGIN-ENUM: : BEGIN-ENUM:

View File

@ -26,10 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: compiler IN: compiler
USE: combinators
USE: math USE: math
USE: kernel USE: kernel
USE: stack
: cell 4 ; : cell 4 ;
: literal-table 1024 cell * ; : literal-table 1024 cell * ;

View File

@ -29,8 +29,6 @@ IN: compiler
USE: kernel USE: kernel
USE: compiler USE: compiler
USE: math USE: math
USE: stack
USE: combinators
: EAX 0 ; : EAX 0 ;
: ECX 1 ; : ECX 1 ;

View File

@ -26,18 +26,15 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: compiler IN: compiler
USE: combinators
USE: inference USE: inference
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: prettyprint USE: prettyprint
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: unparser USE: unparser

View File

@ -27,15 +27,12 @@
IN: compiler IN: compiler
USE: alien USE: alien
USE: combinators
USE: inference USE: inference
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: words USE: words
USE: vectors USE: vectors

View File

@ -26,13 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: compiler IN: compiler
USE: combinators
USE: inference USE: inference
USE: errors USE: errors
USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: words USE: words

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: compiler IN: compiler
USE: lists
USE: words
USE: stack
USE: namespaces
USE: inference USE: inference
USE: combinators
USE: math
USE: logic
USE: kernel USE: kernel
USE: lists
USE: math
USE: namespaces
USE: words
! The linear IR is close to assembly language. It also resembles ! The linear IR is close to assembly language. It also resembles
! Forth code in some sense. It exists so that pattern matching ! Forth code in some sense. It exists so that pattern matching

View File

@ -27,14 +27,11 @@
IN: compiler IN: compiler
USE: lists USE: lists
USE: stack
USE: combinators
USE: namespaces USE: namespaces
USE: kernel USE: kernel
USE: inference USE: inference
USE: words USE: words
USE: prettyprint USE: prettyprint
USE: logic
! The optimizer transforms dataflow IR to dataflow IR. Currently ! The optimizer transforms dataflow IR to dataflow IR. Currently
! it removes literals that are eventually dropped, and never ! it removes literals that are eventually dropped, and never

View File

@ -26,18 +26,15 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: compiler IN: compiler
USE: combinators
USE: inference USE: inference
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: prettyprint USE: prettyprint
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: unparser USE: unparser

View File

@ -25,7 +25,8 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: lists USE: kernel USE: stack IN: lists
USE: kernel
: swons ( cdr car -- [ car | cdr ] ) : swons ( cdr car -- [ car | cdr ] )
#! Push a new cons cell. If the cdr is f or a proper list, #! Push a new cons cell. If the cdr is f or a proper list,

View File

@ -25,13 +25,11 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: continuations IN: kernel
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: namespaces USE: namespaces
USE: stack
USE: vectors USE: vectors
: reify ( quot -- ) : reify ( quot -- )

View File

@ -26,13 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: errors IN: errors
USE: combinators
USE: continuations
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors

View File

@ -26,9 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: parser IN: parser
USE: kernel
USE: errors USE: errors
USE: stack
USE: combinators
USE: stdio USE: stdio
: eval-catch ( str -- ) : eval-catch ( str -- )

View File

@ -26,12 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: format IN: format
USE: combinators
USE: kernel USE: kernel
USE: math USE: math
USE: namespaces USE: namespaces
USE: strings USE: strings
USE: stack
: decimal-split ( string -- string string ) : decimal-split ( string -- string string )
#! Split a string before and after the decimal point. #! Split a string before and after the decimal point.

View File

@ -27,14 +27,12 @@
IN: generic IN: generic
USE: combinators
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: strings USE: strings
USE: words USE: words
USE: vectors USE: vectors

View File

@ -26,9 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: words IN: words
USE: kernel
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: unparser USE: unparser

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: hashtables IN: hashtables
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: stack
USE: vectors USE: vectors
! Note that the length of a hashtable vector must not change ! Note that the length of a hashtable vector must not change

View File

@ -27,8 +27,8 @@
IN: httpd-responder IN: httpd-responder
USE: httpd USE: httpd
USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: test-responder USE: test-responder

View File

@ -26,7 +26,6 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: file-responder IN: file-responder
USE: combinators
USE: errors USE: errors
USE: files USE: files
USE: html USE: html
@ -37,7 +36,6 @@ USE: lists
USE: logging USE: logging
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -27,12 +27,10 @@ IN: html
USE: strings USE: strings
USE: lists USE: lists
USE: format USE: format
USE: stack USE: kernel
USE: combinators
USE: stdio USE: stdio
USE: namespaces USE: namespaces
USE: words USE: words
USE: logic
! These words are used to provide a means of writing ! These words are used to provide a means of writing
! formatted HTML to standard output with a familiar 'html' look ! formatted HTML to standard output with a familiar 'html' look

View File

@ -26,13 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: html IN: html
USE: combinators
USE: format USE: format
USE: lists USE: lists
USE: logic
USE: kernel USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -27,14 +27,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: httpd IN: httpd
USE: combinators
USE: format USE: format
USE: kernel USE: kernel
USE: lists USE: lists
USE: logging USE: logging
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: httpd IN: httpd
USE: combinators
USE: errors USE: errors
USE: httpd-responder USE: httpd-responder
USE: kernel USE: kernel
USE: lists USE: lists
USE: logging USE: logging
USE: logic
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -29,7 +29,7 @@ IN: inspect-responder
USE: html USE: html
USE: inspector USE: inspector
USE: namespaces USE: namespaces
USE: stack USE: kernel
USE: httpd USE: httpd
USE: httpd-responder USE: httpd-responder

View File

@ -26,11 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: quit-responder IN: quit-responder
USE: combinators
USE: httpd USE: httpd
USE: httpd-responder USE: httpd-responder
USE: namespaces USE: namespaces
USE: stack USE: kernel
USE: stdio USE: stdio
USE: streams USE: streams

View File

@ -26,16 +26,13 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: resource-responder IN: resource-responder
USE: combinators
USE: files USE: files
USE: httpd USE: httpd
USE: httpd-responder USE: httpd-responder
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -27,7 +27,6 @@
IN: httpd-responder IN: httpd-responder
USE: combinators
USE: hashtables USE: hashtables
USE: httpd USE: httpd
USE: kernel USE: kernel
@ -35,7 +34,6 @@ USE: lists
USE: logging USE: logging
USE: namespaces USE: namespaces
USE: stdio USE: stdio
USE: stack
USE: streams USE: streams
USE: strings USE: strings

View File

@ -29,7 +29,7 @@ IN: test-responder
USE: html USE: html
USE: httpd USE: httpd
USE: httpd-responder USE: httpd-responder
USE: stack USE: kernel
USE: test USE: test
: test-responder ( argument -- ) : test-responder ( argument -- )

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: url-encoding IN: url-encoding
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: format USE: format
USE: math USE: math
USE: parser USE: parser
USE: stack
USE: strings USE: strings
USE: unparser USE: unparser

View File

@ -26,13 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: threads IN: threads
USE: combinators
USE: continuations
USE: errors USE: errors
USE: io-internals USE: io-internals
USE: kernel USE: kernel
USE: lists USE: lists
USE: stack
: in-thread ( quot -- ) : in-thread ( quot -- )
#! Execute a quotation in a co-operative thread. The #! Execute a quotation in a co-operative thread. The

View File

@ -26,16 +26,13 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: inference IN: inference
USE: combinators
USE: errors USE: errors
USE: generic USE: generic
USE: interpreter USE: interpreter
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors
USE: words USE: words

View File

@ -27,12 +27,11 @@
IN: inference IN: inference
USE: interpreter USE: interpreter
USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: words USE: words
USE: combinators
USE: vectors USE: vectors
! We build a dataflow graph for the compiler. ! We build a dataflow graph for the compiler.

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: inference IN: inference
USE: combinators
USE: errors USE: errors
USE: interpreter USE: interpreter
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors
USE: words USE: words

View File

@ -27,10 +27,10 @@
IN: inference IN: inference
USE: interpreter USE: interpreter
USE: stack USE: kernel
USE: words
USE: lists USE: lists
USE: namespaces USE: namespaces
USE: words
\ >r [ \ >r [
f #>r dataflow, [ 1 0 node-inputs ] extend f #>r dataflow, [ 1 0 node-inputs ] extend

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: inference IN: inference
USE: combinators
USE: errors USE: errors
USE: interpreter USE: interpreter
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors
USE: words USE: words

View File

@ -26,12 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: ansi IN: ansi
USE: combinators
USE: lists USE: lists
USE: kernel USE: kernel
USE: format USE: format
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -26,13 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: files IN: files
USE: combinators USE: kernel
USE: hashtables USE: hashtables
USE: lists USE: lists
USE: logic
USE: namespaces USE: namespaces
USE: presentation USE: presentation
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings

View File

@ -26,11 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: io-internals IN: io-internals
USE: combinators
USE: continuations
USE: kernel USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: threads USE: threads

View File

@ -27,10 +27,9 @@
IN: logging IN: logging
USE: combinators
USE: hashtables USE: hashtables
USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -26,14 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: streams IN: streams
USE: combinators
USE: continuations
USE: io-internals USE: io-internals
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: logic
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: namespaces USE: namespaces

View File

@ -26,12 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: presentation IN: presentation
USE: combinators
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: unparser USE: unparser

View File

@ -26,8 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: stdio IN: stdio
USE: kernel
USE: math USE: math
USE: stack
USE: streams USE: streams
USE: strings USE: strings

View File

@ -26,12 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: stdio IN: stdio
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: namespaces USE: namespaces
USE: stack
USE: streams USE: streams
USE: generic USE: generic
USE: strings USE: strings

View File

@ -29,14 +29,10 @@ IN: stdio
DEFER: stdio DEFER: stdio
IN: streams IN: streams
USE: combinators
USE: continuations
USE: io-internals USE: io-internals
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: logic
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: namespaces USE: namespaces

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: streams IN: streams
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: generic USE: generic

View File

@ -26,12 +26,10 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: presentation IN: presentation
USE: combinators
USE: hashtables USE: hashtables
USE: lists USE: lists
USE: kernel USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: words USE: words
: vocab-style ( vocab -- style ) : vocab-style ( vocab -- style )
@ -51,14 +49,6 @@ USE: words
[ "ansi-fg" | "1" ] [ "ansi-fg" | "1" ]
[ "fg" | [ 204 0 0 ] ] [ "fg" | [ 204 0 0 ] ]
] "arithmetic" set-vocab-style ] "arithmetic" set-vocab-style
[
[ "ansi-fg" | "3" ]
[ "fg" | [ 255 132 0 ] ]
] "combinators" set-vocab-style
[
[ "ansi-fg" | "5" ]
[ "fg" | [ 102 0 204 ] ]
] "continuations" set-vocab-style
[ [
[ "ansi-fg" | "1" ] [ "ansi-fg" | "1" ]
[ "fg" | [ 255 0 0 ] ] [ "fg" | [ 255 0 0 ] ]
@ -71,10 +61,6 @@ USE: words
[ "ansi-fg" | "2" ] [ "ansi-fg" | "2" ]
[ "fg" | [ 0 102 153 ] ] [ "fg" | [ 0 102 153 ] ]
] "lists" set-vocab-style ] "lists" set-vocab-style
[
[ "ansi-fg" | "6" ]
[ "fg" | [ 0 153 102 ] ]
] "logic" set-vocab-style
[ [
[ "ansi-fg" | "1" ] [ "ansi-fg" | "1" ]
[ "fg" | [ 204 0 0 ] ] [ "fg" | [ 204 0 0 ] ]

View File

@ -30,12 +30,9 @@ DEFER: vector=
DEFER: vector-hashcode DEFER: vector-hashcode
IN: kernel IN: kernel
USE: combinators
USE: lists USE: lists
USE: math USE: math
USE: math-internals USE: math-internals
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors
USE: words USE: words

View File

@ -26,10 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: lists IN: lists
USE: combinators
USE: kernel USE: kernel
USE: namespaces USE: namespaces
USE: stack
USE: math USE: math
: cons@ ( x var -- ) : cons@ ( x var -- )

View File

@ -26,11 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: lists IN: lists
USE: combinators
USE: kernel USE: kernel
USE: logic
USE: math USE: math
USE: stack
USE: vectors USE: vectors
: 2list ( a b -- [ a b ] ) : 2list ( a b -- [ a b ] )

View File

@ -25,10 +25,7 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: logic IN: kernel
USE: combinators
USE: kernel
USE: stack
: ? ( cond t f -- t/f ) : ? ( cond t f -- t/f )
#! Push t if cond is true, otherwise push f. #! Push t if cond is true, otherwise push f.

View File

@ -26,10 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators USE: kernel
USE: math USE: math
USE: math-internals USE: math-internals
USE: stack
! Inverse trigonometric functions: ! Inverse trigonometric functions:
! acos asec asin acosec atan acot ! acos asec asin acosec atan acot

View File

@ -26,10 +26,7 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: kernel USE: kernel
USE: logic
USE: stack
: integer? dup fixnum? swap bignum? or ; : integer? dup fixnum? swap bignum? or ;
: rational? dup integer? swap ratio? or ; : rational? dup integer? swap ratio? or ;

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: errors USE: errors
USE: generic USE: generic
USE: kernel USE: kernel
USE: stack
USE: vectors USE: vectors
USE: words USE: words

View File

@ -26,9 +26,7 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: kernel USE: kernel
USE: stack
: times ( n quot -- ) : times ( n quot -- )
#! Evaluate a quotation n times. #! Evaluate a quotation n times.

View File

@ -26,12 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: kernel USE: kernel
USE: logic
USE: math USE: math
USE: math-internals USE: math-internals
USE: stack
: fac ( n -- n! ) : fac ( n -- n! )
! This is the naive implementation, for benchmarking purposes. ! This is the naive implementation, for benchmarking purposes.

View File

@ -26,10 +26,8 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators USE: kernel
USE: logic
USE: namespaces USE: namespaces
USE: stack
: +@ ( num var -- ) tuck get + put ; : +@ ( num var -- ) tuck get + put ;
: -@ ( num var -- ) tuck get swap - put ; : -@ ( num var -- ) tuck get swap - put ;

View File

@ -26,12 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: math USE: math
USE: math-internals USE: math-internals
USE: kernel USE: kernel
USE: logic
USE: stack
! Power-related functions: ! Power-related functions:
! exp log sqrt pow ! exp log sqrt pow

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: math IN: math
USE: combinators
USE: kernel USE: kernel
USE: math USE: math
USE: math-internals USE: math-internals
USE: stack
! Trigonometric functions: ! Trigonometric functions:
! cos sec sin cosec tan cot ! cos sec sin cosec tan cot

View File

@ -26,12 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: namespaces IN: namespaces
USE: combinators
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: stack
USE: strings USE: strings
USE: vectors USE: vectors

View File

@ -25,7 +25,6 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
USE: combinators
USE: alien USE: alien
USE: compiler USE: compiler
USE: errors USE: errors
@ -38,7 +37,6 @@ USE: math-internals
USE: parser USE: parser
USE: profiler USE: profiler
USE: random USE: random
USE: stack
USE: strings USE: strings
USE: unparser USE: unparser
USE: vectors USE: vectors

View File

@ -26,11 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: random IN: random
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: stack
: power-of-2? ( n -- ? ) : power-of-2? ( n -- ? )
dup dup neg bitand = ; dup dup neg bitand = ;

View File

@ -26,13 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: strings IN: strings
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: strings USE: strings
USE: stack
: make-string ( quot -- string ) : make-string ( quot -- string )
#! Call a quotation. The quotation can call , to prepend #! Call a quotation. The quotation can call , to prepend

View File

@ -7,12 +7,10 @@
! Translated to Factor by Slava Pestov. ! Translated to Factor by Slava Pestov.
IN: sdl IN: sdl
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
: f_ ( h s v i -- f ) >r transp >r 2dup r> 6 * r> - ; : f_ ( h s v i -- f ) >r transp >r 2dup r> 6 * r> - ;
: p ( v s x -- v p x ) >r dupd neg succ * r> ; : p ( v s x -- v p x ) >r dupd neg succ * r> ;

View File

@ -29,15 +29,12 @@ IN: sdl
USE: alien USE: alien
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: compiler USE: compiler
USE: words USE: words
USE: parser USE: parser
USE: kernel USE: kernel
USE: errors USE: errors
USE: combinators
USE: lists USE: lists
USE: logic
USE: prettyprint USE: prettyprint
USE: sdl-event USE: sdl-event
USE: sdl-gfx USE: sdl-gfx

View File

@ -27,12 +27,9 @@
IN: sdl-video IN: sdl-video
USE: alien USE: alien
USE: combinators
USE: compiler USE: compiler
USE: kernel USE: kernel
USE: logic
USE: math USE: math
USE: stack
! These are the currently supported flags for the SDL_surface ! These are the currently supported flags for the SDL_surface
! Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() ! Available for SDL_CreateRGBSurface() or SDL_SetVideoMode()

View File

@ -25,7 +25,7 @@
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: stack IN: kernel
USE: vectors USE: vectors
: nop ( -- ) ; : nop ( -- ) ;

View File

@ -26,12 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: strings IN: strings
USE: combinators
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: stack
: f-or-"" ( obj -- ? ) : f-or-"" ( obj -- ? )
dup not swap "" = or ; dup not swap "" = or ;

View File

@ -26,14 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: parser IN: parser
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: words USE: words
USE: unparser USE: unparser

View File

@ -26,13 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: parser IN: parser
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: streams USE: streams
USE: strings USE: strings

View File

@ -27,15 +27,12 @@
IN: parser IN: parser
USE: combinators
USE: errors USE: errors
USE: hashtables USE: hashtables
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: words USE: words
USE: vectors USE: vectors

View File

@ -26,14 +26,11 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: parser IN: parser
USE: combinators
USE: errors USE: errors
USE: kernel USE: kernel
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: strings USE: strings
USE: words USE: words
USE: unparser USE: unparser

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: prettyprint IN: prettyprint
USE: combinators
USE: errors USE: errors
USE: format USE: format
USE: kernel USE: kernel
USE: logic
USE: lists USE: lists
USE: math USE: math
USE: namespaces USE: namespaces
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: presentation USE: presentation

View File

@ -26,10 +26,9 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: prettyprint IN: prettyprint
USE: combinators USE: kernel
USE: lists USE: lists
USE: math USE: math
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: presentation USE: presentation

View File

@ -26,15 +26,12 @@
! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN: unparser IN: unparser
USE: combinators
USE: kernel USE: kernel
USE: format USE: format
USE: lists USE: lists
USE: logic
USE: math USE: math
USE: namespaces USE: namespaces
USE: parser USE: parser
USE: stack
USE: stdio USE: stdio
USE: strings USE: strings
USE: words USE: words

View File

@ -1,7 +1,5 @@
USE: stack
USE: math USE: math
USE: kernel USE: kernel
USE: combinators
USE: compiler USE: compiler
USE: test USE: test

View File

@ -1,6 +1,5 @@
IN: scratchpad IN: scratchpad
USE: combinators USE: kernel
USE: continuations
USE: math USE: math
USE: test USE: test

View File

@ -1,6 +1,7 @@
IN: scratchpad IN: scratchpad
USE: compiler
USE: kernel
USE: math USE: math
USE: stack
USE: test USE: test
: empty-loop-1 ( n -- ) : empty-loop-1 ( n -- )

View File

@ -1,6 +1,5 @@
IN: scratchpad IN: scratchpad
USE: math USE: math
USE: stack
USE: test USE: test
[ 1 ] [ 10000 fac 10000 [ succ / ] times* ] unit-test [ 1 ] [ 10000 fac 10000 [ succ / ] times* ] unit-test

View File

@ -1,9 +1,8 @@
IN: scratchpad IN: scratchpad
USE: compiler USE: compiler
USE: kernel
USE: math USE: math
USE: stack
USE: test USE: test
USE: combinators
: fib ( n -- nth fibonacci number ) : fib ( n -- nth fibonacci number )
dup 1 <= [ drop 1 ] [ pred dup fib swap pred fib + ] ifte ; dup 1 <= [ drop 1 ] [ pred dup fib swap pred fib + ] ifte ;

View File

@ -1,7 +1,6 @@
USE: stack
USE: strings USE: strings
USE: kernel
USE: math USE: math
USE: combinators
USE: test USE: test
USE: unparser USE: unparser
USE: hashtables USE: hashtables

View File

@ -1,8 +1,8 @@
IN: scratchpad IN: scratchpad
USE: lists USE: lists
USE: kernel
USE: math USE: math
USE: random USE: random
USE: stack
USE: test USE: test
[ ] [ [ 100000 [ 0 10000 random-int , ] times ] make-list num-sort drop ] unit-test [ ] [ [ 100000 [ 0 10000 random-int , ] times ] make-list num-sort drop ] unit-test

View File

@ -1,7 +1,6 @@
USE: stack
USE: strings USE: strings
USE: kernel
USE: math USE: math
USE: combinators
USE: test USE: test
USE: lists USE: lists

View File

@ -1,5 +1,5 @@
USE: vectors USE: vectors
USE: stack USE: kernel
USE: math USE: math
USE: compiler USE: compiler
USE: test USE: test

View File

@ -1,8 +1,6 @@
IN: scratchpad IN: scratchpad
USE: combinators
USE: kernel USE: kernel
USE: math USE: math
USE: stack
USE: test USE: test
[ slip ] unit-test-fails [ slip ] unit-test-fails

View File

@ -1,6 +1,5 @@
IN: scratchpad IN: scratchpad
USE: compiler USE: compiler
USE: stack
0 EAX I>R 0 EAX I>R
0 ECX I>R 0 ECX I>R

View File

@ -1,11 +1,9 @@
IN: scratchpad IN: scratchpad
USE: combinators
USE: compiler USE: compiler
USE: errors USE: errors
USE: logic
USE: math USE: math
USE: stack
USE: test USE: test
USE: kernel
: bail-out call + ; : bail-out call + ;

View File

@ -2,10 +2,7 @@ IN: scratchpad
USE: compiler USE: compiler
USE: test USE: test
USE: math USE: math
USE: stack
USE: kernel USE: kernel
USE: logic
USE: combinators
USE: words USE: words
: generic-test : generic-test

View File

@ -2,11 +2,9 @@ IN: scratchpad
USE: compiler USE: compiler
USE: test USE: test
USE: math USE: math
USE: stack
USE: kernel USE: kernel
USE: logic
USE: combinators
USE: words USE: words
USE: math-internals
: dummy-ifte-1 t [ ] [ ] ifte ; compiled : dummy-ifte-1 t [ ] [ ] ifte ; compiled

View File

@ -4,7 +4,7 @@ USE: compiler
USE: inference USE: inference
USE: words USE: words
USE: math USE: math
USE: combinators USE: kernel
: foo 1 2 3 ; : foo 1 2 3 ;

Some files were not shown because too many files have changed in this diff Show More