summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_compiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make enum/constant binds 64-bit.bruvzg2022-06-171-1/+1
|
* Merge pull request #57151 from cdemirer/fix-match-array-dict-pattern-logic-errorGeorge Marques2022-06-141-49/+44
|\ | | | | Fix logic errors in match-statement Array & Dictionary patterns
| * Fix logic errors in match-statement Array & Dictionary Patternscdemirer2022-03-021-49/+44
| |
* | GDScript: Support `%` in shorthand for `get_node`George Marques2022-05-271-13/+1
| | | | | | | | | | | | The `%` is used in scene unique nodes. Now `%` can also be used instead of `$` for the shorthand, besides being allowed generally anywhere in the path as the prefix for a node name.
* | Fix crash when extending inner class in GDScriptYuri Rubinsky2022-05-181-8/+37
| |
* | Replace most uses of Map by HashMapreduz2022-05-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | * 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!
* | Add a new HashMap implementationreduz2022-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
* | Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-1/+1
| | | | | | | | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* | GDScript: Allow using self in lambdasGeorge Marques2022-04-241-1/+1
| |
* | GDScript: Fix method call on singletonsGeorge Marques2022-04-081-1/+3
| |
* | GDScript: Add support for static method calls in native typesGeorge Marques2022-04-061-0/+3
| |
* | Merge pull request #56830 from strank/parent-signalsRémi Verschelde2022-03-041-9/+14
|\ \
| * | Fix "Identifier not found" compiler error when accessing inherited signals ↵strank2022-02-111-9/+14
| |/ | | | | | | or functions as callables.
* | Merge pull request #58320 from mphe/fix_object_typed_arraysRémi Verschelde2022-03-041-0/+1
|\ \
| * | Fix typed arrays for Object based typesMarvin Ewald2022-02-191-0/+1
| |/ | | | | | | Fixes https://github.com/godotengine/godot/issues/53771.
* / Fix using typed arrays based on script classesSaracenOne2022-02-171-0/+2
|/
* GDScript: Treat enum values as int and enum types as dictionaryGeorge Marques2022-02-031-2/+13
| | | | | | | Since enums resolve to a dictionary at runtime, calling dictionary methods on an enum type is a valid use case. This ensures this is true by adding test cases. This also makes enum values be treated as ints when used in operations.
* GDScript: Consolidate behavior for assigning enum typesGeorge Marques2022-02-031-1/+0
| | | | | | | | | | This makes sure that assigning values to enum-typed variables are consistent. Same enum is always valid, different enum is always invalid (without casting) and assigning `int` creates a warning if there is no casting. There are new test cases to ensure this behavior doesn't break in the future.
* GDScript: Fix parsing default parameter values from function callsstrank2022-01-131-1/+1
|
* Assign member type when parsing setters to preventSaracenOne2022-01-111-0/+1
| | | | 'Compiler bug: unresolved assign' errors
* Merge pull request #56260 from ↵Rémi Verschelde2022-01-101-5/+7
|\ | | | | | | cdemirer/fix-type-mutation-upon-assignment-with-operation
| * Fix type mutation upon compound assignmentcdemirer2021-12-271-5/+7
| |
* | Merge pull request #56287 from ↵Rémi Verschelde2022-01-101-18/+14
|\ \ | | | | | | | | | cdemirer/fix-member-property-only-getter-cant-be-set
| * | Fix member properties with only getters can't be setcdemirer2021-12-281-18/+14
| |/
* | Merge pull request #56288 from ↵Rémi Verschelde2022-01-101-7/+32
|\ \ | | | | | | | | | cdemirer/fix-member-property-getter-dont-update-subscript-chain-root
| * | Fix member properties with getters don't update as subscript chain rootcdemirer2021-12-281-7/+32
| |/
* | Fix leak when function returning self typeGer Hean2022-01-101-1/+1
| | | | | | | | Leak is caused by cyclic reference
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-4/+4
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* GDScript: Make sure calls don't use return when not neededGeorge Marques2021-10-141-4/+7
|
* GDScript: Report property type errorsZuBsPaCe2021-10-081-64/+5
| | | | | | | | | 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
* GDScript fix wrong base class assignmentBrian Semrau2021-10-041-1/+3
|
* GDScript: Fix member assignment with operationGeorge Marques2021-10-041-8/+15
| | | | | It was wrongly updating the assigned value with the result of the operation.
* Use range iterators for `Map`Lightning_A2021-09-301-4/+4
|
* GDScript: Fix assignment with operation for propertiesGeorge Marques2021-09-291-15/+21
|
* 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
|