Commit Graph

9472 Commits

Author SHA1 Message Date
Enzo Novoselic 1b98247ef8 Fix RequiredResult<T> not being parsed properly by include-cleaner 2026-05-02 14:02:01 -04:00
HolonProduction 612475a680 GDScript: Track columns by raw string offsets 2026-04-26 21:32:46 +02:00
Thaddeus Crews 01603e77df Merge pull request #118678 from hpvb/fix-115173
Fix race in `RefCounted::unreference()`
2026-04-22 09:58:32 -05:00
Thaddeus Crews 0e25644655 Merge pull request #118796 from deralmas/gotta-go-wrap
Buildsystem: Simplify `format_buffer` utility method
2026-04-22 09:58:29 -05:00
Thaddeus Crews ba11d28426 Merge pull request #118055 from realbucketofchicken/ipv6-shortening
Fix regression when parsing a shortened IPv6 Address
2026-04-21 16:46:03 -05:00
Dery Almas e4dcf1d852 Buildsystem: Simplify format_buffer utility method
This method is used to generate headers for embedding files into the binary
(think about the new `#embed` feature in C23 and C++26).

While the stringification step itself was plenty fast, it then proceeded
to wrap everything using the `textwrap` module. `textwrap` is *very*
slow, as it's apparently optimized for human text.

This patch reimplements the wrapping logic using a simple regex,
resulting in a tremendous speed improvement (~6x), and switches to `map`
for the stringification itself (thanks Rémi!)

It also removes a (practically) unused argument, `initial_indent`.

The generated files are pretty much the same, with a tiny difference in
line length (for some reason the old logic overshot the requested line
length)
2026-04-21 23:18:42 +02:00
bucket 9e674ece11 fix shortened ipv6 parsing 2026-04-21 15:18:46 +02:00
Mister Ky 9eb3a04edf Finish mapping missing deprecated types for GDExtension 2026-04-21 00:45:59 +03:00
Thaddeus Crews b2b661d3bc Merge pull request #118750 from dsnopek/gdext-cleanup-register-extension-class6
GDExtension: Clean up types for new `classdb_register_extension_class6`
2026-04-20 14:31:56 -05:00
Thaddeus Crews 92846d7c3e Merge pull request #112035 from Ivorforce/no-unsafe-new-overloads
Change `new` overloads to use a tag instead of a pointer
2026-04-20 09:15:47 -05:00
Thaddeus Crews dd6a398e90 Merge pull request #118355 from allenwp/hdr-output-basic-project-setting
Change `display/window/hdr/request_hdr_output` project setting to be a basic setting.
2026-04-20 09:15:39 -05:00
Thaddeus Crews e91640c755 Merge pull request #118773 from dsnopek/gdextension-placeholder-no-deprecated
GDExtension: Use `create_instance3` for placeholder classes
2026-04-20 09:15:38 -05:00
Lukas Tenbrink 9e43daa74d Change new overloads to use a tag instead of a pointer, which can lead to problems. Inline the new definition to save on a call. 2026-04-20 15:46:34 +02:00
David Snopek 10685b471e GDExtension: Use create_instance3 for placeholder classes
Co-authored-by: Mike Owens <mike@mikeowens.us>
2026-04-20 06:41:44 -05:00
David Snopek 470408515e GDExtension: Don't memdelete(gdtype) on placeholders 2026-04-19 12:25:51 -05:00
David Snopek 7375ee7736 GDExtension: Clean up types for new classdb_register_extension_class6 2026-04-19 08:19:14 -05:00
Thaddeus Crews f1edeb4acc Merge pull request #118527 from KoBeWi/ignore_error_problem_fixed
Don't print UID errors when cache is not initialized
2026-04-18 07:28:36 -05:00
HP van Braam 6409ce6bb6 Fix race in RefCounted::unreference()
When two threads unreference() a RefCounted Object at the same time there's
a potential race.

Thread A sees rc_val == 1, enters the if() block.
Thread B sees rc_val == 0, enters the if() block.

Thread A gets scheduled out, or is simply scheduled on a slower core and
Thread B finishes, returning die = true. Thread B then frees the Object.

Some time during or after ~Object() Thread A wakes up and tries to call
methods on the Object, which is either destroyed or in the process of being
destroyed, leading to a use-after-free.

We fix the problem by counting how many threads are currently inside
the critical section, and blocking returning die = true as long as there are
still other threads potentially alive.

Tested by running with --test and by opening and playing various public and
private Godot projects.

