version 1.143, 2003/09/01 22:12:46
|
version 1.148, 2003/11/06 09:47:49
|
Line 136
|
Line 136
|
\ throw execute, cfa and NEXT1 out? |
\ throw execute, cfa and NEXT1 out? |
\ macroize *ip, ip++, *ip++ (pipelining)? |
\ macroize *ip, ip++, *ip++ (pipelining)? |
|
|
|
\ Stack caching setup |
|
|
|
ifdef(`M4_ENGINE_FAST', `include(cache1.vmg)', `include(cache0.vmg)') |
|
|
\ these m4 macros would collide with identifiers |
\ these m4 macros would collide with identifiers |
undefine(`index') |
undefine(`index') |
undefine(`shift') |
undefine(`shift') |
Line 148 undefine(`symbols')
|
Line 152 undefine(`symbols')
|
|
|
(docol) ( -- R:a_retaddr ) gforth-internal paren_docol |
(docol) ( -- R:a_retaddr ) gforth-internal paren_docol |
""run-time routine for colon definitions"" |
""run-time routine for colon definitions"" |
|
#ifdef NO_IP |
|
a_retaddr = next_code; |
|
INST_TAIL; |
|
goto **(Label *)PFA(CFA); |
|
#else /* !defined(NO_IP) */ |
a_retaddr = (Cell *)IP; |
a_retaddr = (Cell *)IP; |
SET_IP((Xt *)PFA(CFA)); |
SET_IP((Xt *)PFA(CFA)); |
|
#endif /* !defined(NO_IP) */ |
|
|
(docon) ( -- w ) gforth-internal paren_docon |
(docon) ( -- w ) gforth-internal paren_docon |
""run-time routine for constants"" |
""run-time routine for constants"" |
w = *(Cell *)PFA(CFA); |
w = *(Cell *)PFA(CFA); |
|
#ifdef NO_IP |
|
INST_TAIL; |
|
goto *next_code; |
|
#endif /* defined(NO_IP) */ |
|
|
(dovar) ( -- a_body ) gforth-internal paren_dovar |
(dovar) ( -- a_body ) gforth-internal paren_dovar |
""run-time routine for variables and CREATEd words"" |
""run-time routine for variables and CREATEd words"" |
a_body = PFA(CFA); |
a_body = PFA(CFA); |
|
#ifdef NO_IP |
|
INST_TAIL; |
|
goto *next_code; |
|
#endif /* defined(NO_IP) */ |
|
|
(douser) ( -- a_user ) gforth-internal paren_douser |
(douser) ( -- a_user ) gforth-internal paren_douser |
""run-time routine for constants"" |
""run-time routine for constants"" |
a_user = (Cell *)(up+*(Cell *)PFA(CFA)); |
a_user = (Cell *)(up+*(Cell *)PFA(CFA)); |
|
#ifdef NO_IP |
|
INST_TAIL; |
|
goto *next_code; |
|
#endif /* defined(NO_IP) */ |
|
|
(dodefer) ( -- ) gforth-internal paren_dodefer |
(dodefer) ( -- ) gforth-internal paren_dodefer |
""run-time routine for deferred words"" |
""run-time routine for deferred words"" |
|
#ifndef NO_IP |
ip=IP; /* undo any ip updating that may have been performed by NEXT_P0 */ |
ip=IP; /* undo any ip updating that may have been performed by NEXT_P0 */ |
|
#endif /* !defined(NO_IP) */ |
SUPER_END; /* !! probably unnecessary and may lead to measurement errors */ |
SUPER_END; /* !! probably unnecessary and may lead to measurement errors */ |
EXEC(*(Xt *)PFA(CFA)); |
EXEC(*(Xt *)PFA(CFA)); |
|
|
(dofield) ( n1 -- n2 ) gforth-internal paren_field |
(dofield) ( n1 -- n2 ) gforth-internal paren_field |
""run-time routine for fields"" |
""run-time routine for fields"" |
n2 = n1 + *(Cell *)PFA(CFA); |
n2 = n1 + *(Cell *)PFA(CFA); |
|
#ifdef NO_IP |
|
INST_TAIL; |
|
goto *next_code; |
|
#endif /* defined(NO_IP) */ |
|
|
(dodoes) ( -- a_body R:a_retaddr ) gforth-internal paren_dodoes |
(dodoes) ( -- a_body R:a_retaddr ) gforth-internal paren_dodoes |
""run-time routine for @code{does>}-defined words"" |
""run-time routine for @code{does>}-defined words"" |
|
#ifdef NO_IP |
|
a_retaddr = next_code; |
|
a_body = PFA(CFA); |
|
INST_TAIL; |
|
goto **(Label *)DOES_CODE1(CFA); |
|
#else /* !defined(NO_IP) */ |
a_retaddr = (Cell *)IP; |
a_retaddr = (Cell *)IP; |
a_body = PFA(CFA); |
a_body = PFA(CFA); |
SET_IP(DOES_CODE1(CFA)); |
SET_IP(DOES_CODE1(CFA)); |
|
#endif /* !defined(NO_IP) */ |
|
|
(does-handler) ( -- ) gforth-internal paren_does_handler |
(does-handler) ( -- ) gforth-internal paren_does_handler |
""just a slot to have an encoding for the DOESJUMP, |
""just a slot to have an encoding for the DOESJUMP, |
Line 194 noop ( -- ) gforth
|
Line 229 noop ( -- ) gforth
|
call ( #a_callee -- R:a_retaddr ) new |
call ( #a_callee -- R:a_retaddr ) new |
""Call callee (a variant of docol with inline argument)."" |
""Call callee (a variant of docol with inline argument)."" |
#ifdef NO_IP |
#ifdef NO_IP |
|
assert(0); |
INST_TAIL; |
INST_TAIL; |
JUMP(a_callee); |
JUMP(a_callee); |
#else |
#else |
Line 1400 longname2=listlfind(c_addr, u, longname1
|
Line 1436 longname2=listlfind(c_addr, u, longname1
|
REPEAT THEN nip nip ; |
REPEAT THEN nip nip ; |
: (findl-samelen) ( u longname1 -- u longname2/0 ) |
: (findl-samelen) ( u longname1 -- u longname2/0 ) |
BEGIN 2dup cell+ @ lcount-mask and <> WHILE @ dup 0= UNTIL THEN ; |
BEGIN 2dup cell+ @ lcount-mask and <> WHILE @ dup 0= UNTIL THEN ; |
|
: capscomp ( c_addr1 u c_addr2 -- n ) |
|
swap bounds |
|
?DO dup c@ I c@ <> |
|
IF dup c@ toupper I c@ toupper = |
|
ELSE true THEN WHILE 1+ LOOP drop 0 |
|
ELSE c@ toupper I c@ toupper - unloop THEN sgn ; |
|
: sgn ( n -- -1/0/1 ) |
|
dup 0= IF EXIT THEN 0< 2* 1+ ; |
|
|
\+hash |
\+hash |
|
|
Line 2517 a_addr = groups;
|
Line 2561 a_addr = groups;
|
|
|
\g static_super |
\g static_super |
|
|
\C #if !defined(GFORTH_DEBUGGING) && !defined(INDIRECT_THREADED) && !defined(DOUBLY_INDIRECT) && !defined(VM_PROFILING) |
ifdef(`M4_ENGINE_FAST', |
|
`include(peeprules.vmg)') |
include(peeprules.vmg) |
|
|
|
\C #endif |
|
|
|
\g end |
\g end |