Rémi Verschelde
666edb3f76
Merge pull request #102440 from dsnopek/classdb-cannot-instantiate-unexposed-classes
...
Prevent instantiating classes that aren't exposed
2025-03-28 14:31:46 +01:00
Yyf2333
22b5ec17fb
Using iterator pattern instead of List::Element *.
...
Co-authored-by: Adam Scott <ascott.ca@gmail.com >
2025-03-28 13:29:15 +08:00
kobewi
bc9d0c7835
Add templated version of ObjectDB::get_instance()
2025-03-27 15:43:23 +01:00
Lukas Tenbrink
dd9dc75a83
Optimize Object::cast_to by assuming no virtual and multiple inheritance, gaining 8x throughput over dynamic_cast.
...
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
2025-03-27 15:39:53 +01:00
Alexander Montag
b79a6ca3e7
Remove redundant ClassDB::locker declaration
2025-03-26 21:14:11 +01:00
Lukas Tenbrink
28d6cf859a
Add move semantics to Ref.
2025-03-26 15:23:38 +01:00
Pedro J. Estébanez
2d885a3163
Sanitize ClassDB locking
2025-03-25 16:50:46 +01:00
Thaddeus Crews
8f331ebd9c
Merge pull request #103099 from YeldhamDev/build_res_loader_disable
...
Disable `ResourceFormatLoader/Saver`s of disabled classes
2025-03-23 19:04:01 -05:00
Thaddeus Crews
fd45f42464
Merge pull request #101361 from Repiteo/core/isolate-ref-logic
...
Core: Isolate `Ref` forward declare logic
2025-03-23 19:03:54 -05:00
Thaddeus Crews
d9ef361d12
Core: Isolate Ref forward declare logic
2025-03-23 08:22:00 -05:00
Thaddeus Crews
f09ee0171a
Style: Begin integrating simple .clangd fixes
2025-03-22 13:24:35 -05:00
Michael Alexsander
090358afcf
Disable ResourceFormatLoader/Savers of disabled classes
2025-03-21 14:23:05 -03:00
Rémi Verschelde
96a5d62507
Merge pull request #104355 from YYF233333/hashmap_iter
...
Optimize `ClassDB::get_direct_inheriters_from_class`
2025-03-21 13:03:53 +01:00
Rémi Verschelde
1f682b6554
Merge pull request #104237 from Ivorforce/optimize-thread-pool-waiting
...
Optimize thread pools by avoiding needless locks and unlocks of the `task_mutex`.
2025-03-21 13:03:37 +01:00
Yufeng Ying
c37c92b450
Optimize ClassDB::get_direct_inheriters_from_class.
...
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com >
2025-03-19 23:26:46 +08:00
Thaddeus Crews
4320800621
Core: Expand is_zero_constructible coverage
2025-03-17 11:45:26 -05:00
Lukas Tenbrink
9d30732c5b
Optimize thread pools by avoiding needless locks and unlocks of the task_mutex.
2025-03-16 15:33:55 +01:00
Thaddeus Crews
b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
...
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Thaddeus Crews
c1b7865ae9
Merge pull request #103557 from aaronfranke/godot-version-defines
...
Rename version defines to `GODOT_VERSION_*` to match GDExtension godot-cpp
2025-03-13 08:57:42 -05:00
Aaron Franke
97ee05e9b7
Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp
2025-03-12 11:11:38 -07:00
Yufeng Ying
bebe037abf
Add ConstIterator to Dictionary.
2025-03-13 01:28:46 +08:00
A Thousand Ships
d9721954e6
[Core] Use Vector for MethodInfo::arguments
2025-03-10 13:57:53 +01:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
Thaddeus Crews
96fdaa616b
Style: Integrate #pragma once in builders/checks
2025-03-07 17:32:33 -06:00
kobewi
c6c1a49bea
Don't edit objects when loading folding
2025-03-06 15:04:00 +01:00
Pāvels Nadtočajevs
53bb897458
Use separate WorkThreadPool for shader compiler.
2025-03-03 22:28:39 +02:00
David Snopek
be81b0685f
Prevent instantiating classes that aren't exposed
2025-02-04 17:09:37 -06:00
Thaddeus Crews
acddf31c39
Merge pull request #101489 from RandomShaper/optimize_classnames_enumeration
...
Optimize classnames enumeration
2025-02-04 09:03:59 -06:00
Thaddeus Crews
699237d243
Merge pull request #102131 from dsnopek/classdb-bind-method-custom-leak
...
Fix memory leak when `ClassDB::bind_method_custom()` fails
2025-01-30 11:39:04 -06:00
Pedro J. Estébanez
318af42020
Include more attributes in the global class names cache
2025-01-29 09:39:50 +01:00
David Snopek
e904c0c014
Fix memory leak when ClassDB::bind_method_custom() fails
2025-01-28 11:10:35 -06:00
Thaddeus Crews
1aed2f577e
Merge pull request #100904 from kiroxas/fixVariantMSVCWorkaround
...
Fix MSVC Variant Workaround
2025-01-28 09:03:33 -06:00
ialex32x
6b225ebe24
Fix index check in MethodBind::get_argument_type
2025-01-16 15:47:50 +08:00
David Snopek
696285f23a
Use MethodInfo::get_compatibility_hash() to generate the hash for MethodBind::get_hash() and other GDExtension hash clean up
2025-01-11 15:57:42 -06:00
Rémi Verschelde
6a8ca81789
Merge pull request #100674 from dsnopek/gdextension-virtual-method-compat
...
GDExtension: Add compatibility system for virtual methods
2025-01-11 22:29:38 +01:00
David Snopek
39f16e70f8
GDExtension: Add compatibility system for virtual methods
2025-01-10 16:00:05 -06:00
Rémi Verschelde
d9535301ab
Merge pull request #101001 from adamscott/fix-metadata-script
...
Fix Script metadata usage
2025-01-07 10:14:46 +01:00
Adam Scott
6db599232e
Fix Script metadata usage
2025-01-03 11:12:37 -05:00
Thaddeus Crews
e06d83860d
Style: Enforce AllowShortFunctionsOnASingleLine
2025-01-02 10:09:41 -06:00
Kiro
52ee437d7e
try Fixing Variant workaround
2024-12-29 16:35:10 +01:00
Thaddeus Crews
3c304ab7cc
Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
...
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Thaddeus Crews
bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
...
Remove unused headers in core
2024-12-19 19:59:55 -06:00
Yufeng Ying
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
Rémi Verschelde
851d8e49e8
Merge pull request #100386 from hpvb/core-ubsan
...
Core: Fix UBSAN reports
2024-12-18 17:23:32 +01:00
HP van Braam
240f510fa7
Core ubsan fixes
...
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.
These fixes apply only to errors reported, and caused by, core/
The following things have been changed:
* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
the API cannot pass in wrongly-sized values leading to potential stack
corruption.
* Ensure that memcpy is never called with invalid or null pointers as
this is undefined behavior, and when the engine is built with
optimizations turned on leads to memory corruption and hard to debug
crashes.
* Replace enum values only used as static values with constexpr static
const values instead. This has no runtime overhead. This makes it so
that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
verify the new behavior. The behavior doesn't quite match master in
particulary for negative doubles as the original code tried to cast -inf
to an int. This then led to negative doubles losing all but one of
their decimal points when serializing. Behavior in GDScript remains
unchanged.
2024-12-18 14:31:12 +01:00
Hugo Locurcio
7a04d85ec3
Only allow valid types in Decal, Light3D projector, PointLight2D texture and CSGMesh3D mesh
...
If an invalid type is supplied (which can still be done from a script),
a warning is printed (along with a workaround for ViewportTexture).
This also adds support for "negative" resource hints such as
"Texture2D,-ViewportTexture" to exclude one or more subclasses
from a class hint.
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com >
2024-12-17 20:41:12 +01:00
Thaddeus Crews
e42c22f359
Merge pull request #100426 from Ivorforce/variant-move-constructor
...
Add move assignment and move constructor to Variant.
2024-12-16 12:09:52 -06:00
Thaddeus Crews
9c9af038d5
Merge pull request #91060 from dalexeev/code-edit-add-doc-tooltips
...
Code Editor: Add documentation tooltips
2024-12-16 12:09:45 -06:00
Rémi Verschelde
08508d2e01
Merge pull request #99700 from hpvb/scene_tree_editor_performance
...
Improve Scene Tree editor performance
2024-12-16 17:16:00 +01:00
Lukas Tenbrink
34fa0bf3ec
Add move assignment and move constructor to Variant.
...
Add `_to_variant` helper functions to `gdvirtual.gen.inc` to work around an MSVC bug.
2024-12-15 14:38:46 +01:00