summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_disassembler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Fix `_get_script_name()` function collision for SCU buildDanil Alexeev2023-06-201-24/+8
|
* GDScript: Fix crash in disassemblerDanil Alexeev2023-06-191-25/+48
|
* GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-0/+30
|
* Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-2/+2
| | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* GDScript: Fix wrong increment for disassembly of lambdaGeorge Marques2023-02-271-2/+2
|
* GDScript: Rework type checkDmitrii Maganov2023-02-171-8/+41
|
* GDScript: Fix disassembly of typed array assignment and constructionDmitrii Maganov2023-02-011-3/+3
|
* Fix disassembly of OPCODE_CONSTRUCT_TYPED_ARRAY.Owen Anderson2023-01-311-1/+1
| | | | Found while inspecting the bytecode for godot-benchmarks.
* GDScript: Add names for disassembling function pointersGeorge Marques2023-01-231-9/+12
| | | | | | When instructions use function pointers, it's not possible to retrieve their original names in the disassembly. This stores the names in vectors (in debug builds) so they can be shown.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Optimizations for GDScript VMJuan Linietsky2023-01-021-5/+28
| | | | | | | * 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.
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-2/+2
| | | | change warnings=all to use /W4.
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+6
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* GDScript: Fix setter being called in chains for shared typesGeorge Marques2022-06-271-0/+8
| | | | | | | | | | | When a type is shared (i.e. passed by reference) it doesn't need to be called in a setter chain (e.g. `a.b.c = 0`) since it will be updated in place. This commit adds an instruction that jumps when the value is shared so it can be used to skip those cases and avoid redundant calls of setters. It also solves issues when assigning to sub-properties of read-only properties.
* GDScript: Allow using self in lambdasGeorge Marques2022-04-241-0/+19
|
* GDScript: Rename OPCODE_TYPE_ADJUST_TRANSFORM to have a 3D suffixAaron Franke2022-04-071-1/+1
|
* GDScript: Add support for static method calls in native typesGeorge Marques2022-04-061-0/+22
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* GDScript: Fix loading of interdependent autoloadsGeorge Marques2021-09-011-0/+8
| | | | | | 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.
* Rename Quat to QuaternionMarcel Admiraal2021-06-041-2/+2
|
* Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-1/+1
| | | Also _transform to _transform3d
* Fix typos with codespellRémi Verschelde2021-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* GDScript: Add support for builtin static method callsGeorge Marques2021-05-161-0/+22
|
* GDScript: Implement lambdas compilation and runtimeGeorge Marques2021-04-281-1/+20
|
* GDScript: Adjust type of temporaries when neededGeorge Marques2021-04-161-0/+45
|
* Reduce number of addressing modes in GDScript VMGeorge Marques2021-04-081-23/+19
| | | | | | | | | | | | | | 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.
* Merge pull request #47569 from vnen/gdscript-typed-returnRémi Verschelde2021-04-051-0/+33
|\ | | | | GDScript: Properly validate return type
| * GDScript: Properly validate return typeGeorge Marques2021-04-051-0/+33
| | | | | | | | | | | | | | When the type cannot be validated at compile time, the runtime must do a check to ensure type safety is kept, as the code might be assuming the return type is correct in another place, leading to crashes if the contract is broken.
* | Style: Apply clang-tidy's `readability-braces-around-statements`Rémi Verschelde2021-04-051-13/+26
|/
* Add typed arrays to GDScriptGeorge Marques2021-03-291-0/+41
| | | | | | | | - 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.
* 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 🎆
* fixes crash in disassemlber for opcode OPCODE_ASSIGN_TYPED_NATIVEJordan Schidlowsky2020-12-151-4/+1
|
* Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde2020-12-151-4/+39
|\ | | | | GDScript: Refactor builtin functions
| * GDScript: Refactor builtin functionsGeorge Marques2020-11-261-4/+39
| | | | | | | | | | | | | | | | | | | | | | 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.
* | fixes crash for OPCODE_CAST_TO_NATIVE opcode in gdscript disassemlberJordan Schidlowsky2020-11-251-4/+1
|/
* GDScript: Add faster instruction for validated constructorGeorge Marques2020-11-211-1/+18
| | | | Only for built-in types.
* GDScript: Add typed iterate instructionsGeorge Marques2020-11-211-0/+54
|
* GDScript: Add faster call instructions for builtin methodsGeorge Marques2020-11-211-0/+21
| | | | | Methods from builtin types can be called by using the function pointer when the argument and base types are known at compile time.
* GDScript: Add faster call instructions for native methodsGeorge Marques2020-11-211-0/+106
|
* GDScript: Add speficic set/get instructionsGeorge Marques2020-11-211-4/+67
| | | | | When the base type is known at compile-time, we can get a direct function pointer that is faster than the regular set/get paths.
* GDScript: Add faster operator for known typesGeorge Marques2020-11-211-0/+11
| | | | | It now uses the direct operator function pointer, which increases performance in evaluation.
* GDScript: Gather instructions arguments beforehandGeorge Marques2020-11-211-62/+63
| | | | | | | | | Almost all instructions need variant arguments. With this change they are loaded in an array before each instruction call. This makes the addressing code be localized to less places, improving compilation overhead and binary size by a small margin. This should not affect performance.
* GDScript: Split Function code into multiple filesGeorge Marques2020-11-211-0/+540
To improve organization and reduce the size of compilation units.