retro-extend: more small cleanups, slightly faster
FossilOrigin-Name: dde395a10561bef080523865f64c22ece42b9e57d6830bce8e159af9b33fcea6
This commit is contained in:
parent
03a5dadd8b
commit
25f3a9a551
1 changed files with 3 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue