]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Remove --disable-non-null option after transition period of 9 months
authorJürg Billeter <j@bitron.ch>
Sat, 10 Jan 2009 12:37:46 +0000 (12:37 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 10 Jan 2009 12:37:46 +0000 (12:37 +0000)
2009-01-10  Jürg Billeter  <j@bitron.ch>

* vala/valacodecontext.vala:
* vala/valaformalparameter.vala:
* vala/valareturnstatement.vala:
* vala/valasemanticanalyzer.vala:
* gobject/valaccodemethodmodule.vala:
* compiler/valacompiler.vala:

Remove --disable-non-null option after transition period
of 9 months

svn path=/trunk/; revision=2320

ChangeLog
compiler/valacompiler.vala
gobject/valaccodemethodmodule.vala
vala/valacodecontext.vala
vala/valaformalparameter.vala
vala/valareturnstatement.vala
vala/valasemanticanalyzer.vala

index 534eb1c8a84e8b1853a0b88a94d3c61ff78bc725..d0424d8260ae04294fa4eab4be1801de952788e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-01-10  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valacodecontext.vala:
+       * vala/valaformalparameter.vala:
+       * vala/valareturnstatement.vala:
+       * vala/valasemanticanalyzer.vala:
+       * gobject/valaccodemethodmodule.vala:
+       * compiler/valacompiler.vala:
+
+       Remove --disable-non-null option after transition period
+       of 9 months
+
 2009-01-10  Jürg Billeter  <j@bitron.ch>
 
        * vala/valaclass.vala:
index f8ee7e1934bb64bd1c9c11d0b5208cf34e7d2e86..74b37c8dac679ad87fe4986a76c2094a7505b968 100644 (file)
@@ -46,7 +46,6 @@ class Vala.Compiler {
        static bool thread;
        static bool disable_assert;
        static bool enable_checking;
-       static bool disable_non_null;
        static bool non_null_experimental;
        static bool disable_dbus_transformation;
        static string cc_command;
@@ -73,7 +72,6 @@ class Vala.Compiler {
                { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support", null },
                { "disable-assert", 0, 0, OptionArg.NONE, ref disable_assert, "Disable assertions", null },
                { "enable-checking", 0, 0, OptionArg.NONE, ref enable_checking, "Enable additional run-time checks", null },
-               { "disable-non-null", 0, 0, OptionArg.NONE, ref disable_non_null, "Disable non-null types", null },
                { "enable-non-null-experimental", 0, 0, OptionArg.NONE, ref non_null_experimental, "Enable experimental enhancements for non-null types", null },
                { "disable-dbus-transformation", 0, 0, OptionArg.NONE, ref disable_dbus_transformation, "Disable transformation of D-Bus member names", null },
                { "cc", 0, 0, OptionArg.STRING, ref cc_command, "Use COMMAND as C compiler command", "COMMAND" },
@@ -156,7 +154,6 @@ class Vala.Compiler {
                context.library = library;
                context.assert = !disable_assert;
                context.checking = enable_checking;
-               context.non_null = !disable_non_null || non_null_experimental;
                context.non_null_experimental = non_null_experimental;
                context.dbus_transformation = !disable_dbus_transformation;
                Report.set_verbose_errors (!quiet_mode);
index 822b976d981b0c8cae5afc7e020b69e63c72c6fc..de786de27880f525b11614e995193d0b9c9bc0de 100644 (file)
@@ -288,7 +288,7 @@ public class Vala.CCodeMethodModule : CCodeStructModule {
                                        var t = param.parameter_type.data_type;
                                        if (t != null && t.is_reference_type ()) {
                                                if (param.direction != ParameterDirection.OUT) {
-                                                       var type_check = create_method_type_check_statement (m, creturn_type, t, (context.non_null && !param.parameter_type.nullable), param.name);
+                                                       var type_check = create_method_type_check_statement (m, creturn_type, t, !param.parameter_type.nullable, param.name);
                                                        if (type_check != null) {
                                                                type_check.line = function.line;
                                                                cinit.append (type_check);
index a30443268f45fcd297bf18e1df020bf77403eca4..af76c267d6b83d999ae00e0729ba237cdd373f18 100644 (file)
@@ -50,11 +50,6 @@ public class Vala.CodeContext {
         */
        public bool checking { get; set; }
 
-       /**
-        * Enable non-null types.
-        */
-       public bool non_null { get; set; }
-
        /**
         * Enable experimental enhancements for non-null types.
         */
index b22e5d21942fa555136d6495b143d4cef7780470..d848d17251b3e5ceba3deca0d0a8099d49b9c61a 100644 (file)
@@ -215,7 +215,7 @@ public class Vala.FormalParameter : Symbol {
                        }
                }
 
-               if (analyzer.context.non_null && default_expression != null) {
+               if (default_expression != null) {
                        if (default_expression is NullLiteral
                            && !parameter_type.nullable
                            && direction != ParameterDirection.OUT) {
index c9c99ea8a963c9942727c6b3136f8afa14036582..2f6a2bd882165fb9ccf7654c975fa20bc5be5d12 100644 (file)
@@ -1,6 +1,6 @@
 /* valareturnstatement.vala
  *
- * Copyright (C) 2006-2008  Jürg Billeter
+ * Copyright (C) 2006-2009  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
@@ -132,7 +132,7 @@ public class Vala.ReturnStatement : CodeNode, Statement {
                        Report.warning (source_reference, "Local variable with strong reference used as return value and method return type hasn't been declared to transfer ownership");
                }
 
-               if (analyzer.context.non_null && return_expression is NullLiteral
+               if (return_expression is NullLiteral
                    && !analyzer.current_return_type.nullable) {
                        Report.warning (source_reference, "`null' incompatible with return type `%s`".printf (analyzer.current_return_type.to_string ()));
                }
index bd1d25a0f9b8126d19a5dbf39d4a0566e21b9b90..329275b3adfc7b0ef2181556fe3ca9fd7a50d139 100644 (file)
@@ -415,7 +415,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                                if (direction == ParameterDirection.REF) {
                                        Report.error (arg.source_reference, "Argument %d: Cannot pass null to reference parameter".printf (i + 1));
                                        return false;
-                               } else if (context.non_null && direction != ParameterDirection.OUT && !arg.target_type.nullable) {
+                               } else if (direction != ParameterDirection.OUT && !arg.target_type.nullable) {
                                        Report.warning (arg.source_reference, "Argument %d: Cannot pass null to non-null parameter type".printf (i + 1));
                                }
                        } else if (arg_type == 1) {