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

Method write_else

modules/gdscript/gdscript_byte_codegen.cpp:1527–1535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1525}
1526
1527void GDScriptByteCodeGenerator::write_else() {
1528 append_opcode(GDScriptFunction::OPCODE_JUMP); // Jump from true if block;
1529 int else_jmp_addr = opcodes.size();
1530 append(0); // Jump destination, will be patched.
1531
1532 patch_jump(if_jmp_addrs.back()->get());
1533 if_jmp_addrs.pop_back();
1534 if_jmp_addrs.push_back(else_jmp_addr);
1535}
1536
1537void GDScriptByteCodeGenerator::write_endif() {
1538 patch_jump(if_jmp_addrs.back()->get());

Callers 1

_parse_blockMethod · 0.80

Calls 5

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

Tested by

no test coverage detected