Commit bf34312b authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

switch object creation expression to external visitor

2007-09-17  Juerg Billeter  <j@bitron.ch>

	* vala/valacodevisitor.vala, vala/valamemorymanager.vala,
	  vala/valaobjectcreationexpression.vala,
	  vala/valasemanticanalyzer.vala, vala/valasymbolresolver.vala,
	  gobject/valacodegenerator.vala: switch object creation expression to
	  external visitor

svn path=/trunk/; revision=615
parent ebf0ebfa
2007-09-17 Jürg Billeter <j@bitron.ch>
* vala/valacodevisitor.vala, vala/valamemorymanager.vala,
vala/valaobjectcreationexpression.vala,
vala/valasemanticanalyzer.vala, vala/valasymbolresolver.vala,
gobject/valacodegenerator.vala: switch object creation expression to
external visitor
2007-09-17 Jürg Billeter <j@bitron.ch>
* vala/valacodevisitor.vala, vala/valainvocationexpression.vala,
......
......@@ -2411,7 +2411,9 @@ public class Vala.CodeGenerator : CodeVisitor {
}
}
public override void visit_end_object_creation_expression (ObjectCreationExpression! expr) {
public override void visit_object_creation_expression (ObjectCreationExpression! expr) {
expr.accept_children (this);
CCodeExpression instance = null;
CCodeFunctionCall creation_call = null;
......
......@@ -500,20 +500,11 @@ public abstract class Vala.CodeVisitor : Object {
}
/**
* Visit operation called at beginning of object creation
* expressions.
* Visit operation called for object creation expressions.
*
* @param expr an object creation expression
*/
public virtual void visit_begin_object_creation_expression (ObjectCreationExpression! expr) {
}
/**
* Visit operation called at end of object creation expressions.
*
* @param expr an object creation expression
*/
public virtual void visit_end_object_creation_expression (ObjectCreationExpression! expr) {
public virtual void visit_object_creation_expression (ObjectCreationExpression! expr) {
}
/**
......
......@@ -241,7 +241,9 @@ public class Vala.MemoryManager : CodeVisitor {
}
}
public override void visit_end_object_creation_expression (ObjectCreationExpression! expr) {
public override void visit_object_creation_expression (ObjectCreationExpression! expr) {
expr.accept_children (this);
if (!(expr.symbol_reference is Invokable)) {
return;
}
......
......@@ -97,6 +97,10 @@ public class Vala.ObjectCreationExpression : Expression {
}
public override void accept (CodeVisitor! visitor) {
visitor.visit_object_creation_expression (this);
}
public override void accept_children (CodeVisitor! visitor) {
if (type_reference != null) {
type_reference.accept (visitor);
}
......@@ -105,8 +109,6 @@ public class Vala.ObjectCreationExpression : Expression {
member_name.accept (visitor);
}
visitor.visit_begin_object_creation_expression (this);
foreach (Expression arg in argument_list) {
arg.accept (visitor);
}
......@@ -114,8 +116,6 @@ public class Vala.ObjectCreationExpression : Expression {
foreach (MemberInitializer init in object_initializer) {
init.accept (visitor);
}
visitor.visit_end_object_creation_expression (this);
}
public override void replace (CodeNode! old_node, CodeNode! new_node) {
......
......@@ -1846,7 +1846,9 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
expr.static_type = expr.inner.static_type;
}
public override void visit_end_object_creation_expression (ObjectCreationExpression! expr) {
public override void visit_object_creation_expression (ObjectCreationExpression! expr) {
expr.accept_children (this);
DataType type = null;
if (expr.type_reference == null) {
......
......@@ -339,6 +339,10 @@ public class Vala.SymbolResolver : CodeVisitor {
expr.accept_children (this);
}
public override void visit_object_creation_expression (ObjectCreationExpression! expr) {
expr.accept_children (this);
}
public override void visit_assignment (Assignment! a) {
a.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