162 Commits

Author SHA1 Message Date
Danil Alexeev 25ef403c8e GDScript: Replace incorrect usage of GD_ERR_BREAK 2026-04-07 14:49:15 +03:00
Thaddeus Crews cf1ff4fb63 Merge pull request #117831 from mihe/gdscript-temporaries
Change `GDScriptFunction::temporary_slots` to be a `LocalVector`
2026-03-31 10:46:50 -05:00
Mikael Hermansson 0636f7adff Reduce RefCounted copies in GDScriptFunction::call 2026-03-26 23:10:16 +01:00
Mikael Hermansson acc2c961a1 Change GDScriptFunction::temporary_slots to be a LocalVector 2026-03-26 18:44:42 +01:00
Danil Alexeev d0eb19359e GDScript: Fix compiler generates incorrect bytecode for conversion return 2026-03-18 11:44:20 +03:00
Danil Alexeev 8a09a2f88c GDScript: Fix and simplify coroutine stack clearing 2026-03-04 10:50:02 +03:00
StarryWorm 357fa00a4a rm class_db.h from resource.h 2026-02-27 19:08:29 -05:00
Lukas Tenbrink c5df0cb82b Don't right-align escaped newlines, e.g. for #define. This has previously led to long diffs in the commit history. 2026-02-04 19:31:28 +01:00
Lukas Tenbrink 2098998347 Add tracy support for profiling opcodes. 2025-12-05 16:05:07 +01:00
Lukas Tenbrink acefbbbbcd Add support for profiling GDScript with tracy.
This adds macro `GodotProfileZoneGroupedFirstScript`, and uses interning for speedy lookups.

