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

Method write_end_and

modules/gdscript/gdscript_byte_codegen.cpp:715–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715void GDScriptByteCodeGenerator::write_end_and(const Address &p_target) {
716 // If here means both operands are true.
717 append_opcode(GDScriptFunction::OPCODE_ASSIGN_TRUE);
718 append(p_target);
719 // Jump away from the fail condition.
720 append_opcode(GDScriptFunction::OPCODE_JUMP);
721 append(opcodes.size() + 3);
722 // Here it means one of operands is false.
723 patch_jump(logic_op_jump_pos1.back()->get());
724 patch_jump(logic_op_jump_pos2.back()->get());
725 logic_op_jump_pos1.pop_back();
726 logic_op_jump_pos2.pop_back();
727 append_opcode(GDScriptFunction::OPCODE_ASSIGN_FALSE);
728 append(p_target);
729}
730
731void GDScriptByteCodeGenerator::write_or_left_operand(const Address &p_left_operand) {
732 append_opcode(GDScriptFunction::OPCODE_JUMP_IF);

Callers 3

_parse_expressionMethod · 0.80
_parse_match_patternMethod · 0.80
_parse_blockMethod · 0.80

Calls 4

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

Tested by

no test coverage detected