Merge lp:~zorba-coders/zorba/dataguide into lp:zorba

Proposed by Nicolae Brinza
Status: Rejected
Rejected by: Matthias Brantner
Proposed branch: lp:~zorba-coders/zorba/dataguide
Merge into: lp:zorba
Diff against target: 6599 lines (+2320/-394)
162 files modified
src/annotations/annotations.cpp (+9/-0)
src/annotations/annotations.h (+4/-1)
src/common/shared_types.h (+3/-0)
src/compiler/codegen/plan_visitor.cpp (+16/-1)
src/compiler/expression/CMakeLists.txt (+2/-1)
src/compiler/expression/expr_base.cpp (+109/-0)
src/compiler/expression/expr_base.h (+12/-0)
src/compiler/expression/expr_clone.cpp (+3/-0)
src/compiler/expression/expr_type.cpp (+4/-0)
src/compiler/expression/json_dataguide.cpp (+349/-0)
src/compiler/expression/json_dataguide.h (+153/-0)
src/compiler/expression/var_expr.cpp (+1/-0)
src/compiler/rewriter/framework/default_optimizer.cpp (+10/-1)
src/compiler/rewriter/rules/nodeid_rules.cpp (+289/-0)
src/compiler/rewriter/rules/rule_base.h (+2/-1)
src/compiler/rewriter/rules/ruleset.h (+25/-0)
src/functions/function.cpp (+24/-0)
src/functions/function.h (+4/-2)
src/functions/pregenerated/func_accessors.h (+3/-10)
src/functions/pregenerated/func_any_uri.h (+0/-1)
src/functions/pregenerated/func_base64.h (+0/-2)
src/functions/pregenerated/func_booleans.h (+0/-3)
src/functions/pregenerated/func_collections.h (+12/-34)
src/functions/pregenerated/func_context.h (+0/-8)
src/functions/pregenerated/func_datetime.h (+0/-9)
src/functions/pregenerated/func_documents.h (+0/-5)
src/functions/pregenerated/func_durations_dates_times.h (+0/-21)
src/functions/pregenerated/func_errors_and_diagnostics.h (+0/-2)
src/functions/pregenerated/func_fetch.h (+0/-3)
src/functions/pregenerated/func_fn_hof_functions.h (+7/-7)
src/functions/pregenerated/func_fnput.h (+0/-1)
src/functions/pregenerated/func_ft_module.h (+0/-15)
src/functions/pregenerated/func_ic_ddl.h (+0/-3)
src/functions/pregenerated/func_index_func.h (+0/-1)
src/functions/pregenerated/func_item.h (+0/-1)
src/functions/pregenerated/func_json.h (+0/-2)
src/functions/pregenerated/func_jsoniq_functions.h (+4/-23)
src/functions/pregenerated/func_maps.h (+0/-10)
src/functions/pregenerated/func_maths.h (+0/-26)
src/functions/pregenerated/func_node_position.h (+0/-24)
src/functions/pregenerated/func_nodes.h (+5/-20)
src/functions/pregenerated/func_numerics.h (+3/-8)
src/functions/pregenerated/func_other_diagnostics.h (+0/-2)
src/functions/pregenerated/func_parse_fragment.h (+1/-3)
src/functions/pregenerated/func_parsing_and_serializing.h (+3/-2)
src/functions/pregenerated/func_qnames.h (+0/-8)
src/functions/pregenerated/func_random.h (+0/-3)
src/functions/pregenerated/func_reference.h (+0/-4)
src/functions/pregenerated/func_schema.h (+0/-3)
src/functions/pregenerated/func_sctx.h (+0/-25)
src/functions/pregenerated/func_sequences.h (+5/-32)
src/functions/pregenerated/func_strings.h (+2/-30)
src/functions/pregenerated/func_uris.h (+0/-3)
src/functions/pregenerated/func_xqdoc.h (+0/-2)
src/runtime/collections/collections_impl.cpp (+5/-4)
src/runtime/collections/pregenerated/collections.cpp (+1/-0)
src/runtime/collections/pregenerated/collections.h (+5/-1)
src/runtime/json/json_loader.cpp (+3/-2)
src/runtime/json/json_loader.h (+5/-2)
src/runtime/json/jsoniq_functions_impl.cpp (+1/-1)
src/runtime/json/pregenerated/jsoniq_functions.cpp (+1/-0)
src/runtime/json/pregenerated/jsoniq_functions.h (+5/-1)
src/runtime/spec/codegen-h.xq (+12/-2)
src/runtime/spec/collections/collections.xml (+15/-3)
src/runtime/spec/json/jsoniq_functions.xml (+10/-0)
src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml (+1/-0)
src/store/api/store.h (+3/-1)
src/store/naive/json_items.cpp (+13/-2)
src/store/naive/store.cpp (+2/-1)
src/store/naive/store.h (+1/-1)
src/system/globalenv.cpp (+2/-2)
src/system/zorba_properties.h (+12/-2)
src/system/zorba_properties.txt (+1/-0)
test/driver/specification.h (+15/-2)
test/driver/testdriver.cpp (+23/-4)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-01.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-02.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-03.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-04.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-05.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-06.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-07.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-08.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-09.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-10.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-11.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-13.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-14.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-15.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-17.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-18.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-19.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-20.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-21.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-22.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-23.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-24.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-25.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-26.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-27.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-28.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/dataguide/dataguide-29.xml.res (+2/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-01.jq (+19/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-01.spec (+2/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-02.jq (+29/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-02.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-03.jq (+38/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-03.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-04.jq (+22/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-04.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-05.jq (+25/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-05.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-06.jq (+26/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-06.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-07.jq (+27/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-07.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-08.jq (+27/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-08.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-09.jq (+33/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-09.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-10.jq (+27/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-10.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-11.jq (+25/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-11.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-12.jq (+28/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-12.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-13.jq (+29/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-13.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-14.jq (+29/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-14.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-15.jq (+29/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-15.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-16.jq (+31/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-16.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-17.jq (+31/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-17.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-18.jq (+32/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-18.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-19.jq (+32/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-19.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-20.jq (+38/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-20.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-21.jq (+33/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-21.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-22.jq (+38/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-22.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-23.jq (+39/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-23.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-24.jq (+32/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-24.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-25.jq (+20/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-25.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-26.jq (+20/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-26.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-27.jq (+22/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-27.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-28.jq (+22/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-28.spec (+1/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-29.jq (+228/-0)
test/rbkt/Queries/zorba/jsoniq/dataguide/dataguide-29.spec (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/dataguide
Reviewer Review Type Date Requested Status
Matthias Brantner Needs Fixing
Nicolae Brinza Approve
Markos Zaharioudakis Pending
Review via email: mp+173026@code.launchpad.net

Commit message

Dataguide implementation.

Description of the change

Dataguide implementation.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Stage "TestZorbaUbuntu" failed.
794 tests failed (8369 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/49/testReport/ to view the results.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Stage "TestZorbaUbuntu" failed.
794 tests failed (8369 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/50/testReport/ to view the results.

lp:~zorba-coders/zorba/dataguide updated
11482. By Nicolae Brinza

Dataguide work in progress.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Stage "TestZorbaUbuntu" failed.
794 tests failed (8373 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/51/testReport/ to view the results.

lp:~zorba-coders/zorba/dataguide updated
11483. By Nicolae Brinza

Merged with Zorba trunk

11484. By Nicolae Brinza

Disabled dataguide for testing

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Stage "TestZorbaUbuntu" failed.
26 tests failed (8373 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/52/testReport/ to view the results.

lp:~zorba-coders/zorba/dataguide updated
11485. By Nicolae Brinza

Re-enabled the dataguide

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

lp:~zorba-coders/zorba/dataguide updated
11486. By Nicolae Brinza

Dataguide fixes for the remote queue; cleanup; documentation;

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026 :
Votes: {'Pending': 1}

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/dataguide/+merge/173026

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/9/console to view the results.

lp:~zorba-coders/zorba/dataguide updated
11487. By Nicolae Brinza

Dataguide cleanup

Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

- I find the name dataguide misleading because it's a guide on the query and not on the data. Maybe QueryPruneGuide would be more meaningful
- Can the user also use the zann_explores_json annotation?
- Why is the dataguide parameter on the Store's getCollection() function? Shouldn't it be on the function that returns the iterator? The problem is that a Collection object within the simplestore exists only once per collection. What's the semantics if multiple queries access the collection (possibly in parallel)?
- Did you measure the performance impact of the optimizer on some larger queries?

review: Needs Fixing
Revision history for this message
Nicolae Brinza (nbrinza) wrote :
Download full text (3.2 KiB)

> - I find the name dataguide misleading because it's a guide on the query and
> not on the data. Maybe QueryPruneGuide would be more meaningful

The query itself is not pruned, the data is. I think "dataguide" is the established term -- see for example this paper: http://ilpubs.stanford.edu:8090/264/1/1997-50.pdf .

> - Can the user also use the zann_explores_json annotation?

Yes, the users can use it as well. But does it make sense for them to use it? If they have an external function -- it is automatically handled as if it has the annotation. For a UDF it doesn't really make any sense to add it.

> - Why is the dataguide parameter on the Store's getCollection() function?
> Shouldn't it be on the function that returns the iterator? The problem is that
> a Collection object within the simplestore exists only once per collection.
> What's the semantics if multiple queries access the collection (possibly in
> parallel)?

It very much depends on how the collections are handled. Currently for Zorba collections it doesn't make sense to have any dataguides at all, because they're in-memory collections. I have not taken a look at the Sausalito code and have not seen how e.g. the MongoDB "collections" are managed. getCollection() seemed the most logical place where it should be passed, but the dataguide parameter could be easily propagated to any Store class, including the function that returns the iterator.

Currently each and every db:collection() call has its own dataguide, even if they might refer to the same collection. If the collection manager currently "caches" or reuses the collection iterators, then it might make sense to forbid that so that the dataguide for each individual db:collection call could be used.

Or alternatively, an "union" on the dataguides that refer to the same collection could be performed. But I think it is not always possible to determine if that is the case.

I think this could be investigated and decided upon when implementing the Dataguide push-down into MongoDB or when I would take a better look at the Sausalito's collection manager code.

> - Did you measure the performance impact of the optimizer on some larger
> queries?

The expression tree is traversed in its entirety once and only once, visiting each node, so the performance should not be very different from any other dataflow computation, e.g. ignores sorts/order/etc. If there are no "sources", i.e. db:collection() or jn:parse() calls, then the dataguide computation just propagates NULLs, doing no calculations and almost no memory allocations (at most one dataguide_cb allocation per fo_exprs and several others). If there are "sources" in the tree -- there will be some union operations being performed for some of the nodes.

I will check if any of our larger queries have longer compilation times, but because none of them have db:collection() or jn:parse() calls, I do not expect any differences.

It would make sense to have a specially constructed query that would do a stress-test of the dataguide code -- e.g. a db:collection().navigation.navigation. ... .navigation several thousand times or something similar. I will try that out and see if it manages...

Read more...

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

> > - I find the name dataguide misleading because it's a guide on the query and
> > not on the data. Maybe QueryPruneGuide would be more meaningful
>
> The query itself is not pruned, the data is. I think "dataguide" is the
> established term -- see for example this paper:
> http://ilpubs.stanford.edu:8090/264/1/1997-50.pdf .
"DataGuides serve as dynamic schemas, generated from the database." What we generate is a schema from the query.

> > - Why is the dataguide parameter on the Store's getCollection() function?
> > Shouldn't it be on the function that returns the iterator? The problem is
> that
> > a Collection object within the simplestore exists only once per collection.
> > What's the semantics if multiple queries access the collection (possibly in
> > parallel)?
>
> It very much depends on how the collections are handled. Currently for Zorba
> collections it doesn't make sense to have any dataguides at all, because
> they're in-memory collections. I have not taken a look at the Sausalito code
> and have not seen how e.g. the MongoDB "collections" are managed.
> getCollection() seemed the most logical place where it should be passed, but
> the dataguide parameter could be easily propagated to any Store class,
> including the function that returns the iterator.
>
> Currently each and every db:collection() call has its own dataguide, even if
> they might refer to the same collection. If the collection manager currently
> "caches" or reuses the collection iterators, then it might make sense to
> forbid that so that the dataguide for each individual db:collection call could
> be used.
>
> Or alternatively, an "union" on the dataguides that refer to the same
> collection could be performed. But I think it is not always possible to
> determine if that is the case.
>
> I think this could be investigated and decided upon when implementing the
> Dataguide push-down into MongoDB or when I would take a better look at the
> Sausalito's collection manager code.
I think we will run into a problem. 28msec has only one buffer that is accessed by all db:collection() calls in a query. Hence, the information needs to be the union.

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

> "DataGuides serve as dynamic schemas, generated from the database." What we generate is a
> schema from the query.

Still, it is a data schema, not a query schema. The one in the paper would be a Database DataGuide and ours would be Query DataGuide. I would agree to change it to QueryDataguide but I don't think there would be any confusions if it was simply called Dataguide.

> I think we will run into a problem. 28msec has only one buffer that is
> accessed by all db:collection() calls in a query. Hence, the information
> needs to be the union.

If there is no way of removing that limitation then we can overcome this by doing an union on all db:collection() dataguides and this will ensure correctness. But it would be a pity to loose the individually computed dataguides for each separate call. Still, if the name of fields of different collections are mostly disjoint sets, then we won't loose much of the improvement.

Again I suggest leaving this until I start implementing the push-down of projection info into the db:collection() calls. It has no impact on jn:parse() -- these dataguides can still be computed and kept individually for each call even if we do an union on db:collection() calls.

--

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

I've done some additional testing, and these are the results:

For the xray query, the largest that we have in the testsuite, compilation time with --compile-only is pretty much the same with and without the dataguide computaiton, at around ~0.08 sec.

With a specially constructed query that looks like this: (see dataguide-29.jq test)

let $col := dml:collection()
let $col2 := ($col.cat1, $col.cat2, ... , $col.cat10)
return $col2.category.category.category ... category (repeated ~2000 times)

the compilation time goes from ~0.7s without the dataguide to ~10s with the dataguide enabled, so it is significant. But this is a worst-case scenario. The resulting dataguide is an object 2000-levels deep.

The compilation can be improved significantly by:
- keeping track of the "leaves" nodes in the dataguide tree
- rewriting a bit the dataguide structure to store the trees incrementally instead of cloning them
- adding a depth cutoff

What do you think?

lp:~zorba-coders/zorba/dataguide updated
11488. By Nicolae Brinza

Added a stress-test for the dataguide computation

11489. By Nicolae Brinza

Merged with Zorba trunk

11490. By Nicolae Brinza

Fixed the build

11491. By Markos Zaharioudakis

cosmetic

11492. By Markos Zaharioudakis

merge from trunk

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Superseded by use-dataguide merge proposal.

Unmerged revisions

11492. By Markos Zaharioudakis

merge from trunk

11491. By Markos Zaharioudakis

cosmetic

11490. By Nicolae Brinza

Fixed the build

11489. By Nicolae Brinza

Merged with Zorba trunk

11488. By Nicolae Brinza

Added a stress-test for the dataguide computation

11487. By Nicolae Brinza

Dataguide cleanup

11486. By Nicolae Brinza

Dataguide fixes for the remote queue; cleanup; documentation;

11485. By Nicolae Brinza

Re-enabled the dataguide

11484. By Nicolae Brinza

Disabled dataguide for testing

11483. By Nicolae Brinza

Merged with Zorba trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/annotations/annotations.cpp'
--- src/annotations/annotations.cpp 2013-07-06 06:59:32 +0000
+++ src/annotations/annotations.cpp 2013-07-30 11:18:26 +0000
@@ -133,6 +133,8 @@
133 ZANN(read-only-nodes, read_only_nodes);133 ZANN(read-only-nodes, read_only_nodes);
134 ZANN(mutable-nodes, mutable_nodes);134 ZANN(mutable-nodes, mutable_nodes);
135135
136 ZANN(explores-json, explores_json);
137
136#undef ZANN138#undef ZANN
137139
138 // create a set of rules to detect conflicts between annotations140 // create a set of rules to detect conflicts between annotations
@@ -401,6 +403,13 @@
401}403}
402404
403405
406void AnnotationList::push_back(
407 AnnotationInternal::AnnotationId id)
408{
409 theAnnotationList.push_back(new AnnotationInternal(AnnotationInternal::lookup(id)));
410}
411
412
404/*******************************************************************************413/*******************************************************************************
405 Called from translator to detect duplicates and conflicting declarations414 Called from translator to detect duplicates and conflicting declarations
406********************************************************************************/415********************************************************************************/
407416
=== modified file 'src/annotations/annotations.h'
--- src/annotations/annotations.h 2013-07-06 06:59:32 +0000
+++ src/annotations/annotations.h 2013-07-30 11:18:26 +0000
@@ -86,7 +86,8 @@
86 zann_ordered,86 zann_ordered,
87 zann_unordered,87 zann_unordered,
88 zann_read_only_nodes,88 zann_read_only_nodes,
89 zann_mutable_nodes,89 zann_mutable_nodes,
90 zann_explores_json,
9091
91 // must be at the end92 // must be at the end
92 zann_end93 zann_end
@@ -188,6 +189,8 @@
188 void push_back(189 void push_back(
189 const store::Item_t& qname,190 const store::Item_t& qname,
190 const std::vector<const_expr*>& literals);191 const std::vector<const_expr*>& literals);
192
193 void push_back(AnnotationInternal::AnnotationId id);
191194
192 void checkConflictingDeclarations(DeclarationKind k, const QueryLoc& loc) const;195 void checkConflictingDeclarations(DeclarationKind k, const QueryLoc& loc) const;
193};196};
194197
=== modified file 'src/common/shared_types.h'
--- src/common/shared_types.h 2013-07-06 06:59:32 +0000
+++ src/common/shared_types.h 2013-07-30 11:18:26 +0000
@@ -106,6 +106,9 @@
106106
107typedef rchandle<CompilerCB> CompilerCB_t;107typedef rchandle<CompilerCB> CompilerCB_t;
108108
109// JSON dataguide
110class dataguide_cb;
111typedef rchandle<dataguide_cb> dataguide_cb_t;
109112
110/* datetime stuff */113/* datetime stuff */
111class DateTime;114class DateTime;
112115
=== modified file 'src/compiler/codegen/plan_visitor.cpp'
--- src/compiler/codegen/plan_visitor.cpp 2013-07-01 18:59:06 +0000
+++ src/compiler/codegen/plan_visitor.cpp 2013-07-30 11:18:26 +0000
@@ -49,6 +49,8 @@
49#include "compiler/expression/function_item_expr.h"49#include "compiler/expression/function_item_expr.h"
50#include "compiler/expression/path_expr.h"50#include "compiler/expression/path_expr.h"
51#include "compiler/expression/var_expr.h"51#include "compiler/expression/var_expr.h"
52#include "compiler/expression/json_dataguide.h"
53
52#include "compiler/parser/parse_constants.h"54#include "compiler/parser/parse_constants.h"
5355
54#include "context/namespace_context.h"56#include "context/namespace_context.h"
@@ -98,6 +100,9 @@
98#include "runtime/hof/dynamic_fncall_iterator.h"100#include "runtime/hof/dynamic_fncall_iterator.h"
99#include "runtime/misc/materialize.h"101#include "runtime/misc/materialize.h"
100102
103#include "runtime/collections/collections.h"
104#include "runtime/json/jsoniq_functions.h"
105
101#ifdef ZORBA_WITH_DEBUGGER106#ifdef ZORBA_WITH_DEBUGGER
102#include "debugger/debugger_commons.h"107#include "debugger/debugger_commons.h"
103#endif108#endif
@@ -2456,7 +2461,7 @@
2456 if (is_enclosed_expr(&v))2461 if (is_enclosed_expr(&v))
2457 theConstructorsStack.push(&v);2462 theConstructorsStack.push(&v);
24582463
2459 return true;2464 return true;
2460}2465}
24612466
24622467
@@ -2514,6 +2519,16 @@
2514 user_function* udf = static_cast<user_function*>(func);2519 user_function* udf = static_cast<user_function*>(func);
2515 udf->computeResultCaching(theCCB->theXQueryDiagnostics);2520 udf->computeResultCaching(theCCB->theXQueryDiagnostics);
2516 }2521 }
2522 else if (dataguide_cb::func_uses_dataguide(func->getKind()) && v.get_dataguide() != NULL)
2523 {
2524 ZorbaCollectionIterator* collIter;
2525 if ((collIter = dynamic_cast<ZorbaCollectionIterator*>(iter.getp())))
2526 collIter->setDataguide(v.get_dataguide()->get_as_json(&v));
2527
2528 JSONParseIterator* parseIter;
2529 if ((parseIter = dynamic_cast<JSONParseIterator*>(iter.getp())))
2530 parseIter->setDataguide(v.get_dataguide()->get_as_json(&v));
2531 }
2517 }2532 }
2518 else2533 else
2519 {2534 {
25202535
=== modified file 'src/compiler/expression/CMakeLists.txt'
--- src/compiler/expression/CMakeLists.txt 2013-02-07 17:24:36 +0000
+++ src/compiler/expression/CMakeLists.txt 2013-07-30 11:18:26 +0000
@@ -30,7 +30,8 @@
30 function_item_expr.cpp30 function_item_expr.cpp
31 pragma.cpp31 pragma.cpp
32 mem_manager.cpp32 mem_manager.cpp
33 expr_manager.cpp)33 expr_manager.cpp
34 json_dataguide.cpp)
3435
35IF (NOT ZORBA_NO_FULL_TEXT)36IF (NOT ZORBA_NO_FULL_TEXT)
36 LIST(APPEND EXPRESSION_SRCS37 LIST(APPEND EXPRESSION_SRCS
3738
=== modified file 'src/compiler/expression/expr_base.cpp'
--- src/compiler/expression/expr_base.cpp 2013-05-29 04:17:01 +0000
+++ src/compiler/expression/expr_base.cpp 2013-07-30 11:18:26 +0000
@@ -26,6 +26,8 @@
26#include "compiler/expression/expr_visitor.h"26#include "compiler/expression/expr_visitor.h"
27#include "compiler/expression/expr_manager.h"27#include "compiler/expression/expr_manager.h"
2828
29#include "compiler/expression/json_dataguide.h"
30
29#include "compiler/api/compilercb.h"31#include "compiler/api/compilercb.h"
3032
31#include "functions/function.h"33#include "functions/function.h"
@@ -1418,6 +1420,29 @@
1418}1420}
14191421
14201422
1423/*******************************************************************************
1424
1425********************************************************************************/
1426dataguide_cb* expr::get_dataguide()
1427{
1428 return theJsonDataguide;
1429}
1430
1431
1432dataguide_cb* expr::get_dataguide_or_new()
1433{
1434 if (!theJsonDataguide.getp())
1435 theJsonDataguide = new dataguide_cb();
1436 return theJsonDataguide;
1437}
1438
1439
1440dataguide_cb* expr::set_dataguide(dataguide_cb* a_json_dataguide)
1441{
1442 theJsonDataguide = a_json_dataguide;
1443 return theJsonDataguide;
1444}
1445
14211446
1422/*******************************************************************************1447/*******************************************************************************
14231448
@@ -1440,6 +1465,90 @@
1440 return cloneExpr->get_return_type();1465 return cloneExpr->get_return_type();
1441}1466}
14421467
1468/*******************************************************************************
1469
1470********************************************************************************/
1471std::string expr::get_expr_kind_string() const
1472{
1473 const char* result;
1474
1475 switch (get_expr_kind())
1476 {
1477 case const_expr_kind: result = "const_expr"; break;
1478
1479 case var_expr_kind: result = "var_expr"; break;
1480
1481 case doc_expr_kind: result = "doc_expr"; break;
1482 case elem_expr_kind: result = "elem_expr"; break;
1483 case attr_expr_kind: result = "attr_expr"; break;
1484 case namespace_expr_kind: result = "namespace_expr"; break;
1485 case text_expr_kind: result = "text_expr"; break;
1486 case pi_expr_kind: result = "pi_expr"; break;
1487
1488 case relpath_expr_kind: result = "relpath_expr"; break;
1489 case axis_step_expr_kind: result = "axis_step_expr"; break;
1490 case match_expr_kind: result = "match_expr"; break;
1491
1492 case flwor_expr_kind: result = "flwor_expr"; break;
1493 case if_expr_kind: result = "if_expr"; break;
1494 case trycatch_expr_kind: result = "trycatch_expr"; break;
1495
1496 case fo_expr_kind: result = "fo_expr"; break;
1497 case dynamic_function_invocation_expr_kind: result = "dynamic_function_invocation_expr"; break;
1498 case argument_placeholder_expr_kind: result = "argument_placeholder_expr"; break;
1499 case function_item_expr_kind: result = "function_item_expr"; break;
1500
1501 case castable_expr_kind: result = "castable_expr"; break;
1502 case cast_expr_kind: result = "cast_expr"; break;
1503 case instanceof_expr_kind: result = "instanceof_expr"; break;
1504 case treat_expr_kind: result = "treat_expr"; break;
1505 case promote_expr_kind: result = "promote_expr"; break;
1506 case name_cast_expr_kind: result = "name_cast_expr"; break;
1507
1508 case validate_expr_kind: result = "validate_expr"; break;
1509
1510 case extension_expr_kind: result = "extension_expr"; break;
1511
1512 case order_expr_kind: result = "order_expr"; break;
1513
1514#ifndef ZORBA_NO_FULL_TEXT
1515 case ft_expr_kind: result = "ft_expr"; break;
1516#endif /* ZORBA_NO_FULL_TEXT */
1517
1518 case delete_expr_kind: result = "delete_expr"; break;
1519 case insert_expr_kind: result = "insert_expr"; break;
1520 case rename_expr_kind: result = "rename_expr"; break;
1521 case replace_expr_kind: result = "replace_expr"; break;
1522 case transform_expr_kind: result = "transform_expr"; break;
1523
1524 case block_expr_kind: result = "block_expr"; break;
1525 case var_decl_expr_kind: result = "var_decl_expr"; break;
1526 case var_set_expr_kind: result = "var_set_expr"; break;
1527 case apply_expr_kind: result = "apply_expr"; break;
1528 case exit_expr_kind: result = "exit_expr"; break;
1529 case exit_catcher_expr_kind: result = "exit_catcher_expr"; break;
1530 case flowctl_expr_kind: result = "flowctl_expr"; break;
1531 case while_expr_kind: result = "while_expr"; break;
1532
1533 case eval_expr_kind: result = "eval_expr"; break;
1534 case debugger_expr_kind: result = "debugger_expr"; break;
1535 case wrapper_expr_kind: result = "wrapper_expr"; break;
1536 case function_trace_expr_kind: result = "function_trace_expr"; break;
1537
1538 case json_direct_object_expr_kind: result = "json_direct_object_expr"; break;
1539 case json_object_expr_kind: result = "json_object_expr"; break;
1540 case json_array_expr_kind: result = "json_array_expr"; break;
1541
1542 case unknown_expr_kind: result = "unknown_expr"; break;
1543
1544 default:
1545 result = "expr kind not in list. Add it to expr_base::get_expr_kind_string()";
1546 break;
1547 }
1548
1549 return std::string(result);
1550}
1551
14431552
1444} // namespace zorba1553} // namespace zorba
1445/* vim:set et sw=2 ts=2: */1554/* vim:set et sw=2 ts=2: */
14461555
=== modified file 'src/compiler/expression/expr_base.h'
--- src/compiler/expression/expr_base.h 2013-05-29 04:17:01 +0000
+++ src/compiler/expression/expr_base.h 2013-07-30 11:18:26 +0000
@@ -45,6 +45,7 @@
4545
46class CompilerCB;46class CompilerCB;
4747
48
48enum expr_kind_t49enum expr_kind_t
49{50{
50 const_expr_kind,51 const_expr_kind,
@@ -198,6 +199,8 @@
198 uint8_t theVisitId;199 uint8_t theVisitId;
199200
200 FreeVars theFreeVars;201 FreeVars theFreeVars;
202
203 dataguide_cb_t theJsonDataguide;
201204
202public:205public:
203 static bool is_sequential(unsigned short theScriptingKind);206 static bool is_sequential(unsigned short theScriptingKind);
@@ -223,6 +226,8 @@
223 user_function* get_udf() const { return theUDF; }226 user_function* get_udf() const { return theUDF; }
224227
225 expr_kind_t get_expr_kind() const { return static_cast<expr_kind_t>(theKind); }228 expr_kind_t get_expr_kind() const { return static_cast<expr_kind_t>(theKind); }
229
230 std::string get_expr_kind_string() const;
226231
227 const QueryLoc& get_loc() const { return theLoc; }232 const QueryLoc& get_loc() const { return theLoc; }
228233
@@ -404,6 +409,13 @@
404 void clear_annotations();409 void clear_annotations();
405410
406 xqtref_t get_return_type_with_empty_input(const expr* input) const;411 xqtref_t get_return_type_with_empty_input(const expr* input) const;
412
413 dataguide_cb* get_dataguide();
414
415 // If the object's dataguide is NULL, will create a new one and return it
416 dataguide_cb* get_dataguide_or_new();
417
418 dataguide_cb* set_dataguide(dataguide_cb* a_json_dataguide);
407419
408protected:420protected:
409 virtual void compute_scripting_kind() = 0;421 virtual void compute_scripting_kind() = 0;
410422
=== modified file 'src/compiler/expression/expr_clone.cpp'
--- src/compiler/expression/expr_clone.cpp 2013-07-02 21:32:23 +0000
+++ src/compiler/expression/expr_clone.cpp 2013-07-30 11:18:26 +0000
@@ -27,6 +27,7 @@
27#include "compiler/expression/ft_expr.h"27#include "compiler/expression/ft_expr.h"
28#include "compiler/expression/ftnode.h"28#include "compiler/expression/ftnode.h"
29#include "compiler/expression/expr_manager.h"29#include "compiler/expression/expr_manager.h"
30#include "compiler/expression/json_dataguide.h"
3031
31#include "compiler/api/compilercb.h"32#include "compiler/api/compilercb.h"
3233
@@ -337,6 +338,8 @@
337 cloneExpr->theArgs.push_back(e->theArgs[i]->clone(udf, subst));338 cloneExpr->theArgs.push_back(e->theArgs[i]->clone(udf, subst));
338339
339 cloneExpr->theScriptingKind = e->theScriptingKind;340 cloneExpr->theScriptingKind = e->theScriptingKind;
341
342 cloneExpr->theJsonDataguide = e->theJsonDataguide;
340343
341 newExpr = cloneExpr;344 newExpr = cloneExpr;
342 break;345 break;
343346
=== modified file 'src/compiler/expression/expr_type.cpp'
--- src/compiler/expression/expr_type.cpp 2013-06-15 02:57:08 +0000
+++ src/compiler/expression/expr_type.cpp 2013-07-30 11:18:26 +0000
@@ -643,6 +643,10 @@
643 const FunctionXQType* funcType = static_cast<const FunctionXQType*>(fiType.getp());643 const FunctionXQType* funcType = static_cast<const FunctionXQType*>(fiType.getp());
644 newType = funcType->get_return_type();644 newType = funcType->get_return_type();
645 }645 }
646 else if (fiType->type_kind() == XQType::STRUCTURED_ITEM_KIND && e->get_args().size() == 1)
647 {
648 newType = rtm.STRUCTURED_ITEM_TYPE_STAR;
649 }
646 else650 else
647 {651 {
648 newType = rtm.ITEM_TYPE_STAR;652 newType = rtm.ITEM_TYPE_STAR;
649653
=== added file 'src/compiler/expression/json_dataguide.cpp'
--- src/compiler/expression/json_dataguide.cpp 1970-01-01 00:00:00 +0000
+++ src/compiler/expression/json_dataguide.cpp 2013-07-30 11:18:26 +0000
@@ -0,0 +1,349 @@
1/*
2 * Copyright 2006-2013 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "stdafx.h"
17
18#include "system/globalenv.h"
19#include "store/api/item_factory.h"
20
21#include "compiler/expression/expr_base.h"
22#include "compiler/expression/json_dataguide.h"
23
24
25namespace zorba
26{
27
28/*******************************************************************************
29
30********************************************************************************/
31void dataguide_node::add_to_leaves(store::Item* key)
32{
33 if (is_star)
34 return;
35
36 if (keys.size() == 0) // no children == leaf
37 {
38 keys.push_back(key);
39 values.push_back(dataguide_node());
40 return;
41 }
42
43 for (csize i = 0; i != keys.size(); ++i)
44 values[i].add_to_leaves(key);
45}
46
47
48void dataguide_node::add_to_leaves(const dataguide_node* other)
49{
50 if (is_star)
51 return;
52
53 if (keys.size() == 0) // no children == leaf
54 {
55 clone(other);
56 return;
57 }
58
59 for (csize i = 0; i != keys.size(); ++i)
60 values[i].add_to_leaves(other);
61}
62
63
64void dataguide_node::set_star()
65{
66 is_star = true;
67 keys.clear();
68 values.clear();
69}
70
71
72void dataguide_node::set_star_on_leaves()
73{
74 if (is_star)
75 return;
76
77 if (keys.size() == 0)
78 {
79 set_star();
80 return;
81 }
82
83 for (csize i = 0; i != keys.size(); i++)
84 values[i].set_star_on_leaves();
85}
86
87
88void dataguide_node::do_union(const dataguide_node* other)
89{
90 if (other->is_star)
91 {
92 set_star();
93 return;
94 }
95
96 for (unsigned int i=0; i<other->keys.size(); i++)
97 {
98 bool found = false;
99 unsigned int j = 0;
100 for ( ; j<keys.size(); j++)
101 if (keys[j]->equals(other->keys[i]))
102 {
103 found = true;
104 break;
105 }
106
107 if (found)
108 {
109 values[i].do_union(&other->values[j]);
110 }
111 else
112 {
113 keys.push_back(other->keys[i]);
114 values.push_back(dataguide_node());
115 values.back().do_union(&other->values[i]);
116 }
117 }
118}
119
120
121void dataguide_node::clone(const dataguide_node* other)
122{
123 if (other->is_star)
124 {
125 set_star();
126 return;
127 }
128
129 for (csize i = 0; i < other->keys.size(); ++i)
130 {
131 keys.push_back(other->keys[i]);
132 values.push_back(dataguide_node());
133 values.back().clone(&other->values[i]);
134 }
135}
136
137
138dataguide_node* dataguide_node::get(store::Item* key)
139{
140 for (csize i = 0; i < keys.size(); ++i)
141 {
142 if (keys[i]->equals(key))
143 return &values[i];
144 }
145
146 return NULL;
147}
148
149
150store::Item_t dataguide_node::get_as_json()
151{
152 std::vector<store::Item_t> vals;
153 std::vector<store::Item_t> ks;
154
155 for (csize i = 0; i < values.size(); ++i)
156 {
157 if (values[i].is_star)
158 {
159 store::Item_t star_string;
160 zstring star = zstring("*");
161 GENV_ITEMFACTORY->createString(star_string, star);
162 vals.push_back(star_string);
163 }
164 else
165 {
166 vals.push_back(values[i].get_as_json());
167 }
168
169 ks.push_back(keys[i]);
170 }
171
172 if (is_star && values.size() == 0)
173 {
174 store::Item_t star_string;
175 zstring star = zstring("*");
176 GENV_ITEMFACTORY->createString(star_string, star);
177 ks.push_back(star_string);
178
179 star = "";
180 GENV_ITEMFACTORY->createString(star_string, star);
181 vals.push_back(star_string);
182 }
183
184 store::Item_t result;
185 GENV_ITEMFACTORY->createJSONObject(result, ks, vals);
186
187 return result;
188}
189
190
191zstring dataguide_node::toString()
192{
193 return get_as_json()->show();
194}
195
196
197/*******************************************************************************
198
199********************************************************************************/
200dataguide_cb::dataguide_cb()
201{
202}
203
204
205void dataguide_cb::add_to_leaves(store::Item* object_name)
206{
207 // Append the given object to each leaf node
208 map_type::iterator i = theDataguideMap.begin();
209 for ( ; i != theDataguideMap.end(); i++)
210 {
211 i->second.add_to_leaves(object_name);
212 }
213}
214
215
216void dataguide_cb::add_to_leaves(dataguide_node* other)
217{
218 // Append the given object to each leaf node
219 map_type::iterator i = theDataguideMap.begin();
220 for ( ; i != theDataguideMap.end(); i++)
221 {
222 i->second.add_to_leaves(other);
223 }
224}
225
226
227void dataguide_cb::set_star_on_leaves()
228{
229 map_type::iterator i = theDataguideMap.begin();
230 for ( ; i != theDataguideMap.end(); i++)
231 {
232 i->second.set_star_on_leaves();
233 }
234}
235
236
237void dataguide_cb::set_star_on_roots()
238{
239 map_type::iterator i = theDataguideMap.begin();
240 for ( ; i != theDataguideMap.end(); i++)
241 {
242 i->second.set_star();
243 }
244}
245
246
247dataguide_node* dataguide_cb::add_source(expr* e)
248{
249 theDataguideMap[e] = dataguide_node();
250 return &theDataguideMap[e];
251}
252
253
254void dataguide_cb::do_union(const dataguide_cb *other)
255{
256 if (this == other || other == NULL)
257 return;
258
259 map_type::const_iterator it = other->theDataguideMap.begin();
260 for (; it != other->theDataguideMap.end(); ++it)
261 {
262 theDataguideMap[it->first].do_union(&it->second);
263 }
264}
265
266
267void dataguide_cb::do_union(expr* other)
268{
269 if (other == NULL)
270 return;
271
272 do_union(other->get_dataguide());
273}
274
275
276dataguide_cb_t dataguide_cb::clone()
277{
278 dataguide_cb_t new_dg = new dataguide_cb();
279
280 map_type::iterator it = theDataguideMap.begin();
281 for (; it != theDataguideMap.end(); ++it)
282 {
283 dataguide_node* new_node = new_dg->add_source(it->first);
284 new_node->clone(&it->second);
285 }
286
287 return new_dg;
288}
289
290
291dataguide_node* dataguide_cb::get_dataguide_for_source(expr* e)
292{
293 map_type::iterator it = theDataguideMap.find(e);
294
295 if (it != theDataguideMap.end())
296 return &it->second;
297 else
298 return NULL;
299}
300
301
302bool dataguide_cb::is_empty(expr* e)
303{
304 return theDataguideMap[e].keys.size() == 0 || theDataguideMap[e].is_star;
305}
306
307
308store::Item_t dataguide_cb::get_as_json(expr* e)
309{
310 if (theDataguideMap[e].is_star)
311 return NULL;
312 else
313 return theDataguideMap[e].get_as_json();
314}
315
316
317zstring dataguide_cb::toString()
318{
319 std::stringstream str;
320 str << this;
321 str << " {";
322
323 map_type::iterator it = theDataguideMap.begin();
324 for (; it != theDataguideMap.end(); ++it)
325 {
326 str << " " << it->first << ": " << it->second.toString();
327 }
328
329 str << "}";
330 return str.str();
331}
332
333bool dataguide_cb::func_uses_dataguide(FunctionConsts::FunctionKind kind)
334{
335 if (kind == FunctionConsts::STATIC_COLLECTIONS_DML_COLLECTION_1 ||
336 kind == FunctionConsts::STATIC_COLLECTIONS_DML_COLLECTION_2 ||
337 kind == FunctionConsts::STATIC_COLLECTIONS_DML_COLLECTION_3 ||
338 kind == FunctionConsts::DYNAMIC_COLLECTIONS_DML_COLLECTION_1 ||
339 kind == FunctionConsts::DYNAMIC_COLLECTIONS_DML_COLLECTION_2 ||
340 kind == FunctionConsts::DYNAMIC_COLLECTIONS_DML_COLLECTION_3 ||
341 kind == FunctionConsts::FN_JSONIQ_PARSE_JSON_1 ||
342 kind == FunctionConsts::FN_JSONIQ_PARSE_JSON_2)
343 return true;
344 else
345 return false;
346}
347
348}
349/* vim:set et sw=2 ts=2: */
0350
=== added file 'src/compiler/expression/json_dataguide.h'
--- src/compiler/expression/json_dataguide.h 1970-01-01 00:00:00 +0000
+++ src/compiler/expression/json_dataguide.h 2013-07-30 11:18:26 +0000
@@ -0,0 +1,153 @@
1/*
2 * Copyright 2006-2013 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17#ifndef ZORBA_COMPILER_JSON_DATAGUIDE
18#define ZORBA_COMPILER_JSON_DATAGUIDE
19
20#include "zorbautils/string_util.h"
21#include "store/api/item.h"
22#include "functions/function_consts.h"
23
24
25namespace zorba
26{
27
28class expr;
29
30
31/******************************************************************************
32 The node of a dataguide tree.
33
34 is_star:
35 --------
36 Set to true if all the key/value pairs of an object need to retrieved from
37 the JSON store. This includes all child objects.
38
39 keys:
40 values:
41 -------
42 Key=value pairs of the dataguide. If key X is contained in the keys vector,
43 then the corresponding object must be retrieved from the store. The values
44 is either:
45 -- another list of key/value pairs denoting child objects that must be
46 retreived
47 -- star: all child objects beyond this point must be retrieved.
48 -- empty: no projection information. All child nodes will be retrieved if
49 the list remains empty at the end of the analysis.
50*******************************************************************************/
51class dataguide_node
52{
53public:
54 bool is_star;
55
56 std::vector<store::Item_t> keys;
57
58 std::vector<dataguide_node> values;
59
60
61public:
62 dataguide_node() : is_star(false) { }
63
64 void add_to_leaves(store::Item* key);
65
66 void add_to_leaves(const dataguide_node* other);
67
68 void set_star();
69
70 void set_star_on_leaves();
71
72 void do_union(const dataguide_node* other);
73
74 // returns the child dataguide node associated with the given key,
75 // or NULL if there is none
76 dataguide_node* get(store::Item* key);
77
78 // recursively constructs "this" to be a clone of the other dataguide
79 void clone(const dataguide_node* other);
80
81 store::Item_t get_as_json();
82
83 zstring toString();
84};
85
86
87/******************************************************************************
88 The JSON dataguide control block
89
90 theDataguideMap:
91 ----------------
92 A mapping of expressions (keys) to dataguide trees that contain the projection
93 information. Each key in the map is a source expression which currently
94 include JSON database collection retrieval functions (db:collection) and
95 JSON parse function.
96 In a UDF, all formal parameters are added to the sources set in order to
97 allow projection information to be "added" to the expressions that invoke
98 the UDF.
99*******************************************************************************/
100class dataguide_cb : public SimpleRCObject
101{
102friend class JsonDataguide;
103
104public:
105 typedef std::map<expr*, dataguide_node> map_type;
106
107protected:
108 std::map<expr*, dataguide_node> theDataguideMap;
109
110
111public:
112 dataguide_cb();
113
114 dataguide_node* add_source(expr* e);
115
116 void add_to_leaves(store::Item* object_name);
117
118 void add_to_leaves(dataguide_node* other);
119
120 void set_star_on_leaves();
121
122 void set_star_on_roots();
123
124 void do_union(const dataguide_cb* other);
125
126 void do_union(expr *other);
127
128 dataguide_cb_t clone();
129
130 dataguide_node* get_dataguide_for_source(expr* e);
131
132 bool is_empty(expr *e);
133
134 store::Item_t get_as_json(expr *e);
135
136 zstring toString();
137
138public:
139
140 static bool func_uses_dataguide(FunctionConsts::FunctionKind kind);
141};
142
143
144}
145
146#endif // ZORBA_COMPILER_JSON_DATAGUIDE
147
148/*
149 * Local variables:
150 * mode: c++
151 * End:
152 */
153/* vim:set et sw=2 ts=2: */
0154
=== modified file 'src/compiler/expression/var_expr.cpp'
--- src/compiler/expression/var_expr.cpp 2013-04-24 01:35:58 +0000
+++ src/compiler/expression/var_expr.cpp 2013-07-30 11:18:26 +0000
@@ -23,6 +23,7 @@
23#include "compiler/expression/flwor_expr.h"23#include "compiler/expression/flwor_expr.h"
24#include "compiler/expression/expr_visitor.h"24#include "compiler/expression/expr_visitor.h"
25#include "compiler/api/compilercb.h"25#include "compiler/api/compilercb.h"
26#include "compiler/expression/json_dataguide.h"
2627
27#include "types/typeops.h"28#include "types/typeops.h"
2829
2930
=== modified file 'src/compiler/rewriter/framework/default_optimizer.cpp'
--- src/compiler/rewriter/framework/default_optimizer.cpp 2013-05-15 10:27:06 +0000
+++ src/compiler/rewriter/framework/default_optimizer.cpp 2013-07-30 11:18:26 +0000
@@ -266,7 +266,16 @@
266 driverMarkNodeCopyProps.rewrite(rCtx);266 driverMarkNodeCopyProps.rewrite(rCtx);
267 }267 }
268 }268 }
269269
270 // Compute Json Dataguide
271 RuleOnceDriver<JsonDataguide> driverJsonDataguide;
272 driverJsonDataguide.rewrite(rCtx);
273
274 if (Properties::instance()->printDataguide())
275 {
276 driverJsonDataguide.getRule()->printDataguides(rCtx.getRoot());
277 }
278
270 return modified;279 return modified;
271}280}
272281
273282
=== modified file 'src/compiler/rewriter/rules/nodeid_rules.cpp'
--- src/compiler/rewriter/rules/nodeid_rules.cpp 2013-06-15 02:57:08 +0000
+++ src/compiler/rewriter/rules/nodeid_rules.cpp 2013-07-30 11:18:26 +0000
@@ -36,6 +36,8 @@
36#include "functions/func_node_sort_distinct.h"36#include "functions/func_node_sort_distinct.h"
37#include "functions/udf.h"37#include "functions/udf.h"
3838
39#include "compiler/expression/json_dataguide.h"
40
39#include "diagnostics/assert.h"41#include "diagnostics/assert.h"
4042
4143
@@ -1538,5 +1540,292 @@
1538}1540}
15391541
15401542
1543/*******************************************************************************
1544
1545********************************************************************************/
1546expr* JsonDataguide::apply(
1547 RewriterContext& rCtx,
1548 expr* node,
1549 bool& modified)
1550{
1551 process(node, true);
1552
1553 if (node->get_dataguide() != NULL)
1554 {
1555 std::map<expr*,dataguide_node>::iterator i = node->get_dataguide()->theDataguideMap.begin();
1556 for ( ; i != node->get_dataguide()->theDataguideMap.end(); ++i)
1557 {
1558 i->first->set_dataguide(node->get_dataguide());
1559 }
1560 }
1561
1562 return NULL;
1563}
1564
1565
1566void JsonDataguide::printDataguides(expr* root)
1567{
1568 dataguide_cb* dg = root->get_dataguide();
1569 if (dg == NULL)
1570 return;
1571
1572 std::map<expr*,dataguide_node>::iterator i = dg->theDataguideMap.begin();
1573 for ( ; i != dg->theDataguideMap.end(); ++i)
1574 {
1575 if (i->first->get_expr_kind() != fo_expr_kind)
1576 continue;
1577
1578 fo_expr* fo = static_cast<fo_expr*>(i->first);
1579 store::Item_t json_dg = dg->get_as_json(fo);
1580 if (json_dg.getp())
1581 std::cout << "Dataguide for function " << fo->get_func()->getName()->getStringValue() << "() at "
1582 << fo->get_loc().getLineBegin() << ":" << fo->get_loc().getColumnBegin() << ": "
1583 << json_dg->show() << std::endl;
1584 }
1585}
1586
1587
1588// For a given expression that is bound to a clause var (for/let/groupby), return the var_expr
1589// or NULL if expr is not bound to a clause var
1590var_expr* getClauseVar(flwor_expr* flwor, expr* node, bool& is_groupby)
1591{
1592 is_groupby = false;
1593
1594 for (unsigned int i=0; i < flwor->num_clauses(); i++)
1595 {
1596 flwor_clause* c = flwor->get_clause(i);
1597 if (c->get_kind() == flwor_clause::for_clause ||
1598 c->get_kind() == flwor_clause::let_clause)
1599 {
1600 forlet_clause* fc = static_cast<forlet_clause*>(c);
1601 if (fc->get_expr() == node)
1602 return fc->get_var();
1603 }
1604 else if (c->get_kind() == flwor_clause::groupby_clause)
1605 {
1606 groupby_clause* gc = static_cast<groupby_clause*>(c);
1607 flwor_clause::rebind_list_t::iterator it = gc->beginGroupVars();
1608 for ( ; it != gc->endGroupVars(); ++it)
1609 if (it->first == node)
1610 {
1611 is_groupby = true;
1612 return it->second;
1613 }
1614
1615 it = gc->beginNonGroupVars();
1616 for ( ; it != gc->endNonGroupVars(); ++it)
1617 if (it->first == node)
1618 {
1619 is_groupby = true;
1620 return it->second;
1621 }
1622 }
1623 }
1624
1625 return NULL;
1626}
1627
1628
1629// Propagates the dataguide from the child to the parent
1630void propagate_dg(expr* child, expr* node)
1631{
1632 if (child->get_dataguide() == NULL)
1633 return;
1634
1635 if (node->get_dataguide())
1636 {
1637 node->set_dataguide(node->get_dataguide()->clone());
1638 node->get_dataguide()->do_union(child);
1639 }
1640 else
1641 {
1642 node->set_dataguide(child->get_dataguide());
1643 }
1644}
1645
1646
1647void JsonDataguide::iterateChildren(expr* node, bool propagates_to_output)
1648{
1649 flwor_expr* flwor = NULL;
1650 bool is_groupby;
1651 var_expr* clause_var;
1652
1653 // If we're in a UDF root expr, add all parameter variables to the sources set
1654 if (node->get_udf() != NULL && node->get_udf()->getBody() == node)
1655 {
1656 for (unsigned int i=0; i<node->get_udf()->numArgs(); i++)
1657 {
1658 var_expr* v = node->get_udf()->getArgVar(i);
1659 v->get_dataguide_or_new()->add_source(v);
1660 }
1661 }
1662
1663 if (node->get_expr_kind() == flwor_expr_kind)
1664 {
1665 flwor = static_cast<flwor_expr*>(node);
1666 }
1667
1668 ExprIterator iter(node);
1669 while (!iter.done())
1670 {
1671 expr* child = (**iter);
1672 if (child == NULL)
1673 continue;
1674
1675 bool child_propagates_to_output = propagates_to_output;
1676
1677 if (child->get_expr_kind() == var_decl_expr_kind ||
1678 (node->get_expr_kind() == fo_expr_kind && static_cast<fo_expr*>(node)->get_func()->isUdf()) ||
1679 (node->get_expr_kind() == if_expr_kind && static_cast<if_expr*>(node)->get_cond_expr() == child))
1680 child_propagates_to_output = false;
1681
1682 if (flwor && (clause_var = getClauseVar(flwor, child, is_groupby)))
1683 {
1684 process(child, false);
1685 clause_var->set_dataguide(child->get_dataguide());
1686 if (is_groupby)
1687 propagate_dg(child, node);
1688 }
1689 else
1690 {
1691 process(child, child_propagates_to_output);
1692 propagate_dg(child, node);
1693 }
1694
1695 iter.next();
1696 } // while
1697
1698 // std::cerr << "--> " << node << " = " << node->get_expr_kind_string() << " propagates_to_output: " << propagates_to_output << " dataguide: " << (node->get_dataguide() ? node->get_dataguide()->toString() : "") << std::endl;
1699}
1700
1701
1702void JsonDataguide::process(expr* node, bool propagates_to_output)
1703{
1704 iterateChildren(node, propagates_to_output);
1705
1706 switch (node->get_expr_kind())
1707 {
1708 case dynamic_function_invocation_expr_kind:
1709 {
1710 dynamic_function_invocation_expr* fo = static_cast<dynamic_function_invocation_expr*>(node);
1711 expr* sourceExpr = fo->get_function();
1712 TypeManager* tm = sourceExpr->get_type_manager();
1713 xqtref_t sourceType = sourceExpr->get_return_type();
1714
1715 if ((TypeOps::is_subtype(tm, *sourceType, *GENV_TYPESYSTEM.JSON_ITEM_TYPE_STAR)
1716 || TypeOps::is_subtype(tm, *sourceType, *GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_STAR))
1717 && fo->get_args().size() == 1
1718 && fo->get_args()[0]->get_expr_kind() == const_expr_kind)
1719 {
1720 dataguide_cb_t dg = fo->get_dataguide() ? fo->get_dataguide()->clone().getp() : new dataguide_cb();
1721 dg->add_to_leaves(static_cast<const_expr*>(fo->get_args()[0])->get_val());
1722 fo->set_dataguide(dg);
1723 }
1724
1725 break;
1726 }
1727 case fo_expr_kind :
1728 {
1729 fo_expr* fo = static_cast<fo_expr*>(node);
1730 function* f = fo->get_func();
1731 if (fo->get_dataguide() && f->getKind() == FunctionConsts::FN_JSONIQ_VALUE_2)
1732 {
1733 if (fo->get_arg(1)->get_expr_kind() == const_expr_kind)
1734 {
1735 fo->set_dataguide(fo->get_dataguide()->clone());
1736 fo->get_dataguide()->add_to_leaves(static_cast<const_expr*>(fo->get_arg(1))->get_val());
1737 }
1738 else
1739 {
1740 fo->get_dataguide()->set_star_on_leaves();
1741 }
1742 }
1743 else if (dataguide_cb::func_uses_dataguide(f->getKind()))
1744 {
1745 fo->get_dataguide_or_new()->add_source(fo);
1746 }
1747 else if (f->isExternal()
1748 ||
1749 (f->getAnnotationList()
1750 &&
1751 f->getAnnotationList()->contains(AnnotationInternal::zann_explores_json)))
1752 {
1753 if (fo->get_dataguide())
1754 fo->get_dataguide()->set_star_on_leaves();
1755 }
1756 else if (f->isUdf())
1757 {
1758 user_function* udf = static_cast<user_function*>(f);
1759
1760 // The body of a UDF will be NULL when compiling an eval expression and
1761 // plan serialization has been used. Assume the function is recursive in this case.
1762 if (udf->getBody() == NULL || udf->isRecursive())
1763 {
1764 if (fo->get_dataguide())
1765 fo->get_dataguide()->set_star_on_leaves();
1766 }
1767 else
1768 {
1769 // Iterate through the effective parameters and prepend to them the function's formal parameter's dataguide
1770 for (unsigned int i=0; i<udf->numArgs(); i++)
1771 {
1772 dataguide_cb_t new_dg;
1773 dataguide_node* var_dg = NULL;
1774
1775 if (udf->getBody()->get_dataguide())
1776 var_dg = udf->getBody()->get_dataguide()->get_dataguide_for_source(udf->getArgVar(i));
1777
1778 if (var_dg)
1779 {
1780 if (fo->get_arg(i)->get_dataguide())
1781 new_dg = fo->get_arg(i)->get_dataguide()->clone();
1782 else
1783 new_dg = new dataguide_cb();
1784
1785 new_dg->add_to_leaves(var_dg);
1786 }
1787
1788 if (fo->get_dataguide())
1789 fo->get_dataguide()->do_union(new_dg);
1790 else
1791 fo->set_dataguide(new_dg);
1792 } // for
1793 }
1794 }
1795
1796 break;
1797 }
1798 case var_decl_expr_kind:
1799 {
1800 var_decl_expr* vd = static_cast<var_decl_expr*>(node);
1801 if (vd->get_expr() && vd->get_var_expr())
1802 vd->get_var_expr()->set_dataguide(vd->get_expr()->get_dataguide());
1803 break;
1804 }
1805 case eval_expr_kind:
1806 {
1807 // invalidate all dataguides
1808 dataguide_cb* dg = node->get_dataguide_or_new();
1809 dg->set_star_on_roots();
1810 break;
1811 }
1812
1813 case wrapper_expr_kind:
1814 case var_expr_kind:
1815 // skip setting star even if the result propagates to output
1816 return;
1817
1818 default:
1819 break;
1820 } // switch
1821
1822 if (propagates_to_output && node->get_dataguide())
1823 {
1824 node->get_dataguide()->set_star_on_leaves();
1825 }
1826
1827}
1828
1829
1541}1830}
1542/* vim:set et sw=2 ts=2: */1831/* vim:set et sw=2 ts=2: */
15431832
=== modified file 'src/compiler/rewriter/rules/rule_base.h'
--- src/compiler/rewriter/rules/rule_base.h 2013-02-07 17:24:36 +0000
+++ src/compiler/rewriter/rules/rule_base.h 2013-07-30 11:18:26 +0000
@@ -55,7 +55,8 @@
55 InlineFunctions,55 InlineFunctions,
56 PartialEval,56 PartialEval,
57 EchoNodes,57 EchoNodes,
58 PlanPrinter58 PlanPrinter,
59 JsonDataguide
59 } RuleKind;60 } RuleKind;
6061
61private:62private:
6263
=== modified file 'src/compiler/rewriter/rules/ruleset.h'
--- src/compiler/rewriter/rules/ruleset.h 2013-05-13 10:10:08 +0000
+++ src/compiler/rewriter/rules/ruleset.h 2013-07-30 11:18:26 +0000
@@ -223,6 +223,31 @@
223};223};
224224
225225
226/*******************************************************************************
227
228********************************************************************************/
229class JsonDataguide : public RewriteRule
230{
231public:
232 JsonDataguide()
233 :
234 RewriteRule(RewriteRule::JsonDataguide, "JsonDataguide")
235 {
236 }
237
238 expr* apply(RewriterContext& rCtx, expr* node, bool& modified);
239
240public:
241 // used for automated testing
242 void printDataguides(expr* root);
243
244protected:
245 void iterateChildren(expr* node, bool propagates_to_output);
246
247 void process(expr* node, bool propagates_to_output);
248};
249
250
226}251}
227252
228#endif /* ZORBA_REWRITE_RULE_H */253#endif /* ZORBA_REWRITE_RULE_H */
229254
=== modified file 'src/functions/function.cpp'
--- src/functions/function.cpp 2013-07-06 06:59:32 +0000
+++ src/functions/function.cpp 2013-07-30 11:18:26 +0000
@@ -135,6 +135,30 @@
135}135}
136136
137137
138void function::addAnnotation(AnnotationInternal::AnnotationId id)
139{
140 if (theAnnotationList == NULL)
141 theAnnotationList = new AnnotationList();
142
143 if (theAnnotationList->contains(id))
144 return;
145
146 theAnnotationList->push_back(id);
147
148 if (theAnnotationList->contains(AnnotationInternal::zann_nondeterministic))
149 setDeterministic(false);
150
151 setPrivate(theAnnotationList->contains(AnnotationInternal::fn_private));
152
153 if (isUpdating() &&
154 theAnnotationList->contains(AnnotationInternal::zann_sequential))
155 {
156 throw XQUERY_EXCEPTION(zerr::XSST0001,
157 ERROR_PARAMS(getName()->getStringValue()));
158 }
159}
160
161
138/*******************************************************************************162/*******************************************************************************
139 This is a virstual method. It is redefined by udf and external-function163 This is a virstual method. It is redefined by udf and external-function
140 classes. 164 classes.
141165
=== modified file 'src/functions/function.h'
--- src/functions/function.h 2013-07-06 06:59:32 +0000
+++ src/functions/function.h 2013-07-30 11:18:26 +0000
@@ -51,7 +51,7 @@
51class function : public SimpleRCObject51class function : public SimpleRCObject
52{52{
53protected:53protected:
54 signature theSignature;54 signature theSignature;
55 FunctionConsts::FunctionKind theKind;55 FunctionConsts::FunctionKind theKind;
56 uint32_t theFlags;56 uint32_t theFlags;
57 AnnotationList * theAnnotationList;57 AnnotationList * theAnnotationList;
@@ -163,8 +163,10 @@
163 void setAnnotations(AnnotationList* annotations);163 void setAnnotations(AnnotationList* annotations);
164164
165 const AnnotationList* getAnnotationList() const { return theAnnotationList; }165 const AnnotationList* getAnnotationList() const { return theAnnotationList; }
166
167 void addAnnotation(AnnotationInternal::AnnotationId id);
166168
167 bool validate_args(std::vector<PlanIter_t>& argv) const;169 bool validate_args(std::vector<PlanIter_t>& argv) const;
168170
169 bool isUpdating() const { return (getScriptingKind() & UPDATING_EXPR) != 0; }171 bool isUpdating() const { return (getScriptingKind() & UPDATING_EXPR) != 0; }
170172
171173
=== modified file 'src/functions/pregenerated/func_accessors.h'
--- src/functions/pregenerated/func_accessors.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_accessors.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,7 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49theXQueryVersion = StaticContextConsts::xquery_version_3_0;49 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
50 }50 }
5151
52 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }52 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -62,7 +62,6 @@
62 : 62 :
63 function(sig, kind)63 function(sig, kind)
64 {64 {
65
66 }65 }
6766
68 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }67 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -79,7 +78,7 @@
79 : 78 :
80 function(sig, kind)79 function(sig, kind)
81 {80 {
82theXQueryVersion = StaticContextConsts::xquery_version_3_0;81 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
83 }82 }
8483
85 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }84 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -95,7 +94,6 @@
95 : 94 :
96 function(sig, kind)95 function(sig, kind)
97 {96 {
98
99 }97 }
10098
101 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }99 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -112,7 +110,6 @@
112 : 110 :
113 function(sig, kind)111 function(sig, kind)
114 {112 {
115
116 }113 }
117114
118 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }115 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -129,7 +126,6 @@
129 : 126 :
130 function(sig, kind)127 function(sig, kind)
131 {128 {
132
133 }129 }
134130
135 xqtref_t getReturnType(const fo_expr* caller) const;131 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -154,7 +150,6 @@
154 : 150 :
155 function(sig, kind)151 function(sig, kind)
156 {152 {
157
158 }153 }
159154
160 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }155 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -171,7 +166,7 @@
171 : 166 :
172 function(sig, kind)167 function(sig, kind)
173 {168 {
174theXQueryVersion = StaticContextConsts::xquery_version_3_0;169 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
175 }170 }
176171
177 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }172 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -187,7 +182,6 @@
187 : 182 :
188 function(sig, kind)183 function(sig, kind)
189 {184 {
190
191 }185 }
192186
193 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }187 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -204,7 +198,6 @@
204 : 198 :
205 function(sig, kind)199 function(sig, kind)
206 {200 {
207
208 }201 }
209202
210 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }203 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
211204
=== modified file 'src/functions/pregenerated/func_any_uri.h'
--- src/functions/pregenerated/func_any_uri.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_any_uri.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
5352
=== modified file 'src/functions/pregenerated/func_base64.h'
--- src/functions/pregenerated/func_base64.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_base64.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
6866
=== modified file 'src/functions/pregenerated/func_booleans.h'
--- src/functions/pregenerated/func_booleans.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_booleans.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }51 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }67 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -80,7 +78,6 @@
80 : 78 :
81 function(sig, kind)79 function(sig, kind)
82 {80 {
83
84 }81 }
8582
86 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }83 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
8784
=== modified file 'src/functions/pregenerated/func_collections.h'
--- src/functions/pregenerated/func_collections.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_collections.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return UPDATING_EXPR; }51 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -67,7 +66,6 @@
67 : 66 :
68 function(sig, kind)67 function(sig, kind)
69 {68 {
70
71 }69 }
7270
73 unsigned short getScriptingKind() const { return UPDATING_EXPR; }71 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -88,7 +86,6 @@
88 : 86 :
89 function(sig, kind)87 function(sig, kind)
90 {88 {
91
92 }89 }
9390
94 bool accessesDynCtx() const { return true; }91 bool accessesDynCtx() const { return true; }
@@ -105,7 +102,6 @@
105 : 102 :
106 function(sig, kind)103 function(sig, kind)
107 {104 {
108
109 }105 }
110106
111 bool accessesDynCtx() const { return true; }107 bool accessesDynCtx() const { return true; }
@@ -122,7 +118,6 @@
122 : 118 :
123 function(sig, kind)119 function(sig, kind)
124 {120 {
125
126 }121 }
127122
128 bool accessesDynCtx() const { return true; }123 bool accessesDynCtx() const { return true; }
@@ -141,7 +136,6 @@
141 : 136 :
142 function(sig, kind)137 function(sig, kind)
143 {138 {
144
145 }139 }
146140
147 bool accessesDynCtx() const { return true; }141 bool accessesDynCtx() const { return true; }
@@ -172,7 +166,6 @@
172 : 166 :
173 function(sig, kind)167 function(sig, kind)
174 {168 {
175
176 }169 }
177170
178 bool accessesDynCtx() const { return true; }171 bool accessesDynCtx() const { return true; }
@@ -191,7 +184,6 @@
191 : 184 :
192 function(sig, kind)185 function(sig, kind)
193 {186 {
194
195 }187 }
196188
197 bool accessesDynCtx() const { return true; }189 bool accessesDynCtx() const { return true; }
@@ -210,7 +202,7 @@
210 : 202 :
211 function(sig, kind)203 function(sig, kind)
212 {204 {
213205 addAnnotation(AnnotationInternal::zann_explores_json);
214 }206 }
215207
216 unsigned short getScriptingKind() const { return UPDATING_EXPR; }208 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -233,7 +225,7 @@
233 : 225 :
234 function(sig, kind)226 function(sig, kind)
235 {227 {
236228 addAnnotation(AnnotationInternal::zann_explores_json);
237 }229 }
238230
239 unsigned short getScriptingKind() const { return UPDATING_EXPR; }231 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -256,7 +248,7 @@
256 : 248 :
257 function(sig, kind)249 function(sig, kind)
258 {250 {
259251 addAnnotation(AnnotationInternal::zann_explores_json);
260 }252 }
261253
262 unsigned short getScriptingKind() const { return UPDATING_EXPR; }254 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -279,7 +271,7 @@
279 : 271 :
280 function(sig, kind)272 function(sig, kind)
281 {273 {
282274 addAnnotation(AnnotationInternal::zann_explores_json);
283 }275 }
284276
285 unsigned short getScriptingKind() const { return UPDATING_EXPR; }277 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -302,7 +294,7 @@
302 : 294 :
303 function(sig, kind)295 function(sig, kind)
304 {296 {
305297 addAnnotation(AnnotationInternal::zann_explores_json);
306 }298 }
307299
308 unsigned short getScriptingKind() const { return UPDATING_EXPR; }300 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -325,7 +317,7 @@
325 : 317 :
326 function(sig, kind)318 function(sig, kind)
327 {319 {
328320 addAnnotation(AnnotationInternal::zann_explores_json);
329 }321 }
330322
331 unsigned short getScriptingKind() const { return APPLYING_EXPR; }323 unsigned short getScriptingKind() const { return APPLYING_EXPR; }
@@ -350,7 +342,7 @@
350 : 342 :
351 function(sig, kind)343 function(sig, kind)
352 {344 {
353345 addAnnotation(AnnotationInternal::zann_explores_json);
354 }346 }
355347
356 unsigned short getScriptingKind() const { return APPLYING_EXPR; }348 unsigned short getScriptingKind() const { return APPLYING_EXPR; }
@@ -375,7 +367,7 @@
375 : 367 :
376 function(sig, kind)368 function(sig, kind)
377 {369 {
378370 addAnnotation(AnnotationInternal::zann_explores_json);
379 }371 }
380372
381 unsigned short getScriptingKind() const { return APPLYING_EXPR; }373 unsigned short getScriptingKind() const { return APPLYING_EXPR; }
@@ -400,7 +392,7 @@
400 : 392 :
401 function(sig, kind)393 function(sig, kind)
402 {394 {
403395 addAnnotation(AnnotationInternal::zann_explores_json);
404 }396 }
405397
406 unsigned short getScriptingKind() const { return APPLYING_EXPR; }398 unsigned short getScriptingKind() const { return APPLYING_EXPR; }
@@ -425,7 +417,7 @@
425 : 417 :
426 function(sig, kind)418 function(sig, kind)
427 {419 {
428420 addAnnotation(AnnotationInternal::zann_explores_json);
429 }421 }
430422
431 unsigned short getScriptingKind() const { return APPLYING_EXPR; }423 unsigned short getScriptingKind() const { return APPLYING_EXPR; }
@@ -450,7 +442,6 @@
450 : 442 :
451 function(sig, kind)443 function(sig, kind)
452 {444 {
453
454 }445 }
455446
456 unsigned short getScriptingKind() const { return UPDATING_EXPR; }447 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -475,7 +466,6 @@
475 : 466 :
476 function(sig, kind)467 function(sig, kind)
477 {468 {
478
479 }469 }
480470
481 unsigned short getScriptingKind() const { return UPDATING_EXPR; }471 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -496,7 +486,6 @@
496 : 486 :
497 function(sig, kind)487 function(sig, kind)
498 {488 {
499
500 }489 }
501490
502 unsigned short getScriptingKind() const { return UPDATING_EXPR; }491 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -517,7 +506,7 @@
517 : 506 :
518 function(sig, kind)507 function(sig, kind)
519 {508 {
520509 addAnnotation(AnnotationInternal::zann_explores_json);
521 }510 }
522511
523 unsigned short getScriptingKind() const { return UPDATING_EXPR; }512 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -540,7 +529,6 @@
540 : 529 :
541 function(sig, kind)530 function(sig, kind)
542 {531 {
543
544 }532 }
545533
546 unsigned short getScriptingKind() const { return UPDATING_EXPR; }534 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -559,7 +547,6 @@
559 : 547 :
560 function(sig, kind)548 function(sig, kind)
561 {549 {
562
563 }550 }
564551
565 bool accessesDynCtx() const { return true; }552 bool accessesDynCtx() const { return true; }
@@ -576,7 +563,6 @@
576 : 563 :
577 function(sig, kind)564 function(sig, kind)
578 {565 {
579
580 }566 }
581567
582 bool accessesDynCtx() const { return true; }568 bool accessesDynCtx() const { return true; }
@@ -593,7 +579,6 @@
593 : 579 :
594 function(sig, kind)580 function(sig, kind)
595 {581 {
596
597 }582 }
598583
599 bool accessesDynCtx() const { return true; }584 bool accessesDynCtx() const { return true; }
@@ -610,7 +595,6 @@
610 : 595 :
611 function(sig, kind)596 function(sig, kind)
612 {597 {
613
614 }598 }
615599
616 bool accessesDynCtx() const { return true; }600 bool accessesDynCtx() const { return true; }
@@ -627,7 +611,6 @@
627 : 611 :
628 function(sig, kind)612 function(sig, kind)
629 {613 {
630
631 }614 }
632615
633 CODEGEN_DECL();616 CODEGEN_DECL();
@@ -642,7 +625,6 @@
642 : 625 :
643 function(sig, kind)626 function(sig, kind)
644 {627 {
645
646 }628 }
647629
648 CODEGEN_DECL();630 CODEGEN_DECL();
@@ -657,7 +639,6 @@
657 : 639 :
658 function(sig, kind)640 function(sig, kind)
659 {641 {
660
661 }642 }
662643
663 CODEGEN_DECL();644 CODEGEN_DECL();
@@ -672,7 +653,6 @@
672 : 653 :
673 function(sig, kind)654 function(sig, kind)
674 {655 {
675
676 }656 }
677657
678 CODEGEN_DECL();658 CODEGEN_DECL();
@@ -687,7 +667,6 @@
687 : 667 :
688 function(sig, kind)668 function(sig, kind)
689 {669 {
690
691 }670 }
692671
693 CODEGEN_DECL();672 CODEGEN_DECL();
@@ -702,7 +681,6 @@
702 : 681 :
703 function(sig, kind)682 function(sig, kind)
704 {683 {
705
706 }684 }
707685
708 CODEGEN_DECL();686 CODEGEN_DECL();
@@ -717,7 +695,7 @@
717 : 695 :
718 function(sig, kind)696 function(sig, kind)
719 {697 {
720theXQueryVersion = StaticContextConsts::xquery_version_3_0;698 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
721 }699 }
722700
723 CODEGEN_DECL();701 CODEGEN_DECL();
724702
=== modified file 'src/functions/pregenerated/func_context.h'
--- src/functions/pregenerated/func_context.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_context.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 bool accessesDynCtx() const { return true; }67 bool accessesDynCtx() const { return true; }
@@ -80,7 +78,6 @@
80 : 78 :
81 function(sig, kind)79 function(sig, kind)
82 {80 {
83
84 }81 }
8582
86 bool accessesDynCtx() const { return true; }83 bool accessesDynCtx() const { return true; }
@@ -97,7 +94,6 @@
97 : 94 :
98 function(sig, kind)95 function(sig, kind)
99 {96 {
100
101 }97 }
10298
103 bool accessesDynCtx() const { return true; }99 bool accessesDynCtx() const { return true; }
@@ -114,7 +110,6 @@
114 : 110 :
115 function(sig, kind)111 function(sig, kind)
116 {112 {
117
118 }113 }
119114
120 bool accessesDynCtx() const { return true; }115 bool accessesDynCtx() const { return true; }
@@ -131,7 +126,6 @@
131 : 126 :
132 function(sig, kind)127 function(sig, kind)
133 {128 {
134
135 }129 }
136130
137 CODEGEN_DECL();131 CODEGEN_DECL();
@@ -146,7 +140,6 @@
146 : 140 :
147 function(sig, kind)141 function(sig, kind)
148 {142 {
149
150 }143 }
151144
152 CODEGEN_DECL();145 CODEGEN_DECL();
@@ -161,7 +154,6 @@
161 : 154 :
162 function(sig, kind)155 function(sig, kind)
163 {156 {
164
165 }157 }
166158
167 CODEGEN_DECL();159 CODEGEN_DECL();
168160
=== modified file 'src/functions/pregenerated/func_datetime.h'
--- src/functions/pregenerated/func_datetime.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_datetime.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 CODEGEN_DECL();107 CODEGEN_DECL();
@@ -121,7 +116,6 @@
121 : 116 :
122 function(sig, kind)117 function(sig, kind)
123 {118 {
124
125 }119 }
126120
127 CODEGEN_DECL();121 CODEGEN_DECL();
@@ -136,7 +130,6 @@
136 : 130 :
137 function(sig, kind)131 function(sig, kind)
138 {132 {
139
140 }133 }
141134
142 CODEGEN_DECL();135 CODEGEN_DECL();
@@ -151,7 +144,6 @@
151 : 144 :
152 function(sig, kind)145 function(sig, kind)
153 {146 {
154
155 }147 }
156148
157 CODEGEN_DECL();149 CODEGEN_DECL();
@@ -166,7 +158,6 @@
166 : 158 :
167 function(sig, kind)159 function(sig, kind)
168 {160 {
169
170 }161 }
171162
172 CODEGEN_DECL();163 CODEGEN_DECL();
173164
=== modified file 'src/functions/pregenerated/func_documents.h'
--- src/functions/pregenerated/func_documents.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_documents.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return UPDATING_EXPR; }51 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -67,7 +66,6 @@
67 : 66 :
68 function(sig, kind)67 function(sig, kind)
69 {68 {
70
71 }69 }
7270
73 unsigned short getScriptingKind() const { return UPDATING_EXPR; }71 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -86,7 +84,6 @@
86 : 84 :
87 function(sig, kind)85 function(sig, kind)
88 {86 {
89
90 }87 }
9188
92 bool accessesDynCtx() const { return true; }89 bool accessesDynCtx() const { return true; }
@@ -103,7 +100,6 @@
103 : 100 :
104 function(sig, kind)101 function(sig, kind)
105 {102 {
106
107 }103 }
108104
109 bool accessesDynCtx() const { return true; }105 bool accessesDynCtx() const { return true; }
@@ -120,7 +116,6 @@
120 : 116 :
121 function(sig, kind)117 function(sig, kind)
122 {118 {
123
124 }119 }
125120
126 bool accessesDynCtx() const { return true; }121 bool accessesDynCtx() const { return true; }
127122
=== modified file 'src/functions/pregenerated/func_durations_dates_times.h'
--- src/functions/pregenerated/func_durations_dates_times.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_durations_dates_times.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 CODEGEN_DECL();107 CODEGEN_DECL();
@@ -121,7 +116,6 @@
121 : 116 :
122 function(sig, kind)117 function(sig, kind)
123 {118 {
124
125 }119 }
126120
127 CODEGEN_DECL();121 CODEGEN_DECL();
@@ -136,7 +130,6 @@
136 : 130 :
137 function(sig, kind)131 function(sig, kind)
138 {132 {
139
140 }133 }
141134
142 CODEGEN_DECL();135 CODEGEN_DECL();
@@ -151,7 +144,6 @@
151 : 144 :
152 function(sig, kind)145 function(sig, kind)
153 {146 {
154
155 }147 }
156148
157 CODEGEN_DECL();149 CODEGEN_DECL();
@@ -166,7 +158,6 @@
166 : 158 :
167 function(sig, kind)159 function(sig, kind)
168 {160 {
169
170 }161 }
171162
172 CODEGEN_DECL();163 CODEGEN_DECL();
@@ -181,7 +172,6 @@
181 : 172 :
182 function(sig, kind)173 function(sig, kind)
183 {174 {
184
185 }175 }
186176
187 CODEGEN_DECL();177 CODEGEN_DECL();
@@ -196,7 +186,6 @@
196 : 186 :
197 function(sig, kind)187 function(sig, kind)
198 {188 {
199
200 }189 }
201190
202 CODEGEN_DECL();191 CODEGEN_DECL();
@@ -211,7 +200,6 @@
211 : 200 :
212 function(sig, kind)201 function(sig, kind)
213 {202 {
214
215 }203 }
216204
217 CODEGEN_DECL();205 CODEGEN_DECL();
@@ -226,7 +214,6 @@
226 : 214 :
227 function(sig, kind)215 function(sig, kind)
228 {216 {
229
230 }217 }
231218
232 CODEGEN_DECL();219 CODEGEN_DECL();
@@ -241,7 +228,6 @@
241 : 228 :
242 function(sig, kind)229 function(sig, kind)
243 {230 {
244
245 }231 }
246232
247 CODEGEN_DECL();233 CODEGEN_DECL();
@@ -256,7 +242,6 @@
256 : 242 :
257 function(sig, kind)243 function(sig, kind)
258 {244 {
259
260 }245 }
261246
262 CODEGEN_DECL();247 CODEGEN_DECL();
@@ -271,7 +256,6 @@
271 : 256 :
272 function(sig, kind)257 function(sig, kind)
273 {258 {
274
275 }259 }
276260
277 CODEGEN_DECL();261 CODEGEN_DECL();
@@ -286,7 +270,6 @@
286 : 270 :
287 function(sig, kind)271 function(sig, kind)
288 {272 {
289
290 }273 }
291274
292 CODEGEN_DECL();275 CODEGEN_DECL();
@@ -301,7 +284,6 @@
301 : 284 :
302 function(sig, kind)285 function(sig, kind)
303 {286 {
304
305 }287 }
306288
307 CODEGEN_DECL();289 CODEGEN_DECL();
@@ -316,7 +298,6 @@
316 : 298 :
317 function(sig, kind)299 function(sig, kind)
318 {300 {
319
320 }301 }
321302
322 CODEGEN_DECL();303 CODEGEN_DECL();
@@ -331,7 +312,6 @@
331 : 312 :
332 function(sig, kind)313 function(sig, kind)
333 {314 {
334
335 }315 }
336316
337 CODEGEN_DECL();317 CODEGEN_DECL();
@@ -346,7 +326,6 @@
346 : 326 :
347 function(sig, kind)327 function(sig, kind)
348 {328 {
349
350 }329 }
351330
352 CODEGEN_DECL();331 CODEGEN_DECL();
353332
=== modified file 'src/functions/pregenerated/func_errors_and_diagnostics.h'
--- src/functions/pregenerated/func_errors_and_diagnostics.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_errors_and_diagnostics.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return VACUOUS_EXPR; }51 unsigned short getScriptingKind() const { return VACUOUS_EXPR; }
@@ -65,7 +64,6 @@
65 : 64 :
66 function(sig, kind)65 function(sig, kind)
67 {66 {
68
69 }67 }
7068
71 bool isMap(csize producer) const { return producer == 0; }69 bool isMap(csize producer) const { return producer == 0; }
7270
=== modified file 'src/functions/pregenerated/func_fetch.h'
--- src/functions/pregenerated/func_fetch.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_fetch.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 bool accessesDynCtx() const { return true; }67 bool accessesDynCtx() const { return true; }
@@ -80,7 +78,6 @@
80 : 78 :
81 function(sig, kind)79 function(sig, kind)
82 {80 {
83
84 }81 }
8582
86 bool accessesDynCtx() const { return true; }83 bool accessesDynCtx() const { return true; }
8784
=== modified file 'src/functions/pregenerated/func_fn_hof_functions.h'
--- src/functions/pregenerated/func_fn_hof_functions.h 2013-06-04 21:47:40 +0000
+++ src/functions/pregenerated/func_fn_hof_functions.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,7 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49theXQueryVersion = StaticContextConsts::xquery_version_3_0;49 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
50 }50 }
5151
52 CODEGEN_DECL();52 CODEGEN_DECL();
@@ -61,7 +61,7 @@
61 : 61 :
62 function(sig, kind)62 function(sig, kind)
63 {63 {
64theXQueryVersion = StaticContextConsts::xquery_version_3_0;64 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
65 }65 }
6666
67 CODEGEN_DECL();67 CODEGEN_DECL();
@@ -76,7 +76,7 @@
76 : 76 :
77 function(sig, kind)77 function(sig, kind)
78 {78 {
79theXQueryVersion = StaticContextConsts::xquery_version_3_0;79 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
80 }80 }
8181
82 CODEGEN_DECL();82 CODEGEN_DECL();
@@ -91,7 +91,7 @@
91 : 91 :
92 function(sig, kind)92 function(sig, kind)
93 {93 {
94theXQueryVersion = StaticContextConsts::xquery_version_3_0;94 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
95 }95 }
9696
97 CODEGEN_DECL();97 CODEGEN_DECL();
@@ -106,7 +106,7 @@
106 : 106 :
107 function(sig, kind)107 function(sig, kind)
108 {108 {
109theXQueryVersion = StaticContextConsts::xquery_version_3_0;109 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
110 }110 }
111111
112 CODEGEN_DECL();112 CODEGEN_DECL();
@@ -121,7 +121,7 @@
121 : 121 :
122 function(sig, kind)122 function(sig, kind)
123 {123 {
124theXQueryVersion = StaticContextConsts::xquery_version_3_0;124 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
125 }125 }
126126
127 CODEGEN_DECL();127 CODEGEN_DECL();
@@ -136,7 +136,7 @@
136 : 136 :
137 function(sig, kind)137 function(sig, kind)
138 {138 {
139theXQueryVersion = StaticContextConsts::xquery_version_3_0;139 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
140 }140 }
141141
142 CODEGEN_DECL();142 CODEGEN_DECL();
143143
=== modified file 'src/functions/pregenerated/func_fnput.h'
--- src/functions/pregenerated/func_fnput.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_fnput.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return UPDATING_EXPR; }51 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
5352
=== modified file 'src/functions/pregenerated/func_ft_module.h'
--- src/functions/pregenerated/func_ft_module.h 2013-06-26 00:10:23 +0000
+++ src/functions/pregenerated/func_ft_module.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -62,7 +61,6 @@
62 : 61 :
63 function(sig, kind)62 function(sig, kind)
64 {63 {
65
66 }64 }
6765
68 CODEGEN_DECL();66 CODEGEN_DECL();
@@ -78,7 +76,6 @@
78 : 76 :
79 function(sig, kind)77 function(sig, kind)
80 {78 {
81
82 }79 }
8380
84 CODEGEN_DECL();81 CODEGEN_DECL();
@@ -94,7 +91,6 @@
94 : 91 :
95 function(sig, kind)92 function(sig, kind)
96 {93 {
97
98 }94 }
9995
100 CODEGEN_DECL();96 CODEGEN_DECL();
@@ -110,7 +106,6 @@
110 : 106 :
111 function(sig, kind)107 function(sig, kind)
112 {108 {
113
114 }109 }
115110
116 CODEGEN_DECL();111 CODEGEN_DECL();
@@ -126,7 +121,6 @@
126 : 121 :
127 function(sig, kind)122 function(sig, kind)
128 {123 {
129
130 }124 }
131125
132 CODEGEN_DECL();126 CODEGEN_DECL();
@@ -142,7 +136,6 @@
142 : 136 :
143 function(sig, kind)137 function(sig, kind)
144 {138 {
145
146 }139 }
147140
148 CODEGEN_DECL();141 CODEGEN_DECL();
@@ -158,7 +151,6 @@
158 : 151 :
159 function(sig, kind)152 function(sig, kind)
160 {153 {
161
162 }154 }
163155
164 CODEGEN_DECL();156 CODEGEN_DECL();
@@ -174,7 +166,6 @@
174 : 166 :
175 function(sig, kind)167 function(sig, kind)
176 {168 {
177
178 }169 }
179170
180 CODEGEN_DECL();171 CODEGEN_DECL();
@@ -190,7 +181,6 @@
190 : 181 :
191 function(sig, kind)182 function(sig, kind)
192 {183 {
193
194 }184 }
195185
196 CODEGEN_DECL();186 CODEGEN_DECL();
@@ -206,7 +196,6 @@
206 : 196 :
207 function(sig, kind)197 function(sig, kind)
208 {198 {
209
210 }199 }
211200
212 CODEGEN_DECL();201 CODEGEN_DECL();
@@ -222,7 +211,6 @@
222 : 211 :
223 function(sig, kind)212 function(sig, kind)
224 {213 {
225
226 }214 }
227215
228 CODEGEN_DECL();216 CODEGEN_DECL();
@@ -238,7 +226,6 @@
238 : 226 :
239 function(sig, kind)227 function(sig, kind)
240 {228 {
241
242 }229 }
243230
244 CODEGEN_DECL();231 CODEGEN_DECL();
@@ -254,7 +241,6 @@
254 : 241 :
255 function(sig, kind)242 function(sig, kind)
256 {243 {
257
258 }244 }
259245
260 CODEGEN_DECL();246 CODEGEN_DECL();
@@ -270,7 +256,6 @@
270 : 256 :
271 function(sig, kind)257 function(sig, kind)
272 {258 {
273
274 }259 }
275260
276 CODEGEN_DECL();261 CODEGEN_DECL();
277262
=== modified file 'src/functions/pregenerated/func_ic_ddl.h'
--- src/functions/pregenerated/func_ic_ddl.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_ic_ddl.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return UPDATING_EXPR; }51 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -65,7 +64,6 @@
65 : 64 :
66 function(sig, kind)65 function(sig, kind)
67 {66 {
68
69 }67 }
7068
71 unsigned short getScriptingKind() const { return UPDATING_EXPR; }69 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -84,7 +82,6 @@
84 : 82 :
85 function(sig, kind)83 function(sig, kind)
86 {84 {
87
88 }85 }
8986
90 bool accessesDynCtx() const { return true; }87 bool accessesDynCtx() const { return true; }
9188
=== modified file 'src/functions/pregenerated/func_index_func.h'
--- src/functions/pregenerated/func_index_func.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_index_func.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
5352
=== modified file 'src/functions/pregenerated/func_item.h'
--- src/functions/pregenerated/func_item.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_item.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
5352
=== modified file 'src/functions/pregenerated/func_json.h'
--- src/functions/pregenerated/func_json.h 2013-07-11 00:46:02 +0000
+++ src/functions/pregenerated/func_json.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
6866
=== modified file 'src/functions/pregenerated/func_jsoniq_functions.h'
--- src/functions/pregenerated/func_jsoniq_functions.h 2013-06-08 05:33:57 +0000
+++ src/functions/pregenerated/func_jsoniq_functions.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }51 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }
@@ -65,7 +64,7 @@
65 : 64 :
66 function(sig, kind)65 function(sig, kind)
67 {66 {
6867 addAnnotation(AnnotationInternal::zann_explores_json);
69 }68 }
7069
71 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }70 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }
@@ -84,7 +83,6 @@
84 : 83 :
85 function(sig, kind)84 function(sig, kind)
86 {85 {
87
88 }86 }
8987
90 bool accessesDynCtx() const { return true; }88 bool accessesDynCtx() const { return true; }
@@ -103,7 +101,6 @@
103 : 101 :
104 function(sig, kind)102 function(sig, kind)
105 {103 {
106
107 }104 }
108105
109 bool accessesDynCtx() const { return true; }106 bool accessesDynCtx() const { return true; }
@@ -122,7 +119,6 @@
122 : 119 :
123 function(sig, kind)120 function(sig, kind)
124 {121 {
125
126 }122 }
127123
128 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }124 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -141,7 +137,7 @@
141 : 137 :
142 function(sig, kind)138 function(sig, kind)
143 {139 {
144140 addAnnotation(AnnotationInternal::zann_explores_json);
145 }141 }
146142
147 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }143 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }
@@ -162,7 +158,6 @@
162 : 158 :
163 function(sig, kind)159 function(sig, kind)
164 {160 {
165
166 }161 }
167162
168 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }163 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }
@@ -181,7 +176,6 @@
181 : 176 :
182 function(sig, kind)177 function(sig, kind)
183 {178 {
184
185 }179 }
186180
187 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }181 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -200,7 +194,7 @@
200 : 194 :
201 function(sig, kind)195 function(sig, kind)
202 {196 {
203197 addAnnotation(AnnotationInternal::zann_explores_json);
204 }198 }
205199
206 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }200 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -219,7 +213,6 @@
219 : 213 :
220 function(sig, kind)214 function(sig, kind)
221 {215 {
222
223 }216 }
224217
225 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }218 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -238,7 +231,6 @@
238 : 231 :
239 function(sig, kind)232 function(sig, kind)
240 {233 {
241
242 }234 }
243235
244 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }236 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -259,7 +251,6 @@
259 : 251 :
260 function(sig, kind)252 function(sig, kind)
261 {253 {
262
263 }254 }
264255
265 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }256 bool propagatesInputNodes(expr* fo, csize producer) const { return producer == 0; }
@@ -278,7 +269,7 @@
278 : 269 :
279 function(sig, kind)270 function(sig, kind)
280 {271 {
281272 addAnnotation(AnnotationInternal::zann_explores_json);
282 }273 }
283274
284 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }275 bool propagatesInputNodes(expr* fo, csize producer) const { return false; }
@@ -297,7 +288,6 @@
297 : 288 :
298 function(sig, kind)289 function(sig, kind)
299 {290 {
300
301 }291 }
302292
303 bool propagatesInputNodes(expr* fo, csize producer) const { return true; }293 bool propagatesInputNodes(expr* fo, csize producer) const { return true; }
@@ -316,7 +306,6 @@
316 : 306 :
317 function(sig, kind)307 function(sig, kind)
318 {308 {
319
320 }309 }
321310
322 CODEGEN_DECL();311 CODEGEN_DECL();
@@ -331,7 +320,6 @@
331 : 320 :
332 function(sig, kind)321 function(sig, kind)
333 {322 {
334
335 }323 }
336324
337 CODEGEN_DECL();325 CODEGEN_DECL();
@@ -346,7 +334,6 @@
346 : 334 :
347 function(sig, kind)335 function(sig, kind)
348 {336 {
349
350 }337 }
351338
352 unsigned short getScriptingKind() const { return UPDATING_EXPR; }339 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -367,7 +354,6 @@
367 : 354 :
368 function(sig, kind)355 function(sig, kind)
369 {356 {
370
371 }357 }
372358
373 unsigned short getScriptingKind() const { return UPDATING_EXPR; }359 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -388,7 +374,6 @@
388 : 374 :
389 function(sig, kind)375 function(sig, kind)
390 {376 {
391
392 }377 }
393378
394 unsigned short getScriptingKind() const { return UPDATING_EXPR; }379 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -407,7 +392,6 @@
407 : 392 :
408 function(sig, kind)393 function(sig, kind)
409 {394 {
410
411 }395 }
412396
413 unsigned short getScriptingKind() const { return UPDATING_EXPR; }397 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -428,7 +412,6 @@
428 : 412 :
429 function(sig, kind)413 function(sig, kind)
430 {414 {
431
432 }415 }
433416
434 unsigned short getScriptingKind() const { return UPDATING_EXPR; }417 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -447,7 +430,6 @@
447 : 430 :
448 function(sig, kind)431 function(sig, kind)
449 {432 {
450
451 }433 }
452434
453 unsigned short getScriptingKind() const { return UPDATING_EXPR; }435 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -468,7 +450,6 @@
468 : 450 :
469 function(sig, kind)451 function(sig, kind)
470 {452 {
471
472 }453 }
473454
474 xqtref_t getReturnType(const fo_expr* caller) const;455 xqtref_t getReturnType(const fo_expr* caller) const;
475456
=== modified file 'src/functions/pregenerated/func_maps.h'
--- src/functions/pregenerated/func_maps.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_maps.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }51 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -65,7 +64,6 @@
65 : 64 :
66 function(sig, kind)65 function(sig, kind)
67 {66 {
68
69 }67 }
7068
71 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }69 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -84,7 +82,6 @@
84 : 82 :
85 function(sig, kind)83 function(sig, kind)
86 {84 {
87
88 }85 }
8986
90 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }87 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -103,7 +100,6 @@
103 : 100 :
104 function(sig, kind)101 function(sig, kind)
105 {102 {
106
107 }103 }
108104
109 bool accessesDynCtx() const { return true; }105 bool accessesDynCtx() const { return true; }
@@ -120,7 +116,6 @@
120 : 116 :
121 function(sig, kind)117 function(sig, kind)
122 {118 {
123
124 }119 }
125120
126 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }121 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -141,7 +136,6 @@
141 : 136 :
142 function(sig, kind)137 function(sig, kind)
143 {138 {
144
145 }139 }
146140
147 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }141 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -160,7 +154,6 @@
160 : 154 :
161 function(sig, kind)155 function(sig, kind)
162 {156 {
163
164 }157 }
165158
166 bool accessesDynCtx() const { return true; }159 bool accessesDynCtx() const { return true; }
@@ -177,7 +170,6 @@
177 : 170 :
178 function(sig, kind)171 function(sig, kind)
179 {172 {
180
181 }173 }
182174
183 bool accessesDynCtx() const { return true; }175 bool accessesDynCtx() const { return true; }
@@ -194,7 +186,6 @@
194 : 186 :
195 function(sig, kind)187 function(sig, kind)
196 {188 {
197
198 }189 }
199190
200 bool accessesDynCtx() const { return true; }191 bool accessesDynCtx() const { return true; }
@@ -211,7 +202,6 @@
211 : 202 :
212 function(sig, kind)203 function(sig, kind)
213 {204 {
214
215 }205 }
216206
217 bool accessesDynCtx() const { return true; }207 bool accessesDynCtx() const { return true; }
218208
=== modified file 'src/functions/pregenerated/func_maths.h'
--- src/functions/pregenerated/func_maths.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_maths.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 CODEGEN_DECL();107 CODEGEN_DECL();
@@ -121,7 +116,6 @@
121 : 116 :
122 function(sig, kind)117 function(sig, kind)
123 {118 {
124
125 }119 }
126120
127 CODEGEN_DECL();121 CODEGEN_DECL();
@@ -136,7 +130,6 @@
136 : 130 :
137 function(sig, kind)131 function(sig, kind)
138 {132 {
139
140 }133 }
141134
142 CODEGEN_DECL();135 CODEGEN_DECL();
@@ -151,7 +144,6 @@
151 : 144 :
152 function(sig, kind)145 function(sig, kind)
153 {146 {
154
155 }147 }
156148
157 CODEGEN_DECL();149 CODEGEN_DECL();
@@ -166,7 +158,6 @@
166 : 158 :
167 function(sig, kind)159 function(sig, kind)
168 {160 {
169
170 }161 }
171162
172 CODEGEN_DECL();163 CODEGEN_DECL();
@@ -181,7 +172,6 @@
181 : 172 :
182 function(sig, kind)173 function(sig, kind)
183 {174 {
184
185 }175 }
186176
187 CODEGEN_DECL();177 CODEGEN_DECL();
@@ -196,7 +186,6 @@
196 : 186 :
197 function(sig, kind)187 function(sig, kind)
198 {188 {
199
200 }189 }
201190
202 CODEGEN_DECL();191 CODEGEN_DECL();
@@ -211,7 +200,6 @@
211 : 200 :
212 function(sig, kind)201 function(sig, kind)
213 {202 {
214
215 }203 }
216204
217 CODEGEN_DECL();205 CODEGEN_DECL();
@@ -226,7 +214,6 @@
226 : 214 :
227 function(sig, kind)215 function(sig, kind)
228 {216 {
229
230 }217 }
231218
232 CODEGEN_DECL();219 CODEGEN_DECL();
@@ -241,7 +228,6 @@
241 : 228 :
242 function(sig, kind)229 function(sig, kind)
243 {230 {
244
245 }231 }
246232
247 CODEGEN_DECL();233 CODEGEN_DECL();
@@ -256,7 +242,6 @@
256 : 242 :
257 function(sig, kind)243 function(sig, kind)
258 {244 {
259
260 }245 }
261246
262 CODEGEN_DECL();247 CODEGEN_DECL();
@@ -271,7 +256,6 @@
271 : 256 :
272 function(sig, kind)257 function(sig, kind)
273 {258 {
274
275 }259 }
276260
277 CODEGEN_DECL();261 CODEGEN_DECL();
@@ -286,7 +270,6 @@
286 : 270 :
287 function(sig, kind)271 function(sig, kind)
288 {272 {
289
290 }273 }
291274
292 CODEGEN_DECL();275 CODEGEN_DECL();
@@ -301,7 +284,6 @@
301 : 284 :
302 function(sig, kind)285 function(sig, kind)
303 {286 {
304
305 }287 }
306288
307 CODEGEN_DECL();289 CODEGEN_DECL();
@@ -316,7 +298,6 @@
316 : 298 :
317 function(sig, kind)299 function(sig, kind)
318 {300 {
319
320 }301 }
321302
322 CODEGEN_DECL();303 CODEGEN_DECL();
@@ -331,7 +312,6 @@
331 : 312 :
332 function(sig, kind)313 function(sig, kind)
333 {314 {
334
335 }315 }
336316
337 CODEGEN_DECL();317 CODEGEN_DECL();
@@ -346,7 +326,6 @@
346 : 326 :
347 function(sig, kind)327 function(sig, kind)
348 {328 {
349
350 }329 }
351330
352 CODEGEN_DECL();331 CODEGEN_DECL();
@@ -361,7 +340,6 @@
361 : 340 :
362 function(sig, kind)341 function(sig, kind)
363 {342 {
364
365 }343 }
366344
367 CODEGEN_DECL();345 CODEGEN_DECL();
@@ -376,7 +354,6 @@
376 : 354 :
377 function(sig, kind)355 function(sig, kind)
378 {356 {
379
380 }357 }
381358
382 CODEGEN_DECL();359 CODEGEN_DECL();
@@ -391,7 +368,6 @@
391 : 368 :
392 function(sig, kind)369 function(sig, kind)
393 {370 {
394
395 }371 }
396372
397 CODEGEN_DECL();373 CODEGEN_DECL();
@@ -406,7 +382,6 @@
406 : 382 :
407 function(sig, kind)383 function(sig, kind)
408 {384 {
409
410 }385 }
411386
412 CODEGEN_DECL();387 CODEGEN_DECL();
@@ -421,7 +396,6 @@
421 : 396 :
422 function(sig, kind)397 function(sig, kind)
423 {398 {
424
425 }399 }
426400
427 CODEGEN_DECL();401 CODEGEN_DECL();
428402
=== modified file 'src/functions/pregenerated/func_node_position.h'
--- src/functions/pregenerated/func_node_position.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_node_position.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 CODEGEN_DECL();107 CODEGEN_DECL();
@@ -121,7 +116,6 @@
121 : 116 :
122 function(sig, kind)117 function(sig, kind)
123 {118 {
124
125 }119 }
126120
127 CODEGEN_DECL();121 CODEGEN_DECL();
@@ -136,7 +130,6 @@
136 : 130 :
137 function(sig, kind)131 function(sig, kind)
138 {132 {
139
140 }133 }
141134
142 CODEGEN_DECL();135 CODEGEN_DECL();
@@ -151,7 +144,6 @@
151 : 144 :
152 function(sig, kind)145 function(sig, kind)
153 {146 {
154
155 }147 }
156148
157 CODEGEN_DECL();149 CODEGEN_DECL();
@@ -166,7 +158,6 @@
166 : 158 :
167 function(sig, kind)159 function(sig, kind)
168 {160 {
169
170 }161 }
171162
172 CODEGEN_DECL();163 CODEGEN_DECL();
@@ -181,7 +172,6 @@
181 : 172 :
182 function(sig, kind)173 function(sig, kind)
183 {174 {
184
185 }175 }
186176
187 CODEGEN_DECL();177 CODEGEN_DECL();
@@ -196,7 +186,6 @@
196 : 186 :
197 function(sig, kind)187 function(sig, kind)
198 {188 {
199
200 }189 }
201190
202 CODEGEN_DECL();191 CODEGEN_DECL();
@@ -211,7 +200,6 @@
211 : 200 :
212 function(sig, kind)201 function(sig, kind)
213 {202 {
214
215 }203 }
216204
217 CODEGEN_DECL();205 CODEGEN_DECL();
@@ -226,7 +214,6 @@
226 : 214 :
227 function(sig, kind)215 function(sig, kind)
228 {216 {
229
230 }217 }
231218
232 CODEGEN_DECL();219 CODEGEN_DECL();
@@ -241,7 +228,6 @@
241 : 228 :
242 function(sig, kind)229 function(sig, kind)
243 {230 {
244
245 }231 }
246232
247 CODEGEN_DECL();233 CODEGEN_DECL();
@@ -256,7 +242,6 @@
256 : 242 :
257 function(sig, kind)243 function(sig, kind)
258 {244 {
259
260 }245 }
261246
262 CODEGEN_DECL();247 CODEGEN_DECL();
@@ -271,7 +256,6 @@
271 : 256 :
272 function(sig, kind)257 function(sig, kind)
273 {258 {
274
275 }259 }
276260
277 CODEGEN_DECL();261 CODEGEN_DECL();
@@ -286,7 +270,6 @@
286 : 270 :
287 function(sig, kind)271 function(sig, kind)
288 {272 {
289
290 }273 }
291274
292 CODEGEN_DECL();275 CODEGEN_DECL();
@@ -301,7 +284,6 @@
301 : 284 :
302 function(sig, kind)285 function(sig, kind)
303 {286 {
304
305 }287 }
306288
307 CODEGEN_DECL();289 CODEGEN_DECL();
@@ -316,7 +298,6 @@
316 : 298 :
317 function(sig, kind)299 function(sig, kind)
318 {300 {
319
320 }301 }
321302
322 CODEGEN_DECL();303 CODEGEN_DECL();
@@ -331,7 +312,6 @@
331 : 312 :
332 function(sig, kind)313 function(sig, kind)
333 {314 {
334
335 }315 }
336316
337 CODEGEN_DECL();317 CODEGEN_DECL();
@@ -346,7 +326,6 @@
346 : 326 :
347 function(sig, kind)327 function(sig, kind)
348 {328 {
349
350 }329 }
351330
352 CODEGEN_DECL();331 CODEGEN_DECL();
@@ -361,7 +340,6 @@
361 : 340 :
362 function(sig, kind)341 function(sig, kind)
363 {342 {
364
365 }343 }
366344
367 CODEGEN_DECL();345 CODEGEN_DECL();
@@ -376,7 +354,6 @@
376 : 354 :
377 function(sig, kind)355 function(sig, kind)
378 {356 {
379
380 }357 }
381358
382 CODEGEN_DECL();359 CODEGEN_DECL();
@@ -391,7 +368,6 @@
391 : 368 :
392 function(sig, kind)369 function(sig, kind)
393 {370 {
394
395 }371 }
396372
397 CODEGEN_DECL();373 CODEGEN_DECL();
398374
=== modified file 'src/functions/pregenerated/func_nodes.h'
--- src/functions/pregenerated/func_nodes.h 2013-07-24 08:12:12 +0000
+++ src/functions/pregenerated/func_nodes.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }51 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }67 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -80,7 +78,6 @@
80 : 78 :
81 function(sig, kind)79 function(sig, kind)
82 {80 {
83
84 }81 }
8582
86 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }83 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -97,7 +94,6 @@
97 : 94 :
98 function(sig, kind)95 function(sig, kind)
99 {96 {
100
101 }97 }
10298
103 CODEGEN_DECL();99 CODEGEN_DECL();
@@ -112,7 +108,7 @@
112 : 108 :
113 function(sig, kind)109 function(sig, kind)
114 {110 {
115theXQueryVersion = StaticContextConsts::xquery_version_3_0;111 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
116 }112 }
117113
118 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }114 bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
@@ -129,7 +125,7 @@
129 : 125 :
130 function(sig, kind)126 function(sig, kind)
131 {127 {
132theXQueryVersion = StaticContextConsts::xquery_version_3_0;128 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
133 }129 }
134130
135 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }131 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -146,7 +142,7 @@
146 : 142 :
147 function(sig, kind)143 function(sig, kind)
148 {144 {
149theXQueryVersion = StaticContextConsts::xquery_version_3_0;145 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
150 }146 }
151147
152 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }148 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -163,7 +159,7 @@
163 : 159 :
164 function(sig, kind)160 function(sig, kind)
165 {161 {
166theXQueryVersion = StaticContextConsts::xquery_version_3_0;162 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
167 }163 }
168164
169 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }165 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -180,7 +176,6 @@
180 : 176 :
181 function(sig, kind)177 function(sig, kind)
182 {178 {
183
184 }179 }
185180
186 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }181 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -197,7 +192,6 @@
197 : 192 :
198 function(sig, kind)193 function(sig, kind)
199 {194 {
200
201 }195 }
202196
203 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }197 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -214,7 +208,6 @@
214 : 208 :
215 function(sig, kind)209 function(sig, kind)
216 {210 {
217
218 }211 }
219212
220 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }213 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -231,7 +224,6 @@
231 : 224 :
232 function(sig, kind)225 function(sig, kind)
233 {226 {
234
235 }227 }
236228
237 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }229 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -248,7 +240,6 @@
248 : 240 :
249 function(sig, kind)241 function(sig, kind)
250 {242 {
251
252 }243 }
253244
254 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }245 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -265,7 +256,6 @@
265 : 256 :
266 function(sig, kind)257 function(sig, kind)
267 {258 {
268
269 }259 }
270260
271 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }261 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -282,7 +272,6 @@
282 : 272 :
283 function(sig, kind)273 function(sig, kind)
284 {274 {
285
286 }275 }
287276
288 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }277 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -299,7 +288,6 @@
299 : 288 :
300 function(sig, kind)289 function(sig, kind)
301 {290 {
302
303 }291 }
304292
305 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }293 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -316,7 +304,6 @@
316 : 304 :
317 function(sig, kind)305 function(sig, kind)
318 {306 {
319
320 }307 }
321308
322 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }309 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -333,7 +320,6 @@
333 : 320 :
334 function(sig, kind)321 function(sig, kind)
335 {322 {
336
337 }323 }
338324
339 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }325 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -350,7 +336,7 @@
350 : 336 :
351 function(sig, kind)337 function(sig, kind)
352 {338 {
353theXQueryVersion = StaticContextConsts::xquery_version_3_0;339 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
354 }340 }
355341
356 CODEGEN_DECL();342 CODEGEN_DECL();
@@ -365,7 +351,6 @@
365 : 351 :
366 function(sig, kind)352 function(sig, kind)
367 {353 {
368
369 }354 }
370355
371 bool mustCopyInputNodes(expr* fo, csize producer) const;356 bool mustCopyInputNodes(expr* fo, csize producer) const;
372357
=== modified file 'src/functions/pregenerated/func_numerics.h'
--- src/functions/pregenerated/func_numerics.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_numerics.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 xqtref_t getReturnType(const fo_expr* caller) const;79 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -93,7 +90,7 @@
93 : 90 :
94 function(sig, kind)91 function(sig, kind)
95 {92 {
96theXQueryVersion = StaticContextConsts::xquery_version_3_0;93 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
97 }94 }
9895
99 CODEGEN_DECL();96 CODEGEN_DECL();
@@ -107,7 +104,6 @@
107 : 104 :
108 function(sig, kind)105 function(sig, kind)
109 {106 {
110
111 }107 }
112108
113 CODEGEN_DECL();109 CODEGEN_DECL();
@@ -122,7 +118,6 @@
122 : 118 :
123 function(sig, kind)119 function(sig, kind)
124 {120 {
125
126 }121 }
127122
128 CODEGEN_DECL();123 CODEGEN_DECL();
@@ -137,7 +132,7 @@
137 : 132 :
138 function(sig, kind)133 function(sig, kind)
139 {134 {
140theXQueryVersion = StaticContextConsts::xquery_version_3_0;135 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
141 }136 }
142137
143 CODEGEN_DECL();138 CODEGEN_DECL();
@@ -152,7 +147,7 @@
152 : 147 :
153 function(sig, kind)148 function(sig, kind)
154 {149 {
155theXQueryVersion = StaticContextConsts::xquery_version_3_0;150 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
156 }151 }
157152
158 CODEGEN_DECL();153 CODEGEN_DECL();
159154
=== modified file 'src/functions/pregenerated/func_other_diagnostics.h'
--- src/functions/pregenerated/func_other_diagnostics.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_other_diagnostics.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 bool accessesDynCtx() const { return true; }67 bool accessesDynCtx() const { return true; }
7068
=== modified file 'src/functions/pregenerated/func_parse_fragment.h'
--- src/functions/pregenerated/func_parse_fragment.h 2013-03-06 07:39:18 +0000
+++ src/functions/pregenerated/func_parse_fragment.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool accessesDynCtx() const { return true; }51 bool accessesDynCtx() const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 CODEGEN_DECL();67 CODEGEN_DECL();
@@ -78,7 +76,7 @@
78 : 76 :
79 function(sig, kind)77 function(sig, kind)
80 {78 {
81theXQueryVersion = StaticContextConsts::xquery_version_3_0;79 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
82 }80 }
8381
84 bool accessesDynCtx() const { return true; }82 bool accessesDynCtx() const { return true; }
8583
=== modified file 'src/functions/pregenerated/func_parsing_and_serializing.h'
--- src/functions/pregenerated/func_parsing_and_serializing.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_parsing_and_serializing.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,7 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49theXQueryVersion = StaticContextConsts::xquery_version_3_0;49 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
50 }50 }
5151
52 bool accessesDynCtx() const { return true; }52 bool accessesDynCtx() const { return true; }
@@ -65,7 +65,8 @@
65 : 65 :
66 function(sig, kind)66 function(sig, kind)
67 {67 {
68theXQueryVersion = StaticContextConsts::xquery_version_3_0;68 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
69 addAnnotation(AnnotationInternal::zann_explores_json);
69 }70 }
7071
71 bool accessesDynCtx() const { return true; }72 bool accessesDynCtx() const { return true; }
7273
=== modified file 'src/functions/pregenerated/func_qnames.h'
--- src/functions/pregenerated/func_qnames.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_qnames.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }51 bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 CODEGEN_DECL();67 CODEGEN_DECL();
@@ -78,7 +76,6 @@
78 : 76 :
79 function(sig, kind)77 function(sig, kind)
80 {78 {
81
82 }79 }
8380
84 CODEGEN_DECL();81 CODEGEN_DECL();
@@ -93,7 +90,6 @@
93 : 90 :
94 function(sig, kind)91 function(sig, kind)
95 {92 {
96
97 }93 }
9894
99 CODEGEN_DECL();95 CODEGEN_DECL();
@@ -108,7 +104,6 @@
108 : 104 :
109 function(sig, kind)105 function(sig, kind)
110 {106 {
111
112 }107 }
113108
114 CODEGEN_DECL();109 CODEGEN_DECL();
@@ -123,7 +118,6 @@
123 : 118 :
124 function(sig, kind)119 function(sig, kind)
125 {120 {
126
127 }121 }
128122
129 CODEGEN_DECL();123 CODEGEN_DECL();
@@ -138,7 +132,6 @@
138 : 132 :
139 function(sig, kind)133 function(sig, kind)
140 {134 {
141
142 }135 }
143136
144 bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }137 bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
@@ -155,7 +148,6 @@
155 : 148 :
156 function(sig, kind)149 function(sig, kind)
157 {150 {
158
159 }151 }
160152
161 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }153 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
162154
=== modified file 'src/functions/pregenerated/func_random.h'
--- src/functions/pregenerated/func_random.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_random.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -77,7 +75,6 @@
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79setDeterministic(false);77setDeterministic(false);
80
81 }78 }
8279
83 CODEGEN_DECL();80 CODEGEN_DECL();
8481
=== modified file 'src/functions/pregenerated/func_reference.h'
--- src/functions/pregenerated/func_reference.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_reference.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }51 bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
@@ -63,7 +62,6 @@
63 : 62 :
64 function(sig, kind)63 function(sig, kind)
65 {64 {
66
67 }65 }
6866
69 CODEGEN_DECL();67 CODEGEN_DECL();
@@ -78,7 +76,6 @@
78 : 76 :
79 function(sig, kind)77 function(sig, kind)
80 {78 {
81
82 }79 }
8380
84 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }81 unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
@@ -95,7 +92,6 @@
95 : 92 :
96 function(sig, kind)93 function(sig, kind)
97 {94 {
98
99 }95 }
10096
101 CODEGEN_DECL();97 CODEGEN_DECL();
10298
=== modified file 'src/functions/pregenerated/func_schema.h'
--- src/functions/pregenerated/func_schema.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_schema.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 unsigned short getScriptingKind() const { return UPDATING_EXPR; }51 unsigned short getScriptingKind() const { return UPDATING_EXPR; }
@@ -67,7 +66,6 @@
67 : 66 :
68 function(sig, kind)67 function(sig, kind)
69 {68 {
70
71 }69 }
7270
73 bool mustCopyInputNodes(expr* fo, csize producer) const;71 bool mustCopyInputNodes(expr* fo, csize producer) const;
@@ -84,7 +82,6 @@
84 : 82 :
85 function(sig, kind)83 function(sig, kind)
86 {84 {
87
88 }85 }
8986
90 bool mustCopyInputNodes(expr* fo, csize producer) const;87 bool mustCopyInputNodes(expr* fo, csize producer) const;
9188
=== modified file 'src/functions/pregenerated/func_sctx.h'
--- src/functions/pregenerated/func_sctx.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_sctx.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 CODEGEN_DECL();107 CODEGEN_DECL();
@@ -121,7 +116,6 @@
121 : 116 :
122 function(sig, kind)117 function(sig, kind)
123 {118 {
124
125 }119 }
126120
127 CODEGEN_DECL();121 CODEGEN_DECL();
@@ -136,7 +130,6 @@
136 : 130 :
137 function(sig, kind)131 function(sig, kind)
138 {132 {
139
140 }133 }
141134
142 CODEGEN_DECL();135 CODEGEN_DECL();
@@ -151,7 +144,6 @@
151 : 144 :
152 function(sig, kind)145 function(sig, kind)
153 {146 {
154
155 }147 }
156148
157 CODEGEN_DECL();149 CODEGEN_DECL();
@@ -166,7 +158,6 @@
166 : 158 :
167 function(sig, kind)159 function(sig, kind)
168 {160 {
169
170 }161 }
171162
172 CODEGEN_DECL();163 CODEGEN_DECL();
@@ -181,7 +172,6 @@
181 : 172 :
182 function(sig, kind)173 function(sig, kind)
183 {174 {
184
185 }175 }
186176
187 CODEGEN_DECL();177 CODEGEN_DECL();
@@ -196,7 +186,6 @@
196 : 186 :
197 function(sig, kind)187 function(sig, kind)
198 {188 {
199
200 }189 }
201190
202 CODEGEN_DECL();191 CODEGEN_DECL();
@@ -211,7 +200,6 @@
211 : 200 :
212 function(sig, kind)201 function(sig, kind)
213 {202 {
214
215 }203 }
216204
217 CODEGEN_DECL();205 CODEGEN_DECL();
@@ -226,7 +214,6 @@
226 : 214 :
227 function(sig, kind)215 function(sig, kind)
228 {216 {
229
230 }217 }
231218
232 CODEGEN_DECL();219 CODEGEN_DECL();
@@ -241,7 +228,6 @@
241 : 228 :
242 function(sig, kind)229 function(sig, kind)
243 {230 {
244
245 }231 }
246232
247 CODEGEN_DECL();233 CODEGEN_DECL();
@@ -256,7 +242,6 @@
256 : 242 :
257 function(sig, kind)243 function(sig, kind)
258 {244 {
259
260 }245 }
261246
262 CODEGEN_DECL();247 CODEGEN_DECL();
@@ -271,7 +256,6 @@
271 : 256 :
272 function(sig, kind)257 function(sig, kind)
273 {258 {
274
275 }259 }
276260
277 CODEGEN_DECL();261 CODEGEN_DECL();
@@ -286,7 +270,6 @@
286 : 270 :
287 function(sig, kind)271 function(sig, kind)
288 {272 {
289
290 }273 }
291274
292 CODEGEN_DECL();275 CODEGEN_DECL();
@@ -301,7 +284,6 @@
301 : 284 :
302 function(sig, kind)285 function(sig, kind)
303 {286 {
304
305 }287 }
306288
307 CODEGEN_DECL();289 CODEGEN_DECL();
@@ -316,7 +298,6 @@
316 : 298 :
317 function(sig, kind)299 function(sig, kind)
318 {300 {
319
320 }301 }
321302
322 CODEGEN_DECL();303 CODEGEN_DECL();
@@ -331,7 +312,6 @@
331 : 312 :
332 function(sig, kind)313 function(sig, kind)
333 {314 {
334
335 }315 }
336316
337 CODEGEN_DECL();317 CODEGEN_DECL();
@@ -346,7 +326,6 @@
346 : 326 :
347 function(sig, kind)327 function(sig, kind)
348 {328 {
349
350 }329 }
351330
352 CODEGEN_DECL();331 CODEGEN_DECL();
@@ -361,7 +340,6 @@
361 : 340 :
362 function(sig, kind)341 function(sig, kind)
363 {342 {
364
365 }343 }
366344
367 CODEGEN_DECL();345 CODEGEN_DECL();
@@ -376,7 +354,6 @@
376 : 354 :
377 function(sig, kind)355 function(sig, kind)
378 {356 {
379
380 }357 }
381358
382 CODEGEN_DECL();359 CODEGEN_DECL();
@@ -391,7 +368,6 @@
391 : 368 :
392 function(sig, kind)369 function(sig, kind)
393 {370 {
394
395 }371 }
396372
397 CODEGEN_DECL();373 CODEGEN_DECL();
@@ -406,7 +382,6 @@
406 : 382 :
407 function(sig, kind)383 function(sig, kind)
408 {384 {
409
410 }385 }
411386
412 CODEGEN_DECL();387 CODEGEN_DECL();
413388
=== modified file 'src/functions/pregenerated/func_sequences.h'
--- src/functions/pregenerated/func_sequences.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_sequences.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 xqtref_t getReturnType(const fo_expr* caller) const;51 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -69,7 +68,6 @@
69 : 68 :
70 function(sig, kind)69 function(sig, kind)
71 {70 {
72
73 }71 }
7472
75 CODEGEN_DECL();73 CODEGEN_DECL();
@@ -84,7 +82,6 @@
84 : 82 :
85 function(sig, kind)83 function(sig, kind)
86 {84 {
87
88 }85 }
8986
90 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;87 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -105,7 +102,6 @@
105 : 102 :
106 function(sig, kind)103 function(sig, kind)
107 {104 {
108
109 }105 }
110106
111 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;107 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -126,7 +122,6 @@
126 : 122 :
127 function(sig, kind)123 function(sig, kind)
128 {124 {
129
130 }125 }
131126
132 xqtref_t getReturnType(const fo_expr* caller) const;127 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -147,7 +142,6 @@
147 : 142 :
148 function(sig, kind)143 function(sig, kind)
149 {144 {
150
151 }145 }
152146
153 xqtref_t getReturnType(const fo_expr* caller) const;147 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -170,7 +164,6 @@
170 : 164 :
171 function(sig, kind)165 function(sig, kind)
172 {166 {
173
174 }167 }
175168
176 xqtref_t getReturnType(const fo_expr* caller) const;169 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -197,7 +190,6 @@
197 : 190 :
198 function(sig, kind)191 function(sig, kind)
199 {192 {
200
201 }193 }
202194
203 xqtref_t getReturnType(const fo_expr* caller) const;195 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -222,7 +214,6 @@
222 : 214 :
223 function(sig, kind)215 function(sig, kind)
224 {216 {
225
226 }217 }
227218
228 xqtref_t getReturnType(const fo_expr* caller) const;219 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -247,7 +238,6 @@
247 : 238 :
248 function(sig, kind)239 function(sig, kind)
249 {240 {
250
251 }241 }
252242
253 xqtref_t getReturnType(const fo_expr* caller) const;243 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -270,7 +260,6 @@
270 : 260 :
271 function(sig, kind)261 function(sig, kind)
272 {262 {
273
274 }263 }
275264
276 xqtref_t getReturnType(const fo_expr* caller) const;265 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -293,7 +282,6 @@
293 : 282 :
294 function(sig, kind)283 function(sig, kind)
295 {284 {
296
297 }285 }
298286
299 xqtref_t getReturnType(const fo_expr* caller) const;287 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -314,7 +302,6 @@
314 : 302 :
315 function(sig, kind)303 function(sig, kind)
316 {304 {
317
318 }305 }
319306
320 xqtref_t getReturnType(const fo_expr* caller) const;307 xqtref_t getReturnType(const fo_expr* caller) const;
@@ -343,7 +330,6 @@
343 : 330 :
344 function(sig, kind)331 function(sig, kind)
345 {332 {
346
347 }333 }
348334
349 bool accessesDynCtx() const { return true; }335 bool accessesDynCtx() const { return true; }
@@ -362,7 +348,6 @@
362 : 348 :
363 function(sig, kind)349 function(sig, kind)
364 {350 {
365
366 }351 }
367352
368 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;353 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -381,7 +366,6 @@
381 : 366 :
382 function(sig, kind)367 function(sig, kind)
383 {368 {
384
385 }369 }
386370
387 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;371 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -398,7 +382,6 @@
398 : 382 :
399 function(sig, kind)383 function(sig, kind)
400 {384 {
401
402 }385 }
403386
404 bool specializable() const { return true; }387 bool specializable() const { return true; }
@@ -420,7 +403,6 @@
420 : 403 :
421 function(sig, kind)404 function(sig, kind)
422 {405 {
423
424 }406 }
425407
426 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;408 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -437,7 +419,6 @@
437 : 419 :
438 function(sig, kind)420 function(sig, kind)
439 {421 {
440
441 }422 }
442423
443 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;424 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -454,7 +435,6 @@
454 : 435 :
455 function(sig, kind)436 function(sig, kind)
456 {437 {
457
458 }438 }
459439
460 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;440 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -471,7 +451,6 @@
471 : 451 :
472 function(sig, kind)452 function(sig, kind)
473 {453 {
474
475 }454 }
476455
477 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;456 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -488,7 +467,6 @@
488 : 467 :
489 function(sig, kind)468 function(sig, kind)
490 {469 {
491
492 }470 }
493471
494 CODEGEN_DECL();472 CODEGEN_DECL();
@@ -503,7 +481,6 @@
503 : 481 :
504 function(sig, kind)482 function(sig, kind)
505 {483 {
506
507 }484 }
508485
509 FunctionConsts::AnnotationValue producesDistinctNodes() const 486 FunctionConsts::AnnotationValue producesDistinctNodes() const
@@ -534,7 +511,6 @@
534 : 511 :
535 function(sig, kind)512 function(sig, kind)
536 {513 {
537
538 }514 }
539515
540 FunctionConsts::AnnotationValue producesDistinctNodes() const 516 FunctionConsts::AnnotationValue producesDistinctNodes() const
@@ -565,7 +541,6 @@
565 : 541 :
566 function(sig, kind)542 function(sig, kind)
567 {543 {
568
569 }544 }
570545
571 FunctionConsts::AnnotationValue producesDistinctNodes() const 546 FunctionConsts::AnnotationValue producesDistinctNodes() const
@@ -596,7 +571,6 @@
596 : 571 :
597 function(sig, kind)572 function(sig, kind)
598 {573 {
599
600 }574 }
601575
602 bool accessesDynCtx() const { return true; }576 bool accessesDynCtx() const { return true; }
@@ -615,7 +589,6 @@
615 : 589 :
616 function(sig, kind)590 function(sig, kind)
617 {591 {
618
619 }592 }
620593
621 CODEGEN_DECL();594 CODEGEN_DECL();
@@ -630,7 +603,7 @@
630 : 603 :
631 function(sig, kind)604 function(sig, kind)
632 {605 {
633theXQueryVersion = StaticContextConsts::xquery_version_3_0;606 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
634 }607 }
635608
636 CODEGEN_DECL();609 CODEGEN_DECL();
@@ -645,7 +618,7 @@
645 : 618 :
646 function(sig, kind)619 function(sig, kind)
647 {620 {
648theXQueryVersion = StaticContextConsts::xquery_version_3_0;621 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
649 }622 }
650623
651 CODEGEN_DECL();624 CODEGEN_DECL();
@@ -660,7 +633,7 @@
660 : 633 :
661 function(sig, kind)634 function(sig, kind)
662 {635 {
663theXQueryVersion = StaticContextConsts::xquery_version_3_0;636 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
664 }637 }
665638
666 CODEGEN_DECL();639 CODEGEN_DECL();
@@ -675,7 +648,7 @@
675 : 648 :
676 function(sig, kind)649 function(sig, kind)
677 {650 {
678theXQueryVersion = StaticContextConsts::xquery_version_3_0;651 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
679 }652 }
680653
681 CODEGEN_DECL();654 CODEGEN_DECL();
@@ -690,7 +663,7 @@
690 : 663 :
691 function(sig, kind)664 function(sig, kind)
692 {665 {
693theXQueryVersion = StaticContextConsts::xquery_version_3_0;666 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
694 }667 }
695668
696 CODEGEN_DECL();669 CODEGEN_DECL();
697670
=== modified file 'src/functions/pregenerated/func_strings.h'
--- src/functions/pregenerated/func_strings.h 2013-07-11 22:08:29 +0000
+++ src/functions/pregenerated/func_strings.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
@@ -91,7 +88,6 @@
91 : 88 :
92 function(sig, kind)89 function(sig, kind)
93 {90 {
94
95 }91 }
9692
97 CODEGEN_DECL();93 CODEGEN_DECL();
@@ -106,7 +102,6 @@
106 : 102 :
107 function(sig, kind)103 function(sig, kind)
108 {104 {
109
110 }105 }
111106
112 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;107 BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
@@ -125,7 +120,7 @@
125 : 120 :
126 function(sig, kind)121 function(sig, kind)
127 {122 {
128theXQueryVersion = StaticContextConsts::xquery_version_3_0;123 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
129 }124 }
130125
131 CODEGEN_DECL();126 CODEGEN_DECL();
@@ -139,7 +134,6 @@
139 : 134 :
140 function(sig, kind)135 function(sig, kind)
141 {136 {
142
143 }137 }
144138
145 CODEGEN_DECL();139 CODEGEN_DECL();
@@ -154,7 +148,6 @@
154 : 148 :
155 function(sig, kind)149 function(sig, kind)
156 {150 {
157
158 }151 }
159152
160 bool specializable() const { return true; }153 bool specializable() const { return true; }
@@ -174,7 +167,6 @@
174 : 167 :
175 function(sig, kind)168 function(sig, kind)
176 {169 {
177
178 }170 }
179171
180 CODEGEN_DECL();172 CODEGEN_DECL();
@@ -189,7 +181,6 @@
189 : 181 :
190 function(sig, kind)182 function(sig, kind)
191 {183 {
192
193 }184 }
194185
195 CODEGEN_DECL();186 CODEGEN_DECL();
@@ -204,7 +195,6 @@
204 : 195 :
205 function(sig, kind)196 function(sig, kind)
206 {197 {
207
208 }198 }
209199
210 CODEGEN_DECL();200 CODEGEN_DECL();
@@ -219,7 +209,6 @@
219 : 209 :
220 function(sig, kind)210 function(sig, kind)
221 {211 {
222
223 }212 }
224213
225 CODEGEN_DECL();214 CODEGEN_DECL();
@@ -234,7 +223,6 @@
234 : 223 :
235 function(sig, kind)224 function(sig, kind)
236 {225 {
237
238 }226 }
239227
240 CODEGEN_DECL();228 CODEGEN_DECL();
@@ -249,7 +237,6 @@
249 : 237 :
250 function(sig, kind)238 function(sig, kind)
251 {239 {
252
253 }240 }
254241
255 CODEGEN_DECL();242 CODEGEN_DECL();
@@ -264,7 +251,6 @@
264 : 251 :
265 function(sig, kind)252 function(sig, kind)
266 {253 {
267
268 }254 }
269255
270 CODEGEN_DECL();256 CODEGEN_DECL();
@@ -279,7 +265,6 @@
279 : 265 :
280 function(sig, kind)266 function(sig, kind)
281 {267 {
282
283 }268 }
284269
285 CODEGEN_DECL();270 CODEGEN_DECL();
@@ -294,7 +279,6 @@
294 : 279 :
295 function(sig, kind)280 function(sig, kind)
296 {281 {
297
298 }282 }
299283
300 CODEGEN_DECL();284 CODEGEN_DECL();
@@ -309,7 +293,6 @@
309 : 293 :
310 function(sig, kind)294 function(sig, kind)
311 {295 {
312
313 }296 }
314297
315 CODEGEN_DECL();298 CODEGEN_DECL();
@@ -324,7 +307,6 @@
324 : 307 :
325 function(sig, kind)308 function(sig, kind)
326 {309 {
327
328 }310 }
329311
330 CODEGEN_DECL();312 CODEGEN_DECL();
@@ -339,7 +321,6 @@
339 : 321 :
340 function(sig, kind)322 function(sig, kind)
341 {323 {
342
343 }324 }
344325
345 CODEGEN_DECL();326 CODEGEN_DECL();
@@ -354,7 +335,6 @@
354 : 335 :
355 function(sig, kind)336 function(sig, kind)
356 {337 {
357
358 }338 }
359339
360 CODEGEN_DECL();340 CODEGEN_DECL();
@@ -369,7 +349,6 @@
369 : 349 :
370 function(sig, kind)350 function(sig, kind)
371 {351 {
372
373 }352 }
374353
375 CODEGEN_DECL();354 CODEGEN_DECL();
@@ -384,7 +363,6 @@
384 : 363 :
385 function(sig, kind)364 function(sig, kind)
386 {365 {
387
388 }366 }
389367
390 CODEGEN_DECL();368 CODEGEN_DECL();
@@ -399,7 +377,6 @@
399 : 377 :
400 function(sig, kind)378 function(sig, kind)
401 {379 {
402
403 }380 }
404381
405 CODEGEN_DECL();382 CODEGEN_DECL();
@@ -414,7 +391,6 @@
414 : 391 :
415 function(sig, kind)392 function(sig, kind)
416 {393 {
417
418 }394 }
419395
420 CODEGEN_DECL();396 CODEGEN_DECL();
@@ -429,7 +405,6 @@
429 : 405 :
430 function(sig, kind)406 function(sig, kind)
431 {407 {
432
433 }408 }
434409
435 CODEGEN_DECL();410 CODEGEN_DECL();
@@ -444,7 +419,7 @@
444 : 419 :
445 function(sig, kind)420 function(sig, kind)
446 {421 {
447theXQueryVersion = StaticContextConsts::xquery_version_3_0;422 theXQueryVersion = StaticContextConsts::xquery_version_3_0;
448 }423 }
449424
450 CODEGEN_DECL();425 CODEGEN_DECL();
@@ -459,7 +434,6 @@
459 : 434 :
460 function(sig, kind)435 function(sig, kind)
461 {436 {
462
463 }437 }
464438
465 CODEGEN_DECL();439 CODEGEN_DECL();
@@ -474,7 +448,6 @@
474 : 448 :
475 function(sig, kind)449 function(sig, kind)
476 {450 {
477
478 }451 }
479452
480 CODEGEN_DECL();453 CODEGEN_DECL();
@@ -504,7 +477,6 @@
504 : 477 :
505 function(sig, kind)478 function(sig, kind)
506 {479 {
507
508 }480 }
509481
510 CODEGEN_DECL();482 CODEGEN_DECL();
511483
=== modified file 'src/functions/pregenerated/func_uris.h'
--- src/functions/pregenerated/func_uris.h 2013-04-12 21:25:35 +0000
+++ src/functions/pregenerated/func_uris.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
@@ -76,7 +74,6 @@
76 : 74 :
77 function(sig, kind)75 function(sig, kind)
78 {76 {
79
80 }77 }
8178
82 CODEGEN_DECL();79 CODEGEN_DECL();
8380
=== modified file 'src/functions/pregenerated/func_xqdoc.h'
--- src/functions/pregenerated/func_xqdoc.h 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_xqdoc.h 2013-07-30 11:18:26 +0000
@@ -46,7 +46,6 @@
46 : 46 :
47 function(sig, kind)47 function(sig, kind)
48 {48 {
49
50 }49 }
5150
52 CODEGEN_DECL();51 CODEGEN_DECL();
@@ -61,7 +60,6 @@
61 : 60 :
62 function(sig, kind)61 function(sig, kind)
63 {62 {
64
65 }63 }
6664
67 CODEGEN_DECL();65 CODEGEN_DECL();
6866
=== modified file 'src/runtime/collections/collections_impl.cpp'
--- src/runtime/collections/collections_impl.cpp 2013-07-25 14:09:47 +0000
+++ src/runtime/collections/collections_impl.cpp 2013-07-30 11:18:26 +0000
@@ -61,8 +61,9 @@
61 const static_context* sctx,61 const static_context* sctx,
62 const store::Item_t& name,62 const store::Item_t& name,
63 const QueryLoc& loc,63 const QueryLoc& loc,
64 bool dynamic,64 bool dynamic,
65 store::Collection_t& coll)65 store::Collection_t& coll,
66 store::Item_t dataguide = NULL)
66{67{
67 const StaticallyKnownCollection* collectionDecl = sctx->lookup_collection(name);68 const StaticallyKnownCollection* collectionDecl = sctx->lookup_collection(name);
6869
@@ -72,7 +73,7 @@
72 ERROR_PARAMS(name->getStringValue()));73 ERROR_PARAMS(name->getStringValue()));
73 }74 }
7475
75 coll = GENV_STORE.getCollection(name, dynamic);76 coll = GENV_STORE.getCollection(name, dynamic, dataguide);
7677
77 if (coll == NULL)78 if (coll == NULL)
78 {79 {
@@ -287,7 +288,7 @@
287288
288 consumeNext(name, theChildren[0].getp(), planState);289 consumeNext(name, theChildren[0].getp(), planState);
289290
290 (void)getCollection(theSctx, name, loc, theIsDynamic, collection);291 (void)getCollection(theSctx, name, loc, theIsDynamic, collection, theDataguide);
291292
292 if (theChildren.size() == 1)293 if (theChildren.size() == 1)
293 {294 {
294295
=== modified file 'src/runtime/collections/pregenerated/collections.cpp'
--- src/runtime/collections/pregenerated/collections.cpp 2013-03-05 23:11:50 +0000
+++ src/runtime/collections/pregenerated/collections.cpp 2013-07-30 11:18:26 +0000
@@ -194,6 +194,7 @@
194 (NaryBaseIterator<ZorbaCollectionIterator, ZorbaCollectionIteratorState>*)this);194 (NaryBaseIterator<ZorbaCollectionIterator, ZorbaCollectionIteratorState>*)this);
195195
196 ar & theIsDynamic;196 ar & theIsDynamic;
197 ar & theDataguide;
197}198}
198199
199200
200201
=== modified file 'src/runtime/collections/pregenerated/collections.h'
--- src/runtime/collections/pregenerated/collections.h 2013-07-15 10:32:25 +0000
+++ src/runtime/collections/pregenerated/collections.h 2013-07-30 11:18:26 +0000
@@ -266,6 +266,7 @@
266{ 266{
267protected:267protected:
268 bool theIsDynamic; //268 bool theIsDynamic; //
269 store::Item_t theDataguide; //
269public:270public:
270 SERIALIZABLE_CLASS(ZorbaCollectionIterator);271 SERIALIZABLE_CLASS(ZorbaCollectionIterator);
271272
@@ -281,13 +282,16 @@
281 bool isDynamic)282 bool isDynamic)
282 : 283 :
283 NaryBaseIterator<ZorbaCollectionIterator, ZorbaCollectionIteratorState>(sctx, loc, children),284 NaryBaseIterator<ZorbaCollectionIterator, ZorbaCollectionIteratorState>(sctx, loc, children),
284 theIsDynamic(isDynamic)285 theIsDynamic(isDynamic),
286 theDataguide()
285 {}287 {}
286288
287 virtual ~ZorbaCollectionIterator();289 virtual ~ZorbaCollectionIterator();
288290
289 bool isDynamic() const { return theIsDynamic; }291 bool isDynamic() const { return theIsDynamic; }
290292
293 void setDataguide(store::Item_t aValue) { theDataguide= aValue; }
294
291public:295public:
292 bool isCountOptimizable() const;296 bool isCountOptimizable() const;
293 bool count(store::Item_t& result, PlanState& planState) const;297 bool count(store::Item_t& result, PlanState& planState) const;
294298
=== modified file 'src/runtime/json/json_loader.cpp'
--- src/runtime/json/json_loader.cpp 2013-06-19 15:35:24 +0000
+++ src/runtime/json/json_loader.cpp 2013-07-30 11:18:26 +0000
@@ -80,10 +80,11 @@
8080
81///////////////////////////////////////////////////////////////////////////////81///////////////////////////////////////////////////////////////////////////////
8282
83loader::loader( istream &is, bool allow_multiple, bool strip_top_level_array ) :83loader::loader( istream &is, bool allow_multiple, bool strip_top_level_array, const store::Item *aDataguide) :
84 parser_( is, allow_multiple ),84 parser_( is, allow_multiple ),
85 strip_top_level_array_( strip_top_level_array ),85 strip_top_level_array_( strip_top_level_array ),
86 stripped_top_level_array_( false )86 stripped_top_level_array_( false ),
87 dataguide(aDataguide)
87{88{
88}89}
8990
9091
=== modified file 'src/runtime/json/json_loader.h'
--- src/runtime/json/json_loader.h 2012-12-03 18:29:05 +0000
+++ src/runtime/json/json_loader.h 2013-07-30 11:18:26 +0000
@@ -47,8 +47,10 @@
47 * @param strip_top_level_array If \c true, strips the top-level array, if47 * @param strip_top_level_array If \c true, strips the top-level array, if
48 * any.48 * any.
49 */49 */
50 loader( std::istream &is, bool allow_multiple = false,50 loader( std::istream &is,
51 bool strip_top_level_array = false );51 bool allow_multiple = false,
52 bool strip_top_level_array = false,
53 const store::Item* aDataguide = NULL);
5254
53 /**55 /**
54 * Destroys this %loader.56 * Destroys this %loader.
@@ -123,6 +125,7 @@
123 parser parser_;125 parser parser_;
124 bool const strip_top_level_array_;126 bool const strip_top_level_array_;
125 bool stripped_top_level_array_;127 bool stripped_top_level_array_;
128 const store::Item* dataguide;
126};129};
127130
128///////////////////////////////////////////////////////////////////////////////131///////////////////////////////////////////////////////////////////////////////
129132
=== modified file 'src/runtime/json/jsoniq_functions_impl.cpp'
--- src/runtime/json/jsoniq_functions_impl.cpp 2013-06-18 18:55:33 +0000
+++ src/runtime/json/jsoniq_functions_impl.cpp 2013-07-30 11:18:26 +0000
@@ -863,7 +863,7 @@
863 }863 }
864864
865 state->loader_ = new json::loader(865 state->loader_ = new json::loader(
866 *state->theInputStream, true, lStripTopLevelArray866 *state->theInputStream, true, lStripTopLevelArray, theDataguide
867 );867 );
868868
869 if ( state->theInput == NULL && theRelativeLocation ) {869 if ( state->theInput == NULL && theRelativeLocation ) {
870870
=== modified file 'src/runtime/json/pregenerated/jsoniq_functions.cpp'
--- src/runtime/json/pregenerated/jsoniq_functions.cpp 2013-06-18 18:55:33 +0000
+++ src/runtime/json/pregenerated/jsoniq_functions.cpp 2013-07-30 11:18:26 +0000
@@ -121,6 +121,7 @@
121 (NaryBaseIterator<JSONParseIterator, JSONParseIteratorState>*)this);121 (NaryBaseIterator<JSONParseIterator, JSONParseIteratorState>*)this);
122122
123 ar & theRelativeLocation;123 ar & theRelativeLocation;
124 ar & theDataguide;
124}125}
125126
126127
127128
=== modified file 'src/runtime/json/pregenerated/jsoniq_functions.h'
--- src/runtime/json/pregenerated/jsoniq_functions.h 2013-06-18 18:55:33 +0000
+++ src/runtime/json/pregenerated/jsoniq_functions.h 2013-07-30 11:18:26 +0000
@@ -163,6 +163,7 @@
163{ 163{
164protected:164protected:
165 QueryLoc theRelativeLocation; //165 QueryLoc theRelativeLocation; //
166 store::Item_t theDataguide; //
166public:167public:
167 SERIALIZABLE_CLASS(JSONParseIterator);168 SERIALIZABLE_CLASS(JSONParseIterator);
168169
@@ -178,11 +179,14 @@
178 QueryLoc aRelativeLocation)179 QueryLoc aRelativeLocation)
179 : 180 :
180 NaryBaseIterator<JSONParseIterator, JSONParseIteratorState>(sctx, loc, children),181 NaryBaseIterator<JSONParseIterator, JSONParseIteratorState>(sctx, loc, children),
181 theRelativeLocation(aRelativeLocation)182 theRelativeLocation(aRelativeLocation),
183 theDataguide()
182 {}184 {}
183185
184 virtual ~JSONParseIterator();186 virtual ~JSONParseIterator();
185187
188 void setDataguide(store::Item_t aValue) { theDataguide= aValue; }
189
186public:190public:
187 bool processBooleanOption(const store::Item_t& options, char const* option_name, bool* option_value) const;191 bool processBooleanOption(const store::Item_t& options, char const* option_name, bool* option_value) const;
188 void accept(PlanIterVisitor& v) const;192 void accept(PlanIterVisitor& v) const;
189193
=== modified file 'src/runtime/spec/codegen-h.xq'
--- src/runtime/spec/codegen-h.xq 2013-02-07 17:24:36 +0000
+++ src/runtime/spec/codegen-h.xq 2013-07-30 11:18:26 +0000
@@ -89,6 +89,12 @@
89 then 89 then
90 "setDeterministic(false);&#xA;"90 "setDeterministic(false);&#xA;"
91 else ""91 else ""
92 let $annotations := string-join(
93 for $a in $function//zorba:annotation
94 return concat($gen:indent, $gen:indent, "addAnnotation(AnnotationInternal::", $a, ");", $gen:newline),
95 '')
96 let $funcVersionStr := if ($funcVersion eq "") then ""
97 else concat($gen:indent, $gen:indent, $funcVersion, $gen:newline)
92 return 98 return
93 concat($name, '(const signature&amp; sig, FunctionConsts::FunctionKind kind)',99 concat($name, '(const signature&amp; sig, FunctionConsts::FunctionKind kind)',
94 $gen:newline, $gen:indent,100 $gen:newline, $gen:indent,
@@ -96,8 +102,12 @@
96 $gen:newline, $gen:indent, $gen:indent,102 $gen:newline, $gen:indent, $gen:indent,
97 local:base-class($function), 103 local:base-class($function),
98 '(sig, kind)',104 '(sig, kind)',
99 $gen:newline, $gen:indent,105 $gen:newline,
100 '{&#xA;', $setNoneDeterministic, $funcVersion, '&#xA;', $gen:indent, '}'),106 $gen:indent, '{', $gen:newline,
107 $setNoneDeterministic,
108 $funcVersionStr,
109 $annotations,
110 $gen:indent, '}'),
101 111
102 $gen:newline,112 $gen:newline,
103 113
104114
=== modified file 'src/runtime/spec/collections/collections.xml'
--- src/runtime/spec/collections/collections.xml 2013-07-15 10:32:25 +0000
+++ src/runtime/spec/collections/collections.xml 2013-07-30 11:18:26 +0000
@@ -12,7 +12,7 @@
12 xsi:schemaLocation="http://www.zorba-xquery.com ../runtime.xsd">12 xsi:schemaLocation="http://www.zorba-xquery.com ../runtime.xsd">
1313
14<zorba:source>14<zorba:source>
15 <zorba:include form="Quoted">store/api/iterator.h</zorba:include>15 <zorba:include form="Quoted">store/api/iterator.h</zorba:include>
16</zorba:source>16</zorba:source>
1717
18<zorba:header>18<zorba:header>
@@ -306,6 +306,7 @@
306 </zorba:constructor>306 </zorba:constructor>
307307
308 <zorba:member type="bool" name="theIsDynamic" getterName="isDynamic"/>308 <zorba:member type="bool" name="theIsDynamic" getterName="isDynamic"/>
309 <zorba:member type="store::Item_t" name="theDataguide" setterName="setDataguide"/>
309310
310 <zorba:method const="true" name="isCountOptimizable" return="bool" />311 <zorba:method const="true" name="isCountOptimizable" return="bool" />
311 312
@@ -415,6 +416,7 @@
415 </zorba:description>416 </zorba:description>
416417
417 <zorba:function generateCodegen="false">418 <zorba:function generateCodegen="false">
419 <zorba:annotation>zann_explores_json</zorba:annotation>
418420
419 <zorba:signature localname="insert-nodes" prefix="static-collections-dml">421 <zorba:signature localname="insert-nodes" prefix="static-collections-dml">
420 <zorba:param>xs:QName</zorba:param>422 <zorba:param>xs:QName</zorba:param>
@@ -471,7 +473,8 @@
471 </zorba:description>473 </zorba:description>
472474
473 <zorba:function generateCodegen="false">475 <zorba:function generateCodegen="false">
474476 <zorba:annotation>zann_explores_json</zorba:annotation>
477
475 <zorba:signature localname="insert-nodes-first" prefix="static-collections-dml">478 <zorba:signature localname="insert-nodes-first" prefix="static-collections-dml">
476 <zorba:param>xs:QName</zorba:param>479 <zorba:param>xs:QName</zorba:param>
477 <zorba:param>node()*</zorba:param>480 <zorba:param>node()*</zorba:param>
@@ -532,6 +535,7 @@
532 </zorba:description>535 </zorba:description>
533536
534 <zorba:function generateCodegen="false">537 <zorba:function generateCodegen="false">
538 <zorba:annotation>zann_explores_json</zorba:annotation>
535539
536 <zorba:signature localname="insert-nodes-last" prefix="static-collections-dml">540 <zorba:signature localname="insert-nodes-last" prefix="static-collections-dml">
537 <zorba:param>xs:QName</zorba:param>541 <zorba:param>xs:QName</zorba:param>
@@ -592,6 +596,7 @@
592 </zorba:description>596 </zorba:description>
593597
594 <zorba:function generateCodegen="false">598 <zorba:function generateCodegen="false">
599 <zorba:annotation>zann_explores_json</zorba:annotation>
595600
596 <zorba:signature localname="insert-nodes-before" prefix="static-collections-dml">601 <zorba:signature localname="insert-nodes-before" prefix="static-collections-dml">
597 <zorba:param>xs:QName</zorba:param>602 <zorba:param>xs:QName</zorba:param>
@@ -656,7 +661,8 @@
656 </zorba:description>661 </zorba:description>
657662
658 <zorba:function generateCodegen="false">663 <zorba:function generateCodegen="false">
659664 <zorba:annotation>zann_explores_json</zorba:annotation>
665
660 <zorba:signature localname="insert-nodes-after" prefix="static-collections-dml">666 <zorba:signature localname="insert-nodes-after" prefix="static-collections-dml">
661 <zorba:param>xs:QName</zorba:param>667 <zorba:param>xs:QName</zorba:param>
662 <zorba:param>node()</zorba:param>668 <zorba:param>node()</zorba:param>
@@ -722,6 +728,7 @@
722 </zorba:description>728 </zorba:description>
723729
724 <zorba:function generateCodegen="false">730 <zorba:function generateCodegen="false">
731 <zorba:annotation>zann_explores_json</zorba:annotation>
725732
726 <zorba:signature localname="apply-insert-nodes" prefix="static-collections-dml">733 <zorba:signature localname="apply-insert-nodes" prefix="static-collections-dml">
727 <zorba:param>xs:QName</zorba:param>734 <zorba:param>xs:QName</zorba:param>
@@ -786,6 +793,7 @@
786 </zorba:description>793 </zorba:description>
787794
788 <zorba:function generateCodegen="false">795 <zorba:function generateCodegen="false">
796 <zorba:annotation>zann_explores_json</zorba:annotation>
789797
790 <zorba:signature localname="apply-insert-nodes-first" 798 <zorba:signature localname="apply-insert-nodes-first"
791 prefix="static-collections-dml">799 prefix="static-collections-dml">
@@ -856,6 +864,7 @@
856 </zorba:description>864 </zorba:description>
857865
858 <zorba:function generateCodegen="false">866 <zorba:function generateCodegen="false">
867 <zorba:annotation>zann_explores_json</zorba:annotation>
859868
860 <zorba:signature localname="apply-insert-nodes-last" 869 <zorba:signature localname="apply-insert-nodes-last"
861 prefix="static-collections-dml">870 prefix="static-collections-dml">
@@ -926,6 +935,7 @@
926 </zorba:description>935 </zorba:description>
927936
928 <zorba:function generateCodegen="false">937 <zorba:function generateCodegen="false">
938 <zorba:annotation>zann_explores_json</zorba:annotation>
929939
930 <zorba:signature localname="apply-insert-nodes-before" 940 <zorba:signature localname="apply-insert-nodes-before"
931 prefix="static-collections-dml">941 prefix="static-collections-dml">
@@ -1000,6 +1010,7 @@
1000 </zorba:description>1010 </zorba:description>
10011011
1002 <zorba:function generateCodegen="false">1012 <zorba:function generateCodegen="false">
1013 <zorba:annotation>zann_explores_json</zorba:annotation>
10031014
1004 <zorba:signature localname="apply-insert-nodes-after" 1015 <zorba:signature localname="apply-insert-nodes-after"
1005 prefix="static-collections-dml">1016 prefix="static-collections-dml">
@@ -1281,6 +1292,7 @@
1281 </zorba:description>1292 </zorba:description>
1282 1293
1283 <zorba:function generateCodegen="false">1294 <zorba:function generateCodegen="false">
1295 <zorba:annotation>zann_explores_json</zorba:annotation>
1284 1296
1285 <zorba:signature localname="edit" prefix="static-collections-dml">1297 <zorba:signature localname="edit" prefix="static-collections-dml">
1286 <zorba:param>structured-item()</zorba:param>1298 <zorba:param>structured-item()</zorba:param>
12871299
=== modified file 'src/runtime/spec/json/jsoniq_functions.xml'
--- src/runtime/spec/json/jsoniq_functions.xml 2013-06-18 18:55:33 +0000
+++ src/runtime/spec/json/jsoniq_functions.xml 2013-07-30 11:18:26 +0000
@@ -92,6 +92,7 @@
92<zorba:iterator name="JSONEncodeForRoundtripIterator">92<zorba:iterator name="JSONEncodeForRoundtripIterator">
9393
94 <zorba:function isDeterministic="true">94 <zorba:function isDeterministic="true">
95 <zorba:annotation>zann_explores_json</zorba:annotation>
9596
96 <zorba:signature localname="encode-for-roundtrip" prefix="fn-jsoniq">97 <zorba:signature localname="encode-for-roundtrip" prefix="fn-jsoniq">
97 <zorba:param>item()*</zorba:param>98 <zorba:param>item()*</zorba:param>
@@ -188,6 +189,7 @@
188 </zorba:constructor>189 </zorba:constructor>
189190
190 <zorba:member type="QueryLoc" name="theRelativeLocation" />191 <zorba:member type="QueryLoc" name="theRelativeLocation" />
192 <zorba:member type="store::Item_t" name="theDataguide" setterName="setDataguide"/>
191193
192 <zorba:method return="bool" name="processBooleanOption" const="true">194 <zorba:method return="bool" name="processBooleanOption" const="true">
193 <zorba:param type="const store::Item_t&amp;" name="options"/>195 <zorba:param type="const store::Item_t&amp;" name="options"/>
@@ -273,6 +275,8 @@
273275
274 <zorba:function isDeterministic="true"276 <zorba:function isDeterministic="true"
275 generateCodegen="false">277 generateCodegen="false">
278
279 <zorba:annotation>zann_explores_json</zorba:annotation>
276280
277 <zorba:signature localname="keys" prefix="fn-jsoniq">281 <zorba:signature localname="keys" prefix="fn-jsoniq">
278 <zorba:param>item()*</zorba:param>282 <zorba:param>item()*</zorba:param>
@@ -361,6 +365,10 @@
361<zorba:iterator name="JSONObjectProjectIterator" arity="binary">365<zorba:iterator name="JSONObjectProjectIterator" arity="binary">
362366
363 <zorba:function isDeterministic="true">367 <zorba:function isDeterministic="true">
368 <!-- TODO: project() could be used for document projection if the second
369 parameter is all consts. If this is done, this annotation should be
370 removed -->
371 <zorba:annotation>zann_explores_json</zorba:annotation>
364372
365 <zorba:signature localname="project" prefix="fn-jsoniq">373 <zorba:signature localname="project" prefix="fn-jsoniq">
366 <zorba:param>object()</zorba:param>374 <zorba:param>object()</zorba:param>
@@ -475,6 +483,8 @@
475<zorba:iterator name="JSONArraySizeIterator" arity="unary">483<zorba:iterator name="JSONArraySizeIterator" arity="unary">
476484
477 <zorba:function isDeterministic="true">485 <zorba:function isDeterministic="true">
486 <zorba:annotation>zann_explores_json</zorba:annotation>
487
478 <zorba:signature localname="size" prefix="fn-jsoniq">488 <zorba:signature localname="size" prefix="fn-jsoniq">
479 <zorba:param>array()</zorba:param>489 <zorba:param>array()</zorba:param>
480 <zorba:output>xs:integer</zorba:output>490 <zorba:output>xs:integer</zorba:output>
481491
=== modified file 'src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml'
--- src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml 2013-02-07 17:24:36 +0000
+++ src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml 2013-07-30 11:18:26 +0000
@@ -47,6 +47,7 @@
47 <zorba:description author="Zorba Team">fn:serialize</zorba:description>47 <zorba:description author="Zorba Team">fn:serialize</zorba:description>
4848
49 <zorba:function>49 <zorba:function>
50 <zorba:annotation>zann_explores_json</zorba:annotation>
5051
51 <zorba:signature localname="serialize" prefix="fn" version="3.0">52 <zorba:signature localname="serialize" prefix="fn" version="3.0">
52 <zorba:param>item()*</zorba:param>53 <zorba:param>item()*</zorba:param>
5354
=== modified file 'src/store/api/store.h'
--- src/store/api/store.h 2013-02-07 17:24:36 +0000
+++ src/store/api/store.h 2013-07-30 11:18:26 +0000
@@ -259,10 +259,12 @@
259 *259 *
260 * @param QName the name of the collection260 * @param QName the name of the collection
261 * @param bool whether the collection searched is a dynamic or static collection261 * @param bool whether the collection searched is a dynamic or static collection
262 * @param dataguide the dataguie to be used for document projection and query
263 * push-down. Pass NULL if no dataguide is available
262 * @return handle object of the collection. Returns NULL if the collection264 * @return handle object of the collection. Returns NULL if the collection
263 * does not exist265 * does not exist
264 */266 */
265 virtual Collection_t getCollection(const Item* name, bool isDynamic) = 0;267 virtual Collection_t getCollection(const Item* name, bool isDynamic, const Item* dataguide = NULL) = 0;
266268
267 /** 269 /**
268 * Returns an iterator that lists the names of all the available collections.270 * Returns an iterator that lists the names of all the available collections.
269271
=== modified file 'src/store/naive/json_items.cpp'
--- src/store/naive/json_items.cpp 2013-06-05 00:37:35 +0000
+++ src/store/naive/json_items.cpp 2013-07-30 11:18:26 +0000
@@ -696,8 +696,19 @@
696zstring SimpleJSONObject::show() const696zstring SimpleJSONObject::show() const
697{697{
698 std::stringstream str;698 std::stringstream str;
699 str << "{ }";699 str << "{";
700700
701 for (unsigned int i=0; i<thePairs.size(); i++)
702 {
703 str << thePairs[i].first->getStringValue() << ": " ;
704 if (thePairs[i].second->isAtomic())
705 str << "\"" << thePairs[i].second->getStringValue() << "\"";
706 else
707 str << thePairs[i].second->show();
708 str << (i<thePairs.size()-1 ? ", " : "");
709 }
710
711 str << "}";
701 return str.str();712 return str.str();
702}713}
703714
704715
=== modified file 'src/store/naive/store.cpp'
--- src/store/naive/store.cpp 2013-07-02 21:32:23 +0000
+++ src/store/naive/store.cpp 2013-07-30 11:18:26 +0000
@@ -441,7 +441,8 @@
441********************************************************************************/441********************************************************************************/
442store::Collection_t Store::getCollection(442store::Collection_t Store::getCollection(
443 const store::Item* name,443 const store::Item* name,
444 bool isDynamic)444 bool isDynamic,
445 const store::Item *dataguide)
445{446{
446 if (name == NULL)447 if (name == NULL)
447 return NULL;448 return NULL;
448449
=== modified file 'src/store/naive/store.h'
--- src/store/naive/store.h 2013-06-15 02:57:08 +0000
+++ src/store/naive/store.h 2013-07-30 11:18:26 +0000
@@ -279,7 +279,7 @@
279279
280 virtual void deleteCollection(const store::Item* name, bool isDynamic);280 virtual void deleteCollection(const store::Item* name, bool isDynamic);
281281
282 virtual store::Collection_t getCollection(const store::Item* name, bool isDynamic);282 virtual store::Collection_t getCollection(const store::Item* name, bool isDynamic, const store::Item* dataguide = NULL);
283283
284 virtual store::Iterator_t listCollectionNames(bool dynamic);284 virtual store::Iterator_t listCollectionNames(bool dynamic);
285285
286286
=== modified file 'src/system/globalenv.cpp'
--- src/system/globalenv.cpp 2013-07-02 21:32:23 +0000
+++ src/system/globalenv.cpp 2013-07-30 11:18:26 +0000
@@ -88,12 +88,12 @@
88 m_globalEnv->theRootStaticContext = new root_static_context();88 m_globalEnv->theRootStaticContext = new root_static_context();
89 m_globalEnv->theRootStaticContext->init();89 m_globalEnv->theRootStaticContext->init();
9090
91 AnnotationInternal::createBuiltIn();
92
91 m_globalEnv->theFunctionLib = new BuiltinFunctionLibrary();93 m_globalEnv->theFunctionLib = new BuiltinFunctionLibrary();
9294
93 m_globalEnv->theFunctionLib->populate(m_globalEnv->theRootStaticContext);95 m_globalEnv->theFunctionLib->populate(m_globalEnv->theRootStaticContext);
9496
95 AnnotationInternal::createBuiltIn();
96
97#ifdef ZORBA_XQUERYX97#ifdef ZORBA_XQUERYX
98 //libxml2 and libxslt are needed98 //libxml2 and libxslt are needed
99 xmlInitMemory();99 xmlInitMemory();
100100
=== modified file 'src/system/zorba_properties.h'
--- src/system/zorba_properties.h 2013-03-22 05:41:14 +0000
+++ src/system/zorba_properties.h 2013-07-30 11:18:26 +0000
@@ -38,12 +38,12 @@
38 "--print-normalized", "--print-optimized", "--print-iterator-tree",38 "--print-normalized", "--print-optimized", "--print-iterator-tree",
39 "--print-item-flow", "--print-static-types", "--dump-lib",39 "--print-item-flow", "--print-static-types", "--dump-lib",
40 "--stable-iterator-ids", "--no-tree-ids", "--print-intermediate-opt",40 "--stable-iterator-ids", "--no-tree-ids", "--print-intermediate-opt",
41 "--print-locations", "--force-gflwor", "--reorder-globals",41 "--print-locations", "--print-dataguide", "--force-gflwor", "--reorder-globals",
42 "--specialize-num", "--specialize-cmp", "--inline-udf", "--loop-hoisting",42 "--specialize-num", "--specialize-cmp", "--inline-udf", "--loop-hoisting",
43 "--infer-joins", "--no-copy-optim", "--serialize-only-query",43 "--infer-joins", "--no-copy-optim", "--serialize-only-query",
44 "--trace-translator", "--trace-codegen", "--trace-fulltext", "--debug",44 "--trace-translator", "--trace-codegen", "--trace-fulltext", "--debug",
45 "--compile-only", "--lib-module", "--tz", "--external-var", "--serializer-param",45 "--compile-only", "--lib-module", "--tz", "--external-var", "--serializer-param",
46 "--iter-plan-test", "--dot-plan-file", "--plan", "jsoniq", "--max-udf-call-depth",46 "--iter-plan-test", "--dot-plan-file", "--plan", "--jsoniq", "--max-udf-call-depth",
47 "--CLASSPATH", NULL };47 "--CLASSPATH", NULL };
4848
49 return result;49 return result;
@@ -72,6 +72,7 @@
72 bool theNoTreeIds;72 bool theNoTreeIds;
73 bool thePrintIntermediateOpt;73 bool thePrintIntermediateOpt;
74 bool thePrintLocations;74 bool thePrintLocations;
75 bool thePrintDataguide;
75 bool theForceGflwor;76 bool theForceGflwor;
76 bool theReorderGlobals;77 bool theReorderGlobals;
77 bool theSpecializeNum;78 bool theSpecializeNum;
@@ -120,6 +121,7 @@
120 theNoTreeIds = false;121 theNoTreeIds = false;
121 thePrintIntermediateOpt = false;122 thePrintIntermediateOpt = false;
122 thePrintLocations = false;123 thePrintLocations = false;
124 thePrintDataguide = false;
123 theForceGflwor = false;125 theForceGflwor = false;
124 theReorderGlobals = true;126 theReorderGlobals = true;
125 theSpecializeNum = true;127 theSpecializeNum = true;
@@ -166,6 +168,7 @@
166 const bool &noTreeIds () const { return theNoTreeIds; }168 const bool &noTreeIds () const { return theNoTreeIds; }
167 const bool &printIntermediateOpt () const { return thePrintIntermediateOpt; }169 const bool &printIntermediateOpt () const { return thePrintIntermediateOpt; }
168 const bool &printLocations () const { return thePrintLocations; }170 const bool &printLocations () const { return thePrintLocations; }
171 const bool &printDataguide () const { return thePrintDataguide; }
169 const bool &forceGflwor () const { return theForceGflwor; }172 const bool &forceGflwor () const { return theForceGflwor; }
170 const bool &reorderGlobals () const { return theReorderGlobals; }173 const bool &reorderGlobals () const { return theReorderGlobals; }
171 const bool &specializeNum () const { return theSpecializeNum; }174 const bool &specializeNum () const { return theSpecializeNum; }
@@ -191,6 +194,8 @@
191 const bool& jsoniqParser() const { return theJsoniqParser; }194 const bool& jsoniqParser() const { return theJsoniqParser; }
192 const uint32_t &maxUdfCallDepth () const { return theMaxUdfCallDepth; }195 const uint32_t &maxUdfCallDepth () const { return theMaxUdfCallDepth; }
193 const std::string &CLASSPATH () const { return theCLASSPATH; }196 const std::string &CLASSPATH () const { return theCLASSPATH; }
197
198 void setPrintDataguide() { thePrintDataguide = true; }
194199
195 std::string load_argv (int argc, const char **argv) 200 std::string load_argv (int argc, const char **argv)
196 {201 {
@@ -289,6 +294,9 @@
289 else if (strcmp (*argv, "--print-locations") == 0) {294 else if (strcmp (*argv, "--print-locations") == 0) {
290 thePrintLocations = true;295 thePrintLocations = true;
291 }296 }
297 else if (strcmp (*argv, "--print-dataguide") == 0) {
298 thePrintDataguide = true;
299 }
292 else if (strcmp (*argv, "--force-gflwor") == 0) {300 else if (strcmp (*argv, "--force-gflwor") == 0) {
293 theForceGflwor = true;301 theForceGflwor = true;
294 }302 }
@@ -479,6 +487,7 @@
479"--no-tree-ids\nsuppress ids and locations from compiler tree dumps\n\n"487"--no-tree-ids\nsuppress ids and locations from compiler tree dumps\n\n"
480"--print-intermediate-opt\nprint intermediate optimizations\n\n"488"--print-intermediate-opt\nprint intermediate optimizations\n\n"
481"--print-locations\nprint parser locations for compiler expressions\n\n"489"--print-locations\nprint parser locations for compiler expressions\n\n"
490"--print-dataguide\nprint the JSON dataguides\n\n"
482"--force-gflwor\nforce compiler to generate GFLWOR iterators\n\n"491"--force-gflwor\nforce compiler to generate GFLWOR iterators\n\n"
483"--reorder-globals\nreorder global variables (1=enabled (default), 0=off)\n\n"492"--reorder-globals\nreorder global variables (1=enabled (default), 0=off)\n\n"
484"--specialize-num\nspecialize numerics (1=enabled (default), 0=off)\n\n"493"--specialize-num\nspecialize numerics (1=enabled (default), 0=off)\n\n"
@@ -501,6 +510,7 @@
501"--iter-plan-test\nrun as iterator plan test\n\n"510"--iter-plan-test\nrun as iterator plan test\n\n"
502"--dot-plan-file\ngenerate the dot iterator plan\n\n"511"--dot-plan-file\ngenerate the dot iterator plan\n\n"
503"--plan\ntest plan serialization, i.e. save the plan, load it back and then execute it\n\n"512"--plan\ntest plan serialization, i.e. save the plan, load it back and then execute it\n\n"
513"--jsoniq, -j\nuse the JSONiq grammar to parse the query\n\n"
504"--max-udf-call-depth\nmaximum stack depth of udf function calls\n\n"514"--max-udf-call-depth\nmaximum stack depth of udf function calls\n\n"
505"--CLASSPATH\nJVM classpath to be used by modules using Java implementations\n\n"515"--CLASSPATH\nJVM classpath to be used by modules using Java implementations\n\n"
506;516;
507517
=== modified file 'src/system/zorba_properties.txt'
--- src/system/zorba_properties.txt 2013-03-22 05:41:14 +0000
+++ src/system/zorba_properties.txt 2013-07-30 11:18:26 +0000
@@ -16,6 +16,7 @@
16 ("print-iterator-tree,i", "print the iterator tree")16 ("print-iterator-tree,i", "print the iterator tree")
17 ("print-item-flow,f", "show items produced by all iterators")17 ("print-item-flow,f", "show items produced by all iterators")
18 ("print-static-types", po::value<bool> ()->default_value (true), "print static type inference")18 ("print-static-types", po::value<bool> ()->default_value (true), "print static type inference")
19 ("print-dataguide", "print JSON dataguides")
19 ("dump-lib", "dump function library")20 ("dump-lib", "dump function library")
20 ("stable-iterator-ids", "print the iterator plan with stable ids")21 ("stable-iterator-ids", "print the iterator plan with stable ids")
21 ("no-tree-ids", "suppress ids and locations from compiler tree dumps")22 ("no-tree-ids", "suppress ids and locations from compiler tree dumps")
2223
=== modified file 'test/driver/specification.h'
--- test/driver/specification.h 2013-05-16 08:22:46 +0000
+++ test/driver/specification.h 2013-07-30 11:18:26 +0000
@@ -55,7 +55,8 @@
55 theInline(false),55 theInline(false),
56 theComparisonMethod("Fragment"),56 theComparisonMethod("Fragment"),
57 theEnableDtd(false),57 theEnableDtd(false),
58 theEnableUriTestResolver(false)58 theEnableUriTestResolver(false),
59 thePrintDataguide(false)
59#ifndef ZORBA_NO_FULL_TEXT60#ifndef ZORBA_NO_FULL_TEXT
60 ,61 ,
61 theStopWordsMapper(zorba::EntityData::STOP_WORDS),62 theStopWordsMapper(zorba::EntityData::STOP_WORDS),
@@ -81,6 +82,7 @@
81 bool theUseIndent;82 bool theUseIndent;
82 bool theEnableDtd;83 bool theEnableDtd;
83 bool theEnableUriTestResolver;84 bool theEnableUriTestResolver;
85 bool thePrintDataguide;
84#ifndef ZORBA_NO_FULL_TEXT86#ifndef ZORBA_NO_FULL_TEXT
85 zorba::OneToOneURIMapper theStopWordsMapper;87 zorba::OneToOneURIMapper theStopWordsMapper;
86 zorba::OneToOneURIMapper theThesaurusMapper;88 zorba::OneToOneURIMapper theThesaurusMapper;
@@ -229,6 +231,10 @@
229 bool getEnableUriTestResolver() const {231 bool getEnableUriTestResolver() const {
230 return theEnableUriTestResolver;232 return theEnableUriTestResolver;
231 }233 }
234
235 bool getPrintDataguide() const {
236 return thePrintDataguide;
237 }
232238
233 void tokenize(const std::string& str,239 void tokenize(const std::string& str,
234 std::vector<std::string>& tokens,240 std::vector<std::string>& tokens,
@@ -305,7 +311,8 @@
305 (str.find("DefaultCollection:")!=std::string::npos) ||311 (str.find("DefaultCollection:")!=std::string::npos) ||
306 (str.find("Error:")!=std::string::npos) || 312 (str.find("Error:")!=std::string::npos) ||
307 (str.find("Date:")!=std::string::npos) || 313 (str.find("Date:")!=std::string::npos) ||
308 (str.find("Timezone:")!=std::string::npos));314 (str.find("Timezone:")!=std::string::npos) ||
315 (str.find("Dataguide:")!=std::string::npos));
309 return c;316 return c;
310 }317 }
311318
@@ -491,6 +498,12 @@
491 if(lIter == tokens.end() ) { return false; }498 if(lIter == tokens.end() ) { return false; }
492 setTimezone(lIter->begin(), lIter->end());499 setTimezone(lIter->begin(), lIter->end());
493 }500 }
501 else if ( *lIter == "Dataguide:" )
502 {
503 ++lIter;
504 if(lIter == tokens.end() ) { return false; }
505 thePrintDataguide = true;
506 }
494 else507 else
495 {508 {
496 break;509 break;
497510
=== modified file 'test/driver/testdriver.cpp'
--- test/driver/testdriver.cpp 2013-06-15 02:57:08 +0000
+++ test/driver/testdriver.cpp 2013-07-30 11:18:26 +0000
@@ -248,6 +248,10 @@
248 // If command-line argument --module-path passed, set up module paths.248 // If command-line argument --module-path passed, set up module paths.
249 setModulePaths(lModulePath, lContext);249 setModulePaths(lModulePath, lContext);
250250
251 // If dataguide printing is requested, enable it in the properties
252 if (lSpec.getPrintDataguide())
253 zorba::Properties::instance()->setPrintDataguide();
254
251 // Get the pathnames of the reference-result files found in the .spec255 // Get the pathnames of the reference-result files found in the .spec
252 // file (if any).256 // file (if any).
253 std::vector<std::string> lRefFiles;257 std::vector<std::string> lRefFiles;
@@ -325,8 +329,22 @@
325 bool lJSONiqMode = 329 bool lJSONiqMode =
326 (lQueryFile.rfind(".jq") == lQueryFile.size() - 3);330 (lQueryFile.rfind(".jq") == lQueryFile.size() - 3);
327331
328 if (lJSONiqMode) lContext->setJSONiqVersion(zorba::jsoniq_version_1_0);332 if (lJSONiqMode)
329 lQuery->compile(lQueryString.c_str(), lContext, getCompilerHints());333 lContext->setJSONiqVersion(zorba::jsoniq_version_1_0);
334
335 // Create and open the results file here so that the dataguide tests can use it to output projection information
336 std::ofstream lResFileStream(lResultFile.c_str());
337 assert (lResFileStream.good());
338 std::streambuf *coutbuf = std::cout.rdbuf(); //save old buf
339
340 if (lSpec.getPrintDataguide())
341 std::cout.rdbuf(lResFileStream.rdbuf());
342
343 lQuery->compile(lQueryString.c_str(), lContext, getCompilerHints());
344
345 // reset cout to standard output
346 if (lSpec.getPrintDataguide())
347 std::cout.rdbuf(coutbuf);
330348
331 errors = -1;349 errors = -1;
332 if ( errHandler.errors() )350 if ( errHandler.errors() )
@@ -422,8 +440,7 @@
422 errors = -1;440 errors = -1;
423 {441 {
424 // serialize xml/txt442 // serialize xml/txt
425 std::ofstream lResFileStream(lResultFile.c_str());443
426 assert (lResFileStream.good());
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches