Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba
- markos-scratch
- Merge into trunk
Proposed by
Markos Zaharioudakis
Status: | Merged |
---|---|
Approved by: | Markos Zaharioudakis |
Approved revision: | 10995 |
Merged at revision: | 11140 |
Proposed branch: | lp:~zorba-coders/zorba/markos-scratch |
Merge into: | lp:zorba |
Diff against target: |
2346 lines (+502/-655) 40 files modified
ChangeLog (+4/-1) src/compiler/api/compiler_api.cpp (+28/-9) src/compiler/api/compilercb.cpp (+3/-0) src/compiler/api/compilercb.h (+26/-11) src/compiler/expression/expr_base.cpp (+39/-36) src/compiler/expression/expr_base.h (+26/-11) src/compiler/expression/expr_clone.cpp (+1/-1) src/compiler/expression/expr_iter.cpp (+2/-2) src/compiler/expression/expr_put.cpp (+2/-2) src/compiler/expression/expr_type.cpp (+36/-3) src/compiler/expression/script_exprs.cpp (+15/-17) src/compiler/expression/script_exprs.h (+48/-53) src/compiler/expression/var_expr.cpp (+15/-2) src/compiler/expression/var_expr.h (+11/-7) src/compiler/rewriter/rules/hoist_rules.cpp (+2/-2) src/compiler/rewriter/rules/index_join_rule.cpp (+3/-2) src/compiler/rewriter/rules/nodeid_rules.cpp (+3/-15) src/compiler/rewriter/rules/type_rules.cpp (+58/-88) src/compiler/rewriter/tools/dataflow_annotations.cpp (+9/-33) test/parser/CMakeLists.txt (+3/-3) test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_dynamic_zorba_collection.iter (+2/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_static_zorba_collection.iter (+2/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_w3c_collection.iter (+2/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx1.iter (+14/-18) test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx2.iter (+14/-18) test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter (+29/-83) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter (+5/-25) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter (+5/-25) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter (+14/-18) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-01.iter (+3/-7) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-02.iter (+6/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-03.iter (+6/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/positioned-access.iter (+2/-10) test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/var_inline_01.iter (+13/-28) test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter (+1/-5) test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q10.iter (+7/-11) test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q4.iter (+28/-31) test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q9.iter (+10/-14) test/rbkt/ExpCompilerResults/IterPlan/zorba/xray/ppm_10.iter (+3/-12) test/rbkt/Queries/zorba/windowing/q4.xq (+2/-2) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/markos-scratch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markos Zaharioudakis | Approve | ||
Review via email: mp+138556@code.launchpad.net |
Commit message
1. Better computation of the static type for global variables
2. Optimization of comparison operators when untypedAtomic items are involved.
Description of the change
1. Better computation of the static type for global variables
2. Optimization of comparison operators when untypedAtomic items are involved.
To post a comment you must log in.
- 10995. By Markos Zaharioudakis
-
1. Better computation of the static type for global variables, 2. Optimization of comparison operators when untypedAtomic items are involved
Revision history for this message
Markos Zaharioudakis (markos-za) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job markos-
All tests succeeded!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2012-11-29 19:17:08 +0000 | |||
3 | +++ ChangeLog 2012-12-06 22:51:20 +0000 | |||
4 | @@ -12,6 +12,8 @@ | |||
5 | 12 | 12 | ||
6 | 13 | Optimizations: | 13 | Optimizations: |
7 | 14 | * Various optimizations in the implementation of the optimizer rules. | 14 | * Various optimizations in the implementation of the optimizer rules. |
8 | 15 | * Better computation of the static type for global variables. | ||
9 | 16 | * Optimization of comparison operators when untypedAtomic items are involved. | ||
10 | 15 | 17 | ||
11 | 16 | Bug Fixes/Other Changes: | 18 | Bug Fixes/Other Changes: |
12 | 17 | * Change XQXQ (XQuery-for-XQuery) module now part of Zorba core | 19 | * Change XQXQ (XQuery-for-XQuery) module now part of Zorba core |
13 | @@ -28,9 +30,10 @@ | |||
14 | 28 | * Fixed bug #1065321 (following:text() doesn't return results in doc order) | 30 | * Fixed bug #1065321 (following:text() doesn't return results in doc order) |
15 | 29 | * Fixed bug #1067706 (wrong const folding in mutually recursive udfs) | 31 | * Fixed bug #1067706 (wrong const folding in mutually recursive udfs) |
16 | 30 | * Fixed bug #1021492 (while computeing the "sources" of a prolog var, skip | 32 | * Fixed bug #1021492 (while computeing the "sources" of a prolog var, skip |
18 | 31 | any var-setting exprs that appear in non-used (and non-optimized) functions). | 33 | any var-setting exprs that appear in non-used (and non-optimized) functions). |
19 | 32 | * Fixed bug #1070551 (zerr:ZOSE0003 stream read failure) | 34 | * Fixed bug #1070551 (zerr:ZOSE0003 stream read failure) |
20 | 33 | 35 | ||
21 | 36 | |||
22 | 34 | version 2.7 | 37 | version 2.7 |
23 | 35 | 38 | ||
24 | 36 | New Features: | 39 | New Features: |
25 | 37 | 40 | ||
26 | === modified file 'src/compiler/api/compiler_api.cpp' | |||
27 | --- src/compiler/api/compiler_api.cpp 2012-10-08 12:09:36 +0000 | |||
28 | +++ src/compiler/api/compiler_api.cpp 2012-12-06 22:51:20 +0000 | |||
29 | @@ -138,10 +138,10 @@ | |||
30 | 138 | #ifdef ZORBA_XQUERYX | 138 | #ifdef ZORBA_XQUERYX |
31 | 139 | char* converted_xquery_str = NULL; | 139 | char* converted_xquery_str = NULL; |
32 | 140 | std::string xquery_str; | 140 | std::string xquery_str; |
34 | 141 | bool is_xqueryx = false; | 141 | bool is_xqueryx = false; |
35 | 142 | |||
36 | 142 | { | 143 | { |
39 | 143 | char strtemp[1000]; | 144 | char strtemp[1000]; |
38 | 144 | //int nr_read = 1; | ||
40 | 145 | do | 145 | do |
41 | 146 | { | 146 | { |
42 | 147 | strtemp[0] = 0; | 147 | strtemp[0] = 0; |
43 | @@ -175,26 +175,30 @@ | |||
44 | 175 | { | 175 | { |
45 | 176 | xquery_stream = new std::istringstream(xquery_str); | 176 | xquery_stream = new std::istringstream(xquery_str); |
46 | 177 | } | 177 | } |
48 | 178 | #endif | 178 | #endif // ZORBA_XQUERYX |
49 | 179 | |||
50 | 180 | theCompilerCB->setPhase(CompilerCB::PARSING); | ||
51 | 179 | 181 | ||
52 | 180 | xquery_driver lDriver(&*theCompilerCB); | 182 | xquery_driver lDriver(&*theCompilerCB); |
53 | 181 | lDriver.parse_stream(*xquery_stream, aFileName); | 183 | lDriver.parse_stream(*xquery_stream, aFileName); |
54 | 182 | 184 | ||
55 | 185 | theCompilerCB->setPhase(CompilerCB::NONE); | ||
56 | 186 | |||
57 | 183 | #ifdef ZORBA_XQUERYX | 187 | #ifdef ZORBA_XQUERYX |
58 | 184 | delete xquery_stream; | 188 | delete xquery_stream; |
60 | 185 | if(is_xqueryx) | 189 | if (is_xqueryx) |
61 | 186 | { | 190 | { |
62 | 187 | xqxconvertor->freeResult(converted_xquery_str); | 191 | xqxconvertor->freeResult(converted_xquery_str); |
63 | 188 | } | 192 | } |
64 | 189 | #endif | 193 | #endif |
65 | 194 | |||
66 | 190 | parsenode_t node = lDriver.get_expr(); | 195 | parsenode_t node = lDriver.get_expr(); |
67 | 191 | 196 | ||
68 | 192 | if (typeid (*node) == typeid (ParseErrorNode)) | 197 | if (typeid (*node) == typeid (ParseErrorNode)) |
69 | 193 | { | 198 | { |
70 | 194 | ParseErrorNode* pen = static_cast<ParseErrorNode *>(&*node); | 199 | ParseErrorNode* pen = static_cast<ParseErrorNode *>(&*node); |
74 | 195 | throw XQUERY_EXCEPTION_VAR( | 200 | throw XQUERY_EXCEPTION_VAR(pen->err, |
75 | 196 | pen->err, ERROR_PARAMS(pen->msg), ERROR_LOC(pen->get_location()) | 201 | ERROR_PARAMS(pen->msg), ERROR_LOC(pen->get_location())); |
73 | 197 | ); | ||
76 | 198 | } | 202 | } |
77 | 199 | 203 | ||
78 | 200 | return node; | 204 | return node; |
79 | @@ -285,7 +289,11 @@ | |||
80 | 285 | audit::XQUERY_COMPILATION_CODEGENERATION_DURATION, | 289 | audit::XQUERY_COMPILATION_CODEGENERATION_DURATION, |
81 | 286 | lTimer); | 290 | lTimer); |
82 | 287 | 291 | ||
83 | 292 | theCompilerCB->setPhase(CompilerCB::CODEGEN); | ||
84 | 293 | |||
85 | 288 | plan = codegen("main query", rootExpr, theCompilerCB, nextDynamicVarId); | 294 | plan = codegen("main query", rootExpr, theCompilerCB, nextDynamicVarId); |
86 | 295 | |||
87 | 296 | theCompilerCB->setPhase(CompilerCB::NONE); | ||
88 | 289 | } | 297 | } |
89 | 290 | 298 | ||
90 | 291 | //theCompilerCB->getExprManager()->garbageCollect(); | 299 | //theCompilerCB->getExprManager()->garbageCollect(); |
91 | @@ -306,8 +314,12 @@ | |||
92 | 306 | time::get_current_walltime(startTime); | 314 | time::get_current_walltime(startTime); |
93 | 307 | #endif | 315 | #endif |
94 | 308 | 316 | ||
95 | 317 | theCompilerCB->setPhase(CompilerCB::TRANSLATION); | ||
96 | 318 | |||
97 | 309 | expr* lExpr = translate(*aParsenode, theCompilerCB); | 319 | expr* lExpr = translate(*aParsenode, theCompilerCB); |
98 | 310 | 320 | ||
99 | 321 | theCompilerCB->setPhase(CompilerCB::NONE); | ||
100 | 322 | |||
101 | 311 | #if 0 | 323 | #if 0 |
102 | 312 | std::cout << "Num exprs after translation = " | 324 | std::cout << "Num exprs after translation = " |
103 | 313 | << theCompilerCB->getExprManager()->numExprs() | 325 | << theCompilerCB->getExprManager()->numExprs() |
104 | @@ -321,7 +333,7 @@ | |||
105 | 321 | if ( lExpr == NULL ) | 333 | if ( lExpr == NULL ) |
106 | 322 | { | 334 | { |
107 | 323 | // TODO: can this happen? | 335 | // TODO: can this happen? |
109 | 324 | throw ZORBA_EXCEPTION( zerr::ZAPI0002_XQUERY_COMPILATION_FAILED ); | 336 | throw ZORBA_EXCEPTION(zerr::ZAPI0002_XQUERY_COMPILATION_FAILED); |
110 | 325 | } | 337 | } |
111 | 326 | 338 | ||
112 | 327 | return lExpr; | 339 | return lExpr; |
113 | @@ -333,6 +345,8 @@ | |||
114 | 333 | ********************************************************************************/ | 345 | ********************************************************************************/ |
115 | 334 | expr* XQueryCompiler::optimize(expr* lExpr) | 346 | expr* XQueryCompiler::optimize(expr* lExpr) |
116 | 335 | { | 347 | { |
117 | 348 | theCompilerCB->setPhase(CompilerCB::OPTIMIZATION); | ||
118 | 349 | |||
119 | 336 | // Build the call-graph among the udfs that are actually used in the query | 350 | // Build the call-graph among the udfs that are actually used in the query |
120 | 337 | // program. | 351 | // program. |
121 | 338 | UDFGraph udfGraph(lExpr); | 352 | UDFGraph udfGraph(lExpr); |
122 | @@ -343,7 +357,10 @@ | |||
123 | 343 | udfGraph.inferDeterminism(); | 357 | udfGraph.inferDeterminism(); |
124 | 344 | 358 | ||
125 | 345 | if (theCompilerCB->theConfig.opt_level <= CompilerCB::config::O0) | 359 | if (theCompilerCB->theConfig.opt_level <= CompilerCB::config::O0) |
126 | 360 | { | ||
127 | 361 | theCompilerCB->setPhase(CompilerCB::NONE); | ||
128 | 346 | return lExpr; | 362 | return lExpr; |
129 | 363 | } | ||
130 | 347 | 364 | ||
131 | 348 | // Optimize the udfs. | 365 | // Optimize the udfs. |
132 | 349 | udfGraph.optimizeUDFs(theCompilerCB); | 366 | udfGraph.optimizeUDFs(theCompilerCB); |
133 | @@ -362,6 +379,8 @@ | |||
134 | 362 | if ( theCompilerCB->theConfig.optimize_cb != NULL ) | 379 | if ( theCompilerCB->theConfig.optimize_cb != NULL ) |
135 | 363 | theCompilerCB->theConfig.optimize_cb(lExpr, "main query"); | 380 | theCompilerCB->theConfig.optimize_cb(lExpr, "main query"); |
136 | 364 | 381 | ||
137 | 382 | theCompilerCB->setPhase(CompilerCB::NONE); | ||
138 | 383 | |||
139 | 365 | return lExpr; | 384 | return lExpr; |
140 | 366 | } | 385 | } |
141 | 367 | 386 | ||
142 | 368 | 387 | ||
143 | === modified file 'src/compiler/api/compilercb.cpp' | |||
144 | --- src/compiler/api/compilercb.cpp 2012-10-24 11:32:56 +0000 | |||
145 | +++ src/compiler/api/compilercb.cpp 2012-12-06 22:51:20 +0000 | |||
146 | @@ -113,6 +113,7 @@ | |||
147 | 113 | #ifdef ZORBA_WITH_DEBUGGER | 113 | #ifdef ZORBA_WITH_DEBUGGER |
148 | 114 | theDebuggerCommons(0), | 114 | theDebuggerCommons(0), |
149 | 115 | #endif | 115 | #endif |
150 | 116 | thePhase(NONE), | ||
151 | 116 | theHasEval(false), | 117 | theHasEval(false), |
152 | 117 | theIsEval(false), | 118 | theIsEval(false), |
153 | 118 | theIsLoadProlog(false), | 119 | theIsLoadProlog(false), |
154 | @@ -141,6 +142,7 @@ | |||
155 | 141 | #ifdef ZORBA_WITH_DEBUGGER | 142 | #ifdef ZORBA_WITH_DEBUGGER |
156 | 142 | theDebuggerCommons(cb.theDebuggerCommons), | 143 | theDebuggerCommons(cb.theDebuggerCommons), |
157 | 143 | #endif | 144 | #endif |
158 | 145 | thePhase(NONE), | ||
159 | 144 | theHasEval(false), | 146 | theHasEval(false), |
160 | 145 | theIsEval(false), | 147 | theIsEval(false), |
161 | 146 | theIsLoadProlog(false), | 148 | theIsLoadProlog(false), |
162 | @@ -167,6 +169,7 @@ | |||
163 | 167 | #ifdef ZORBA_WITH_DEBUGGER | 169 | #ifdef ZORBA_WITH_DEBUGGER |
164 | 168 | theDebuggerCommons(NULL), | 170 | theDebuggerCommons(NULL), |
165 | 169 | #endif | 171 | #endif |
166 | 172 | thePhase(RUNTIME), | ||
167 | 170 | theHasEval(false), | 173 | theHasEval(false), |
168 | 171 | theIsEval(false), | 174 | theIsEval(false), |
169 | 172 | theNextVisitId(1), | 175 | theNextVisitId(1), |
170 | 173 | 176 | ||
171 | === modified file 'src/compiler/api/compilercb.h' | |||
172 | --- src/compiler/api/compilercb.h 2012-10-24 11:32:56 +0000 | |||
173 | +++ src/compiler/api/compilercb.h 2012-12-06 22:51:20 +0000 | |||
174 | @@ -132,7 +132,7 @@ | |||
175 | 132 | Pointer to the function to call to print the expr tree that results from | 132 | Pointer to the function to call to print the expr tree that results from |
176 | 133 | translating the query AST. | 133 | translating the query AST. |
177 | 134 | ********************************************************************************/ | 134 | ********************************************************************************/ |
179 | 135 | class ZORBA_DLL_PUBLIC CompilerCB : public zorba::serialization::SerializeBaseClass | 135 | class CompilerCB : public zorba::serialization::SerializeBaseClass |
180 | 136 | { | 136 | { |
181 | 137 | public: | 137 | public: |
182 | 138 | struct config : public zorba::serialization::SerializeBaseClass | 138 | struct config : public zorba::serialization::SerializeBaseClass |
183 | @@ -168,8 +168,22 @@ | |||
184 | 168 | void serialize(::zorba::serialization::Archiver& ar); | 168 | void serialize(::zorba::serialization::Archiver& ar); |
185 | 169 | }; | 169 | }; |
186 | 170 | 170 | ||
187 | 171 | typedef enum | ||
188 | 172 | { | ||
189 | 173 | NONE, | ||
190 | 174 | PARSING, | ||
191 | 175 | TRANSLATION, | ||
192 | 176 | OPTIMIZATION, | ||
193 | 177 | CODEGEN, | ||
194 | 178 | RUNTIME | ||
195 | 179 | } ProcessingPhase; | ||
196 | 180 | |||
197 | 171 | typedef std::map<csize, static_context_t> SctxMap; | 181 | typedef std::map<csize, static_context_t> SctxMap; |
198 | 172 | 182 | ||
199 | 183 | typedef std::multimap<const expr*, pragma*> PragmaMap; | ||
200 | 184 | |||
201 | 185 | typedef PragmaMap::const_iterator PragmaMapIter; | ||
202 | 186 | |||
203 | 173 | public: | 187 | public: |
204 | 174 | XQueryDiagnostics * theXQueryDiagnostics; | 188 | XQueryDiagnostics * theXQueryDiagnostics; |
205 | 175 | 189 | ||
206 | @@ -181,6 +195,8 @@ | |||
207 | 181 | DebuggerCommons * theDebuggerCommons; | 195 | DebuggerCommons * theDebuggerCommons; |
208 | 182 | #endif | 196 | #endif |
209 | 183 | 197 | ||
210 | 198 | ProcessingPhase thePhase; | ||
211 | 199 | |||
212 | 184 | bool theHasEval; | 200 | bool theHasEval; |
213 | 185 | 201 | ||
214 | 186 | bool theIsEval; | 202 | bool theIsEval; |
215 | @@ -197,15 +213,13 @@ | |||
216 | 197 | 213 | ||
217 | 198 | uint32_t theTempIndexCounter; | 214 | uint32_t theTempIndexCounter; |
218 | 199 | 215 | ||
220 | 200 | ulong theNextVisitId; | 216 | uint8_t theNextVisitId; |
221 | 201 | 217 | ||
222 | 202 | config theConfig; | 218 | config theConfig; |
223 | 203 | 219 | ||
224 | 204 | ExprManager * const theEM; | 220 | ExprManager * const theEM; |
225 | 205 | 221 | ||
229 | 206 | typedef std::multimap<const expr*, pragma*> PragmaMap; | 222 | PragmaMap thePragmas; |
227 | 207 | typedef PragmaMap::const_iterator PragmaMapIter; | ||
228 | 208 | PragmaMap thePragmas; | ||
230 | 209 | 223 | ||
231 | 210 | public: | 224 | public: |
232 | 211 | SERIALIZABLE_CLASS(CompilerCB); | 225 | SERIALIZABLE_CLASS(CompilerCB); |
233 | @@ -219,6 +233,10 @@ | |||
234 | 219 | 233 | ||
235 | 220 | ~CompilerCB(); | 234 | ~CompilerCB(); |
236 | 221 | 235 | ||
237 | 236 | ProcessingPhase getPhase() const { return thePhase; } | ||
238 | 237 | |||
239 | 238 | void setPhase(ProcessingPhase v) { thePhase = v; } | ||
240 | 239 | |||
241 | 222 | bool isLoadPrologQuery() const { return theIsLoadProlog; } | 240 | bool isLoadPrologQuery() const { return theIsLoadProlog; } |
242 | 223 | 241 | ||
243 | 224 | void setLoadPrologQuery() { theIsLoadProlog = true; } | 242 | void setLoadPrologQuery() { theIsLoadProlog = true; } |
244 | @@ -240,12 +258,9 @@ | |||
245 | 240 | // | 258 | // |
246 | 241 | void add_pragma(const expr* e, pragma* p); | 259 | void add_pragma(const expr* e, pragma* p); |
247 | 242 | 260 | ||
254 | 243 | void | 261 | void lookup_pragmas(const expr* e, std::vector<pragma*>& pragmas) const; |
255 | 244 | lookup_pragmas(const expr* e, std::vector<pragma*>& pragmas) const; | 262 | |
256 | 245 | 263 | bool lookup_pragma(const expr* e, const zstring& localname, pragma*&) const; | |
251 | 246 | bool | ||
252 | 247 | lookup_pragma(const expr* e, const zstring& localname, pragma*&) const; | ||
253 | 248 | |||
257 | 249 | }; | 264 | }; |
258 | 250 | 265 | ||
259 | 251 | 266 | ||
260 | 252 | 267 | ||
261 | === modified file 'src/compiler/expression/expr_base.cpp' | |||
262 | --- src/compiler/expression/expr_base.cpp 2012-10-31 08:02:16 +0000 | |||
263 | +++ src/compiler/expression/expr_base.cpp 2012-12-06 22:51:20 +0000 | |||
264 | @@ -128,7 +128,9 @@ | |||
265 | 128 | theCCB(NULL), | 128 | theCCB(NULL), |
266 | 129 | theSctx(NULL), | 129 | theSctx(NULL), |
267 | 130 | theUDF(NULL), | 130 | theUDF(NULL), |
269 | 131 | theFlags1(0) | 131 | theAnnotationFlags(0), |
270 | 132 | theBoolFlags(0), | ||
271 | 133 | theVisitId(0) | ||
272 | 132 | { | 134 | { |
273 | 133 | } | 135 | } |
274 | 134 | 136 | ||
275 | @@ -148,7 +150,8 @@ | |||
276 | 148 | theUDF(udf), | 150 | theUDF(udf), |
277 | 149 | theLoc(loc), | 151 | theLoc(loc), |
278 | 150 | theKind(k), | 152 | theKind(k), |
280 | 151 | theFlags1(0), | 153 | theAnnotationFlags(0), |
281 | 154 | theBoolFlags(0), | ||
282 | 152 | theVisitId(0) | 155 | theVisitId(0) |
283 | 153 | { | 156 | { |
284 | 154 | theScriptingKind = UNKNOWN_SCRIPTING_KIND; | 157 | theScriptingKind = UNKNOWN_SCRIPTING_KIND; |
285 | @@ -328,7 +331,7 @@ | |||
286 | 328 | if (getDereferencesNodes() != ANNOTATION_TRUE_FIXED) | 331 | if (getDereferencesNodes() != ANNOTATION_TRUE_FIXED) |
287 | 329 | setDereferencesNodes(ANNOTATION_FALSE); | 332 | setDereferencesNodes(ANNOTATION_FALSE); |
288 | 330 | 333 | ||
290 | 331 | //theFlags1 = 0; | 334 | //theAnnotationFlags = 0; |
291 | 332 | //setNonDiscardable(ANNOTATION_FALSE); | 335 | //setNonDiscardable(ANNOTATION_FALSE); |
292 | 333 | //setUnfoldable(ANNOTATION_FALSE); | 336 | //setUnfoldable(ANNOTATION_FALSE); |
293 | 334 | 337 | ||
294 | @@ -374,14 +377,14 @@ | |||
295 | 374 | ********************************************************************************/ | 377 | ********************************************************************************/ |
296 | 375 | BoolAnnotationValue expr::getProducesSortedNodes() const | 378 | BoolAnnotationValue expr::getProducesSortedNodes() const |
297 | 376 | { | 379 | { |
299 | 377 | return (BoolAnnotationValue)(theFlags1 & PRODUCES_SORTED_NODES_MASK); | 380 | return (BoolAnnotationValue)(theAnnotationFlags & PRODUCES_SORTED_NODES_MASK); |
300 | 378 | } | 381 | } |
301 | 379 | 382 | ||
302 | 380 | 383 | ||
303 | 381 | void expr::setProducesSortedNodes(BoolAnnotationValue v) | 384 | void expr::setProducesSortedNodes(BoolAnnotationValue v) |
304 | 382 | { | 385 | { |
307 | 383 | theFlags1 &= ~PRODUCES_SORTED_NODES_MASK; | 386 | theAnnotationFlags &= ~PRODUCES_SORTED_NODES_MASK; |
308 | 384 | theFlags1 |= v; | 387 | theAnnotationFlags |= v; |
309 | 385 | } | 388 | } |
310 | 386 | 389 | ||
311 | 387 | 390 | ||
312 | @@ -398,14 +401,14 @@ | |||
313 | 398 | BoolAnnotationValue expr::getProducesDistinctNodes() const | 401 | BoolAnnotationValue expr::getProducesDistinctNodes() const |
314 | 399 | { | 402 | { |
315 | 400 | return (BoolAnnotationValue) | 403 | return (BoolAnnotationValue) |
317 | 401 | ((theFlags1 & PRODUCES_DISTINCT_NODES_MASK) >> PRODUCES_DISTINCT_NODES); | 404 | ((theAnnotationFlags & PRODUCES_DISTINCT_NODES_MASK) >> PRODUCES_DISTINCT_NODES); |
318 | 402 | } | 405 | } |
319 | 403 | 406 | ||
320 | 404 | 407 | ||
321 | 405 | void expr::setProducesDistinctNodes(BoolAnnotationValue v) | 408 | void expr::setProducesDistinctNodes(BoolAnnotationValue v) |
322 | 406 | { | 409 | { |
325 | 407 | theFlags1 &= ~PRODUCES_DISTINCT_NODES_MASK; | 410 | theAnnotationFlags &= ~PRODUCES_DISTINCT_NODES_MASK; |
326 | 408 | theFlags1 |= (v << PRODUCES_DISTINCT_NODES); | 411 | theAnnotationFlags |= (v << PRODUCES_DISTINCT_NODES); |
327 | 409 | } | 412 | } |
328 | 410 | 413 | ||
329 | 411 | 414 | ||
330 | @@ -422,14 +425,14 @@ | |||
331 | 422 | BoolAnnotationValue expr::getIgnoresSortedNodes() const | 425 | BoolAnnotationValue expr::getIgnoresSortedNodes() const |
332 | 423 | { | 426 | { |
333 | 424 | return (BoolAnnotationValue) | 427 | return (BoolAnnotationValue) |
335 | 425 | ((theFlags1 & IGNORES_SORTED_NODES_MASK) >> IGNORES_SORTED_NODES); | 428 | ((theAnnotationFlags & IGNORES_SORTED_NODES_MASK) >> IGNORES_SORTED_NODES); |
336 | 426 | } | 429 | } |
337 | 427 | 430 | ||
338 | 428 | 431 | ||
339 | 429 | void expr::setIgnoresSortedNodes(BoolAnnotationValue v) | 432 | void expr::setIgnoresSortedNodes(BoolAnnotationValue v) |
340 | 430 | { | 433 | { |
343 | 431 | theFlags1 &= ~IGNORES_SORTED_NODES_MASK; | 434 | theAnnotationFlags &= ~IGNORES_SORTED_NODES_MASK; |
344 | 432 | theFlags1 |= (v << IGNORES_SORTED_NODES); | 435 | theAnnotationFlags |= (v << IGNORES_SORTED_NODES); |
345 | 433 | } | 436 | } |
346 | 434 | 437 | ||
347 | 435 | 438 | ||
348 | @@ -446,14 +449,14 @@ | |||
349 | 446 | BoolAnnotationValue expr::getIgnoresDuplicateNodes() const | 449 | BoolAnnotationValue expr::getIgnoresDuplicateNodes() const |
350 | 447 | { | 450 | { |
351 | 448 | return (BoolAnnotationValue) | 451 | return (BoolAnnotationValue) |
353 | 449 | ((theFlags1 & IGNORES_DUPLICATE_NODES_MASK) >> IGNORES_DUPLICATE_NODES); | 452 | ((theAnnotationFlags & IGNORES_DUPLICATE_NODES_MASK) >> IGNORES_DUPLICATE_NODES); |
354 | 450 | } | 453 | } |
355 | 451 | 454 | ||
356 | 452 | 455 | ||
357 | 453 | void expr::setIgnoresDuplicateNodes(BoolAnnotationValue v) | 456 | void expr::setIgnoresDuplicateNodes(BoolAnnotationValue v) |
358 | 454 | { | 457 | { |
361 | 455 | theFlags1 &= ~IGNORES_DUPLICATE_NODES_MASK; | 458 | theAnnotationFlags &= ~IGNORES_DUPLICATE_NODES_MASK; |
362 | 456 | theFlags1 |= (v << IGNORES_DUPLICATE_NODES); | 459 | theAnnotationFlags |= (v << IGNORES_DUPLICATE_NODES); |
363 | 457 | } | 460 | } |
364 | 458 | 461 | ||
365 | 459 | 462 | ||
366 | @@ -469,14 +472,14 @@ | |||
367 | 469 | BoolAnnotationValue expr::getNonDiscardable() const | 472 | BoolAnnotationValue expr::getNonDiscardable() const |
368 | 470 | { | 473 | { |
369 | 471 | return (BoolAnnotationValue) | 474 | return (BoolAnnotationValue) |
371 | 472 | ((theFlags1 & NON_DISCARDABLE_MASK) >> NON_DISCARDABLE); | 475 | ((theAnnotationFlags & NON_DISCARDABLE_MASK) >> NON_DISCARDABLE); |
372 | 473 | } | 476 | } |
373 | 474 | 477 | ||
374 | 475 | 478 | ||
375 | 476 | void expr::setNonDiscardable(BoolAnnotationValue v) | 479 | void expr::setNonDiscardable(BoolAnnotationValue v) |
376 | 477 | { | 480 | { |
379 | 478 | theFlags1 &= ~NON_DISCARDABLE_MASK; | 481 | theAnnotationFlags &= ~NON_DISCARDABLE_MASK; |
380 | 479 | theFlags1 |= (v << NON_DISCARDABLE); | 482 | theAnnotationFlags |= (v << NON_DISCARDABLE); |
381 | 480 | } | 483 | } |
382 | 481 | 484 | ||
383 | 482 | 485 | ||
384 | @@ -493,14 +496,14 @@ | |||
385 | 493 | BoolAnnotationValue expr::getUnfoldable() const | 496 | BoolAnnotationValue expr::getUnfoldable() const |
386 | 494 | { | 497 | { |
387 | 495 | return (BoolAnnotationValue) | 498 | return (BoolAnnotationValue) |
389 | 496 | ((theFlags1 & UNFOLDABLE_MASK) >> UNFOLDABLE); | 499 | ((theAnnotationFlags & UNFOLDABLE_MASK) >> UNFOLDABLE); |
390 | 497 | } | 500 | } |
391 | 498 | 501 | ||
392 | 499 | 502 | ||
393 | 500 | void expr::setUnfoldable(BoolAnnotationValue v) | 503 | void expr::setUnfoldable(BoolAnnotationValue v) |
394 | 501 | { | 504 | { |
397 | 502 | theFlags1 &= ~UNFOLDABLE_MASK; | 505 | theAnnotationFlags &= ~UNFOLDABLE_MASK; |
398 | 503 | theFlags1 |= (v << UNFOLDABLE); | 506 | theAnnotationFlags |= (v << UNFOLDABLE); |
399 | 504 | } | 507 | } |
400 | 505 | 508 | ||
401 | 506 | 509 | ||
402 | @@ -517,14 +520,14 @@ | |||
403 | 517 | BoolAnnotationValue expr::getContainsRecursiveCall() const | 520 | BoolAnnotationValue expr::getContainsRecursiveCall() const |
404 | 518 | { | 521 | { |
405 | 519 | return (BoolAnnotationValue) | 522 | return (BoolAnnotationValue) |
407 | 520 | ((theFlags1 & CONTAINS_RECURSIVE_CALL_MASK) >> CONTAINS_RECURSIVE_CALL); | 523 | ((theAnnotationFlags & CONTAINS_RECURSIVE_CALL_MASK) >> CONTAINS_RECURSIVE_CALL); |
408 | 521 | } | 524 | } |
409 | 522 | 525 | ||
410 | 523 | 526 | ||
411 | 524 | void expr::setContainsRecursiveCall(BoolAnnotationValue v) | 527 | void expr::setContainsRecursiveCall(BoolAnnotationValue v) |
412 | 525 | { | 528 | { |
415 | 526 | theFlags1 &= ~CONTAINS_RECURSIVE_CALL_MASK; | 529 | theAnnotationFlags &= ~CONTAINS_RECURSIVE_CALL_MASK; |
416 | 527 | theFlags1 |= (v << CONTAINS_RECURSIVE_CALL); | 530 | theAnnotationFlags |= (v << CONTAINS_RECURSIVE_CALL); |
417 | 528 | } | 531 | } |
418 | 529 | 532 | ||
419 | 530 | 533 | ||
420 | @@ -541,14 +544,14 @@ | |||
421 | 541 | BoolAnnotationValue expr::getContainsPragma() const | 544 | BoolAnnotationValue expr::getContainsPragma() const |
422 | 542 | { | 545 | { |
423 | 543 | return (BoolAnnotationValue) | 546 | return (BoolAnnotationValue) |
425 | 544 | ((theFlags1 & CONTAINS_PRAGMA_MASK) >> CONTAINS_PRAGMA); | 547 | ((theAnnotationFlags & CONTAINS_PRAGMA_MASK) >> CONTAINS_PRAGMA); |
426 | 545 | } | 548 | } |
427 | 546 | 549 | ||
428 | 547 | 550 | ||
429 | 548 | void expr::setContainsPragma(BoolAnnotationValue v) | 551 | void expr::setContainsPragma(BoolAnnotationValue v) |
430 | 549 | { | 552 | { |
433 | 550 | theFlags1 &= ~CONTAINS_PRAGMA_MASK; | 553 | theAnnotationFlags &= ~CONTAINS_PRAGMA_MASK; |
434 | 551 | theFlags1 |= (v << CONTAINS_PRAGMA); | 554 | theAnnotationFlags |= (v << CONTAINS_PRAGMA); |
435 | 552 | } | 555 | } |
436 | 553 | 556 | ||
437 | 554 | 557 | ||
438 | @@ -566,14 +569,14 @@ | |||
439 | 566 | BoolAnnotationValue expr::getConstructsNodes() const | 569 | BoolAnnotationValue expr::getConstructsNodes() const |
440 | 567 | { | 570 | { |
441 | 568 | return (BoolAnnotationValue) | 571 | return (BoolAnnotationValue) |
443 | 569 | ((theFlags1 & CONSTRUCTS_NODES_MASK) >> CONSTRUCTS_NODES); | 572 | ((theAnnotationFlags & CONSTRUCTS_NODES_MASK) >> CONSTRUCTS_NODES); |
444 | 570 | } | 573 | } |
445 | 571 | 574 | ||
446 | 572 | 575 | ||
447 | 573 | void expr::setConstructsNodes(BoolAnnotationValue v) | 576 | void expr::setConstructsNodes(BoolAnnotationValue v) |
448 | 574 | { | 577 | { |
451 | 575 | theFlags1 &= ~CONSTRUCTS_NODES_MASK; | 578 | theAnnotationFlags &= ~CONSTRUCTS_NODES_MASK; |
452 | 576 | theFlags1 |= (v << CONSTRUCTS_NODES); | 579 | theAnnotationFlags |= (v << CONSTRUCTS_NODES); |
453 | 577 | } | 580 | } |
454 | 578 | 581 | ||
455 | 579 | 582 | ||
456 | @@ -591,14 +594,14 @@ | |||
457 | 591 | BoolAnnotationValue expr::getDereferencesNodes() const | 594 | BoolAnnotationValue expr::getDereferencesNodes() const |
458 | 592 | { | 595 | { |
459 | 593 | return (BoolAnnotationValue) | 596 | return (BoolAnnotationValue) |
461 | 594 | ((theFlags1 & DEREFERENCES_NODES_MASK) >> DEREFERENCES_NODES); | 597 | ((theAnnotationFlags & DEREFERENCES_NODES_MASK) >> DEREFERENCES_NODES); |
462 | 595 | } | 598 | } |
463 | 596 | 599 | ||
464 | 597 | 600 | ||
465 | 598 | void expr::setDereferencesNodes(BoolAnnotationValue v) | 601 | void expr::setDereferencesNodes(BoolAnnotationValue v) |
466 | 599 | { | 602 | { |
469 | 600 | theFlags1 &= ~DEREFERENCES_NODES_MASK; | 603 | theAnnotationFlags &= ~DEREFERENCES_NODES_MASK; |
470 | 601 | theFlags1 |= (v << DEREFERENCES_NODES); | 604 | theAnnotationFlags |= (v << DEREFERENCES_NODES); |
471 | 602 | } | 605 | } |
472 | 603 | 606 | ||
473 | 604 | 607 | ||
474 | @@ -620,14 +623,14 @@ | |||
475 | 620 | BoolAnnotationValue expr::getMustCopyNodes() const | 623 | BoolAnnotationValue expr::getMustCopyNodes() const |
476 | 621 | { | 624 | { |
477 | 622 | return (BoolAnnotationValue) | 625 | return (BoolAnnotationValue) |
479 | 623 | ((theFlags1 & MUST_COPY_NODES_MASK) >> MUST_COPY_NODES); | 626 | ((theAnnotationFlags & MUST_COPY_NODES_MASK) >> MUST_COPY_NODES); |
480 | 624 | } | 627 | } |
481 | 625 | 628 | ||
482 | 626 | 629 | ||
483 | 627 | void expr::setMustCopyNodes(BoolAnnotationValue v) | 630 | void expr::setMustCopyNodes(BoolAnnotationValue v) |
484 | 628 | { | 631 | { |
487 | 629 | theFlags1 &= ~MUST_COPY_NODES_MASK; | 632 | theAnnotationFlags &= ~MUST_COPY_NODES_MASK; |
488 | 630 | theFlags1 |= (v << MUST_COPY_NODES); | 633 | theAnnotationFlags |= (v << MUST_COPY_NODES); |
489 | 631 | } | 634 | } |
490 | 632 | 635 | ||
491 | 633 | 636 | ||
492 | 634 | 637 | ||
493 | === modified file 'src/compiler/expression/expr_base.h' | |||
494 | --- src/compiler/expression/expr_base.h 2012-10-26 07:13:42 +0000 | |||
495 | +++ src/compiler/expression/expr_base.h 2012-12-06 22:51:20 +0000 | |||
496 | @@ -169,6 +169,11 @@ | |||
497 | 169 | DEREFERENCES_NODES_MASK = 0xC00000 | 169 | DEREFERENCES_NODES_MASK = 0xC00000 |
498 | 170 | } AnnotationMask; | 170 | } AnnotationMask; |
499 | 171 | 171 | ||
500 | 172 | typedef enum | ||
501 | 173 | { | ||
502 | 174 | IN_TYPE_COMPUTE = 0x1 | ||
503 | 175 | } BoolFlags; | ||
504 | 176 | |||
505 | 172 | 177 | ||
506 | 173 | protected: | 178 | protected: |
507 | 174 | static expr* iter_end_expr; | 179 | static expr* iter_end_expr; |
508 | @@ -189,12 +194,14 @@ | |||
509 | 189 | 194 | ||
510 | 190 | xqtref_t theType; | 195 | xqtref_t theType; |
511 | 191 | 196 | ||
513 | 192 | uint32_t theFlags1; | 197 | uint32_t theAnnotationFlags; |
514 | 198 | |||
515 | 199 | uint8_t theBoolFlags; | ||
516 | 200 | |||
517 | 201 | uint8_t theVisitId; | ||
518 | 193 | 202 | ||
519 | 194 | FreeVars theFreeVars; | 203 | FreeVars theFreeVars; |
520 | 195 | 204 | ||
521 | 196 | int theVisitId; | ||
522 | 197 | |||
523 | 198 | public: | 205 | public: |
524 | 199 | static bool is_sequential(unsigned short theScriptingKind); | 206 | static bool is_sequential(unsigned short theScriptingKind); |
525 | 200 | 207 | ||
526 | @@ -224,9 +231,9 @@ | |||
527 | 224 | 231 | ||
528 | 225 | void set_loc(const QueryLoc& loc) { theLoc = loc; } | 232 | void set_loc(const QueryLoc& loc) { theLoc = loc; } |
529 | 226 | 233 | ||
531 | 227 | uint32_t getFlags() const { return theFlags1; } | 234 | uint32_t getAnnotationFlags() const { return theAnnotationFlags; } |
532 | 228 | 235 | ||
534 | 229 | void setFlags(uint32_t flags) { theFlags1 = flags; } | 236 | void setAnnotationFlags(uint32_t flags) { theAnnotationFlags = flags; } |
535 | 230 | 237 | ||
536 | 231 | unsigned short get_scripting_detail() const { return theScriptingKind; } | 238 | unsigned short get_scripting_detail() const { return theScriptingKind; } |
537 | 232 | 239 | ||
538 | @@ -263,6 +270,20 @@ | |||
539 | 263 | std::string toString() const; | 270 | std::string toString() const; |
540 | 264 | 271 | ||
541 | 265 | public: | 272 | public: |
542 | 273 | // | ||
543 | 274 | void setVisitId(uint8_t id) { theVisitId = id; } | ||
544 | 275 | |||
545 | 276 | bool isVisited(uint8_t id) const { return theVisitId == id; } | ||
546 | 277 | |||
547 | 278 | uint8_t getVisitId() const { return theVisitId; } | ||
548 | 279 | |||
549 | 280 | // Transient flag used only during the type computation for global vars | ||
550 | 281 | bool isInTypeCompute() const { return theBoolFlags & IN_TYPE_COMPUTE; } | ||
551 | 282 | |||
552 | 283 | void setInTypeCompute() { theBoolFlags |= IN_TYPE_COMPUTE; } | ||
553 | 284 | |||
554 | 285 | void resetInTypeCompute() { theBoolFlags &= ~IN_TYPE_COMPUTE; } | ||
555 | 286 | |||
556 | 266 | // Annotation : produces-sorted-nodes | 287 | // Annotation : produces-sorted-nodes |
557 | 267 | BoolAnnotationValue getProducesSortedNodes() const; | 288 | BoolAnnotationValue getProducesSortedNodes() const; |
558 | 268 | 289 | ||
559 | @@ -351,12 +372,6 @@ | |||
560 | 351 | void setFreeVars(FreeVars& s); | 372 | void setFreeVars(FreeVars& s); |
561 | 352 | 373 | ||
562 | 353 | // | 374 | // |
563 | 354 | void setVisitId(int id) { theVisitId = id; } | ||
564 | 355 | |||
565 | 356 | bool isVisited(int id) const { return theVisitId == id; } | ||
566 | 357 | |||
567 | 358 | int getVisitId() const { return theVisitId; } | ||
568 | 359 | |||
569 | 360 | bool is_constant() const; | 375 | bool is_constant() const; |
570 | 361 | 376 | ||
571 | 362 | bool is_nondeterministic() const; | 377 | bool is_nondeterministic() const; |
572 | 363 | 378 | ||
573 | === modified file 'src/compiler/expression/expr_clone.cpp' | |||
574 | --- src/compiler/expression/expr_clone.cpp 2012-10-24 11:32:56 +0000 | |||
575 | +++ src/compiler/expression/expr_clone.cpp 2012-12-06 22:51:20 +0000 | |||
576 | @@ -618,7 +618,7 @@ | |||
577 | 618 | udf, | 618 | udf, |
578 | 619 | theLoc, | 619 | theLoc, |
579 | 620 | varCopy, | 620 | varCopy, |
581 | 621 | (e->theInitExpr ? e->theInitExpr->clone(udf, subst) : NULL)); | 621 | (e->theExpr ? e->theExpr->clone(udf, subst) : NULL)); |
582 | 622 | 622 | ||
583 | 623 | break; | 623 | break; |
584 | 624 | } | 624 | } |
585 | 625 | 625 | ||
586 | === modified file 'src/compiler/expression/expr_iter.cpp' | |||
587 | --- src/compiler/expression/expr_iter.cpp 2012-10-24 11:32:56 +0000 | |||
588 | +++ src/compiler/expression/expr_iter.cpp 2012-12-06 22:51:20 +0000 | |||
589 | @@ -825,8 +825,8 @@ | |||
590 | 825 | 825 | ||
591 | 826 | EXPR_ITER_BEGIN(); | 826 | EXPR_ITER_BEGIN(); |
592 | 827 | 827 | ||
595 | 828 | if (varDeclExpr->theInitExpr) | 828 | if (varDeclExpr->theExpr) |
596 | 829 | EXPR_ITER_NEXT(varDeclExpr->theInitExpr); | 829 | EXPR_ITER_NEXT(varDeclExpr->theExpr); |
597 | 830 | 830 | ||
598 | 831 | EXPR_ITER_END(); | 831 | EXPR_ITER_END(); |
599 | 832 | return; | 832 | return; |
600 | 833 | 833 | ||
601 | === modified file 'src/compiler/expression/expr_put.cpp' | |||
602 | --- src/compiler/expression/expr_put.cpp 2012-10-30 10:02:56 +0000 | |||
603 | +++ src/compiler/expression/expr_put.cpp 2012-12-06 22:51:20 +0000 | |||
604 | @@ -462,8 +462,8 @@ | |||
605 | 462 | BEGIN_PUT(var_decl_expr); | 462 | BEGIN_PUT(var_decl_expr); |
606 | 463 | 463 | ||
607 | 464 | theVarExpr->put(os); | 464 | theVarExpr->put(os); |
610 | 465 | if (theInitExpr) | 465 | if (theExpr) |
611 | 466 | theInitExpr->put(os); | 466 | theExpr->put(os); |
612 | 467 | 467 | ||
613 | 468 | END_PUT(); | 468 | END_PUT(); |
614 | 469 | } | 469 | } |
615 | 470 | 470 | ||
616 | === modified file 'src/compiler/expression/expr_type.cpp' | |||
617 | --- src/compiler/expression/expr_type.cpp 2012-10-31 08:02:16 +0000 | |||
618 | +++ src/compiler/expression/expr_type.cpp 2012-12-06 22:51:20 +0000 | |||
619 | @@ -31,6 +31,9 @@ | |||
620 | 31 | #include "compiler/expression/var_expr.h" | 31 | #include "compiler/expression/var_expr.h" |
621 | 32 | #include "compiler/expression/expr.h" | 32 | #include "compiler/expression/expr.h" |
622 | 33 | #include "compiler/expression/expr_iter.h" | 33 | #include "compiler/expression/expr_iter.h" |
623 | 34 | |||
624 | 35 | #include "compiler/api/compilercb.h" | ||
625 | 36 | |||
626 | 34 | #include "compiler/xqddf/collection_decl.h" | 37 | #include "compiler/xqddf/collection_decl.h" |
627 | 35 | 38 | ||
628 | 36 | #include "functions/function.h" | 39 | #include "functions/function.h" |
629 | @@ -118,9 +121,9 @@ | |||
630 | 118 | 121 | ||
631 | 119 | TypeConstants::quantifier_t quant = TypeConstants::QUANT_ONE; | 122 | TypeConstants::quantifier_t quant = TypeConstants::QUANT_ONE; |
632 | 120 | 123 | ||
634 | 121 | ulong numClauses = e->num_clauses(); | 124 | csize numClauses = e->num_clauses(); |
635 | 122 | 125 | ||
637 | 123 | for (ulong i = 0; i < numClauses && quant != TypeConstants::QUANT_STAR; ++i) | 126 | for (csize i = 0; i < numClauses && quant != TypeConstants::QUANT_STAR; ++i) |
638 | 124 | { | 127 | { |
639 | 125 | const flwor_clause* c = e->theClauses[i]; | 128 | const flwor_clause* c = e->theClauses[i]; |
640 | 126 | 129 | ||
641 | @@ -213,8 +216,38 @@ | |||
642 | 213 | } | 216 | } |
643 | 214 | case var_expr::prolog_var: | 217 | case var_expr::prolog_var: |
644 | 215 | { | 218 | { |
646 | 216 | // For const global vars, their type is set in | 219 | // NOTE: For const global vars, their declared type is set to the |
647 | 220 | // type of their init expr, if any. This is done in | ||
648 | 217 | // translator::end_visit(const GlobalVarDecl& v, void*) | 221 | // translator::end_visit(const GlobalVarDecl& v, void*) |
649 | 222 | |||
650 | 223 | csize numSetExprs = e->num_set_exprs(); | ||
651 | 224 | |||
652 | 225 | if (e->get_ccb()->getPhase() == CompilerCB::OPTIMIZATION && | ||
653 | 226 | numSetExprs > 0 && | ||
654 | 227 | !e->is_external() && | ||
655 | 228 | !e->isInTypeCompute()) | ||
656 | 229 | { | ||
657 | 230 | e->setInTypeCompute(); | ||
658 | 231 | |||
659 | 232 | var_set_expr* setExpr = e->get_set_expr(0); | ||
660 | 233 | |||
661 | 234 | derivedType = setExpr->get_expr()->get_return_type(); | ||
662 | 235 | |||
663 | 236 | for (csize i = 1; i < numSetExprs; ++i) | ||
664 | 237 | { | ||
665 | 238 | if (derivedType == rtm.ITEM_TYPE_STAR) | ||
666 | 239 | break; | ||
667 | 240 | |||
668 | 241 | setExpr = e->get_set_expr(i); | ||
669 | 242 | |||
670 | 243 | derivedType = TypeOps::union_type(*derivedType, | ||
671 | 244 | *setExpr->get_expr()->get_return_type(), | ||
672 | 245 | tm); | ||
673 | 246 | } | ||
674 | 247 | |||
675 | 248 | e->resetInTypeCompute(); | ||
676 | 249 | } | ||
677 | 250 | |||
678 | 218 | break; | 251 | break; |
679 | 219 | } | 252 | } |
680 | 220 | case var_expr::local_var: // TODO: compute derived type for const local vars. | 253 | case var_expr::local_var: // TODO: compute derived type for const local vars. |
681 | 221 | 254 | ||
682 | === modified file 'src/compiler/expression/script_exprs.cpp' | |||
683 | --- src/compiler/expression/script_exprs.cpp 2012-10-24 11:32:56 +0000 | |||
684 | +++ src/compiler/expression/script_exprs.cpp 2012-12-06 22:51:20 +0000 | |||
685 | @@ -208,17 +208,11 @@ | |||
686 | 208 | var_expr* varExpr, | 208 | var_expr* varExpr, |
687 | 209 | expr* initExpr) | 209 | expr* initExpr) |
688 | 210 | : | 210 | : |
692 | 211 | expr(ccb, sctx, udf, loc, var_decl_expr_kind), | 211 | var_set_expr(ccb, sctx, udf, loc, varExpr, initExpr, true) |
690 | 212 | theVarExpr(varExpr), | ||
691 | 213 | theInitExpr(initExpr) | ||
693 | 214 | { | 212 | { |
694 | 213 | theKind = var_decl_expr_kind; | ||
695 | 214 | |||
696 | 215 | compute_scripting_kind(); | 215 | compute_scripting_kind(); |
697 | 216 | |||
698 | 217 | // var_decl_expr is unfoldable because it requires access to the dyn ctx. | ||
699 | 218 | setUnfoldable(ANNOTATION_TRUE_FIXED); | ||
700 | 219 | |||
701 | 220 | if (initExpr) | ||
702 | 221 | varExpr->add_set_expr(this); | ||
703 | 222 | } | 216 | } |
704 | 223 | 217 | ||
705 | 224 | 218 | ||
706 | @@ -234,17 +228,17 @@ | |||
707 | 234 | void var_decl_expr::compute_scripting_kind() | 228 | void var_decl_expr::compute_scripting_kind() |
708 | 235 | { | 229 | { |
709 | 236 | if (theVarExpr->get_kind() == var_expr::prolog_var) | 230 | if (theVarExpr->get_kind() == var_expr::prolog_var) |
711 | 237 | checkSimpleExpr(theInitExpr); | 231 | checkSimpleExpr(theExpr); |
712 | 238 | else | 232 | else |
714 | 239 | checkNonUpdating(theInitExpr); | 233 | checkNonUpdating(theExpr); |
715 | 240 | 234 | ||
717 | 241 | if (theInitExpr == NULL) | 235 | if (theExpr == NULL) |
718 | 242 | { | 236 | { |
719 | 243 | theScriptingKind = SIMPLE_EXPR; | 237 | theScriptingKind = SIMPLE_EXPR; |
720 | 244 | } | 238 | } |
721 | 245 | else | 239 | else |
722 | 246 | { | 240 | { |
724 | 247 | theScriptingKind = theInitExpr->get_scripting_detail(); | 241 | theScriptingKind = theExpr->get_scripting_detail(); |
725 | 248 | } | 242 | } |
726 | 249 | } | 243 | } |
727 | 250 | 244 | ||
728 | @@ -258,7 +252,8 @@ | |||
729 | 258 | user_function* udf, | 252 | user_function* udf, |
730 | 259 | const QueryLoc& loc, | 253 | const QueryLoc& loc, |
731 | 260 | var_expr* varExpr, | 254 | var_expr* varExpr, |
733 | 261 | expr* setExpr) | 255 | expr* setExpr, |
734 | 256 | bool isDecl) | ||
735 | 262 | : | 257 | : |
736 | 263 | expr(ccb, sctx, udf, loc, var_set_expr_kind), | 258 | expr(ccb, sctx, udf, loc, var_set_expr_kind), |
737 | 264 | theVarExpr(varExpr), | 259 | theVarExpr(varExpr), |
738 | @@ -267,12 +262,15 @@ | |||
739 | 267 | assert(varExpr->get_kind() == var_expr::prolog_var || | 262 | assert(varExpr->get_kind() == var_expr::prolog_var || |
740 | 268 | varExpr->get_kind() == var_expr::local_var); | 263 | varExpr->get_kind() == var_expr::local_var); |
741 | 269 | 264 | ||
743 | 270 | compute_scripting_kind(); | 265 | if (!isDecl) |
744 | 266 | compute_scripting_kind(); | ||
745 | 271 | 267 | ||
747 | 272 | // var_set_expr is unfoldable because it requires access to the dyn ctx. | 268 | // var_set_expr and var_decl_expr are unfoldable because they require access |
748 | 269 | // to the dyn ctx. | ||
749 | 273 | setUnfoldable(ANNOTATION_TRUE_FIXED); | 270 | setUnfoldable(ANNOTATION_TRUE_FIXED); |
750 | 274 | 271 | ||
752 | 275 | varExpr->add_set_expr(this); | 272 | if (setExpr) |
753 | 273 | varExpr->add_set_expr(this); | ||
754 | 276 | } | 274 | } |
755 | 277 | 275 | ||
756 | 278 | 276 | ||
757 | 279 | 277 | ||
758 | === modified file 'src/compiler/expression/script_exprs.h' | |||
759 | --- src/compiler/expression/script_exprs.h 2012-10-24 11:32:56 +0000 | |||
760 | +++ src/compiler/expression/script_exprs.h 2012-12-06 22:51:20 +0000 | |||
761 | @@ -181,6 +181,52 @@ | |||
762 | 181 | 181 | ||
763 | 182 | /******************************************************************************* | 182 | /******************************************************************************* |
764 | 183 | 183 | ||
765 | 184 | AssignStatement ::= "$" VarName ":=" ExprSingle ";" | ||
766 | 185 | |||
767 | 186 | The RHS of the assignment must be a non-updating expr. | ||
768 | 187 | |||
769 | 188 | var_set_expr is used to assign a value to a prolog or block-local var. During | ||
770 | 189 | runtime, the function computes theExpr and stores the resulting value inside | ||
771 | 190 | the appropriate dynamic ctx (global or local), at the location that is identified | ||
772 | 191 | by the variable id. | ||
773 | 192 | ********************************************************************************/ | ||
774 | 193 | class var_set_expr : public expr | ||
775 | 194 | { | ||
776 | 195 | friend class ExprManager; | ||
777 | 196 | friend class ExprIterator; | ||
778 | 197 | friend class expr; | ||
779 | 198 | |||
780 | 199 | protected: | ||
781 | 200 | var_expr * theVarExpr; | ||
782 | 201 | expr * theExpr; | ||
783 | 202 | |||
784 | 203 | protected: | ||
785 | 204 | var_set_expr( | ||
786 | 205 | CompilerCB* ccb, | ||
787 | 206 | static_context* sctx, | ||
788 | 207 | user_function* udf, | ||
789 | 208 | const QueryLoc& loc, | ||
790 | 209 | var_expr* varExpr, | ||
791 | 210 | expr* setExpr, | ||
792 | 211 | bool isDecl = false); | ||
793 | 212 | |||
794 | 213 | public: | ||
795 | 214 | ~var_set_expr(); | ||
796 | 215 | |||
797 | 216 | var_expr* get_var_expr() const { return theVarExpr; } | ||
798 | 217 | |||
799 | 218 | expr* get_expr() const { return theExpr; } | ||
800 | 219 | |||
801 | 220 | void compute_scripting_kind(); | ||
802 | 221 | |||
803 | 222 | void accept(expr_visitor&); | ||
804 | 223 | |||
805 | 224 | std::ostream& put(std::ostream&) const; | ||
806 | 225 | }; | ||
807 | 226 | |||
808 | 227 | |||
809 | 228 | /******************************************************************************* | ||
810 | 229 | |||
811 | 184 | For Global Var: | 230 | For Global Var: |
812 | 185 | ---------------- | 231 | ---------------- |
813 | 186 | 232 | ||
814 | @@ -207,17 +253,13 @@ | |||
815 | 207 | Note: the init expr must be non-updating. For global vars, it must also be | 253 | Note: the init expr must be non-updating. For global vars, it must also be |
816 | 208 | non-sequential. | 254 | non-sequential. |
817 | 209 | ********************************************************************************/ | 255 | ********************************************************************************/ |
819 | 210 | class var_decl_expr : public expr | 256 | class var_decl_expr : public var_set_expr |
820 | 211 | { | 257 | { |
821 | 212 | friend class ExprManager; | 258 | friend class ExprManager; |
822 | 213 | friend class ExprIterator; | 259 | friend class ExprIterator; |
823 | 214 | friend class expr; | 260 | friend class expr; |
824 | 215 | 261 | ||
825 | 216 | protected: | 262 | protected: |
826 | 217 | var_expr * theVarExpr; | ||
827 | 218 | expr * theInitExpr; | ||
828 | 219 | |||
829 | 220 | protected: | ||
830 | 221 | var_decl_expr( | 263 | var_decl_expr( |
831 | 222 | CompilerCB* ccb, | 264 | CompilerCB* ccb, |
832 | 223 | static_context* sctx, | 265 | static_context* sctx, |
833 | @@ -229,54 +271,7 @@ | |||
834 | 229 | public: | 271 | public: |
835 | 230 | ~var_decl_expr(); | 272 | ~var_decl_expr(); |
836 | 231 | 273 | ||
885 | 232 | var_expr* get_var_expr() const { return theVarExpr; } | 274 | expr* get_init_expr() const { return theExpr; } |
838 | 233 | |||
839 | 234 | expr* get_init_expr() const { return theInitExpr; } | ||
840 | 235 | |||
841 | 236 | void compute_scripting_kind(); | ||
842 | 237 | |||
843 | 238 | void accept(expr_visitor&); | ||
844 | 239 | |||
845 | 240 | std::ostream& put(std::ostream&) const; | ||
846 | 241 | }; | ||
847 | 242 | |||
848 | 243 | |||
849 | 244 | /******************************************************************************* | ||
850 | 245 | |||
851 | 246 | AssignStatement ::= "$" VarName ":=" ExprSingle ";" | ||
852 | 247 | |||
853 | 248 | The RHS of the assignment must be a non-updating expr. | ||
854 | 249 | |||
855 | 250 | var_set_expr is used to assign a value to a prolog or block-local var. During | ||
856 | 251 | runtime, the function computes theExpr and stores the resulting value inside | ||
857 | 252 | the appropriate dynamic ctx (global or local), at the location that is identified | ||
858 | 253 | by the variable id. | ||
859 | 254 | ********************************************************************************/ | ||
860 | 255 | class var_set_expr : public expr | ||
861 | 256 | { | ||
862 | 257 | friend class ExprManager; | ||
863 | 258 | friend class ExprIterator; | ||
864 | 259 | friend class expr; | ||
865 | 260 | |||
866 | 261 | protected: | ||
867 | 262 | var_expr * theVarExpr; | ||
868 | 263 | expr * theExpr; | ||
869 | 264 | |||
870 | 265 | protected: | ||
871 | 266 | var_set_expr( | ||
872 | 267 | CompilerCB* ccb, | ||
873 | 268 | static_context* sctx, | ||
874 | 269 | user_function* udf, | ||
875 | 270 | const QueryLoc& loc, | ||
876 | 271 | var_expr* varExpr, | ||
877 | 272 | expr* setExpr); | ||
878 | 273 | |||
879 | 274 | public: | ||
880 | 275 | ~var_set_expr(); | ||
881 | 276 | |||
882 | 277 | var_expr* get_var_expr() const { return theVarExpr; } | ||
883 | 278 | |||
884 | 279 | expr* get_expr() const { return theExpr; } | ||
886 | 280 | 275 | ||
887 | 281 | void compute_scripting_kind(); | 276 | void compute_scripting_kind(); |
888 | 282 | 277 | ||
889 | 283 | 278 | ||
890 | === modified file 'src/compiler/expression/var_expr.cpp' | |||
891 | --- src/compiler/expression/var_expr.cpp 2012-10-31 08:02:16 +0000 | |||
892 | +++ src/compiler/expression/var_expr.cpp 2012-12-06 22:51:20 +0000 | |||
893 | @@ -18,6 +18,7 @@ | |||
894 | 18 | #include "functions/udf.h" | 18 | #include "functions/udf.h" |
895 | 19 | 19 | ||
896 | 20 | #include "compiler/expression/var_expr.h" | 20 | #include "compiler/expression/var_expr.h" |
897 | 21 | #include "compiler/expression/script_exprs.h" | ||
898 | 21 | #include "compiler/expression/update_exprs.h" | 22 | #include "compiler/expression/update_exprs.h" |
899 | 22 | #include "compiler/expression/flwor_expr.h" | 23 | #include "compiler/expression/flwor_expr.h" |
900 | 23 | #include "compiler/expression/expr_visitor.h" | 24 | #include "compiler/expression/expr_visitor.h" |
901 | @@ -300,13 +301,25 @@ | |||
902 | 300 | /******************************************************************************* | 301 | /******************************************************************************* |
903 | 301 | 302 | ||
904 | 302 | ********************************************************************************/ | 303 | ********************************************************************************/ |
905 | 304 | void var_expr::add_set_expr(expr* e) | ||
906 | 305 | { | ||
907 | 306 | assert(e->get_expr_kind() == var_decl_expr_kind || | ||
908 | 307 | e->get_expr_kind() == var_set_expr_kind); | ||
909 | 308 | |||
910 | 309 | theSetExprs.push_back(static_cast<var_set_expr*>(e)); | ||
911 | 310 | } | ||
912 | 311 | |||
913 | 312 | |||
914 | 313 | /******************************************************************************* | ||
915 | 314 | |||
916 | 315 | ********************************************************************************/ | ||
917 | 303 | void var_expr::remove_set_expr(expr* e) | 316 | void var_expr::remove_set_expr(expr* e) |
918 | 304 | { | 317 | { |
919 | 305 | assert(theVarKind == local_var || theVarKind == prolog_var); | 318 | assert(theVarKind == local_var || theVarKind == prolog_var); |
920 | 306 | 319 | ||
921 | 307 | bool found = false; | 320 | bool found = false; |
924 | 308 | std::vector<expr*>::iterator ite = theSetExprs.begin(); | 321 | VarSetExprs::iterator ite = theSetExprs.begin(); |
925 | 309 | std::vector<expr*>::iterator end = theSetExprs.end(); | 322 | VarSetExprs::iterator end = theSetExprs.end(); |
926 | 310 | for (; ite != end; ++ite) | 323 | for (; ite != end; ++ite) |
927 | 311 | { | 324 | { |
928 | 312 | if (*ite == e) | 325 | if (*ite == e) |
929 | 313 | 326 | ||
930 | === modified file 'src/compiler/expression/var_expr.h' | |||
931 | --- src/compiler/expression/var_expr.h 2012-10-26 07:13:42 +0000 | |||
932 | +++ src/compiler/expression/var_expr.h 2012-12-06 22:51:20 +0000 | |||
933 | @@ -28,6 +28,8 @@ | |||
934 | 28 | class copy_clause; | 28 | class copy_clause; |
935 | 29 | class var_expr; | 29 | class var_expr; |
936 | 30 | class VarInfo; | 30 | class VarInfo; |
937 | 31 | class var_set_expr; | ||
938 | 32 | |||
939 | 31 | 33 | ||
940 | 32 | /****************************************************************************** | 34 | /****************************************************************************** |
941 | 33 | 35 | ||
942 | @@ -116,6 +118,8 @@ | |||
943 | 116 | friend class ExprManager; | 118 | friend class ExprManager; |
944 | 117 | 119 | ||
945 | 118 | public: | 120 | public: |
946 | 121 | typedef std::vector<var_set_expr*> VarSetExprs; | ||
947 | 122 | |||
948 | 119 | enum var_kind | 123 | enum var_kind |
949 | 120 | { | 124 | { |
950 | 121 | unknown_var = 0, | 125 | unknown_var = 0, |
951 | @@ -161,7 +165,7 @@ | |||
952 | 161 | 165 | ||
953 | 162 | csize theParamPos; | 166 | csize theParamPos; |
954 | 163 | 167 | ||
956 | 164 | std::vector<expr*> theSetExprs; | 168 | VarSetExprs theSetExprs; |
957 | 165 | 169 | ||
958 | 166 | VarInfo * theVarInfo; | 170 | VarInfo * theVarInfo; |
959 | 167 | 171 | ||
960 | @@ -244,17 +248,17 @@ | |||
961 | 244 | 248 | ||
962 | 245 | void set_param_pos(csize pos) { theParamPos = pos; } | 249 | void set_param_pos(csize pos) { theParamPos = pos; } |
963 | 246 | 250 | ||
965 | 247 | void add_set_expr(expr* e) { theSetExprs.push_back(e); } | 251 | void add_set_expr(expr* e); |
966 | 248 | 252 | ||
967 | 249 | void remove_set_expr(expr* e); | 253 | void remove_set_expr(expr* e); |
968 | 250 | 254 | ||
969 | 251 | csize num_set_exprs() const { return theSetExprs.size(); } | 255 | csize num_set_exprs() const { return theSetExprs.size(); } |
970 | 252 | 256 | ||
976 | 253 | expr* get_set_expr(csize i) const { return theSetExprs[i]; } | 257 | var_set_expr* get_set_expr(csize i) const { return theSetExprs[i]; } |
977 | 254 | 258 | ||
978 | 255 | std::vector<expr*>::const_iterator setExprsBegin() const { return theSetExprs.begin(); } | 259 | VarSetExprs::const_iterator setExprsBegin() const { return theSetExprs.begin(); } |
979 | 256 | 260 | ||
980 | 257 | std::vector<expr*>::const_iterator setExprsEnd() const { return theSetExprs.end(); } | 261 | VarSetExprs::const_iterator setExprsEnd() const { return theSetExprs.end(); } |
981 | 258 | 262 | ||
982 | 259 | bool is_context_item() const; | 263 | bool is_context_item() const; |
983 | 260 | 264 | ||
984 | 261 | 265 | ||
985 | === modified file 'src/compiler/rewriter/rules/hoist_rules.cpp' | |||
986 | --- src/compiler/rewriter/rules/hoist_rules.cpp 2012-10-29 11:41:36 +0000 | |||
987 | +++ src/compiler/rewriter/rules/hoist_rules.cpp 2012-12-06 22:51:20 +0000 | |||
988 | @@ -484,7 +484,7 @@ | |||
989 | 484 | expr* hoisted = rCtx.theEM-> | 484 | expr* hoisted = rCtx.theEM-> |
990 | 485 | create_fo_expr(sctx, udf, loc, BUILTIN_FUNC(OP_HOIST_1), e); | 485 | create_fo_expr(sctx, udf, loc, BUILTIN_FUNC(OP_HOIST_1), e); |
991 | 486 | 486 | ||
993 | 487 | hoisted->setFlags(e->getFlags()); | 487 | hoisted->setAnnotationFlags(e->getAnnotationFlags()); |
994 | 488 | //letvar->setFlags(e->getFlags()); | 488 | //letvar->setFlags(e->getFlags()); |
995 | 489 | 489 | ||
996 | 490 | let_clause* flref(rCtx.theEM->create_let_clause(sctx, loc, letvar, hoisted)); | 490 | let_clause* flref(rCtx.theEM->create_let_clause(sctx, loc, letvar, hoisted)); |
997 | @@ -523,7 +523,7 @@ | |||
998 | 523 | loc, | 523 | loc, |
999 | 524 | BUILTIN_FUNC(OP_UNHOIST_1), | 524 | BUILTIN_FUNC(OP_UNHOIST_1), |
1000 | 525 | rCtx.theEM->create_wrapper_expr(sctx, udf, loc, letvar)); | 525 | rCtx.theEM->create_wrapper_expr(sctx, udf, loc, letvar)); |
1002 | 526 | unhoisted->setFlags(e->getFlags()); | 526 | unhoisted->setAnnotationFlags(e->getAnnotationFlags()); |
1003 | 527 | 527 | ||
1004 | 528 | return unhoisted; | 528 | return unhoisted; |
1005 | 529 | } | 529 | } |
1006 | 530 | 530 | ||
1007 | === modified file 'src/compiler/rewriter/rules/index_join_rule.cpp' | |||
1008 | --- src/compiler/rewriter/rules/index_join_rule.cpp 2012-11-02 20:00:13 +0000 | |||
1009 | +++ src/compiler/rewriter/rules/index_join_rule.cpp 2012-12-06 22:51:20 +0000 | |||
1010 | @@ -309,7 +309,7 @@ | |||
1011 | 309 | { | 309 | { |
1012 | 310 | // Normally, other rewrite rules should have added the necessary casting | 310 | // Normally, other rewrite rules should have added the necessary casting |
1013 | 311 | // to the eq operands so that their static types have quantifiers ONE | 311 | // to the eq operands so that their static types have quantifiers ONE |
1015 | 312 | // or QUESTION and the associated prime types are not xs:untypedAtomic. | 312 | // or QUESTION and the associated prime types are not xs:anyAtomicType. |
1016 | 313 | // But just in case those rules have been disabled, we check again here | 313 | // But just in case those rules have been disabled, we check again here |
1017 | 314 | // and reject the hashjoin rewrite if these condition are violated. | 314 | // and reject the hashjoin rewrite if these condition are violated. |
1018 | 315 | 315 | ||
1019 | @@ -323,10 +323,11 @@ | |||
1020 | 323 | 323 | ||
1021 | 324 | // The type of the outer/inner operands in the join predicate must not be | 324 | // The type of the outer/inner operands in the join predicate must not be |
1022 | 325 | // xs:untypedAtomic or xs:anyAtomic. | 325 | // xs:untypedAtomic or xs:anyAtomic. |
1023 | 326 | /* | ||
1024 | 326 | if (TypeOps::is_equal(tm, *primeOuterType, *rtm.UNTYPED_ATOMIC_TYPE_ONE, outerLoc) || | 327 | if (TypeOps::is_equal(tm, *primeOuterType, *rtm.UNTYPED_ATOMIC_TYPE_ONE, outerLoc) || |
1025 | 327 | TypeOps::is_equal(tm, *primeInnerType, *rtm.UNTYPED_ATOMIC_TYPE_ONE, innerLoc)) | 328 | TypeOps::is_equal(tm, *primeInnerType, *rtm.UNTYPED_ATOMIC_TYPE_ONE, innerLoc)) |
1026 | 328 | return false; | 329 | return false; |
1028 | 329 | 330 | */ | |
1029 | 330 | if (TypeOps::is_equal(tm, *primeOuterType, *rtm.ANY_ATOMIC_TYPE_ONE, outerLoc) || | 331 | if (TypeOps::is_equal(tm, *primeOuterType, *rtm.ANY_ATOMIC_TYPE_ONE, outerLoc) || |
1030 | 331 | TypeOps::is_equal(tm, *primeInnerType, *rtm.ANY_ATOMIC_TYPE_ONE, innerLoc)) | 332 | TypeOps::is_equal(tm, *primeInnerType, *rtm.ANY_ATOMIC_TYPE_ONE, innerLoc)) |
1031 | 332 | return false; | 333 | return false; |
1032 | 333 | 334 | ||
1033 | === modified file 'src/compiler/rewriter/rules/nodeid_rules.cpp' | |||
1034 | --- src/compiler/rewriter/rules/nodeid_rules.cpp 2012-10-31 08:02:16 +0000 | |||
1035 | +++ src/compiler/rewriter/rules/nodeid_rules.cpp 2012-12-06 22:51:20 +0000 | |||
1036 | @@ -1161,24 +1161,12 @@ | |||
1037 | 1161 | { | 1161 | { |
1038 | 1162 | e->setVisitId(1); | 1162 | e->setVisitId(1); |
1039 | 1163 | 1163 | ||
1042 | 1164 | std::vector<expr*>::const_iterator ite = e->setExprsBegin(); | 1164 | var_expr::VarSetExprs::const_iterator ite = e->setExprsBegin(); |
1043 | 1165 | std::vector<expr*>::const_iterator end = e->setExprsEnd(); | 1165 | var_expr::VarSetExprs::const_iterator end = e->setExprsEnd(); |
1044 | 1166 | 1166 | ||
1045 | 1167 | for (; ite != end; ++ite) | 1167 | for (; ite != end; ++ite) |
1046 | 1168 | { | 1168 | { |
1060 | 1169 | expr* setExpr = *ite; | 1169 | expr* valueExpr = (*ite)->get_expr(); |
1048 | 1170 | expr* valueExpr; | ||
1049 | 1171 | |||
1050 | 1172 | if (setExpr->get_expr_kind() == var_decl_expr_kind) | ||
1051 | 1173 | { | ||
1052 | 1174 | valueExpr = static_cast<var_decl_expr*>(setExpr)->get_init_expr(); | ||
1053 | 1175 | } | ||
1054 | 1176 | else | ||
1055 | 1177 | { | ||
1056 | 1178 | assert(setExpr->get_expr_kind() == var_set_expr_kind); | ||
1057 | 1179 | |||
1058 | 1180 | valueExpr = static_cast<var_set_expr*>(setExpr)->get_expr(); | ||
1059 | 1181 | } | ||
1061 | 1182 | 1170 | ||
1062 | 1183 | findSourcesForNodeExtractors(valueExpr); | 1171 | findSourcesForNodeExtractors(valueExpr); |
1063 | 1184 | } | 1172 | } |
1064 | 1185 | 1173 | ||
1065 | === modified file 'src/compiler/rewriter/rules/type_rules.cpp' | |||
1066 | --- src/compiler/rewriter/rules/type_rules.cpp 2012-10-31 08:02:16 +0000 | |||
1067 | +++ src/compiler/rewriter/rules/type_rules.cpp 2012-12-06 22:51:20 +0000 | |||
1068 | @@ -235,12 +235,10 @@ | |||
1069 | 235 | 235 | ||
1070 | 236 | RULE_REWRITE_POST(SpecializeOperations) | 236 | RULE_REWRITE_POST(SpecializeOperations) |
1071 | 237 | { | 237 | { |
1072 | 238 | const Properties& props = *Properties::instance(); | ||
1073 | 239 | |||
1074 | 240 | RootTypeManager& rtm = GENV_TYPESYSTEM; | 238 | RootTypeManager& rtm = GENV_TYPESYSTEM; |
1075 | 241 | TypeManager* tm = node->get_type_manager(); | 239 | TypeManager* tm = node->get_type_manager(); |
1076 | 242 | |||
1077 | 243 | static_context* sctx = node->get_sctx(); | 240 | static_context* sctx = node->get_sctx(); |
1078 | 241 | user_function* udf = node->get_udf(); | ||
1079 | 244 | 242 | ||
1080 | 245 | if (node->get_expr_kind() == fo_expr_kind) | 243 | if (node->get_expr_kind() == fo_expr_kind) |
1081 | 246 | { | 244 | { |
1082 | @@ -255,7 +253,9 @@ | |||
1083 | 255 | fnKind == FunctionConsts::FN_SUM_2) | 253 | fnKind == FunctionConsts::FN_SUM_2) |
1084 | 256 | { | 254 | { |
1085 | 257 | expr* argExpr = fo->get_arg(0); | 255 | expr* argExpr = fo->get_arg(0); |
1086 | 256 | const QueryLoc& argLoc = argExpr->get_loc(); | ||
1087 | 258 | xqtref_t argType = argExpr->get_return_type(); | 257 | xqtref_t argType = argExpr->get_return_type(); |
1088 | 258 | |||
1089 | 259 | std::vector<xqtref_t> argTypes; | 259 | std::vector<xqtref_t> argTypes; |
1090 | 260 | argTypes.push_back(argType); | 260 | argTypes.push_back(argType); |
1091 | 261 | 261 | ||
1092 | @@ -264,14 +264,11 @@ | |||
1093 | 264 | { | 264 | { |
1094 | 265 | fo->set_func(replacement); | 265 | fo->set_func(replacement); |
1095 | 266 | 266 | ||
1100 | 267 | if (TypeOps::is_subtype(tm, | 267 | if (TypeOps::is_subtype(tm, *argType, *rtm.UNTYPED_ATOMIC_TYPE_STAR, argLoc)) |
1097 | 268 | *argType, | ||
1098 | 269 | *rtm.UNTYPED_ATOMIC_TYPE_STAR, | ||
1099 | 270 | argExpr->get_loc())) | ||
1101 | 271 | { | 268 | { |
1102 | 272 | expr* promoteExpr = rCtx.theEM-> | 269 | expr* promoteExpr = rCtx.theEM-> |
1105 | 273 | create_promote_expr(argExpr->get_sctx(), | 270 | create_promote_expr(sctx, |
1106 | 274 | argExpr->get_udf(), | 271 | udf, |
1107 | 275 | argExpr->get_loc(), | 272 | argExpr->get_loc(), |
1108 | 276 | argExpr, | 273 | argExpr, |
1109 | 277 | rtm.DOUBLE_TYPE_STAR, | 274 | rtm.DOUBLE_TYPE_STAR, |
1110 | @@ -359,7 +356,7 @@ | |||
1111 | 359 | if (t0->max_card() > 1 || t1->max_card() > 1) | 356 | if (t0->max_card() > 1 || t1->max_card() > 1) |
1112 | 360 | return NULL; | 357 | return NULL; |
1113 | 361 | 358 | ||
1115 | 362 | if (props.specializeNum() && fn->isArithmeticFunction()) | 359 | if (fn->isArithmeticFunction()) |
1116 | 363 | { | 360 | { |
1117 | 364 | if (! TypeOps::is_numeric_or_untyped(tm, *t0) || | 361 | if (! TypeOps::is_numeric_or_untyped(tm, *t0) || |
1118 | 365 | ! TypeOps::is_numeric_or_untyped(tm, *t1)) | 362 | ! TypeOps::is_numeric_or_untyped(tm, *t1)) |
1119 | @@ -368,13 +365,38 @@ | |||
1120 | 368 | if (specialize_numeric(fo, sctx, rCtx) != NULL) | 365 | if (specialize_numeric(fo, sctx, rCtx) != NULL) |
1121 | 369 | return node; | 366 | return node; |
1122 | 370 | } | 367 | } |
1126 | 371 | else if (props.specializeCmp() && fn->isComparisonFunction()) | 368 | else if (fn->isGeneralComparisonFunction()) |
1127 | 372 | { | 369 | { |
1128 | 373 | if (fn->isGeneralComparisonFunction()) | 370 | std::vector<xqtref_t> argTypes; |
1129 | 371 | argTypes.push_back(t0); | ||
1130 | 372 | argTypes.push_back(t1); | ||
1131 | 373 | function* replacement = fn->specialize(sctx, argTypes); | ||
1132 | 374 | if (replacement != NULL) | ||
1133 | 375 | { | ||
1134 | 376 | fo->set_func(replacement); | ||
1135 | 377 | return node; | ||
1136 | 378 | } | ||
1137 | 379 | } | ||
1138 | 380 | else if (fn->isValueComparisonFunction()) | ||
1139 | 381 | { | ||
1140 | 382 | xqtref_t stringType = rtm.STRING_TYPE_QUESTION; | ||
1141 | 383 | xqtref_t untypedType = rtm.UNTYPED_ATOMIC_TYPE_QUESTION; | ||
1142 | 384 | |||
1143 | 385 | const QueryLoc& loc0 = arg0->get_loc(); | ||
1144 | 386 | const QueryLoc& loc1 = arg1->get_loc(); | ||
1145 | 387 | |||
1146 | 388 | bool atomicORstring0 = (TypeOps::is_subtype(tm, *t0, *untypedType, loc0) || | ||
1147 | 389 | TypeOps::is_subtype(tm, *t0, *stringType, loc0)); | ||
1148 | 390 | |||
1149 | 391 | bool atomicORstring1 = (TypeOps::is_subtype(tm, *t1, *untypedType, loc1) || | ||
1150 | 392 | TypeOps::is_subtype(tm, *t1, *stringType, loc1)); | ||
1151 | 393 | |||
1152 | 394 | if (atomicORstring0 && atomicORstring1) | ||
1153 | 374 | { | 395 | { |
1154 | 375 | std::vector<xqtref_t> argTypes; | 396 | std::vector<xqtref_t> argTypes; |
1157 | 376 | argTypes.push_back(t0); | 397 | argTypes.push_back(stringType); |
1158 | 377 | argTypes.push_back(t1); | 398 | argTypes.push_back(stringType); |
1159 | 399 | |||
1160 | 378 | function* replacement = fn->specialize(sctx, argTypes); | 400 | function* replacement = fn->specialize(sctx, argTypes); |
1161 | 379 | if (replacement != NULL) | 401 | if (replacement != NULL) |
1162 | 380 | { | 402 | { |
1163 | @@ -382,72 +404,24 @@ | |||
1164 | 382 | return node; | 404 | return node; |
1165 | 383 | } | 405 | } |
1166 | 384 | } | 406 | } |
1168 | 385 | else if (fn->isValueComparisonFunction()) | 407 | else if (TypeOps::is_numeric(tm, *t0) && TypeOps::is_numeric(tm, *t1)) |
1169 | 386 | { | 408 | { |
1234 | 387 | xqtref_t string_type = rtm.STRING_TYPE_QUESTION; | 409 | xqtref_t aType = specialize_numeric(fo, sctx, rCtx); |
1235 | 388 | bool string_cmp = true; | 410 | if (aType != NULL) |
1236 | 389 | expr* nargs[2]; | 411 | { |
1237 | 390 | 412 | if (TypeOps::is_equal(tm, | |
1238 | 391 | for (int i = 0; i < 2; ++i) | 413 | *TypeOps::prime_type(tm, *aType), |
1239 | 392 | { | 414 | *rtm.DECIMAL_TYPE_ONE, |
1240 | 393 | nargs[i] = NULL; | 415 | fo->get_loc()) && |
1241 | 394 | 416 | TypeOps::is_subtype(tm, *t0, *rtm.INTEGER_TYPE_ONE, fo->get_loc())) | |
1242 | 395 | expr* arg = (i == 0 ? arg0 : arg1); | 417 | { |
1243 | 396 | xqtref_t type = (i == 0 ? t0 : t1); | 418 | expr* tmp = fo->get_arg(0); |
1244 | 397 | const QueryLoc& loc = arg->get_loc(); | 419 | fo->set_arg(0, fo->get_arg(1)); |
1245 | 398 | 420 | fo->set_arg(1, tmp); | |
1246 | 399 | if (TypeOps::is_subtype(tm, *type, *rtm.UNTYPED_ATOMIC_TYPE_QUESTION, loc)) | 421 | fo->set_func(flip_value_cmp(fo->get_func()->getKind())); |
1247 | 400 | { | 422 | } |
1248 | 401 | nargs[i] = rCtx.theEM->create_cast_expr(arg->get_sctx(), | 423 | |
1249 | 402 | arg->get_udf(), | 424 | return node; |
1186 | 403 | arg->get_loc(), | ||
1187 | 404 | arg, | ||
1188 | 405 | string_type); | ||
1189 | 406 | } | ||
1190 | 407 | else if (! TypeOps::is_subtype(tm, *type, *string_type, loc)) | ||
1191 | 408 | { | ||
1192 | 409 | string_cmp = false; | ||
1193 | 410 | break; | ||
1194 | 411 | } | ||
1195 | 412 | } | ||
1196 | 413 | |||
1197 | 414 | if (string_cmp) | ||
1198 | 415 | { | ||
1199 | 416 | for (int i = 0; i < 2; i++) | ||
1200 | 417 | { | ||
1201 | 418 | if (nargs[i] != NULL) | ||
1202 | 419 | fo->set_arg(i, nargs[i]); | ||
1203 | 420 | } | ||
1204 | 421 | |||
1205 | 422 | std::vector<xqtref_t> argTypes; | ||
1206 | 423 | argTypes.push_back(string_type); | ||
1207 | 424 | argTypes.push_back(string_type); | ||
1208 | 425 | function* replacement = fn->specialize(sctx, argTypes); | ||
1209 | 426 | if (replacement != NULL) | ||
1210 | 427 | { | ||
1211 | 428 | fo->set_func(replacement); | ||
1212 | 429 | return node; | ||
1213 | 430 | } | ||
1214 | 431 | } | ||
1215 | 432 | else if (TypeOps::is_numeric(tm, *t0) && TypeOps::is_numeric(tm, *t1)) | ||
1216 | 433 | { | ||
1217 | 434 | xqtref_t aType = specialize_numeric(fo, sctx, rCtx); | ||
1218 | 435 | if (aType != NULL) | ||
1219 | 436 | { | ||
1220 | 437 | if (TypeOps::is_equal(tm, | ||
1221 | 438 | *TypeOps::prime_type(tm, *aType), | ||
1222 | 439 | *rtm.DECIMAL_TYPE_ONE, | ||
1223 | 440 | fo->get_loc()) && | ||
1224 | 441 | TypeOps::is_subtype(tm, *t0, *rtm.INTEGER_TYPE_ONE, fo->get_loc())) | ||
1225 | 442 | { | ||
1226 | 443 | expr* tmp = fo->get_arg(0); | ||
1227 | 444 | fo->set_arg(0, fo->get_arg(1)); | ||
1228 | 445 | fo->set_arg(1, tmp); | ||
1229 | 446 | fo->set_func(flip_value_cmp(fo->get_func()->getKind())); | ||
1230 | 447 | } | ||
1231 | 448 | |||
1232 | 449 | return node; | ||
1233 | 450 | } | ||
1250 | 451 | } | 425 | } |
1251 | 452 | } | 426 | } |
1252 | 453 | } | 427 | } |
1253 | @@ -456,7 +430,7 @@ | |||
1254 | 456 | else if (node->get_expr_kind() == flwor_expr_kind || | 430 | else if (node->get_expr_kind() == flwor_expr_kind || |
1255 | 457 | node->get_expr_kind() == gflwor_expr_kind) | 431 | node->get_expr_kind() == gflwor_expr_kind) |
1256 | 458 | { | 432 | { |
1258 | 459 | flwor_expr* flworExpr = reinterpret_cast<flwor_expr*>(node); | 433 | flwor_expr* flworExpr = static_cast<flwor_expr*>(node); |
1259 | 460 | 434 | ||
1260 | 461 | bool modified = false; | 435 | bool modified = false; |
1261 | 462 | 436 | ||
1262 | @@ -465,8 +439,8 @@ | |||
1263 | 465 | { | 439 | { |
1264 | 466 | if (flworExpr->get_clause(i)->get_kind() == flwor_clause::order_clause) | 440 | if (flworExpr->get_clause(i)->get_kind() == flwor_clause::order_clause) |
1265 | 467 | { | 441 | { |
1268 | 468 | orderby_clause* obc = reinterpret_cast<orderby_clause*> | 442 | orderby_clause* obc = |
1269 | 469 | (flworExpr->get_clause(i)); | 443 | static_cast<orderby_clause*>(flworExpr->get_clause(i)); |
1270 | 470 | 444 | ||
1271 | 471 | csize numColumns = obc->num_columns(); | 445 | csize numColumns = obc->num_columns(); |
1272 | 472 | for (csize j = 0; j < numColumns; ++j) | 446 | for (csize j = 0; j < numColumns; ++j) |
1273 | @@ -479,11 +453,7 @@ | |||
1274 | 479 | TypeOps::is_subtype(tm, *colType, *rtm.UNTYPED_ATOMIC_TYPE_STAR, colLoc)) | 453 | TypeOps::is_subtype(tm, *colType, *rtm.UNTYPED_ATOMIC_TYPE_STAR, colLoc)) |
1275 | 480 | { | 454 | { |
1276 | 481 | expr* castExpr = rCtx.theEM-> | 455 | expr* castExpr = rCtx.theEM-> |
1282 | 482 | create_cast_expr(colExpr->get_sctx(), | 456 | create_cast_expr(sctx, udf, colLoc, colExpr, rtm.STRING_TYPE_QUESTION); |
1278 | 483 | colExpr->get_udf(), | ||
1279 | 484 | colExpr->get_loc(), | ||
1280 | 485 | colExpr, | ||
1281 | 486 | rtm.STRING_TYPE_QUESTION); | ||
1283 | 487 | 457 | ||
1284 | 488 | obc->set_column_expr(j, castExpr); | 458 | obc->set_column_expr(j, castExpr); |
1285 | 489 | modified = true; | 459 | modified = true; |
1286 | 490 | 460 | ||
1287 | === modified file 'src/compiler/rewriter/tools/dataflow_annotations.cpp' | |||
1288 | --- src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-11-02 20:00:13 +0000 | |||
1289 | +++ src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-12-06 22:51:20 +0000 | |||
1290 | @@ -880,30 +880,17 @@ | |||
1291 | 880 | varSources = new std::vector<expr*>;; | 880 | varSources = new std::vector<expr*>;; |
1292 | 881 | theVarSourcesMap.insert(VarSourcesPair(e, varSources)); | 881 | theVarSourcesMap.insert(VarSourcesPair(e, varSources)); |
1293 | 882 | 882 | ||
1296 | 883 | std::vector<expr*>::const_iterator ite2 = e->setExprsBegin(); | 883 | var_expr::VarSetExprs::const_iterator ite2 = e->setExprsBegin(); |
1297 | 884 | std::vector<expr*>::const_iterator end2 = e->setExprsEnd(); | 884 | var_expr::VarSetExprs::const_iterator end2 = e->setExprsEnd(); |
1298 | 885 | 885 | ||
1299 | 886 | for (; ite2 != end2; ++ite2) | 886 | for (; ite2 != end2; ++ite2) |
1300 | 887 | { | 887 | { |
1302 | 888 | expr* setExpr = *ite2; | 888 | var_set_expr* setExpr = *ite2; |
1303 | 889 | 889 | ||
1304 | 890 | if (setExpr->get_udf() != NULL && !setExpr->get_udf()->isOptimized()) | 890 | if (setExpr->get_udf() != NULL && !setExpr->get_udf()->isOptimized()) |
1305 | 891 | continue; | 891 | continue; |
1306 | 892 | 892 | ||
1321 | 893 | if (setExpr->get_expr_kind() == var_decl_expr_kind) | 893 | findNodeSourcesRec(setExpr->get_expr(), *varSources, currentUdf); |
1308 | 894 | { | ||
1309 | 895 | findNodeSourcesRec(static_cast<var_decl_expr*>(setExpr)->get_init_expr(), | ||
1310 | 896 | *varSources, | ||
1311 | 897 | currentUdf); | ||
1312 | 898 | } | ||
1313 | 899 | else | ||
1314 | 900 | { | ||
1315 | 901 | assert(setExpr->get_expr_kind() == var_set_expr_kind); | ||
1316 | 902 | |||
1317 | 903 | findNodeSourcesRec(static_cast<var_set_expr*>(setExpr)->get_expr(), | ||
1318 | 904 | *varSources, | ||
1319 | 905 | currentUdf); | ||
1320 | 906 | } | ||
1322 | 907 | } | 894 | } |
1323 | 908 | } | 895 | } |
1324 | 909 | else | 896 | else |
1325 | @@ -1323,25 +1310,14 @@ | |||
1326 | 1323 | varSources = new std::vector<expr*>;; | 1310 | varSources = new std::vector<expr*>;; |
1327 | 1324 | theVarSourcesMap.insert(VarSourcesPair(e, varSources)); | 1311 | theVarSourcesMap.insert(VarSourcesPair(e, varSources)); |
1328 | 1325 | 1312 | ||
1331 | 1326 | std::vector<expr*>::const_iterator ite2 = e->setExprsBegin(); | 1313 | var_expr::VarSetExprs::const_iterator ite2 = e->setExprsBegin(); |
1332 | 1327 | std::vector<expr*>::const_iterator end2 = e->setExprsEnd(); | 1314 | var_expr::VarSetExprs::const_iterator end2 = e->setExprsEnd(); |
1333 | 1328 | 1315 | ||
1334 | 1329 | for (; ite2 != end2; ++ite2) | 1316 | for (; ite2 != end2; ++ite2) |
1335 | 1330 | { | 1317 | { |
1350 | 1331 | expr* setExpr = *ite2; | 1318 | var_set_expr* setExpr = *ite2; |
1351 | 1332 | 1319 | ||
1352 | 1333 | if (setExpr->get_expr_kind() == var_decl_expr_kind) | 1320 | findLocalNodeSources(setExpr->get_expr(), *varSources); |
1339 | 1334 | { | ||
1340 | 1335 | findLocalNodeSources(static_cast<var_decl_expr*>(setExpr)->get_init_expr(), | ||
1341 | 1336 | *varSources); | ||
1342 | 1337 | } | ||
1343 | 1338 | else | ||
1344 | 1339 | { | ||
1345 | 1340 | assert(setExpr->get_expr_kind() == var_set_expr_kind); | ||
1346 | 1341 | |||
1347 | 1342 | findLocalNodeSources(static_cast<var_set_expr*>(setExpr)->get_expr(), | ||
1348 | 1343 | *varSources); | ||
1349 | 1344 | } | ||
1353 | 1345 | } | 1321 | } |
1354 | 1346 | } | 1322 | } |
1355 | 1347 | else | 1323 | else |
1356 | 1348 | 1324 | ||
1357 | === modified file 'test/parser/CMakeLists.txt' | |||
1358 | --- test/parser/CMakeLists.txt 2012-09-19 21:16:15 +0000 | |||
1359 | +++ test/parser/CMakeLists.txt 2012-12-06 22:51:20 +0000 | |||
1360 | @@ -15,12 +15,12 @@ | |||
1361 | 15 | CONFIGURE_FILE(parsertestdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/parsertestdriverconfig.h) | 15 | CONFIGURE_FILE(parsertestdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/parsertestdriverconfig.h) |
1362 | 16 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) | 16 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) |
1363 | 17 | 17 | ||
1365 | 18 | ZORBA_GENERATE_EXE("parsertestdriver" "parsertestdriver.cpp" "" "" "") | 18 | #ZORBA_GENERATE_EXE("parsertestdriver" "parsertestdriver.cpp" "" "" "") |
1366 | 19 | 19 | ||
1367 | 20 | # collect all queries (suffix .xq) in all subdirectories of the Queries dir | 20 | # collect all queries (suffix .xq) in all subdirectories of the Queries dir |
1369 | 21 | FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ *.xq) | 21 | #FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ *.xq) |
1370 | 22 | 22 | ||
1372 | 23 | MESSAGE(STATUS "Adding parser tests for CTest") | 23 | #MESSAGE(STATUS "Adding parser tests for CTest") |
1373 | 24 | 24 | ||
1374 | 25 | FOREACH(TESTFILE ${TESTFILES}) | 25 | FOREACH(TESTFILE ${TESTFILES}) |
1375 | 26 | STRING(LENGTH ${TESTFILE} TESTFILELENGTH) | 26 | STRING(LENGTH ${TESTFILE} TESTFILELENGTH) |
1376 | 27 | 27 | ||
1377 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_dynamic_zorba_collection.iter' | |||
1378 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_dynamic_zorba_collection.iter 2012-10-08 12:09:36 +0000 | |||
1379 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_dynamic_zorba_collection.iter 2012-12-06 22:51:20 +0000 | |||
1380 | @@ -6,19 +6,11 @@ | |||
1381 | 6 | <SequentialIterator> | 6 | <SequentialIterator> |
1382 | 7 | <ApplyIterator> | 7 | <ApplyIterator> |
1383 | 8 | <ZorbaCreateCollectionIterator> | 8 | <ZorbaCreateCollectionIterator> |
1389 | 9 | <PromoteIterator type="xs:QName"> | 9 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> |
1385 | 10 | <FnDataIterator> | ||
1386 | 11 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
1387 | 12 | </FnDataIterator> | ||
1388 | 13 | </PromoteIterator> | ||
1390 | 14 | </ZorbaCreateCollectionIterator> | 10 | </ZorbaCreateCollectionIterator> |
1391 | 15 | </ApplyIterator> | 11 | </ApplyIterator> |
1392 | 16 | <CountCollectionIterator> | 12 | <CountCollectionIterator> |
1398 | 17 | <PromoteIterator type="xs:QName"> | 13 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> |
1394 | 18 | <FnDataIterator> | ||
1395 | 19 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
1396 | 20 | </FnDataIterator> | ||
1397 | 21 | </PromoteIterator> | ||
1399 | 22 | </CountCollectionIterator> | 14 | </CountCollectionIterator> |
1400 | 23 | </SequentialIterator> | 15 | </SequentialIterator> |
1401 | 24 | </SequentialIterator> | 16 | </SequentialIterator> |
1402 | 25 | 17 | ||
1403 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_static_zorba_collection.iter' | |||
1404 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_static_zorba_collection.iter 2012-10-08 12:09:36 +0000 | |||
1405 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_static_zorba_collection.iter 2012-12-06 22:51:20 +0000 | |||
1406 | @@ -24,19 +24,11 @@ | |||
1407 | 24 | <SequentialIterator> | 24 | <SequentialIterator> |
1408 | 25 | <ApplyIterator> | 25 | <ApplyIterator> |
1409 | 26 | <ZorbaCreateCollectionIterator> | 26 | <ZorbaCreateCollectionIterator> |
1415 | 27 | <PromoteIterator type="xs:QName"> | 27 | <CtxVarIterator varid="10" varname="coll" varkind="global"/> |
1411 | 28 | <FnDataIterator> | ||
1412 | 29 | <CtxVarIterator varid="10" varname="coll" varkind="global"/> | ||
1413 | 30 | </FnDataIterator> | ||
1414 | 31 | </PromoteIterator> | ||
1416 | 32 | </ZorbaCreateCollectionIterator> | 28 | </ZorbaCreateCollectionIterator> |
1417 | 33 | </ApplyIterator> | 29 | </ApplyIterator> |
1418 | 34 | <CountCollectionIterator> | 30 | <CountCollectionIterator> |
1424 | 35 | <PromoteIterator type="xs:QName"> | 31 | <CtxVarIterator varid="10" varname="coll" varkind="global"/> |
1420 | 36 | <FnDataIterator> | ||
1421 | 37 | <CtxVarIterator varid="10" varname="coll" varkind="global"/> | ||
1422 | 38 | </FnDataIterator> | ||
1423 | 39 | </PromoteIterator> | ||
1425 | 40 | </CountCollectionIterator> | 32 | </CountCollectionIterator> |
1426 | 41 | </SequentialIterator> | 33 | </SequentialIterator> |
1427 | 42 | </SequentialIterator> | 34 | </SequentialIterator> |
1428 | 43 | 35 | ||
1429 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_w3c_collection.iter' | |||
1430 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_w3c_collection.iter 2012-10-08 12:09:36 +0000 | |||
1431 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_w3c_collection.iter 2012-12-06 22:51:20 +0000 | |||
1432 | @@ -6,19 +6,11 @@ | |||
1433 | 6 | <SequentialIterator> | 6 | <SequentialIterator> |
1434 | 7 | <ApplyIterator> | 7 | <ApplyIterator> |
1435 | 8 | <UDFunctionCallIterator> | 8 | <UDFunctionCallIterator> |
1441 | 9 | <PromoteIterator type="xs:string"> | 9 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> |
1437 | 10 | <FnDataIterator> | ||
1438 | 11 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
1439 | 12 | </FnDataIterator> | ||
1440 | 13 | </PromoteIterator> | ||
1442 | 14 | </UDFunctionCallIterator> | 10 | </UDFunctionCallIterator> |
1443 | 15 | </ApplyIterator> | 11 | </ApplyIterator> |
1444 | 16 | <CountCollectionIterator> | 12 | <CountCollectionIterator> |
1450 | 17 | <PromoteIterator type="xs:string"> | 13 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> |
1446 | 18 | <FnDataIterator> | ||
1447 | 19 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
1448 | 20 | </FnDataIterator> | ||
1449 | 21 | </PromoteIterator> | ||
1451 | 22 | </CountCollectionIterator> | 14 | </CountCollectionIterator> |
1452 | 23 | </SequentialIterator> | 15 | </SequentialIterator> |
1453 | 24 | </SequentialIterator> | 16 | </SequentialIterator> |
1454 | 25 | 17 | ||
1455 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx1.iter' | |||
1456 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx1.iter 2012-09-19 21:16:15 +0000 | |||
1457 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx1.iter 2012-12-06 22:51:20 +0000 | |||
1458 | @@ -28,17 +28,15 @@ | |||
1459 | 28 | <ReturnClause> | 28 | <ReturnClause> |
1460 | 29 | <ValueIndexEntryBuilderIterator> | 29 | <ValueIndexEntryBuilderIterator> |
1461 | 30 | <ForVarIterator varname="$$opt_temp_3"/> | 30 | <ForVarIterator varname="$$opt_temp_3"/> |
1473 | 31 | <CastIterator type="xs:string"> | 31 | <PromoteIterator type="xs:anyAtomicType"> |
1474 | 32 | <PromoteIterator type="xs:anyAtomicType"> | 32 | <FnDataIterator> |
1475 | 33 | <FnDataIterator> | 33 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> |
1476 | 34 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> | 34 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> |
1477 | 35 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> | 35 | <ForVarIterator varname="$$opt_temp_3"/> |
1478 | 36 | <ForVarIterator varname="$$opt_temp_3"/> | 36 | </ChildAxisIterator> |
1479 | 37 | </ChildAxisIterator> | 37 | </AttributeAxisIterator> |
1480 | 38 | </AttributeAxisIterator> | 38 | </FnDataIterator> |
1481 | 39 | </FnDataIterator> | 39 | </PromoteIterator> |
1471 | 40 | </PromoteIterator> | ||
1472 | 41 | </CastIterator> | ||
1482 | 42 | </ValueIndexEntryBuilderIterator> | 40 | </ValueIndexEntryBuilderIterator> |
1483 | 43 | </ReturnClause> | 41 | </ReturnClause> |
1484 | 44 | </flwor::FLWORIterator> | 42 | </flwor::FLWORIterator> |
1485 | @@ -66,13 +64,11 @@ | |||
1486 | 66 | </LetVariable> | 64 | </LetVariable> |
1487 | 67 | <LetVariable name="$$opt_temp_1" materialize="true"> | 65 | <LetVariable name="$$opt_temp_1" materialize="true"> |
1488 | 68 | <HoistIterator> | 66 | <HoistIterator> |
1496 | 69 | <CastIterator type="xs:string"> | 67 | <FnDataIterator> |
1497 | 70 | <FnDataIterator> | 68 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> |
1498 | 71 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> | 69 | <ForVarIterator varname="p"/> |
1499 | 72 | <ForVarIterator varname="p"/> | 70 | </AttributeAxisIterator> |
1500 | 73 | </AttributeAxisIterator> | 71 | </FnDataIterator> |
1494 | 74 | </FnDataIterator> | ||
1495 | 75 | </CastIterator> | ||
1501 | 76 | </HoistIterator> | 72 | </HoistIterator> |
1502 | 77 | </LetVariable> | 73 | </LetVariable> |
1503 | 78 | <ForVariable name="a"> | 74 | <ForVariable name="a"> |
1504 | 79 | 75 | ||
1505 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx2.iter' | |||
1506 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx2.iter 2012-09-19 21:16:15 +0000 | |||
1507 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx2.iter 2012-12-06 22:51:20 +0000 | |||
1508 | @@ -36,13 +36,11 @@ | |||
1509 | 36 | </LetVariable> | 36 | </LetVariable> |
1510 | 37 | <LetVariable name="$$opt_temp_1" materialize="true"> | 37 | <LetVariable name="$$opt_temp_1" materialize="true"> |
1511 | 38 | <HoistIterator> | 38 | <HoistIterator> |
1519 | 39 | <CastIterator type="xs:string"> | 39 | <FnDataIterator> |
1520 | 40 | <FnDataIterator> | 40 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> |
1521 | 41 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> | 41 | <ForVarIterator varname="p"/> |
1522 | 42 | <ForVarIterator varname="p"/> | 42 | </AttributeAxisIterator> |
1523 | 43 | </AttributeAxisIterator> | 43 | </FnDataIterator> |
1517 | 44 | </FnDataIterator> | ||
1518 | 45 | </CastIterator> | ||
1524 | 46 | </HoistIterator> | 44 | </HoistIterator> |
1525 | 47 | </LetVariable> | 45 | </LetVariable> |
1526 | 48 | <ForVariable name="a"> | 46 | <ForVariable name="a"> |
1527 | @@ -58,17 +56,15 @@ | |||
1528 | 58 | <WhereClause> | 56 | <WhereClause> |
1529 | 59 | <FnBooleanIterator> | 57 | <FnBooleanIterator> |
1530 | 60 | <TypedValueCompareIterator_STRING> | 58 | <TypedValueCompareIterator_STRING> |
1542 | 61 | <CastIterator type="xs:string"> | 59 | <PromoteIterator type="xs:anyAtomicType"> |
1543 | 62 | <PromoteIterator type="xs:anyAtomicType"> | 60 | <FnDataIterator> |
1544 | 63 | <FnDataIterator> | 61 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> |
1545 | 64 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> | 62 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> |
1546 | 65 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> | 63 | <ForVarIterator varname="t"/> |
1547 | 66 | <ForVarIterator varname="t"/> | 64 | </ChildAxisIterator> |
1548 | 67 | </ChildAxisIterator> | 65 | </AttributeAxisIterator> |
1549 | 68 | </AttributeAxisIterator> | 66 | </FnDataIterator> |
1550 | 69 | </FnDataIterator> | 67 | </PromoteIterator> |
1540 | 70 | </PromoteIterator> | ||
1541 | 71 | </CastIterator> | ||
1551 | 72 | <UnhoistIterator> | 68 | <UnhoistIterator> |
1552 | 73 | <LetVarIterator varname="$$opt_temp_1"/> | 69 | <LetVarIterator varname="$$opt_temp_1"/> |
1553 | 74 | </UnhoistIterator> | 70 | </UnhoistIterator> |
1554 | 75 | 71 | ||
1555 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter' | |||
1556 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter 2012-10-08 12:09:36 +0000 | |||
1557 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter 2012-12-06 22:51:20 +0000 | |||
1558 | @@ -19,94 +19,40 @@ | |||
1559 | 19 | <SingletonIterator value="xs:QName(,,tests)"/> | 19 | <SingletonIterator value="xs:QName(,,tests)"/> |
1560 | 20 | </ElementIterator> | 20 | </ElementIterator> |
1561 | 21 | </CtxVarDeclareIterator> | 21 | </CtxVarDeclareIterator> |
1564 | 22 | <SequentialIterator> | 22 | <flwor::FLWORIterator> |
1565 | 23 | <CreateInternalIndexIterator name="xs:QName(,,tempIndex0)"> | 23 | <LetVariable name="test_old" materialize="true"> |
1566 | 24 | <flwor::FLWORIterator> | 24 | <flwor::FLWORIterator> |
1568 | 25 | <ForVariable name="$$opt_temp_2"> | 25 | <ForVariable name="$$context-item"> |
1569 | 26 | <CtxVarIterator varid="4" varname="tests" varkind="global"/> | 26 | <CtxVarIterator varid="4" varname="tests" varkind="global"/> |
1570 | 27 | </ForVariable> | 27 | </ForVariable> |
1571 | 28 | <WhereClause> | ||
1572 | 29 | <FnBooleanIterator> | ||
1573 | 30 | <TypedValueCompareIterator_STRING> | ||
1574 | 31 | <PromoteIterator type="xs:anyAtomicType"> | ||
1575 | 32 | <FnDataIterator> | ||
1576 | 33 | <ChildAxisIterator test kind="match_text_test" qname="*" typename="*" nill allowed="0"> | ||
1577 | 34 | <ForVarIterator varname="$$context-item"/> | ||
1578 | 35 | </ChildAxisIterator> | ||
1579 | 36 | </FnDataIterator> | ||
1580 | 37 | </PromoteIterator> | ||
1581 | 38 | <PromoteIterator type="xs:anyAtomicType"> | ||
1582 | 39 | <FnDataIterator> | ||
1583 | 40 | <ChildAxisIterator test kind="match_text_test" qname="*" typename="*" nill allowed="0"> | ||
1584 | 41 | <CtxVarIterator varid="4" varname="tests" varkind="global"/> | ||
1585 | 42 | </ChildAxisIterator> | ||
1586 | 43 | </FnDataIterator> | ||
1587 | 44 | </PromoteIterator> | ||
1588 | 45 | </TypedValueCompareIterator_STRING> | ||
1589 | 46 | </FnBooleanIterator> | ||
1590 | 47 | </WhereClause> | ||
1591 | 28 | <ReturnClause> | 48 | <ReturnClause> |
1606 | 29 | <ValueIndexEntryBuilderIterator> | 49 | <ForVarIterator varname="$$context-item"/> |
1593 | 30 | <ForVarIterator varname="$$opt_temp_2"/> | ||
1594 | 31 | <CastIterator type="xs:string"> | ||
1595 | 32 | <PromoteIterator type="xs:anyAtomicType"> | ||
1596 | 33 | <FnDataIterator> | ||
1597 | 34 | <ChildAxisIterator test kind="match_text_test" qname="*" typename="*" nill allowed="0"> | ||
1598 | 35 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | ||
1599 | 36 | <ForVarIterator varname="$$opt_temp_2"/> | ||
1600 | 37 | </TreatIterator> | ||
1601 | 38 | </ChildAxisIterator> | ||
1602 | 39 | </FnDataIterator> | ||
1603 | 40 | </PromoteIterator> | ||
1604 | 41 | </CastIterator> | ||
1605 | 42 | </ValueIndexEntryBuilderIterator> | ||
1607 | 43 | </ReturnClause> | 50 | </ReturnClause> |
1608 | 44 | </flwor::FLWORIterator> | 51 | </flwor::FLWORIterator> |
1675 | 45 | </CreateInternalIndexIterator> | 52 | </LetVariable> |
1676 | 46 | <flwor::FLWORIterator> | 53 | <ReturnClause> |
1677 | 47 | <LetVariable name="$$opt_temp_1" materialize="true"> | 54 | <SingletonIterator value="xs:integer(1)"/> |
1678 | 48 | <HoistIterator> | 55 | </ReturnClause> |
1679 | 49 | <flwor::FLWORIterator> | 56 | </flwor::FLWORIterator> |
1614 | 50 | <ForVariable name="$$context-item"> | ||
1615 | 51 | <CtxVarIterator varid="4" varname="tests" varkind="global"/> | ||
1616 | 52 | </ForVariable> | ||
1617 | 53 | <WhereClause> | ||
1618 | 54 | <FnBooleanIterator> | ||
1619 | 55 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,name)" typename="*" nill allowed="0"> | ||
1620 | 56 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | ||
1621 | 57 | <ForVarIterator varname="$$context-item"/> | ||
1622 | 58 | </TreatIterator> | ||
1623 | 59 | </AttributeAxisIterator> | ||
1624 | 60 | </FnBooleanIterator> | ||
1625 | 61 | </WhereClause> | ||
1626 | 62 | <ReturnClause> | ||
1627 | 63 | <ForVarIterator varname="$$context-item"/> | ||
1628 | 64 | </ReturnClause> | ||
1629 | 65 | </flwor::FLWORIterator> | ||
1630 | 66 | </HoistIterator> | ||
1631 | 67 | </LetVariable> | ||
1632 | 68 | <ForVariable name="test"> | ||
1633 | 69 | <CtxVarIterator varid="4" varname="tests" varkind="global"/> | ||
1634 | 70 | </ForVariable> | ||
1635 | 71 | <LetVariable name="$$opt_temp_0" materialize="true"> | ||
1636 | 72 | <HoistIterator> | ||
1637 | 73 | <CastIterator type="xs:string"> | ||
1638 | 74 | <PromoteIterator type="xs:anyAtomicType"> | ||
1639 | 75 | <FnDataIterator> | ||
1640 | 76 | <ChildAxisIterator test kind="match_text_test" qname="*" typename="*" nill allowed="0"> | ||
1641 | 77 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | ||
1642 | 78 | <ForVarIterator varname="test"/> | ||
1643 | 79 | </TreatIterator> | ||
1644 | 80 | </ChildAxisIterator> | ||
1645 | 81 | </FnDataIterator> | ||
1646 | 82 | </PromoteIterator> | ||
1647 | 83 | </CastIterator> | ||
1648 | 84 | </HoistIterator> | ||
1649 | 85 | </LetVariable> | ||
1650 | 86 | <LetVariable name="test_old" materialize="true"> | ||
1651 | 87 | <flwor::FLWORIterator> | ||
1652 | 88 | <ForVariable name="$$context-item"> | ||
1653 | 89 | <ProbeIndexPointValueIterator> | ||
1654 | 90 | <SingletonIterator value="xs:QName(,,tempIndex0)"/> | ||
1655 | 91 | <UnhoistIterator> | ||
1656 | 92 | <LetVarIterator varname="$$opt_temp_0"/> | ||
1657 | 93 | </UnhoistIterator> | ||
1658 | 94 | </ProbeIndexPointValueIterator> | ||
1659 | 95 | </ForVariable> | ||
1660 | 96 | <ReturnClause> | ||
1661 | 97 | <ForVarIterator varname="$$context-item"/> | ||
1662 | 98 | </ReturnClause> | ||
1663 | 99 | </flwor::FLWORIterator> | ||
1664 | 100 | </LetVariable> | ||
1665 | 101 | <LetVariable name="qt_old" materialize="true"> | ||
1666 | 102 | <UnhoistIterator> | ||
1667 | 103 | <LetVarIterator varname="$$opt_temp_1"/> | ||
1668 | 104 | </UnhoistIterator> | ||
1669 | 105 | </LetVariable> | ||
1670 | 106 | <ReturnClause> | ||
1671 | 107 | <SingletonIterator value="xs:integer(1)"/> | ||
1672 | 108 | </ReturnClause> | ||
1673 | 109 | </flwor::FLWORIterator> | ||
1674 | 110 | </SequentialIterator> | ||
1680 | 111 | </SequentialIterator> | 57 | </SequentialIterator> |
1681 | 112 | 58 | ||
1682 | 113 | 59 | ||
1683 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter' | |||
1684 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter 2012-10-08 12:09:36 +0000 | |||
1685 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter 2012-12-06 22:51:20 +0000 | |||
1686 | @@ -46,16 +46,8 @@ | |||
1687 | 46 | <SequentialIterator> | 46 | <SequentialIterator> |
1688 | 47 | <ApplyIterator> | 47 | <ApplyIterator> |
1689 | 48 | <MapCreateIterator> | 48 | <MapCreateIterator> |
1700 | 49 | <PromoteIterator type="xs:QName"> | 49 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1701 | 50 | <FnDataIterator> | 50 | <CtxVarIterator varid="6" varname="str" varkind="global"/> |
1692 | 51 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1693 | 52 | </FnDataIterator> | ||
1694 | 53 | </PromoteIterator> | ||
1695 | 54 | <PromoteIterator type="xs:QName"> | ||
1696 | 55 | <FnDataIterator> | ||
1697 | 56 | <CtxVarIterator varid="6" varname="str" varkind="global"/> | ||
1698 | 57 | </FnDataIterator> | ||
1699 | 58 | </PromoteIterator> | ||
1702 | 59 | </MapCreateIterator> | 51 | </MapCreateIterator> |
1703 | 60 | </ApplyIterator> | 52 | </ApplyIterator> |
1704 | 61 | <CtxVarDeclareIterator varid="8" varname="DG"> | 53 | <CtxVarDeclareIterator varid="8" varname="DG"> |
1705 | @@ -69,11 +61,7 @@ | |||
1706 | 69 | </CtxVarDeclareIterator> | 61 | </CtxVarDeclareIterator> |
1707 | 70 | <ApplyIterator> | 62 | <ApplyIterator> |
1708 | 71 | <MapDestroyIterator> | 63 | <MapDestroyIterator> |
1714 | 72 | <PromoteIterator type="xs:QName"> | 64 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1710 | 73 | <FnDataIterator> | ||
1711 | 74 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1712 | 75 | </FnDataIterator> | ||
1713 | 76 | </PromoteIterator> | ||
1715 | 77 | </MapDestroyIterator> | 65 | </MapDestroyIterator> |
1716 | 78 | </ApplyIterator> | 66 | </ApplyIterator> |
1717 | 79 | <CtxVarIterator varid="8" varname="DG" varkind="local"/> | 67 | <CtxVarIterator varid="8" varname="DG" varkind="local"/> |
1718 | @@ -195,11 +183,7 @@ | |||
1719 | 195 | <CtxVarAssignIterator varid="1" varname="label" varkind="local"> | 183 | <CtxVarAssignIterator varid="1" varname="label" varkind="local"> |
1720 | 196 | <TreatIterator type="xs:integer" quant="?"> | 184 | <TreatIterator type="xs:integer" quant="?"> |
1721 | 197 | <MapGetIterator> | 185 | <MapGetIterator> |
1727 | 198 | <PromoteIterator type="xs:QName"> | 186 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1723 | 199 | <FnDataIterator> | ||
1724 | 200 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1725 | 201 | </FnDataIterator> | ||
1726 | 202 | </PromoteIterator> | ||
1728 | 203 | <PromoteIterator type="xs:anyAtomicType"> | 187 | <PromoteIterator type="xs:anyAtomicType"> |
1729 | 204 | <FnDataIterator> | 188 | <FnDataIterator> |
1730 | 205 | <CtxVarIterator varid="4" varname="s2" varkind="local"/> | 189 | <CtxVarIterator varid="4" varname="s2" varkind="local"/> |
1731 | @@ -224,11 +208,7 @@ | |||
1732 | 224 | </CtxVarAssignIterator> | 208 | </CtxVarAssignIterator> |
1733 | 225 | <ApplyIterator> | 209 | <ApplyIterator> |
1734 | 226 | <MapInsertIterator> | 210 | <MapInsertIterator> |
1740 | 227 | <PromoteIterator type="xs:QName"> | 211 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1736 | 228 | <FnDataIterator> | ||
1737 | 229 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1738 | 230 | </FnDataIterator> | ||
1739 | 231 | </PromoteIterator> | ||
1741 | 232 | <CtxVarIterator varid="4" varname="co" varkind="global"/> | 212 | <CtxVarIterator varid="4" varname="co" varkind="global"/> |
1742 | 233 | <PromoteIterator type="xs:anyAtomicType"> | 213 | <PromoteIterator type="xs:anyAtomicType"> |
1743 | 234 | <FnDataIterator> | 214 | <FnDataIterator> |
1744 | 235 | 215 | ||
1745 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter' | |||
1746 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter 2012-10-08 12:09:36 +0000 | |||
1747 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter 2012-12-06 22:51:20 +0000 | |||
1748 | @@ -46,16 +46,8 @@ | |||
1749 | 46 | <SequentialIterator> | 46 | <SequentialIterator> |
1750 | 47 | <ApplyIterator> | 47 | <ApplyIterator> |
1751 | 48 | <MapCreateIterator> | 48 | <MapCreateIterator> |
1762 | 49 | <PromoteIterator type="xs:QName"> | 49 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1763 | 50 | <FnDataIterator> | 50 | <CtxVarIterator varid="6" varname="str" varkind="global"/> |
1754 | 51 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1755 | 52 | </FnDataIterator> | ||
1756 | 53 | </PromoteIterator> | ||
1757 | 54 | <PromoteIterator type="xs:QName"> | ||
1758 | 55 | <FnDataIterator> | ||
1759 | 56 | <CtxVarIterator varid="6" varname="str" varkind="global"/> | ||
1760 | 57 | </FnDataIterator> | ||
1761 | 58 | </PromoteIterator> | ||
1764 | 59 | </MapCreateIterator> | 51 | </MapCreateIterator> |
1765 | 60 | </ApplyIterator> | 52 | </ApplyIterator> |
1766 | 61 | <CtxVarDeclareIterator varid="8" varname="DG"> | 53 | <CtxVarDeclareIterator varid="8" varname="DG"> |
1767 | @@ -69,11 +61,7 @@ | |||
1768 | 69 | </CtxVarDeclareIterator> | 61 | </CtxVarDeclareIterator> |
1769 | 70 | <ApplyIterator> | 62 | <ApplyIterator> |
1770 | 71 | <MapDestroyIterator> | 63 | <MapDestroyIterator> |
1776 | 72 | <PromoteIterator type="xs:QName"> | 64 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1772 | 73 | <FnDataIterator> | ||
1773 | 74 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1774 | 75 | </FnDataIterator> | ||
1775 | 76 | </PromoteIterator> | ||
1777 | 77 | </MapDestroyIterator> | 65 | </MapDestroyIterator> |
1778 | 78 | </ApplyIterator> | 66 | </ApplyIterator> |
1779 | 79 | <CtxVarIterator varid="8" varname="DG" varkind="local"/> | 67 | <CtxVarIterator varid="8" varname="DG" varkind="local"/> |
1780 | @@ -195,11 +183,7 @@ | |||
1781 | 195 | <CtxVarAssignIterator varid="1" varname="label" varkind="local"> | 183 | <CtxVarAssignIterator varid="1" varname="label" varkind="local"> |
1782 | 196 | <TreatIterator type="xs:integer" quant="?"> | 184 | <TreatIterator type="xs:integer" quant="?"> |
1783 | 197 | <MapGetIterator> | 185 | <MapGetIterator> |
1789 | 198 | <PromoteIterator type="xs:QName"> | 186 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1785 | 199 | <FnDataIterator> | ||
1786 | 200 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1787 | 201 | </FnDataIterator> | ||
1788 | 202 | </PromoteIterator> | ||
1790 | 203 | <PromoteIterator type="xs:anyAtomicType"> | 187 | <PromoteIterator type="xs:anyAtomicType"> |
1791 | 204 | <FnDataIterator> | 188 | <FnDataIterator> |
1792 | 205 | <CtxVarIterator varid="4" varname="s2" varkind="local"/> | 189 | <CtxVarIterator varid="4" varname="s2" varkind="local"/> |
1793 | @@ -224,11 +208,7 @@ | |||
1794 | 224 | </CtxVarAssignIterator> | 208 | </CtxVarAssignIterator> |
1795 | 225 | <ApplyIterator> | 209 | <ApplyIterator> |
1796 | 226 | <MapInsertIterator> | 210 | <MapInsertIterator> |
1802 | 227 | <PromoteIterator type="xs:QName"> | 211 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> |
1798 | 228 | <FnDataIterator> | ||
1799 | 229 | <CtxVarIterator varid="5" varname="map1" varkind="global"/> | ||
1800 | 230 | </FnDataIterator> | ||
1801 | 231 | </PromoteIterator> | ||
1803 | 232 | <CtxVarIterator varid="4" varname="co" varkind="global"/> | 212 | <CtxVarIterator varid="4" varname="co" varkind="global"/> |
1804 | 233 | <PromoteIterator type="xs:anyAtomicType"> | 213 | <PromoteIterator type="xs:anyAtomicType"> |
1805 | 234 | <FnDataIterator> | 214 | <FnDataIterator> |
1806 | 235 | 215 | ||
1807 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter' | |||
1808 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter 2012-09-19 21:16:15 +0000 | |||
1809 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter 2012-12-06 22:51:20 +0000 | |||
1810 | @@ -28,17 +28,15 @@ | |||
1811 | 28 | <ReturnClause> | 28 | <ReturnClause> |
1812 | 29 | <ValueIndexEntryBuilderIterator> | 29 | <ValueIndexEntryBuilderIterator> |
1813 | 30 | <ForVarIterator varname="$$opt_temp_3"/> | 30 | <ForVarIterator varname="$$opt_temp_3"/> |
1825 | 31 | <CastIterator type="xs:string"> | 31 | <PromoteIterator type="xs:anyAtomicType"> |
1826 | 32 | <PromoteIterator type="xs:anyAtomicType"> | 32 | <FnDataIterator> |
1827 | 33 | <FnDataIterator> | 33 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> |
1828 | 34 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> | 34 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> |
1829 | 35 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,buyer)" typename="*" nill allowed="0"> | 35 | <ForVarIterator varname="$$opt_temp_3"/> |
1830 | 36 | <ForVarIterator varname="$$opt_temp_3"/> | 36 | </ChildAxisIterator> |
1831 | 37 | </ChildAxisIterator> | 37 | </AttributeAxisIterator> |
1832 | 38 | </AttributeAxisIterator> | 38 | </FnDataIterator> |
1833 | 39 | </FnDataIterator> | 39 | </PromoteIterator> |
1823 | 40 | </PromoteIterator> | ||
1824 | 41 | </CastIterator> | ||
1834 | 42 | </ValueIndexEntryBuilderIterator> | 40 | </ValueIndexEntryBuilderIterator> |
1835 | 43 | </ReturnClause> | 41 | </ReturnClause> |
1836 | 44 | </flwor::FLWORIterator> | 42 | </flwor::FLWORIterator> |
1837 | @@ -66,13 +64,11 @@ | |||
1838 | 66 | </LetVariable> | 64 | </LetVariable> |
1839 | 67 | <LetVariable name="$$opt_temp_1" materialize="true"> | 65 | <LetVariable name="$$opt_temp_1" materialize="true"> |
1840 | 68 | <HoistIterator> | 66 | <HoistIterator> |
1848 | 69 | <CastIterator type="xs:string"> | 67 | <FnDataIterator> |
1849 | 70 | <FnDataIterator> | 68 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> |
1850 | 71 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,id)" typename="*" nill allowed="0"> | 69 | <ForVarIterator varname="p"/> |
1851 | 72 | <ForVarIterator varname="p"/> | 70 | </AttributeAxisIterator> |
1852 | 73 | </AttributeAxisIterator> | 71 | </FnDataIterator> |
1846 | 74 | </FnDataIterator> | ||
1847 | 75 | </CastIterator> | ||
1853 | 76 | </HoistIterator> | 72 | </HoistIterator> |
1854 | 77 | </LetVariable> | 73 | </LetVariable> |
1855 | 78 | <ForVariable name="a"> | 74 | <ForVariable name="a"> |
1856 | 79 | 75 | ||
1857 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-01.iter' | |||
1858 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-01.iter 2012-10-05 08:48:49 +0000 | |||
1859 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-01.iter 2012-12-06 22:51:20 +0000 | |||
1860 | @@ -20,13 +20,9 @@ | |||
1861 | 20 | <SingletonIterator value="xs:QName(,,node)"/> | 20 | <SingletonIterator value="xs:QName(,,node)"/> |
1862 | 21 | <FnConcatIterator/> | 21 | <FnConcatIterator/> |
1863 | 22 | <EnclosedIterator attr_cont="false"> | 22 | <EnclosedIterator attr_cont="false"> |
1871 | 23 | <NodeSortIterator distinct="true" ascending="true"> | 23 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> |
1872 | 24 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> | 24 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> |
1873 | 25 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | 25 | </ChildAxisIterator> |
1867 | 26 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> | ||
1868 | 27 | </TreatIterator> | ||
1869 | 28 | </ChildAxisIterator> | ||
1870 | 29 | </NodeSortIterator> | ||
1874 | 30 | </EnclosedIterator> | 26 | </EnclosedIterator> |
1875 | 31 | </ElementIterator> | 27 | </ElementIterator> |
1876 | 32 | </ChildAxisIterator> | 28 | </ChildAxisIterator> |
1877 | 33 | 29 | ||
1878 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-02.iter' | |||
1879 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-02.iter 2012-10-05 08:48:49 +0000 | |||
1880 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-02.iter 2012-12-06 22:51:20 +0000 | |||
1881 | @@ -1,12 +1,12 @@ | |||
1882 | 1 | Iterator tree for main query: | 1 | Iterator tree for main query: |
1883 | 2 | <SequentialIterator> | 2 | <SequentialIterator> |
1884 | 3 | <CtxVarDeclareIterator varid="4" varname="doc"> | 3 | <CtxVarDeclareIterator varid="4" varname="doc"> |
1886 | 4 | <ElementIterator> | 4 | <ElementIterator copyInputNodes="false"> |
1887 | 5 | <SingletonIterator value="xs:QName(,,a)"/> | 5 | <SingletonIterator value="xs:QName(,,a)"/> |
1888 | 6 | <FnConcatIterator/> | 6 | <FnConcatIterator/> |
1890 | 7 | <ElementIterator> | 7 | <ElementIterator copyInputNodes="false"> |
1891 | 8 | <SingletonIterator value="xs:QName(,,b)"/> | 8 | <SingletonIterator value="xs:QName(,,b)"/> |
1893 | 9 | <ElementIterator> | 9 | <ElementIterator copyInputNodes="false"> |
1894 | 10 | <SingletonIterator value="xs:QName(,,c)"/> | 10 | <SingletonIterator value="xs:QName(,,c)"/> |
1895 | 11 | </ElementIterator> | 11 | </ElementIterator> |
1896 | 12 | </ElementIterator> | 12 | </ElementIterator> |
1897 | @@ -20,13 +20,9 @@ | |||
1898 | 20 | <SingletonIterator value="xs:QName(,,node)"/> | 20 | <SingletonIterator value="xs:QName(,,node)"/> |
1899 | 21 | <FnConcatIterator/> | 21 | <FnConcatIterator/> |
1900 | 22 | <EnclosedIterator attr_cont="false"> | 22 | <EnclosedIterator attr_cont="false"> |
1908 | 23 | <NodeSortIterator distinct="true" ascending="true"> | 23 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> |
1909 | 24 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> | 24 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> |
1910 | 25 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | 25 | </ChildAxisIterator> |
1904 | 26 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> | ||
1905 | 27 | </TreatIterator> | ||
1906 | 28 | </ChildAxisIterator> | ||
1907 | 29 | </NodeSortIterator> | ||
1911 | 30 | </EnclosedIterator> | 26 | </EnclosedIterator> |
1912 | 31 | </ElementIterator> | 27 | </ElementIterator> |
1913 | 32 | </ChildAxisIterator> | 28 | </ChildAxisIterator> |
1914 | 33 | 29 | ||
1915 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-03.iter' | |||
1916 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-03.iter 2012-10-05 08:48:49 +0000 | |||
1917 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/node-copy-03.iter 2012-12-06 22:51:20 +0000 | |||
1918 | @@ -1,12 +1,12 @@ | |||
1919 | 1 | Iterator tree for main query: | 1 | Iterator tree for main query: |
1920 | 2 | <SequentialIterator> | 2 | <SequentialIterator> |
1921 | 3 | <CtxVarDeclareIterator varid="4" varname="doc"> | 3 | <CtxVarDeclareIterator varid="4" varname="doc"> |
1923 | 4 | <ElementIterator> | 4 | <ElementIterator copyInputNodes="false"> |
1924 | 5 | <SingletonIterator value="xs:QName(,,a)"/> | 5 | <SingletonIterator value="xs:QName(,,a)"/> |
1925 | 6 | <FnConcatIterator/> | 6 | <FnConcatIterator/> |
1927 | 7 | <ElementIterator> | 7 | <ElementIterator copyInputNodes="false"> |
1928 | 8 | <SingletonIterator value="xs:QName(,,b)"/> | 8 | <SingletonIterator value="xs:QName(,,b)"/> |
1930 | 9 | <ElementIterator> | 9 | <ElementIterator copyInputNodes="false"> |
1931 | 10 | <SingletonIterator value="xs:QName(,,c)"/> | 10 | <SingletonIterator value="xs:QName(,,c)"/> |
1932 | 11 | </ElementIterator> | 11 | </ElementIterator> |
1933 | 12 | </ElementIterator> | 12 | </ElementIterator> |
1934 | @@ -20,13 +20,9 @@ | |||
1935 | 20 | <SingletonIterator value="xs:QName(,,node)"/> | 20 | <SingletonIterator value="xs:QName(,,node)"/> |
1936 | 21 | <FnConcatIterator/> | 21 | <FnConcatIterator/> |
1937 | 22 | <EnclosedIterator attr_cont="false"> | 22 | <EnclosedIterator attr_cont="false"> |
1945 | 23 | <NodeSortIterator distinct="true" ascending="true"> | 23 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> |
1946 | 24 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,b)" typename="*" nill allowed="0"> | 24 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> |
1947 | 25 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | 25 | </ChildAxisIterator> |
1941 | 26 | <CtxVarIterator varid="4" varname="doc" varkind="global"/> | ||
1942 | 27 | </TreatIterator> | ||
1943 | 28 | </ChildAxisIterator> | ||
1944 | 29 | </NodeSortIterator> | ||
1948 | 30 | </EnclosedIterator> | 26 | </EnclosedIterator> |
1949 | 31 | </ElementIterator> | 27 | </ElementIterator> |
1950 | 32 | </ChildAxisIterator> | 28 | </ChildAxisIterator> |
1951 | 33 | 29 | ||
1952 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/positioned-access.iter' | |||
1953 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/positioned-access.iter 2012-10-08 12:09:36 +0000 | |||
1954 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/positioned-access.iter 2012-12-06 22:51:20 +0000 | |||
1955 | @@ -17,11 +17,7 @@ | |||
1956 | 17 | <FunctionTraceIterator> | 17 | <FunctionTraceIterator> |
1957 | 18 | <flwor::FLWORIterator> | 18 | <flwor::FLWORIterator> |
1958 | 19 | <LetVariable name="x" materialize="true"> | 19 | <LetVariable name="x" materialize="true"> |
1964 | 20 | <PromoteIterator type="xs:integer"> | 20 | <CtxVarIterator varid="4" varname="n1" varkind="global"/> |
1960 | 21 | <FnDataIterator> | ||
1961 | 22 | <CtxVarIterator varid="4" varname="n1" varkind="global"/> | ||
1962 | 23 | </FnDataIterator> | ||
1963 | 24 | </PromoteIterator> | ||
1965 | 25 | </LetVariable> | 21 | </LetVariable> |
1966 | 26 | <ReturnClause> | 22 | <ReturnClause> |
1967 | 27 | <LetVarIterator varname="x"> | 23 | <LetVarIterator varname="x"> |
1968 | @@ -35,11 +31,7 @@ | |||
1969 | 35 | <FunctionTraceIterator> | 31 | <FunctionTraceIterator> |
1970 | 36 | <flwor::FLWORIterator> | 32 | <flwor::FLWORIterator> |
1971 | 37 | <LetVariable name="x" materialize="true"> | 33 | <LetVariable name="x" materialize="true"> |
1977 | 38 | <PromoteIterator type="xs:integer"> | 34 | <CtxVarIterator varid="5" varname="n2" varkind="global"/> |
1973 | 39 | <FnDataIterator> | ||
1974 | 40 | <CtxVarIterator varid="5" varname="n2" varkind="global"/> | ||
1975 | 41 | </FnDataIterator> | ||
1976 | 42 | </PromoteIterator> | ||
1978 | 43 | </LetVariable> | 35 | </LetVariable> |
1979 | 44 | <ReturnClause> | 36 | <ReturnClause> |
1980 | 45 | <LetVarIterator varname="x"> | 37 | <LetVarIterator varname="x"> |
1981 | 46 | 38 | ||
1982 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/var_inline_01.iter' | |||
1983 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/var_inline_01.iter 2012-10-08 12:09:36 +0000 | |||
1984 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/optim/var_inline_01.iter 2012-12-06 22:51:20 +0000 | |||
1985 | @@ -17,47 +17,32 @@ | |||
1986 | 17 | <SingletonIterator value="xs:integer(2)"/> | 17 | <SingletonIterator value="xs:integer(2)"/> |
1987 | 18 | </NumArithIterator_ModOperation> | 18 | </NumArithIterator_ModOperation> |
1988 | 19 | </ForVariable> | 19 | </ForVariable> |
1990 | 20 | <LetVariable name="foo" materialize="true"> | 20 | <ForVariable name="foo"> |
1991 | 21 | <CtxVarIterator varid="4" varname="g" varkind="global"/> | 21 | <CtxVarIterator varid="4" varname="g" varkind="global"/> |
2002 | 22 | </LetVariable> | 22 | </ForVariable> |
1993 | 23 | <LetVariable name="$$opt_temp_0" materialize="true"> | ||
1994 | 24 | <HoistIterator> | ||
1995 | 25 | <PromoteIterator type="xs:anyAtomicType"> | ||
1996 | 26 | <FnDataIterator> | ||
1997 | 27 | <LetVarIterator varname="foo"/> | ||
1998 | 28 | </FnDataIterator> | ||
1999 | 29 | </PromoteIterator> | ||
2000 | 30 | </HoistIterator> | ||
2001 | 31 | </LetVariable> | ||
2003 | 32 | <WhereClause> | 23 | <WhereClause> |
2006 | 33 | <CompareIterator> | 24 | <TypedValueCompareIterator_INTEGER> |
2007 | 34 | <FnSumIterator> | 25 | <FnSumIntegerIterator> |
2008 | 35 | <flwor::FLWORIterator> | 26 | <flwor::FLWORIterator> |
2009 | 36 | <ForVariable name="z"> | 27 | <ForVariable name="z"> |
2010 | 37 | <FnConcatIterator> | 28 | <FnConcatIterator> |
2011 | 38 | <SingletonIterator value="xs:integer(5)"/> | 29 | <SingletonIterator value="xs:integer(5)"/> |
2013 | 39 | <LetVarIterator varname="foo"/> | 30 | <ForVarIterator varname="foo"/> |
2014 | 40 | </FnConcatIterator> | 31 | </FnConcatIterator> |
2015 | 41 | </ForVariable> | 32 | </ForVariable> |
2016 | 42 | <ReturnClause> | 33 | <ReturnClause> |
2024 | 43 | <GenericArithIterator_AddOperation> | 34 | <SpecificNumArithIterator_AddOperation_INTEGER> |
2025 | 44 | <GenericArithIterator_MultiplyOperation> | 35 | <SpecificNumArithIterator_MultiplyOperation_INTEGER> |
2026 | 45 | <PromoteIterator type="xs:anyAtomicType"> | 36 | <ForVarIterator varname="z"/> |
2020 | 46 | <FnDataIterator> | ||
2021 | 47 | <ForVarIterator varname="z"/> | ||
2022 | 48 | </FnDataIterator> | ||
2023 | 49 | </PromoteIterator> | ||
2027 | 50 | <ForVarIterator varname="y"/> | 37 | <ForVarIterator varname="y"/> |
2033 | 51 | </GenericArithIterator_MultiplyOperation> | 38 | </SpecificNumArithIterator_MultiplyOperation_INTEGER> |
2034 | 52 | <UnhoistIterator> | 39 | <ForVarIterator varname="foo"/> |
2035 | 53 | <LetVarIterator varname="$$opt_temp_0"/> | 40 | </SpecificNumArithIterator_AddOperation_INTEGER> |
2031 | 54 | </UnhoistIterator> | ||
2032 | 55 | </GenericArithIterator_AddOperation> | ||
2036 | 56 | </ReturnClause> | 41 | </ReturnClause> |
2037 | 57 | </flwor::FLWORIterator> | 42 | </flwor::FLWORIterator> |
2039 | 58 | </FnSumIterator> | 43 | </FnSumIntegerIterator> |
2040 | 59 | <SingletonIterator value="xs:integer(8)"/> | 44 | <SingletonIterator value="xs:integer(8)"/> |
2042 | 60 | </CompareIterator> | 45 | </TypedValueCompareIterator_INTEGER> |
2043 | 61 | </WhereClause> | 46 | </WhereClause> |
2044 | 62 | <ReturnClause> | 47 | <ReturnClause> |
2045 | 63 | <ForVarIterator varname="x"/> | 48 | <ForVarIterator varname="x"/> |
2046 | 64 | 49 | ||
2047 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter' | |||
2048 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter 2012-10-08 12:09:36 +0000 | |||
2049 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter 2012-12-06 22:51:20 +0000 | |||
2050 | @@ -31,11 +31,7 @@ | |||
2051 | 31 | </ElementIterator> | 31 | </ElementIterator> |
2052 | 32 | </DescendantAxisIterator> | 32 | </DescendantAxisIterator> |
2053 | 33 | </ChildAxisIterator> | 33 | </ChildAxisIterator> |
2059 | 34 | <PromoteIterator type="xs:integer"> | 34 | <CtxVarIterator varid="4" varname="x" varkind="global"/> |
2055 | 35 | <FnDataIterator> | ||
2056 | 36 | <CtxVarIterator varid="4" varname="x" varkind="global"/> | ||
2057 | 37 | </FnDataIterator> | ||
2058 | 38 | </PromoteIterator> | ||
2060 | 39 | </UDFunctionCallIterator> | 35 | </UDFunctionCallIterator> |
2061 | 40 | </SequentialIterator> | 36 | </SequentialIterator> |
2062 | 41 | 37 | ||
2063 | 42 | 38 | ||
2064 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q10.iter' | |||
2065 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q10.iter 2012-10-08 12:09:36 +0000 | |||
2066 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q10.iter 2012-12-06 22:51:20 +0000 | |||
2067 | @@ -32,13 +32,9 @@ | |||
2068 | 32 | <NodeSortIterator distinct="true" ascending="true"> | 32 | <NodeSortIterator distinct="true" ascending="true"> |
2069 | 33 | <flwor::FLWORIterator> | 33 | <flwor::FLWORIterator> |
2070 | 34 | <ForVariable name="$$context-item"> | 34 | <ForVariable name="$$context-item"> |
2078 | 35 | <NodeDistinctIterator allow-atomics="false" check-only="false"> | 35 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> |
2079 | 36 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> | 36 | <CtxVarIterator varid="4" varname="seq" varkind="global"/> |
2080 | 37 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | 37 | </ChildAxisIterator> |
2074 | 38 | <CtxVarIterator varid="4" varname="seq" varkind="global"/> | ||
2075 | 39 | </TreatIterator> | ||
2076 | 40 | </ChildAxisIterator> | ||
2077 | 41 | </NodeDistinctIterator> | ||
2081 | 42 | </ForVariable> | 38 | </ForVariable> |
2082 | 43 | <ForVariable name="$$context-item"> | 39 | <ForVariable name="$$context-item"> |
2083 | 44 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> | 40 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> |
2084 | @@ -47,7 +43,7 @@ | |||
2085 | 47 | </ForVariable> | 43 | </ForVariable> |
2086 | 48 | <WhereClause> | 44 | <WhereClause> |
2087 | 49 | <FnBooleanIterator> | 45 | <FnBooleanIterator> |
2089 | 50 | <CompareIterator> | 46 | <TypedValueCompareIterator_STRING> |
2090 | 51 | <PromoteIterator type="xs:anyAtomicType"> | 47 | <PromoteIterator type="xs:anyAtomicType"> |
2091 | 52 | <FnDataIterator> | 48 | <FnDataIterator> |
2092 | 53 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> | 49 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> |
2093 | @@ -56,7 +52,7 @@ | |||
2094 | 56 | </FnDataIterator> | 52 | </FnDataIterator> |
2095 | 57 | </PromoteIterator> | 53 | </PromoteIterator> |
2096 | 58 | <SingletonIterator value="xs:string(in)"/> | 54 | <SingletonIterator value="xs:string(in)"/> |
2098 | 59 | </CompareIterator> | 55 | </TypedValueCompareIterator_STRING> |
2099 | 60 | </FnBooleanIterator> | 56 | </FnBooleanIterator> |
2100 | 61 | </WhereClause> | 57 | </WhereClause> |
2101 | 62 | <ReturnClause> | 58 | <ReturnClause> |
2102 | @@ -100,7 +96,7 @@ | |||
2103 | 100 | </ForVariable> | 96 | </ForVariable> |
2104 | 101 | <WhereClause> | 97 | <WhereClause> |
2105 | 102 | <FnBooleanIterator> | 98 | <FnBooleanIterator> |
2107 | 103 | <CompareIterator> | 99 | <TypedValueCompareIterator_STRING> |
2108 | 104 | <PromoteIterator type="xs:anyAtomicType"> | 100 | <PromoteIterator type="xs:anyAtomicType"> |
2109 | 105 | <FnDataIterator> | 101 | <FnDataIterator> |
2110 | 106 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> | 102 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> |
2111 | @@ -109,7 +105,7 @@ | |||
2112 | 109 | </FnDataIterator> | 105 | </FnDataIterator> |
2113 | 110 | </PromoteIterator> | 106 | </PromoteIterator> |
2114 | 111 | <SingletonIterator value="xs:string(Barbara)"/> | 107 | <SingletonIterator value="xs:string(Barbara)"/> |
2116 | 112 | </CompareIterator> | 108 | </TypedValueCompareIterator_STRING> |
2117 | 113 | </FnBooleanIterator> | 109 | </FnBooleanIterator> |
2118 | 114 | </WhereClause> | 110 | </WhereClause> |
2119 | 115 | <ReturnClause> | 111 | <ReturnClause> |
2120 | 116 | 112 | ||
2121 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q4.iter' | |||
2122 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q4.iter 2012-10-08 12:09:36 +0000 | |||
2123 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q4.iter 2012-12-06 22:51:20 +0000 | |||
2124 | @@ -1,6 +1,11 @@ | |||
2125 | 1 | Iterator tree for const-folded expr: | 1 | Iterator tree for const-folded expr: |
2126 | 2 | <SingletonIterator value="xs:integer(2)"/> | 2 | <SingletonIterator value="xs:integer(2)"/> |
2127 | 3 | 3 | ||
2128 | 4 | Iterator tree for const-folded expr: | ||
2129 | 5 | <PromoteIterator type="xs:double"> | ||
2130 | 6 | <SingletonIterator value="xs:integer(2)"/> | ||
2131 | 7 | </PromoteIterator> | ||
2132 | 8 | |||
2133 | 4 | Iterator tree for main query: | 9 | Iterator tree for main query: |
2134 | 5 | <SequentialIterator> | 10 | <SequentialIterator> |
2135 | 6 | <CtxVarDeclareIterator varid="4" varname="timesequence"> | 11 | <CtxVarDeclareIterator varid="4" varname="timesequence"> |
2136 | @@ -11,60 +16,52 @@ | |||
2137 | 11 | <flwor::TupleStreamIterator> | 16 | <flwor::TupleStreamIterator> |
2138 | 12 | <flwor::WindowIterator> | 17 | <flwor::WindowIterator> |
2139 | 13 | <WindowVariable name="w"> | 18 | <WindowVariable name="w"> |
2147 | 14 | <NodeSortIterator distinct="true" ascending="true"> | 19 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> |
2148 | 15 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> | 20 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> |
2149 | 16 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> | 21 | <CtxVarIterator varid="4" varname="timesequence" varkind="global"/> |
2143 | 17 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | ||
2144 | 18 | <CtxVarIterator varid="4" varname="timesequence" varkind="global"/> | ||
2145 | 19 | </TreatIterator> | ||
2146 | 20 | </ChildAxisIterator> | ||
2150 | 21 | </ChildAxisIterator> | 22 | </ChildAxisIterator> |
2152 | 22 | </NodeSortIterator> | 23 | </ChildAxisIterator> |
2153 | 23 | </WindowVariable> | 24 | </WindowVariable> |
2154 | 24 | <WinCondVariable name="start-CurrentIn"/> | 25 | <WinCondVariable name="start-CurrentIn"/> |
2155 | 25 | <WinCondVariable name="start-CurrentInPrevIn"/> | 26 | <WinCondVariable name="start-CurrentInPrevIn"/> |
2156 | 26 | <OrIterator> | 27 | <OrIterator> |
2173 | 27 | <CompareIterator> | 28 | <TypedValueCompareIterator_STRING> |
2174 | 28 | <PromoteIterator type="xs:anyAtomicType"> | 29 | <FnDataIterator> |
2175 | 29 | <FnDataIterator> | 30 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> |
2176 | 30 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> | 31 | <ForVarIterator varname="s_curr"/> |
2177 | 31 | <ForVarIterator varname="s_curr"/> | 32 | </AttributeAxisIterator> |
2178 | 32 | </AttributeAxisIterator> | 33 | </FnDataIterator> |
2179 | 33 | </FnDataIterator> | 34 | <FnDataIterator> |
2180 | 34 | </PromoteIterator> | 35 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> |
2181 | 35 | <PromoteIterator type="xs:anyAtomicType"> | 36 | <ForVarIterator varname="s_prev"/> |
2182 | 36 | <FnDataIterator> | 37 | </AttributeAxisIterator> |
2183 | 37 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> | 38 | </FnDataIterator> |
2184 | 38 | <ForVarIterator varname="s_prev"/> | 39 | </TypedValueCompareIterator_STRING> |
2169 | 39 | </AttributeAxisIterator> | ||
2170 | 40 | </FnDataIterator> | ||
2171 | 41 | </PromoteIterator> | ||
2172 | 42 | </CompareIterator> | ||
2185 | 43 | <FnEmptyIterator> | 40 | <FnEmptyIterator> |
2186 | 44 | <ForVarIterator varname="s_prev"/> | 41 | <ForVarIterator varname="s_prev"/> |
2187 | 45 | </FnEmptyIterator> | 42 | </FnEmptyIterator> |
2188 | 46 | </OrIterator> | 43 | </OrIterator> |
2189 | 47 | <WinCondVariable name="end-NextIn"/> | 44 | <WinCondVariable name="end-NextIn"/> |
2190 | 48 | <FnBooleanIterator> | 45 | <FnBooleanIterator> |
2194 | 49 | <CompareIterator> | 46 | <TypedValueCompareIterator_DOUBLE> |
2195 | 50 | <GenericArithIterator_SubtractOperation> | 47 | <SpecificNumArithIterator_SubtractOperation_DOUBLE> |
2196 | 51 | <PromoteIterator type="xs:anyAtomicType"> | 48 | <PromoteIterator type="xs:double"> |
2197 | 52 | <FnDataIterator> | 49 | <FnDataIterator> |
2198 | 53 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> | 50 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> |
2199 | 54 | <ForVarIterator varname="e_next"/> | 51 | <ForVarIterator varname="e_next"/> |
2200 | 55 | </AttributeAxisIterator> | 52 | </AttributeAxisIterator> |
2201 | 56 | </FnDataIterator> | 53 | </FnDataIterator> |
2202 | 57 | </PromoteIterator> | 54 | </PromoteIterator> |
2204 | 58 | <PromoteIterator type="xs:anyAtomicType"> | 55 | <PromoteIterator type="xs:double"> |
2205 | 59 | <FnDataIterator> | 56 | <FnDataIterator> |
2206 | 60 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> | 57 | <AttributeAxisIterator test kind="match_name_test" qname="xs:QName(,,time)" typename="*" nill allowed="0"> |
2207 | 61 | <ForVarIterator varname="s_curr"/> | 58 | <ForVarIterator varname="s_curr"/> |
2208 | 62 | </AttributeAxisIterator> | 59 | </AttributeAxisIterator> |
2209 | 63 | </FnDataIterator> | 60 | </FnDataIterator> |
2210 | 64 | </PromoteIterator> | 61 | </PromoteIterator> |
2214 | 65 | </GenericArithIterator_SubtractOperation> | 62 | </SpecificNumArithIterator_SubtractOperation_DOUBLE> |
2215 | 66 | <SingletonIterator value="xs:integer(2)"/> | 63 | <SingletonIterator value="xs:double(2)"/> |
2216 | 67 | </CompareIterator> | 64 | </TypedValueCompareIterator_DOUBLE> |
2217 | 68 | </FnBooleanIterator> | 65 | </FnBooleanIterator> |
2218 | 69 | <flwor::TupleSourceIterator/> | 66 | <flwor::TupleSourceIterator/> |
2219 | 70 | </flwor::WindowIterator> | 67 | </flwor::WindowIterator> |
2220 | 71 | 68 | ||
2221 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q9.iter' | |||
2222 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q9.iter 2012-10-08 12:09:36 +0000 | |||
2223 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/windowing/q9.iter 2012-12-06 22:51:20 +0000 | |||
2224 | @@ -14,20 +14,16 @@ | |||
2225 | 14 | <LetVariable name="person" materialize="true"/> | 14 | <LetVariable name="person" materialize="true"/> |
2226 | 15 | <flwor::WindowIterator> | 15 | <flwor::WindowIterator> |
2227 | 16 | <WindowVariable name="w"> | 16 | <WindowVariable name="w"> |
2235 | 17 | <NodeSortIterator distinct="true" ascending="true"> | 17 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> |
2236 | 18 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,event)" typename="*" nill allowed="0"> | 18 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> |
2237 | 19 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,stream)" typename="*" nill allowed="0"> | 19 | <CtxVarIterator varid="4" varname="seq" varkind="global"/> |
2231 | 20 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="*"> | ||
2232 | 21 | <CtxVarIterator varid="4" varname="seq" varkind="global"/> | ||
2233 | 22 | </TreatIterator> | ||
2234 | 23 | </ChildAxisIterator> | ||
2238 | 24 | </ChildAxisIterator> | 20 | </ChildAxisIterator> |
2240 | 25 | </NodeSortIterator> | 21 | </ChildAxisIterator> |
2241 | 26 | </WindowVariable> | 22 | </WindowVariable> |
2242 | 27 | <WinCondVariable name="start-CurrentIn"/> | 23 | <WinCondVariable name="start-CurrentIn"/> |
2243 | 28 | <WinCondVariable name="start-CurrentInCurrentOut"/> | 24 | <WinCondVariable name="start-CurrentInCurrentOut"/> |
2244 | 29 | <FnBooleanIterator> | 25 | <FnBooleanIterator> |
2246 | 30 | <CompareIterator> | 26 | <TypedValueCompareIterator_STRING> |
2247 | 31 | <PromoteIterator type="xs:anyAtomicType"> | 27 | <PromoteIterator type="xs:anyAtomicType"> |
2248 | 32 | <FnDataIterator> | 28 | <FnDataIterator> |
2249 | 33 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> | 29 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> |
2250 | @@ -36,12 +32,12 @@ | |||
2251 | 36 | </FnDataIterator> | 32 | </FnDataIterator> |
2252 | 37 | </PromoteIterator> | 33 | </PromoteIterator> |
2253 | 38 | <SingletonIterator value="xs:string(in)"/> | 34 | <SingletonIterator value="xs:string(in)"/> |
2255 | 39 | </CompareIterator> | 35 | </TypedValueCompareIterator_STRING> |
2256 | 40 | </FnBooleanIterator> | 36 | </FnBooleanIterator> |
2257 | 41 | <WinCondVariable name="end-CurrentIn"/> | 37 | <WinCondVariable name="end-CurrentIn"/> |
2258 | 42 | <WinCondVariable name="end-CurrentInCurrentOut"/> | 38 | <WinCondVariable name="end-CurrentInCurrentOut"/> |
2259 | 43 | <AndIterator> | 39 | <AndIterator> |
2261 | 44 | <CompareIterator> | 40 | <TypedValueCompareIterator_STRING> |
2262 | 45 | <PromoteIterator type="xs:anyAtomicType"> | 41 | <PromoteIterator type="xs:anyAtomicType"> |
2263 | 46 | <FnDataIterator> | 42 | <FnDataIterator> |
2264 | 47 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> | 43 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,person)" typename="*" nill allowed="0"> |
2265 | @@ -56,8 +52,8 @@ | |||
2266 | 56 | </ChildAxisIterator> | 52 | </ChildAxisIterator> |
2267 | 57 | </FnDataIterator> | 53 | </FnDataIterator> |
2268 | 58 | </PromoteIterator> | 54 | </PromoteIterator> |
2271 | 59 | </CompareIterator> | 55 | </TypedValueCompareIterator_STRING> |
2272 | 60 | <CompareIterator> | 56 | <TypedValueCompareIterator_STRING> |
2273 | 61 | <PromoteIterator type="xs:anyAtomicType"> | 57 | <PromoteIterator type="xs:anyAtomicType"> |
2274 | 62 | <FnDataIterator> | 58 | <FnDataIterator> |
2275 | 63 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> | 59 | <ChildAxisIterator test kind="match_name_test" qname="xs:QName(,,direction)" typename="*" nill allowed="0"> |
2276 | @@ -66,7 +62,7 @@ | |||
2277 | 66 | </FnDataIterator> | 62 | </FnDataIterator> |
2278 | 67 | </PromoteIterator> | 63 | </PromoteIterator> |
2279 | 68 | <SingletonIterator value="xs:string(out)"/> | 64 | <SingletonIterator value="xs:string(out)"/> |
2281 | 69 | </CompareIterator> | 65 | </TypedValueCompareIterator_STRING> |
2282 | 70 | </AndIterator> | 66 | </AndIterator> |
2283 | 71 | <flwor::TupleSourceIterator/> | 67 | <flwor::TupleSourceIterator/> |
2284 | 72 | </flwor::WindowIterator> | 68 | </flwor::WindowIterator> |
2285 | 73 | 69 | ||
2286 | === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/xray/ppm_10.iter' | |||
2287 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/xray/ppm_10.iter 2012-10-08 12:09:36 +0000 | |||
2288 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/xray/ppm_10.iter 2012-12-06 22:51:20 +0000 | |||
2289 | @@ -183,13 +183,6 @@ | |||
2290 | 183 | </StringJoinIterator> | 183 | </StringJoinIterator> |
2291 | 184 | <SingletonIterator value="xs:string(255)"/> | 184 | <SingletonIterator value="xs:string(255)"/> |
2292 | 185 | <flwor::FLWORIterator> | 185 | <flwor::FLWORIterator> |
2293 | 186 | <LetVariable name="$$opt_temp_1" materialize="true"> | ||
2294 | 187 | <HoistIterator> | ||
2295 | 188 | <TreatIterator type="[NodeXQType elementNode content=[XQType ANY_TYPE_KIND*]]" quant=""> | ||
2296 | 189 | <CtxVarIterator varid="6" varname="scene" varkind="global"/> | ||
2297 | 190 | </TreatIterator> | ||
2298 | 191 | </HoistIterator> | ||
2299 | 192 | </LetVariable> | ||
2300 | 193 | <LetVariable name="$$opt_temp_0" materialize="true"> | 186 | <LetVariable name="$$opt_temp_0" materialize="true"> |
2301 | 194 | <HoistIterator> | 187 | <HoistIterator> |
2302 | 195 | <OpToIterator> | 188 | <OpToIterator> |
2303 | @@ -221,7 +214,7 @@ | |||
2304 | 221 | <SingletonIterator value="xs:decimal(0.5)"/> | 214 | <SingletonIterator value="xs:decimal(0.5)"/> |
2305 | 222 | </SpecificNumArithIterator_AddOperation_DECIMAL> | 215 | </SpecificNumArithIterator_AddOperation_DECIMAL> |
2306 | 223 | </ForVariable> | 216 | </ForVariable> |
2308 | 224 | <LetVariable name="$$opt_temp_2" materialize="true"> | 217 | <LetVariable name="$$opt_temp_1" materialize="true"> |
2309 | 225 | <HoistIterator> | 218 | <HoistIterator> |
2310 | 226 | <PromoteIterator type="xs:double"> | 219 | <PromoteIterator type="xs:double"> |
2311 | 227 | <ForVarIterator varname="y-recentered"/> | 220 | <ForVarIterator varname="y-recentered"/> |
2312 | @@ -238,9 +231,7 @@ | |||
2313 | 238 | <flwor::FLWORIterator> | 231 | <flwor::FLWORIterator> |
2314 | 239 | <ForVariable name="channel"> | 232 | <ForVariable name="channel"> |
2315 | 240 | <UDFunctionCallIterator> | 233 | <UDFunctionCallIterator> |
2319 | 241 | <UnhoistIterator> | 234 | <CtxVarIterator varid="6" varname="scene" varkind="global"/> |
2317 | 242 | <LetVarIterator varname="$$opt_temp_1"/> | ||
2318 | 243 | </UnhoistIterator> | ||
2320 | 244 | <PromoteIterator type="xs:double"> | 235 | <PromoteIterator type="xs:double"> |
2321 | 245 | <SpecificNumArithIterator_MultiplyOperation_DECIMAL> | 236 | <SpecificNumArithIterator_MultiplyOperation_DECIMAL> |
2322 | 246 | <SpecificNumArithIterator_SubtractOperation_DECIMAL> | 237 | <SpecificNumArithIterator_SubtractOperation_DECIMAL> |
2323 | @@ -254,7 +245,7 @@ | |||
2324 | 254 | </SpecificNumArithIterator_MultiplyOperation_DECIMAL> | 245 | </SpecificNumArithIterator_MultiplyOperation_DECIMAL> |
2325 | 255 | </PromoteIterator> | 246 | </PromoteIterator> |
2326 | 256 | <UnhoistIterator> | 247 | <UnhoistIterator> |
2328 | 257 | <LetVarIterator varname="$$opt_temp_2"/> | 248 | <LetVarIterator varname="$$opt_temp_1"/> |
2329 | 258 | </UnhoistIterator> | 249 | </UnhoistIterator> |
2330 | 259 | </UDFunctionCallIterator> | 250 | </UDFunctionCallIterator> |
2331 | 260 | </ForVariable> | 251 | </ForVariable> |
2332 | 261 | 252 | ||
2333 | === modified file 'test/rbkt/Queries/zorba/windowing/q4.xq' | |||
2334 | --- test/rbkt/Queries/zorba/windowing/q4.xq 2012-09-19 21:16:15 +0000 | |||
2335 | +++ test/rbkt/Queries/zorba/windowing/q4.xq 2012-12-06 22:51:20 +0000 | |||
2336 | @@ -4,8 +4,8 @@ | |||
2337 | 4 | 4 | ||
2338 | 5 | for sliding window $w in $timesequence/stream/event | 5 | for sliding window $w in $timesequence/stream/event |
2339 | 6 | start $s_curr at $s_pos previous $s_prev | 6 | start $s_curr at $s_pos previous $s_prev |
2341 | 7 | when ($s_curr/@time ne $s_prev/@time) or (empty($s_prev)) | 7 | when ($s_curr/@time ne $s_prev/@time) or (empty($s_prev)) |
2342 | 8 | only end next $e_next | 8 | only end next $e_next |
2344 | 9 | when $e_next/@time - $s_curr/@time gt $MAX_DIFF | 9 | when $e_next/@time - $s_curr/@time gt $MAX_DIFF |
2345 | 10 | return | 10 | return |
2346 | 11 | avg( $w/@temp ) | 11 | avg( $w/@temp ) |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ markos- scratch- 2012-12- 06T22-59- 53.623Z/ log.html
Log at: http://