diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index ed27e2d276..c61c98f8ee 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -923,3 +923,31 @@ CCMD(nextsecret) Printf("no next secret map!\n"); } } + +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- +CCMD(vmengine) +{ + if (argv.argc() == 2) + { + if (stricmp(argv[1], "default") == 0) + { + VMSelectEngine(VMEngine_Default); + return; + } + else if (stricmp(argv[1], "checked") == 0) + { + VMSelectEngine(VMEngine_Checked); + return; + } + else if (stricmp(argv[1], "unchecked") == 0) + { + VMSelectEngine(VMEngine_Unchecked); + return; + } + } + Printf("Usage: vmengine \n"); +} diff --git a/src/zscript/vmexec.cpp b/src/zscript/vmexec.cpp index 21f897d0d1..8ad349cf70 100644 --- a/src/zscript/vmexec.cpp +++ b/src/zscript/vmexec.cpp @@ -114,6 +114,15 @@ VMExec_Checked::Exec #endif ; +//=========================================================================== +// +// VMSelectEngine +// +// Selects the VM engine, either checked or unchecked. Default will decide +// based on the NDEBUG preprocessor definition. +// +//=========================================================================== + void VMSelectEngine(EVMEngine engine) { switch (engine)