Merge pull request #6564 from SuperUserNameMan/gdscript_opcode_line_opcode_breakpoint
fixes #6487, GDscript compiler ignores OPCODE_LINE and OPCODE_BREAKPOINT in Release mode
This commit is contained in:
commit
cf3ba3379f
1 changed files with 4 additions and 2 deletions
|
@ -1005,12 +1005,12 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo
|
||||||
|
|
||||||
switch(s->type) {
|
switch(s->type) {
|
||||||
case GDParser::Node::TYPE_NEWLINE: {
|
case GDParser::Node::TYPE_NEWLINE: {
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
const GDParser::NewLineNode *nl = static_cast<const GDParser::NewLineNode*>(s);
|
const GDParser::NewLineNode *nl = static_cast<const GDParser::NewLineNode*>(s);
|
||||||
codegen.opcodes.push_back(GDFunction::OPCODE_LINE);
|
codegen.opcodes.push_back(GDFunction::OPCODE_LINE);
|
||||||
codegen.opcodes.push_back(nl->line);
|
codegen.opcodes.push_back(nl->line);
|
||||||
codegen.current_line=nl->line;
|
codegen.current_line=nl->line;
|
||||||
|
#endif
|
||||||
} break;
|
} break;
|
||||||
case GDParser::Node::TYPE_CONTROL_FLOW: {
|
case GDParser::Node::TYPE_CONTROL_FLOW: {
|
||||||
// try subblocks
|
// try subblocks
|
||||||
|
@ -1201,8 +1201,10 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo
|
||||||
codegen.opcodes.push_back(ret);
|
codegen.opcodes.push_back(ret);
|
||||||
} break;
|
} break;
|
||||||
case GDParser::Node::TYPE_BREAKPOINT: {
|
case GDParser::Node::TYPE_BREAKPOINT: {
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
// try subblocks
|
// try subblocks
|
||||||
codegen.opcodes.push_back(GDFunction::OPCODE_BREAKPOINT);
|
codegen.opcodes.push_back(GDFunction::OPCODE_BREAKPOINT);
|
||||||
|
#endif
|
||||||
} break;
|
} break;
|
||||||
case GDParser::Node::TYPE_LOCAL_VAR: {
|
case GDParser::Node::TYPE_LOCAL_VAR: {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue