diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-23 15:35:55 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-23 15:35:55 +0100 |
commit | 81fe3715b825dfc2b02adced8c08f8bc88220cb7 (patch) | |
tree | 169c2309e3b07eb827971ec36c547e9be1cc2272 /modules/gdscript/gdscript_byte_codegen.cpp | |
parent | 11e227884458e1f5661dcd27e846b6996271467e (diff) | |
parent | 9462ae47838dcee066c165fd0455a1368da5c485 (diff) | |
download | redot-engine-81fe3715b825dfc2b02adced8c08f8bc88220cb7.tar.gz |
Merge pull request #71914 from vnen/gdscript-no-continue-match
GDScript: Remove function of `continue` for match statement
Diffstat (limited to 'modules/gdscript/gdscript_byte_codegen.cpp')
-rw-r--r-- | modules/gdscript/gdscript_byte_codegen.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 6c80fb7665..5e721bc179 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -1543,28 +1543,6 @@ void GDScriptByteCodeGenerator::write_endwhile() { current_breaks_to_patch.pop_back(); } -void GDScriptByteCodeGenerator::start_match() { - match_continues_to_patch.push_back(List<int>()); -} - -void GDScriptByteCodeGenerator::start_match_branch() { - // Patch continue statements. - for (const int &E : match_continues_to_patch.back()->get()) { - patch_jump(E); - } - match_continues_to_patch.pop_back(); - // Start a new list for next branch. - match_continues_to_patch.push_back(List<int>()); -} - -void GDScriptByteCodeGenerator::end_match() { - // Patch continue statements. - for (const int &E : match_continues_to_patch.back()->get()) { - patch_jump(E); - } - match_continues_to_patch.pop_back(); -} - void GDScriptByteCodeGenerator::write_break() { append_opcode(GDScriptFunction::OPCODE_JUMP); current_breaks_to_patch.back()->get().push_back(opcodes.size()); @@ -1576,12 +1554,6 @@ void GDScriptByteCodeGenerator::write_continue() { append(continue_addrs.back()->get()); } -void GDScriptByteCodeGenerator::write_continue_match() { - append_opcode(GDScriptFunction::OPCODE_JUMP); - match_continues_to_patch.back()->get().push_back(opcodes.size()); - append(0); -} - void GDScriptByteCodeGenerator::write_breakpoint() { append_opcode(GDScriptFunction::OPCODE_BREAKPOINT); } |