From 25f3a9a55113f830c09be8389f1714bc57a75310 Mon Sep 17 00:00:00 2001 From: crc Date: Wed, 16 Jan 2019 15:59:47 +0000 Subject: [PATCH] retro-extend: more small cleanups, slightly faster FossilOrigin-Name: dde395a10561bef080523865f64c22ece42b9e57d6830bce8e159af9b33fcea6 --- tools/extend.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/extend.c b/tools/extend.c index e12ce22..ad63842 100644 --- a/tools/extend.c +++ b/tools/extend.c @@ -61,8 +61,8 @@ CELL max_sp, max_rsp; #define D_OFFSET_CLASS 2 #define D_OFFSET_NAME 3 -extern CELL Dictionary, Heap, Compiler; -extern CELL notfound; +CELL Dictionary, Heap, Compiler; +CELL notfound, interpret; CELL stack_pop(); void stack_push(CELL value); @@ -160,13 +160,8 @@ int main(int argc, char **argv) { return 0; } -CELL Dictionary, Heap, Compiler; -CELL notfound; - /* Some I/O Parameters */ -#define IO_TTY_PUTC 1000 - CELL stack_pop() { sp--; return data[sp + 1]; @@ -247,6 +242,7 @@ void update_rx() { Heap = memory[3]; Compiler = d_xt_for("Compiler", Dictionary); notfound = d_xt_for("err:notfound", Dictionary); + interpret = d_xt_for("interpret", Dictionary); } @@ -277,11 +273,8 @@ void execute(CELL cell) { to process it. */ void evaluate(char *s) { - CELL interpret; if (strlen(s) == 0) return; - update_rx(); - interpret = d_xt_for("interpret", Dictionary); string_inject(s, TIB); stack_push(TIB); execute(interpret);