[vala/wip/transform: 96/131] codegen: Fix making local variables and constants active
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 96/131] codegen: Fix making local variables and constants active
- Date: Sun, 20 Jan 2019 11:35:20 +0000 (UTC)
commit ee7ebdfbdc89f3f02a9091fa6e8943798d2e8b65
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Oct 27 01:20:09 2012 +0200
codegen: Fix making local variables and constants active
codegen/valaccodetransformer.vala | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodetransformer.vala b/codegen/valaccodetransformer.vala
index 6f004c46f..bd64fb030 100644
--- a/codegen/valaccodetransformer.vala
+++ b/codegen/valaccodetransformer.vala
@@ -61,6 +61,7 @@ public class Vala.CCodeTransformer : CodeTransformer {
}
public override void visit_constant (Constant c) {
+ c.active = true;
c.accept_children (this);
}
@@ -101,13 +102,6 @@ public class Vala.CCodeTransformer : CodeTransformer {
}
public override void visit_block (Block b) {
- foreach (LocalVariable local in b.get_local_variables ()) {
- local.active = true;
- }
- foreach (Constant constant in b.get_local_constants ()) {
- constant.active = true;
- }
-
b.accept_children (this);
foreach (LocalVariable local in b.get_local_variables ()) {
@@ -123,6 +117,7 @@ public class Vala.CCodeTransformer : CodeTransformer {
}
public override void visit_local_variable (LocalVariable local) {
+ local.active = true;
local.accept_children (this);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]