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

Method get_call_target

modules/gdscript/gdscript_byte_codegen.cpp:1077–1090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1075}
1076
1077GDScriptByteCodeGenerator::CallTarget GDScriptByteCodeGenerator::get_call_target(const GDScriptCodeGenerator::Address &p_target, Variant::Type p_type) {
1078 if (p_target.mode == Address::NIL) {
1079 GDScriptDataType type;
1080 if (p_type != Variant::NIL) {
1081 type.has_type = true;
1082 type.kind = GDScriptDataType::BUILTIN;
1083 type.builtin_type = p_type;
1084 }
1085 uint32_t addr = add_temporary(type);
1086 return CallTarget(Address(Address::TEMPORARY, addr, type), true, this);
1087 } else {
1088 return CallTarget(p_target, false, this);
1089 }
1090}
1091
1092void GDScriptByteCodeGenerator::write_call(const Address &p_target, const Address &p_base, const StringName &p_function_name, const Vector<Address> &p_arguments) {
1093 append_opcode_and_argcount(p_target.mode == Address::NIL ? GDScriptFunction::OPCODE_CALL : GDScriptFunction::OPCODE_CALL_RETURN, 2 + p_arguments.size());

Callers

nothing calls this directly

Calls 2

CallTargetClass · 0.85
AddressEnum · 0.70

Tested by

no test coverage detected