From: Juerg Billeter Date: Sun, 2 Dec 2007 10:23:29 +0000 (+0000) Subject: rename DataType to Typesymbol X-Git-Tag: VALA_0_1_6~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=160d75b8e40911b86fa2383116454f4efaa5096c;p=platform%2Fupstream%2Fvala.git rename DataType to Typesymbol 2007-12-02 Juerg Billeter * vala/valatypesymbol.vala, vala/Makefile.am: rename DataType to Typesymbol * vala/*.vala, gobject/*.vala, vapigen/*.vala: adapt after renaming svn path=/trunk/; revision=745 --- diff --git a/ChangeLog b/ChangeLog index cc9d6d7..7291e10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-02 Jürg Billeter + + * vala/valatypesymbol.vala, vala/Makefile.am: rename DataType to + Typesymbol + + * vala/*.vala, gobject/*.vala, vapigen/*.vala: adapt after renaming + 2007-12-01 Jürg Billeter * ccode/valaccodeblock.vala: don't emit unreachable code, diff --git a/gobject/valaccodeassignmentbinding.vala b/gobject/valaccodeassignmentbinding.vala index 13fb599..60ddb7f 100644 --- a/gobject/valaccodeassignmentbinding.vala +++ b/gobject/valaccodeassignmentbinding.vala @@ -173,7 +173,7 @@ public class Vala.CCodeAssignmentBinding : CCodeExpressionBinding { codegen.temp_vars.insert (0, temp_decl); var parse_call = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_parse_name")); parse_call.add_argument (sig.get_canonical_cconstant ()); - var decl_type = (DataType) sig.parent_symbol; + var decl_type = (Typesymbol) sig.parent_symbol; parse_call.add_argument (new CCodeIdentifier (decl_type.get_type_id ())); parse_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (temp_decl.name))); parse_call.add_argument (new CCodeConstant ("NULL")); diff --git a/gobject/valaccodegenerator.vala b/gobject/valaccodegenerator.vala index 18df28b..674318e 100644 --- a/gobject/valaccodegenerator.vala +++ b/gobject/valaccodegenerator.vala @@ -97,21 +97,21 @@ public class Vala.CCodeGenerator : CodeGenerator { public TypeReference string_type; public TypeReference float_type; public TypeReference double_type; - public DataType gtypeinstance_type; - public DataType gobject_type; - public DataType gerror_type; - public DataType glist_type; - public DataType gslist_type; - public DataType gstring_type; - public DataType garray_type; + public Typesymbol gtypeinstance_type; + public Typesymbol gobject_type; + public Typesymbol gerror_type; + public Typesymbol glist_type; + public Typesymbol gslist_type; + public Typesymbol gstring_type; + public Typesymbol garray_type; public TypeReference gquark_type; public TypeReference mutex_type; - public DataType type_module_type; - public DataType iterable_type; - public DataType iterator_type; - public DataType list_type; - public DataType map_type; - public DataType connection_type; + public Typesymbol type_module_type; + public Typesymbol iterable_type; + public Typesymbol iterator_type; + public Typesymbol list_type; + public Typesymbol map_type; + public Typesymbol connection_type; Method substring_method; @@ -201,65 +201,65 @@ public class Vala.CCodeGenerator : CodeGenerator { root_symbol = context.root; bool_type = new TypeReference (); - bool_type.data_type = (DataType) root_symbol.scope.lookup ("bool"); + bool_type.data_type = (Typesymbol) root_symbol.scope.lookup ("bool"); char_type = new TypeReference (); - char_type.data_type = (DataType) root_symbol.scope.lookup ("char"); + char_type.data_type = (Typesymbol) root_symbol.scope.lookup ("char"); unichar_type = new TypeReference (); - unichar_type.data_type = (DataType) root_symbol.scope.lookup ("unichar"); + unichar_type.data_type = (Typesymbol) root_symbol.scope.lookup ("unichar"); short_type = new TypeReference (); - short_type.data_type = (DataType) root_symbol.scope.lookup ("short"); + short_type.data_type = (Typesymbol) root_symbol.scope.lookup ("short"); ushort_type = new TypeReference (); - ushort_type.data_type = (DataType) root_symbol.scope.lookup ("ushort"); + ushort_type.data_type = (Typesymbol) root_symbol.scope.lookup ("ushort"); int_type = new TypeReference (); - int_type.data_type = (DataType) root_symbol.scope.lookup ("int"); + int_type.data_type = (Typesymbol) root_symbol.scope.lookup ("int"); uint_type = new TypeReference (); - uint_type.data_type = (DataType) root_symbol.scope.lookup ("uint"); + uint_type.data_type = (Typesymbol) root_symbol.scope.lookup ("uint"); long_type = new TypeReference (); - long_type.data_type = (DataType) root_symbol.scope.lookup ("long"); + long_type.data_type = (Typesymbol) root_symbol.scope.lookup ("long"); ulong_type = new TypeReference (); - ulong_type.data_type = (DataType) root_symbol.scope.lookup ("ulong"); + ulong_type.data_type = (Typesymbol) root_symbol.scope.lookup ("ulong"); int64_type = new TypeReference (); - int64_type.data_type = (DataType) root_symbol.scope.lookup ("int64"); + int64_type.data_type = (Typesymbol) root_symbol.scope.lookup ("int64"); uint64_type = new TypeReference (); - uint64_type.data_type = (DataType) root_symbol.scope.lookup ("uint64"); + uint64_type.data_type = (Typesymbol) root_symbol.scope.lookup ("uint64"); float_type = new TypeReference (); - float_type.data_type = (DataType) root_symbol.scope.lookup ("float"); + float_type.data_type = (Typesymbol) root_symbol.scope.lookup ("float"); double_type = new TypeReference (); - double_type.data_type = (DataType) root_symbol.scope.lookup ("double"); + double_type.data_type = (Typesymbol) root_symbol.scope.lookup ("double"); string_type = new TypeReference (); - string_type.data_type = (DataType) root_symbol.scope.lookup ("string"); + string_type.data_type = (Typesymbol) root_symbol.scope.lookup ("string"); substring_method = (Method) string_type.data_type.scope.lookup ("substring"); var glib_ns = root_symbol.scope.lookup ("GLib"); - gtypeinstance_type = (DataType) glib_ns.scope.lookup ("TypeInstance"); - gobject_type = (DataType) glib_ns.scope.lookup ("Object"); - gerror_type = (DataType) glib_ns.scope.lookup ("Error"); - glist_type = (DataType) glib_ns.scope.lookup ("List"); - gslist_type = (DataType) glib_ns.scope.lookup ("SList"); - gstring_type = (DataType) glib_ns.scope.lookup ("String"); - garray_type = (DataType) glib_ns.scope.lookup ("Array"); + gtypeinstance_type = (Typesymbol) glib_ns.scope.lookup ("TypeInstance"); + gobject_type = (Typesymbol) glib_ns.scope.lookup ("Object"); + gerror_type = (Typesymbol) glib_ns.scope.lookup ("Error"); + glist_type = (Typesymbol) glib_ns.scope.lookup ("List"); + gslist_type = (Typesymbol) glib_ns.scope.lookup ("SList"); + gstring_type = (Typesymbol) glib_ns.scope.lookup ("String"); + garray_type = (Typesymbol) glib_ns.scope.lookup ("Array"); gquark_type = new TypeReference (); - gquark_type.data_type = (DataType) glib_ns.scope.lookup ("Quark"); + gquark_type.data_type = (Typesymbol) glib_ns.scope.lookup ("Quark"); mutex_type = new TypeReference (); - mutex_type.data_type = (DataType) glib_ns.scope.lookup ("Mutex"); + mutex_type.data_type = (Typesymbol) glib_ns.scope.lookup ("Mutex"); - type_module_type = (DataType) glib_ns.scope.lookup ("TypeModule"); + type_module_type = (Typesymbol) glib_ns.scope.lookup ("TypeModule"); if (context.module_init_method != null) { module_init_fragment = new CCodeFragment (); @@ -274,15 +274,15 @@ public class Vala.CCodeGenerator : CodeGenerator { var gee_ns = root_symbol.scope.lookup ("Gee"); if (gee_ns != null) { - iterable_type = (DataType) gee_ns.scope.lookup ("Iterable"); - iterator_type = (DataType) gee_ns.scope.lookup ("Iterator"); - list_type = (DataType) gee_ns.scope.lookup ("List"); - map_type = (DataType) gee_ns.scope.lookup ("Map"); + iterable_type = (Typesymbol) gee_ns.scope.lookup ("Iterable"); + iterator_type = (Typesymbol) gee_ns.scope.lookup ("Iterator"); + list_type = (Typesymbol) gee_ns.scope.lookup ("List"); + map_type = (Typesymbol) gee_ns.scope.lookup ("Map"); } var dbus_ns = root_symbol.scope.lookup ("DBus"); if (dbus_ns != null) { - connection_type = (DataType) dbus_ns.scope.lookup ("Connection"); + connection_type = (Typesymbol) dbus_ns.scope.lookup ("Connection"); } /* we're only interested in non-pkg source files */ @@ -384,8 +384,8 @@ public class Vala.CCodeGenerator : CodeGenerator { public override void visit_constant (Constant! c) { c.accept_children (this); - if (c.parent_symbol is DataType) { - var t = (DataType) c.parent_symbol; + if (c.parent_symbol is Typesymbol) { + var t = (Typesymbol) c.parent_symbol; if (!c.is_internal_symbol () && !(c.type_reference.data_type is Array)) { var cdefine = new CCodeMacroReplacement.with_expression (c.get_cname (), (CCodeExpression) c.initializer.ccodenode); @@ -570,7 +570,7 @@ public class Vala.CCodeGenerator : CodeGenerator { current_return_type = null; - var t = (DataType) prop.parent_symbol; + var t = (Typesymbol) prop.parent_symbol; var this_type = new TypeReference (); this_type.data_type = t; @@ -2019,7 +2019,7 @@ public class Vala.CCodeGenerator : CodeGenerator { if (inner_node == null) { l = new CCodeIdentifier ("self"); } else if (stmt.resource.symbol_reference.parent_symbol != current_type_symbol) { - l = new InstanceCast ((CCodeExpression) inner_node.ccodenode, (DataType) stmt.resource.symbol_reference.parent_symbol); + l = new InstanceCast ((CCodeExpression) inner_node.ccodenode, (Typesymbol) stmt.resource.symbol_reference.parent_symbol); } else { l = (CCodeExpression) inner_node.ccodenode; } @@ -2136,7 +2136,7 @@ public class Vala.CCodeGenerator : CodeGenerator { var ma = (MemberAccess) array_expr; CCodeExpression pub_inst = null; - DataType base_type = null; + Typesymbol base_type = null; CCodeExpression length_expr = null; if (ma.inner == null) { @@ -2144,7 +2144,7 @@ public class Vala.CCodeGenerator : CodeGenerator { if (current_type_symbol != null) { /* base type is available if this is a type method */ - base_type = (DataType) current_type_symbol; + base_type = (Typesymbol) current_type_symbol; } } else { pub_inst = (CCodeExpression) ma.inner.ccodenode; @@ -2158,7 +2158,7 @@ public class Vala.CCodeGenerator : CodeGenerator { var instance_expression_type = new TypeReference (); instance_expression_type.data_type = base_type; var instance_target_type = new TypeReference (); - instance_target_type.data_type = (DataType) field.parent_symbol; + instance_target_type.data_type = (Typesymbol) field.parent_symbol; CCodeExpression typed_inst = get_implicit_cast_expression (pub_inst, instance_expression_type, instance_target_type); CCodeExpression inst; @@ -2167,7 +2167,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } else { inst = typed_inst; } - if (((DataType) field.parent_symbol).is_reference_type ()) { + if (((Typesymbol) field.parent_symbol).is_reference_type ()) { length_expr = new CCodeMemberAccess.pointer (inst, length_cname); } else { length_expr = new CCodeMemberAccess (inst, length_cname); @@ -2510,7 +2510,7 @@ public class Vala.CCodeGenerator : CodeGenerator { if (init.symbol_reference is Field) { var f = (Field) init.symbol_reference; var instance_target_type = new TypeReference (); - instance_target_type.data_type = (DataType) f.parent_symbol; + instance_target_type.data_type = (Typesymbol) f.parent_symbol; var typed_inst = get_implicit_cast_expression (instance, expr.type_reference, instance_target_type); CCodeExpression lhs; if (expr.type_reference.data_type is Struct) { @@ -2700,7 +2700,7 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - static CCodeFunctionCall create_type_check (CCodeNode! ccodenode, DataType! type) { + static CCodeFunctionCall create_type_check (CCodeNode! ccodenode, Typesymbol! type) { var ccheck = new CCodeFunctionCall (new CCodeIdentifier (type.get_upper_case_cname ("IS_"))); ccheck.add_argument ((CCodeExpression) ccodenode); return ccheck; @@ -2799,7 +2799,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } else if (prop.base_interface_property != null) { base_property = prop.base_interface_property; } - var base_property_type = (DataType) base_property.parent_symbol; + var base_property_type = (Typesymbol) base_property.parent_symbol; set_func = "%s_set_%s".printf (base_property_type.get_lower_case_cname (null), base_property.name); } @@ -2819,7 +2819,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } var instance_target_type = new TypeReference (); - instance_target_type.data_type = (DataType) base_property.parent_symbol; + instance_target_type.data_type = (Typesymbol) base_property.parent_symbol; instance = get_implicit_cast_expression (instance, instance_expression_type, instance_target_type); ccall.add_argument (instance); diff --git a/gobject/valaccodegeneratorinterface.vala b/gobject/valaccodegeneratorinterface.vala index 7a2d12f..82f47d6 100644 --- a/gobject/valaccodegeneratorinterface.vala +++ b/gobject/valaccodegeneratorinterface.vala @@ -161,7 +161,7 @@ public class Vala.CCodeGenerator { return cspec; } - private CCodeFunctionCall! get_signal_creation (Signal! sig, DataType! type) { + private CCodeFunctionCall! get_signal_creation (Signal! sig, Typesymbol! type) { var csignew = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_new")); csignew.add_argument (new CCodeConstant ("\"%s\"".printf (sig.name))); csignew.add_argument (new CCodeIdentifier (type.get_upper_case_cname ("TYPE_"))); diff --git a/gobject/valaccodegeneratorinvocationexpression.vala b/gobject/valaccodegeneratorinvocationexpression.vala index d5536dd..643d00c 100644 --- a/gobject/valaccodegeneratorinvocationexpression.vala +++ b/gobject/valaccodegeneratorinvocationexpression.vala @@ -85,7 +85,7 @@ public class Vala.CCodeGenerator { // parent_symbol may be null for late bound methods if (base_method.parent_symbol != null) { var instance_target_type = new TypeReference (); - instance_target_type.data_type = (DataType) base_method.parent_symbol; + instance_target_type.data_type = (Typesymbol) base_method.parent_symbol; instance = get_implicit_cast_expression (instance, instance_expression_type, instance_target_type); } diff --git a/gobject/valaccodegeneratormemberaccess.vala b/gobject/valaccodegeneratormemberaccess.vala index 5934181..cde1035 100644 --- a/gobject/valaccodegeneratormemberaccess.vala +++ b/gobject/valaccodegeneratormemberaccess.vala @@ -24,7 +24,7 @@ using GLib; public class Vala.CCodeGenerator { - private void process_cmember (MemberAccess! expr, CCodeExpression pub_inst, DataType base_type) { + private void process_cmember (MemberAccess! expr, CCodeExpression pub_inst, Typesymbol base_type) { if (expr.symbol_reference is Method) { var m = (Method) expr.symbol_reference; @@ -78,7 +78,7 @@ public class Vala.CCodeGenerator { var instance_expression_type = new TypeReference (); instance_expression_type.data_type = base_type; var instance_target_type = new TypeReference (); - instance_target_type.data_type = (DataType) f.parent_symbol; + instance_target_type.data_type = (Typesymbol) f.parent_symbol; CCodeExpression typed_inst = get_implicit_cast_expression (pub_inst, instance_expression_type, instance_target_type); bool is_gtypeinstance = (instance_target_type.data_type.is_subtype_of (gtypeinstance_type)); @@ -110,7 +110,7 @@ public class Vala.CCodeGenerator { } else if (prop.base_interface_property != null) { base_property = prop.base_interface_property; } - var base_property_type = (DataType) base_property.parent_symbol; + var base_property_type = (Typesymbol) base_property.parent_symbol; var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_get_%s".printf (base_property_type.get_lower_case_cname (null), base_property.name))); var instance_expression_type = new TypeReference (); @@ -166,7 +166,7 @@ public class Vala.CCodeGenerator { } } else if (expr.symbol_reference is Signal) { var sig = (Signal) expr.symbol_reference; - var cl = (DataType) sig.parent_symbol; + var cl = (Typesymbol) sig.parent_symbol; if (sig.has_emitter) { var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_%s".printf (cl.get_lower_case_cname (null), sig.name))); @@ -195,14 +195,14 @@ public class Vala.CCodeGenerator { public override void visit_member_access (MemberAccess! expr) { CCodeExpression pub_inst = null; - DataType base_type = null; + Typesymbol base_type = null; if (expr.inner == null) { pub_inst = new CCodeIdentifier ("self"); if (current_type_symbol != null) { /* base type is available if this is a type method */ - base_type = (DataType) current_type_symbol; + base_type = (Typesymbol) current_type_symbol; if (!base_type.is_reference_type ()) { pub_inst = new CCodeIdentifier ("(*self)"); diff --git a/gobject/valaccodegeneratormethod.vala b/gobject/valaccodegeneratormethod.vala index dff2d39..c92fddc 100644 --- a/gobject/valaccodegeneratormethod.vala +++ b/gobject/valaccodegeneratormethod.vala @@ -122,11 +122,11 @@ public class Vala.CCodeGenerator { this_type.data_type = find_parent_type (m); if (m.base_interface_method != null && !m.is_abstract && !m.is_virtual) { var base_type = new TypeReference (); - base_type.data_type = (DataType) m.base_interface_method.parent_symbol; + base_type.data_type = (Typesymbol) m.base_interface_method.parent_symbol; instance_param = new CCodeFormalParameter ("base", base_type.get_cname ()); } else if (m.overrides) { var base_type = new TypeReference (); - base_type.data_type = (DataType) m.base_method.parent_symbol; + base_type.data_type = (Typesymbol) m.base_method.parent_symbol; instance_param = new CCodeFormalParameter ("base", base_type.get_cname ()); } else { if (m.parent_symbol is Struct && !((Struct) m.parent_symbol).is_simple_type ()) { @@ -381,7 +381,7 @@ public class Vala.CCodeGenerator { vfunc.line = function.line; var this_type = new TypeReference (); - this_type.data_type = (DataType) m.parent_symbol; + this_type.data_type = (Typesymbol) m.parent_symbol; var cparam = new CCodeFormalParameter ("self", this_type.get_cname ()); vfunc.add_parameter (cparam); @@ -532,11 +532,11 @@ public class Vala.CCodeGenerator { } } - private CCodeStatement create_method_type_check_statement (Method! m, DataType! t, bool non_null, string! var_name) { + private CCodeStatement create_method_type_check_statement (Method! m, Typesymbol! t, bool non_null, string! var_name) { return create_type_check_statement (m, m.return_type.data_type, t, non_null, var_name); } - private CCodeStatement create_property_type_check_statement (Property! prop, bool getter, DataType! t, bool non_null, string! var_name) { + private CCodeStatement create_property_type_check_statement (Property! prop, bool getter, Typesymbol! t, bool non_null, string! var_name) { if (getter) { return create_type_check_statement (prop, prop.type_reference.data_type, t, non_null, var_name); } else { @@ -544,7 +544,7 @@ public class Vala.CCodeGenerator { } } - private CCodeStatement create_type_check_statement (CodeNode! method_node, DataType ret_type, DataType! t, bool non_null, string! var_name) { + private CCodeStatement create_type_check_statement (CodeNode! method_node, Typesymbol ret_type, Typesymbol! t, bool non_null, string! var_name) { var ccheck = new CCodeFunctionCall (); if ((t is Class && ((Class) t).is_subtype_of (gobject_type)) || (t is Interface && !((Interface) t).declaration_only)) { @@ -583,7 +583,7 @@ public class Vala.CCodeGenerator { return new CCodeExpressionStatement (ccheck); } - private CCodeExpression default_value_for_type (DataType! type) { + private CCodeExpression default_value_for_type (Typesymbol! type) { if (type.is_reference_type () || type is Pointer) { return new CCodeConstant ("NULL"); } else if (type.get_default_value () != null) { @@ -592,10 +592,10 @@ public class Vala.CCodeGenerator { return null; } - private DataType find_parent_type (Symbol sym) { + private Typesymbol find_parent_type (Symbol sym) { while (sym != null) { - if (sym is DataType) { - return (DataType) sym; + if (sym is Typesymbol) { + return (Typesymbol) sym; } sym = sym.parent_symbol; } diff --git a/gobject/valaccodegeneratorsignal.vala b/gobject/valaccodegeneratorsignal.vala index 54a326e..a7d2141 100644 --- a/gobject/valaccodegeneratorsignal.vala +++ b/gobject/valaccodegeneratorsignal.vala @@ -107,7 +107,7 @@ public class Vala.CCodeGenerator { public override void visit_signal (Signal! sig) { // parent_symbol may be null for late bound signals if (sig.parent_symbol != null) { - var dt = sig.parent_symbol as DataType; + var dt = sig.parent_symbol as Typesymbol; if (!dt.is_subtype_of (gobject_type)) { sig.error = true; Report.error (sig.source_reference, "Only classes and interfaces deriving from GLib.Object support signals. `%s' does not derive from GLib.Object.".printf (dt.get_full_name ())); diff --git a/gobject/valaclassregisterfunction.vala b/gobject/valaclassregisterfunction.vala index 7729fc5..98b9a04 100644 --- a/gobject/valaclassregisterfunction.vala +++ b/gobject/valaclassregisterfunction.vala @@ -41,7 +41,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { class_reference = cl; } - public override DataType! get_type_declaration () { + public override Typesymbol! get_type_declaration () { return class_reference; } diff --git a/gobject/valadbusbindingprovider.vala b/gobject/valadbusbindingprovider.vala index cdaeba7..7f992bf 100644 --- a/gobject/valadbusbindingprovider.vala +++ b/gobject/valadbusbindingprovider.vala @@ -31,20 +31,20 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { set { _context = value; - string_type = (DataType) _context.root.scope.lookup ("string"); + string_type = (Typesymbol) _context.root.scope.lookup ("string"); var dbus_ns = _context.root.scope.lookup ("DBus"); if (dbus_ns != null) { - connection_type = (DataType) dbus_ns.scope.lookup ("Connection"); - dbus_error_type = (DataType) dbus_ns.scope.lookup ("Error"); + connection_type = (Typesymbol) dbus_ns.scope.lookup ("Connection"); + dbus_error_type = (Typesymbol) dbus_ns.scope.lookup ("Error"); } } } private CodeContext _context; - private DataType string_type; - private DataType connection_type; - private DataType dbus_error_type; + private Typesymbol string_type; + private Typesymbol connection_type; + private Typesymbol dbus_error_type; private Collection symbols = new ArrayList (); @@ -106,7 +106,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { return null; } - private bool is_dbus_interface (DataType! t) { + private bool is_dbus_interface (Typesymbol! t) { if (!(t is Interface)) { return false; } diff --git a/gobject/valainterfaceregisterfunction.vala b/gobject/valainterfaceregisterfunction.vala index 7d75fd9..5599521 100644 --- a/gobject/valainterfaceregisterfunction.vala +++ b/gobject/valainterfaceregisterfunction.vala @@ -36,7 +36,7 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction { interface_reference = iface; } - public override DataType! get_type_declaration () { + public override Typesymbol! get_type_declaration () { return interface_reference; } diff --git a/gobject/valatyperegisterfunction.vala b/gobject/valatyperegisterfunction.vala index 5ffdad1..ee52df1 100644 --- a/gobject/valatyperegisterfunction.vala +++ b/gobject/valatyperegisterfunction.vala @@ -137,7 +137,7 @@ public abstract class Vala.TypeRegisterFunction : Object { * * @return type to be registered */ - public abstract DataType! get_type_declaration (); + public abstract Typesymbol! get_type_declaration (); /** * Returns the name of the type struct in C code. diff --git a/vala/Makefile.am b/vala/Makefile.am index 9e8ee2d..099e0ce 100644 --- a/vala/Makefile.am +++ b/vala/Makefile.am @@ -43,7 +43,6 @@ libvalacore_la_VALASOURCES = \ valaconstructor.vala \ valacontinuestatement.vala \ valacreationmethod.vala \ - valadatatype.vala \ valadeclarationstatement.vala \ valadestructor.vala \ valadostatement.vala \ @@ -113,6 +112,7 @@ libvalacore_la_VALASOURCES = \ valatypeofexpression.vala \ valatypeparameter.vala \ valatypereference.vala \ + valatypesymbol.vala \ valaunaryexpression.vala \ valavariabledeclarator.vala \ valawhilestatement.vala \ diff --git a/vala/valaarray.vala b/vala/valaarray.vala index 34b4d1d..cf800fa 100644 --- a/vala/valaarray.vala +++ b/vala/valaarray.vala @@ -27,12 +27,12 @@ using Gee; /** * Represents an array type i.e. everything with direct accessable elements. */ -public class Vala.Array : DataType { +public class Vala.Array : Typesymbol { /** - * DataType of which this is an array of. + * Typesymbol of which this is an array of. */ - public weak DataType element_type { get; set construct; } + public weak Typesymbol element_type { get; set construct; } /** * TypeParameter of which this is an array of. @@ -50,7 +50,7 @@ public class Vala.Array : DataType { private ArrayResizeMethod resize_method; private ArrayMoveMethod move_method; - public Array (DataType! _element_type, int _rank, SourceReference _source_reference) { + public Array (Typesymbol! _element_type, int _rank, SourceReference _source_reference) { rank = _rank; element_type = _element_type; source_reference = _source_reference; @@ -159,7 +159,7 @@ public class Vala.Array : DataType { var root_symbol = source_reference.file.context.root; length_field.type_reference = new TypeReference (); - length_field.type_reference.data_type = (DataType) root_symbol.scope.lookup ("int"); + length_field.type_reference.data_type = (Typesymbol) root_symbol.scope.lookup ("int"); } return length_field; @@ -176,7 +176,7 @@ public class Vala.Array : DataType { var root_symbol = source_reference.file.context.root; var int_type = new TypeReference (); - int_type.data_type = (DataType) root_symbol.scope.lookup ("int"); + int_type.data_type = (Typesymbol) root_symbol.scope.lookup ("int"); resize_method.add_parameter (new FormalParameter ("length", int_type)); @@ -196,7 +196,7 @@ public class Vala.Array : DataType { var root_symbol = source_reference.file.context.root; var int_type = new TypeReference (); - int_type.data_type = (DataType) root_symbol.scope.lookup ("int"); + int_type.data_type = (Typesymbol) root_symbol.scope.lookup ("int"); move_method.add_parameter (new FormalParameter ("src", int_type)); move_method.add_parameter (new FormalParameter ("dest", int_type)); diff --git a/vala/valacallback.vala b/vala/valacallback.vala index 4d493e7..521a63b 100644 --- a/vala/valacallback.vala +++ b/vala/valacallback.vala @@ -26,7 +26,7 @@ using Gee; /** * Represents a function callback type. */ -public class Vala.Callback : DataType { +public class Vala.Callback : Typesymbol { /** * The return type of this callback. */ diff --git a/vala/valaclass.vala b/vala/valaclass.vala index 9349809..eff636e 100644 --- a/vala/valaclass.vala +++ b/vala/valaclass.vala @@ -26,7 +26,7 @@ using Gee; /** * Represents a class declaration in the source code. */ -public class Vala.Class : DataType { +public class Vala.Class : Typesymbol { /** * Specifies the base class. */ @@ -566,7 +566,7 @@ public class Vala.Class : DataType { this.free_function = name; } - public override bool is_subtype_of (DataType! t) { + public override bool is_subtype_of (Typesymbol! t) { if (this == t) { return true; } diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index effafcf..ca99f1e 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -67,11 +67,11 @@ public class Vala.CreationMethod : Method { public override string! get_default_cname () { var parent = parent_symbol; - assert (parent is DataType); + assert (parent is Typesymbol); if (name.len () == ".new".len ()) { - return "%snew".printf (((DataType) parent).get_lower_case_cprefix ()); + return "%snew".printf (((Typesymbol) parent).get_lower_case_cprefix ()); } else { - return "%snew_%s".printf (((DataType) parent).get_lower_case_cprefix (), name.offset (".new.".len ())); + return "%snew_%s".printf (((Typesymbol) parent).get_lower_case_cprefix (), name.offset (".new.".len ())); } } } diff --git a/vala/valaenum.vala b/vala/valaenum.vala index 1c8b4db..76a29e1 100644 --- a/vala/valaenum.vala +++ b/vala/valaenum.vala @@ -26,7 +26,7 @@ using Gee; /** * Represents an enum declaration in the source code. */ -public class Vala.Enum : DataType { +public class Vala.Enum : Typesymbol { /** * Specifies whether this is a flags enum. */ diff --git a/vala/valainstancecast.vala b/vala/valainstancecast.vala index 3f344b8..137b2da 100644 --- a/vala/valainstancecast.vala +++ b/vala/valainstancecast.vala @@ -1,6 +1,6 @@ /* valainstancecast.vala * - * Copyright (C) 2006 Jürg Billeter + * Copyright (C) 2006-2007 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,7 +29,7 @@ public class Vala.InstanceCast : CCodeFunctionCall { /** * The target type. */ - public weak DataType! type_reference { get; set construct; } + public weak Typesymbol! type_reference { get; set construct; } /** * The expression to be cast. @@ -43,7 +43,7 @@ public class Vala.InstanceCast : CCodeFunctionCall { * @param type the target type * @return newly created instance cast expression */ - public InstanceCast (CCodeExpression! expr, DataType! type) { + public InstanceCast (CCodeExpression! expr, Typesymbol! type) { inner = expr; type_reference = type; } diff --git a/vala/valainterface.vala b/vala/valainterface.vala index 857f552..ea3b23e 100644 --- a/vala/valainterface.vala +++ b/vala/valainterface.vala @@ -26,7 +26,7 @@ using Gee; /** * Represents a class declaration in the source code. */ -public class Vala.Interface : DataType { +public class Vala.Interface : Typesymbol { /** * Specifies whether this interface is static. Static interfaces are not * available at run-time. They can be implemented by structs. @@ -290,7 +290,7 @@ public class Vala.Interface : DataType { return "g_object_unref"; } - public override bool is_subtype_of (DataType! t) { + public override bool is_subtype_of (Typesymbol! t) { if (this == t) { return true; } diff --git a/vala/valainterfacewriter.vala b/vala/valainterfacewriter.vala index 2ea1e5d..60e4362 100644 --- a/vala/valainterfacewriter.vala +++ b/vala/valainterfacewriter.vala @@ -516,7 +516,7 @@ public class Vala.InterfaceWriter : CodeVisitor { if (m is CreationMethod) { write_string (" "); - var datatype = (DataType) m.parent_symbol; + var datatype = (Typesymbol) m.parent_symbol; write_identifier (datatype.name); write_identifier (m.name.offset (".new".len ())); } else if (!m.instance) { diff --git a/vala/valapointer.vala b/vala/valapointer.vala index 43a74c0..5d58cab 100644 --- a/vala/valapointer.vala +++ b/vala/valapointer.vala @@ -26,15 +26,15 @@ using Gee; /** * Represents a pointer-type. */ -public class Vala.Pointer : DataType { +public class Vala.Pointer : Typesymbol { /** * The type to which this pointer type points. */ - public weak DataType! referent_type { get; set construct; } + public weak Typesymbol! referent_type { get; set construct; } private string cname; - public Pointer (construct DataType! referent_type, construct SourceReference source_reference = null) { + public Pointer (construct Typesymbol! referent_type, construct SourceReference source_reference = null) { } construct { diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 767a6ab..e4bd3de 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -51,16 +51,16 @@ public class Vala.SemanticAnalyzer : CodeVisitor { TypeReference ulong_type; TypeReference unichar_type; TypeReference type_type; - DataType pointer_type; - DataType object_type; - DataType initially_unowned_type; - DataType glist_type; - DataType gslist_type; - DataType gerror_type; - DataType iterable_type; - DataType iterator_type; - DataType list_type; - DataType map_type; + Typesymbol pointer_type; + Typesymbol object_type; + Typesymbol initially_unowned_type; + Typesymbol glist_type; + Typesymbol gslist_type; + Typesymbol gerror_type; + Typesymbol iterable_type; + Typesymbol iterator_type; + Typesymbol list_type; + Typesymbol map_type; private int next_lambda_id = 0; @@ -85,46 +85,46 @@ public class Vala.SemanticAnalyzer : CodeVisitor { root_symbol = context.root; bool_type = new TypeReference (); - bool_type.data_type = (DataType) root_symbol.scope.lookup ("bool"); + bool_type.data_type = (Typesymbol) root_symbol.scope.lookup ("bool"); string_type = new TypeReference (); - string_type.data_type = (DataType) root_symbol.scope.lookup ("string"); + string_type.data_type = (Typesymbol) root_symbol.scope.lookup ("string"); - pointer_type = (DataType) root_symbol.scope.lookup ("pointer"); + pointer_type = (Typesymbol) root_symbol.scope.lookup ("pointer"); int_type = new TypeReference (); - int_type.data_type = (DataType) root_symbol.scope.lookup ("int"); + int_type.data_type = (Typesymbol) root_symbol.scope.lookup ("int"); uint_type = new TypeReference (); - uint_type.data_type = (DataType) root_symbol.scope.lookup ("uint"); + uint_type.data_type = (Typesymbol) root_symbol.scope.lookup ("uint"); ulong_type = new TypeReference (); - ulong_type.data_type = (DataType) root_symbol.scope.lookup ("ulong"); + ulong_type.data_type = (Typesymbol) root_symbol.scope.lookup ("ulong"); unichar_type = new TypeReference (); - unichar_type.data_type = (DataType) root_symbol.scope.lookup ("unichar"); + unichar_type.data_type = (Typesymbol) root_symbol.scope.lookup ("unichar"); // TODO: don't require GLib namespace in semantic analyzer var glib_ns = root_symbol.scope.lookup ("GLib"); if (glib_ns != null) { - object_type = (DataType) glib_ns.scope.lookup ("Object"); - initially_unowned_type = (DataType) glib_ns.scope.lookup ("InitiallyUnowned"); + object_type = (Typesymbol) glib_ns.scope.lookup ("Object"); + initially_unowned_type = (Typesymbol) glib_ns.scope.lookup ("InitiallyUnowned"); type_type = new TypeReference (); - type_type.data_type = (DataType) glib_ns.scope.lookup ("Type"); + type_type.data_type = (Typesymbol) glib_ns.scope.lookup ("Type"); - glist_type = (DataType) glib_ns.scope.lookup ("List"); - gslist_type = (DataType) glib_ns.scope.lookup ("SList"); + glist_type = (Typesymbol) glib_ns.scope.lookup ("List"); + gslist_type = (Typesymbol) glib_ns.scope.lookup ("SList"); - gerror_type = (DataType) glib_ns.scope.lookup ("Error"); + gerror_type = (Typesymbol) glib_ns.scope.lookup ("Error"); } var gee_ns = root_symbol.scope.lookup ("Gee"); if (gee_ns != null) { - iterable_type = (DataType) gee_ns.scope.lookup ("Iterable"); - iterator_type = (DataType) gee_ns.scope.lookup ("Iterator"); - list_type = (DataType) gee_ns.scope.lookup ("List"); - map_type = (DataType) gee_ns.scope.lookup ("Map"); + iterable_type = (Typesymbol) gee_ns.scope.lookup ("Iterable"); + iterator_type = (Typesymbol) gee_ns.scope.lookup ("Iterator"); + list_type = (Typesymbol) gee_ns.scope.lookup ("List"); + map_type = (Typesymbol) gee_ns.scope.lookup ("Map"); } current_symbol = root_symbol; @@ -157,7 +157,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { cl.accept_children (this); /* gather all prerequisites */ - Gee.List prerequisites = new ArrayList (); + Gee.List prerequisites = new ArrayList (); foreach (TypeReference base_type in cl.get_base_types ()) { if (base_type.data_type is Interface) { get_all_prerequisites ((Interface) base_type.data_type, prerequisites); @@ -165,7 +165,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } /* check whether all prerequisites are met */ Gee.List missing_prereqs = new ArrayList (); - foreach (DataType prereq in prerequisites) { + foreach (Typesymbol prereq in prerequisites) { if (!class_is_a (cl, prereq)) { missing_prereqs.insert (0, prereq.get_full_name ()); } @@ -234,9 +234,9 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_class = null; } - private void get_all_prerequisites (Interface! iface, Collection list) { + private void get_all_prerequisites (Interface! iface, Collection list) { foreach (TypeReference prereq in iface.get_prerequisites ()) { - DataType type = prereq.data_type; + Typesymbol type = prereq.data_type; /* skip on previous errors */ if (type == null) { continue; @@ -250,7 +250,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private bool class_is_a (Class! cl, DataType! t) { + private bool class_is_a (Class! cl, Typesymbol! t) { if (cl == t) { return true; } @@ -288,7 +288,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { /* check prerequisites */ Class prereq_class; foreach (TypeReference prereq in iface.get_prerequisites ()) { - DataType class_or_interface = prereq.data_type; + Typesymbol class_or_interface = prereq.data_type; /* skip on previous errors */ if (class_or_interface == null) { iface.error = true; @@ -448,7 +448,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } if (current_symbol is Class) { - m.return_type.data_type = (DataType) m.parent_symbol; + m.return_type.data_type = (Typesymbol) m.parent_symbol; m.return_type.transfers_ownership = true; // check for floating reference @@ -637,7 +637,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { public override void visit_constructor (Constructor! c) { c.this_parameter = new FormalParameter ("this", new TypeReference ()); - c.this_parameter.type_reference.data_type = (DataType) current_symbol; + c.this_parameter.type_reference.data_type = (Typesymbol) current_symbol; c.scope.add (c.this_parameter.name, c.this_parameter); c.owner = current_symbol.scope; @@ -1176,17 +1176,17 @@ public class Vala.SemanticAnalyzer : CodeVisitor { public override void visit_character_literal (CharacterLiteral! expr) { expr.static_type = new TypeReference (); - expr.static_type.data_type = (DataType) root_symbol.scope.lookup ("char"); + expr.static_type.data_type = (Typesymbol) root_symbol.scope.lookup ("char"); } public override void visit_integer_literal (IntegerLiteral! expr) { expr.static_type = new TypeReference (); - expr.static_type.data_type = (DataType) root_symbol.scope.lookup (expr.get_type_name ()); + expr.static_type.data_type = (Typesymbol) root_symbol.scope.lookup (expr.get_type_name ()); } public override void visit_real_literal (RealLiteral! expr) { expr.static_type = new TypeReference (); - expr.static_type.data_type = (DataType) root_symbol.scope.lookup (expr.get_type_name ()); + expr.static_type.data_type = (Typesymbol) root_symbol.scope.lookup (expr.get_type_name ()); } public override void visit_string_literal (StringLiteral! expr) { @@ -1226,7 +1226,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return decl.type_reference; } else if (sym is EnumValue) { var type = new TypeReference (); - type.data_type = (DataType) sym.parent_symbol; + type.data_type = (Typesymbol) sym.parent_symbol; return type; } return null; @@ -1360,12 +1360,12 @@ public class Vala.SemanticAnalyzer : CodeVisitor { if (expr.inner is MemberAccess || expr.inner is BaseAccess) { base_symbol = expr.inner.symbol_reference; - if (expr.creation_member && base_symbol is DataType) { + if (expr.creation_member && base_symbol is Typesymbol) { // check for named creation method expr.symbol_reference = base_symbol.scope.lookup (".new." + expr.member_name); } - if (expr.symbol_reference == null && (base_symbol is Namespace || base_symbol is DataType)) { + if (expr.symbol_reference == null && (base_symbol is Namespace || base_symbol is Typesymbol)) { expr.symbol_reference = base_symbol.scope.lookup (expr.member_name); if (expr.inner is BaseAccess) { // inner expression is base access @@ -1897,7 +1897,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { public override void visit_object_creation_expression (ObjectCreationExpression! expr) { expr.accept_children (this); - DataType type = null; + Typesymbol type = null; if (expr.type_reference == null) { if (expr.member_name == null) { @@ -1936,9 +1936,9 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } if (type_sym is Class || type_sym is Struct) { - type = (DataType) type_sym; + type = (Typesymbol) type_sym; } else if (type_sym is Enum && ((Enum) type_sym).error_domain) { - type = (DataType) type_sym; + type = (Typesymbol) type_sym; } else { expr.error = true; Report.error (expr.source_reference, "`%s' is not a class, struct, or error domain".printf (type_sym.get_full_name ())); diff --git a/vala/valasignal.vala b/vala/valasignal.vala index a880ad5..4a7152a 100644 --- a/vala/valasignal.vala +++ b/vala/valasignal.vala @@ -88,7 +88,7 @@ public class Vala.Signal : Member, Invokable, Lockable { generated_callback.instance = true; var sender_type = new TypeReference (); - sender_type.data_type = (DataType) parent_symbol; + sender_type.data_type = (Typesymbol) parent_symbol; var sender_param = new FormalParameter ("sender", sender_type); generated_callback.add_parameter (sender_param); diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index 3bebc72..6552c84 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -231,7 +231,7 @@ public class Vala.SourceFile : Object { Symbol s; - if (sym is DataType || + if (sym is Typesymbol || sym is Method || sym is Field || sym is Property || @@ -269,7 +269,7 @@ public class Vala.SourceFile : Object { return; } - if (dep_type == SourceFileDependencyType.HEADER_FULL || (s is DataType && !((DataType)s).is_reference_type ())) { + if (dep_type == SourceFileDependencyType.HEADER_FULL || (s is Typesymbol && !((Typesymbol)s).is_reference_type ())) { foreach (string fn in s.get_cheader_filenames ()) { header_internal_includes.add (fn); } diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 127e701..744ff6f 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -26,7 +26,7 @@ using Gee; /** * Represents a struct declaration in the source code. */ -public class Vala.Struct : DataType { +public class Vala.Struct : Typesymbol { private Gee.List type_parameters = new ArrayList (); private Gee.List constants = new ArrayList (); private Gee.List fields = new ArrayList (); diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala index b1f6095..6b88243 100644 --- a/vala/valasymbolresolver.vala +++ b/vala/valasymbolresolver.vala @@ -193,7 +193,7 @@ public class Vala.SymbolResolver : CodeVisitor { while (sym == null && scope != null) { sym = scope.lookup (type.type_name); scope = scope.parent_scope; - if (sym != null && !(sym is DataType) && !(sym is TypeParameter)) { + if (sym != null && !(sym is Typesymbol) && !(sym is TypeParameter)) { // ignore non-type symbols sym = null; } @@ -220,8 +220,8 @@ public class Vala.SymbolResolver : CodeVisitor { } if (sym is TypeParameter) { type.type_parameter = (TypeParameter) sym; - } else if (sym is DataType) { - type.data_type = (DataType) sym; + } else if (sym is Typesymbol) { + type.data_type = (Typesymbol) sym; } else { Report.error (type.source_reference, "`%s' is not a type".printf (sym.get_full_name ())); return; @@ -239,8 +239,8 @@ public class Vala.SymbolResolver : CodeVisitor { Report.error (type.source_reference, "The type name `%s' does not exist in the namespace `%s'".printf (type.type_name, type.namespace_name)); return; } - if (sym is DataType) { - type.data_type = (DataType) sym; + if (sym is Typesymbol) { + type.data_type = (Typesymbol) sym; } else { Report.error (type.source_reference, "`%s' is not a type".printf (sym.get_full_name ())); return; diff --git a/vala/valatypeparameter.vala b/vala/valatypeparameter.vala index 1bb8eee..3f51c47 100644 --- a/vala/valatypeparameter.vala +++ b/vala/valatypeparameter.vala @@ -30,7 +30,7 @@ public class Vala.TypeParameter : Symbol { /** * The generic type declaring this parameter. */ - public weak DataType type; + public weak Typesymbol type; /* holds the array types of this type; each rank is a separate one */ private Map array_types; diff --git a/vala/valatypereference.vala b/vala/valatypereference.vala index a7e71a0..307962c 100644 --- a/vala/valatypereference.vala +++ b/vala/valatypereference.vala @@ -58,7 +58,7 @@ public class Vala.TypeReference : CodeNode { /** * The referred data type. */ - public weak DataType data_type { get; set; } + public weak Typesymbol data_type { get; set; } /** * The referred generic type parameter. @@ -241,7 +241,7 @@ public class Vala.TypeReference : CodeNode { */ public string get_const_cname () { string ptr; - DataType t; + Typesymbol t; /* FIXME: dirty hack to make constant arrays possible */ if (data_type is Array) { t = ((Array) data_type).element_type; diff --git a/vala/valadatatype.vala b/vala/valatypesymbol.vala similarity index 98% rename from vala/valadatatype.vala rename to vala/valatypesymbol.vala index 2c4bf33..a81d8a5 100644 --- a/vala/valadatatype.vala +++ b/vala/valatypesymbol.vala @@ -28,7 +28,7 @@ using Gee; * Represents a runtime data type. This data type may be defined in Vala source * code or imported from an external library with a Vala API file. */ -public abstract class Vala.DataType : Symbol { +public abstract class Vala.Typesymbol : Symbol { private Gee.List cheader_filenames = new ArrayList (); private Pointer pointer_type; @@ -260,7 +260,7 @@ public abstract class Vala.DataType : Symbol { * @param t a data type * @return true if t is a supertype of this data type, false otherwise */ - public virtual bool is_subtype_of (DataType! t) { + public virtual bool is_subtype_of (Typesymbol! t) { return (this == t); } diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 31ce76e..a4c00fe 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -35,12 +35,12 @@ public class Vala.GIdlParser : CodeVisitor { private SourceReference current_source_reference; private Namespace current_namespace; - private DataType current_data_type; + private Typesymbol current_data_type; private Map codenode_attributes_map; private Map codenode_attributes_patterns; private Gee.Set current_type_symbol_set; - private Map cname_type_map; + private Map cname_type_map; /** * Parse all source files in the specified code context and build a @@ -49,7 +49,7 @@ public class Vala.GIdlParser : CodeVisitor { * @param context a code context */ public void parse (CodeContext! context) { - cname_type_map = new HashMap (str_hash, str_equal); + cname_type_map = new HashMap (str_hash, str_equal); this.context = context; context.accept (this); @@ -81,7 +81,7 @@ public class Vala.GIdlParser : CodeVisitor { visit_type (cb); } - private void visit_type (DataType! t) { + private void visit_type (Typesymbol! t) { if (!cname_type_map.contains (t.get_cname ())) { cname_type_map[t.get_cname ()] = t; }