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
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
5 changed files with 115 additions and 49 deletions

View file

@ -71,7 +71,7 @@ public:
virtual uint32_t add_local_constant(const StringName &p_name, const Variant &p_constant) = 0;
virtual uint32_t add_or_get_constant(const Variant &p_constant) = 0;
virtual uint32_t add_or_get_name(const StringName &p_name) = 0;
virtual uint32_t add_temporary() = 0;
virtual uint32_t add_temporary(const GDScriptDataType &p_type) = 0;
virtual void pop_temporary() = 0;
virtual void start_parameters() = 0;