summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_compiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #49765 from ↵George Marques2021-09-151-1/+1
|\ | | | | | | | | Blackiris/fix-assignment-with-operator-on-type-member Fix assignment with operator on type member
| * Fix assignment with operator on type memberJulien Nguyen2021-08-211-1/+1
| |
* | GDScript: Allow string keys on Lua-style dictionariesGeorge Marques2021-09-151-1/+1
| | | | | | | | | | Which is useful when the key isn't a valid identifier, such as keys with spaces or numeric keys.
* | Merge pull request #52323 from vnen/gdscript-singleton-interdependence-fixRémi Verschelde2021-09-131-3/+16
|\ \ | | | | | | Fix loading of interdependent autoloads
| * | GDScript: Fix loading of interdependent autoloadsGeorge Marques2021-09-011-3/+16
| |/ | | | | | | | | | | 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.
* | [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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".
* | Check for GDScript member and class naming conflicts in a variety of conditions.SaracenOne2021-09-021-22/+7
|/
* GDScript: Fix memory leak when using self class as typeGeorge Marques2021-08-181-2/+1
|
* Fix infinite loop when creating a newly inherited GdScript fileJulien Nguyen2021-08-091-1/+1
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-2/+1
|
* [Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli2021-07-201-5/+4
| | | | | | | | | | | | | | | | - 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).
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-1/+1
|
* Fix regression from 160c260 causing export of non-@export properties.Lyuma2021-06-101-2/+3
|
* Merge pull request #49067 from JFonS/fix_gcc_warningsRémi Verschelde2021-06-011-1/+1
|\ | | | | Fix some warnings raised by GCC-11.1
| * Fix some warnings raised by GCC-11.1jfons2021-05-251-1/+1
| |
* | GDScript: Use analyzer data to decide assignment conversionGeorge Marques2021-05-261-3/+15
|/ | | | | | | 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.
* Merge pull request #48347 from Blackiris/fix-temporary-key-not-releasedGeorge Marques2021-05-171-0/+3
|\ | | | | GDScript: Fix temporary value not released when used as a dictionary key
| * Fix temporary value not released when used as a dictionary keyJulien Nguyen2021-05-061-0/+3
| |
* | GDScript: Add support for builtin static method callsGeorge Marques2021-05-161-27/+32
|/
* GDScript: Implement lambdas compilation and runtimeGeorge Marques2021-04-281-23/+66
|
* GDScript: Make sure Lua-style dicts use StringName as keysGeorge Marques2021-04-231-2/+2
|
* GDScript: Fix resolution of dictionary keysGeorge Marques2021-04-231-2/+2
| | | | | | 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.
* GDScript: Pool temporary values by type on the stackGeorge Marques2021-04-141-2/+2
| | | | | So the stack slots perform less type changes, which is useful for future optimizations.
* Reduce number of addressing modes in GDScript VMGeorge Marques2021-04-081-3/+6
| | | | | | | | | | | | | | 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.
* Fix stack overflow in setterJulien Nguyen2021-04-061-0/+2
|
* Fix GDScript variables addresses getting mixedJulien Nguyen2021-04-041-0/+4
|
* GDScript: Allow export of enum variablesGeorge Marques2021-03-301-7/+2
| | | | Also fix the enum type in variables to be integer.
* Add typed arrays to GDScriptGeorge Marques2021-03-291-6/+48
| | | | | | | | - 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.
* Merge pull request #46936 from DavidSichma/match_temp_headerRémi Verschelde2021-03-141-4/+4
|\ | | | | Fixed match test expression for temporaries
| * Fixed match test expression for temporariesDavid Sichma2021-03-121-4/+4
| | | | | | | | | | Fixed that a potentially popped temporary was used for the value in match statements.
* | Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|/
* Fixed match for expression patternDavid Sichma2021-03-021-1/+1
| | | | equality comparison now writes to right target address
* false positive "Identifier not found" error or signals fixedThakee Nathees2021-02-241-22/+45
|
* Merge pull request #44104 from nekomatata/coroutine-await-fixRémi Verschelde2021-01-111-2/+10
|\ | | | | Fix error when calling coroutine with await in _ready
| * Fix error when calling coroutine with await in _readyPouleyKetchoupp2020-12-171-2/+10
| | | | | | | | | | The code paths for calling async functions seemed to be missing in some cases, causing a debug break and false positive error.
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 🎆
* | Rename empty() to is_empty()Marcel Admiraal2020-12-281-2/+2
|/
* Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde2020-12-151-11/+14
|\ | | | | GDScript: Refactor builtin functions
| * GDScript: Refactor builtin functionsGeorge Marques2020-11-261-11/+14
| | | | | | | | | | | | | | | | | | | | | | They are now called "utility functions" to avoid confusion with methods of builtin types, and be consistent with the naming in Variant. Core utility functions are now available in GDScript. The ones missing in core are added specifically to GDScript as helpers for convenience. Some functions were remove when there are better ways to do, reducing redundancy and cleaning up the global scope.
* | Fix base script not initialized properly in some casesPouleyKetchoupp2020-12-061-5/+8
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #41095 from ThakeeNathees/GDScript-DocumentationRémi Verschelde2020-12-021-6/+69
|\ \ | | | | | | GDScript(2.0) Documentation generation system
| * | Refactor DocData into core and editor (DocTools) partsThakee Nathees2020-12-021-3/+3
| | |
| * | Documentation generation for GDScriptThakee Nathees2020-11-291-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Merge pull request #41773 from ThakeeNathees/default-argument-override-buf-fixGeorge Marques2020-12-021-1/+1
|\ \ \ | |/ / |/| | GDScript default argument override bug fix
| * | GDScript default argument override bug fixThakee Nathees2020-11-281-1/+1
| | | | | | | | | | | | Fix: #41766
* | | GDScript: Improve handling of operatorsGeorge Marques2020-11-261-13/+13
| |/ |/| | | | | | | | | | | | | - Use the new functions in Variant to determine the validity and resulting type of operators. - Split the operator function in codegen between binary and unary, since the unary ones have now a special requirement of having the second argument to be the NIL type when requesting info.
* | Merge pull request #43856 from vnen/gdscript-some-fixesRémi Verschelde2020-11-251-1/+1
|\ \ | | | | | | A couple of GDScript fixes
| * | GDScript: Fix return of cast expression on compilationGeorge Marques2020-11-251-1/+1
| | | | | | | | | | | | It was mistakenly returning the source instead of the result.