Commit 9a1d658b authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Use Gee.List instead of Gee.Collection to improve iteration performance

2008-05-29  Juerg Billeter  <j@bitron.ch>

	* vala/valablock.vala:
	* vala/valaclass.vala:
	* vala/valacodecontext.vala:
	* vala/valacodenode.vala:
	* vala/valadatatype.vala:
	* vala/valadelegatetype.vala:
	* vala/valadynamicmethod.vala:
	* vala/valadynamicproperty.vala:
	* vala/valaenum.vala:
	* vala/valaerrordomain.vala:
	* vala/valaforstatement.vala:
	* vala/valainitializerlist.vala:
	* vala/valainterface.vala:
	* vala/valainterfacewriter.vala:
	* vala/valainvocationexpression.vala:
	* vala/valalambdaexpression.vala:
	* vala/valamember.vala:
	* vala/valamemberaccess.vala:
	* vala/valamethod.vala:
	* vala/valamethodtype.vala:
	* vala/valanamespace.vala:
	* vala/valaobjectcreationexpression.vala:
	* vala/valaobjecttypesymbol.vala:
	* vala/valapointertype.vala:
	* vala/valasemanticanalyzer.vala:
	* vala/valasignaltype.vala:
	* vala/valasourcefile.vala:
	* vala/valastruct.vala:
	* vala/valaswitchsection.vala:
	* vala/valaswitchstatement.vala:
	* vala/valasymbol.vala:
	* vala/valasymbolresolver.vala:
	* vala/valatypesymbol.vala:
	* ccode/valaccodecommaexpression.vala:
	* ccode/valaccodefragment.vala:
	* gobject/valaccodeassignmentbinding.vala:
	* gobject/valaccodeelementaccessbinding.vala:
	* gobject/valaccodegenerator.vala:
	* gobject/valaccodegeneratorsignal.vala:
	* gobject/valaccodeinvocationexpressionbinding.vala:
	* gobject/valagidlwriter.vala:

	Use Gee.List instead of Gee.Collection to improve iteration
	performance

