diff --git a/include/mes/constants.h b/include/mes/constants.h index 3f86c6cf..42424390 100644 --- a/include/mes/constants.h +++ b/include/mes/constants.h @@ -68,10 +68,10 @@ // CONSTANT STRUCT_PRINTER 1 #define STRUCT_PRINTER 1 -// CONSTANT FRAME_SIZE 5 -#define FRAME_SIZE 5 -// CONSTANT FRAME_PROCEDURE 4 -#define FRAME_PROCEDURE 4 +// CONSTANT GC_FRAME_SIZE 5 +#define GC_FRAME_SIZE 5 +// CONSTANT GC_FRAME_PROCEDURE 4 +#define GC_FRAME_PROCEDURE 4 // CONSTANT STDIN 0 // CONSTANT STDOUT 1 diff --git a/src/eval-apply.c b/src/eval-apply.c index d0a8a463..bd09cb30 100644 --- a/src/eval-apply.c +++ b/src/eval-apply.c @@ -441,7 +441,7 @@ evlis3: goto vm_return; apply: - g_stack_array[g_stack + FRAME_PROCEDURE] = R1->car; + g_stack_array[g_stack + GC_FRAME_PROCEDURE] = R1->car; a = R1->car; t = a->type; if (t == TSTRUCT && builtin_p (R1->car) == cell_t) diff --git a/src/gc.c b/src/gc.c index 55e4dec3..62643bbc 100644 --- a/src/gc.c +++ b/src/gc.c @@ -694,14 +694,14 @@ gc () void gc_push_frame () { - if (g_stack < FRAME_SIZE) + if (g_stack < GC_FRAME_SIZE) assert_msg (0, "STACK FULL"); g_stack_array[g_stack - 1] = cell_f; g_stack_array[g_stack - 2] = R0; g_stack_array[g_stack - 3] = R1; g_stack_array[g_stack - 4] = R2; g_stack_array[g_stack - 5] = R3; - g_stack = g_stack - FRAME_SIZE; + g_stack = g_stack - GC_FRAME_SIZE; } void @@ -711,14 +711,14 @@ gc_peek_frame () R2 = g_stack_array[g_stack + 1]; R1 = g_stack_array[g_stack + 2]; R0 = g_stack_array[g_stack + 3]; - g_stack_array[g_stack + FRAME_PROCEDURE]; + g_stack_array[g_stack + GC_FRAME_PROCEDURE]; } void gc_pop_frame () { gc_peek_frame (); - g_stack = g_stack + FRAME_SIZE; + g_stack = g_stack + GC_FRAME_SIZE; } void diff --git a/src/stack.c b/src/stack.c index 6fc25fb1..02d58f7c 100644 --- a/src/stack.c +++ b/src/stack.c @@ -53,8 +53,8 @@ make_frame (struct scm *stack, long index) struct scm *procedure = 0; if (index != 0) { - array_index = (STACK_SIZE - (index * FRAME_SIZE)); - procedure = g_stack_array[array_index + FRAME_PROCEDURE]; + array_index = (STACK_SIZE - (index * GC_FRAME_SIZE)); + procedure = g_stack_array[array_index + GC_FRAME_PROCEDURE]; } if (procedure == 0) procedure = cell_f; @@ -78,7 +78,7 @@ struct scm * make_stack (struct scm *stack) /*:((arity . n)) */ { struct scm *stack_type = make_stack_type (); - long size = (STACK_SIZE - g_stack) / FRAME_SIZE; + long size = (STACK_SIZE - g_stack) / GC_FRAME_SIZE; struct scm *frames = make_vector_ (size, cell_unspecified); long i; struct scm* frame;