version 1.115, 2002/09/22 09:54:19
|
version 1.117, 2002/10/04 19:17:05
|
Line 89 variable out-nls \ newlines in output (f
|
Line 89 variable out-nls \ newlines in output (f
|
variable store-optimization \ use store optimization? |
variable store-optimization \ use store optimization? |
store-optimization off |
store-optimization off |
|
|
|
variable include-skipped-insts |
|
\ does the threaded code for a combined instruction include the cells |
|
\ for the component instructions (true) or only the cells for the |
|
\ inline arguments (false) |
|
include-skipped-insts off |
|
|
: th ( addr1 n -- addr2 ) |
: th ( addr1 n -- addr2 ) |
cells + ; |
cells + ; |
Line 847 stack inst-stream IP Cell
|
Line 852 stack inst-stream IP Cell
|
THEN ; |
THEN ; |
|
|
: output-tag-file ( -- ) |
: output-tag-file ( -- ) |
name-filename 2@ last-name-filename 2@ str= 0= if |
name-filename 2@ last-name-filename 2@ compare if |
name-filename 2@ last-name-filename 2! |
name-filename 2@ last-name-filename 2! |
#ff emit cr |
#ff emit cr |
name-filename 2@ type |
name-filename 2@ type |
Line 947 stack inst-stream IP Cell
|
Line 952 stack inst-stream IP Cell
|
prim to combined |
prim to combined |
0 num-combined ! |
0 num-combined ! |
current-depth max-stacks cells erase |
current-depth max-stacks cells erase |
|
include-skipped-insts @ current-depth 0 th ! |
max-depth max-stacks cells erase |
max-depth max-stacks cells erase |
min-depth max-stacks cells erase |
min-depth max-stacks cells erase |
prim prim-effect-in prim prim-effect-in-end ! |
prim prim-effect-in prim prim-effect-in-end ! |
Line 958 stack inst-stream IP Cell
|
Line 964 stack inst-stream IP Cell
|
: min! ( n addr -- ) |
: min! ( n addr -- ) |
tuck @ min swap ! ; |
tuck @ min swap ! ; |
|
|
|
: inst-stream-correction ( nin1 nstack -- nin2 ) |
|
0= if |
|
include-skipped-insts @ - |
|
endif ; |
|
|
: add-depths { p -- } |
: add-depths { p -- } |
\ combine stack effect of p with *-depths |
\ combine stack effect of p with *-depths |
max-stacks 0 ?do |
max-stacks 0 ?do |
current-depth i th @ |
current-depth i th @ |
p prim-stacks-in i th @ + |
p prim-stacks-in i th @ + i inst-stream-correction |
dup max-depth i th max! |
dup max-depth i th max! |
p prim-stacks-out i th @ - |
p prim-stacks-out i th @ - |
dup min-depth i th min! |
dup min-depth i th min! |
Line 1110 stack inst-stream IP Cell
|
Line 1121 stack inst-stream IP Cell
|
|
|
\ This is intended as initializer for a structure like this |
\ This is intended as initializer for a structure like this |
|
|
\ struct super { |
\ struct cost { |
\ int loads; /* number of stack loads */ |
\ int loads; /* number of stack loads */ |
\ int stores; /* number of stack stores */ |
\ int stores; /* number of stack stores */ |
\ int updates; /* number of stack pointer updates */ |
\ int updates; /* number of stack pointer updates */ |
Line 1180 print-token !
|
Line 1191 print-token !
|
\ when input points to a newline, check if the next line is a |
\ when input points to a newline, check if the next line is a |
\ sync line. If it is, perform the appropriate actions. |
\ sync line. If it is, perform the appropriate actions. |
rawinput @ >r |
rawinput @ >r |
s" #line " r@ over str= 0= if |
s" #line " r@ over compare if |
rdrop 1 line +! EXIT |
rdrop 1 line +! EXIT |
endif |
endif |
0. r> 6 chars + 20 >number drop >r drop line ! r> ( c-addr ) |
0. r> 6 chars + 20 >number drop >r drop line ! r> ( c-addr ) |