svn path=/trunk/; revision=1493
parent b827b516
2008-05-29 Jürg Billeter <j@bitron.ch>
* vala/valablock.vala:
* vala/valaclass.vala:
* vala/valacodecontext.vala:
* vala/valacodenode.vala:
* vala/valadatatype.vala:
* vala/valadelegatetype.vala:
* vala/valadynamicmethod.vala:
* vala/valadynamicproperty.vala:
* vala/valaenum.vala:
* vala/valaerrordomain.vala:
* vala/valaforstatement.vala:
* vala/valainitializerlist.vala:
* vala/valainterface.vala:
* vala/valainterfacewriter.vala:
* vala/valainvocationexpression.vala:
* vala/valalambdaexpression.vala:
* vala/valamember.vala:
* vala/valamemberaccess.vala:
* vala/valamethod.vala:
* vala/valamethodtype.vala:
* vala/valanamespace.vala:
* vala/valaobjectcreationexpression.vala:
* vala/valaobjecttypesymbol.vala:
* vala/valapointertype.vala:
* vala/valasemanticanalyzer.vala:
* vala/valasignaltype.vala:
* vala/valasourcefile.vala:
* vala/valastruct.vala:
* vala/valaswitchsection.vala:
* vala/valaswitchstatement.vala:
* vala/valasymbol.vala:
* vala/valasymbolresolver.vala:
* vala/valatypesymbol.vala:
* ccode/valaccodecommaexpression.vala:
* ccode/valaccodefragment.vala:
* gobject/valaccodeassignmentbinding.vala:
* gobject/valaccodeelementaccessbinding.vala:
* gobject/valaccodegenerator.vala:
* gobject/valaccodegeneratorsignal.vala:
* gobject/valaccodeinvocationexpressionbinding.vala:
* gobject/valagidlwriter.vala:
Use Gee.List instead of Gee.Collection to improve iteration
performance
2008-05-29 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala:
......
......@@ -38,8 +38,8 @@ public class Vala.CCodeCommaExpression : CCodeExpression {
inner.add (expr);
}
public Collection<CCodeExpression> get_inner () {
return new ReadOnlyCollection<CCodeExpression> (inner);
public Gee.List<CCodeExpression> get_inner () {
return new ReadOnlyList<CCodeExpression> (inner);
}
public override void write (CCodeWriter writer) {
......
......@@ -43,8 +43,8 @@ public class Vala.CCodeFragment : CCodeNode {
*
* @return children list
*/
public Collection<CCodeNode> get_children () {
return new ReadOnlyCollection<CCodeNode> (children);
public Gee.List<CCodeNode> get_children () {
return new ReadOnlyList<CCodeNode> (children);
}
public override void write (CCodeWriter writer) {
......
......@@ -213,7 +213,7 @@ public class Vala.CCodeAssignmentBinding : CCodeExpressionBinding {
var expr = (ElementAccess) assignment.left;
var container_type = expr.container.value_type.data_type;
Collection<Expression> indices = expr.get_indices ();
Gee.List<Expression> indices = expr.get_indices ();
Iterator<Expression> indices_it = indices.iterator ();
indices_it.next ();
......@@ -230,7 +230,7 @@ public class Vala.CCodeAssignmentBinding : CCodeExpressionBinding {
collection_iface = codegen.map_type;
}
var set_method = (Method) collection_iface.scope.lookup ("set");
Collection<FormalParameter> set_params = set_method.get_parameters ();
Gee.List<FormalParameter> set_params = set_method.get_parameters ();
Iterator<FormalParameter> set_params_it = set_params.iterator ();
set_params_it.next ();
var set_param = set_params_it.get ();
......
......@@ -72,7 +72,7 @@ public class Vala.CCodeElementAccessBinding : CCodeExpressionBinding {
collection_iface = codegen.map_type;
}
var get_method = (Method) collection_iface.scope.lookup ("get");
Collection<FormalParameter> get_params = get_method.get_parameters ();
Gee.List<FormalParameter> get_params = get_method.get_parameters ();
Iterator<FormalParameter> get_params_it = get_params.iterator ();
get_params_it.next ();
var get_param = get_params_it.get ();
......
......@@ -1502,7 +1502,7 @@ public class Vala.CCodeGenerator : CodeGenerator {
temp_ref_vars.clear ();
}
private void append_temp_decl (CCodeFragment cfrag, Collection<LocalVariable> temp_vars) {
private void append_temp_decl (CCodeFragment cfrag, Gee.List<LocalVariable> temp_vars) {
foreach (LocalVariable local in temp_vars) {
var cdecl = new CCodeDeclaration (local.variable_type.get_cname ());
......@@ -1643,7 +1643,7 @@ public class Vala.CCodeGenerator : CodeGenerator {
temp_ref_vars.clear ();
}
private void create_temp_decl (Statement stmt, Collection<LocalVariable> temp_vars) {
private void create_temp_decl (Statement stmt, Gee.List<LocalVariable> temp_vars) {
/* declare temporary variables */
if (temp_vars.size == 0) {
......@@ -1727,7 +1727,7 @@ public class Vala.CCodeGenerator : CodeGenerator {
cswitchblock.append (new CCodeExpressionStatement (cinit));
create_temp_decl (stmt, stmt.expression.temp_vars);
Collection<Statement> default_statements = null;
Gee.List<Statement> default_statements = null;
var label_count = 0;
// generate nested if statements
......
......@@ -50,7 +50,7 @@ public class Vala.CCodeGenerator {
}
}
public string get_marshaller_function (Collection<FormalParameter> params, DataType return_type, string? prefix = null) {
public string get_marshaller_function (Gee.List<FormalParameter> params, DataType return_type, string? prefix = null) {
var signature = get_marshaller_signature (params, return_type);
string ret;
......@@ -110,7 +110,7 @@ public class Vala.CCodeGenerator {
}
}
private string get_marshaller_signature (Collection<FormalParameter> params, DataType return_type) {
private string get_marshaller_signature (Gee.List<FormalParameter> params, DataType return_type) {
string signature;
signature = "%s:".printf (get_marshaller_type_name (return_type));
......@@ -147,7 +147,7 @@ public class Vala.CCodeGenerator {
generate_marshaller (sig.get_parameters (), sig.return_type);
}
public void generate_marshaller (Collection<FormalParameter> params, DataType return_type) {
public void generate_marshaller (Gee.List<FormalParameter> params, DataType return_type) {
string signature;
int n_params, i;
......
......@@ -41,7 +41,7 @@ public class Vala.CCodeInvocationExpressionBinding : CCodeExpressionBinding {
var ccall = new CCodeFunctionCall ((CCodeExpression) expr.call.ccodenode);
Method m = null;
Collection<FormalParameter> params;
Gee.List<FormalParameter> params;
if (!(expr.call is MemberAccess)) {
expr.error = true;
......
......@@ -306,7 +306,7 @@ public class Vala.GIdlWriter : CodeVisitor {
return gidl_type;
}
private void write_params (Collection<FormalParameter> params, DataType? instance_type = null) {
private void write_params (Gee.List<FormalParameter> params, DataType? instance_type = null) {
write_indent ();
stream.printf ("<parameters>\n");
indent++;
......
......@@ -59,8 +59,8 @@ public class Vala.Block : Symbol, Statement {
*
* @return statement list
*/
public Collection<Statement> get_statements () {
return new ReadOnlyCollection<Statement> (statement_list);
public Gee.List<Statement> get_statements () {
return new ReadOnlyList<Statement> (statement_list);
}
/**
......@@ -77,8 +77,8 @@ public class Vala.Block : Symbol, Statement {
*
* @return variable declarator list
*/
public Collection<LocalVariable> get_local_variables () {
return new ReadOnlyCollection<LocalVariable> (local_variables);
public Gee.List<LocalVariable> get_local_variables () {
return new ReadOnlyList<LocalVariable> (local_variables);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -185,8 +185,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of base types
*/
public Collection<DataType> get_base_types () {
return new ReadOnlyCollection<DataType> (base_types);
public Gee.List<DataType> get_base_types () {
return new ReadOnlyList<DataType> (base_types);
}
/**
......@@ -205,8 +205,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of type parameters
*/
public Collection<TypeParameter> get_type_parameters () {
return new ReadOnlyCollection<TypeParameter> (type_parameters);
public Gee.List<TypeParameter> get_type_parameters () {
return new ReadOnlyList<TypeParameter> (type_parameters);
}
/**
......@@ -237,8 +237,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of fields
*/
public Collection<Field> get_fields () {
return new ReadOnlyCollection<Field> (fields);
public Gee.List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
/**
......@@ -287,8 +287,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of methods
*/
public override Collection<Method> get_methods () {
return new ReadOnlyCollection<Method> (methods);
public override Gee.List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
/**
......@@ -313,8 +313,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of properties
*/
public override Collection<Property> get_properties () {
return new ReadOnlyCollection<Property> (properties);
public override Gee.List<Property> get_properties () {
return new ReadOnlyList<Property> (properties);
}
/**
......@@ -332,8 +332,8 @@ public class Vala.Class : ObjectTypeSymbol {
*
* @return list of signals
*/
public override Collection<Signal> get_signals () {
return new ReadOnlyCollection<Signal> (signals);
public override Gee.List<Signal> get_signals () {
return new ReadOnlyList<Signal> (signals);
}
/**
......
......@@ -154,8 +154,8 @@ public class Vala.CodeContext : Object {
*
* @return list of source files
*/
public Collection<SourceFile> get_source_files () {
return new ReadOnlyCollection<SourceFile> (source_files);
public Gee.List<SourceFile> get_source_files () {
return new ReadOnlyList<SourceFile> (source_files);
}
/**
......@@ -163,8 +163,8 @@ public class Vala.CodeContext : Object {
*
* @return list of C source files
*/
public Collection<string> get_c_source_files () {
return new ReadOnlyCollection<string> (c_source_files);
public Gee.List<string> get_c_source_files () {
return new ReadOnlyList<string> (c_source_files);
}
/**
......@@ -190,8 +190,8 @@ public class Vala.CodeContext : Object {
*
* @return list of used packages
*/
public Collection<string> get_packages () {
return new ReadOnlyCollection<string> (packages);
public Gee.List<string> get_packages () {
return new ReadOnlyList<string> (packages);
}
/**
......@@ -294,7 +294,7 @@ public class Vala.CodeContext : Object {
return file;
}
private void visit (SourceFile file, Collection<SourceFile> chain) {
private void visit (SourceFile file, Gee.List<SourceFile> chain) {
Gee.List<SourceFile> l = new ArrayList<SourceFile> ();
foreach (SourceFile chain_file in chain) {
l.add (chain_file);
......
......@@ -98,7 +98,7 @@ public abstract class Vala.CodeNode : Object {
* Adds a collection of error types to the exceptions that can be thrown by this node
* or a child node
*/
public void add_error_types (Gee.Collection<DataType> error_types) {
public void add_error_types (Gee.List<DataType> error_types) {
foreach (DataType error_type in error_types) {
_error_types.add (error_type);
error_type.parent_node = this;
......
......@@ -371,7 +371,7 @@ public abstract class Vala.DataType : CodeNode {
*
* @return parameter list
*/
public virtual Collection<FormalParameter>? get_parameters () {
public virtual Gee.List<FormalParameter>? get_parameters () {
return null;
}
......@@ -390,7 +390,7 @@ public abstract class Vala.DataType : CodeNode {
*
* @return symbol list
*/
public virtual Collection<Symbol> get_symbols () {
public virtual Gee.List<Symbol> get_symbols () {
var symbols = new ArrayList<Symbol> ();
if (data_type != null) {
symbols.add (data_type);
......
......@@ -41,7 +41,7 @@ public class Vala.DelegateType : DataType {
return delegate_symbol.return_type;
}
public override Collection<FormalParameter>? get_parameters () {
public override Gee.List<FormalParameter>? get_parameters () {
return delegate_symbol.get_parameters ();
}
......@@ -61,7 +61,7 @@ public class Vala.DelegateType : DataType {
return delegate_symbol.get_cname ();
}
public override Collection<Symbol> get_symbols () {
public override Gee.List<Symbol> get_symbols () {
var symbols = new ArrayList<Symbol> ();
symbols.add (delegate_symbol);
return symbols;
......
......@@ -41,8 +41,8 @@ public class Vala.DynamicMethod : Method {
this.source_reference = source_reference;
}
public override Collection<string> get_cheader_filenames () {
return new ReadOnlyCollection<string> ();
public override Gee.List<string> get_cheader_filenames () {
return new ReadOnlyList<string> ();
}
public override string get_default_cname () {
......
......@@ -37,8 +37,8 @@ public class Vala.DynamicProperty : Property {
this.source_reference = source_reference;
}
public override Collection<string> get_cheader_filenames () {
return new ReadOnlyCollection<string> ();
public override Gee.List<string> get_cheader_filenames () {
return new ReadOnlyList<string> ();
}
public override CodeBinding? create_code_binding (CodeGenerator codegen) {
......
......@@ -93,8 +93,8 @@ public class Vala.Enum : TypeSymbol {
*
* @return list of enum values
*/
public Collection<EnumValue> get_values () {
return new ReadOnlyCollection<EnumValue> (values);
public Gee.List<EnumValue> get_values () {
return new ReadOnlyList<EnumValue> (values);
}
/**
......@@ -102,8 +102,8 @@ public class Vala.Enum : TypeSymbol {
*
* @return list of methods
*/
public Collection<Method> get_methods () {
return new ReadOnlyCollection<Method> (methods);
public Gee.List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -82,8 +82,8 @@ public class Vala.ErrorDomain : TypeSymbol {
*
* @return list of error codes
*/
public Collection<ErrorCode> get_codes () {
return new ReadOnlyCollection<ErrorCode> (codes);
public Gee.List<ErrorCode> get_codes () {
return new ReadOnlyList<ErrorCode> (codes);
}
/**
......@@ -91,8 +91,8 @@ public class Vala.ErrorDomain : TypeSymbol {
*
* @return list of methods
*/
public Collection<Method> get_methods () {
return new ReadOnlyCollection<Method> (methods);
public Gee.List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -90,8 +90,8 @@ public class Vala.ForStatement : CodeNode, Statement {
*
* @return initializer list
*/
public Collection<Expression> get_initializer () {
return new ReadOnlyCollection<Expression> (initializer);
public Gee.List<Expression> get_initializer () {
return new ReadOnlyList<Expression> (initializer);
}
/**
......@@ -109,8 +109,8 @@ public class Vala.ForStatement : CodeNode, Statement {
*
* @return iterator
*/
public Collection<Expression> get_iterator () {
return new ReadOnlyCollection<Expression> (iterator);
public Gee.List<Expression> get_iterator () {
return new ReadOnlyList<Expression> (iterator);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -45,8 +45,8 @@ public class Vala.InitializerList : Expression {
*
* @return expression list
*/
public Collection<Expression> get_initializers () {
return new ReadOnlyCollection<Expression> (initializers);
public Gee.List<Expression> get_initializers () {
return new ReadOnlyList<Expression> (initializers);
}
/**
......
......@@ -81,8 +81,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of type parameters
*/
public Collection<TypeParameter> get_type_parameters () {
return new ReadOnlyCollection<TypeParameter> (type_parameters);
public Gee.List<TypeParameter> get_type_parameters () {
return new ReadOnlyList<TypeParameter> (type_parameters);
}
/**
......@@ -111,8 +111,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of base types
*/
public Collection<DataType> get_prerequisites () {
return new ReadOnlyCollection<DataType> (prerequisites);
public Gee.List<DataType> get_prerequisites () {
return new ReadOnlyList<DataType> (prerequisites);
}
/**
......@@ -145,8 +145,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of methods
*/
public override Collection<Method> get_methods () {
return new ReadOnlyCollection<Method> (methods);
public override Gee.List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
/**
......@@ -165,8 +165,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of fields
*/
public Collection<Field> get_fields () {
return new ReadOnlyCollection<Field> (fields);
public Gee.List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
/**
......@@ -187,8 +187,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of properties
*/
public override Collection<Property> get_properties () {
return new ReadOnlyCollection<Property> (properties);
public override Gee.List<Property> get_properties () {
return new ReadOnlyList<Property> (properties);
}
/**
......@@ -206,8 +206,8 @@ public class Vala.Interface : ObjectTypeSymbol {
*
* @return list of signals
*/
public override Collection<Signal> get_signals () {
return new ReadOnlyCollection<Signal> (signals);
public override Gee.List<Signal> get_signals () {
return new ReadOnlyList<Signal> (signals);
}
/**
......
......@@ -556,7 +556,7 @@ public class Vala.InterfaceWriter : CodeVisitor {
write_newline ();
}
private void write_error_domains (Collection<DataType> error_domains) {
private void write_error_domains (Gee.List<DataType> error_domains) {
if (error_domains.size > 0) {
write_string (" throws ");
......@@ -578,7 +578,7 @@ public class Vala.InterfaceWriter : CodeVisitor {
return ((int) (d1 * 1000)) == ((int) (d2 * 1000));
}
private void write_params (Collection<FormalParameter> params) {
private void write_params (Gee.List<FormalParameter> params) {
write_string ("(");
int i = 1;
......
......@@ -72,8 +72,8 @@ public class Vala.InvocationExpression : Expression {
*
* @return argument list
*/
public Collection<Expression> get_argument_list () {
return new ReadOnlyCollection<Expression> (argument_list);
public Gee.List<Expression> get_argument_list () {
return new ReadOnlyList<Expression> (argument_list);
}
/**
......
......@@ -85,8 +85,8 @@ public class Vala.LambdaExpression : Expression {
*
* @return parameter list
*/
public Collection<string> get_parameters () {
return new ReadOnlyCollection<string> (parameters);
public Gee.List<string> get_parameters () {
return new ReadOnlyList<string> (parameters);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -33,7 +33,7 @@ public class Vala.Member : Symbol {
visitor.visit_member (this);
}
public override Collection<string> get_cheader_filenames () {
public override Gee.List<string> get_cheader_filenames () {
if (cheader_filenames.size == 0 && parent_symbol != null) {
/* default to header filenames of the namespace */
foreach (string filename in parent_symbol.get_cheader_filenames ()) {
......@@ -45,7 +45,7 @@ public class Vala.Member : Symbol {
cheader_filenames.add (source_reference.file.get_cinclude_filename ());
}
}
return new ReadOnlyCollection<string> (cheader_filenames);
return new ReadOnlyList<string> (cheader_filenames);
}
......
......@@ -112,8 +112,8 @@ public class Vala.MemberAccess : Expression {
*
* @return type argument list
*/
public Collection<DataType> get_type_arguments () {
return new ReadOnlyCollection<DataType> (type_argument_list);
public Gee.List<DataType> get_type_arguments () {
return new ReadOnlyList<DataType> (type_argument_list);
}
public override void accept (CodeVisitor visitor) {
......
......@@ -247,8 +247,8 @@ public class Vala.Method : Member {
}
}
public Collection<FormalParameter> get_parameters () {
return new ReadOnlyCollection<FormalParameter> (parameters);
public Gee.List<FormalParameter> get_parameters () {
return new ReadOnlyList<FormalParameter> (parameters);
}
/**
......@@ -465,8 +465,8 @@ public class Vala.Method : Member {
*
* @return list of preconditions
*/
public Collection<Expression> get_preconditions () {
return new ReadOnlyCollection<Expression> (preconditions);
public Gee.List<Expression> get_preconditions () {
return new ReadOnlyList<Expression> (preconditions);
}
/**
......@@ -484,8 +484,8 @@ public class Vala.Method : Member {
*
* @return list of postconditions
*/
public Collection<Expression> get_postconditions () {
return new ReadOnlyCollection<Expression> (postconditions);
public Gee.List<Expression> get_postconditions () {
return new ReadOnlyList<Expression> (postconditions);
}
public override void replace_type (DataType old_type, DataType new_type) {
......
......@@ -41,7 +41,7 @@ public class Vala.MethodType : DataType {
return method_symbol.return_type;
}
public override Collection<FormalParameter>? get_parameters () {
public override Gee.List<FormalParameter>? get_parameters () {
return method_symbol.get_parameters ();
}
......
......@@ -110,8 +110,8 @@ public class Vala.Namespace : Symbol {
*
* @return namespace list
*/
public Collection<Namespace> get_namespaces () {
return new ReadOnlyCollection<Namespace> (namespaces);
public Gee.List<Namespace> get_namespaces () {
return new ReadOnlyList<Namespace> (namespaces);
}
/**
......@@ -201,8 +201,8 @@ public class Vala.Namespace : Symbol {
*
* @return struct list
*/
public Collection<Struct> get_structs () {
return new ReadOnlyCollection<Struct> (structs);
public Gee.List<Struct> get_structs () {
return new ReadOnlyList<Struct> (structs);
}
/**
......@@ -210,8 +210,8 @@ public class Vala.Namespace : Symbol {
*
* @return class list
*/
public Collection<Class> get_classes () {
return new ReadOnlyCollection<Class> (classes);
public Gee.List<Class> get_classes () {
return new ReadOnlyList<Class> (classes);
}
/**
......@@ -219,8 +219,8 @@ public class Vala.Namespace : Symbol {
*
* @return interface list
*/
public Collection<Interface> get_interfaces () {
return new ReadOnlyCollection<Interface> (interfaces);
public Gee.List<Interface> get_interfaces () {
return new ReadOnlyList<Interface> (interfaces);
}
/**
......@@ -228,8 +228,8 @@ public class Vala.Namespace : Symbol {
*
* @return enum list
*/
public Collection<Enum> get_enums () {
return new ReadOnlyCollection<Enum> (enums);
public Gee.List<Enum> get_enums () {
return new ReadOnlyList<Enum> (enums);
}
/**
......@@ -237,8 +237,8 @@ public class Vala.Namespace : Symbol {
*
* @return error domain list
*/
public Collection<ErrorDomain> get_error_types () {
return new ReadOnlyCollection<ErrorDomain> (error_domains);
public Gee.List<ErrorDomain> get_error_types () {
return new ReadOnlyList<ErrorDomain> (error_domains);
}
/**
......@@ -246,8 +246,8 @@ public class Vala.Namespace : Symbol {
*
* @return field list
*/
public Collection<Field> get_fields () {
return new ReadOnlyCollection<Field> (fields);
public Gee.List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
/**
......@@ -255,8 +255,8 @@ public class Vala.Namespace : Symbol {
*
* @return constant list