MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / write_end_or

Method write_end_or

modules/gdscript/gdscript_byte_codegen.cpp:745–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743}
744
745void GDScriptByteCodeGenerator::write_end_or(const Address &p_target) {
746 // If here means both operands are false.
747 append_opcode(GDScriptFunction::OPCODE_ASSIGN_FALSE);
748 append(p_target);
749 // Jump away from the success condition.
750 append_opcode(GDScriptFunction::OPCODE_JUMP);
751 append(opcodes.size() + 3);
752 // Here it means one of operands is true.
753 patch_jump(logic_op_jump_pos1.back()->get());
754 patch_jump(logic_op_jump_pos2.back()->get());
755 logic_op_jump_pos1.pop_back();
756 logic_op_jump_pos2.pop_back();
757 append_opcode(GDScriptFunction::OPCODE_ASSIGN_TRUE);
758 append(p_target);
759}
760
761void GDScriptByteCodeGenerator::write_start_ternary(const Address &p_target) {
762 ternary_result.push_back(p_target);

Callers 2

_parse_expressionMethod · 0.80
_parse_match_patternMethod · 0.80

Calls 4

sizeMethod · 0.65
getMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected