[vala] Drop ReadOnly* collection classes



commit 98602e201c4032bac943ede2149f6de62a1d8f4f
Author: Jürg Billeter <j bitron ch>
Date:   Sat Mar 20 12:10:54 2010 +0100

    Drop ReadOnly* collection classes
    
    They are not very useful in the compiler as they are not immutable,
    which means that they do not allow iteration while modifying the
    underlying collection.

 ccode/valaccodecommaexpression.vala    |    2 +-
 ccode/valaccodefragment.vala           |    2 +-
 ccode/valaccodefunctioncall.vala       |    2 +-
 gee/Makefile.am                        |    4 -
 gee/readonlycollection.vala            |   85 ------------------------
 gee/readonlylist.vala                  |  113 --------------------------------
 gee/readonlymap.vala                   |   87 ------------------------
 gee/readonlyset.vala                   |   85 ------------------------
 vala/valaarraycreationexpression.vala  |    2 +-
 vala/valabasicblock.vala               |    4 +-
 vala/valablock.vala                    |    2 +-
 vala/valaclass.vala                    |   20 +++---
 vala/valacodecontext.vala              |    6 +-
 vala/valacodenode.vala                 |    2 +-
 vala/valadatatype.vala                 |    2 +-
 vala/valadelegate.vala                 |    2 +-
 vala/valaelementaccess.vala            |    2 +-
 vala/valaenum.vala                     |    4 +-
 vala/valaerrordomain.vala              |    4 +-
 vala/valaexpression.vala               |    2 +-
 vala/valaforstatement.vala             |    4 +-
 vala/valainitializerlist.vala          |    2 +-
 vala/valainterface.vala                |   20 +++---
 vala/valalambdaexpression.vala         |    2 +-
 vala/valamember.vala                   |    2 +-
 vala/valamemberaccess.vala             |    2 +-
 vala/valamethod.vala                   |    8 +-
 vala/valamethodcall.vala               |    2 +-
 vala/valanamespace.vala                |   24 ++++----
 vala/valaobjectcreationexpression.vala |    4 +-
 vala/valaobjecttypesymbol.vala         |    2 +-
 vala/valascope.vala                    |    2 +-
 vala/valasignal.vala                   |    2 +-
 vala/valasourcefile.vala               |    4 +-
 vala/valastruct.vala                   |   10 ++--
 vala/valaswitchsection.vala            |    2 +-
 vala/valaswitchstatement.vala          |    2 +-
 vala/valatrystatement.vala             |    2 +-
 vala/valatypesymbol.vala               |    2 +-
 39 files changed, 78 insertions(+), 452 deletions(-)
