diff --git a/src/las.c b/src/las.c index ba0ae0e11c6daa43c7ff6d90c2246b4aaf388898..45a5e2dda576d7a3ba1b04dfa56c31929efc7842 100644 --- a/src/las.c +++ b/src/las.c @@ -2108,7 +2108,7 @@ node **is_call_to(node *n, c_fun f) return 0; } - +#ifdef PIKE_DEBUG /* FIXME: Ought to use parent pointer to avoid recursion. */ static void low_print_tree(node *foo,int needlval) { @@ -2348,7 +2348,7 @@ void print_tree(node *n) low_print_tree(n,0); fputc('\n', stderr); } - +#endif /* The following routines need much better commenting. */ /* They also needed to support lexical scoping and external variables. diff --git a/src/opcodes.c b/src/opcodes.c index 54aeb5c888e1d90155ccd93cd728c131c228cd42..6fb4970be3d9aa3868437d98f0d276f2e302ca4a 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -295,6 +295,7 @@ struct instr instrs[F_MAX_INSTR - F_OFFSET]; size_t instrs_checksum; #endif /* PIKE_USE_MACHINE_CODE */ +#ifdef PIKE_DEBUG const char *low_get_f_name(int n, struct program *p) { static char buf[30]; @@ -365,6 +366,7 @@ const char *get_token_name(int n) return buf; } } +#endif /* PIKE_DEBUG */ void init_opcodes(void) { @@ -392,7 +394,9 @@ void init_opcodes(void) } #endif +#ifdef PIKE_DEBUG instrs[instr_names[i].token - F_OFFSET].name = instr_names[i].word; +#endif instrs[instr_names[i].token - F_OFFSET].flags=instr_names[i].flags; #ifdef PIKE_USE_MACHINE_CODE instrs[instr_names[i].token - F_OFFSET].address=instr_names[i].address; diff --git a/src/opcodes.h b/src/opcodes.h index 36c3cae5b1311b45da36f2dffce3b0aad63d46de..85a47a0b00fbf095331dee4e63554e7843f63f8f 100644 --- a/src/opcodes.h +++ b/src/opcodes.h @@ -93,8 +93,10 @@ struct instr #ifdef PIKE_DEBUG long compiles; #endif - int flags; +#ifdef PIKE_DEBUG const char *name; +#endif + int flags; #ifdef PIKE_USE_MACHINE_CODE void *address; #endif @@ -293,6 +295,7 @@ enum Pike_opcodes #undef OPCODE1_ALIAS #undef OPCODE2_ALIAS +#ifdef PIKE_DEBUG const char *low_get_f_name(int n,struct program *p); const char *get_f_name(int n); #ifdef HAVE_COMPUTED_GOTO @@ -301,6 +304,7 @@ const char *get_opcode_name(PIKE_INSTR_T n); #define get_opcode_name(n) get_f_name(n + F_OFFSET) #endif /* HAVE_COMPUTED_GOTO */ const char *get_token_name(int n); +#endif void init_opcodes(void); void exit_opcodes(void);