Don't derive from GObject in libvala where not necessary to improve
authorJürg Billeter <j@bitron.ch>
Thu, 14 Aug 2008 21:22:53 +0000 (21:22 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 14 Aug 2008 21:22:53 +0000 (21:22 +0000)
2008-08-14  Jürg Billeter  <j@bitron.ch>

Don't derive from GObject in libvala where not necessary to improve
compilation performance

svn path=/trunk/; revision=1757

112 files changed:
ChangeLog
ccode/valaccodeassignment.vala
ccode/valaccodebinaryexpression.vala
ccode/valaccodecastexpression.vala
ccode/valaccodecomment.vala
ccode/valaccodeconditionalexpression.vala
ccode/valaccodeconstant.vala
ccode/valaccodedostatement.vala
ccode/valaccodeelementaccess.vala
ccode/valaccodeexpressionstatement.vala
ccode/valaccodegotostatement.vala
ccode/valaccodeidentifier.vala
ccode/valaccodeifstatement.vala
ccode/valaccodeincludedirective.vala
ccode/valaccodelabel.vala
ccode/valaccodelinedirective.vala
ccode/valaccodemacroreplacement.vala
ccode/valaccodememberaccess.vala
ccode/valaccodenode.vala
ccode/valaccodeoncesection.vala
ccode/valaccodeparenthesizedexpression.vala
ccode/valaccodeunaryexpression.vala
ccode/valaccodevariabledeclarator.vala
ccode/valaccodewhilestatement.vala
ccode/valaccodewriter.vala
compiler/valacompiler.vala
gee/Makefile.am
gee/arraylist.vala
gee/collectionobject.vala [new file with mode: 0644]
gee/hashmap.vala
gee/hashset.vala
gee/iterable.vala
gee/iterator.vala
gee/map.vala
gee/readonlycollection.vala
gee/readonlylist.vala
gee/readonlymap.vala
gee/readonlyset.vala
gobject/valaccodecompiler.vala
gobject/valaccodegenerator.vala
gobject/valatyperegisterfunction.vala
tests/arrays.vala
vala/valaaddressofexpression.vala
vala/valaarraycreationexpression.vala
vala/valaarraylengthfield.vala
vala/valaarraymovemethod.vala
vala/valaarrayresizemethod.vala
vala/valaassignment.vala
vala/valabasicblock.vala
vala/valabinaryexpression.vala
vala/valablock.vala
vala/valacastexpression.vala
vala/valacfgbuilder.vala
vala/valacharacterliteral.vala
vala/valaclass.vala
vala/valacodebinding.vala
vala/valacodecontext.vala
vala/valacodenode.vala
vala/valacodevisitor.vala
vala/valaconditionalexpression.vala
vala/valaconstant.vala
vala/valaconstructor.vala
vala/valacreationmethod.vala
vala/valadeclarationstatement.vala
vala/valadelegate.vala
vala/valadestructor.vala
vala/valadostatement.vala
vala/valadynamicmethod.vala
vala/valadynamicproperty.vala
vala/valadynamicsignal.vala
vala/valaenum.vala
vala/valaenumvalue.vala
vala/valaerrorcode.vala
vala/valaerrordomain.vala
vala/valaexpressionstatement.vala
vala/valafield.vala
vala/valaforeachstatement.vala
vala/valaformalparameter.vala
vala/valaforstatement.vala
vala/valagenieparser.vala
vala/valageniescanner.vala
vala/valaifstatement.vala
vala/valainstancecast.vala
vala/valainterface.vala
vala/valainvocationexpression.vala
vala/valalocalvariable.vala
vala/valalockable.vala
vala/valalockstatement.vala
vala/valamember.vala
vala/valamethod.vala
vala/valanamedargument.vala
vala/valanamespace.vala
vala/valaparenthesizedexpression.vala
vala/valaparser.vala
vala/valapointerindirection.vala
vala/valapostfixexpression.vala
vala/valaproperty.vala
vala/valareferencetransferexpression.vala
vala/valascanner.vala
vala/valascope.vala
vala/valasignal.vala
vala/valasourcefile.vala
vala/valasourcefilecycle.vala
vala/valasourcereference.vala
vala/valastruct.vala
vala/valaswitchsection.vala
vala/valaswitchstatement.vala
vala/valasymbol.vala
vala/valatypecheck.vala
vala/valatypeparameter.vala
vala/valaunaryexpression.vala
vala/valawhilestatement.vala

index c07a5a6..253fde5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-08-14  Jürg Billeter  <j@bitron.ch>
 
+       Don't derive from GObject in libvala where not necessary to improve
+       compilation performance
+
+2008-08-14  Jürg Billeter  <j@bitron.ch>
+
        * configure.ac: Post-release version bump
 
 2008-08-14  Jürg Billeter  <j@bitron.ch>
index 4895dcf..009b930 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeAssignment : CCodeExpression {
        /**
         * Left hand side of the assignment.
         */
-       public CCodeExpression left { get; construct; }
+       public CCodeExpression left { get; set; }
        
        /**
         * Assignment operator.
@@ -39,7 +39,7 @@ public class Vala.CCodeAssignment : CCodeExpression {
        /**
         * Right hand side of the assignment.
         */
-       public CCodeExpression right { get; construct; }
+       public CCodeExpression right { get; set; }
        
        public CCodeAssignment (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
                left = l;
index 106519d..aaeefb3 100644 (file)
@@ -34,12 +34,12 @@ public class Vala.CCodeBinaryExpression : CCodeExpression {
        /**
         * The left operand.
         */
-       public CCodeExpression left { get; set construct; }
+       public CCodeExpression left { get; set; }
 
        /**
         * The right operand.
         */
-       public CCodeExpression right { get; set construct; }
+       public CCodeExpression right { get; set; }
        
        public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression l, CCodeExpression r) {
                operator = op;
index c866423..00dbfcf 100644 (file)
@@ -29,12 +29,12 @@ public class Vala.CCodeCastExpression : CCodeExpression {
        /**
         * The expression to be cast.
         */
-       public CCodeExpression inner { get; set construct; }
+       public CCodeExpression inner { get; set; }
        
        /**
         * The target type.
         */
-       public string type_name { get; set construct; }
+       public string type_name { get; set; }
        
        public CCodeCastExpression (CCodeExpression expr, string type) {
                inner = expr;
index f68e24b..3aacaa4 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeComment : CCodeNode {
        /**
         * The text content of the comment.
         */
-       public string text { get; set construct; }
+       public string text { get; set; }
        
        public CCodeComment (string _text) {
                text = _text;
index 7ebf07f..213ffe0 100644 (file)
@@ -29,17 +29,17 @@ public class Vala.CCodeConditionalExpression : CCodeExpression {
        /**
         * The condition.
         */
-       public CCodeExpression condition { get; set construct; }
+       public CCodeExpression condition { get; set; }
        
        /**
         * The expression to be evaluated if the condition holds.
         */
-       public CCodeExpression true_expression { get; set construct; }
+       public CCodeExpression true_expression { get; set; }
        
        /**
         * The expression to be evaluated if the condition doesn't hold.
         */
-       public CCodeExpression false_expression { get; set construct; }
+       public CCodeExpression false_expression { get; set; }
        
        public CCodeConditionalExpression (CCodeExpression cond, CCodeExpression true_expr, CCodeExpression false_expr) {
                condition = cond;
index b4d9b19..ebf36e9 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeConstant : CCodeExpression {
        /**
         * The name of this constant.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
        
        public CCodeConstant (string _name) {
                name = _name;
index bd02b86..7101f8b 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.CCodeDoStatement : CCodeStatement {
        /**
         * The loop condition.
         */
-       public CCodeExpression condition { get; set construct; }
+       public CCodeExpression condition { get; set; }
        
        public CCodeDoStatement (CCodeStatement stmt, CCodeExpression cond) {
                body = stmt;
index 6a69be5..b176ea3 100644 (file)
@@ -31,13 +31,13 @@ public class Vala.CCodeElementAccess : CCodeExpression {
        /**
         * Expression representing the container on which we want to access.
         */
-       public CCodeExpression container { get; set construct; }
+       public CCodeExpression container { get; set; }
        
        /**
         * Expression representing the index we want to access inside the
         * container.
         */
-       public CCodeExpression index { get; set construct; }
+       public CCodeExpression index { get; set; }
        
        public CCodeElementAccess (CCodeExpression cont, CCodeExpression i) {
                container = cont;
index 0320e79..57b2b2d 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeExpressionStatement : CCodeStatement {
        /**
         * The expression to evaluate.
         */
-       public CCodeExpression expression { get; set construct; }
+       public CCodeExpression expression { get; set; }
        
        public CCodeExpressionStatement (CCodeExpression expr) {
                expression = expr;
index 189cb20..14e2c7d 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeGotoStatement : CCodeStatement {
        /**
         * The name of the target label.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
 
        public CCodeGotoStatement (string name) {
                this.name = name;
index 43df6ec..0954e0a 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeIdentifier : CCodeExpression {
        /**
         * The name of this identifier.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
        
        public CCodeIdentifier (string _name) {
                name = _name;
index 544db3b..31a7da9 100644 (file)
@@ -29,17 +29,17 @@ public class Vala.CCodeIfStatement : CCodeStatement {
        /**
         * The boolean condition to evaluate.
         */
-       public CCodeExpression condition { get; set construct; }
+       public CCodeExpression condition { get; set; }
        
        /**
         * The statement to be evaluated if the condition holds.
         */
-       public CCodeStatement true_statement { get; set construct; }
+       public CCodeStatement true_statement { get; set; }
        
        /**
         * The optional statement to be evaluated if the condition doesn't hold.
         */
-       public CCodeStatement? false_statement { get; set construct; }
+       public CCodeStatement? false_statement { get; set; }
        
        public CCodeIfStatement (CCodeExpression cond, CCodeStatement true_stmt, CCodeStatement? false_stmt = null) {
                condition = cond;
index c75c181..549e3f7 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeIncludeDirective : CCodeNode {
        /**
         * The file to be included.
         */
-       public string filename { get; set construct; }
+       public string filename { get; set; }
        
        /**
         * Specifies whether the specified file should be searched in the local
index 2973a8b..efb1866 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeLabel : CCodeStatement {
        /**
         * The name of this label.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
 
        public CCodeLabel (string name) {
                this.name = name;
index 3c2b07f..8f67478 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeLineDirective : CCodeNode {
        /**
         * The name of the source file to be presumed.
         */
-       public string filename { get; set construct; }
+       public string filename { get; set; }
        
        /**
         * The line number in the source file to be presumed.
index 52e0a0a..1737c2e 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeMacroReplacement : CCodeNode {
        /**
         * The name of this macro.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
 
        /**
         * The replacement of this macro.
index 4c90628..f5f2517 100644 (file)
@@ -29,12 +29,12 @@ public class Vala.CCodeMemberAccess : CCodeExpression {
        /**
         * The parent of the member.
         */
-       public CCodeExpression inner { get; set construct; }
+       public CCodeExpression inner { get; set; }
        
        /**
         * The name of the member.
         */
-       public string member_name { get; set construct; }
+       public string member_name { get; set; }
        
        /**
         * Specifies whether the member access happens by pointer dereferencing.
index b6edeff..6ab095f 100644 (file)
@@ -1,6 +1,6 @@
 /* valaccodenode.vala
  *
- * Copyright (C) 2006-2007  Jürg Billeter
+ * Copyright (C) 2006-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
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a node in the C code tree.
  */
-public abstract class Vala.CCodeNode : Object {
+public abstract class Vala.CCodeNode {
        /**
         * The source file name and line number to be presumed for this code
         * node.
index 671553c..10aa861 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeOnceSection : CCodeFragment {
        /**
         * The name of the guarding define.
         */
-       public string define { get; set construct; }
+       public string define { get; set; }
        
        public CCodeOnceSection (string def) {
                define = def;
index f11d837..1fe2870 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeParenthesizedExpression : CCodeExpression {
        /**
         * The expression in the parenthesis.
         */
-       public CCodeExpression inner { get; set construct; }
+       public CCodeExpression inner { get; set; }
        
        public CCodeParenthesizedExpression (CCodeExpression expr) {
                inner = expr;
index 82c3706..686876f 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.CCodeUnaryExpression : CCodeExpression {
        /**
         * The operand.
         */
-       public CCodeExpression inner { get; set construct; }
+       public CCodeExpression inner { get; set; }
        
        public CCodeUnaryExpression (CCodeUnaryOperator op, CCodeExpression expr) {
                operator = op;
index fe32fbe..5d5c8fb 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeVariableDeclarator : CCodeDeclarator {
        /**
         * The variable name.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
        
        /**
         * The optional initializer expression.
index 2d1cc8f..c47a890 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.CCodeWhileStatement : CCodeStatement {
        /**
         * The loop condition.
         */
-       public CCodeExpression condition { get; set construct; }
+       public CCodeExpression condition { get; set; }
        
        /**
         * The loop body.
index 4330e7a..9549b8c 100644 (file)
@@ -25,18 +25,11 @@ using GLib;
 /**
  * Represents a writer to write C source files.
  */
-public class Vala.CCodeWriter : Object {
+public class Vala.CCodeWriter {
        /**
         * Specifies the file to be written.
         */
-       public string filename {
-               get {
-                       return _filename;
-               }
-               construct {
-                       _filename = value;
-               }
-       }
+       public string filename { get; set; }
 
        /**
         * Specifies whether to emit line directives.
@@ -50,7 +43,6 @@ public class Vala.CCodeWriter : Object {
                get { return _bol; }
        }
 
-       private string _filename;
        private string temp_filename;
        private bool file_exists;
 
@@ -61,8 +53,8 @@ public class Vala.CCodeWriter : Object {
        /* at begin of line */
        private bool _bol = true;
        
-       public CCodeWriter (string _filename) {
-               filename = _filename;
+       public CCodeWriter (string filename) {
+               this.filename = filename;
        }
 
        /**
@@ -72,12 +64,12 @@ public class Vala.CCodeWriter : Object {
         *         false otherwise
         */
        public bool open () {
-               file_exists = FileUtils.test (_filename, FileTest.EXISTS);
+               file_exists = FileUtils.test (filename, FileTest.EXISTS);
                if (file_exists) {
-                       temp_filename = "%s.valatmp".printf (_filename);
+                       temp_filename = "%s.valatmp".printf (filename);
                        stream = FileStream.open (temp_filename, "w");
                } else {
-                       stream = FileStream.open (_filename, "w");
+                       stream = FileStream.open (filename, "w");
                }
 
                return (stream != null);
@@ -93,7 +85,7 @@ public class Vala.CCodeWriter : Object {
                        var changed = true;
 
                        try {
-                               var old_file = new MappedFile (_filename, false);
+                               var old_file = new MappedFile (filename, false);
                                var new_file = new MappedFile (temp_filename, false);
                                var len = old_file.get_length ();
                                if (len == new_file.get_length ()) {
@@ -108,7 +100,7 @@ public class Vala.CCodeWriter : Object {
                        }
                        
                        if (changed) {
-                               FileUtils.rename (temp_filename, _filename);
+                               FileUtils.rename (temp_filename, filename);
                        } else {
                                FileUtils.unlink (temp_filename);
                        }
index 83047fb..b614fdd 100644 (file)
@@ -23,7 +23,7 @@
 
 using GLib;
 
-class Vala.Compiler : Object {
+class Vala.Compiler {
        static string basedir;
        static string directory;
        static bool version;
index 8f5f1be..63a8654 100644 (file)
@@ -14,6 +14,7 @@ noinst_LTLIBRARIES = \
 libgee_la_VALASOURCES = \
        arraylist.vala \
        collection.vala \
+       collectionobject.vala \
        hashmap.vala \
        hashset.vala \
        iterable.vala \
index 97ce929..183119b 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Arrays of arbitrary elements which grow automatically as elements are added.
  */
-public class Gee.ArrayList<G> : Object, Iterable<G>, Collection<G>, List<G> {
+public class Gee.ArrayList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
        public int size {
                get { return _size; }
        }
@@ -152,7 +152,7 @@ public class Gee.ArrayList<G> : Object, Iterable<G>, Collection<G>, List<G> {
                _items.resize (value);
        }
 
-       private class Iterator<G> : Object, Gee.Iterator<G> {
+       private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
                public ArrayList<G> list {
                        set {
                                _list = value;
diff --git a/gee/collectionobject.vala b/gee/collectionobject.vala
new file mode 100644 (file)
index 0000000..08398e2
--- /dev/null
@@ -0,0 +1,30 @@
+/* collectionobject.vala
+ *
+ * Copyright (C) 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;
+
+/**
+ * Base class for all collections.
+ */
+public class Gee.CollectionObject {
+}
+
index 3802468..7c47652 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Hashtable implementation of the Map interface.
  */
-public class Gee.HashMap<K,V> : Object, Map<K,V> {
+public class Gee.HashMap<K,V> : CollectionObject, Map<K,V> {
        public int size {
                get { return _nnodes; }
        }
@@ -62,9 +62,6 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
                this.key_hash_func = key_hash_func;
                this.key_equal_func = key_equal_func;
                this.value_equal_func = value_equal_func;
-       }
-
-       construct {
                _array_size = MIN_SIZE;
                _nodes = new Node<K,V>[_array_size];
        }
@@ -182,7 +179,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
                }
        }
 
-       private class KeySet<K,V> : Object, Iterable<K>, Collection<K>, Set<K> {
+       private class KeySet<K,V> : CollectionObject, Iterable<K>, Collection<K>, Set<K> {
                public HashMap<K,V> map {
                        set { _map = value; }
                }
@@ -222,7 +219,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
                }
        }
 
-       private class KeyIterator<K,V> : Object, Iterator<K> {
+       private class KeyIterator<K,V> : CollectionObject, Iterator<K> {
                public HashMap<K,V> map {
                        set {
                                _map = value;
@@ -259,7 +256,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
                }
        }
 
-       private class ValueCollection<K,V> : Object, Iterable<V>, Collection<V> {
+       private class ValueCollection<K,V> : CollectionObject, Iterable<V>, Collection<V> {
                public HashMap<K,V> map {
                        set { _map = value; }
                }
@@ -305,7 +302,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
                }
        }
 
-       private class ValueIterator<K,V> : Object, Iterator<V> {
+       private class ValueIterator<K,V> : CollectionObject, Iterator<V> {
                public HashMap<K,V> map {
                        set {
                                _map = value;
index d614701..af9c781 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Hashtable implementation of the Set interface.
  */
-public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
+public class Gee.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
        public int size {
                get { return _nnodes; }
        }
@@ -56,9 +56,6 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
        public HashSet (HashFunc hash_func = GLib.direct_hash, EqualFunc equal_func = GLib.direct_equal) {
                this.hash_func = hash_func;
                this.equal_func = equal_func;
-       }
-
-       construct {
                _array_size = MIN_SIZE;
                _nodes = new Node<G>[_array_size];
        }
@@ -164,7 +161,7 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
                }
        }
 
-       private class Iterator<G> : Object, Gee.Iterator<G> {
+       private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
                public HashSet<G> set {
                        set {
                                _set = value;
index ca13109..998f598 100644 (file)
@@ -26,7 +26,7 @@ using GLib;
  * Implemented by classes that support a simple iteration over instances of the
  * collection.
  */
-public interface Gee.Iterable<G> : GLib.Object {
+public interface Gee.Iterable<G> : CollectionObject {
        public abstract Type get_element_type ();
 
        /**
index 6642a90..fddee81 100644 (file)
@@ -24,7 +24,7 @@
  * Implemented by classes that support a simple iteration over instances of the
  * collection.
  */
-public interface Gee.Iterator<G> : GLib.Object {
+public interface Gee.Iterator<G> : CollectionObject {
        /**
         * Advances to the next element in the iteration.
         *
index 78858ce..e56a7b5 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * A map is a generic collection of key/value pairs.
  */
-public interface Gee.Map<K,V> : GLib.Object {
+public interface Gee.Map<K,V> : CollectionObject {
        /**
         * The number of items in this map.
         */
index 3a4ac77..c1c7165 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items.
  */
-public class Gee.ReadOnlyCollection<G> : Object, Iterable<G>, Collection<G> {
+public class Gee.ReadOnlyCollection<G> : CollectionObject, Iterable<G>, Collection<G> {
        public int size {
                get { return _collection.size; }
        }
@@ -72,7 +72,7 @@ public class Gee.ReadOnlyCollection<G> : Object, Iterable<G>, Collection<G> {
                assert_not_reached ();
        }
 
-       private class Iterator<G> : Object, Gee.Iterator<G> {
+       private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index 1ea988d..d03eb4d 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items in a well-defined order.
  */
-public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
+public class Gee.ReadOnlyList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
        public int size {
                get { return _list.size; }
        }
@@ -100,7 +100,7 @@ public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
                assert_not_reached ();
        }
 
-       class Iterator<G> : Object, Gee.Iterator<G> {
+       class Iterator<G> : CollectionObject, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index e629527..c8e352c 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of key/value pairs.
  */
-public class Gee.ReadOnlyMap<K,V> : Object, Map<K,V> {
+public class Gee.ReadOnlyMap<K,V> : CollectionObject, Map<K,V> {
        public int size {
                get { return _map.size; }
        }
index 15bcd52..54600dc 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items without duplicates.
  */
-public class Gee.ReadOnlySet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
+public class Gee.ReadOnlySet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
        public int size {
                get { return _set.size; }
        }
@@ -72,7 +72,7 @@ public class Gee.ReadOnlySet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
                assert_not_reached ();
        }
 
-       private class Iterator<G> : Object, Gee.Iterator<G> {
+       private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index ad7438a..229658c 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Interface to the C compiler.
  */
-public class Vala.CCodeCompiler : Object {
+public class Vala.CCodeCompiler {
        public CCodeCompiler () {
        }
 
index b1991b9..ecbaf1e 100644 (file)
@@ -136,9 +136,6 @@ public class Vala.CCodeGenerator : CodeGenerator {
        private Set<string> wrappers;
 
        public CCodeGenerator () {
-       }
-       
-       construct {
                predefined_marshal_set = new HashSet<string> (str_hash, str_equal);
                predefined_marshal_set.add ("VOID:VOID");
                predefined_marshal_set.add ("VOID:BOOLEAN");
index f2337d0..eba04f0 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * C function to register a type at runtime.
  */
-public abstract class Vala.TypeRegisterFunction : Object {
+public abstract class Vala.TypeRegisterFunction {
        private CCodeFragment declaration_fragment = new CCodeFragment ();
 
        private CCodeFragment definition_fragment = new CCodeFragment ();
index b116d45..f4dea49 100644 (file)
@@ -4,7 +4,7 @@ class Maman.Foo : Object {
        public Foo (construct string bar) {
        }
 
-       public string bar { get; set construct; }
+       public string bar { get; set; }
 
        static void test_integer_array () {
                stdout.printf ("One dimensional array creation and assignment: 1");
index 199611e..1d1f714 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.AddressofExpression : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
index d679fa6..53da551 100644 (file)
@@ -42,7 +42,7 @@ public class Vala.ArrayCreationExpression : Expression {
        /**
         * The rank of the array.
         */
-       public int rank { get; set construct; }
+       public int rank { get; set; }
        
        /**
         * The size for each dimension ascending from left to right.
@@ -52,7 +52,7 @@ public class Vala.ArrayCreationExpression : Expression {
        /**
         * The root array initializer list.
         */
-       public InitializerList? initializer_list { get; set construct; }
+       public InitializerList? initializer_list { get; set; }
 
        private DataType _element_type;
 
index f1df775..87a8b52 100644 (file)
@@ -32,6 +32,7 @@ public class Vala.ArrayLengthField : Field {
         * @return newly created field
         */
        public ArrayLengthField (SourceReference source_reference) {
+               base.init ();
                name = "length";
                external = true;
                this.source_reference = source_reference;
index cc71c7a..0f22c04 100644 (file)
@@ -32,6 +32,7 @@ public class Vala.ArrayMoveMethod : Method {
         * @return newly created method
         */
        public ArrayMoveMethod (SourceReference source_reference) {
+               base.init ();
                name = "move";
                external = true;
                this.source_reference = source_reference;
index 7e8da05..f44a5bc 100644 (file)
@@ -32,12 +32,10 @@ public class Vala.ArrayResizeMethod : Method {
         * @return newly created method
         */
        public ArrayResizeMethod (SourceReference source_reference) {
+               base.init ();
                name = "resize";
                external = true;
                this.source_reference = source_reference;
-       }
-
-       construct {
                cinstance_parameter_position = 0.1;
        }
 }
index 31cc32b..8af18ae 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.Assignment : Expression {
         */
        public Expression left {
                get { return _left; }
-               set construct {
+               set {
                        _left = value;
                        _left.parent_node = this;
                }
@@ -49,7 +49,7 @@ public class Vala.Assignment : Expression {
         */
        public Expression right {
                get { return _right; }
-               set construct {
+               set {
                        _right = value;
                        _right.parent_node = this;
                }
index bee0171..4dd9792 100644 (file)
@@ -27,7 +27,7 @@ using Gee;
  * Represents a basic block, i.e. a straight-line piece of code without any
  * jumps or jump targets.
  */
-public class Vala.BasicBlock : Object {
+public class Vala.BasicBlock {
        private Gee.List<CodeNode> nodes = new ArrayList<CodeNode> ();
 
        private Gee.List<weak BasicBlock> predecessors = new ArrayList<weak BasicBlock> ();
index 77ad1eb..36cc432 100644 (file)
@@ -40,7 +40,7 @@ public class Vala.BinaryExpression : Expression {
                get {
                        return _left;
                }
-               set construct {
+               set {
                        _left = value;
                        _left.parent_node = this;
                }
@@ -53,7 +53,7 @@ public class Vala.BinaryExpression : Expression {
                get {
                        return _right;
                }
-               set construct {
+               set {
                        _right = value;
                        _right.parent_node = this;
                }
index 4d333b5..c8d19a8 100644 (file)
@@ -42,6 +42,7 @@ public class Vala.Block : Symbol, Statement {
         * @param source reference to source code
         */
        public Block (SourceReference source_reference) {
+               base.init ();
                this.source_reference = source_reference;
        }
        
index 3c69bee..830ab68 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.CastExpression : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
@@ -53,7 +53,7 @@ public class Vala.CastExpression : Expression {
        /**
         * Checked casts return NULL instead of raising an error.
         */
-       public bool is_silent_cast { get; set construct; }
+       public bool is_silent_cast { get; set; }
 
        private Expression _inner;
 
index 13ba9fd..fd5602d 100644 (file)
@@ -27,7 +27,7 @@ using Gee;
  * Code visitor building the control flow graph.
  */
 public class Vala.CFGBuilder : CodeVisitor {
-       private class JumpTarget : Object {
+       private class JumpTarget {
                public bool break_target { get; set; }
                public bool continue_target { get; set; }
                public bool return_target { get; set; }
index d818ce8..422be4d 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.CharacterLiteral : Literal {
                get {
                        return _value;
                }
-               set construct {
+               set {
                        _value = value;
                        
                        if (!value.validate () || (value.len () != 3 && value.next_char ().get_char () != '\\')) {
index 7e5e23a..cdff1ed 100644 (file)
@@ -172,6 +172,7 @@ public class Vala.Class : ObjectTypeSymbol {
         * @return       newly created class
         */
        public Class (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
        }
index cd5f1f3..a64a2fe 100644 (file)
@@ -25,5 +25,5 @@ using GLib;
 /**
  * The link between a source code node and generated code.
  */
-public abstract class Vala.CodeBinding : Object {
+public abstract class Vala.CodeBinding {
 }
index c8c3fad..4977c67 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * The root of the code tree.
  */
-public class Vala.CodeContext : Object {
+public class Vala.CodeContext {
        /**
         * Specifies the name of the library to be built.
         *
@@ -158,15 +158,11 @@ public class Vala.CodeContext : Object {
        /**
         * The selected code generator.
         */
-       public CodeGenerator codegen { get; set; }
+       public CodeGenerator codegen { get; set; default = new CodeGenerator (); }
 
        public CodeContext () {
        }
 
-       construct {
-               codegen = new CodeGenerator ();
-       }
-
        /**
         * Returns a copy of the list of source files.
         *
index 6adb08c..bef6862 100644 (file)
@@ -29,7 +29,7 @@ using Gee;
  * Code nodes get created by the parser and are used throughout the whole
  * compilation process.
  */
-public abstract class Vala.CodeNode : Object {
+public abstract class Vala.CodeNode {
        /**
         * Parent of this code node.
         */
@@ -164,7 +164,7 @@ public abstract class Vala.CodeNode : Object {
        public virtual string to_string () {
                var str = new StringBuilder ();
 
-               str.append ("/* ").append (get_type ().name ());
+               str.append ("/* ");
 
                if (source_reference != null) {
                        str.append ("@").append (source_reference.to_string ());
index 1ebe666..a485adf 100644 (file)
@@ -26,7 +26,7 @@ using GLib;
 /**
  * Abstract code node visitor for traversing source code tree.
  */
-public abstract class Vala.CodeVisitor : Object {
+public abstract class Vala.CodeVisitor {
        /**
         * Visit operation called for source files.
         *
index b827951..5935725 100644 (file)
@@ -29,17 +29,17 @@ public class Vala.ConditionalExpression : Expression {
        /**
         * The condition.
         */
-       public Expression condition { get; set construct; }
+       public Expression condition { get; set; }
        
        /**
         * The expression to be evaluated if the condition holds.
         */
-       public Expression true_expression { get; set construct; }
+       public Expression true_expression { get; set; }
 
        /**
         * The expression to be evaluated if the condition doesn't hold.
         */
-       public Expression false_expression { get; set construct; }
+       public Expression false_expression { get; set; }
        
        /**
         * Creates a new conditional expression.
index 112945b..8c6987f 100644 (file)
@@ -68,6 +68,7 @@ public class Vala.Constant : Member, Lockable {
         * @return                 newly created constant
         */
        public Constant (string name, DataType type_reference, Expression? initializer, SourceReference? source_reference) {
+               base.init ();
                this.name = name;
                this.type_reference = type_reference;
                this.initializer = initializer;
index e4e3e5d..7ad4a55 100644 (file)
@@ -48,6 +48,7 @@ public class Vala.Constructor : Symbol {
         * @return       newly created constructor
         */
        public Constructor (SourceReference source) {
+               base.init ();
                source_reference = source;
        }
 
index b2c40e9..c878cc0 100644 (file)
@@ -53,6 +53,7 @@ public class Vala.CreationMethod : Method {
         * @return                 newly created method
         */
        public CreationMethod (string? type_name, string? name, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.source_reference = source_reference;
                this.type_name = type_name;
index 6cf835a..6e98128 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.DeclarationStatement : CodeNode, Statement {
        /**
         * The local variable or constant declaration.
         */
-       public Symbol declaration { get; set construct; }
+       public Symbol declaration { get; set; }
 
        /**
         * Creates a new declaration statement.
index d9cdb8e..281ef0a 100644 (file)
@@ -95,12 +95,11 @@ public class Vala.Delegate : TypeSymbol {
         * @return            newly created delegate
         */
        public Delegate (string? name, DataType return_type, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.return_type = return_type;
                this.source_reference = source_reference;
-       }
 
-       construct {
                cinstance_parameter_position = -1;
                carray_length_parameter_position = -3;
                cdelegate_target_parameter_position = -3;
index 780cb8a..df623c5 100644 (file)
@@ -48,6 +48,7 @@ public class Vala.Destructor : Symbol {
         * @return                 newly created destructor
         */
        public Destructor (SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
        }
 
index 94b9326..a2f2d0a 100644 (file)
@@ -46,7 +46,7 @@ public class Vala.DoStatement : CodeNode, Statement {
                get {
                        return _condition;
                }
-               set construct {
+               set {
                        _condition = value;
                        _condition.parent_node = this;
                }
index cac3aca..6b17587 100644 (file)
@@ -35,6 +35,7 @@ public class Vala.DynamicMethod : Method {
        static int dynamic_method_id;
 
        public DynamicMethod (DataType dynamic_type, string name, DataType return_type, SourceReference? source_reference = null) {
+               base.init ();
                this.dynamic_type = dynamic_type;
                this.name = name;
                this.return_type = return_type;
index ed34438..c90ddbc 100644 (file)
@@ -32,6 +32,7 @@ public class Vala.DynamicProperty : Property {
        private string cname;
 
        public DynamicProperty (DataType dynamic_type, string name, SourceReference? source_reference = null) {
+               base.init ();
                this.dynamic_type = dynamic_type;
                this.name = name;
                this.source_reference = source_reference;
index 459ddb3..a8d65f6 100644 (file)
@@ -31,6 +31,7 @@ public class Vala.DynamicSignal : Signal {
        public Expression handler { get; set; }
 
        public DynamicSignal (DataType dynamic_type, string name, DataType return_type, SourceReference? source_reference = null) {
+               base.init ();
                this.dynamic_type = dynamic_type;
                this.name = name;
                this.return_type = return_type;
index 09e3e48..6f73b3f 100644 (file)
@@ -53,6 +53,7 @@ public class Vala.Enum : TypeSymbol {
         * @return                 newly created enum
         */
        public Enum (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
        }
index 7ba7306..eeef15d 100644 (file)
@@ -40,6 +40,7 @@ public class Vala.EnumValue : Symbol {
         * @return     newly created enum value
         */
        public EnumValue (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.source_reference = source_reference;
        }
@@ -52,6 +53,7 @@ public class Vala.EnumValue : Symbol {
         * @return      newly created enum value
         */
        public EnumValue.with_value (string name, Expression value, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.value = value;
                this.source_reference = source_reference;
index c872c83..669ca5e 100644 (file)
@@ -40,6 +40,7 @@ public class Vala.ErrorCode : Symbol {
         * @return     newly created enum value
         */
        public ErrorCode (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.source_reference = source_reference;
        }
@@ -52,6 +53,7 @@ public class Vala.ErrorCode : Symbol {
         * @return      newly created enum value
         */
        public ErrorCode.with_value (string name, Expression value, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.value = value;
                this.source_reference = source_reference;
index a68087c..3a525e2 100644 (file)
@@ -42,6 +42,7 @@ public class Vala.ErrorDomain : TypeSymbol {
         * @return                 newly created error domain
         */
        public ErrorDomain (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
        }
index 79cad53..e3fb6ec 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.ExpressionStatement : CodeNode, Statement {
                get {
                        return _expression;
                }
-               set construct {
+               set {
                        _expression = value;
                        _expression.parent_node = this;
                }
index f67c1b3..b0474f8 100644 (file)
@@ -87,6 +87,7 @@ public class Vala.Field : Member, Lockable {
         * @return       newly created field
         */
        public Field (string name, DataType field_type, Expression? initializer, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.field_type = field_type;
                this.initializer = initializer;
index 128cedd..cf3fa61 100644 (file)
@@ -43,7 +43,7 @@ public class Vala.ForeachStatement : Block {
        /**
         * Specifies the element variable name.
         */
-       public string variable_name { get; set construct; }
+       public string variable_name { get; set; }
        
        /**
         * Specifies the container.
@@ -52,7 +52,7 @@ public class Vala.ForeachStatement : Block {
                get {
                        return _collection;
                }
-               set construct {
+               set {
                        _collection = value;
                        _collection.parent_node = this;
                }
@@ -101,6 +101,7 @@ public class Vala.ForeachStatement : Block {
         * @return       newly created foreach statement
         */
        public ForeachStatement (DataType? type_reference, string variable_name, Expression collection, Block body, SourceReference source_reference) {
+               base.init ();
                this.variable_name = variable_name;
                this.collection = collection;
                this.body = body;
index d8a21e2..014a5fa 100644 (file)
@@ -98,9 +98,12 @@ public class Vala.FormalParameter : Symbol {
         * @return       newly created formal parameter
         */
        public FormalParameter (string name, DataType parameter_type, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.parameter_type = parameter_type;
                this.source_reference = source_reference;
+
+               access = SymbolAccessibility.PUBLIC;
        }
        
        /**
@@ -108,11 +111,10 @@ public class Vala.FormalParameter : Symbol {
         * parameters.
         */
        public FormalParameter.with_ellipsis (SourceReference? source = null) {
+               base.init ();
                ellipsis = true;
                source_reference = source;
-       }
 
-       construct {
                access = SymbolAccessibility.PUBLIC;
        }
 
index 521a664..657f95c 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                get {
                        return _condition;
                }
-               set construct {
+               set {
                        _condition = value;
                        if (_condition != null) {
                                _condition.parent_node = this;
index 1c35b48..b0ed380 100644 (file)
@@ -67,7 +67,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                PRIVATE = 1 << 7
        }
 
-       construct {
+       public Parser () {
                tokens = new TokenInfo[BUFFER_SIZE];
                class_name = null;
                current_expr_is_lambda = false;
index 2543e08..c889489 100644 (file)
@@ -27,10 +27,10 @@ using Gee;
 /**
  * Lexical scanner for Genie source files.
  */
-public class Vala.Genie.Scanner : Object {
-       public SourceFile source_file { get; construct; }
+public class Vala.Genie.Scanner {
+       public SourceFile source_file { get; private set; }
 
-       public int indent_spaces { get;set;}
+       public int indent_spaces { get; set;}
 
        char* begin;
        char* current;
@@ -48,13 +48,9 @@ public class Vala.Genie.Scanner : Object {
 
        string _comment;
        
-       
-
        public Scanner (SourceFile source_file) {
                this.source_file = source_file;
-       }
 
-       construct {
                begin = source_file.get_mapped_contents ();
                end = begin + source_file.get_mapped_length ();
 
index b4f4b93..ed11c0c 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.IfStatement : CodeNode, Statement {
                get {
                        return _condition;
                }
-               set construct {
+               set {
                        _condition = value;
                        _condition.parent_node = this;
                }
@@ -42,12 +42,12 @@ public class Vala.IfStatement : CodeNode, Statement {
        /**
         * The statement to be evaluated if the condition holds.
         */
-       public Block true_statement { get; set construct; }
+       public Block true_statement { get; set; }
        
        /**
         * The optional statement to be evaluated if the condition doesn't hold.
         */
-       public Block? false_statement { get; set construct; }
+       public Block? false_statement { get; set; }
 
        private Expression _condition;
 
index 1dfa07b..7ca7ca9 100644 (file)
@@ -29,12 +29,12 @@ public class Vala.InstanceCast : CCodeFunctionCall {
        /**
         * The target type.
         */
-       public weak TypeSymbol type_reference { get; set construct; }
+       public weak TypeSymbol type_reference { get; set; }
        
        /**
         * The expression to be cast.
         */
-       public CCodeExpression inner { get; set construct; }
+       public CCodeExpression inner { get; set; }
        
        /**
         * Creates a new instance cast expression.
@@ -46,9 +46,7 @@ public class Vala.InstanceCast : CCodeFunctionCall {
        public InstanceCast (CCodeExpression expr, TypeSymbol type) {
                inner = expr;
                type_reference = type;
-       }
-       
-       construct {
+
                call = new CCodeIdentifier (type_reference.get_upper_case_cname (null));
                add_argument ((CCodeExpression) inner);
        }
index b69b28c..954903f 100644 (file)
@@ -61,6 +61,7 @@ public class Vala.Interface : ObjectTypeSymbol {
         * @return       newly created interface
         */
        public Interface (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
        }
index 0da84d4..b4ee7d0 100644 (file)
@@ -32,7 +32,7 @@ public class Vala.InvocationExpression : Expression {
         */
        public Expression call {
                get { return _call; }
-               set construct {
+               set {
                        _call = value;
                        _call.parent_node = this;
                }
index da6d396..e9a2009 100644 (file)
@@ -66,6 +66,7 @@ public class Vala.LocalVariable : Symbol {
         * @return       newly created variable declarator
         */
        public LocalVariable (DataType? variable_type, string name, Expression? initializer = null, SourceReference? source_reference = null) {
+               base.init ();
                this.variable_type = variable_type;
                this.name = name;
                this.initializer = initializer;
index f398dc5..8d73812 100644 (file)
@@ -26,7 +26,7 @@ using GLib;
 /**
  * Represents a lockable object.
  */
-public interface Vala.Lockable : Object {
+public interface Vala.Lockable {
        /**
         * Indicates a specific lockable object beeing actually locked somewhere.
         */
index 9ab2cfc..c207631 100644 (file)
@@ -29,12 +29,12 @@ public class Vala.LockStatement : CodeNode, Statement {
        /**
         * Expression representing the resource to be locked.
         */
-       public Expression resource { get; set construct; }
+       public Expression resource { get; set; }
        
        /**
         * The statement during its execution the resource is locked.
         */
-       public Block body { get; set construct; }
+       public Block body { get; set; }
        
        public LockStatement (Expression resource, Block body, SourceReference? source_reference = null) {
                this.body = body;
index 5e5234b..954bcf5 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a general class member.
  */
-public class Vala.Member : Symbol {
+public abstract class Vala.Member : Symbol {
        private Gee.List<string> cheader_filenames = new ArrayList<string> ();
        
        public override void accept (CodeVisitor visitor) {
index b24a746..c8bae83 100644 (file)
@@ -217,12 +217,11 @@ public class Vala.Method : Member {
         * @return            newly created method
         */
        public Method (string name, DataType return_type, SourceReference? source_reference = null) {
+               base.init ();
                this.return_type = return_type;
                this.source_reference = source_reference;
                this.name = name;
-       }
 
-       construct {
                carray_length_parameter_position = -3;
                cdelegate_target_parameter_position = -3;
        }
index 36181a4..3c26899 100644 (file)
@@ -30,12 +30,12 @@ public class Vala.NamedArgument : CodeNode {
        /**
         * The name of a property.
         */
-       public string name { get; set construct; }
+       public string name { get; set; }
        
        /**
         * The expression the property should assign.
         */
-       public Expression argument { get; set construct; }
+       public Expression argument { get; set; }
        
        /**
         * Creates a new named argument.
index 55bae58..9980d15 100644 (file)
@@ -52,6 +52,7 @@ public class Vala.Namespace : Symbol {
         * @return                 newly created namespace
         */
        public Namespace (string? name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
                access = SymbolAccessibility.PUBLIC;
index f7ace4f..2c2db7a 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.ParenthesizedExpression : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
index 0bdff49..bde3884 100644 (file)
@@ -59,7 +59,7 @@ public class Vala.Parser : CodeVisitor {
                VIRTUAL = 1 << 6
        }
 
-       construct {
+       public Parser () {
                tokens = new TokenInfo[BUFFER_SIZE];
        }
 
index c9baa98..5606a3c 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.PointerIndirection : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
index 6f04a2d..9c5f13c 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.PostfixExpression : Expression {
        /**
         * The operand, must be a variable or a property.
         */
-       public Expression inner { get; set construct; }
+       public Expression inner { get; set; }
        
        /**
         * Specifies whether value should be incremented or decremented.
index 79cd77f..2afe27b 100644 (file)
@@ -176,6 +176,7 @@ public class Vala.Property : Member, Lockable {
         * @return             newly created property
         */
        public Property (string name, DataType property_type, PropertyAccessor? get_accessor, PropertyAccessor? set_accessor, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.property_type = property_type;
                this.get_accessor = get_accessor;
index 9668016..2c6b4e2 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.ReferenceTransferExpression : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
index e7e1c2c..8fa7622 100644 (file)
@@ -26,8 +26,8 @@ using Gee;
 /**
  * Lexical scanner for Vala source files.
  */
-public class Vala.Scanner : Object {
-       public SourceFile source_file { get; construct; }
+public class Vala.Scanner {
+       public SourceFile source_file { get; private set; }
 
        char* current;
        char* end;
@@ -39,9 +39,7 @@ public class Vala.Scanner : Object {
 
        public Scanner (SourceFile source_file) {
                this.source_file = source_file;
-       }
-       
-       construct {
+
                char* begin = source_file.get_mapped_contents ();
                end = begin + source_file.get_mapped_length ();
 
index 73c085d..d151113 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a part of the symbol tree.
  */
-public class Vala.Scope : Object {
+public class Vala.Scope {
        /**
         * The symbol that owns this scope.
         */
index 27a3731..b7a2ce0 100644 (file)
@@ -66,6 +66,7 @@ public class Vala.Signal : Member, Lockable {
         * @return            newly created signal
         */
        public Signal (string name, DataType return_type, SourceReference? source_reference = null) {
+               base.init ();
                this.name = name;
                this.return_type = return_type;
                this.source_reference = source_reference;
index 28928aa..3d75105 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a Vala source or VAPI package file.
  */
-public class Vala.SourceFile : Object {
+public class Vala.SourceFile {
        /**
         * The name of this source file.
         */
index 9b1885c..b3fd4ad 100644 (file)
@@ -1,6 +1,6 @@
 /* valasourcefilecycle.vala
  *
- * Copyright (C) 2006-2007  Jürg Billeter
+ * Copyright (C) 2006-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
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a dependency cycle of source files.
  */
-public class Vala.SourceFileCycle : Object {
+public class Vala.SourceFileCycle {
        /**
         * The members of this source file cycle.
         */
index c4879e4..fd3a080 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a reference to a location in a source file.
  */
-public class Vala.SourceReference : Object {
+public class Vala.SourceReference {
        /**
         * The source file to be referenced.
         */
index 631e057..6e49ee5 100644 (file)
@@ -64,6 +64,7 @@ public class Vala.Struct : TypeSymbol {
         * @return                 newly created struct
         */
        public Struct (string name, SourceReference? source_reference = null) {
+               base.init ();
                this.source_reference = source_reference;
                this.name = name;
        }
index ee5dd2c..958ecff 100644 (file)
@@ -36,6 +36,7 @@ public class Vala.SwitchSection : Block {
         * @return                 newly created switch section
         */
        public SwitchSection (SourceReference source_reference) {
+               base.init ();
                this.source_reference = source_reference;
        }
        
index 83cec83..e8da2bf 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
                get {
                        return _expression;
                }
-               set construct {
+               set {
                        _expression = value;
                        _expression.parent_node = this;
                }
index c4971c7..e3e95cf 100644 (file)
@@ -66,7 +66,7 @@ public abstract class Vala.Symbol : CodeNode {
         * of the block to determine which variables need to be freed before
         * jump statements.
         */
-       public bool active { get; set; }
+       public bool active { get; set; default = true; }
 
        /**
         * Specifies the accessibility of this symbol. Public accessibility
@@ -118,9 +118,8 @@ public abstract class Vala.Symbol : CodeNode {
        private weak Scope _owner;
        private Scope _scope;
 
-       construct {
+       public void init () {
                _scope = new Scope (this);
-               active = true;
        }
        
        /**
index b266619..b408d1e 100644 (file)
@@ -29,7 +29,7 @@ public class Vala.TypeCheck : Expression {
        /**
         * The expression to be checked.
         */
-       public Expression expression { get; set construct; }
+       public Expression expression { get; set; }
        
        /**
         * The type to be matched against.
index 7421d3f..d87e1c1 100644 (file)
@@ -43,6 +43,7 @@ public class Vala.TypeParameter : Symbol {
         * @return       newly created generic type parameter
         */     
        public TypeParameter (string _name, SourceReference source) {
+               base.init ();
                name = _name;
                source_reference = source;
        }
index b079d6a..820804b 100644 (file)
@@ -40,7 +40,7 @@ public class Vala.UnaryExpression : Expression {
                get {
                        return _inner;
                }
-               set construct {
+               set {
                        _inner = value;
                        _inner.parent_node = this;
                }
index e496ba0..947a708 100644 (file)
@@ -33,7 +33,7 @@ public class Vala.WhileStatement : CodeNode, Statement {
                get {
                        return _condition;
                }
-               set construct {
+               set {
                        _condition = value;
                        _condition.parent_node = this;
                }