version 1.19, 1996/02/09 17:34:10
|
version 1.25, 1996/08/26 10:07:18
|
Line 254 previous
|
Line 254 previous
|
: new-locals-reveal ( -- ) |
: new-locals-reveal ( -- ) |
true abort" this should not happen: new-locals-reveal" ; |
true abort" this should not happen: new-locals-reveal" ; |
|
|
create new-locals-map ' new-locals-find A, ' new-locals-reveal A, |
create new-locals-map ( -- wordlist-map ) |
|
' new-locals-find A, ' new-locals-reveal A, |
|
|
vocabulary new-locals |
vocabulary new-locals |
new-locals-map ' new-locals >body cell+ A! \ !! use special access words |
new-locals-map ' new-locals >body cell+ A! \ !! use special access words |
Line 504 forth definitions
|
Line 505 forth definitions
|
code-address! |
code-address! |
then ; |
then ; |
|
|
: TO ( c|w|d|r "name" -- ) \ core-ext,local |
:noname |
\ !! state smart |
' dup >definer [ ' locals-wordlist >definer ] literal = |
0 0 0. 0.0e0 { c: clocal w: wlocal d: dlocal f: flocal } |
if |
' dup >definer |
>body ! |
state @ |
else |
if |
-&32 throw |
case |
endif ; |
[ ' locals-wordlist >definer ] literal \ value |
:noname |
OF >body POSTPONE Aliteral POSTPONE ! ENDOF |
0 0 0. 0.0e0 { c: clocal w: wlocal d: dlocal f: flocal } |
[ ' clocal >definer ] literal |
' dup >definer |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE c! ENDOF |
case |
[ ' wlocal >definer ] literal |
[ ' locals-wordlist >definer ] literal \ value |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE ! ENDOF |
OF >body POSTPONE Aliteral POSTPONE ! ENDOF |
[ ' dlocal >definer ] literal |
[ comp' clocal drop >definer ] literal |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE 2! ENDOF |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE c! ENDOF |
[ ' flocal >definer ] literal |
[ comp' wlocal drop >definer ] literal |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE f! ENDOF |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE ! ENDOF |
-&32 throw |
[ comp' dlocal drop >definer ] literal |
endcase |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE 2! ENDOF |
else |
[ comp' flocal drop >definer ] literal |
[ ' locals-wordlist >definer ] literal = |
OF POSTPONE laddr# >body @ lp-offset, POSTPONE f! ENDOF |
if |
-&32 throw |
>body ! |
endcase ; |
else |
interpret/compile: TO ( c|w|d|r "name" -- ) \ core-ext,local |
-&32 throw |
|
endif |
|
endif ; immediate |
|
|
|
: locals| |
: locals| |
\ don't use 'locals|'! use '{'! A portable and free '{' |
\ don't use 'locals|'! use '{'! A portable and free '{' |
\ implementation is anslocals.fs |
\ implementation is compat/anslocals.fs |
BEGIN |
BEGIN |
name 2dup s" |" compare 0<> |
name 2dup s" |" compare 0<> |
WHILE |
WHILE |