]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Drop ReadOnly* collection classes
authorJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 11:10:54 +0000 (12:10 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 11:10:54 +0000 (12:10 +0100)
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.

39 files changed:
ccode/valaccodecommaexpression.vala
ccode/valaccodefragment.vala
ccode/valaccodefunctioncall.vala
gee/Makefile.am
gee/readonlycollection.vala [deleted file]
gee/readonlylist.vala [deleted file]
gee/readonlymap.vala [deleted file]
gee/readonlyset.vala [deleted file]
vala/valaarraycreationexpression.vala
vala/valabasicblock.vala
vala/valablock.vala
vala/valaclass.vala
vala/valacodecontext.vala
vala/valacodenode.vala
vala/valadatatype.vala
vala/valadelegate.vala
vala/valaelementaccess.vala
vala/valaenum.vala
vala/valaerrordomain.vala
vala/valaexpression.vala
vala/valaforstatement.vala
vala/valainitializerlist.vala
vala/valainterface.vala
vala/valalambdaexpression.vala
vala/valamember.vala
vala/valamemberaccess.vala
vala/valamethod.vala
vala/valamethodcall.vala
vala/valanamespace.vala
vala/valaobjectcreationexpression.vala
vala/valaobjecttypesymbol.vala
vala/valascope.vala
vala/valasignal.vala
vala/valasourcefile.vala
vala/valastruct.vala
vala/valaswitchsection.vala
vala/valaswitchstatement.vala
vala/valatrystatement.vala
vala/valatypesymbol.vala

index 7f16ffd9438ef239b12306542891810f4e561c3a..6010428e07daadc32a9e3ebc85bbfc01d4fcfcbe 100644 (file)
@@ -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) {
index e13c4e3856d886f72cb7fbe59dbdab27dcf40504..0e229fffac6c15c06671cf04575036c70f1d0f0b 100644 (file)
@@ -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) {
index ffa6595010493f4408c805e0db66f1d5472be23e..e9e7d14c3d1f94db8179f32c95f6c3af0dac369f 100644 (file)
@@ -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) {
index 322ca63b670c7709666b9856909d0a8a76224d62..5b358c56d3dd9340342dbf253f8e663ba2efefdc 100644 (file)
@@ -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/gee/readonlycollection.vala b/gee/readonlycollection.vala
deleted file mode 100644 (file)
index d0e3458..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* readonlycollection.vala
- *
- * Copyright (C) 2007-2008  Jürg Billeter
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Jürg Billeter <j@bitron.ch>
- */
-
-using GLib;
-
-/**
- * Represents a read-only collection of items.
- */
-public class Vala.ReadOnlyCollection<G> : CollectionObject, Iterable<G>, Collection<G> {
-       public int size {
-               get { return _collection.size; }
-       }
-
-       public Collection<G> collection {
-               set { _collection = value; }
-       }
-
-       private Collection<G> _collection;
-
-       public ReadOnlyCollection (Collection<G>? collection = null) {
-               this.collection = collection;
-       }
-
-       public Type get_element_type () {
-               return typeof (G);
-       }
-
-       public Vala.Iterator<G> iterator () {
-               if (_collection == null) {
-                       return new Iterator<G> ();
-               }
-
-               return _collection.iterator ();
-       }
-
-       public bool contains (G item) {
-               if (_collection == null) {
-                       return false;
-               }
-
-               return _collection.contains (item);
-       }
-
-       public bool add (G item) {
-               assert_not_reached ();
-       }
-
-       public bool remove (G item) {
-               assert_not_reached ();
-       }
-
-       public void clear () {
-               assert_not_reached ();
-       }
-
-       private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
-               public bool next () {
-                       return false;
-               }
-
-               public G? get () {
-                       return null;
-               }
-       }
-}
-
diff --git a/gee/readonlylist.vala b/gee/readonlylist.vala
deleted file mode 100644 (file)
index d3793bf..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* readonlylist.vala
- *
- * Copyright (C) 2007-2008  Jürg Billeter
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Jürg Billeter <j@bitron.ch>
- */
-
-using GLib;
-
-/**
- * Represents a read-only collection of items in a well-defined order.
- */
-public class Vala.ReadOnlyList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
-       public int size {
-               get { return _list.size; }
-       }
-
-       public List<G> list {
-               set { _list = value; }
-       }
-
-       private List<G> _list;
-
-       public ReadOnlyList (List<G>? list = null) {
-               this.list = list;
-       }
-
-       public Type get_element_type () {
-               return typeof (G);
-       }
-
-       public Vala.Iterator<G> iterator () {
-               if (_list == null) {
-                       return new Iterator<G> ();
-               }
-
-               return _list.iterator ();
-       }
-
-       public bool contains (G item) {
-               if (_list == null) {
-                       return false;
-               }
-
-               return _list.contains (item);
-       }
-
-       public int index_of (G item) {
-               if (_list == null) {
-                       return -1;
-               }
-
-               return _list.index_of (item);
-       }
-
-       public bool add (G item) {
-               assert_not_reached ();
-       }
-
-       public bool remove (G item) {
-               assert_not_reached ();
-       }
-
-       public void insert (int index, G item) {
-               assert_not_reached ();
-       }
-
-       public void remove_at (int index) {
-               assert_not_reached ();
-       }
-
-       public G? get (int index) {
-               if (_list == null) {
-                       return null;
-               }
-
-               return _list.get (index);
-       }
-
-       public void set (int index, G o) {
-               assert_not_reached ();
-       }
-
-       public void clear () {
-               assert_not_reached ();
-       }
-
-       class Iterator<G> : CollectionObject, Vala.Iterator<G> {
-               public bool next () {
-                       return false;
-               }
-
-               public G? get () {
-                       return null;
-               }
-       }
-}
-
diff --git a/gee/readonlymap.vala b/gee/readonlymap.vala
deleted file mode 100644 (file)
index 264cbee..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/* readonlymap.vala
- *
- * Copyright (C) 2007-2008  Jürg Billeter
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Jürg Billeter <j@bitron.ch>
- */
-
-using GLib;
-
-/**
- * Represents a read-only collection of key/value pairs.
- */
-public class Vala.ReadOnlyMap<K,V> : CollectionObject, Map<K,V> {
-       public int size {
-               get { return _map.size; }
-       }
-
-       public Map<K,V> map {
-               set { _map = value; }
-       }
-
-       private Map<K,V> _map;
-
-       public ReadOnlyMap (Map<K,V>? map = null) {
-               this.map = map;
-       }
-
-       public Set<K> get_keys () {
-               if (_map == null) {
-                       return new ReadOnlySet<K> ();
-               }
-
-               return _map.get_keys ();
-       }
-
-       public Collection<V> get_values () {
-               if (_map == null) {
-                       return new ReadOnlyCollection<V> ();
-               }
-
-               return _map.get_values ();
-       }
-
-       public bool contains (K key) {
-               if (_map == null) {
-                       return false;
-               }
-
-               return _map.contains (key);
-       }
-
-       public V? get (K key) {
-               if (_map == null) {
-                       return null;
-               }
-
-               return _map.get (key);
-       }
-
-       public void set (K key, V value) {
-               assert_not_reached ();
-       }
-
-       public bool remove (K key) {
-               assert_not_reached ();
-       }
-
-       public void clear () {
-               assert_not_reached ();
-       }
-}
-
diff --git a/gee/readonlyset.vala b/gee/readonlyset.vala
deleted file mode 100644 (file)
index 3d80343..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* readonlyset.vala
- *
- * Copyright (C) 2007-2008  Jürg Billeter
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Jürg Billeter <j@bitron.ch>
- */
-
-using GLib;
-
-/**
- * Represents a read-only collection of items without duplicates.
- */
-public class Vala.ReadOnlySet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
-       public int size {
-               get { return _set.size; }
-       }
-
-       public Set<G> set {
-               set { _set = value; }
-       }
-
-       private Set<G> _set;
-
-       public ReadOnlySet (Set<G>? set = null) {
-               this.set = set;
-       }
-
-       public Type get_element_type () {
-               return typeof (G);
-       }
-
-       public Vala.Iterator<G> iterator () {
-               if (_set == null) {
-                       return new Iterator<G> ();
-               }
-
-               return _set.iterator ();
-       }
-
-       public bool contains (G item) {
-               if (_set == null) {
-                       return false;
-               }
-
-               return _set.contains (item);
-       }
-
-       public bool add (G item) {
-               assert_not_reached ();
-       }
-
-       public bool remove (G item) {
-               assert_not_reached ();
-       }
-
-       public void clear () {
-               assert_not_reached ();
-       }
-
-       private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
-               public bool next () {
-                       return false;
-               }
-
-               public G? get () {
-                       return null;
-               }
-       }
-}
-
index c2cb9af9ac8e1aac14f196663618aa09ebae236d..80f4367cbad988e9c8584a76c811ae2ce5a91021 100644 (file)
@@ -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) {
index 7339224d52eac83f1f2f7d45c241e345639a492e..ef32e051e103659c48d5f624e3d88b2af9a33fa7 100644 (file)
@@ -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) {
index 59eba4467a79a86beb001e753198fec431e6c0c1..3a7eac7aadfa39dcd409607a9a23b1b3ad16474c 100644 (file)
@@ -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) {
index dd39f8f18a3c368be294e7afc9f6c256c89a405f..4fc73a24c5ed7472e39c3429d7dd1c6b95635427 100644 (file)
@@ -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;
        }
 
        /**
index c1559f113a21c196d061197a531d3dbd9bb6d65f..9b24fcb07bfbc7a7b162f752ce7180b8c44436fc 100644 (file)
@@ -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;
        }
 
        /**
index 8f83cfd5066081d9e4f7c198e2dac053ed4c9738..feaf60ad3e3b11ac2ef4ed925ac502b6bd424a22 100644 (file)
@@ -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;
        }
index bba74622febae972de3a8f56cfaf81ac8c1d067e..2027bb9a2daa3134275bd3ce7d2f8885be39cd76 100644 (file)
@@ -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;
        }
index a882d3a2a3bbfd124214ac86a4fd2100b37f3e6c..d152714ac9a81e5925298722d2597c14fbe4f87b 100644 (file)
@@ -130,7 +130,7 @@ public class Vala.Delegate : TypeSymbol {
         * @return parameter list
         */
        public List<FormalParameter> get_parameters () {
-               return new ReadOnlyList<FormalParameter> (parameters);
+               return parameters;
        }
        
        /**
index c96ee7a0345a46d7015e9bdd297f98f728818f64..8f9bd165f46ab6943b7aa84abeb3b8e8cd074a7f 100644 (file)
@@ -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) {
index 0e488adb61690dd0ce0ecaaf011b641fec2e1ac2..f5c21489bca20d236a3e98a4d4f2ff9344cb6434 100644 (file)
@@ -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) {
index 7ccc78aad2e952f3ab34d3f6dc0b33bf61428dd7..dbc6b4567a4cebb71631f4726ea2c795bbeccdc1 100644 (file)
@@ -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) {
index 334ed2986e63a6436c4bc052b571bda344ae44ad..afd54aa0c1791c15b43e19d2e272ce4bb91ab255 100644 (file)
@@ -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 {
index 44fac128ad020a85893158d3cb334a0a29913eda..99301fe9f08db526b8c7f45ef37fdf90bf5b4c82 100644 (file)
@@ -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) {
index 82aa6e91e08065a64e2e1210cc7005f4e4360520..927f5cee2847c7c59756c8dd022b48021d56f9e5 100644 (file)
@@ -46,7 +46,7 @@ public class Vala.InitializerList : Expression {
         * @return expression list
         */
        public List<Expression> get_initializers () {
-               return new ReadOnlyList<Expression> (initializers);
+               return initializers;
        }
 
        /**
index a76998aa7055277797b8793fa8f8a346a497b844..0ff381d1793b8a6bc89f7d0cdc93bf43ea8c86ef 100644 (file)
@@ -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;
        }
 
        /**
index a6c2dba9b53caf199fb7faa6cfd719acb5e9223a..25e54b0f6b380f54d33ecedcb1da25240ef86c45 100644 (file)
@@ -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) {
index 602c06a65a16dea0c7b44a9a4bf7caff01b1e638..1c25c3619a43c8996bc5dab108ac53a23992d3d4 100644 (file)
@@ -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;
        }
 
        
index 5e95a98cafb0343f53430180b42cdd08195413e7..ebb60d9411e77340d64402bd01d24748555f0590 100644 (file)
@@ -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) {
index f98336e62ea9190dc451ea456cd7307fb2e449f5..04ec4230ebf3e3da435da17f114e5d6737501c0c 100644 (file)
@@ -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) {
index 7db46ba4dd4356981a91766e9fd3dc024c175dd9..047df7e63adf9f493ef45107065f1957fe349913 100644 (file)
@@ -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) {
index e3a0f9037079c28aa37ff1826392fb7dd7ec9b3c..1417f1006611b8cff330a9eb822f3f23f4b03e08 100644 (file)
@@ -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;
        }
 
        /**
index 9f1def9e438e1ad5cdf99edc4205795f4dc5e0f2..2c8ad17b3a791486f093021f72f0570e18fd235e 100644 (file)
@@ -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) {
index 8849ae7eefc3745286a8223c792d656706f82bd4..c7dec45ae34af7ee5aa237f7972b07a555ab5d21 100644 (file)
@@ -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) {
index cfa2781e3554232c6c02aa3279729aaebc96b012..046546123ffd293ed5e89ede2656b28fb0b130dc 100644 (file)
@@ -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;
        }
 }
 
index 94e3623d79a271fbeb1e4164d1d47a1de57b6034..1b509a36af527598be28e20cfae5656702a45e20 100644 (file)
@@ -101,7 +101,7 @@ public class Vala.Signal : Member, Lockable {
        }
 
        public List<FormalParameter> get_parameters () {
-               return new ReadOnlyList<FormalParameter> (parameters);
+               return parameters;
        }
 
        /**
index df8436694f28b4a229b3ca2cd1b20bddbb847df8..97c6a2fd44c8c5033d6ae1c48ade0e60db496b17 100644 (file)
@@ -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) {
index 73766357613e3c41e7bc1fcfea03bddfc0ccf376..0e5513c4913e38fcc2ad144a46e9a0f7243342dc 100644 (file)
@@ -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) {
index 334f6a7e8748d3ecd6e48e58ffb631c0aea0591c..5247f37295e5ec70a500752edffdbf2f95e73092 100644 (file)
@@ -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 () {
index b8341cd5f2bf3612d1ff3c16f8643e338ed60550..eb038bbf463fe5bcdd3368d4c47637642b94b9d2 100644 (file)
@@ -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) {
index 19be21c116c48388e74cf95cc2bc6d8c31aac58d..4bf6e7a61fd9121979f3d3b2c063df6de0727be2 100644 (file)
@@ -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) {
index 2614f8af9ebaeeea26b081454ffd6a219b0782b8..7be7b97ff83bd8ab6e6db1ea3223de113db7581b 100644 (file)
@@ -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;
        }
 
        /**