Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66251 - in sandbox/function/boost/function: . detail
From: dsaritz_at_[hidden]
Date: 2010-10-29 11:43:38


Author: psiha
Date: 2010-10-29 11:43:25 EDT (Fri, 29 Oct 2010)
New Revision: 66251
URL: http://svn.boost.org/trac/boost/changeset/66251

Log:
Fixed explicit compiler-specific inline handling.
Text files modified:
   sandbox/function/boost/function/detail/platform_specifics.hpp | 4 ++--
   sandbox/function/boost/function/function_base.hpp | 14 ++++----------
   sandbox/function/boost/function/function_template.hpp | 4 ----
   3 files changed, 6 insertions(+), 16 deletions(-)

Modified: sandbox/function/boost/function/detail/platform_specifics.hpp
==============================================================================
--- sandbox/function/boost/function/detail/platform_specifics.hpp (original)
+++ sandbox/function/boost/function/detail/platform_specifics.hpp 2010-10-29 11:43:25 EDT (Fri, 29 Oct 2010)
@@ -79,9 +79,9 @@
     #define BF_RESTRICT
 
     #ifdef _DEBUG
- #define BF_FORCEINLINE
+ #define BF_FORCEINLINE inline
     #else
- #define BF_FORCEINLINE __attribute__(( always_inline ))
+ #define BF_FORCEINLINE inline __attribute__(( always_inline ))
     #endif
     #define BF_NOINLINE __attribute__(( noinline ))
     #define BF_NORETURN __attribute__(( noreturn ))

Modified: sandbox/function/boost/function/function_base.hpp
==============================================================================
--- sandbox/function/boost/function/function_base.hpp (original)
+++ sandbox/function/boost/function/function_base.hpp 2010-10-29 11:43:25 EDT (Fri, 29 Oct 2010)
@@ -1189,10 +1189,6 @@
 #endif // BOOST_FUNCTION_NO_RTTI
 
 protected:
- // Implementation note:
- // GCC 4.5.1 makes an IMO poor judgment of not inlining this with -Os.
- // (28.10.2010.) (Domagoj Saric)
- BF_FORCEINLINE
   detail::function::vtable const & get_vtable() const
   {
       BF_ASSUME( p_vtable_ );
@@ -1218,7 +1214,6 @@
   }
 
 private: // Assignment from another boost function helpers.
- BF_NOINLINE
   void assign_boost_function_direct( function_base const & source )
   {
       source.p_vtable_->clone( source.functor_, this->functor_ );
@@ -1226,7 +1221,6 @@
   }
 
   template <class EmptyHandler>
- BF_NOINLINE
   void assign_boost_function_guarded( function_base const & source, detail::function::vtable const & empty_handler_vtable )
   {
       this->destroy();
@@ -1590,7 +1584,7 @@
   namespace function {
 
     BOOST_FUNCTION_ENABLE_IF_FUNCTION
- inline has_empty_target( Function const * const f )
+ BF_FORCEINLINE has_empty_target( Function const * const f )
     {
         return f->empty();
     }
@@ -1603,7 +1597,7 @@
                 is_member_function_pointer<FunctionPtr>::value,
                 bool
>::type
- inline has_empty_target( FunctionPtr const * const funcPtr )
+ BF_FORCEINLINE has_empty_target( FunctionPtr const * const funcPtr )
     {
         return funcPtr == 0;
     }
@@ -1613,7 +1607,7 @@
     // (e.g.MSVC 9.0 SP1 and GCC 4.6).
     // (28.10.2010.) (Domagoj Saric)
     //inline bool has_empty_target(...)
- inline bool has_empty_target( void const * )
+ BF_FORCEINLINE bool has_empty_target( void const * )
     {
         return false;
     }
@@ -1623,7 +1617,7 @@
     // compilers (e.g. GCC 4.2.1).
     // (28.10.2010.) (Domagoj Saric)
     template <class FunctionObj>
- inline bool has_empty_target( reference_wrapper<FunctionObj> const * const f )
+ BF_FORCEINLINE bool has_empty_target( reference_wrapper<FunctionObj> const * const f )
     {
         // Implementation note:
         // We save/assign a reference to a boost::function even if it is empty

Modified: sandbox/function/boost/function/function_template.hpp
==============================================================================
--- sandbox/function/boost/function/function_template.hpp (original)
+++ sandbox/function/boost/function/function_template.hpp 2010-10-29 11:43:25 EDT (Fri, 29 Oct 2010)
@@ -369,10 +369,6 @@
 */
     }
 
- // Implementation note:
- // GCC 4.5.1 makes an IMO poor judgment of not inlining this with -Os.
- // (28.10.2010.) (Domagoj Saric)
- BF_FORCEINLINE
     result_type operator()(BOOST_FUNCTION_PARMS) const
     {
         return invoke( BOOST_FUNCTION_ARGS BOOST_FUNCTION_COMMA nothrow_policy() );


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk