summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_codegen.h
AgeCommit message (Collapse)Author
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 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-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-09-01Add GDScript code generation interfaceGeorge Marques
Implement the abstraction by targeting the current VM.