Annotation of gforth/kernel/doers.fs, revision 1.9
1.2 anton 1: \ run-time code for defining words
2:
1.8 anton 3: \ Copyright (C) 1995,1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
1.2 anton 4:
5: \ This file is part of Gforth.
6:
7: \ Gforth is free software; you can redistribute it and/or
8: \ modify it under the terms of the GNU General Public License
1.9 ! anton 9: \ as published by the Free Software Foundation, either version 3
1.2 anton 10: \ of the License, or (at your option) any later version.
11:
12: \ This program is distributed in the hope that it will be useful,
13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: \ GNU General Public License for more details.
16:
17: \ You should have received a copy of the GNU General Public License
1.9 ! anton 18: \ along with this program. If not, see http://www.gnu.org/licenses/.
1.1 pazsan 19:
20:
21: \ If we leave out the compiler we need the runtime code for our defining
22: \ words. This file defines the defining words without the
23: \ interpretative/compiling part.
24:
25: has? compiler 0= [IF]
26:
27: \ fillers for interpreter only mode
1.3 jwilke 28: \D compileddofillers .( Do-Fillers: )
1.1 pazsan 29:
30: : (does>) ;
31:
1.3 jwilke 32: doer? :dofield 0= [IF] \D compileddofillers .( DOFIELD )
1.1 pazsan 33: | : (Field) DOES> @ + ;
34: [THEN]
35:
1.3 jwilke 36: doer? :dodefer 0= [IF] \D compileddofillers .( DODEFER )
1.1 pazsan 37: | : Defer ( "name" -- ) DOES> @ execute ;
38: [THEN]
39:
1.3 jwilke 40: \D compileddofillers .( DO2CON )
41: | : 2Constant ( w1 w2 "name" -- )
1.1 pazsan 42: DOES> ( -- w1 w2 )
43: 2@ ;
44:
1.3 jwilke 45: doer? :docon 0= [IF] \D compileddofillers .( DOCON )
1.1 pazsan 46: | : (Constant) DOES> @ ;
47: [THEN]
48:
1.3 jwilke 49: doer? :douser 0= [IF] \D compileddofillers .( DOUSER )
1.4 jwilke 50: | : User DOES> @ [IFDEF] up@ up@ [ELSE] up @ [THEN] + ;
1.1 pazsan 51: [THEN]
52:
1.3 jwilke 53: doer? :dovar 0= [IF] \D compileddofillers .( DOVAR )
1.1 pazsan 54: | : Create ( "name" -- ) \ core
55: DOES> ;
56:
1.3 jwilke 57: \D compileddofillers .( .)
1.1 pazsan 58: [THEN]
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>