vala r1493 - in trunk: . ccode gobject vala



Author: juergbi
Date: Thu May 29 21:48:51 2008
New Revision: 1493
URL: http://svn.gnome.org/viewvc/vala?rev=1493&view=rev

Log:
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


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

Modified: trunk/ccode/valaccodecommaexpression.vala
==============================================================================
--- trunk/ccode/valaccodecommaexpression.vala	(original)
+++ trunk/ccode/valaccodecommaexpression.vala	Thu May 29 21:48:51 2008
@@ -38,8 +38,8 @@
 		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) {

Modified: trunk/ccode/valaccodefragment.vala
==============================================================================
--- trunk/ccode/valaccodefragment.vala	(original)
+++ trunk/ccode/valaccodefragment.vala	Thu May 29 21:48:51 2008
@@ -43,8 +43,8 @@
 	 *
 	 * @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) {

Modified: trunk/gobject/valaccodeassignmentbinding.vala
==============================================================================
--- trunk/gobject/valaccodeassignmentbinding.vala	(original)
+++ trunk/gobject/valaccodeassignmentbinding.vala	Thu May 29 21:48:51 2008
@@ -213,7 +213,7 @@
 
 		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 @@
 				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 ();

Modified: trunk/gobject/valaccodeelementaccessbinding.vala
==============================================================================
--- trunk/gobject/valaccodeelementaccessbinding.vala	(original)
+++ trunk/gobject/valaccodeelementaccessbinding.vala	Thu May 29 21:48:51 2008
@@ -72,7 +72,7 @@
 				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 ();

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Thu May 29 21:48:51 2008
@@ -1502,7 +1502,7 @@
 		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 @@
 		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 @@
 		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		

Modified: trunk/gobject/valaccodegeneratorsignal.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorsignal.vala	(original)
+++ trunk/gobject/valaccodegeneratorsignal.vala	Thu May 29 21:48:51 2008
@@ -50,7 +50,7 @@
 		}
 	}
 	
-	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 @@
 		}
 	}
 	
-	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 @@
 		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;
 		

Modified: trunk/gobject/valaccodeinvocationexpressionbinding.vala
==============================================================================
--- trunk/gobject/valaccodeinvocationexpressionbinding.vala	(original)
+++ trunk/gobject/valaccodeinvocationexpressionbinding.vala	Thu May 29 21:48:51 2008
@@ -41,7 +41,7 @@
 		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;

Modified: trunk/gobject/valagidlwriter.vala
==============================================================================
--- trunk/gobject/valagidlwriter.vala	(original)
+++ trunk/gobject/valagidlwriter.vala	Thu May 29 21:48:51 2008
@@ -306,7 +306,7 @@
 		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++;

Modified: trunk/vala/valablock.vala
==============================================================================
--- trunk/vala/valablock.vala	(original)
+++ trunk/vala/valablock.vala	Thu May 29 21:48:51 2008
@@ -59,8 +59,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala	(original)
+++ trunk/vala/valaclass.vala	Thu May 29 21:48:51 2008
@@ -185,8 +185,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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);
 	}
 
 	/**

Modified: trunk/vala/valacodecontext.vala
==============================================================================
--- trunk/vala/valacodecontext.vala	(original)
+++ trunk/vala/valacodecontext.vala	Thu May 29 21:48:51 2008
@@ -154,8 +154,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 		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);

Modified: trunk/vala/valacodenode.vala
==============================================================================
--- trunk/vala/valacodenode.vala	(original)
+++ trunk/vala/valacodenode.vala	Thu May 29 21:48:51 2008
@@ -98,7 +98,7 @@
 	 * 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;

Modified: trunk/vala/valadatatype.vala
==============================================================================
--- trunk/vala/valadatatype.vala	(original)
+++ trunk/vala/valadatatype.vala	Thu May 29 21:48:51 2008
@@ -371,7 +371,7 @@
 	 *
 	 * @return parameter list
 	 */
-	public virtual Collection<FormalParameter>? get_parameters () {
+	public virtual Gee.List<FormalParameter>? get_parameters () {
 		return null;
 	}
 
@@ -390,7 +390,7 @@
 	 *
 	 * @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);

Modified: trunk/vala/valadelegatetype.vala
==============================================================================
--- trunk/vala/valadelegatetype.vala	(original)
+++ trunk/vala/valadelegatetype.vala	Thu May 29 21:48:51 2008
@@ -41,7 +41,7 @@
 		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 @@
 		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;

