summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_compiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Call setter on simple setter chain without getterGeorge Marques2024-07-091-0/+13
| | | | | Fixes a bug where a member variable was being set directly before calling the setter.
* GDScript: partially allow some functions on invalid scriptsrune-scape2024-06-021-5/+3
| | | | | + always default initialize static variables + dont invalidate script when dependant scripts don't compile/resolve
* GDScript: fix segfault on invalid scriptrune-scape2024-05-171-1/+5
|
* Use Core/Scene stringnames consistentlykobewi2024-05-131-2/+3
|
* Add shorthand for using singleton string nameskobewi2024-05-111-1/+1
|
* Merge pull request #84148 from KANAjetzt/fix_crash_take_over_path_named_classRémi Verschelde2024-05-071-0/+3
|\ | | | | | | Fix crash when extending taken-over named class
| * Fix crash when extending taken-over named classKai2024-05-071-0/+3
| | | | | | | | Added error handling in `_prepare_compilation()` to address cases where the `base_type` cannot be found, preventing a crash.
* | Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-3/+3
|/ | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* GDScript: Perform validated calls with static methodsGeorge Marques2024-04-251-1/+9
| | | | | | When the types are validated at compile time, this type of call runs faster. It is already used for instance methods, this adds this optimization to native static methods as well.
* Merge pull request #89990 from dalexeev/gds-reset-uninit-local-varsRémi Verschelde2024-04-241-33/+41
|\ | | | | | | GDScript: Fix uninitialized local variables not being reset
| * GDScript: Fix uninitialized local variables not being resetDanil Alexeev2024-03-301-33/+41
| |
* | [GDScript] Clean up some unused codeA Thousand Ships2024-04-161-4/+2
| |
* | Don't pass `self` when calling a static function from a non-static contextJamie Hill-Daniel2024-04-041-1/+1
|/
* Merge pull request #86730 from reduz/64-bit-cowdataRémi Verschelde2024-01-191-1/+1
|\ | | | | Promote CowData to 64 bits
| * Promote CowData to 64 bitsJuan Linietsky2024-01-191-1/+1
| | | | | | | | Fixes a lot of bugs, please help me fill the list.
* | Allow `free()` to be used as CallableGeorge Marques2024-01-181-1/+2
|/ | | | | | | This method is registered in a special way so ClassDB doesn't naturally know about its existence. Here it is hardcoded if any other option fail to check if it is about the `free()` method and, if so, say it exists and return a Callable.
* Merge pull request #86569 from rune-scape/rune-fix-lambda-hotswap2Rémi Verschelde2024-01-051-19/+8
|\ | | | | | | GDScript: Lambda hotswap fixes
| * GDScript: Lambda hotswap fixesrune-scape2024-01-041-19/+8
| |
* | GDScript: Fix accessing static function as `Callable` in static contextDanil Alexeev2023-12-121-2/+6
|/
* Change container_element_type to vector containerThaddeus Crews2023-12-051-10/+10
|
* GDScript: Lambda hot reloadingrune-scape2023-10-171-0/+147
| | | | Co-authored-by: Adam Scott <ascott.ca@gmail.com>
* GDScript: Replace ptrcalls on MethodBind to validated callsGeorge Marques2023-10-061-10/+10
| | | | | | | | | This improves the performance of typed calls to engine methods when the argument types are exact. Using validated calls delegate more of the work the core instead of doing argument unpacking in the VM. It also does not need different instructions for each return type, simplifying the code.
* Merge pull request #82186 from dalexeev/gds-fix-property-duplicationYuri Sizov2023-09-281-1/+1
|\ | | | | | | GDScript: Fix duplication of inherited script properties
| * GDScript: Fix duplication of inherited script propertiesDanil Alexeev2023-09-231-1/+1
| |
* | Merge pull request #80085 from vnen/gdscript-pattern-guardsYuri Sizov2023-09-281-0/+20
|\ \ | | | | | | | | | GDScript: Implement pattern guards for match statement
| * | GDScript: Implement pattern guards for match statementGeorge Marques2023-09-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within a match statement, it is now possible to add guards in each branch: var a = 0 match a: 0 when false: print("does not run") 0 when true: print("but this does") This allows more complex logic for deciding which branch to take.
* | | Merge pull request #75988 from dalexeev/gds-unsafe-call-argumentYuri Sizov2023-09-271-5/+2
|\ \ \ | |/ / |/| | | | | GDScript: Improve call analysis
| * | GDScript: Improve call analysisDanil Alexeev2023-09-211-5/+2
| |/ | | | | | | | | | | * Add missing `UNSAFE_CALL_ARGUMENT` warning. * Fix `Object` constructor. * Display an error for non-existent static methods.
* | [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-261-1/+1
| |
* | GDScript: Fix crash with `GDScriptNativeClass`Danil Alexeev2023-09-251-2/+13
|/
* Merge pull request #81605 from dalexeev/gds-fix-some-lambda-bugsRémi Verschelde2023-09-161-5/+32
|\ | | | | | | GDScript: Fix some lambda bugs
| * GDScript: Fix some lambda bugsDanil Alexeev2023-09-141-5/+32
| |
* | GDScript: Fix compilation of expressions compiling other classesocean (they/them)2023-09-121-1/+2
|/ | | | | This PR is part of ongoing work on fixing cyclic dependencies in the GDScript compiler.
* Merge pull request #81201 from anvilfolk/rpcRémi Verschelde2023-09-121-8/+24
|\ | | | | | | GDScript: Fix subclass methods not inheriting RPC info
| * GDScript: fix subclass methods not inheriting RPC infoocean (they/them)2023-09-111-8/+24
| |
* | GDScript: Fix `get_*_list()` methods return incorrect infoDanil Alexeev2023-09-041-23/+26
|/
* Add a script method to get its class iconYuri Sizov2023-08-241-0/+1
| | | | Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
* GDScript: Add static typing for `for` loop variableDanil Alexeev2023-08-171-2/+2
|
* GDScript: Fix regression with native signal not foundDanil Alexeev2023-08-021-32/+34
|
* Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-belowYuri Sizov2023-07-311-156/+173
|\ | | | | | | GDScript: Fix bug with identifier shadowed below in current scope
| * GDScript: Fix bug with identifier shadowed below in current scopeDanil Alexeev2023-07-261-156/+173
| |
* | Merge pull request #78254 from dalexeev/gds-fix-property-group-name-conflictYuri Sizov2023-07-311-3/+4
|\ \ | |/ |/| | | GDScript: Fix conflict between property and group names
| * GDScript: Fix conflict between property and group namesDanil Alexeev2023-06-151-3/+4
| |
* | GDScript: solve `_populate_class_members()` cyclic dependency problemocean (they/them)2023-07-081-4/+9
| |
* | Merge pull request #77744 from dalexeev/gds-reset-block-locals-on-exitRémi Verschelde2023-06-211-7/+28
|\ \ | | | | | | | | | GDScript: Reset local variables on exit from block
| * | GDScript: Reset local variables on exit from blockDanil Alexeev2023-06-021-7/+28
| |/
* | Merge pull request #78389 from rune-scape/rune-match-stringnamesRémi Verschelde2023-06-191-22/+55
|\ \ | | | | | | | | | GDScript: Strings and StringNames match
| * | GDScript: Strings and StringNames matchrune-scape2023-06-141-22/+55
| |/
* / GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-51/+121
|/
* Add support for static variables in GDScriptGeorge Marques2023-04-271-17/+211
| | | | | | | | | | 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.