---
diff --git a/ccode/valaccodecommaexpression.vala b/ccode/valaccodecommaexpression.vala
index 7f16ffd..6010428 100644
--- a/ccode/valaccodecommaexpression.vala
+++ b/ccode/valaccodecommaexpression.vala
@@ -42,7 +42,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression {
 	}
 
 	public List<CCodeExpression> get_inner () {
-		return new ReadOnlyList<CCodeExpression> (inner);
+		return inner;
 	}
 
 	public override void write (CCodeWriter writer) {
diff --git a/ccode/valaccodefragment.vala b/ccode/valaccodefragment.vala
index e13c4e3..0e229ff 100644
--- a/ccode/valaccodefragment.vala
+++ b/ccode/valaccodefragment.vala
@@ -43,7 +43,7 @@ public class Vala.CCodeFragment : CCodeNode {
 	 * @return children list
 	 */
 	public List<CCodeNode> get_children () {
-		return new ReadOnlyList<CCodeNode> (children);
+		return children;
 	}
 
 	public override void write (CCodeWriter writer) {
diff --git a/ccode/valaccodefunctioncall.vala b/ccode/valaccodefunctioncall.vala
index ffa6595..e9e7d14 100644
--- a/ccode/valaccodefunctioncall.vala
+++ b/ccode/valaccodefunctioncall.vala
@@ -56,7 +56,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
 	 * @return list of arguments
 	 */
 	public List<CCodeExpression> get_arguments () {
-		return new ReadOnlyList<CCodeExpression> (arguments);
+		return arguments;
 	}
 
 	public override void write (CCodeWriter writer) {
diff --git a/gee/Makefile.am b/gee/Makefile.am
index 322ca63..5b358c5 100644
--- a/gee/Makefile.am
+++ b/gee/Makefile.am
@@ -21,10 +21,6 @@ libgee_la_VALASOURCES = \
 	iterator.vala \
 	list.vala \
 	map.vala \
-	readonlycollection.vala \
-	readonlylist.vala \
-	readonlymap.vala \
-	readonlyset.vala \
 	set.vala \
 	$(NULL)
 
diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala
index c2cb9af..80f4367 100644
--- a/vala/valaarraycreationexpression.vala
+++ b/vala/valaarraycreationexpression.vala
@@ -79,7 +79,7 @@ public class Vala.ArrayCreationExpression : Expression {
 	 * Get the sizes for all dimensions ascending from left to right.
 	 */
 	public List<Expression> get_sizes () {
-		return new ReadOnlyList<Expression> (sizes);
+		return sizes;
 	}
 	
 	public ArrayCreationExpression (DataType element_type, int rank, InitializerList? initializer_list, SourceReference source_reference) {
diff --git a/vala/valabasicblock.vala b/vala/valabasicblock.vala
index 7339224..ef32e05 100644
--- a/vala/valabasicblock.vala
+++ b/vala/valabasicblock.vala
@@ -70,11 +70,11 @@ public class Vala.BasicBlock {
 	}
 
 	public List<weak BasicBlock> get_predecessors () {
-		return new ReadOnlyList<weak BasicBlock> (predecessors);
+		return predecessors;
 	}
 
 	public List<weak BasicBlock> get_successors () {
-		return new ReadOnlyList<weak BasicBlock> (successors);
+		return successors;
 	}
 
 	public void add_child (BasicBlock block) {
diff --git a/vala/valablock.vala b/vala/valablock.vala
index 59eba44..3a7eac7 100644
--- a/vala/valablock.vala
+++ b/vala/valablock.vala
@@ -108,7 +108,7 @@ public class Vala.Block : Symbol, Statement {
 	 * @return variable declarator list
 	 */
 	public List<LocalVariable> get_local_variables () {
-		return new ReadOnlyList<LocalVariable> (local_variables);
+		return local_variables;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index dd39f8f..4fc73a2 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -146,7 +146,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of classes
 	 */
 	public List<Class> get_classes () {
-		return new ReadOnlyList<Class> (classes);
+		return classes;
 	}
 
 	/**
@@ -155,7 +155,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of structs
 	 */
 	public List<Struct> get_structs () {
-		return new ReadOnlyList<Struct> (structs);
+		return structs;
 	}
 
 	/**
@@ -164,7 +164,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of enums
 	 */
 	public List<Enum> get_enums () {
-		return new ReadOnlyList<Enum> (enums);
+		return enums;
 	}
 
 	/**
@@ -173,7 +173,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of delegates
 	 */
 	public List<Delegate> get_delegates () {
-		return new ReadOnlyList<Delegate> (delegates);
+		return delegates;
 	}
 
 	/**
@@ -263,7 +263,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of base types
 	 */
 	public List<DataType> get_base_types () {
-		return new ReadOnlyList<DataType> (base_types);
+		return base_types;
 	}
 
 	/**
@@ -297,7 +297,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of fields
 	 */
 	public List<Field> get_fields () {
-		return new ReadOnlyList<Field> (fields);
+		return fields;
 	}
 
 	/**
@@ -306,7 +306,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of constants
 	 */
 	public List<Constant> get_constants () {
-		return new ReadOnlyList<Constant> (constants);
+		return constants;
 	}
 
 	/**
@@ -354,7 +354,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of methods
 	 */
 	public override List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 	
 	/**
@@ -380,7 +380,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of properties
 	 */
 	public override List<Property> get_properties () {
-		return new ReadOnlyList<Property> (properties);
+		return properties;
 	}
 	
 	/**
@@ -399,7 +399,7 @@ public class Vala.Class : ObjectTypeSymbol {
 	 * @return list of signals
 	 */
 	public override List<Signal> get_signals () {
-		return new ReadOnlyList<Signal> (signals);
+		return signals;
 	}
 
 	/**
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index c1559f1..9b24fcb 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -229,7 +229,7 @@ public class Vala.CodeContext {
 	 * @return list of source files
 	 */
 	public List<SourceFile> get_source_files () {
-		return new ReadOnlyList<SourceFile> (source_files);
+		return source_files;
 	}
 
 	/**
@@ -238,7 +238,7 @@ public class Vala.CodeContext {
 	 * @return list of C source files
 	 */
 	public List<string> get_c_source_files () {
-		return new ReadOnlyList<string> (c_source_files);
+		return c_source_files;
 	}
 	
 	/**
@@ -265,7 +265,7 @@ public class Vala.CodeContext {
 	 * @return list of used packages
 	 */
 	public List<string> get_packages () {
-		return new ReadOnlyList<string> (packages);
+		return packages;
 	}
 
 	/**
diff --git a/vala/valacodenode.vala b/vala/valacodenode.vala
index 8f83cfd..feaf60a 100644
--- a/vala/valacodenode.vala
+++ b/vala/valacodenode.vala
@@ -96,7 +96,7 @@ public abstract class Vala.CodeNode {
 			return _error_types;
 		}
 		if (_empty_type_list == null) {
-			_empty_type_list = new ReadOnlyList<DataType> (new ArrayList<DataType> ());
+			_empty_type_list = new ArrayList<DataType> ();
 		}
 		return _empty_type_list;
 	}
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala
index bba7462..2027bb9 100644
--- a/vala/valadatatype.vala
+++ b/vala/valadatatype.vala
@@ -85,7 +85,7 @@ public abstract class Vala.DataType : CodeNode {
 			return type_argument_list;
 		}
 		if (_empty_type_list == null) {
-			_empty_type_list = new ReadOnlyList<DataType> (new ArrayList<DataType> ());
+			_empty_type_list = new ArrayList<DataType> ();
 		}
 		return _empty_type_list;
 	}
diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala
index a882d3a..d152714 100644
--- a/vala/valadelegate.vala
+++ b/vala/valadelegate.vala
@@ -130,7 +130,7 @@ public class Vala.Delegate : TypeSymbol {
 	 * @return parameter list
 	 */
 	public List<FormalParameter> get_parameters () {
-		return new ReadOnlyList<FormalParameter> (parameters);
+		return parameters;
 	}
 	
 	/**
diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala
index c96ee7a..8f9bd16 100644
--- a/vala/valaelementaccess.vala
+++ b/vala/valaelementaccess.vala
@@ -54,7 +54,7 @@ public class Vala.ElementAccess : Expression {
 	}
 
 	public List<Expression> get_indices () {
-		return new ReadOnlyList<Expression> (indices);
+		return indices;
 	}
 	
 	public ElementAccess (Expression container, SourceReference source_reference) {
diff --git a/vala/valaenum.vala b/vala/valaenum.vala
index 0e488ad..f5c2148 100644
--- a/vala/valaenum.vala
+++ b/vala/valaenum.vala
@@ -96,7 +96,7 @@ public class Vala.Enum : TypeSymbol {
 	 * @return list of enum values
 	 */
 	public List<EnumValue> get_values () {
-		return new ReadOnlyList<EnumValue> (values);
+		return values;
 	}
 
 	/**
@@ -105,7 +105,7 @@ public class Vala.Enum : TypeSymbol {
 	 * @return list of methods
 	 */
 	public List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valaerrordomain.vala b/vala/valaerrordomain.vala
index 7ccc78a..dbc6b45 100644
--- a/vala/valaerrordomain.vala
+++ b/vala/valaerrordomain.vala
@@ -81,7 +81,7 @@ public class Vala.ErrorDomain : TypeSymbol {
 	 * @return list of error codes
 	 */
 	public List<ErrorCode> get_codes () {
-		return new ReadOnlyList<ErrorCode> (codes);
+		return codes;
 	}
 
 	/**
@@ -90,7 +90,7 @@ public class Vala.ErrorDomain : TypeSymbol {
 	 * @return list of methods
 	 */
 	public List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valaexpression.vala b/vala/valaexpression.vala
index 334ed29..afd54aa 100644
--- a/vala/valaexpression.vala
+++ b/vala/valaexpression.vala
@@ -101,7 +101,7 @@ public abstract class Vala.Expression : CodeNode {
 	 * ascending from left to right.
 	 */
 	public List<CCodeExpression> get_array_sizes () {
-		return new ReadOnlyList<CCodeExpression> (array_sizes);
+		return array_sizes;
 	}
 
 	public Statement? parent_statement {
diff --git a/vala/valaforstatement.vala b/vala/valaforstatement.vala
index 44fac12..99301fe 100644
--- a/vala/valaforstatement.vala
+++ b/vala/valaforstatement.vala
@@ -90,7 +90,7 @@ public class Vala.ForStatement : CodeNode, Statement {
 	 * @return initializer list
 	 */
 	public List<Expression> get_initializer () {
-		return new ReadOnlyList<Expression> (initializer);
+		return initializer;
 	}
 	
 	/**
@@ -109,7 +109,7 @@ public class Vala.ForStatement : CodeNode, Statement {
 	 * @return iterator
 	 */
 	public List<Expression> get_iterator () {
-		return new ReadOnlyList<Expression> (iterator);
+		return iterator;
 	}
 	
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala
index 82aa6e9..927f5ce 100644
--- a/vala/valainitializerlist.vala
+++ b/vala/valainitializerlist.vala
@@ -46,7 +46,7 @@ public class Vala.InitializerList : Expression {
 	 * @return expression list
 	 */
 	public List<Expression> get_initializers () {
-		return new ReadOnlyList<Expression> (initializers);
+		return initializers;
 	}
 
 	/**
diff --git a/vala/valainterface.vala b/vala/valainterface.vala
index a76998a..0ff381d 100644
--- a/vala/valainterface.vala
+++ b/vala/valainterface.vala
@@ -51,7 +51,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of classes
 	 */
 	public List<Class> get_classes () {
-		return new ReadOnlyList<Class> (classes);
+		return classes;
 	}
 
 	/**
@@ -60,7 +60,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of structs
 	 */
 	public List<Struct> get_structs () {
-		return new ReadOnlyList<Struct> (structs);
+		return structs;
 	}
 
 	/**
@@ -69,7 +69,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of enums
 	 */
 	public List<Enum> get_enums () {
-		return new ReadOnlyList<Enum> (enums);
+		return enums;
 	}
 
 	/**
@@ -78,7 +78,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of delegates
 	 */
 	public List<Delegate> get_delegates () {
-		return new ReadOnlyList<Delegate> (delegates);
+		return delegates;
 	}
 
 	/**
@@ -119,7 +119,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of base types
 	 */
 	public List<DataType> get_prerequisites () {
-		return new ReadOnlyList<DataType> (prerequisites);
+		return prerequisites;
 	}
 	
 	/**
@@ -153,7 +153,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of methods
 	 */
 	public override List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 	
 	/**
@@ -173,7 +173,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of fields
 	 */
 	public List<Field> get_fields () {
-		return new ReadOnlyList<Field> (fields);
+		return fields;
 	}
 
 	/**
@@ -192,7 +192,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of constants
 	 */
 	public List<Constant> get_constants () {
-		return new ReadOnlyList<Constant> (constants);
+		return constants;
 	}
 
 	/**
@@ -214,7 +214,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of properties
 	 */
 	public override List<Property> get_properties () {
-		return new ReadOnlyList<Property> (properties);
+		return properties;
 	}
 	
 	/**
@@ -233,7 +233,7 @@ public class Vala.Interface : ObjectTypeSymbol {
 	 * @return list of signals
 	 */
 	public override List<Signal> get_signals () {
-		return new ReadOnlyList<Signal> (signals);
+		return signals;
 	}
 
 	/**
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala
index a6c2dba..25e54b0 100644
--- a/vala/valalambdaexpression.vala
+++ b/vala/valalambdaexpression.vala
@@ -85,7 +85,7 @@ public class Vala.LambdaExpression : Expression {
 	 * @return parameter list
 	 */
 	public List<string> get_parameters () {
-		return new ReadOnlyList<string> (parameters);
+		return parameters;
 	}
 	
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valamember.vala b/vala/valamember.vala
index 602c06a..1c25c36 100644
--- a/vala/valamember.vala
+++ b/vala/valamember.vala
@@ -57,7 +57,7 @@ public abstract class Vala.Member : Symbol {
 				cheader_filenames.add (source_reference.file.get_cinclude_filename ());
 			}
 		}
-		return new ReadOnlyList<string> (cheader_filenames);
+		return cheader_filenames;
 	}
 
 	
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 5e95a98..ebb60d9 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -112,7 +112,7 @@ public class Vala.MemberAccess : Expression {
 	 * @return type argument list
 	 */
 	public List<DataType> get_type_arguments () {
-		return new ReadOnlyList<DataType> (type_argument_list);
+		return type_argument_list;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index f98336e..04ec423 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -281,7 +281,7 @@ public class Vala.Method : Member {
 	}
 	
 	public List<FormalParameter> get_parameters () {
-		return new ReadOnlyList<FormalParameter> (parameters);
+		return parameters;
 	}
 
 	/**
@@ -579,7 +579,7 @@ public class Vala.Method : Member {
 	 * @return list of type parameters
 	 */
 	public List<TypeParameter> get_type_parameters () {
-		return new ReadOnlyList<TypeParameter> (type_parameters);
+		return type_parameters;
 	}
 
 	public int get_type_parameter_index (string name) {
@@ -609,7 +609,7 @@ public class Vala.Method : Member {
 	 * @return list of preconditions
 	 */
 	public List<Expression> get_preconditions () {
-		return new ReadOnlyList<Expression> (preconditions);
+		return preconditions;
 	}
 
 	/**
@@ -628,7 +628,7 @@ public class Vala.Method : Member {
 	 * @return list of postconditions
 	 */
 	public List<Expression> get_postconditions () {
-		return new ReadOnlyList<Expression> (postconditions);
+		return postconditions;
 	}
 
 	public override void replace_type (DataType old_type, DataType new_type) {
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index 7db46ba..047df7e 100644
--- a/vala/valamethodcall.vala
+++ b/vala/valamethodcall.vala
@@ -73,7 +73,7 @@ public class Vala.MethodCall : Expression {
 	 * @return argument list
 	 */
 	public List<Expression> get_argument_list () {
-		return new ReadOnlyList<Expression> (argument_list);
+		return argument_list;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala
index e3a0f90..1417f10 100644
--- a/vala/valanamespace.vala
+++ b/vala/valanamespace.vala
@@ -78,7 +78,7 @@ public class Vala.Namespace : Symbol {
 	 * @return comment list
 	 */
 	public List<Comment> get_comments () {
-		return new ReadOnlyList<Comment> (comments);
+		return comments;
 	}
 
 	/**
@@ -142,7 +142,7 @@ public class Vala.Namespace : Symbol {
 	 * @return namespace list
 	 */
 	public List<Namespace> get_namespaces () {
-		return new ReadOnlyList<Namespace> (namespaces);
+		return namespaces;
 	}
 	
 	/**
@@ -251,7 +251,7 @@ public class Vala.Namespace : Symbol {
 	 * @return struct list
 	 */
 	public List<Struct> get_structs () {
-		return new ReadOnlyList<Struct> (structs);
+		return structs;
 	}
 
 	/**
@@ -260,7 +260,7 @@ public class Vala.Namespace : Symbol {
 	 * @return class list
 	 */
 	public List<Class> get_classes () {
-		return new ReadOnlyList<Class> (classes);
+		return classes;
 	}
 	
 	/**
@@ -269,7 +269,7 @@ public class Vala.Namespace : Symbol {
 	 * @return interface list
 	 */
 	public List<Interface> get_interfaces () {
-		return new ReadOnlyList<Interface> (interfaces);
+		return interfaces;
 	}
 	
 	/**
@@ -278,7 +278,7 @@ public class Vala.Namespace : Symbol {
 	 * @return enum list
 	 */
 	public List<Enum> get_enums () {
-		return new ReadOnlyList<Enum> (enums);
+		return enums;
 	}
 	
 	/**
@@ -287,7 +287,7 @@ public class Vala.Namespace : Symbol {
 	 * @return error domain list
 	 */
 	public List<ErrorDomain> get_error_domains () {
-		return new ReadOnlyList<ErrorDomain> (error_domains);
+		return error_domains;
 	}
 	
 	/**
@@ -296,7 +296,7 @@ public class Vala.Namespace : Symbol {
 	 * @return field list
 	 */
 	public List<Field> get_fields () {
-		return new ReadOnlyList<Field> (fields);
+		return fields;
 	}
 	
 	/**
@@ -305,7 +305,7 @@ public class Vala.Namespace : Symbol {
 	 * @return constant list
 	 */
 	public List<Constant> get_constants () {
-		return new ReadOnlyList<Constant> (constants);
+		return constants;
 	}
 	
 	/**
@@ -314,7 +314,7 @@ public class Vala.Namespace : Symbol {
 	 * @return delegate list
 	 */
 	public List<Delegate> get_delegates () {
-		return new ReadOnlyList<Delegate> (delegates);
+		return delegates;
 	}
 	
 	/**
@@ -323,7 +323,7 @@ public class Vala.Namespace : Symbol {
 	 * @return method list
 	 */
 	public List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 	
 	/**
@@ -518,7 +518,7 @@ public class Vala.Namespace : Symbol {
 	}
 
 	public override List<string> get_cheader_filenames () {
-		return new ReadOnlyList<string> (cheader_filenames);
+		return cheader_filenames;
 	}
 
 	/**
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index 9f1def9..2c8ad17 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -85,7 +85,7 @@ public class Vala.ObjectCreationExpression : Expression {
 	 * @return argument list
 	 */
 	public List<Expression> get_argument_list () {
-		return new ReadOnlyList<Expression> (argument_list);
+		return argument_list;
 	}
 
 	/**
@@ -104,7 +104,7 @@ public class Vala.ObjectCreationExpression : Expression {
 	 * @return member initializer list
 	 */
 	public List<MemberInitializer> get_object_initializer () {
-		return new ReadOnlyList<MemberInitializer> (object_initializer);
+		return object_initializer;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valaobjecttypesymbol.vala b/vala/valaobjecttypesymbol.vala
index 8849ae7..c7dec45 100644
--- a/vala/valaobjecttypesymbol.vala
+++ b/vala/valaobjecttypesymbol.vala
@@ -55,7 +55,7 @@ public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
 	 * @return list of type parameters
 	 */
 	public List<TypeParameter> get_type_parameters () {
-		return new ReadOnlyList<TypeParameter> (type_parameters);
+		return type_parameters;
 	}
 
 	public override int get_type_parameter_index (string name) {
diff --git a/vala/valascope.vala b/vala/valascope.vala
index cfa2781..0465461 100644
--- a/vala/valascope.vala
+++ b/vala/valascope.vala
@@ -123,7 +123,7 @@ public class Vala.Scope {
 	}
 
 	public Map<string,Symbol> get_symbol_table () {
-		return new ReadOnlyMap<string,Symbol> (symbol_table);
+		return symbol_table;
 	}
 }
 
diff --git a/vala/valasignal.vala b/vala/valasignal.vala
index 94e3623..1b509a3 100644
--- a/vala/valasignal.vala
+++ b/vala/valasignal.vala
@@ -101,7 +101,7 @@ public class Vala.Signal : Member, Lockable {
 	}
 
 	public List<FormalParameter> get_parameters () {
-		return new ReadOnlyList<FormalParameter> (parameters);
+		return parameters;
 	}
 
 	/**
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index df84366..97c6a2f 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -104,7 +104,7 @@ public class Vala.SourceFile {
 	 * @return list of comments
 	 */
 	public List<Comment> get_comments () {
-		return new ReadOnlyList<Comment> (comments);
+		return comments;
 	}
 
 	/**
@@ -142,7 +142,7 @@ public class Vala.SourceFile {
 	 * @return code node list
 	 */
 	public List<CodeNode> get_nodes () {
-		return new ReadOnlyList<CodeNode> (nodes);
+		return nodes;
 	}
 
 	public void accept (CodeVisitor visitor) {
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 7376635..0e5513c 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -125,7 +125,7 @@ public class Vala.Struct : TypeSymbol {
 	 * @return list of type parameters
 	 */
 	public List<TypeParameter> get_type_parameters () {
-		return new ReadOnlyList<TypeParameter> (type_parameters);
+		return type_parameters;
 	}
 
 	/**
@@ -157,7 +157,7 @@ public class Vala.Struct : TypeSymbol {
 	 * @return list of fields
 	 */
 	public List<Field> get_fields () {
-		return new ReadOnlyList<Field> (fields);
+		return fields;
 	}
 
 	/**
@@ -166,7 +166,7 @@ public class Vala.Struct : TypeSymbol {
 	 * @return list of constants
 	 */
 	public List<Constant> get_constants () {
-		return new ReadOnlyList<Constant> (constants);
+		return constants;
 	}
 
 	/**
@@ -210,7 +210,7 @@ public class Vala.Struct : TypeSymbol {
 	 * @return list of methods
 	 */
 	public List<Method> get_methods () {
-		return new ReadOnlyList<Method> (methods);
+		return methods;
 	}
 
 	/**
@@ -236,7 +236,7 @@ public class Vala.Struct : TypeSymbol {
 	 * @return list of properties
 	 */
 	public List<Property> get_properties () {
-		return new ReadOnlyList<Property> (properties);
+		return properties;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valaswitchsection.vala b/vala/valaswitchsection.vala
index 334f6a7..5247f37 100644
--- a/vala/valaswitchsection.vala
+++ b/vala/valaswitchsection.vala
@@ -54,7 +54,7 @@ public class Vala.SwitchSection : Block {
 	 * @return switch label list
 	 */
 	public List<SwitchLabel> get_labels () {
-		return new ReadOnlyList<SwitchLabel> (labels);
+		return labels;
 	}
 	
 	public bool has_default_label () {
diff --git a/vala/valaswitchstatement.vala b/vala/valaswitchstatement.vala
index b8341cd..eb038bb 100644
--- a/vala/valaswitchstatement.vala
+++ b/vala/valaswitchstatement.vala
@@ -70,7 +70,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
 	 * @return section list
 	 */
 	public List<SwitchSection> get_sections () {
-		return new ReadOnlyList<SwitchSection> (sections);
+		return sections;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala
index 19be21c..4bf6e7a 100644
--- a/vala/valatrystatement.vala
+++ b/vala/valatrystatement.vala
@@ -83,7 +83,7 @@ public class Vala.TryStatement : CodeNode, Statement {
 	 * @return list of catch clauses
 	 */
 	public List<CatchClause> get_catch_clauses () {
-		return new ReadOnlyList<CatchClause> (catch_clauses);
+		return catch_clauses;
 	}
 
 	public override void accept (CodeVisitor visitor) {
diff --git a/vala/valatypesymbol.vala b/vala/valatypesymbol.vala
index 2614f8a..7be7b97 100644
--- a/vala/valatypesymbol.vala
+++ b/vala/valatypesymbol.vala
@@ -232,7 +232,7 @@ public abstract class Vala.TypeSymbol : Symbol {
 				cheader_filenames.add (source_reference.file.get_cinclude_filename ());
 			}
 		}
-		return new ReadOnlyList<string> (cheader_filenames);
+		return cheader_filenames;
 	}
 
 	/**



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