Merge pull request #8015 from RandomShaper/optimize-assert
Skip asserts on non-debug builds at compiler level
This commit is contained in:
commit
af550e2f98
@ -1310,6 +1310,7 @@ Error GDCompiler::_parse_block(CodeGen &codegen, const GDParser::BlockNode *p_bl
|
|||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case GDParser::Node::TYPE_ASSERT: {
|
case GDParser::Node::TYPE_ASSERT: {
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
// try subblocks
|
// try subblocks
|
||||||
|
|
||||||
const GDParser::AssertNode *as = static_cast<const GDParser::AssertNode *>(s);
|
const GDParser::AssertNode *as = static_cast<const GDParser::AssertNode *>(s);
|
||||||
@ -1320,6 +1321,7 @@ Error GDCompiler::_parse_block(CodeGen &codegen, const GDParser::BlockNode *p_bl
|
|||||||
|
|
||||||
codegen.opcodes.push_back(GDFunction::OPCODE_ASSERT);
|
codegen.opcodes.push_back(GDFunction::OPCODE_ASSERT);
|
||||||
codegen.opcodes.push_back(ret);
|
codegen.opcodes.push_back(ret);
|
||||||
|
#endif
|
||||||
} break;
|
} break;
|
||||||
case GDParser::Node::TYPE_BREAKPOINT: {
|
case GDParser::Node::TYPE_BREAKPOINT: {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user