Age | Commit message (Collapse) | Author |
|
|
|
GDScript: Refactor builtin functions
|
|
GDScript default argument override bug fix
|
|
Fix: #41766
|
|
- 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.
|
|
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.
|
|
- Replace the for loop temporaries by locals. They cause conflicts with
the stack when being popped, while locals are properly handled in the
scope.
- Change the interface for the codegen so the for loop list doesn't live
through the whole block if it's a temporary.
- Keep track of the actual amount of local variables in the stack. Using
the size of the map is misleading in cases where multiple locals have
the same name (which is allowed when there's no shadowing).
- Added a few debug checks for temporaries, to avoid them being wrongly
manipulated in the future. They should not live more than a line of
code.
- Rearrange some of compiler code to make sure the temporaries don't
live across blocks.
|
|
Only for built-in types.
|
|
|
|
Methods from builtin types can be called by using the function pointer
when the argument and base types are known at compile time.
|
|
|
|
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.
|
|
It now uses the direct operator function pointer, which increases
performance in evaluation.
|
|
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: for loop override stack variable bug fix
|
|
Fix: #42050
|
|
Fix: #41848
|
|
Implement the abstraction by targeting the current VM.
|