summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.cpp
AgeCommit message (Collapse)Author
2021-10-08GDScript: Report property type errorsZuBsPaCe
Inline getters & setters are now FunctionNodes. Their names are set in the parser, not in the compiler. GDScript-Analyzer will now run through getter and setter. Also report wrong type or signature errors regarding getset properties. Added GDScript tests for getters and setters. #53102
2021-10-04GDScript fix wrong base class assignmentBrian Semrau
2021-10-04GDScript: Fix member assignment with operationGeorge Marques
It was wrongly updating the assigned value with the result of the operation.
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-29GDScript: Fix assignment with operation for propertiesGeorge Marques
2021-09-15Merge pull request #49765 from ↵George Marques
Blackiris/fix-assignment-with-operator-on-type-member Fix assignment with operator on type member
2021-09-15GDScript: Allow string keys on Lua-style dictionariesGeorge Marques
Which is useful when the key isn't a valid identifier, such as keys with spaces or numeric keys.
2021-09-13Merge pull request #52323 from vnen/gdscript-singleton-interdependence-fixRémi Verschelde
Fix loading of interdependent autoloads
2021-09-07[Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli
Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-02Check for GDScript member and class naming conflicts in a variety of conditions.SaracenOne
2021-09-01GDScript: Fix loading of interdependent autoloadsGeorge Marques
Move the autoload resolution to runtime by loading it into the stack with an extra instruction. This allows an autoload to use another autoload singleton independent of load order.
2021-08-21Fix assignment with operator on type memberJulien Nguyen
2021-08-18GDScript: Fix memory leak when using self class as typeGeorge Marques
2021-08-09Fix infinite loop when creating a newly inherited GdScript fileJulien Nguyen
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-20[Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli
- Move the "sync" property for RPCs to RPCConfig. - Unify GDScript annotations into a single one: - `@rpc(master)` # default - `@rpc(puppet)` - `@rpc(any)` # former `@remote` - Implement three additional `@rpc` options: - The second parameter is the "sync" option (which also calls the function locally when RPCing). One of "sync", "nosync". - The third parameter is the transfer mode (reliable, unreliable, ordered). - The third parameter is the channel (unused for now).
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-10Fix regression from 160c260 causing export of non-@export properties.Lyuma
2021-06-01Merge pull request #49067 from JFonS/fix_gcc_warningsRémi Verschelde
Fix some warnings raised by GCC-11.1
2021-05-26GDScript: Use analyzer data to decide assignment conversionGeorge Marques
Since there might be tricky cases in the analyzer (in the case of unsafe lines) which would need to be properly checked again. Instead, this splits the code generator in two functions and use information set by the analyzer to tell which function to use, without a need to re-check.
2021-05-25Fix some warnings raised by GCC-11.1jfons
2021-05-17Merge pull request #48347 from Blackiris/fix-temporary-key-not-releasedGeorge Marques
GDScript: Fix temporary value not released when used as a dictionary key
2021-05-16GDScript: Add support for builtin static method callsGeorge Marques
2021-05-06Fix temporary value not released when used as a dictionary keyJulien Nguyen
2021-04-28GDScript: Implement lambdas compilation and runtimeGeorge Marques
2021-04-23GDScript: Make sure Lua-style dicts use StringName as keysGeorge Marques
2021-04-23GDScript: Fix resolution of dictionary keysGeorge Marques
There was a mixup between String and StringName keys. Now they're clearly separated. This also means you have to consider which type you're using for the dictionary keys and how you are accessing them.
2021-04-14GDScript: Pool temporary values by type on the stackGeorge Marques
So the stack slots perform less type changes, which is useful for future optimizations.
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-06Fix stack overflow in setterJulien Nguyen
2021-04-04Fix GDScript variables addresses getting mixedJulien Nguyen
2021-03-30GDScript: Allow export of enum variablesGeorge Marques
Also fix the enum type in variables to be integer.
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-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-02Fixed match for expression patternDavid Sichma
equality comparison now writes to right target address
2021-02-24false positive "Identifier not found" error or signals fixedThakee Nathees
2021-01-11Merge pull request #44104 from nekomatata/coroutine-await-fixRémi Verschelde
Fix error when calling coroutine with await in _ready
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-17Fix error when calling coroutine with await in _readyPouleyKetchoupp
The code paths for calling async functions seemed to be missing in some cases, causing a debug break and false positive error.
2020-12-15Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde
GDScript: Refactor builtin functions
2020-12-06Fix base script not initialized properly in some casesPouleyKetchoupp
Storing script references to pointer only in result.script_type could lead to losing the last reference, causing further conversions from Script* to Ref<Script> to fail. Now result.script_type_ref is always set first, and then cleared in the specific case of the script being the owner, to avoid cyclic reference issues.
2020-12-02Merge pull request #41095 from ThakeeNathees/GDScript-DocumentationRémi Verschelde
GDScript(2.0) Documentation generation system
2020-12-02Merge pull request #41773 from ThakeeNathees/default-argument-override-buf-fixGeorge Marques
GDScript default argument override bug fix
2020-12-02Refactor DocData into core and editor (DocTools) partsThakee Nathees
2020-11-29Documentation generation for GDScriptThakee Nathees
- ClassDoc added to GDScript and property reflection data were extracted from parse tree - GDScript comments are collected from tokenizer for documentation and applied to the ClassDoc by the GDScript compiler - private docs were excluded (name with underscore prefix and doesn't have any doc comments) - default values (of non exported vars), arguments are extraced from the parser - Integrated with GDScript 2.0 and new enums were added. - merge conflicts fixed