| 824 | } |
| 825 | |
| 826 | void GDScriptByteCodeGenerator::write_get(const Address &p_target, const Address &p_index, const Address &p_source) { |
| 827 | if (HAS_BUILTIN_TYPE(p_source)) { |
| 828 | if (IS_BUILTIN_TYPE(p_index, Variant::INT) && Variant::get_member_validated_indexed_getter(p_source.type.builtin_type)) { |
| 829 | // Use indexed getter instead. |
| 830 | Variant::ValidatedIndexedGetter getter = Variant::get_member_validated_indexed_getter(p_source.type.builtin_type); |
| 831 | append_opcode(GDScriptFunction::OPCODE_GET_INDEXED_VALIDATED); |
| 832 | append(p_source); |
| 833 | append(p_index); |
| 834 | append(p_target); |
| 835 | append(getter); |
| 836 | return; |
| 837 | } else if (Variant::get_member_validated_keyed_getter(p_source.type.builtin_type)) { |
| 838 | Variant::ValidatedKeyedGetter getter = Variant::get_member_validated_keyed_getter(p_source.type.builtin_type); |
| 839 | append_opcode(GDScriptFunction::OPCODE_GET_KEYED_VALIDATED); |
| 840 | append(p_source); |
| 841 | append(p_index); |
| 842 | append(p_target); |
| 843 | append(getter); |
| 844 | return; |
| 845 | } |
| 846 | } |
| 847 | append_opcode(GDScriptFunction::OPCODE_GET_KEYED); |
| 848 | append(p_source); |
| 849 | append(p_index); |
| 850 | append(p_target); |
| 851 | } |
| 852 | |
| 853 | void GDScriptByteCodeGenerator::write_set_named(const Address &p_target, const StringName &p_name, const Address &p_source) { |
| 854 | if (HAS_BUILTIN_TYPE(p_target) && Variant::get_member_validated_setter(p_target.type.builtin_type, p_name) && |
no outgoing calls
no test coverage detected