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

Method add_local

modules/gdscript/gdscript_byte_codegen.cpp:53–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53uint32_t GDScriptByteCodeGenerator::add_local(const StringName &p_name, const GDScriptDataType &p_type) {
54 int stack_pos = locals.size() + GDScriptFunction::FIXED_ADDRESSES_MAX;
55 locals.push_back(StackSlot(p_type.builtin_type, p_type.can_contain_object()));
56 add_stack_identifier(p_name, stack_pos);
57 return stack_pos;
58}
59
60uint32_t GDScriptByteCodeGenerator::add_local_constant(const StringName &p_name, const Variant &p_constant) {
61 int index = add_or_get_constant(p_constant);

Callers 8

_add_block_localsMethod · 0.45
_parse_blockMethod · 0.45
_parse_functionMethod · 0.45
parse_property_setterMethod · 0.45
parse_suiteMethod · 0.45
parse_forMethod · 0.45
parse_match_branchMethod · 0.45

Calls 4

StackSlotClass · 0.85
can_contain_objectMethod · 0.80
sizeMethod · 0.65
push_backMethod · 0.45

Tested by

no test coverage detected