7211e041df
Optimizations for GDScript VM
...
* Removed instruction argument count and instruction prefetching. This is now done on the fly. Reduces jumps.
* OPCODE_DISPATCH now goes directly to the next instruction, like in Godot 3.x.
I have nothing I can use to test performance, so if anyone wants to lend a hand and compare with master (both on debug and release), it would be very welcome.
2023-01-02 23:44:19 +01:00
c3f12592da
Cache script when reloading even if there's errors.
2023-01-01 14:09:17 -05:00
8a98110e3e
Merge pull request #62688 from cdemirer/assignments-and-types
...
Fixes https://github.com/godotengine/godot/issues/62650
2022-12-30 16:38:35 -03:00
bc739a4687
GDScript: Make using return of void function an error
...
Remove the `VOID_ASSIGNMENT` warning since those cases will be errors
now.
2022-12-30 13:35:38 -03:00
33afa82fb0
Merge pull request #70613 from vonagam/fix-enum-as-constant
...
Fixes https://github.com/godotengine/godot/issues/54018
Fixes https://github.com/godotengine/godot/issues/70213
Fixes https://github.com/godotengine/godot/issues/70495
2022-12-30 12:10:50 -03:00
0c15844551
GDScript: Error when assigning return value of void function
...
This also makes built-in method calls empty the return value when the
method is void, to avoid keeping returning a garbage value in such case.
2022-12-30 12:08:58 -03:00
056066ee95
GDScript: Fix false name conflicts for unnamed enums
2022-12-29 22:04:13 +02:00
9507f65e25
GDScript: Disallow return with value in void functions
2022-12-29 03:06:13 +02:00
b6aa4840d8
Fix usage of Enum as constant
2022-12-28 23:04:40 +02:00
f67aa3e46d
GDScript: Fix return type of constructor call for extending class
2022-12-27 23:02:12 +02:00
bbb21c3fd5
Fix type adjustment skipped when value is considered both not hard and not variant
2022-12-25 17:11:30 +03:00
60692b4e45
Implement export_multiline support for Array[String] and Dictionary
...
For arrays, specifically check if it's a string array and pass the
type on to the editor. For dictionaries, save the hint on the type and
use it later to draw the multiline editor, except for when adding a
string key, because that doesn't make much sense. All string values
however will be drawn as multiline.
2022-12-25 01:46:57 +03:00
1b77993257
Inner classes get their docs back
2022-12-23 17:39:24 -05:00
ae4c025da9
Merge pull request #69991 from rune-scape/cast-type
...
GDScript: Fix cast producing null
2022-12-23 09:22:21 +01:00
edfa1e8665
Merge pull request #70220 from adamscott/fix-external-enum
...
Fix external enums not assignable as constants
2022-12-23 09:20:50 +01:00
e1657bd2a7
Merge pull request #70440 from rune-scape/null-again
...
Fix GDScript analyzer null literal
2022-12-22 16:02:19 +01:00
801ef6614d
Merge pull request #70138 from anvilfolk/signals
...
Add MethodInfo to signal datatype
2022-12-22 16:02:11 +01:00
3228fdb88a
Fix GDScript analyzer null literal
2022-12-22 06:02:34 -05:00
abaedb54f1
Remove unused code paragraph from gdscript_editor.cpp/complete_code
2022-12-22 11:10:11 +03:00
d93dbab054
Add MethodInfo to signal datatype
2022-12-21 22:49:51 -05:00
fb418685a0
Unify GDScriptAnalyzer in-editor and runtime autoload checks
2022-12-20 19:01:28 -05:00
6590e1fd8a
Make script annotations placed before class_name and extends
2022-12-19 22:01:29 -06:00
78d296d7ca
Add a note for inst_to_dict to prevent using it on built-in instances
2022-12-19 19:12:00 +03:00
e780dc332a
Merge pull request #70275 from rune-scape/autoload-subscript-regression
...
Fix autoload subscript regression
2022-12-19 01:12:35 +01:00
9f6ad59da7
Fix autoload subscript regression
2022-12-18 18:36:41 -05:00
e9f3e7111f
Merge pull request #70237 from quentinguidee/refactor/fix-comma-instead-of-semicolon
...
Fix use of comma instead of semicolon
2022-12-18 16:55:10 +01:00
e0f1e02cc7
Fix use of comma instead of semicolon
...
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com >
2022-12-17 20:17:04 -05:00
7fc814f697
Fix external enums not assignable as constants
...
- Add external enums test
- Rename external inner class test
- Clean up `GDScriptAnalyzer::reduce_identifier_from_base` class
behavior
2022-12-17 17:59:38 -05:00
1bbb2b4159
Fix outer class lookup
2022-12-17 17:57:00 -05:00
2fefcf7329
Fix inner class constant assignment
2022-12-17 12:03:03 -05:00
8d52eea52b
Merge pull request #70000 from rune-scape/find-more-classes
...
GDScript: Fix built-in script `find_class` bugs
2022-12-17 16:30:34 +01:00
213c94b42f
Fix enum value regression
2022-12-16 22:48:25 -05:00
f18f2740da
Merge pull request #70131 from rune-scape/preload-type-regression
...
Fix preload type regression
2022-12-16 00:31:26 +01:00
2a341a6321
Fixed GDScript crashed when two consecutive unary operators are analysed
2022-12-16 04:45:53 +06:30
17e03c29d6
Fix preload type regression
2022-12-15 16:47:13 -05:00
e1c63fee86
GDScript: Fix built-in script and other find_class bugs
2022-12-15 14:56:23 -05:00
3684fd249e
Fix GDScript::_get_gdscript_from_variant() crash
...
The crash would happen, theoretically, when getting the type of a invalid
variant.
2022-12-15 12:29:01 -05:00
6debf86d51
Merge pull request #69471 from rune-scape/rune-out-of-order
...
GDScript: Out of order member resolution
2022-12-15 07:56:23 +01:00
2dfc6d5b69
GDScript: Allow out of order member resolution
2022-12-14 21:44:05 -05:00
7d0d6aa16f
GDScript: Fix cast producing null
2022-12-12 19:57:26 -05:00
08449ab16e
Fix String type compatibility being too permissive
2022-12-12 07:27:41 -05:00
1bfaa73e14
Merge pull request #69416 from anvilfolk/default-val
...
Add GDScript implicit type conversion for member variables with initializers
2022-12-11 23:58:22 +01:00
c8293a73b4
Add GDScript member initializer implicit type conversion
2022-12-11 16:55:02 -05:00
8410e7c9c6
Merge pull request #66733 from MewPurPur/unary-op-warnings
...
Fix unary op warnings never showing
2022-12-11 22:33:58 +01:00
7c6b659bd7
Add PropertyInfo overload for GLOBAL_DEF
2022-12-11 21:36:48 +01:00
05097ded0a
Merge pull request #69897 from poohcom1/fix/function-return-completion
...
Fix autocomplete on functions returning variants
2022-12-11 15:18:24 +01:00
98e1a2031d
Fix subscript of preloaded script
2022-12-11 07:59:43 -05:00
1845d927dc
Fix autocomplete on functions returning variants
...
- When guessing return type, check type hints before last return value
2022-12-11 14:17:27 +07:00
0139bd04b2
Fix GDScriptCache::clear() crash when clearing packed scenes
2022-12-10 19:10:12 -05:00
8f6f244680
Merge pull request #69587 from adamscott/fix-constant-base-typing-in-extended-class
...
Fix constants scope in extended or inner GDScript classes
2022-12-10 21:58:50 +01:00