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

Method write_get_named

modules/gdscript/gdscript_byte_codegen.cpp:872–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872void GDScriptByteCodeGenerator::write_get_named(const Address &p_target, const StringName &p_name, const Address &p_source) {
873 if (HAS_BUILTIN_TYPE(p_source) && Variant::get_member_validated_getter(p_source.type.builtin_type, p_name)) {
874 Variant::ValidatedGetter getter = Variant::get_member_validated_getter(p_source.type.builtin_type, p_name);
875 append_opcode(GDScriptFunction::OPCODE_GET_NAMED_VALIDATED);
876 append(p_source);
877 append(p_target);
878 append(getter);
879#ifdef DEBUG_ENABLED
880 add_debug_name(getter_names, get_getter_pos(getter), p_name);
881#endif
882 return;
883 }
884 append_opcode(GDScriptFunction::OPCODE_GET_NAMED);
885 append(p_source);
886 append(p_target);
887 append(p_name);
888}
889
890void GDScriptByteCodeGenerator::write_set_member(const Address &p_value, const StringName &p_name) {
891 append_opcode(GDScriptFunction::OPCODE_SET_MEMBER);

Callers 1

_parse_expressionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected