From f078e76763b737f00651ff80bd07fd0263ccf05e Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 20 Nov 2021 04:32:51 +0000 Subject: [PATCH] removed conditional log output selection in decode.c --- moo/lib/decode.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/moo/lib/decode.c b/moo/lib/decode.c index ed1dd38..9a24170 100644 --- a/moo/lib/decode.c +++ b/moo/lib/decode.c @@ -28,19 +28,10 @@ #define DECODE_LOG_MASK (MOO_LOG_MNEMONIC | MOO_LOG_DEBUG) -#if defined(MOO_BUILD_RELEASE) - /* get rid of instruction logging regardless of the log mask - * in the release build */ -# define LOG_INST_0(moo,fmt) -# define LOG_INST_1(moo,fmt,a1) -# define LOG_INST_2(moo,fmt,a1,a2) -# define LOG_INST_3(moo,fmt,a1,a2,a3) -#else -# define LOG_INST_0(moo,fmt) MOO_LOG1(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer) -# define LOG_INST_1(moo,fmt,a1) MOO_LOG2(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1) -# define LOG_INST_2(moo,fmt,a1,a2) MOO_LOG3(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1, a2) -# define LOG_INST_3(moo,fmt,a1,a2,a3) MOO_LOG4(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1, a2, a3) -#endif +#define LOG_INST_0(moo,fmt) MOO_LOG1(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer) +#define LOG_INST_1(moo,fmt,a1) MOO_LOG2(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1) +#define LOG_INST_2(moo,fmt,a1,a2) MOO_LOG3(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1, a2) +#define LOG_INST_3(moo,fmt,a1,a2,a3) MOO_LOG4(moo, DECODE_LOG_MASK, " %06zd " fmt "\n", fetched_instruction_pointer, a1, a2, a3) #define FETCH_BYTE_CODE(moo) (cdptr[ip++]) #define FETCH_BYTE_CODE_TO(moo,v_oow) (v_oow = FETCH_BYTE_CODE(moo))