Modified: trunk/vala/valadynamicmethod.vala
==============================================================================
--- trunk/vala/valadynamicmethod.vala	(original)
+++ trunk/vala/valadynamicmethod.vala	Thu May 29 21:48:51 2008
@@ -41,8 +41,8 @@
 		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 () {

Modified: trunk/vala/valadynamicproperty.vala
==============================================================================
--- trunk/vala/valadynamicproperty.vala	(original)
+++ trunk/vala/valadynamicproperty.vala	Thu May 29 21:48:51 2008
@@ -37,8 +37,8 @@
 		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) {

Modified: trunk/vala/valaenum.vala
==============================================================================
--- trunk/vala/valaenum.vala	(original)
+++ trunk/vala/valaenum.vala	Thu May 29 21:48:51 2008
@@ -93,8 +93,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valaerrordomain.vala
==============================================================================
--- trunk/vala/valaerrordomain.vala	(original)
+++ trunk/vala/valaerrordomain.vala	Thu May 29 21:48:51 2008
@@ -82,8 +82,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valaforstatement.vala
==============================================================================
--- trunk/vala/valaforstatement.vala	(original)
+++ trunk/vala/valaforstatement.vala	Thu May 29 21:48:51 2008
@@ -90,8 +90,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valainitializerlist.vala
==============================================================================
--- trunk/vala/valainitializerlist.vala	(original)
+++ trunk/vala/valainitializerlist.vala	Thu May 29 21:48:51 2008
@@ -45,8 +45,8 @@
 	 *
 	 * @return expression list
 	 */
-	public Collection<Expression> get_initializers () {
-		return new ReadOnlyCollection<Expression> (initializers);
+	public Gee.List<Expression> get_initializers () {
+		return new ReadOnlyList<Expression> (initializers);
 	}
 
 	/**

Modified: trunk/vala/valainterface.vala
==============================================================================
--- trunk/vala/valainterface.vala	(original)
+++ trunk/vala/valainterface.vala	Thu May 29 21:48:51 2008
@@ -81,8 +81,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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);
 	}
 
 	/**

Modified: trunk/vala/valainterfacewriter.vala
==============================================================================
--- trunk/vala/valainterfacewriter.vala	(original)
+++ trunk/vala/valainterfacewriter.vala	Thu May 29 21:48:51 2008
@@ -556,7 +556,7 @@
 		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 @@
 		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;

Modified: trunk/vala/valainvocationexpression.vala
==============================================================================
--- trunk/vala/valainvocationexpression.vala	(original)
+++ trunk/vala/valainvocationexpression.vala	Thu May 29 21:48:51 2008
@@ -72,8 +72,8 @@
 	 *
 	 * @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);
 	}
 
 	/**

Modified: trunk/vala/valalambdaexpression.vala
==============================================================================
--- trunk/vala/valalambdaexpression.vala	(original)
+++ trunk/vala/valalambdaexpression.vala	Thu May 29 21:48:51 2008
@@ -85,8 +85,8 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valamember.vala
==============================================================================
--- trunk/vala/valamember.vala	(original)
+++ trunk/vala/valamember.vala	Thu May 29 21:48:51 2008
@@ -33,7 +33,7 @@
 		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 @@
 				cheader_filenames.add (source_reference.file.get_cinclude_filename ());
 			}
 		}
-		return new ReadOnlyCollection<string> (cheader_filenames);
+		return new ReadOnlyList<string> (cheader_filenames);
 	}
 
 	

Modified: trunk/vala/valamemberaccess.vala
==============================================================================
--- trunk/vala/valamemberaccess.vala	(original)
+++ trunk/vala/valamemberaccess.vala	Thu May 29 21:48:51 2008
@@ -112,8 +112,8 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valamethod.vala
==============================================================================
--- trunk/vala/valamethod.vala	(original)
+++ trunk/vala/valamethod.vala	Thu May 29 21:48:51 2008
@@ -247,8 +247,8 @@
 		}
 	}
 	
-	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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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) {

Modified: trunk/vala/valamethodtype.vala
==============================================================================
--- trunk/vala/valamethodtype.vala	(original)
+++ trunk/vala/valamethodtype.vala	Thu May 29 21:48:51 2008
@@ -41,7 +41,7 @@
 		return method_symbol.return_type;
 	}
 
-	public override Collection<FormalParameter>? get_parameters () {
+	public override Gee.List<FormalParameter>? get_parameters () {
 		return method_symbol.get_parameters ();
 	}
 

Modified: trunk/vala/valanamespace.vala
==============================================================================
--- trunk/vala/valanamespace.vala	(original)
+++ trunk/vala/valanamespace.vala	Thu May 29 21:48:51 2008
@@ -110,8 +110,8 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @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 @@
 	 *
 	 * @return constant list
 	 */
-	public Collection<Constant> get_constants () {
-		return new ReadOnlyCollection<Constant> (constants);
+	public Gee.List<Constant> get_constants () {
+		return new ReadOnlyList<Constant> (constants);
 	}
 	
 	/**
@@ -264,8 +264,8 @@
 	 *
 	 * @return delegate list
 	 */
-	public Collection<Delegate> get_delegates () {
-		return new ReadOnlyCollection<Delegate> (delegates);
+	public Gee.List<Delegate> get_delegates () {
+		return new ReadOnlyList<Delegate> (delegates);
 	}
 	
 	/**
@@ -273,8 +273,8 @@
 	 *
 	 * @return method list
 	 */
-	public Collection<Method> get_methods () {
-		return new ReadOnlyCollection<Method> (methods);
+	public Gee.List<Method> get_methods () {
+		return new ReadOnlyList<Method> (methods);
 	}
 	
 	/**
@@ -446,8 +446,8 @@
 		this.lower_case_cprefix = cprefix;
 	}
 
-	public override Collection<string> get_cheader_filenames () {
-		return new ReadOnlyCollection<string> (cheader_filenames);
+	public override Gee.List<string> get_cheader_filenames () {
+		return new ReadOnlyList<string> (cheader_filenames);
 	}
 	
 	/**

Modified: trunk/vala/valaobjectcreationexpression.vala
==============================================================================
--- trunk/vala/valaobjectcreationexpression.vala	(original)
+++ trunk/vala/valaobjectcreationexpression.vala	Thu May 29 21:48:51 2008
@@ -85,8 +85,8 @@
 	 *
 	 * @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);
 	}
 
 	/**
@@ -104,8 +104,8 @@
 	 *
 	 * @return member initializer list
 	 */
-	public Collection<MemberInitializer> get_object_initializer () {
-		return new ReadOnlyCollection<MemberInitializer> (object_initializer);
+	public Gee.List<MemberInitializer> get_object_initializer () {
+		return new ReadOnlyList<MemberInitializer> (object_initializer);
 	}
 
 	public override void accept (CodeVisitor visitor) {

Modified: trunk/vala/valaobjecttypesymbol.vala
==============================================================================
--- trunk/vala/valaobjecttypesymbol.vala	(original)
+++ trunk/vala/valaobjecttypesymbol.vala	Thu May 29 21:48:51 2008
@@ -29,7 +29,7 @@
  * Vala API file.
  */
 public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
-	public abstract Collection<Method> get_methods ();
-	public abstract Collection<Signal> get_signals ();
-	public abstract Collection<Property> get_properties ();
+	public abstract Gee.List<Method> get_methods ();
+	public abstract Gee.List<Signal> get_signals ();
+	public abstract Gee.List<Property> get_properties ();
 }

Modified: trunk/vala/valapointertype.vala
==============================================================================
--- trunk/vala/valapointertype.vala	(original)
+++ trunk/vala/valapointertype.vala	Thu May 29 21:48:51 2008
@@ -90,7 +90,7 @@
 		return SemanticAnalyzer.symbol_lookup_inherited (base_symbol, member_name);
 	}
 
-	public override Collection<Symbol> get_symbols () {
+	public override Gee.List<Symbol> get_symbols () {
 		return base_type.get_symbols ();
 	}
 

Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala	(original)
+++ trunk/vala/valasemanticanalyzer.vala	Thu May 29 21:48:51 2008
@@ -37,7 +37,7 @@
 	Class current_class;
 	Struct current_struct;
 
-	Collection<NamespaceReference> current_using_directives;
+	Gee.List<NamespaceReference> current_using_directives;
 
 	DataType bool_type;
 	DataType string_type;
@@ -232,7 +232,7 @@
 		current_class = null;
 	}
 
-	private void get_all_prerequisites (Interface iface, Collection<TypeSymbol> list) {
+	private void get_all_prerequisites (Interface iface, Gee.List<TypeSymbol> list) {
 		foreach (DataType prereq in iface.get_prerequisites ()) {
 			TypeSymbol type = prereq.data_type;
 			/* skip on previous errors */
@@ -1053,7 +1053,7 @@
 			}
 		} else {
 			stmt.error = true;
-			Report.error (stmt.source_reference, "Collection not iterable");
+			Report.error (stmt.source_reference, "Gee.List not iterable");
 			return;
 		}
 
@@ -1263,7 +1263,7 @@
 	 * @param expr an array creation expression
 	 */
 	public override void visit_array_creation_expression (ArrayCreationExpression expr) {
-		Collection<Expression> size = expr.get_sizes ();
+		Gee.List<Expression> size = expr.get_sizes ();
 		var initlist = expr.initializer_list;
 
 		if (expr.element_type != null) {
@@ -1869,7 +1869,7 @@
 			return;
 		}
 
-		Collection<FormalParameter> params;
+		Gee.List<FormalParameter> params;
 
 		if (mtype != null && mtype.is_invokable ()) {
 			params = mtype.get_parameters ();
@@ -1964,7 +1964,7 @@
 		check_arguments (expr, mtype, params, expr.get_argument_list ());
 	}
 
-	private bool check_arguments (Expression expr, DataType mtype, Collection<FormalParameter> params, Collection<Expression> args) {
+	private bool check_arguments (Expression expr, DataType mtype, Gee.List<FormalParameter> params, Gee.List<Expression> args) {
 		Expression prev_arg = null;
 		Iterator<Expression> arg_it = args.iterator ();
 
@@ -2254,7 +2254,7 @@
 			expr.value_type = unichar_type;
 		} else if (container_type != null && list_type != null && map_type != null &&
 		           (container_type.is_subtype_of (list_type) || container_type.is_subtype_of (map_type))) {
-			Collection<Expression> indices = expr.get_indices ();
+			Gee.List<Expression> indices = expr.get_indices ();
 			if (indices.size != 1) {
 				expr.error = true;
 				Report.error (expr.source_reference, "Element access with more than one dimension is not supported for the specified type");
@@ -2273,7 +2273,7 @@
 				get_sym = map_type.scope.lookup ("get");
 			}
 			var get_method = (Method) get_sym;
-			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 ();

Modified: trunk/vala/valasignaltype.vala
==============================================================================
--- trunk/vala/valasignaltype.vala	(original)
+++ trunk/vala/valasignaltype.vala	Thu May 29 21:48:51 2008
@@ -41,7 +41,7 @@
 		return signal_symbol.return_type;
 	}
 
-	public override Collection<FormalParameter>? get_parameters () {
+	public override Gee.List<FormalParameter>? get_parameters () {
 		return signal_symbol.get_parameters ();
 	}
 

Modified: trunk/vala/valasourcefile.vala
==============================================================================
--- trunk/vala/valasourcefile.vala	(original)
+++ trunk/vala/valasourcefile.vala	Thu May 29 21:48:51 2008
@@ -116,8 +116,8 @@
 	 *
 	 * @return using directive list
 	 */
-	public Collection<NamespaceReference> get_using_directives () {
-		return new ReadOnlyCollection<NamespaceReference> (using_directives);
+	public Gee.List<NamespaceReference> get_using_directives () {
+		return new ReadOnlyList<NamespaceReference> (using_directives);
 	}
 	
 	/**
@@ -138,8 +138,8 @@
 	 *
 	 * @return code node list
 	 */
-	public Collection<CodeNode> get_nodes () {
-		return new ReadOnlyCollection<CodeNode> (nodes);
+	public Gee.List<CodeNode> get_nodes () {
+		return new ReadOnlyList<CodeNode> (nodes);
 	}
 
 	public void accept (CodeVisitor visitor) {
@@ -307,8 +307,8 @@
 	 *
 	 * @return external include list for C header file
 	 */
-	public Collection<string> get_header_external_includes () {
-		return new ReadOnlyCollection<string> (header_external_includes);
+	public Gee.List<string> get_header_external_includes () {
+		return new ReadOnlyList<string> (header_external_includes);
 	}
 	
 	/**
@@ -330,8 +330,8 @@
 	 *
 	 * @return internal include list for C header file
 	 */
-	public Collection<string> get_header_internal_includes () {
-		return new ReadOnlyCollection<string> (header_internal_includes);
+	public Gee.List<string> get_header_internal_includes () {
+		return new ReadOnlyList<string> (header_internal_includes);
 	}
 	
 	/**
@@ -340,8 +340,8 @@
 	 *
 	 * @return include list for C source file
 	 */
-	public Collection<string> get_source_external_includes () {
-		return new ReadOnlyCollection<string> (source_external_includes);
+	public Gee.List<string> get_source_external_includes () {
+		return new ReadOnlyList<string> (source_external_includes);
 	}
 	
 	/**
@@ -350,8 +350,8 @@
 	 *
 	 * @return include list for C source file
 	 */
-	public Collection<string> get_source_internal_includes () {
-		return new ReadOnlyCollection<string> (source_internal_includes);
+	public Gee.List<string> get_source_internal_includes () {
+		return new ReadOnlyList<string> (source_internal_includes);
 	}
 	
 	/**
@@ -360,8 +360,8 @@
 	 *
 	 * @return definite source file dependencies
 	 */
-	public Collection<weak SourceFile> get_header_internal_full_dependencies () {
-		return new ReadOnlyCollection<weak SourceFile> (header_internal_full_dependencies);
+	public Gee.List<weak SourceFile> get_header_internal_full_dependencies () {
+		return new ReadOnlyList<weak SourceFile> (header_internal_full_dependencies);
 	}
 	
 	/**
@@ -370,8 +370,8 @@
 	 *
 	 * @return loose source file dependencies
 	 */
-	public Collection<weak SourceFile> get_header_internal_dependencies () {
-		return new ReadOnlyCollection<weak SourceFile> (header_internal_dependencies);
+	public Gee.List<weak SourceFile> get_header_internal_dependencies () {
+		return new ReadOnlyList<weak SourceFile> (header_internal_dependencies);
 	}
 
 	/**

Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala	(original)
+++ trunk/vala/valastruct.vala	Thu May 29 21:48:51 2008
@@ -84,8 +84,8 @@
 	 *
 	 * @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);
 	}
 
 	/**
@@ -113,8 +113,8 @@
 	 *
 	 * @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);
 	}
 	
 	/**
@@ -159,8 +159,8 @@
 	 *
 	 * @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) {
@@ -474,8 +474,8 @@
 	 *
 	 * @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);
 	}
 	
 	public override int get_type_parameter_index (string name) {

Modified: trunk/vala/valaswitchsection.vala
==============================================================================
--- trunk/vala/valaswitchsection.vala	(original)
+++ trunk/vala/valaswitchsection.vala	Thu May 29 21:48:51 2008
@@ -53,8 +53,8 @@
 	 *
 	 * @return switch label list
 	 */
-	public Collection<SwitchLabel> get_labels () {
-		return new ReadOnlyCollection<SwitchLabel> (labels);
+	public Gee.List<SwitchLabel> get_labels () {
+		return new ReadOnlyList<SwitchLabel> (labels);
 	}
 	
 	public bool has_default_label () {

Modified: trunk/vala/valaswitchstatement.vala
==============================================================================
--- trunk/vala/valaswitchstatement.vala	(original)
+++ trunk/vala/valaswitchstatement.vala	Thu May 29 21:48:51 2008
@@ -70,8 +70,8 @@
 	 *
 	 * @return section list
 	 */
-	public Collection<SwitchSection> get_sections () {
-		return new ReadOnlyCollection<SwitchSection> (sections);
+	public Gee.List<SwitchSection> get_sections () {
+		return new ReadOnlyList<SwitchSection> (sections);
 	}
 	
 	public override void accept (CodeVisitor visitor) {

Modified: trunk/vala/valasymbol.vala
==============================================================================
--- trunk/vala/valasymbol.vala	(original)
+++ trunk/vala/valasymbol.vala	Thu May 29 21:48:51 2008
@@ -191,8 +191,8 @@
 	 *
 	 * @return list of C header filenames for this symbol
 	 */
-	public virtual Collection<string> get_cheader_filenames () {
-		return new ReadOnlyCollection<string> ();
+	public virtual Gee.List<string> get_cheader_filenames () {
+		return new ReadOnlyList<string> ();
 	}
 
 	/**

Modified: trunk/vala/valasymbolresolver.vala
==============================================================================
--- trunk/vala/valasymbolresolver.vala	(original)
+++ trunk/vala/valasymbolresolver.vala	Thu May 29 21:48:51 2008
@@ -30,7 +30,7 @@
 public class Vala.SymbolResolver : CodeVisitor {
 	Symbol root_symbol;
 	Scope current_scope;
-	Collection<NamespaceReference> current_using_directives;
+	Gee.List<NamespaceReference> current_using_directives;
 	
 	/**
 	 * Resolve symbol names in the specified code context.

Modified: trunk/vala/valatypesymbol.vala
==============================================================================
--- trunk/vala/valatypesymbol.vala	(original)
+++ trunk/vala/valatypesymbol.vala	Thu May 29 21:48:51 2008
@@ -191,7 +191,7 @@
 		return null;
 	}
 
-	public override Collection<string> get_cheader_filenames () {
+	public override Gee.List<string> get_cheader_filenames () {
 		if (cheader_filenames.size == 0) {
 			/* default to header filenames of the namespace */
 			foreach (string filename in parent_symbol.get_cheader_filenames ()) {
@@ -203,7 +203,7 @@
 				cheader_filenames.add (source_reference.file.get_cinclude_filename ());
 			}
 		}
-		return new ReadOnlyCollection<string> (cheader_filenames);
+		return new ReadOnlyList<string> (cheader_filenames);
 	}
 
 	/**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]