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/tests/scripts | |
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/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/standalone-calls-do-not-write-to-nil.gd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/standalone-calls-do-not-write-to-nil.gd b/modules/gdscript/tests/scripts/runtime/features/standalone-calls-do-not-write-to-nil.gd index fd1460a48f..691b611574 100644 --- a/modules/gdscript/tests/scripts/runtime/features/standalone-calls-do-not-write-to-nil.gd +++ b/modules/gdscript/tests/scripts/runtime/features/standalone-calls-do-not-write-to-nil.gd @@ -7,7 +7,7 @@ func test(): test_builtin_call_validated(Vector2.UP, false) test_object_call(RefCounted.new(), false) test_object_call_method_bind(Resource.new(), false) - test_object_call_ptrcall(RefCounted.new(), false) + test_object_call_method_bind_validated(RefCounted.new(), false) print("end") @@ -40,7 +40,7 @@ func test_object_call_method_bind(v: Resource, f): v.duplicate() # Native type method call with MethodBind. assert(not f) # Test unary operator reading from `nil`. -func test_object_call_ptrcall(v: RefCounted, f): +func test_object_call_method_bind_validated(v: RefCounted, f): @warning_ignore("return_value_discarded") - v.get_reference_count() # Native type method call with ptrcall. + v.get_reference_count() # Native type method call with validated MethodBind. assert(not f) # Test unary operator reading from `nil`. |