version 1.39, 2002/01/05 20:16:18
|
version 1.40, 2002/02/04 21:25:18
|
Line 210 defer compile, ( xt -- ) \ core-ext comp
|
Line 210 defer compile, ( xt -- ) \ core-ext comp
|
' , is compile, |
' , is compile, |
[THEN] |
[THEN] |
|
|
|
defer basic-block-end ( -- ) |
|
|
|
: bb-end ( -- ) |
|
0 last-compiled ! ; |
|
' bb-end is basic-block-end |
|
|
has? peephole [IF] |
has? peephole [IF] |
: peephole-compile, ( xt -- ) |
|
\ compile xt, appending its code to the current dynamic superinstruction |
\ dynamic only |
compile-prim , ; |
\ : peephole-compile, ( xt -- ) |
|
\ \ compile xt, appending its code to the current dynamic superinstruction |
|
\ compile-prim , ; |
|
|
|
\ static only |
\ : peephole-compile, ( xt -- ) |
\ : peephole-compile, ( xt -- ) |
\ \ compile xt, possibly combining it with the previous compiled xt |
\ \ compile xt, possibly combining it with the previous compiled xt |
\ \ into a superinstruction (static superinstructions) |
\ \ into a superinstruction (static superinstructions) |
Line 226 has? peephole [IF]
|
Line 235 has? peephole [IF]
|
\ here last-compiled ! |
\ here last-compiled ! |
\ dyn-compile, ; |
\ dyn-compile, ; |
|
|
|
: dyn-compile! ( xt -- ) |
|
\ compile xt, appending its code to the current dynamic superinstruction |
|
compile-prim last-compiled-here @ ! ; |
|
|
|
:noname ( -- ) |
|
last-compiled @ if |
|
last-compiled @ dyn-compile! |
|
0 last-compiled ! |
|
then ; |
|
is basic-block-end |
|
|
|
: static-compile, ( xt -- ) |
|
\ compile xt, possibly combining it with the previous compiled xt |
|
\ into a superinstruction (static superinstructions) |
|
last-compiled @ ?dup if |
|
over peeptable peephole-opt ?dup if ( xt comb-xt ) |
|
last-compiled ! drop EXIT |
|
then ( xt ) |
|
last-compiled @ dyn-compile! |
|
then ( xt ) |
|
last-compiled ! |
|
here last-compiled-here ! 0 , ; |
|
|
: compile-to-prims, ( xt -- ) |
: compile-to-prims, ( xt -- ) |
\G compile xt to use primitives (and their peephole optimization) |
\G compile xt to use primitives (and their peephole optimization) |
\G instead of ","-ing the xt. |
\G instead of ","-ing the xt. |
Line 243 has? peephole [IF]
|
Line 275 has? peephole [IF]
|
ENDOF |
ENDOF |
dofield: OF >body @ POSTPONE lit+ , EXIT ENDOF |
dofield: OF >body @ POSTPONE lit+ , EXIT ENDOF |
ENDCASE |
ENDCASE |
peephole-compile, ; |
static-compile, ; |
|
|
' compile-to-prims, IS compile, |
' compile-to-prims, IS compile, |
[ELSE] |
[ELSE] |
Line 559 defer ;-hook ( sys2 -- sys1 )
|
Line 591 defer ;-hook ( sys2 -- sys1 )
|
\ common factor of : and :noname |
\ common factor of : and :noname |
docol: cfa, |
docol: cfa, |
[THEN] |
[THEN] |
0 last-compiled ! defstart ] :-hook ; |
defstart ] :-hook ; |
|
|
: : ( "name" -- colon-sys ) \ core colon |
: : ( "name" -- colon-sys ) \ core colon |
Header (:noname) ; |
Header (:noname) ; |