wren-lang / wren

The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.
http://wren.io
MIT License
6.9k stars 552 forks source link

The most of the content of the files wren_debug.c and wren_debug.h should be conditionally compiled out when not used. #1071

Open holley256 opened 2 years ago

holley256 commented 2 years ago

The functions wrenDumpValue, wrenDumpInstruction, wrenDumpCode, wrenDumpStack and all of the sub-functions they call should be conditionally compiled based on WREN_DEBUG_TRACE_MEMORY, WREN_DEBUG_DUMP_COMPILED_CODE, and WREN_DEBUG_TRACE_INSTRUCTIONS preprocessor tags because the only whey they are ever called is when one of these tags is defined. This is important because some applications cannot support printf() and printf() is only ever used by Wren when one or more of these tags is turned on.

ruby0x1 commented 2 years ago

That makes sense, thanks for the suggestion!