diff options
author | George Marques <george@gmarqu.es> | 2023-07-25 12:42:07 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2023-10-06 11:15:44 -0300 |
commit | 4a7d49a89a381f78f19d0b989c5cb5b500f098c9 (patch) | |
tree | d3cf43e7a1f877929b03130ef6831b85a89693f4 /modules/gdscript/gdscript_codegen.h | |
parent | fba341ce44427d9515a581c19a8c98b522cef02b (diff) | |
download | redot-engine-4a7d49a89a381f78f19d0b989c5cb5b500f098c9.tar.gz |
GDScript: Replace ptrcalls on MethodBind to validated calls
This improves the performance of typed calls to engine methods when the
argument types are exact.
Using validated calls delegate more of the work the core instead of
doing argument unpacking in the VM. It also does not need different
instructions for each return type, simplifying the code.
Diffstat (limited to 'modules/gdscript/gdscript_codegen.h')
-rw-r--r-- | modules/gdscript/gdscript_codegen.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_codegen.h b/modules/gdscript/gdscript_codegen.h index cf17353dec..7ad8f841aa 100644 --- a/modules/gdscript/gdscript_codegen.h +++ b/modules/gdscript/gdscript_codegen.h @@ -129,7 +129,7 @@ public: virtual void write_call_builtin_type_static(const Address &p_target, Variant::Type p_type, const StringName &p_method, const Vector<Address> &p_arguments) = 0; virtual void write_call_native_static(const Address &p_target, const StringName &p_class, const StringName &p_method, const Vector<Address> &p_arguments) = 0; virtual void write_call_method_bind(const Address &p_target, const Address &p_base, MethodBind *p_method, const Vector<Address> &p_arguments) = 0; - virtual void write_call_ptrcall(const Address &p_target, const Address &p_base, MethodBind *p_method, const Vector<Address> &p_arguments) = 0; + virtual void write_call_method_bind_validated(const Address &p_target, const Address &p_base, MethodBind *p_method, const Vector<Address> &p_arguments) = 0; virtual void write_call_self(const Address &p_target, const StringName &p_function_name, const Vector<Address> &p_arguments) = 0; virtual void write_call_self_async(const Address &p_target, const StringName &p_function_name, const Vector<Address> &p_arguments) = 0; virtual void write_call_script_function(const Address &p_target, const Address &p_base, const StringName &p_function_name, const Vector<Address> &p_arguments) = 0; |