1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Pool temporary values by type on the stack

So the stack slots perform less type changes, which is useful for
future optimizations.
This commit is contained in:
George Marques
2021-04-14 14:35:51 -03:00
parent b4b7c97d38
commit 40502a1689
5 changed files with 115 additions and 49 deletions

View File

@@ -66,7 +66,7 @@ class GDScriptCompiler {
}
GDScriptCodeGenerator::Address add_temporary(const GDScriptDataType &p_type = GDScriptDataType()) {
uint32_t addr = generator->add_temporary();
uint32_t addr = generator->add_temporary(p_type);
return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::TEMPORARY, addr, p_type);
}