[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Progress dashboard at http://jenkins.zorba.io:8180/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba. Commit message: Removed boost dependency Fixed typedef Requested reviews: Matthias Brantner (matthias-brantner) Federico Cavalieri (fcavalieri) Paul J. Lucas (paul-lucas) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Removed boost dependency Fixed typedef -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/functions/cacheable_function.cpp' --- src/functions/cacheable_function.cpp 2014-04-16 18:23:55 + +++ src/functions/cacheable_function.cpp 2014-05-01 19:54:22 + @@ -41,8 +41,8 @@ / FunctionCache::FunctionCache( static_context* aSctx, -boost::dynamic_bitset<>& aExcludeFromCacheKey, -boost::dynamic_bitset<>& aCompareWithDeepEqual, +std::vector& aExcludeFromCacheKey, +std::vector& aCompareWithDeepEqual, bool aAcrossSnapshots): FunctionCacheBaseMap(aSctx, aExcludeFromCacheKey, aCompareWithDeepEqual), theAcrossSnapshots(aAcrossSnapshots), @@ -173,9 +173,6 @@ if (theAreCacheSettingsComputed) return; - theExcludeFromCacheKey = boost::dynamic_bitset<>(theSignature.paramCount()); - theCompareWithDeepEqual = boost::dynamic_bitset<>(theSignature.paramCount()); - if (!theTypeManager) theTypeManager = getTypeManager(); @@ -368,13 +365,14 @@ /*** / void cacheable_function::parseCachingAnnotation(AnnotationInternal* aAnnotation, -boost::dynamic_bitset<>& aBitset, +std::vector& aFlags, XQueryDiagnostics* aDiag) { if (!aAnnotation) return; - aBitset = boost::dynamic_bitset<>(theSignature.paramCount()); + aFlags.resize(theSignature.paramCount(), false); + csize lNum = aAnnotation->getNumLiterals(); if (lNum) { @@ -418,7 +416,7 @@ } else { - aBitset[lIndex-1] = 1; + aFlags[lIndex-1] = true; } } } @@ -432,30 +430,30 @@ /*** / -void cacheable_function::saveDynamicBitset(const boost::dynamic_bitset<>& aBitset, ::zorba::serialization::Archiver& ar) +void cacheable_function::saveFlags(const std::vector& aFlags, ::zorba::serialization::Archiver& ar) { - size_t lSize = aBitset.size(); + std::vector::size_type lSize = aFlags.size(); ar & lSize; bool lValue; - for (boost::dynamic_bitset<>::size_type i = 0; i::size_type i = 0; i& aBitset, ::zorba::serialization::Archiver& ar) +void cacheable_function::loadFlags(std::vector& aFlags, ::zorba::serialization::Archiver& ar) { - size_t lSize = 0; + std::vector::size_type lSize = 0; ar & lSize; - aBitset.resize(lSize); + aFlags.resize(lSize, false); bool lValue; - for (boost::dynamic_bitset<>::size_type i = 0; i::size_type i = 0; i +#include namespace zorba { class expr; -typedef typename zorba::ItemHandleCacheHashMap< std::vector > FunctionCacheBaseMap; +typedef zorba::ItemHandleCacheHashMap< std::vector > FunctionCacheBaseMap; class FunctionCache : public FunctionCacheBaseMap { public: - typedef typename FunctionCacheBaseMap::iterator iterator; + typedef FunctionCacheBaseMap::iterator iterator; FunctionCache(static_context* aSctx, - boost::dynamic_bitset<>& aExcludeFromCacheKey, - boost::dynamic_bitset<>& aCompareWithDeepEqual, + std::vector& aExcludeFromCacheKey, + std::vector& aCompareWithDeepEqual, bool aAcrossSnapshots); FunctionCache::iterator find(const store::Item_t& aKey, PlanState& aPlanState); @@ -87,8 +87,8 @@ bool theCacheAcrossSnapshots; bool theIsCacheAutomatic; bool theAreCacheSettingsComputed; - boost::dynamic_bitset<> theExcludeFromCacheKey; - boost::dynamic_bitset<> theCompareWithDeepEqual; + std::vector theExcludeFromCacheKey; + std::vector theCompareWithDeepEqual; public: SERIALIZABLE_CLASS(cacheable_function) @@ -114,8 +114,8 @@ virtual void useDefaultCachingSettings(); virtual void useLegacyCache(XQueryDiagnostics* aDiag); virtual void useStrictlyDeterministicCache(XQueryDiagnostics* aDiag); - void saveDynamicBitset(const boost::dynamic_bitset<>& aBitset, ::zorba::serialization::Archiver& ar); - void loadDynamicBitset(boost::dynamic_bitset<>& aBitset, ::zorba::serialization::Archiver& ar); + void saveFlags(const std::vector& aFlags, ::zorba::serialization::Archiver& ar); + void loadFlags(std::vector& aFlags, ::zorba::serialization::Archiver& ar); private: virtual bool haveAtomicArgumentsAndReturnType() const; @@ -123,7 +123,7 @
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
The choice of the data structure to hold the flags is open to discussion. I considered: - std::bitset - uint64 - vector (storage optimized specialization is mandated by the standard) The size of std::bitset is determined at compile time, boost:dynamic_bitset brings the boost dependency, so I went with vector because the structure will be non empty in exceptional cases. I preferred to not put a limit on function arity or deal with potential multiple bitfields. No strong opinion though, comments are welcome. -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp