version 1.82, 2001/02/24 09:58:31
|
version 1.83, 2001/02/24 13:44:39
|
Line 484 does> ( item -- )
|
Line 484 does> ( item -- )
|
item declaration ; |
item declaration ; |
|
|
\ types pointed to by stacks for use in combined prims |
\ types pointed to by stacks for use in combined prims |
s" Cell" single 0 create-type cell-type |
\ !! output-c-combined shouldn't use these names! |
s" Float" single 0 create-type float-type |
s" Cell" single 0 create-type w |
|
s" Float" single 0 create-type r |
s" sp" save-mem cell-type s" (Cell)" make-stack data-stack |
|
s" fp" save-mem float-type s" " make-stack fp-stack |
s" sp" save-mem w s" (Cell)" make-stack data-stack |
s" rp" save-mem cell-type s" (Cell)" make-stack return-stack |
s" fp" save-mem r s" " make-stack fp-stack |
s" IP" save-mem cell-type s" error don't use # on results" make-stack inst-stream |
s" rp" save-mem w s" (Cell)" make-stack return-stack |
|
s" IP" save-mem w s" error don't use # on results" make-stack inst-stream |
' inst-in-index inst-stream stack-in-index-xt ! |
' inst-in-index inst-stream stack-in-index-xt ! |
' inst-stream <is> inst-stream-f |
' inst-stream <is> inst-stream-f |
\ !! initialize stack-in and stack-out |
\ !! initialize stack-in and stack-out |
Line 968 s" IP" save-mem cell-type s" error don'
|
Line 969 s" IP" save-mem cell-type s" error don'
|
; |
; |
|
|
|
|
\ compile VM insts |
\ peephole optimization rules |
|
|
\ in order for this to work as intended, shorter combinations for each |
\ in order for this to work as intended, shorter combinations for each |
\ length must be present, and the longer combinations must follow |
\ length must be present, and the longer combinations must follow |
\ shorter ones (this restriction may go away in the future). |
\ shorter ones (this restriction may go away in the future). |
|
|
: output-pregen-combined ( -- ) |
: output-peephole ( -- ) |
combined-prims num-combined @ 1- cells combinations search-wordlist |
combined-prims num-combined @ 1- cells combinations search-wordlist |
s" the prefix for this combination must be defined earlier" ?print-error |
s" the prefix for this combination must be defined earlier" ?print-error |
." {" |
." {" |