vala r2320 - in trunk: . compiler gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2320 - in trunk: . compiler gobject vala
- Date: Sat, 10 Jan 2009 12:37:46 +0000 (UTC)
Author: juergbi
Date: Sat Jan 10 12:37:46 2009
New Revision: 2320
URL: http://svn.gnome.org/viewvc/vala?rev=2320&view=rev
Log:
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
Modified:
trunk/ChangeLog
trunk/compiler/valacompiler.vala
trunk/gobject/valaccodemethodmodule.vala
trunk/vala/valacodecontext.vala
trunk/vala/valaformalparameter.vala
trunk/vala/valareturnstatement.vala
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/compiler/valacompiler.vala
==============================================================================
--- trunk/compiler/valacompiler.vala (original)
+++ trunk/compiler/valacompiler.vala Sat Jan 10 12:37:46 2009
@@ -46,7 +46,6 @@
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 @@
{ "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 @@
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);
Modified: trunk/gobject/valaccodemethodmodule.vala
==============================================================================
--- trunk/gobject/valaccodemethodmodule.vala (original)
+++ trunk/gobject/valaccodemethodmodule.vala Sat Jan 10 12:37:46 2009
@@ -288,7 +288,7 @@
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);
Modified: trunk/vala/valacodecontext.vala
==============================================================================
--- trunk/vala/valacodecontext.vala (original)
+++ trunk/vala/valacodecontext.vala Sat Jan 10 12:37:46 2009
@@ -51,11 +51,6 @@
public bool checking { get; set; }
/**
- * Enable non-null types.
- */
- public bool non_null { get; set; }
-
- /**
* Enable experimental enhancements for non-null types.
*/
public bool non_null_experimental { get; set; }
Modified: trunk/vala/valaformalparameter.vala
==============================================================================
--- trunk/vala/valaformalparameter.vala (original)
+++ trunk/vala/valaformalparameter.vala Sat Jan 10 12:37:46 2009
@@ -215,7 +215,7 @@
}
}
- if (analyzer.context.non_null && default_expression != null) {
+ if (default_expression != null) {
if (default_expression is NullLiteral
&& !parameter_type.nullable
&& direction != ParameterDirection.OUT) {
Modified: trunk/vala/valareturnstatement.vala
==============================================================================
--- trunk/vala/valareturnstatement.vala (original)
+++ trunk/vala/valareturnstatement.vala Sat Jan 10 12:37:46 2009
@@ -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 @@
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 ()));
}
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Sat Jan 10 12:37:46 2009
@@ -415,7 +415,7 @@
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]