]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use temp_ref_values list instead of patching the AST
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 3 Feb 2021 22:16:41 +0000 (23:16 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 3 Feb 2021 22:16:41 +0000 (23:16 +0100)
Simplyfies 5328619a8141aa11341d479428ebfdcec0ff9756

codegen/valagvaluemodule.vala

index f13022c265757e2e8e44a1c0f91bc4b15d3d64ef..8b4dbbc66e08d82be4a223c860bd3b8ea87ddce6 100644 (file)
@@ -51,8 +51,7 @@ public class Vala.GValueModule : GAsyncModule {
                        ccode.add_assignment (temp_ref, get_cvalue (expr.inner));
 
                        // value needs to be kept alive until the end of this block
-                       assert (current_symbol is Block);
-                       ((Block) current_symbol).add_local_variable (temp_var);
+                       temp_ref_values.insert (0, get_local_cvalue (temp_var));
                }
 
                CCodeExpression rv;