Diff for /gforth/glocals.fs between versions 1.20 and 1.25

version 1.20, 1996/05/03 13:05:05 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
  0 0 0. 0.0e0 { c: clocal w: wlocal d: dlocal f: flocal }      ' dup >definer [ ' locals-wordlist >definer ] literal =
  ' dup >definer      if
  state @           >body !
  if      else
    case          -&32 throw
      [ ' locals-wordlist >definer ] literal \ value      endif ;
      OF >body POSTPONE Aliteral POSTPONE ! ENDOF  :noname
      [ ' clocal >definer ] literal      0 0 0. 0.0e0 { c: clocal w: wlocal d: dlocal f: flocal }
      OF POSTPONE laddr# >body @ lp-offset, POSTPONE c! ENDOF      ' dup >definer
      [ ' wlocal >definer ] literal      case
      OF POSTPONE laddr# >body @ lp-offset, POSTPONE ! ENDOF          [ ' locals-wordlist >definer ] literal \ value
      [ ' dlocal >definer ] literal          OF >body POSTPONE Aliteral POSTPONE ! ENDOF
      OF POSTPONE laddr# >body @ lp-offset, POSTPONE 2! ENDOF          [ comp' clocal drop >definer ] literal
      [ ' flocal >definer ] literal          OF POSTPONE laddr# >body @ lp-offset, POSTPONE c! ENDOF
      OF POSTPONE laddr# >body @ lp-offset, POSTPONE f! ENDOF          [ comp' wlocal drop >definer ] literal
      -&32 throw          OF POSTPONE laddr# >body @ lp-offset, POSTPONE ! ENDOF
    endcase          [ comp' dlocal drop >definer ] literal
  else          OF POSTPONE laddr# >body @ lp-offset, POSTPONE 2! ENDOF
    [ ' locals-wordlist >definer ] literal =          [ comp' flocal drop >definer ] literal
    if          OF POSTPONE laddr# >body @ lp-offset, POSTPONE f! ENDOF
      >body !          -&32 throw
    else      endcase ;
      -&32 throw  interpret/compile: TO ( c|w|d|r "name" -- ) \ core-ext,local
    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

Removed from v.1.20  
changed lines
  Added in v.1.25


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>