| 870 | } |
| 871 | |
| 872 | void 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 | |
| 890 | void GDScriptByteCodeGenerator::write_set_member(const Address &p_value, const StringName &p_name) { |
| 891 | append_opcode(GDScriptFunction::OPCODE_SET_MEMBER); |