55a61cbd4a
Optimize InputMap::get_actions.
2025-05-12 17:51:27 +08:00
1b439d49a9
Merge pull request #100446 from YYF233333/vmap
...
Replace `VMap` used in `VisualShader` with `HashMap` and remove `VMap`
2025-05-09 11:29:25 -05:00
ba710dfde3
Merge pull request #106170 from IphStich/fix-typed-dictionary
...
Fix for debugging typed dictionaries
2025-05-09 11:29:18 -05:00
0bf9d88797
Merge pull request #106167 from Faless/mbedtls/fix_enable_threading
...
mbedTLS: Fix concurrency issues with TLS
2025-05-09 11:29:17 -05:00
2db0a44519
Remove vmap.h
2025-05-09 19:05:28 +08:00
16aaa0a213
Merge pull request #103944 from KoBeWi/more_red_info
...
Improve error messages for `add_property_info()`
2025-05-08 07:19:33 -05:00
057759d413
Fix for debugging typed dictionaries
2025-05-08 21:11:23 +10:00
2c789788c0
mbedTLS: Fix concurrency issues with TLS
...
When we first integrated mbedTLS, we decided not to enable
MBEDTLS_THREADING_C (which adds mutex locking to calls modifying the
state), and instead to simply create separate contexts ("states") for
each connection.
This worked fine until recently.
Sadly, mbedTLS 3 added a global state for the new PSA crypto
functionalities (which are required to support TLSv1.3).
This results in TLSv1.3 connections to access and modify the global
state concurrently when running in threads.
This commit enables MBEDTLS_THREADING_C, and MBEDTLS_THREADING_C_ALT to
provide a generic Godot implementation using the engine Mutex class.
2025-05-08 11:45:00 +02:00
090d244b16
Merge pull request #101356 from Ivorforce/inline-utf-creation-functions
...
Inline `String::utf8` and `String::utf16` for their simplicity.
2025-05-07 12:48:32 -05:00
075b55068e
Merge pull request #100067 from aaronp64/randi_range_overflow
...
Fix `RandomPCG::random(int, int)` overflow bug
2025-05-07 12:48:30 -05:00
051712dfb8
Merge pull request #103264 from mhilbrunner/docs-path-join
...
Rename "file" param for str.path_join() to "path"
2025-05-07 12:48:29 -05:00
0ce3d75c20
Merge pull request #93783 from aaronp64/json_stringify_performance
...
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -05:00
aa1ca2b244
Merge pull request #93517 from Repiteo/core/nodiscard-strings
...
Core: Add `[[nodiscard]]` to string-like classes/structs
2025-05-07 12:48:27 -05:00
f13b4b760a
Improve JSON::stringify performance
...
- Changed stringify to call static function _stringify directly, instead of creating JSON object
- Changed colon and end_statement from String to const char * to avoid extra allocations in each _stringify call
- Pass result String reference to each _stringify call to append to instead of allocating new String in each call
These changes make JSON::stringify around 2-3x faster in most cases
2025-05-06 18:27:32 -04:00
1089f61868
Fix RandomPCG::random(int, int) overflow bug
...
- Use int64_t for subtraction before converting to uint32_t
- Don't add one to uint32_t max value for rand() bounds
2025-05-06 17:54:12 -04:00
579feb387c
Core: Add [[nodiscard]] to string-like classes
2025-05-06 12:23:41 -05:00
d176ba045f
Array performance improvements to reduce copying/copy_on_write calls
...
- Avoid temporary copy of p_array in Array::append_array when types match
- Call ptrw() once before looping in methods that return new Arrays, to avoid copy_on_write call for each item (recursive_duplicate, slice, filter, map)
2025-05-06 13:19:50 -04:00
26a6d4062d
Inline String::utf8 and String::utf16 for their simplicity.
2025-05-06 17:20:03 +02:00
e085acd71c
Merge pull request #104815 from Ivorforce/strnlen
...
Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs)
2025-05-06 08:38:06 -05:00
bd22587170
Merge pull request #106093 from KoBeWi/deprecated_forever
...
Remove registration of deprecated classes
2025-05-06 08:38:05 -05:00
4cb030d6bf
Merge pull request #106089 from mihe/rogue-newlines
...
Fix empty lines being added for errors with no script backtrace
2025-05-06 08:38:04 -05:00
7efe897343
Merge pull request #106085 from clayjohn/texture-decompress-import
...
Fix loading BPTC/ASTC textures on devices that don't support them
2025-05-06 08:38:04 -05:00
5fec9a9fdc
Merge pull request #100057 from aaronp64/container_validate_obj_perf
...
Improve `ContainerTypeValidate` performance for object types
2025-05-06 08:38:03 -05:00
aa24e3b671
Merge pull request #105884 from stuartcarnie/macos_embedded
...
macOS: Embedded window support.
2025-05-06 08:37:59 -05:00
ec32dae1da
Rename _strlen_clipped to strnlen (and use the system equivalent for char * inputs).
...
Add `strnlen` for `char16_t *` and `wchar_t *`.
2025-05-06 15:17:07 +02:00
00e1fdec2c
MacOS: Embedded window support.
2025-05-06 06:09:05 +10:00
242293c451
Remove registration of deprecated classes
2025-05-05 20:16:50 +02:00
5bc01f2994
Merge pull request #105080 from beicause/basisu-ktx2-settings
...
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-05 11:24:20 -05:00
5aca298548
Merge pull request #106051 from dalexeev/move-alt-codes-from-char-range
...
Move `alt_code_oem437` and `alt_code_cp1252` to separate header file
2025-05-05 11:24:14 -05:00
743c1eed49
Merge pull request #106027 from aaronp64/string_format_perf
...
Reduce allocations/copies in `String::format`
2025-05-05 11:24:13 -05:00
31b90246e7
Fix empty lines being added for errors with no script backtrace
2025-05-05 13:27:21 +02:00
2b3923880a
Continue checking for a texture decompression path even if end of import file is not reached
2025-05-05 00:19:32 -07:00
413cb795cd
Move alt_code_oem437 and alt_code_cp1252 to separate header file
2025-05-03 11:52:49 +03:00
237597b01f
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-03 01:45:38 +08:00
a4ba8c37c9
Reduce allocations/copies in String::format
...
- Updated initial new_string copy to use copy constructor/increase ref count instead of copying to new allocated memory
- Removed Variant copies from Array before assigning to String
- Only convert i to String when needed
2025-05-02 12:32:11 -04:00
01fc9aee6c
Core: Modernize C headers with C++ equivalents
2025-05-02 08:23:01 -05:00
9e9f6c9c35
Merge pull request #105916 from Repiteo/core/msvc-fastfail
...
Core: Use `__fastfail()` in MSVC error macros
2025-04-30 16:51:53 -05:00
304347c3ac
Merge pull request #104055 from Ivorforce/fixed-vector
...
Core: Add `FixedVector` template - a collection that can be used completely on the stack.
2025-04-30 16:51:53 -05:00
baf9d6e150
Merge pull request #105871 from Ivorforce/quick-stringname-fixes
...
Quick `StringName` improvements.
2025-04-30 16:51:52 -05:00
fb08e94c35
Merge pull request #105930 from a-johnston/fuzzy_search_index_field
...
Add original index field to fuzzy search result
2025-04-30 16:51:51 -05:00
1b1ab76a14
Add FixedVector template.
...
This is a high performance `Vector`-like object that can be used if the maximum number of objects is small and known, and the objects are needed only temporarily.
2025-04-30 19:14:08 +02:00
91362a61da
Simplify StringName to bool conversions.
...
Move `mutex` include of `string_name.h` to `string_name.cpp`.
2025-04-30 16:59:34 +02:00
f8f350a32a
Add GLOBAL_GET cached macros.
...
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com >
2025-04-30 15:08:50 +01:00
e025c9ed11
Add original index field to fuzzy search result
2025-04-29 17:39:59 -07:00
60aae6d856
Merge pull request #86653 from Mickeon/string-format-error
...
Improve error message for `String.format` when using nested Arrays
2025-04-29 16:05:20 -05:00
eb3d0604ba
Merge pull request #105876 from KoBeWi/dynamic_outline
...
Inline static variables (part 1)
2025-04-29 16:05:16 -05:00
d849ebb776
Merge pull request #105896 from piiertho/enhancement/gdextension/fallback-to-default-get-property-state-when-not-overriden
...
Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension
2025-04-29 16:05:15 -05:00
347e51e077
Merge pull request #105922 from aaronp64/dictionary_has_all
...
Avoid extra copy/validation of keys in `Dictionary::has_all`
2025-04-29 16:05:14 -05:00
e4bd611e19
Avoid extra copy/validation of keys in Dictionary::has_all
...
Updated Dictionary::has_all to check its HashMap directly for each validated key instead of going through Dictionary::has, to avoid additional copy/validation of each key.
2025-04-29 15:27:12 -04:00
b23a233b5b
Core: Use __fastfail() in MSVC error macros
2025-04-29 12:25:11 -05:00