summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add error message when a GDScript resource fails to load.ocean (they/them)2023-07-311-0/+5
| | | | | | | Currently, GDScripts who are only loaded through `ResourceLoader::load()`, like Autoloads, do not have a pathway to announce there is an error in their code. This contributes to significant confusion in error projects when autoloads are involved. At least partially closes #78230.
* Support threads in the script debuggerJuan Linietsky2023-07-261-23/+18
| | | | | | | | | | * This implementation adds threads on the side of the client (script debugger). * Some functions of the debugger are optimized. * The profile is also now thread safe using atomics. * The editor can switch between multiple threads when debugging. This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs. This means that, now, the editor can receive multiple threads entering debug mode at the same time.
* GDScript: solve `_populate_class_members()` cyclic dependency problemocean (they/them)2023-07-081-1/+1
|
* GDScript: Remove unnecessary name check in `_get_property_list()`Danil Alexeev2023-06-221-3/+5
|
* Fix errors destroying script with static variablesjpcerrone2023-06-211-1/+1
| | | | | | | Fixes #78376 After #78138 'script_list' is now cleared in 'GDScriptLanguage::finish' Because of that, we can safely remove the removal from that list that happens on 'GDScript::~GDScript'.
* GDScript: Fix `_get_script_name()` function collision for SCU buildDanil Alexeev2023-06-201-2/+26
|
* Merge pull request #77129 from dalexeev/gds-fix-static-var-bugs-part-1Rémi Verschelde2023-06-191-102/+177
|\ | | | | | | GDScript: Fix some bugs with static variables and functions
| * GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-102/+177
| |
* | Merge pull request #76954 from Rindbee/return-null-on-fail-load-scriptRémi Verschelde2023-06-191-10/+2
|\ \ | |/ |/| | | 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-10/+2
| | | | | | | | | | | | | | | | | | | | | | 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-10/+14
|/ | | | | | | | | | | | | | | | | | | | 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
* Clear SelfList when destroying GDScriptLanguagekobewi2023-06-121-0/+2
|
* GDScript: Fix template_debug compilation with TOOLS/DEBUG macro mismatchRémi Verschelde2023-04-281-2/+2
|
* Add support for static variables in GDScriptGeorge Marques2023-04-271-6/+121
| | | | | | | | | | 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.
* Improve and fix GDScript documentation generation & behaviorocean (they/them)2023-04-211-166/+11
| | | | | | Removes documentation generation (docgen) from the GDScript compiler to its own file. Adds support for GDScript enums and signal parameters and quite a few other assorted fixes and improvements.
* GDScript: Change parser representation of class extendsDmitrii Maganov2023-03-131-3/+3
|
* Prevent cache corruption when saving resources in the editorYuri Sizov2023-03-081-2/+4
|
* Remove unused `ScriptLanguage` methodsvoidedWarranties2023-02-261-5/+0
|
* Merge pull request #72867 from vnen/gdscript-limit-call-depthYuri Sizov2023-02-171-1/+1
|\ | | | | GDScript: Add limit to call depth
| * GDScript: Add limit to call depthGeorge Marques2023-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | The hard limit is set at 2048 depth which seems sensible between legitimate recursive calls while still avoiding a crash because of a stack overflow in most of the cases. Note that it is still possible to reach the stack limit and get an overflow before reaching a call depth. This is intended as a half-way measure to stop crashing in most cases, since there's no reliable nor portable way to check the amount of stack memory left.
* | GDScript: Remove `treat_warnings_as_errors` project settingDanil Alexeev2023-02-101-1/+0
|/
* Merge pull request #65910 from KoBeWi/gdsusRémi Verschelde2023-02-031-2/+12
|\ | | | | Cleanup function state connections when destroying instance
| * Cleanup function state connections when destroying instancekobewi2022-12-021-2/+12
| | | | | | | | Co-authored-by: Adam Scott <ascott.ca@gmail.com>
* | Merge pull request #72444 from reduz/fix-global-class-parsingRémi Verschelde2023-01-311-13/+83
|\ \ | | | | | | | | | Fix global script class parsing.
| * | Fix global script class parsing.Juan Linietsky2023-01-311-13/+83
| | | | | | | | | | | | | | | | | | | | | | | | * Broke with #72226 * Restored previous version of the code, made it even more error tolerant. * Added a warning to **not** change the code. Fixes #72226.
* | | GDScript: Fix issues with typed arraysDmitrii Maganov2023-01-311-35/+14
|/ /
* | GDScript: Avoid calling non-static methods on native classesGeorge Marques2023-01-281-1/+1
| |
* | GDScript: Allow constant expressions in annotationsDanil Alexeev2023-01-251-79/+21
| |
* | Merge pull request #71687 from reduz/support-script-class-name-in-efsRémi Verschelde2023-01-211-0/+4
|\ \ | | | | | | | | | Support script global resource name in EditorFileSystem
| * | Support script global resource name in EditorFileSystemJuan Linietsky2023-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Works for binary and text files. * Makes EditorQuickOpen work with custom resources again. * Information is cached and easily accessible. Properly fixes #66179. Supersedes #66215 and supersedes #62417 **WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
* | | Remove references to compiled GDScript in exportGeorge Marques2023-01-201-18/+1
|/ / | | | | | | | | This feature was removed from GDScript so it should not be present on the interface nor in the saved export presets.
* | Add default virtual `gdscript://` path to `GDScript` instancesAdam Scott2023-01-121-1/+3
| |
* | Resolve `GDScript::clear()` `heap-use-after-free` ASAN errorsAdam Scott2023-01-071-32/+45
| |
* | Merge pull request #68429 from KoBeWi/PropertySettingsRémi Verschelde2023-01-061-6/+2
|\ \ | | | | | | Add PropertyInfo overload for GLOBAL_DEF
| * | Add PropertyInfo overload for GLOBAL_DEFkobewi2022-12-111-6/+2
| | |
* | | 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".
* | | Merge pull request #70503 from rune-scape/inner-class-docsRémi Verschelde2023-01-031-0/+4
|\ \ \ | | | | | | | | | | | | Inner classes get their docs back
| * | | Inner classes get their docs backrune-scape2022-12-231-0/+4
| | | |
* | | | Unify GDScriptAnalyzer in-editor and runtime autoload checksocean (they/them)2022-12-201-0/+10
|/ / /
* | | Merge pull request #70000 from rune-scape/find-more-classesRémi Verschelde2022-12-171-10/+16
|\ \ \ | | | | | | | | GDScript: Fix built-in script `find_class` bugs
| * | | GDScript: Fix built-in script and other `find_class` bugsrune-scape2022-12-151-10/+16
| | | |
* | | | Fix `GDScript::_get_gdscript_from_variant()` crashAdam Scott2022-12-151-6/+1
|/ / / | | | | | | | | | | | | The crash would happen, theoretically, when getting the type of a invalid variant.
* / / Add GDScript member initializer implicit type conversionocean (they/them)2022-12-111-0/+1
|/ /
* | Remove debug macro for GDScriptLanguage script_listAdam Scott2022-12-101-4/+0
| |
* | Merge pull request #69467 from rune-scape/rune-subclass-script-pathRémi Verschelde2022-12-101-6/+12
|\ \ | | | | | | GDScript: Fix subclass script path issues
| * | GDScript: Fix subclass script path issuesrune-scape2022-12-011-6/+12
| |/
* / Move GDScript uninitialization to `GDScriptLanguage::finalize()`Adam Scott2022-12-061-30/+36
|/ | | | | Co-authored-by: Ricardo Buring <ricardo.buring@gmail.com> Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
* Fix cyclic references in GDScript 2.0Adam Scott2022-11-181-31/+254
|
* GDScript compiler subclass bugfixesRune2022-11-131-74/+66
|
* Fix built-in script path of GDScriptWei Guo2022-10-251-0/+5
|