Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83823 - trunk/tools/build/v2/build
From: steven_at_[hidden]
Date: 2013-04-09 16:09:47


Author: steven_watanabe
Date: 2013-04-09 16:09:46 EDT (Tue, 09 Apr 2013)
New Revision: 83823
URL: http://svn.boost.org/trac/boost/changeset/83823

Log:
Avoid recomputing string manipulation.
Text files modified:
   trunk/tools/build/v2/build/toolset.jam | 13 +++++++------
   1 files changed, 7 insertions(+), 6 deletions(-)

Modified: trunk/tools/build/v2/build/toolset.jam
==============================================================================
--- trunk/tools/build/v2/build/toolset.jam (original)
+++ trunk/tools/build/v2/build/toolset.jam 2013-04-09 16:09:46 EDT (Tue, 09 Apr 2013)
@@ -380,7 +380,8 @@
 
 rule filter-property-set ( rule-or-module : property-set )
 {
- if ! $(.filtered.property-set.$(rule-or-module).$(property-set))
+ local key = .filtered.property-set.$(rule-or-module).$(property-set) ;
+ if ! $($(key))
     {
         local relevant = [ relevant-features $(rule-or-module) ] ;
         local result ;
@@ -391,16 +392,16 @@
                 result += $(p) ;
             }
         }
- .filtered.property-set.$(rule-or-module).$(property-set) = [ property-set.create $(result) ] ;
+ $(key) = [ property-set.create $(result) ] ;
     }
- return $(.filtered.property-set.$(rule-or-module).$(property-set)) ;
+ return $($(key)) ;
 }
 
 rule set-target-variables ( rule-or-module targets + : property-set )
 {
     property-set = [ filter-property-set $(rule-or-module) : $(property-set) ] ;
- local key = $(rule-or-module).$(property-set) ;
- local settings = $(.stv.$(key)) ;
+ local key = .stv.$(rule-or-module).$(property-set) ;
+ local settings = $($(key)) ;
     if ! $(settings)
     {
         settings = [ set-target-variables-aux $(rule-or-module) :
@@ -410,7 +411,7 @@
         {
             settings = none ;
         }
- .stv.$(key) = $(settings) ;
+ $(key) = $(settings) ;
     }
 
     if $(settings) != none


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