summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-04-14 14:35:51 -0300
committerGeorge Marques <george@gmarqu.es>2021-04-14 14:35:51 -0300
commit40502a1689007f3a5995b39b30fa8987463767a4 (patch)
treea35a9178eeaf80094aeba217f56644e6ccfd9f78 /modules/gdscript/gdscript_compiler.h
parentb4b7c97d3839170180e4f3f7c2bd3179b374057a (diff)
GDScript: Pool temporary values by type on the stack
So the stack slots perform less type changes, which is useful for future optimizations.
Diffstat (limited to 'modules/gdscript/gdscript_compiler.h')
-rw-r--r--modules/gdscript/gdscript_compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 1b0beec0d4..c405eadb07 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -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);
}