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

Method clear_temporaries

modules/gdscript/gdscript_byte_codegen.cpp:1954–1963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952}
1953
1954void GDScriptByteCodeGenerator::clear_temporaries() {
1955 for (int slot_idx : temporaries_pending_clear) {
1956 // The temporary may have been reused as something else since it was added to the list.
1957 // In that case, there's **no** need to clear it.
1958 if (temporaries[slot_idx].can_contain_object) {
1959 clear_address(Address(Address::TEMPORARY, slot_idx)); // Can contain `RefCounted`, so clear it.
1960 }
1961 }
1962 temporaries_pending_clear.clear();
1963}
1964
1965void GDScriptByteCodeGenerator::clear_address(const Address &p_address) {
1966 // Do not check `is_local_dirty()` here! Always clear the address since the codegen doesn't track the compiler.

Callers 1

_parse_blockMethod · 0.80

Calls 2

AddressEnum · 0.70
clearMethod · 0.45

Tested by

no test coverage detected