summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2021-04-08Reduce number of addressing modes in GDScript VMGeorge Marques
There's now only 3 addressing modes: stack, constant, and member. Self, class, and nil are now present respectively in the first 3 stack slots. Global and class constants are moved to local constants when compiling. Named globals is only present on editor to use on tool singletons, so its use now emits a new instruction to copy the global to the stack. This allow us to further optimize the VM later by embedding the addressing modes in the instructions themselves, which is better done with less permutations.
2021-04-07Merge pull request #47648 from Blackiris/fix-gdscript-editor-hangsRémi Verschelde
Fix infinite loop when guessing argument type from parent class
2021-04-06Fix stack overflow in setterJulien Nguyen
2021-04-05Fix infinite loop when guessing argument type from parent classJulien Nguyen
2021-04-05Merge pull request #47569 from vnen/gdscript-typed-returnRémi Verschelde
GDScript: Properly validate return type
2021-04-05GDScript: Properly validate return typeGeorge Marques
When the type cannot be validated at compile time, the runtime must do a check to ensure type safety is kept, as the code might be assuming the return type is correct in another place, leading to crashes if the contract is broken.
2021-04-05Style: Apply clang-tidy's `readability-braces-around-statements`Rémi Verschelde
2021-04-05Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde
2021-04-04Fix GDScript variables addresses getting mixedJulien Nguyen
2021-04-01Merge pull request #46991 from madmiraal/rename-invert-reverseRémi Verschelde
Rename Array.invert() to Array.reverse()
2021-03-30Merge pull request #47131 from vnen/gdscript-export-fixRémi Verschelde
Fix a few issues with @export in GDScript
2021-03-30Merge pull request #47492 from vnen/gdscript-typed-arraysRémi Verschelde
GDScript: Fix array type check on constants
2021-03-30GDScript: Fix array type check on constantsGeorge Marques
They mistakenly pointing to the wrong union member (variable instead of constant).
2021-03-30GDScript: Implement export of typed arraysGeorge Marques
2021-03-30GDScript: Allow export of enum variablesGeorge Marques
Also fix the enum type in variables to be integer.
2021-03-30GDScript: Show error on invalid initializer expressionGeorge Marques
2021-03-30Move GDSript annotation application after type-checkingGeorge Marques
This ensures that annotations that rely on the datatype (such as @export) can validated it timely, allowing compound expressions instead of only literal values.
2021-03-29Merge pull request #46830 from vnen/gdscript-typed-arraysRémi Verschelde
GDScript typed arrays
2021-03-29Add typed arrays to GDScriptGeorge Marques
- Use `Array[type]` for type-hints. e.g.: `var array: Array[int] = [1, 2, 3]` - Array literals are typed if their storage is typed (variable asssignment of as argument in function all). Otherwise they are untyped.
2021-03-23Merge pull request #44398 from RevoluPowered/unit-tests-for-export-templatesRémi Verschelde
Add unit tests for export templates
2021-03-22Add unit tests for export templatesGordon MacPherson
2021-03-21Rename Array.invert() to Array.reverse()Marcel Admiraal
Does the same internally for List and Vector<>, which includes all PackedArray types.
2021-03-19Fix missing quote in multiline GDScript stringAlex Hirsch
fix #47117
2021-03-14Merge pull request #46936 from DavidSichma/match_temp_headerRémi Verschelde
Fixed match test expression for temporaries
2021-03-12Fixed match test expression for temporariesDavid Sichma
Fixed that a potentially popped temporary was used for the value in match statements.
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-10Implement Navigation layersGilles Roudière
2021-03-02Fixed match for expression patternDavid Sichma
equality comparison now writes to right target address
2021-03-02Merge pull request #42029 from ThakeeNathees/export-type-infer-bug-fixGeorge Marques
GDScript export array/dictionary type infer bug fix
2021-03-02Merge pull request #46559 from asmaloney/fix-code-completionRémi Verschelde
Script editor: Fix two special cases not being checked in code completion
2021-03-02Merge pull request #41897 from strank/not-in-conditional-doneRémi Verschelde
Add a "not in" operator to GDScript.
2021-03-01[script editor] Fix two special cases not being checked in code completionAndy Maloney
When this code was changed for 4.0, a "break" statement inside a for loop in 3.x was changed to "return". This means that the two special cases (autoloads and input actions) are never checked. Removing the return lets these work properly in the editor. (Also reorder conditionals to short-circuit and avoid expensive methods.)
2021-02-25Merge pull request #46379 from ThakeeNathees/signal-idf-not-found-fixRémi Verschelde
GDScript: False positive "Identifier not found" error on signals fixed
2021-02-25Merge pull request #40276 from Taywee/masterRémi Verschelde
remove invalid codeLensProvider value from lsp
2021-02-24false positive "Identifier not found" error or signals fixedThakee Nathees
2021-02-18Fixed Invalid function bindings #46135Vignesh1-art
Fixed GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded
2021-02-11Improve resource load cachereduz
-Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
2021-01-31Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde
Modernize Thread
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-28Unify URI encoding/decoding and add to C#Aaron Franke
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-26Fix highlight color for class attributes that are also keywordsLucas Van Mol
2021-01-11Merge pull request #43176 from mateosss/crash-uninit-constRémi Verschelde
Fix crash by adding nullcheck for uninitialized constants
2021-01-11Merge pull request #43980 from gvekan/fix-missing-function-hintsRémi Verschelde
Fix missing function hints
2021-01-11Merge pull request #44104 from nekomatata/coroutine-await-fixRémi Verschelde
Fix error when calling coroutine with await in _ready
2021-01-11Merge pull request #44005 from RandomShaper/gds_needless_checkRémi Verschelde
Remove useless check in GDScript
2021-01-11Merge pull request #44604 from lyuma/gdscript_dictionary_crashRémi Verschelde
GDScript: Fix crash when iterating through empty dictionary.
2021-01-11Merge pull request #44719 from ThakeeNathees/assert-argument-bug-fixedRémi Verschelde
GDScript assert message parsing bug fixed
2021-01-11Merge pull request #44672 from ThakeeNathees/array-dict-const-fold-bug-fixRémi Verschelde
Array/Dictionary marked as not safe to const fold
2021-01-11Merge pull request #44818 from ThakeeNathees/const-crash-fixRémi Verschelde
GDScript crash at incomplete const bug fix