Co-authored-by: Samuel Nicholas <nicholas.samuel@gmail.com>
2025-11-28 16:36:36 +01:00
Thaddeus Crews f50d7fa1e8 Merge pull request #110709 from DeeJayLSP/dict-reserve
Add `reserve()` to `Dictionary`, apply to constructors on GDScript VM
2025-10-20 18:09:58 -05:00
Lukas Tenbrink 1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
Danil Alexeev 5f0ecf4c8c GDScript: Remove some unnecessary booleans
Co-authored-by: HolonProduction <holonproduction@gmail.com>
2025-10-02 13:36:03 +03:00
DeeJayLSP 8a7a0faa75 Add reserve() to Dictionary, apply to constructors on GDScript VM 2025-09-23 16:57:52 -03:00
Shadows_of_Fire b18beb2cc2 Elide unnecessary copies in CONSTRUCT_TYPED_* opcodes 2025-09-20 00:00:18 -07:00
Serhii Snitsaruk a095c5e3fa GDScript call stack as reverse linked list with fixed coroutines
* GDScript call stack as reverse linked list with issues fixed
(originally proposed in 91006).
* Fix coroutine issues with call stack by resuming async call chain
inside `GDScriptFunction::call()`.
* This fixes corrupted line numbers for coroutines in the debugger and
backtrace (106489).

Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2025-06-30 11:37:42 +02:00
Mikael Hermansson 1b7b44390a Fix errors not being emitted when debugger breaks on script errors 2025-06-18 11:52:26 +02:00
Rémi Verschelde d1083c9722 Improve error messages for method calls expecting only 1 argument 2025-06-12 17:02:59 +02:00
Thaddeus Crews 0f05e91889 Merge pull request #82808 from dalexeev/gds-vararg
GDScript: Add support for variadic functions
2025-06-09 17:08:48 -05:00
Danil Alexeev a13fbc6e3e GDScript: Optimize non-constant for-range 2025-06-09 22:04:39 +03:00
Danil Alexeev ee121ef80e GDScript: Add support for variadic functions 2025-06-09 21:53:05 +03:00
Thaddeus Crews 86415f1732 Merge pull request #99150 from dalexeev/gds-fix-callable-call-errror-text
GDScript: Fix `Callable` call error text
2025-06-09 12:31:39 -05:00
Yufeng Ying 5484ec0be2 Remove deadcode in GDScript function CallState. 2025-05-09 19:07:50 +08:00
Danil Alexeev 2b30f23595 GDScript: Fix Callable call error text 2025-05-02 18:30:35 +03:00
Thaddeus Crews 28089c40c1 Merge pull request #91006 from reduz/live-backtrace
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
reduz d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
Thaddeus Crews 5edb235018 CI: Bump various pre-commit hooks 2025-04-07 08:23:35 -05:00
kobewi 75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
Lukas Tenbrink e34f1f504c Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase. 2025-02-07 14:57:48 +01:00
Yufeng Ying a43f90b89d Remove unused variable in GDScriptLanguage. 2024-12-20 00:48:06 +08:00
Yevhen Babiichuk (DustDFG) 8c29ef38fc Add some comments to #endif's where it will easier life
Also added some new line to improve readability

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2024-10-21 14:31:45 +03:00
SlugFiller f14af8b2d5 Enable use of Labels as Values feature in Clang when not wrapped by GCC 2024-10-02 15:22:37 +03:00
Thaddeus Crews 9853a69144 Implement typed dictionaries 2024-09-04 10:27:26 -05:00
Danil Alexeev 2d8f6c1b1d GDScript: Fix message when calling non-tool function in tool mode 2024-08-27 12:30:15 +03:00
Rémi Verschelde ab67408390 Merge pull request #94238 from RandomShaper/ref_is_now_rc
Make errors on `RefCounted.free()` more accurate
2024-07-17 11:43:32 +02:00
Pedro J. Estébanez 76bfe8e0fd Make errors on RefCounted.free() more accurate 2024-07-15 08:51:42 +02:00
Danil Alexeev b4cb7ec2bb GDScript: Fix implicit cast to typed array when passing parameter 2024-07-07 13:43:09 +03:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
K. S. Ernest (iFire) Lee f9b488508c Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
A Thousand Ships c4e24d2b3b [GDScript] Correctly report invalid read-only access 2024-05-01 12:28:47 +02:00
Rémi Verschelde 731ea17dd4 Merge pull request #91192 from vnen/gdscript-validated-native-static-calls
GDScript: Perform validated calls with static methods
2024-05-01 09:55:04 +02:00
Danil Alexeev 2778069025 GDScript: Fix object iterator opcodes 2024-04-26 09:21:55 +03:00
George Marques 7ca038effa GDScript: Perform validated calls with static methods
When the types are validated at compile time, this type of call runs
faster. It is already used for instance methods, this adds this
optimization to native static methods as well.
2024-04-25 21:19:40 -03:00
Danil Alexeev 27d7760f41 GDScript: Fix uninitialized local variables not being reset 2024-03-30 23:25:30 +03:00
Juan Linietsky 24fe0715b5 Promote CowData to 64 bits
Fixes a lot of bugs, please help me fill the list.
2024-01-19 17:41:10 +01:00
Rémi Verschelde 2bffa3cbc5 Merge pull request #82639 from golfinq/gdscript-improve-indexing-error
GDScript: Improve error messages for invalid indexing
2024-01-04 16:38:58 +01:00
msreis f1cc14d525 Fix missing time for some script functions in profiler
Fixes the issue by adding a mechanism by which the functions that were
previously disappearing can be profiled too. This is optional with
an editor setting, since collecting more information naturally slows the engine
further while profiling.

Fixes #23715, #40251, #29049
2023-12-19 19:42:21 +01:00
Thaddeus Crews 5cf0d772bc Change container_element_type to vector container 2023-12-05 08:51:49 -06:00
George Marques 08e3f30299 GDScript: Don't optimize division and modulo on debug
Since the validated operators don't have checks for division by zero,
use the regular evaluator in debug which has those checks.
2023-10-18 14:12:51 -03:00