vala r2098 - in trunk: . gobject vala



Author: juergbi
Date: Sun Nov 30 13:34:47 2008
New Revision: 2098
URL: http://svn.gnome.org/viewvc/vala?rev=2098&view=rev

Log:
2008-11-30  JÃrg Billeter  <j bitron ch>

	* vala/valanullchecker.vala:
	* vala/valaswitchlabel.vala:
	* vala/valaswitchstatement.vala:
	* vala/valasymbolresolver.vala:
	* gobject/valaccodecontrolflowmodule.vala:
	* gobject/valaccodegenerator.vala:
	* gobject/valaccodemodule.vala:

	Separate visiting switch sections from visiting switch statements


Modified:
   trunk/ChangeLog
   trunk/gobject/valaccodecontrolflowmodule.vala
   trunk/gobject/valaccodegenerator.vala
   trunk/gobject/valaccodemodule.vala
   trunk/vala/valanullchecker.vala
   trunk/vala/valaswitchlabel.vala
   trunk/vala/valaswitchstatement.vala
   trunk/vala/valasymbolresolver.vala

Modified: trunk/gobject/valaccodecontrolflowmodule.vala
==============================================================================
--- trunk/gobject/valaccodecontrolflowmodule.vala	(original)
+++ trunk/gobject/valaccodecontrolflowmodule.vala	Sun Nov 30 13:34:47 2008
@@ -177,6 +177,8 @@
 	}
 
 	public override void visit_switch_statement (SwitchStatement stmt) {
+		stmt.accept_children (codegen);
+
 		if (stmt.expression.value_type.compatible (string_type)) {
 			visit_string_switch_statement (stmt);
 			return;
@@ -212,6 +214,10 @@
 		visit_block (section);
 	}
 
+	public override void visit_switch_label (SwitchLabel label) {
+		label.accept_children (codegen);
+	}
+
 	public override void visit_while_statement (WhileStatement stmt) {
 		stmt.accept_children (codegen);
 

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Sun Nov 30 13:34:47 2008
@@ -175,6 +175,10 @@
 		head.visit_switch_section (section);
 	}
 
+	public override void visit_switch_label (SwitchLabel label) {
+		head.visit_switch_label (label);
+	}
+
 	public override void visit_while_statement (WhileStatement stmt) {
 		head.visit_while_statement (stmt);
 	}

Modified: trunk/gobject/valaccodemodule.vala
==============================================================================
--- trunk/gobject/valaccodemodule.vala	(original)
+++ trunk/gobject/valaccodemodule.vala	Sun Nov 30 13:34:47 2008
@@ -172,6 +172,10 @@
 		next.visit_switch_section (section);
 	}
 
+	public virtual void visit_switch_label (SwitchLabel label) {
+		next.visit_switch_label (label);
+	}
+
 	public virtual void visit_while_statement (WhileStatement stmt) {
 		next.visit_while_statement (stmt);
 	}

Modified: trunk/vala/valanullchecker.vala
==============================================================================
--- trunk/vala/valanullchecker.vala	(original)
+++ trunk/vala/valanullchecker.vala	Sun Nov 30 13:34:47 2008
@@ -144,6 +144,10 @@
 		check_non_null (stmt.condition);
 	}
 
+	public override void visit_switch_statement (SwitchStatement stmt) {
+		stmt.accept_children (this);
+	}
+
 	public override void visit_switch_section (SwitchSection section) {
 		section.accept_children (this);
 	}

Modified: trunk/vala/valaswitchlabel.vala
==============================================================================
--- trunk/vala/valaswitchlabel.vala	(original)
+++ trunk/vala/valaswitchlabel.vala	Sun Nov 30 13:34:47 2008
@@ -54,13 +54,15 @@
 	}
 	
 	public override void accept (CodeVisitor visitor) {
+		visitor.visit_switch_label (this);
+	}
+	
+	public override void accept_children (CodeVisitor visitor) {
 		if (expression != null) {
 			expression.accept (visitor);
 			
 			visitor.visit_end_full_expression (expression);
 		}
-
-		visitor.visit_switch_label (this);
 	}
 	
 	public override bool check (SemanticAnalyzer analyzer) {

Modified: trunk/vala/valaswitchstatement.vala
==============================================================================
--- trunk/vala/valaswitchstatement.vala	(original)
+++ trunk/vala/valaswitchstatement.vala	Sun Nov 30 13:34:47 2008
@@ -73,8 +73,12 @@
 	public Gee.List<SwitchSection> get_sections () {
 		return new ReadOnlyList<SwitchSection> (sections);
 	}
-	
+
 	public override void accept (CodeVisitor visitor) {
+		visitor.visit_switch_statement (this);
+	}
+
+	public override void accept_children (CodeVisitor visitor) {
 		expression.accept (visitor);
 
 		visitor.visit_end_full_expression (expression);
@@ -82,8 +86,6 @@
 		foreach (SwitchSection section in sections) {
 			section.accept (visitor);
 		}
-
-		visitor.visit_switch_statement (this);
 	}
 
 	public override void replace_expression (Expression old_node, Expression new_node) {

Modified: trunk/vala/valasymbolresolver.vala
==============================================================================
--- trunk/vala/valasymbolresolver.vala	(original)
+++ trunk/vala/valasymbolresolver.vala	Sun Nov 30 13:34:47 2008
@@ -346,6 +346,10 @@
 		stmt.accept_children (this);
 	}
 
+	public override void visit_switch_statement (SwitchStatement stmt) {
+		stmt.accept_children (this);
+	}
+
 	public override void visit_switch_section (SwitchSection section) {
 		section.accept_children (this);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]