diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-22 12:45:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-22 12:45:46 +0200 |
commit | cf3ba3379f6888aa9520ce20b8121216cf5ba09b (patch) | |
tree | d4b70306dd0c09993755a0021ea03bbe9fb7a451 /modules | |
parent | afd86ee240301aef499e35767cb3e12a7d36d948 (diff) | |
parent | 217e09c79da008e15bd789260e8b2513689c90bd (diff) |
Merge pull request #6564 from SuperUserNameMan/gdscript_opcode_line_opcode_breakpoint
fixes #6487, GDscript compiler ignores OPCODE_LINE and OPCODE_BREAKPOINT in Release mode
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 2e2cbe7b29..b75b13551e 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1005,12 +1005,12 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo switch(s->type) { case GDParser::Node::TYPE_NEWLINE: { - +#ifdef DEBUG_ENABLED const GDParser::NewLineNode *nl = static_cast<const GDParser::NewLineNode*>(s); codegen.opcodes.push_back(GDFunction::OPCODE_LINE); codegen.opcodes.push_back(nl->line); codegen.current_line=nl->line; - +#endif } break; case GDParser::Node::TYPE_CONTROL_FLOW: { // try subblocks @@ -1201,8 +1201,10 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo codegen.opcodes.push_back(ret); } break; case GDParser::Node::TYPE_BREAKPOINT: { +#ifdef DEBUG_ENABLED // try subblocks codegen.opcodes.push_back(GDFunction::OPCODE_BREAKPOINT); +#endif } break; case GDParser::Node::TYPE_LOCAL_VAR: { |