~zorba-coders/zorba/trunk

« back to all changes in this revision

Viewing changes to src/runtime/booleans/BooleanImpl.h

  • Committer: Zorba Jenkins
  • Author(s): Federico Cavalieri
  • Date: 2014-04-29 20:37:35 UTC
  • mfrom: (11714.2.7 feature-caching-annotations)
  • Revision ID: jenkins@lambda.nu-20140429203735-mgu2acarnn71p66l
Greatly improved function caching.

* Changed function annotations:
  - %an:deterministic: disables caching (previously %an:no-cache)
  - %an:strictlydeterministic: enables caching for deterministic and non-deterministic functions. Cache is only within the same snapshot.
  - %an:cache enables caching  for deterministic, non-deterministic and sequential functions. Caches is across snapshots. (unchanged)
  - %an:exclude-from-cache-key(n) specifies that a function argument has to be ignored when computing the cache key
  - %an:compare-with-deep-equal(n) specifies that a function argument has to be compared with deep-equal semantics
  
* Changed criteria for default annotations of internal and external functions:
  - Functions which have no %an:deterministic, %an:nondeterministic or %an:strictlydeterministic annotations and all their parameter and the return types are atomics are now automatically annotated %an:strictlydeterministic
  - All the other functions are annotated %an:deterministic
* Added snapshot id in global dynamic context
* Added dynamic context xquery module
* Added strict equality hashmap
* Reimplemented %an:cache
* Enabled caching for function that have non atomic arguments
* Whenever the eager evaluation of a function arguments raises an error, the evaluation is retried without cache. The function cache is then disabled if it was automatically detected.
Approved: Matthias Brantner, Federico Cavalieri

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
      store::Item_t& aItem1,
189
189
      const TypeManager* typemgr,
190
190
      long timezone,
191
 
      XQPCollator* aCollation);
 
191
      XQPCollator* aCollation,
 
192
      bool raiseError);
192
193
 
193
194
  static long valueCompare(
194
195
      const QueryLoc& loc,
229
230
      const store::Item_t& aItem1,
230
231
      const TypeManager* typemgr,
231
232
      long timezone,
232
 
      XQPCollator* aCollation);
 
233
      XQPCollator* aCollation,
 
234
      bool raiseError);
233
235
 
234
236
  static long compare(
235
237
      const QueryLoc& loc,
240
242
      XQPCollator* aCollation);
241
243
 
242
244
private:
243
 
  static void valueCasting(
 
245
  static bool valueCasting(
244
246
      const QueryLoc& loc,
245
247
      const TypeManager* typemgr,
246
248
      store::Item_t& aItem0,
247
249
      store::Item_t& aItem1,
248
250
      store::Item_t& castItem0,
249
 
      store::Item_t& castItem1);
 
251
      store::Item_t& castItem1,
 
252
      bool raiseError);
250
253
 
251
254
  static void generalCasting(
252
255
      const QueryLoc& loc,