summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_cache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: invalidate GDScriptParserRef when reloadingrune-scape2024-04-181-40/+64
|
* Merge pull request #85501 from /remove-packed-scene-cacheRémi Verschelde2024-02-251-79/+0
|\
| * Stop caching packed scenes in GDScript cacheJordyfel2023-11-291-79/+0
| |
* | GDScript: Reintroduce binary tokenization on exportGeorge Marques2024-02-081-8/+47
|/ | | | | | | | | | | | | | | | This adds back a function available in 3.x: exporting the GDScript files in a binary form by converting the tokens recognized by the tokenizer into a data format. It is enabled by default on export but can be manually disabled. The format helps with loading times since, the tokens are easily reconstructed, and with hiding the source code, since recovering it would require a specialized tool. Code comments are not stored in this format. The `--test` command can also include a `--use-binary-tokens` flag which will run the GDScript tests with the binary format instead of the regular source code by converting them in-memory before the test runs.
* Merge pull request #83039 from KoBeWi/it's_always_the_cacheRémi Verschelde2023-11-101-10/+15
|\ | | | | | | Fix GDScript cache assigning UID as scene path
| * Fix GDScript cache assigning UID as scene pathkobewi2023-10-091-10/+15
| |
* | Fix `GDScriptCache::get_full_script` eating parsing errors because of early exitMatthew Borkowski2023-10-181-1/+2
|/ | | | Fixes #75545.
* [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-261-1/+1
|
* GDScript: Add static analysis error reporting in ↵ocean (they/them)2023-07-071-1/+4
| | | | GDScriptCache::get_full_script()
* Merge pull request #76954 from Rindbee/return-null-on-fail-load-scriptRémi Verschelde2023-06-191-1/+5
|\ | | | | | | Returns null and does not cache when the source code of the script fails to load
| * Returns null and does not cache when the source code of the script fails to loadRindbee2023-06-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | This usually means that an `ERR_FILE*` error occurred. Previously, using `GDScriptCache::get_full_script()` would ignore errors during loading. Now, all errors are not ignored. Judging in which period the error occurred, it can be judged based on the return value: 1. null + err : Error during script loading (load_source_code()). 2. script + err: Error during script parsing.
* | Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-2/+3
|/ | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* Add support for static variables in GDScriptGeorge Marques2023-04-271-0/+10
| | | | | | | | | | Which allows editable data associated with a particular class instead of the instance. Scripts with static variables are kept in memory indefinitely unless the `@static_unload` annotation is used or the `static_unload()` method is called on the GDScript. If the custom function `_static_init()` exists it will be called when the class is loaded, after the static variables are set.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Cache script when reloading even if there's errors.Adam Scott2023-01-011-7/+1
|
* GDScript: Allow out of order member resolutionrune-scape2022-12-141-4/+10
|
* Fix `GDScriptCache::clear()` crash when clearing packed scenesAdam Scott2022-12-101-4/+2
|
* Fix `GDScriptCache` to not remove scripts/scenes individually when clearingAdam Scott2022-12-101-2/+20
|
* Add missing packed scene cache clear inside `GDScriptCache::clear()`Adam Scott2022-12-071-0/+5
|
* Move GDScript uninitialization to `GDScriptLanguage::finalize()`Adam Scott2022-12-061-11/+19
| | | | | Co-authored-by: Ricardo Buring <ricardo.buring@gmail.com> Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
* Merge pull request #69224 from adamscott/fix-PackedScene-reload_from_fileRémi Verschelde2022-11-281-1/+0
|\ | | | | | | Add `PackedScene::reload_from_file()` override
| * Add PackedScene::reload_from_file() overrideAdam Scott2022-11-281-1/+0
| |
* | Fix cyclic reference base being loaded but not valid (which is ok)Adam Scott2022-11-271-1/+1
|/
* Fix singleton scene cyclic loadingAdam Scott2022-11-251-25/+0
|
* Merge pull request #68987 from ↵Rémi Verschelde2022-11-221-0/+25
|\ | | | | | | | | | | adamscott/fix-godot#61386-autoload-scenes-implicit-types Fix autoload scenes implicit types
| * [godot#61386] Fix autoload scenes implicit typesAdam Scott2022-11-211-0/+25
| |
* | [godot#68971] Fetch cached scene if it exists in `GDScriptCache`Adam Scott2022-11-211-1/+6
|/
* Merge pull request #68929 from adamscott/add-rename-checkRémi Verschelde2022-11-201-1/+1
|\ | | | | | | Add `GDScriptCache::move_script` check before executing logic
| * Add move_script check before executing logicAdam Scott2022-11-201-1/+1
| |
* | GDScript: Cache scripts after parse errorrune-scape2022-11-201-4/+2
|/
* Fix empty text in editorrune-scape2022-11-201-5/+6
|
* Fix cyclic references in GDScript 2.0Adam Scott2022-11-181-13/+137
|
* GDScript compiler subclass bugfixesRune2022-11-131-7/+33
|
* Load/update GDScript from disk on load if cache mode is CACHE_MODE_IGNORERindbee2022-09-241-4/+10
|
* Fix for recurring check in gdscript_cach.cppVoylin2022-09-111-3/+1
|
* Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg2022-07-071-1/+1
| | | | filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
* Add a new HashSet templatereduz2022-05-201-3/+3
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-161-2/+2
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-2/+1
|
* GDScript cache crashfix.K. S. Ernest (iFire) Lee2022-01-221-1/+4
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Revert "Fix auto reload scripts on external change"Rémi Verschelde2021-12-101-9/+1
|
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-3/+3
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Merge pull request #49473 from cptchuckles/fix-auto-reload-scriptsRémi Verschelde2021-12-091-1/+9
|\
| * Fix auto reload scripts on external changeJonathan Gollnick2021-09-021-1/+9
| |
* | GDScript: Set status on parsing steps beforehandGeorge Marques2021-10-061-4/+4
| | | | | | | | | | To avoid potential dependency cycles. If any happens it will not get into infinite recursion anymore and errors will cascade later on.
* | Avoid crash after a parsing error in GDScriptPedro J. Estébanez2021-09-111-9/+3
|/
* Fix crash when failing to load script from cachePouleyKetchoupp2021-08-161-0/+2
|
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-2/+2
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.