summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_byte_codegen.cpp
AgeCommit message (Collapse)Author
2020-12-16Fix gdscript and operatorBrian Semrau
2020-12-15Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRĂ©mi Verschelde
GDScript: Refactor builtin functions
2020-12-02Merge pull request #41773 from ThakeeNathees/default-argument-override-buf-fixGeorge Marques
GDScript default argument override bug fix
2020-11-28GDScript default argument override bug fixThakee Nathees
Fix: #41766
2020-11-26GDScript: Improve handling of operatorsGeorge Marques
- 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.
2020-11-26GDScript: Refactor builtin functionsGeorge Marques
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.
2020-11-25GDScript: Fix mishandling of stack pointersGeorge Marques
- 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.
2020-11-21GDScript: Add faster instruction for validated constructorGeorge Marques
Only for built-in types.
2020-11-21GDScript: Add typed iterate instructionsGeorge Marques
2020-11-21GDScript: Add faster call instructions for builtin methodsGeorge Marques
Methods from builtin types can be called by using the function pointer when the argument and base types are known at compile time.
2020-11-21GDScript: Add faster call instructions for native methodsGeorge Marques
2020-11-21GDScript: Add speficic set/get instructionsGeorge Marques
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.
2020-11-21GDScript: Add faster operator for known typesGeorge Marques
It now uses the direct operator function pointer, which increases performance in evaluation.
2020-11-21GDScript: Gather instructions arguments beforehandGeorge Marques
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.
2020-10-19Merge pull request #42067 from ThakeeNathees/for-loop-stack-overriden-fixGeorge Marques
GDScript: for loop override stack variable bug fix
2020-09-18GDScript: for loop override stack variable bug fixThakee Nathees
Fix: #42050
2020-09-08GDScript crash on builtin type constructor fixThakee Nathees
Fix: #41848
2020-09-01Add GDScript code generation interfaceGeorge Marques
Implement the abstraction by targeting the current VM.