Merge pull request #8016 from RandomShaper/optimize-assert-2.1
Skip asserts on non-debug builds at compiler level (2.1)
This commit is contained in:
commit
8ea4413a2c
@ -1189,6 +1189,7 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo
|
|||||||
}
|
}
|
||||||
} 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);
|
||||||
@ -1199,6 +1200,7 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo
|
|||||||
|
|
||||||
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