diff --git a/eval.c b/eval.c index 52c7f1c8..4cd416a9 100644 --- a/eval.c +++ b/eval.c @@ -1629,11 +1629,6 @@ sexp sexp_make_setter_op (sexp ctx, sexp self, sexp_sint_t n, sexp name, sexp ty #endif -#if SEXP_USE_PROFILE_VM -static sexp sexp_reset_vm_profile (sexp ctx, sexp self, sexp_sint_t n); -static sexp sexp_print_vm_profile (sexp ctx, sexp self, sexp_sint_t n); -#endif - static sexp sexp_copy_core (sexp ctx, struct sexp_core_form_struct *core) { sexp res = sexp_alloc_type(ctx, core, SEXP_CORE); memcpy(&(res->value), core, sizeof(core[0])); diff --git a/include/chibi/eval.h b/include/chibi/eval.h index ec0dd2e0..4147f5bc 100644 --- a/include/chibi/eval.h +++ b/include/chibi/eval.h @@ -140,6 +140,10 @@ SEXP_API sexp sexp_ratio_denominator_op (sexp ctx, sexp self, sexp_sint_t n, sex SEXP_API sexp sexp_complex_real_op (sexp ctx, sexp self, sexp_sint_t n, sexp rat); SEXP_API sexp sexp_complex_imag_op (sexp ctx, sexp self, sexp_sint_t n, sexp rat); #endif +#if SEXP_USE_PROFILE_VM +SEXP_API sexp sexp_reset_vm_profile (sexp ctx, sexp self, sexp_sint_t n); +SEXP_API sexp sexp_print_vm_profile (sexp ctx, sexp self, sexp_sint_t n); +#endif #if SEXP_USE_MATH SEXP_API sexp sexp_exp(sexp ctx, sexp self, sexp_sint_t n, sexp z); diff --git a/include/chibi/sexp.h b/include/chibi/sexp.h index 82a615cd..2c2444bc 100755 --- a/include/chibi/sexp.h +++ b/include/chibi/sexp.h @@ -1060,6 +1060,7 @@ SEXP_API sexp_heap sexp_global_heap; #if SEXP_USE_GLOBAL_SYMBOLS #define sexp_context_symbols(ctx) sexp_symbol_table +SEXP_API sexp sexp_symbol_table[SEXP_SYMBOL_TABLE_SIZE]; #else #define sexp_context_symbols(ctx) sexp_vector_data(sexp_global(ctx, SEXP_G_SYMBOLS)) #endif diff --git a/vm.c b/vm.c index fcb42ae1..556acaa5 100644 --- a/vm.c +++ b/vm.c @@ -855,7 +855,7 @@ static int sexp_check_type(sexp ctx, sexp a, sexp b) { sexp_uint_t profile1[SEXP_OP_NUM_OPCODES]; sexp_uint_t profile2[SEXP_OP_NUM_OPCODES][SEXP_OP_NUM_OPCODES]; -static sexp sexp_reset_vm_profile (sexp ctx, sexp self, sexp_sint_t n) { +sexp sexp_reset_vm_profile (sexp ctx, sexp self, sexp_sint_t n) { int i, j; for (i=0; i