Some more internal optimizations. (0.41.15)
This commit is contained in:
parent
0d6685abcd
commit
a5de8b167a
13 changed files with 194 additions and 25 deletions
|
|
@ -34,6 +34,9 @@ endif()
|
|||
# Debug option to enable verbose parser/VM logging
|
||||
option(FUN_DEBUG "Enable extra debug logging in Fun" OFF)
|
||||
|
||||
# Optional: VM trace and opcode counters (disabled by default)
|
||||
option(FUN_TRACE "Enable VM tracing and opcode execution counters" OFF)
|
||||
|
||||
# VM settings (configurable via -D...)
|
||||
set(MAX_FRAMES 128 CACHE STRING "Maximum depth of the call stack (frames)")
|
||||
set(MAX_FRAME_LOCALS 64 CACHE STRING "Maximum number of local variables per frame")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ if(FUN_DEBUG)
|
|||
target_compile_definitions(fun_core PUBLIC FUN_DEBUG=1)
|
||||
endif()
|
||||
|
||||
# Enable VM tracing/counters when requested
|
||||
if(FUN_TRACE)
|
||||
target_compile_definitions(fun_core PUBLIC FUN_TRACE=1)
|
||||
endif()
|
||||
|
||||
# Provide default stdlib directory and version to the runtime
|
||||
target_compile_definitions(fun_core PUBLIC FUN_VERSION="${PROJECT_VERSION}")
|
||||
target_compile_definitions(fun_core PUBLIC DEFAULT_LIB_DIR="${DEFAULT_LIB_DIR}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue