Commit 91d30943 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Separate visiting inner expressions from visiting member access

2008-11-30  Jürg Billeter  <j@bitron.ch>

	* vala/valamemberaccess.vala:
	* vala/valasymbolresolver.vala:
	* gobject/valaccodememberaccessmodule.vala:
	* gobject/valagsignalmodule.vala:

	Separate visiting inner expressions from visiting member access

svn path=/trunk/; revision=2097
parent 0697212a
2008-11-30 Jürg Billeter <j@bitron.ch>
* vala/valamemberaccess.vala:
* vala/valasymbolresolver.vala:
* gobject/valaccodememberaccessmodule.vala:
* gobject/valagsignalmodule.vala:
Separate visiting inner expressions from visiting member access
2008-11-30 Jürg Billeter <j@bitron.ch>
* vala/valaaddressofexpression.vala:
......
......@@ -29,6 +29,8 @@ public class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
}
public override void visit_member_access (MemberAccess expr) {
expr.accept_children (codegen);
CCodeExpression pub_inst = null;
DataType base_type = null;
......
......@@ -585,13 +585,15 @@ public class Vala.GSignalModule : GObjectModule {
}
public override void visit_member_access (MemberAccess expr) {
CCodeExpression pub_inst = null;
if (expr.symbol_reference is Signal) {
expr.accept_children (codegen);
CCodeExpression pub_inst = null;
if (expr.inner != null) {
pub_inst = (CCodeExpression) expr.inner.ccodenode;
}
if (expr.inner != null) {
pub_inst = (CCodeExpression) expr.inner.ccodenode;
}
if (expr.symbol_reference is Signal) {
var sig = (Signal) expr.symbol_reference;
var cl = (TypeSymbol) sig.parent_symbol;
......
......@@ -115,8 +115,14 @@ public class Vala.MemberAccess : Expression {
public Gee.List<DataType> get_type_arguments () {
return new ReadOnlyList<DataType> (type_argument_list);
}
public override void accept (CodeVisitor visitor) {
visitor.visit_member_access (this);
visitor.visit_expression (this);
}
public override void accept_children (CodeVisitor visitor) {
if (inner != null) {
inner.accept (visitor);
}
......@@ -124,10 +130,6 @@ public class Vala.MemberAccess : Expression {
foreach (DataType type_arg in type_argument_list) {
type_arg.accept (visitor);
}
visitor.visit_member_access (this);
visitor.visit_expression (this);
}
public override string to_string () {
......
......@@ -394,6 +394,10 @@ public class Vala.SymbolResolver : CodeVisitor {
expr.accept_children (this);
}
public override void visit_member_access (MemberAccess expr) {
expr.accept_children (this);
}
public override void visit_method_call (MethodCall expr) {
expr.accept_children (this);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment