Commit 8b57dfaf authored by Jürg Billeter's avatar Jürg Billeter

Use emit instead of accept and accept_children in code generator

parent 92cb97f4
/* valaccodearraymodule.vala
*
* Copyright (C) 2006-2009 Jürg Billeter
* Copyright (C) 2006-2010 Jürg Billeter
* Copyright (C) 2006-2008 Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
......@@ -43,8 +43,6 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
}
public override void visit_array_creation_expression (ArrayCreationExpression expr) {
expr.accept_children (codegen);
var array_type = expr.target_type as ArrayType;
if (array_type != null && array_type.fixed_length) {
// no heap allocation for fixed-length arrays
......@@ -400,8 +398,6 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
}
public override void visit_element_access (ElementAccess expr) {
expr.accept_children (codegen);
List<Expression> indices = expr.get_indices ();
int rank = indices.size;
......@@ -442,8 +438,6 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
}
public override void visit_slice_expression (SliceExpression expr) {
expr.accept_children (codegen);
var ccontainer = (CCodeExpression) expr.container.ccodenode;
var cstart = (CCodeExpression) expr.start.ccodenode;
var cstop = (CCodeExpression) expr.stop.ccodenode;
......@@ -1004,10 +998,6 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
var array_type = (ArrayType) array.value_type;
var element = binary.right;
array.accept (codegen);
element.target_type = array_type.element_type.copy ();
element.accept (codegen);
var value_param = new FormalParameter ("value", element.target_type);
var ccall = new CCodeFunctionCall (new CCodeIdentifier (generate_array_add_wrapper (array_type)));
......
/* valaccodeassignmentmodule.vala
*
* Copyright (C) 2006-2009 Jürg Billeter
* Copyright (C) 2006-2010 Jürg Billeter
* Copyright (C) 2006-2008 Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
......@@ -232,8 +232,6 @@ public class Vala.CCodeAssignmentModule : CCodeMemberAccessModule {
}
public override void visit_assignment (Assignment assignment) {
assignment.right.accept (codegen);
if (assignment.left.error || assignment.right.error) {
assignment.error = true;
return;
......
......@@ -693,7 +693,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
flag_shift += 1;
}
} else {
ev.value.accept (codegen);
ev.value.emit (codegen);
c_ev = new CCodeEnumValue (ev.get_cname (), (CCodeExpression) ev.value.ccodenode);
}
c_ev.deprecated = ev.deprecated;
......@@ -782,11 +782,11 @@ public class Vala.CCodeBaseModule : CCodeModule {
return;
}
c.accept_children (codegen);
if (!c.external) {
generate_type_declaration (c.type_reference, decl_space);
c.value.emit (codegen);
var initializer_list = c.value as InitializerList;
if (initializer_list != null) {
var cdecl = new CCodeDeclaration (c.type_reference.get_const_cname ());
......@@ -916,7 +916,9 @@ public class Vala.CCodeBaseModule : CCodeModule {
check_type (f.variable_type);
f.accept_children (codegen);
if (f.initializer != null) {
f.initializer.emit (codegen);
}
var cl = f.parent_symbol as Class;
bool is_gtypeinstance = (cl != null && !cl.is_compact);
......@@ -1366,7 +1368,13 @@ public class Vala.CCodeBaseModule : CCodeModule {
bool returns_real_struct = acc.readable && prop.property_type.is_real_non_null_struct_type ();
acc.accept_children (codegen);
if (acc.result_var != null) {
acc.result_var.accept (codegen);
}
if (acc.body != null) {
acc.body.emit (codegen);
}
var t = (TypeSymbol) prop.parent_symbol;
......@@ -1612,7 +1620,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
bool old_method_inner_error = current_method_inner_error;
current_method_inner_error = false;
d.accept_children (codegen);
d.body.emit (codegen);
if (d.binding == MemberBinding.STATIC && !in_plugin) {
Report.error (d.source_reference, "static destructors are only supported for dynamic types");
......@@ -1707,7 +1715,9 @@ public class Vala.CCodeBaseModule : CCodeModule {
var old_symbol = current_symbol;
current_symbol = b;
b.accept_children (codegen);
foreach (Statement stmt in b.get_statements ()) {
stmt.emit (codegen);
}
var local_vars = b.get_local_variables ();
foreach (LocalVariable local in local_vars) {
......@@ -2003,7 +2013,11 @@ public class Vala.CCodeBaseModule : CCodeModule {
public override void visit_local_variable (LocalVariable local) {
check_type (local.variable_type);
local.accept_children (codegen);
if (local.initializer != null) {
local.initializer.emit (codegen);
visit_end_full_expression (local.initializer);
}
generate_type_declaration (local.variable_type, source_declarations);
......@@ -2212,8 +2226,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_initializer_list (InitializerList list) {
list.accept_children (codegen);
if (list.target_type.data_type is Struct) {
/* initializer is used as struct initializer */
var st = (Struct) list.target_type.data_type;
......@@ -3164,8 +3176,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_expression_statement (ExpressionStatement stmt) {
stmt.accept_children (codegen);
if (stmt.expression.error) {
stmt.error = true;
return;
......@@ -3317,7 +3327,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
stmt.ccodenode = cfrag;
}
public virtual bool variable_accessible_in_finally (LocalVariable local) {
public bool variable_accessible_in_finally (LocalVariable local) {
if (current_try == null) {
return false;
}
......@@ -3338,23 +3348,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_return_statement (ReturnStatement stmt) {
// avoid unnecessary ref/unref pair
if (stmt.return_expression != null) {
var local = stmt.return_expression.symbol_reference as LocalVariable;
if (current_return_type.value_owned
&& local != null && local.variable_type.value_owned
&& !local.captured
&& !variable_accessible_in_finally (local)) {
/* return expression is local variable taking ownership and
* current method is transferring ownership */
// don't ref expression
stmt.return_expression.value_type.value_owned = true;
}
}
stmt.accept_children (codegen);
Symbol return_expression_symbol = null;
if (stmt.return_expression != null) {
......@@ -3367,9 +3360,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
/* return expression is local variable taking ownership and
* current method is transferring ownership */
// don't unref variable
return_expression_symbol = local;
return_expression_symbol.active = false;
}
}
......@@ -3540,8 +3531,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_delete_statement (DeleteStatement stmt) {
stmt.accept_children (codegen);
var pointer_type = (PointerType) stmt.expression.value_type;
DataType type = pointer_type;
if (pointer_type.base_type.data_type != null && pointer_type.base_type.data_type.is_reference_type ()) {
......@@ -4140,8 +4129,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_object_creation_expression (ObjectCreationExpression expr) {
expr.accept_children (codegen);
CCodeExpression instance = null;
CCodeExpression creation_expr = null;
......@@ -4298,7 +4285,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
/* evaluate default expression here as the code
* generator might not have visited the formal
* parameter yet */
param.initializer.accept (codegen);
param.initializer.emit (codegen);
carg_map.set (get_param_pos (param.cparameter_position), (CCodeExpression) param.initializer.ccodenode);
i++;
......@@ -4483,8 +4470,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_unary_expression (UnaryExpression expr) {
expr.accept_children (codegen);
CCodeUnaryOperator op;
if (expr.operator == UnaryOperator.PLUS) {
op = CCodeUnaryOperator.PLUS;
......@@ -4675,8 +4660,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_named_argument (NamedArgument expr) {
expr.accept_children (codegen);
expr.ccodenode = expr.inner.ccodenode;
}
......@@ -4697,8 +4680,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_reference_transfer_expression (ReferenceTransferExpression expr) {
expr.accept_children (codegen);
/* (tmp = var, var = null, tmp) */
var ccomma = new CCodeCommaExpression ();
var temp_decl = get_temp_variable (expr.value_type, true, expr, false);
......@@ -4712,8 +4693,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
}
public override void visit_binary_expression (BinaryExpression expr) {
expr.accept_children (codegen);
var cleft = (CCodeExpression) expr.left.ccodenode;
var cright = (CCodeExpression) expr.right.ccodenode;
......@@ -5587,7 +5566,7 @@ public class Vala.CCodeBaseModule : CCodeModule {
public CCodeNode? get_ccodenode (CodeNode node) {
if (node.ccodenode == null) {
node.accept (codegen);
node.emit (codegen);
}
return node.ccodenode;
}
......
......@@ -30,7 +30,10 @@ public class Vala.CCodeControlFlowModule : CCodeMethodModule {
}
public override void visit_if_statement (IfStatement stmt) {
stmt.accept_children (codegen);
stmt.true_statement.emit (codegen);
if (stmt.false_statement != null) {
stmt.false_statement.emit (codegen);
}
if (stmt.false_statement != null) {
stmt.ccodenode = new CCodeIfStatement ((CCodeExpression) stmt.condition.ccodenode, (CCodeStatement) stmt.true_statement.ccodenode, (CCodeStatement) stmt.false_statement.ccodenode);
......@@ -189,7 +192,9 @@ public class Vala.CCodeControlFlowModule : CCodeMethodModule {
}
public override void visit_switch_statement (SwitchStatement stmt) {
stmt.accept_children (codegen);
foreach (SwitchSection section in stmt.get_sections ()) {
section.emit (codegen);
}
if (stmt.expression.value_type.compatible (string_type)) {
visit_string_switch_statement (stmt);
......@@ -220,16 +225,16 @@ public class Vala.CCodeControlFlowModule : CCodeMethodModule {
create_temp_decl (stmt, stmt.expression.temp_vars);
}
public override void visit_switch_section (SwitchSection section) {
visit_block (section);
}
public override void visit_switch_label (SwitchLabel label) {
label.accept_children (codegen);
if (label.expression != null) {
label.expression.emit (codegen);
codegen.visit_end_full_expression (label.expression);
}
}
public override void visit_loop (Loop stmt) {
stmt.accept_children (codegen);
stmt.body.emit (codegen);
if (context.profile == Profile.GOBJECT) {
stmt.ccodenode = new CCodeWhileStatement (new CCodeConstant ("TRUE"), (CCodeStatement) stmt.body.ccodenode);
......@@ -240,11 +245,7 @@ public class Vala.CCodeControlFlowModule : CCodeMethodModule {
}
public override void visit_foreach_statement (ForeachStatement stmt) {
stmt.element_variable.active = true;
stmt.collection_variable.active = true;
if (stmt.iterator_variable != null) {
stmt.iterator_variable.active = true;
}
stmt.body.emit (codegen);
visit_block (stmt);
......
......@@ -30,8 +30,6 @@ 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;
......@@ -368,6 +366,20 @@ public class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
expr.ccodenode = new CCodeMemberAccess.pointer (get_variable_cexpression ("_data%d_".printf (get_block_id (block))), get_variable_cname (local.name));
} else {
expr.ccodenode = get_variable_cexpression (local.name);
if (expr.parent_node is ReturnStatement &&
current_return_type.value_owned &&
local.variable_type.value_owned &&
!variable_accessible_in_finally (local)) {
/* return expression is local variable taking ownership and
* current method is transferring ownership */
// don't ref expression
expr.value_type.value_owned = true;
// don't unref variable
local.active = false;
}
}
} else if (expr.symbol_reference is FormalParameter) {
var p = (FormalParameter) expr.symbol_reference;
......
......@@ -30,8 +30,6 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
}
public override void visit_method_call (MethodCall expr) {
expr.accept_children (codegen);
// the bare function call
var ccall = new CCodeFunctionCall ((CCodeExpression) expr.call.ccodenode);
......
......@@ -316,7 +316,29 @@ public class Vala.CCodeMethodModule : CCodeStructModule {
if (m.binding == MemberBinding.CLASS || m.binding == MemberBinding.STATIC) {
in_static_or_class_context = true;
}
m.accept_children (codegen);
foreach (FormalParameter param in m.get_parameters ()) {
param.accept (codegen);
}
if (m.result_var != null) {
m.result_var.accept (codegen);
}
foreach (Expression precondition in m.get_preconditions ()) {
precondition.emit (codegen);
}
foreach (Expression postcondition in m.get_postconditions ()) {
postcondition.emit (codegen);
}
if (m.body != null) {
m.body.emit (codegen);
}
in_static_or_class_context = false;
if (m is CreationMethod) {
......
......@@ -927,11 +927,11 @@ public class Vala.DBusClientModule : DBusModule {
Expression object_path = args.get (1);
var ccall = new CCodeFunctionCall (new CCodeIdentifier (type.type_symbol.get_lower_case_cprefix () + "dbus_proxy_new"));
connection.accept (codegen);
connection.emit (codegen);
ccall.add_argument ((CCodeExpression) connection.ccodenode);
bus_name.accept (codegen);
bus_name.emit (codegen);
ccall.add_argument ((CCodeExpression) bus_name.ccodenode);
object_path.accept (codegen);
object_path.emit (codegen);
ccall.add_argument ((CCodeExpression) object_path.ccodenode);
expr.ccodenode = ccall;
}
......@@ -1413,11 +1413,11 @@ public class Vala.DBusClientModule : DBusModule {
if (proxy_get_all) {
var ma = expr.call as MemberAccess;
var instance = ma.inner;
instance.accept (codegen);
instance.emit (codegen);
var args = expr.get_argument_list ();
Expression interface_name = args.get (0);
interface_name.accept (codegen);
interface_name.emit (codegen);
var ccall = new CCodeFunctionCall (new CCodeIdentifier (generate_get_all_function (mtype.method_symbol)));
ccall.add_argument ((CCodeExpression) instance.ccodenode);
......@@ -1441,7 +1441,7 @@ public class Vala.DBusClientModule : DBusModule {
quark_call.add_argument (new CCodeConstant ("\"ValaDBusInterfaceProxyType\""));
var qdata_call = new CCodeFunctionCall (new CCodeIdentifier ("g_type_get_qdata"));
type.accept (codegen);
type.emit (codegen);
qdata_call.add_argument ((CCodeExpression) type.ccodenode);
qdata_call.add_argument (quark_call);
......@@ -1450,16 +1450,16 @@ public class Vala.DBusClientModule : DBusModule {
var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_new"));
ccall.add_argument (get_type_call);
ccall.add_argument (new CCodeConstant ("\"connection\""));
connection.accept (codegen);
connection.emit (codegen);
ccall.add_argument ((CCodeExpression) connection.ccodenode);
ccall.add_argument (new CCodeConstant ("\"name\""));
bus_name.accept (codegen);
bus_name.emit (codegen);
ccall.add_argument ((CCodeExpression) bus_name.ccodenode);
ccall.add_argument (new CCodeConstant ("\"path\""));
object_path.accept (codegen);
object_path.emit (codegen);
ccall.add_argument ((CCodeExpression) object_path.ccodenode);
ccall.add_argument (new CCodeConstant ("\"interface\""));
interface_name.accept (codegen);
interface_name.emit (codegen);
ccall.add_argument ((CCodeExpression) interface_name.ccodenode);
ccall.add_argument (new CCodeConstant ("NULL"));
expr.ccodenode = ccall;
......
......@@ -1637,8 +1637,6 @@ public class Vala.DBusServerModule : DBusClientModule {
add_dbus_helpers ();
expr.accept_children (codegen);
var ma = (MemberAccess) expr.call;
var raw_conn = new CCodeFunctionCall (new CCodeIdentifier ("dbus_g_connection_get_connection"));
......
......@@ -33,8 +33,6 @@ internal class Vala.DovaArrayModule : DovaMethodCallModule {
}
public override void visit_array_creation_expression (ArrayCreationExpression expr) {
expr.accept_children (codegen);
var array_type = expr.target_type as ArrayType;
if (array_type != null && array_type.fixed_length) {
// no heap allocation for fixed-length arrays
......@@ -67,8 +65,6 @@ internal class Vala.DovaArrayModule : DovaMethodCallModule {
}
public override void visit_element_access (ElementAccess expr) {
expr.accept_children (codegen);
List<Expression> indices = expr.get_indices ();
var ccontainer = (CCodeExpression) expr.container.ccodenode;
......
......@@ -175,8 +175,6 @@ internal class Vala.DovaAssignmentModule : DovaMemberAccessModule {
}
public override void visit_assignment (Assignment assignment) {
assignment.right.accept (codegen);
if (assignment.left.error || assignment.right.error) {
assignment.error = true;
return;
......
......@@ -376,7 +376,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
if (ev.value == null) {
cenum.add_value (new CCodeEnumValue (ev.get_cname ()));
} else {
ev.value.accept (codegen);
ev.value.emit (codegen);
cenum.add_value (new CCodeEnumValue (ev.get_cname (), (CCodeExpression) ev.value.ccodenode));
}
}
......@@ -400,9 +400,9 @@ internal class Vala.DovaBaseModule : CCodeModule {
return;
}
c.accept_children (codegen);
if (!c.external) {
c.value.emit (codegen);
if (c.value is InitializerList) {
var cdecl = new CCodeDeclaration (c.type_reference.get_const_cname ());
var arr = "";
......@@ -456,7 +456,9 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_field (Field f) {
f.accept_children (codegen);
if (f.initializer != null) {
f.initializer.emit (codegen);
}
var cl = f.parent_symbol as Class;
......@@ -591,7 +593,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_formal_parameter (FormalParameter p) {
p.accept_children (codegen);
}
public override void visit_property (Property prop) {
......@@ -656,7 +657,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_destructor (Destructor d) {
d.accept_children (codegen);
d.body.emit (codegen);
CCodeFragment cfrag = new CCodeFragment ();
......@@ -707,7 +708,9 @@ internal class Vala.DovaBaseModule : CCodeModule {
var old_symbol = current_symbol;
current_symbol = b;
b.accept_children (codegen);
foreach (Statement stmt in b.get_statements ()) {
stmt.emit (codegen);
}
var local_vars = b.get_local_variables ();
foreach (LocalVariable local in local_vars) {
......@@ -954,7 +957,11 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_local_variable (LocalVariable local) {
local.accept_children (codegen);
if (local.initializer != null) {
local.initializer.emit (codegen);
visit_end_full_expression (local.initializer);
}
generate_type_declaration (local.variable_type, source_declarations);
......@@ -999,8 +1006,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_initializer_list (InitializerList list) {
list.accept_children (codegen);
if (list.target_type.data_type is Struct) {
/* initializer is used as struct initializer */
var st = (Struct) list.target_type.data_type;
......@@ -1310,8 +1315,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_expression_statement (ExpressionStatement stmt) {
stmt.accept_children (codegen);
if (stmt.expression.error) {
stmt.error = true;
return;
......@@ -1467,8 +1470,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_return_statement (ReturnStatement stmt) {
stmt.accept_children (codegen);
var cfrag = new CCodeFragment ();
// free local variables
......@@ -1480,8 +1481,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_delete_statement (DeleteStatement stmt) {
stmt.accept_children (codegen);
var pointer_type = (PointerType) stmt.expression.value_type;
DataType type = pointer_type;
if (pointer_type.base_type.data_type != null && pointer_type.base_type.data_type.is_reference_type ()) {
......@@ -1744,8 +1743,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_object_creation_expression (ObjectCreationExpression expr) {
expr.accept_children (codegen);
CCodeExpression instance = null;
CCodeExpression creation_expr = null;
......@@ -1837,7 +1834,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
/* evaluate default expression here as the code
* generator might not have visited the formal
* parameter yet */
param.initializer.accept (codegen);
param.initializer.emit (codegen);
creation_call.add_argument ((CCodeExpression) param.initializer.ccodenode);
i++;
......@@ -1944,8 +1941,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_unary_expression (UnaryExpression expr) {
expr.accept_children (codegen);
CCodeUnaryOperator op;
if (expr.operator == UnaryOperator.PLUS) {
op = CCodeUnaryOperator.PLUS;
......@@ -2036,8 +2031,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_reference_transfer_expression (ReferenceTransferExpression expr) {
expr.accept_children (codegen);
/* (tmp = var, var = null, tmp) */
var ccomma = new CCodeCommaExpression ();
var temp_decl = get_temp_variable (expr.value_type, true, expr);
......@@ -2051,8 +2044,6 @@ internal class Vala.DovaBaseModule : CCodeModule {
}
public override void visit_binary_expression (BinaryExpression expr) {
expr.accept_children (codegen);
var cleft = (CCodeExpression) expr.left.ccodenode;
var cright = (CCodeExpression) expr.right.ccodenode;
......@@ -2441,7 +2432,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
public CCodeNode? get_ccodenode (CodeNode node) {
if (node.ccodenode == null) {
node.accept (codegen);
node.emit (codegen);
}
return node.ccodenode;
}
......
......@@ -26,7 +26,10 @@ internal class Vala.DovaControlFlowModule : DovaMethodModule {
}
public override void visit_if_statement (IfStatement stmt) {
stmt.accept_children (codegen);
stmt.true_statement.emit (codegen);
if (stmt.false_statement != null) {
stmt.false_statement.emit (codegen);
}
if (stmt.false_statement != null) {
stmt.ccodenode = new CCodeIfStatement ((CCodeExpression) stmt.condition.ccodenode, (CCodeStatement) stmt.true_statement.ccodenode, (CCodeStatement) stmt.false_statement.ccodenode);
......@@ -38,7 +41,9 @@ internal class Vala.DovaControlFlowModule : DovaMethodModule {
}
public override void visit_switch_statement (SwitchStatement stmt) {
stmt.accept_children (codegen);
foreach (SwitchSection section in stmt.get_sections ()) {
section.emit (codegen);
}
var cswitch = new CCodeSwitchStatement ((CCodeExpression) stmt.expression.ccodenode);
stmt.ccodenode = cswitch;
......@@ -68,16 +73,16 @@ internal class Vala.DovaControlFlowModule : DovaMethodModule {
create_temp_decl (stmt, stmt.expression.temp_vars);
}
public override void visit_switch_section (SwitchSection section) {
visit_block (section);
}
public override void visit_switch_label (SwitchLabel label) {
label.accept_children (codegen);
if (label.expression != null) {
label.expression.emit (codegen);
codegen.visit_end_full_expression (label.expression);
}
}
public override void visit_loop (Loop stmt) {
stmt.accept_children (codegen);
stmt.body.emit (codegen);
stmt.ccodenode = new CCodeWhileStatement (new CCodeConstant ("true"), (CCodeStatement) stmt.body.ccodenode);
}
......
......@@ -33,8 +33,6 @@ internal class Vala.DovaErrorModule : DovaDelegateModule {
}
public override void visit_throw_statement (ThrowStatement stmt) {