vala r1936 - in trunk: . compiler gobject vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1936 - in trunk: . compiler gobject vala
- Date: Mon, 27 Oct 2008 09:23:18 +0000 (UTC)
Author: juergbi
Date: Mon Oct 27 09:23:17 2008
New Revision: 1936
URL: http://svn.gnome.org/viewvc/vala?rev=1936&view=rev
Log:
2008-10-27 JÃrg Billeter <j bitron ch>
* vala/valacodecontext.vala:
* gobject/valaccodegenerator.vala:
* compiler/valacompiler.vala:
Disable additional run-time checks by default to improve
performance
Modified:
trunk/ChangeLog
trunk/compiler/valacompiler.vala
trunk/gobject/valaccodegenerator.vala
trunk/vala/valacodecontext.vala
Modified: trunk/compiler/valacompiler.vala
==============================================================================
--- trunk/compiler/valacompiler.vala (original)
+++ trunk/compiler/valacompiler.vala Mon Oct 27 09:23:17 2008
@@ -42,7 +42,7 @@
static bool debug;
static bool thread;
static bool disable_assert;
- static bool disable_checking;
+ static bool enable_checking;
static bool disable_non_null;
static bool non_null_experimental;
static string cc_command;
@@ -66,7 +66,7 @@
{ "debug", 'g', 0, OptionArg.NONE, ref debug, "Produce debug information", null },
{ "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support", null },
{ "disable-assert", 0, 0, OptionArg.NONE, ref disable_assert, "Disable assertions", null },
- { "disable-checking", 0, 0, OptionArg.NONE, ref disable_checking, "Disable run-time checks", 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 },
{ "cc", 0, 0, OptionArg.STRING, ref cc_command, "Use COMMAND as C compiler command", "COMMAND" },
@@ -147,7 +147,7 @@
context.library = library;
context.assert = !disable_assert;
- context.checking = !disable_checking;
+ context.checking = enable_checking;
context.non_null = !disable_non_null || non_null_experimental;
context.non_null_experimental = non_null_experimental;
Report.set_verbose_errors (!quiet_mode);
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Mon Oct 27 09:23:17 2008
@@ -4188,7 +4188,7 @@
public CCodeStatement? create_type_check_statement (CodeNode method_node, DataType ret_type, TypeSymbol t, bool non_null, string var_name) {
var ccheck = new CCodeFunctionCall ();
- if ((t is Class && !((Class) t).is_compact) || t is Interface) {
+ if (context.checking && ((t is Class && !((Class) t).is_compact) || t is Interface)) {
var ctype_check = new CCodeFunctionCall (new CCodeIdentifier (get_type_check_function (t)));
ctype_check.add_argument (new CCodeIdentifier (var_name));
Modified: trunk/vala/valacodecontext.vala
==============================================================================
--- trunk/vala/valacodecontext.vala (original)
+++ trunk/vala/valacodecontext.vala Mon Oct 27 09:23:17 2008
@@ -46,7 +46,7 @@
public bool assert { get; set; }
/**
- * Enable additional run-time checks.
+ * Enable additional run-time checks such as type checks.
*/
public bool checking { get; set; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]