This fixes #115173
2026-04-17 12:24:56 +02:00
Thaddeus Crews 9b4b3831d2 Merge pull request #118588 from Bromeon/feature/more-required-ptrs
Use `RequiredParam`/`RequiredResult` in several more APIs
2026-04-16 09:41:13 -05:00
Thaddeus Crews 790c68368f Merge pull request #118590 from Bromeon/feature/required-ptr-conversion
Add `RequiredParam` -> `RequiredResult` conversion
2026-04-16 09:41:12 -05:00
Kaleb Reid f973e3e346 Remove p_ and add r_ prefixes to argument names 2026-04-15 13:47:15 -07:00
Thaddeus Crews 3f63a400fa Merge pull request #118503 from m4gr3d/update_perfetto_tracing
Hook up `perfetto` script and frame profiling logic
2026-04-15 14:02:37 -05:00
Thaddeus Crews 37e53d7a54 Merge pull request #118609 from HolonProduction/rm-cmt
Remove obsolete header guard comment
2026-04-15 14:02:34 -05:00
Thaddeus Crews 66dd6fe737 Merge pull request #118582 from Ivorforce/is_class_sn
Change `Object::is_class` to take `StringName` instead of `String`, for better performance
2026-04-15 14:02:32 -05:00
HolonProduction 2be6fea3b0 Remove obsolete header guard comment 2026-04-15 15:26:26 +02:00
Lukas Tenbrink 299b0f69f9 Change Object::is_class to take StringName for better performance (intended for GDExtension casting and inheritance checks). 2026-04-15 13:08:43 +02:00
dillyo09 f313fa9a06 Build: Remove redundant SCons environment clones 2026-04-15 01:30:23 -07:00
Jan Haller 71d44651c4 Add RequiredParam -> RequiredResult conversion
Adds implicit conversion from `RequiredResult<T_Other>` to `RequiredParam<T>` (where
`T_Other` derives from `T`). This allows passing a `RequiredResult` directly to a
`RequiredParam` without an intermediate variable.

Also changes `SceneTree::get_root()` to return `RequiredResult<Window>`. It is used in a
conversion as described above.

Why non-null: The root window is created in the `SceneTree` constructor and only set to
null in the destructor, so it is always valid during normal use. The function is no longer
`_FORCE_INLINE_` because `RequiredResult<Window>` requires Window to be a complete type.
2026-04-15 01:23:48 +02:00
Fredia Huya-Kouadio 5ac1faf067 Hook up perfetto script and frame profiling logic 2026-04-14 16:22:37 -07:00
Jan Haller 773ee962ed Use RequiredParam/RequiredResult in several more APIs 2026-04-15 00:53:13 +02:00
Thaddeus Crews 8f7bdc1722 Merge pull request #118214 from Ivorforce/gdext-init-refcount
Add `classdb_construct_object3` and `classdb_register_extension_class6` (refcount-aware inits)
2026-04-14 15:44:29 -05:00
kobewi f8cd68f283 Improve missing type error in ClassDB 2026-04-14 16:24:49 +02:00
Thaddeus Crews 15438d2d64 Merge pull request #117828 from lawnjelly/fti_fix_property_release_4
`FTI` - Fix property release updates
2026-04-14 07:11:06 -05:00
lawnjelly 6c82d74a28 FTI - Fix property release updates
Ensures properties are correctly updated to the server when being removed from the property update list.
2026-04-14 10:50:52 +01:00
David Snopek 4e79ddb81c GDExtension: Use real GDType in placeholder 2026-04-13 17:13:26 -05:00
Thaddeus Crews ee00d63bb2 Merge pull request #113905 from migueldeicaza/debugger-crash
Debugger: Rather than looping infinitely on data read errors, drop the connection.
2026-04-13 11:46:03 -05:00
Thaddeus Crews 8d80b74623 Merge pull request #118514 from bruvzg/be
Remove unused and broken big endian support code.
2026-04-13 11:46:02 -05:00
Thaddeus Crews 5adbdac72b Merge pull request #117025 from brandonhare/fix-imported-resource-script-class
Fix quick load for resources imported by editor import plugins
2026-04-13 11:45:57 -05:00
Thaddeus Crews 317a491b35 Merge pull request #118401 from m4gr3d/set_perfetto_android_default
Enable `perfetto` by default for Android debug builds
2026-04-13 11:45:50 -05:00
kobewi 14568256a3 Don't print UID errors when cache is not initialized 2026-04-13 18:43:58 +02:00
Miguel de Icaza ad3d59b59d Debugger: Rather than looping infinitely on data read errors, drop the connection 2026-04-13 14:12:41 +02:00
Pāvels Nadtočajevs cdd274199e Remove unused and broken big endian support code. 2026-04-13 12:41:46 +03:00
Fredia Huya-Kouadio f06290bbfa Enable 'perfetto' by default for Android debug builds. 2026-04-12 12:41:50 -07:00
Lukas Tenbrink c9279c1e53 Add classdb_construct_object3 and classdb_register_extension_class6, which are refcount-aware initialization functions (establishing RefCounted objects with a refcount of 1). 2026-04-12 12:29:04 +02:00
HolonProduction 97091c639b Deprecate ScriptLanguage::instance_has 2026-04-10 20:00:34 +02:00
Thaddeus Crews 014e3b70ec Merge pull request #118044 from blueskythlikesclouds/rt-pipeline-refactor
Refactor raytracing pipelines.
2026-04-10 10:32:25 -05:00
Thaddeus Crews aa73f2c43f Merge pull request #117575 from Ivorforce/gdtype-signals-obj
Integrate `GDType` signal ownership into `Object`, exchanging use of `ClassDB`
2026-04-10 10:32:21 -05:00
Thaddeus Crews e8b9abba7c Merge pull request #117160 from Naros/gdextension-expose-get-type-by-name
Add `Variant::get_type_by_name` to GDExtension Interface
2026-04-10 10:32:14 -05:00
Skyth 83d2b84a51 Refactor raytracing pipelines. 2026-04-10 14:21:02 +03:00
Thaddeus Crews c751ac4cec Merge pull request #118319 from aaronfranke/vector-resize-comment
Fix doc comment for Vector.resize_initialized
2026-04-09 17:41:11 -05:00