|
From: <br...@us...> - 2009-04-17 02:31:30
|
Revision: 3887
http://openvrml.svn.sourceforge.net/openvrml/?rev=3887&view=rev
Author: braden
Date: 2009-04-17 02:31:16 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
Allow OpenVRML to be configured to use only nonthrowing exception specifications.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
trunk/configure-gcc-opt
trunk/configure.ac
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h
trunk/src/libopenvrml/openvrml-common.h
trunk/src/libopenvrml/openvrml-config.h.in
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/ChangeLog 2009-04-17 02:31:16 UTC (rev 3887)
@@ -1,3 +1,25 @@
+2009-04-16 Braden McDaniel <br...@en...>
+
+ Allow OpenVRML to be configured to use only nonthrowing exception
+ specifications.
+
+ * README: Added documentation for
+ "--enable-exception-specs=nothrow".
+ * configure.ac: Added "nothrow" argument to the
+ --enable-exception-specs option.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h:
+ Define OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS and
+ OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS to 0; the Microsoft
+ compiler ignores exception specifications, so there's nothing to
+ do here.
+ * src/libopenvrml/openvrml-common.h: Distinguish between throwing
+ and "nothrow" exception specifications with the preprocessor
+ symbols OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS and
+ OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS.
+ * src/libopenvrml/openvrml-config.h.in: Define
+ OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS and
+ OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS.
+
2009-04-06 Braden McDaniel <br...@en...>
* src/libopenvrml/openvrml/exposedfield.h
Modified: trunk/README
===================================================================
--- trunk/README 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/README 2009-04-17 02:31:16 UTC (rev 3887)
@@ -147,9 +147,19 @@
that modify what features are built and/or what packages OpenVRML
depends on.
- --disable-exception-specs
- Disable use of C++ exception specifications. This is likely to
- improve performance. Note that this changes the library ABI.
+ --enable-exception-specs[=yes,no,nothrow]
+ Modulate use of C++ exception specifications. By default,
+ OpenVRML uses exception specifications wherever the set of
+ exceptions thrown from a function can be constrained. This can
+ aid in debugging; but in general it is likely to degrade
+ performance. Exception specifications can be disabled altogether
+ (using an argument of "no" or the option
+ "--disable-exception-specs"); or, only empty (i.e., nonthrowing)
+ exception specifications can be enabled (using an argument of
+ "nothrow"). Some compilers may be able to use the nonthrowing
+ exception specification as an optimization hint. Note that
+ changing what exception specifications are applied changes the
+ library ABI.
--enable-gecko-rpath
Enable use of the Gecko runtime library directory -rpath flag. On
Modified: trunk/configure-gcc-opt
===================================================================
--- trunk/configure-gcc-opt 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/configure-gcc-opt 2009-04-17 02:31:16 UTC (rev 3887)
@@ -1,3 +1,3 @@
#!/bin/bash
-./$(dirname $0)/configure -C --prefix=$HOME --disable-static --disable-exception-specs --enable-gtk-doc CXX='g++ -pipe' CPPFLAGS='-I$HOME/include -DNDEBUG' CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -Wno-unused-variable -fvisibility=hidden -fvisibility-inlines-hidden' LDFLAGS='-L$HOME/lib64 -L$HOME/lib' BOOST_LIB_SUFFIX=-mt JAVA_HOME=/usr/lib/jvm/jre "$*"
+./$(dirname $0)/configure -C --prefix=$HOME --disable-static --enable-exception-specs=nothrow --enable-gtk-doc CXX='g++ -pipe' CPPFLAGS='-I$HOME/include -DNDEBUG' CXXFLAGS='-O3 -Wall -Wextra -Wno-missing-braces -Wno-unused-variable -fvisibility=hidden -fvisibility-inlines-hidden' LDFLAGS='-L$HOME/lib64 -L$HOME/lib' BOOST_LIB_SUFFIX=-mt JAVA_HOME=/usr/lib/jvm/jre "$*"
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/configure.ac 2009-04-17 02:31:16 UTC (rev 3887)
@@ -240,14 +240,17 @@
# Use exception specifications?
#
AC_ARG_ENABLE([exception-specs],
- [AC_HELP_STRING([--disable-exception-specs],
- [disable use of C++ exception specifications])])
-if test X$enable_exceptions_specs = Xno; then
- OPENVRML_ENABLE_EXCEPTION_SPECS=0
-else
- OPENVRML_ENABLE_EXCEPTION_SPECS=1
-fi
-AC_SUBST([OPENVRML_ENABLE_EXCEPTION_SPECS])
+ [AC_HELP_STRING([--enable-exception-specs[[=yes,no,nothrow]]],
+ [modulate use of C++ exception specifications [default=yes]])])
+AS_IF([test X$enable_exception_specs = Xno],
+ [OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS=0
+ OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS=0],
+ [OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS=1
+ AS_IF([test X$enable_exception_specs = Xnothrow],
+ [OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS=0],
+ [OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS=1])])
+AC_SUBST([OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS])
+AC_SUBST([OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS])
#
# Enable use of the Gecko -rpath flag
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h 2009-04-17 02:31:16 UTC (rev 3887)
@@ -2,7 +2,7 @@
//
// OpenVRML
//
-// Copyright 2005 Braden McDaniel
+// Copyright 2005, 2009 Braden McDaniel
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -37,6 +37,7 @@
# define OPENVRML_LOCAL
-# define OPENVRML_ENABLE_EXCEPTION_SPECS 0
+# define OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS 0
+# define OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS 0
# endif // ifndef OPENVRML_CONFIG_H
Modified: trunk/src/libopenvrml/openvrml-common.h
===================================================================
--- trunk/src/libopenvrml/openvrml-common.h 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/src/libopenvrml/openvrml-common.h 2009-04-17 02:31:16 UTC (rev 3887)
@@ -2,7 +2,7 @@
//
// OpenVRML
//
-// Copyright 2005, 2006, 2007, 2008 Braden McDaniel
+// Copyright 2005, 2006, 2007, 2008, 2009 Braden McDaniel
//
// 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
@@ -35,15 +35,19 @@
# define PHOENIX_LIMIT 6
# endif
-# if OPENVRML_ENABLE_EXCEPTION_SPECS
+# if OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS
# define OPENVRML_NOTHROW throw ()
+# else
+# define OPENVRML_NOTHROW
+# endif
+
+# if OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS
# define OPENVRML_THROW1(ex_) throw (ex_)
# define OPENVRML_THROW2(ex1_, ex2_) throw (ex1_, ex2_)
# define OPENVRML_THROW3(ex1_, ex2_, ex3_) throw (ex1_, ex2_, ex3_)
# define OPENVRML_THROW4(ex1_, ex2_, ex3_, ex4_) throw (ex1_, ex2_, ex3_, ex4_)
# define OPENVRML_THROW5(ex1_, ex2_, ex3_, ex4_, ex5_) throw (ex1_, ex2_, ex3_, ex4_, ex5_)
# else
-# define OPENVRML_NOTHROW
# define OPENVRML_THROW1(ex_)
# define OPENVRML_THROW2(ex1_, ex2_)
# define OPENVRML_THROW3(ex1_, ex2_, ex3_)
Modified: trunk/src/libopenvrml/openvrml-config.h.in
===================================================================
--- trunk/src/libopenvrml/openvrml-config.h.in 2009-04-06 07:22:50 UTC (rev 3886)
+++ trunk/src/libopenvrml/openvrml-config.h.in 2009-04-17 02:31:16 UTC (rev 3887)
@@ -2,7 +2,7 @@
//
// OpenVRML
//
-// Copyright 2005, 2006, 2007 Braden McDaniel
+// Copyright 2005, 2006, 2007, 2009 Braden McDaniel
//
// 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
@@ -19,10 +19,11 @@
//
# ifndef OPENVRML_CONFIG_H
-# define OPENVRML_CONFIG_H
+# define OPENVRML_CONFIG_H
-# define OPENVRML_API @OPENVRML_API@
-# define OPENVRML_LOCAL @OPENVRML_LOCAL@
-# define OPENVRML_ENABLE_EXCEPTION_SPECS @OPENVRML_ENABLE_EXCEPTION_SPECS@
+# define OPENVRML_API @OPENVRML_API@
+# define OPENVRML_LOCAL @OPENVRML_LOCAL@
+# define OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS @OPENVRML_ENABLE_THROWING_EXCEPTION_SPECS@
+# define OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS @OPENVRML_ENABLE_NOTHROW_EXCEPTION_SPECS@
# endif // ifndef OPENVRML_CONFIG_H
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|