Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba
- markos-scratch
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Markos Zaharioudakis |
Approved revision: | 11047 |
Merged at revision: | 11348 |
Proposed branch: | lp:~zorba-coders/zorba/markos-scratch |
Merge into: | lp:zorba |
Diff against target: |
515 lines (+150/-126) 12 files modified
ChangeLog (+5/-8) src/compiler/expression/path_expr.h (+1/-0) src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+42/-42) src/diagnostics/diagnostic.h (+1/-20) src/diagnostics/qname.h (+47/-0) src/diagnostics/xquery_stack_trace.cpp (+1/-0) src/store/api/item.h (+14/-1) src/store/naive/atomic_items.cpp (+20/-24) src/store/naive/atomic_items.h (+15/-13) src/store/naive/item.cpp (+1/-18) src/zorbaserialization/serialize_basic_types.cpp (+2/-0) src/zorbaserialization/serialize_template_types.h (+1/-0) |
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+157572@code.launchpad.net |
Commit message
Inlined Item::getTypeCode method for better performance
Description of the change
Inlined Item::getTypeCode method for better performance
Markos Zaharioudakis (markos-za) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job markos-
The final status was:
1 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
- 11047. By Markos Zaharioudakis
-
fixed bug in IntegerItemImpl
::equals( )
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job markos-
All tests succeeded!
Preview Diff
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2013-04-03 10:23:36 +0000 | |||
3 | +++ ChangeLog 2013-04-08 08:47:22 +0000 | |||
4 | @@ -36,7 +36,8 @@ | |||
5 | 36 | * Extented index join rule to general flwor expressions. | 36 | * Extented index join rule to general flwor expressions. |
6 | 37 | 37 | ||
7 | 38 | Bug Fixes/Other Changes: | 38 | Bug Fixes/Other Changes: |
9 | 39 | * Fixed bug #1123836 (overflows in date/time casts now return FODT0001 and in durations return FODT0002) | 39 | * Fixed bug #1123836 (overflows in date/time casts now return FODT0001 and |
10 | 40 | in durations return FODT0002) | ||
11 | 40 | * Fixed bug #1114228 (unrecognized options in the XQuery namespace now raise an error) | 41 | * Fixed bug #1114228 (unrecognized options in the XQuery namespace now raise an error) |
12 | 41 | * Fixed bug #1124273 (xqdoc crash because of annotation literals) | 42 | * Fixed bug #1124273 (xqdoc crash because of annotation literals) |
13 | 42 | * Fixed bug #867027 (XQST0059 error messages inconsistent) | 43 | * Fixed bug #867027 (XQST0059 error messages inconsistent) |
14 | @@ -46,6 +47,8 @@ | |||
15 | 46 | * Fixed bug in index join rule (copy var ids after cloning index domain expr). | 47 | * Fixed bug in index join rule (copy var ids after cloning index domain expr). |
16 | 47 | * Fixed bug #1123162 (FOTS: formatting dates and times failures) | 48 | * Fixed bug #1123162 (FOTS: formatting dates and times failures) |
17 | 48 | * Added missing wrapper expressions around some variable references. | 49 | * Added missing wrapper expressions around some variable references. |
18 | 50 | * Fixed optimizer bug: elimination of positional variable sometimes caused | ||
19 | 51 | elimination of whole FOR clause. | ||
20 | 49 | * Fixed bug in the throwing of error XQTY0086 during node construction. | 52 | * Fixed bug in the throwing of error XQTY0086 during node construction. |
21 | 50 | * Fixed bug #1148335 (where-clause expression was not always reset when it should be) | 53 | * Fixed bug #1148335 (where-clause expression was not always reset when it should be) |
22 | 51 | * Fixed bug #1122396 (Associate origin/destination URI to I/O stream) | 54 | * Fixed bug #1122396 (Associate origin/destination URI to I/O stream) |
23 | @@ -60,21 +63,15 @@ | |||
24 | 60 | * Fixed bug #866874 (regex "range subtraction" not supported for ICU) | 63 | * Fixed bug #866874 (regex "range subtraction" not supported for ICU) |
25 | 61 | * Fixed bug in computing the static type of an allowing-empty FOR variable. | 64 | * Fixed bug in computing the static type of an allowing-empty FOR variable. |
26 | 62 | * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat) | 65 | * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat) |
27 | 63 | <<<<<<< TREE | ||
28 | 64 | * Fixed bug #1099535 (xml:parse endless loop) | 66 | * Fixed bug #1099535 (xml:parse endless loop) |
29 | 65 | * Fixed bug in optimizing fn:count over general-index probes | 67 | * Fixed bug in optimizing fn:count over general-index probes |
30 | 66 | * Fixed bug #866958 (Parsing error not explicit enough) | 68 | * Fixed bug #866958 (Parsing error not explicit enough) |
31 | 67 | * Fixed bug #867068: (Incorrect usage of XQDY0027) | 69 | * Fixed bug #867068: (Incorrect usage of XQDY0027) |
32 | 68 | ======= | ||
33 | 69 | * Fixed bug #1099535 (xml:parse endless loop) | ||
34 | 70 | * Fixed bug: jsoniq constructor should not be const-folded | 70 | * Fixed bug: jsoniq constructor should not be const-folded |
35 | 71 | * Fixed bug #866958 (Parsing error not explicit enough) | ||
36 | 72 | * Fixed bug #1152834 (bug in computing the scripting kind of array and object | 71 | * Fixed bug #1152834 (bug in computing the scripting kind of array and object |
37 | 73 | constructor exprs) | 72 | constructor exprs) |
38 | 74 | * Fixed bug #1125444 (input group-by exprs were not treated by index-flwor_vars() | 73 | * Fixed bug #1125444 (input group-by exprs were not treated by index-flwor_vars() |
42 | 75 | functoin, leading to erroneous loop hoisting). | 74 | function, leading to erroneous loop hoisting). |
40 | 76 | * Fixed bug #867068 (Incorrect usage of XQDY0027) | ||
41 | 77 | >>>>>>> MERGE-SOURCE | ||
43 | 78 | * Fixed bug #1023362 (xsi:type attribute ignored during validation) | 75 | * Fixed bug #1023362 (xsi:type attribute ignored during validation) |
44 | 79 | 76 | ||
45 | 80 | 77 | ||
46 | 81 | 78 | ||
47 | === modified file 'src/compiler/expression/path_expr.h' | |||
48 | --- src/compiler/expression/path_expr.h 2013-02-07 17:24:36 +0000 | |||
49 | +++ src/compiler/expression/path_expr.h 2013-04-08 08:47:22 +0000 | |||
50 | @@ -22,6 +22,7 @@ | |||
51 | 22 | 22 | ||
52 | 23 | #include "zorbatypes/zstring.h" | 23 | #include "zorbatypes/zstring.h" |
53 | 24 | 24 | ||
54 | 25 | #include <zorba/store_consts.h> | ||
55 | 25 | 26 | ||
56 | 26 | namespace zorba | 27 | namespace zorba |
57 | 27 | { | 28 | { |
58 | 28 | 29 | ||
59 | === modified file 'src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp' | |||
60 | --- src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2013-03-22 00:38:18 +0000 | |||
61 | +++ src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2013-04-08 08:47:22 +0000 | |||
62 | @@ -48,6 +48,48 @@ | |||
63 | 48 | 48 | ||
64 | 49 | class ParseNodePrintXQDocVisitor : public parsenode_visitor | 49 | class ParseNodePrintXQDocVisitor : public parsenode_visitor |
65 | 50 | { | 50 | { |
66 | 51 | protected: | ||
67 | 52 | store::Item_t& theResult; | ||
68 | 53 | |||
69 | 54 | store::Item_t theModule; | ||
70 | 55 | store::Item_t theImports; | ||
71 | 56 | store::Item_t theVariables; | ||
72 | 57 | store::Item_t theFunctions; | ||
73 | 58 | store::Item_t theCollections; | ||
74 | 59 | store::Item_t theIndexes; | ||
75 | 60 | |||
76 | 61 | // set of functions being invoked in the function | ||
77 | 62 | // whoes declaration is currently being processed | ||
78 | 63 | map<string, store::Item_t> theInvokedFunc; | ||
79 | 64 | |||
80 | 65 | // prefix -> uri | ||
81 | 66 | map<zstring, zstring> theNamespaceMap; | ||
82 | 67 | |||
83 | 68 | // prefix -> uri for the schema imports | ||
84 | 69 | map<zstring, zstring> theNamespaceSchemaMap; | ||
85 | 70 | |||
86 | 71 | const char* theXQDocNS; | ||
87 | 72 | const char* theXQDocPrefix; | ||
88 | 73 | |||
89 | 74 | zstring theFileName; | ||
90 | 75 | zstring theBaseURI; | ||
91 | 76 | zstring theVersion; | ||
92 | 77 | store::NsBindings theNSBindings; | ||
93 | 78 | |||
94 | 79 | store::ItemFactory * theFactory; | ||
95 | 80 | |||
96 | 81 | string theQuery; | ||
97 | 82 | zstring theEncoding; | ||
98 | 83 | zstring theXQueryVersion; | ||
99 | 84 | |||
100 | 85 | uint32_t theOptions; | ||
101 | 86 | |||
102 | 87 | // helper vars to compute index sources | ||
103 | 88 | bool theIsIndexDecl; | ||
104 | 89 | bool theWaitForIndexSourceLiteral; | ||
105 | 90 | std::vector<pair<zstring,zstring> > theIndexSources; | ||
106 | 91 | |||
107 | 92 | |||
108 | 51 | private: | 93 | private: |
109 | 52 | 94 | ||
110 | 53 | string getFileName(const string& aFileName) | 95 | string getFileName(const string& aFileName) |
111 | @@ -458,48 +500,6 @@ | |||
112 | 458 | } | 500 | } |
113 | 459 | 501 | ||
114 | 460 | 502 | ||
115 | 461 | protected: | ||
116 | 462 | store::Item_t& theResult; | ||
117 | 463 | |||
118 | 464 | store::Item_t theModule; | ||
119 | 465 | store::Item_t theImports; | ||
120 | 466 | store::Item_t theVariables; | ||
121 | 467 | store::Item_t theFunctions; | ||
122 | 468 | store::Item_t theCollections; | ||
123 | 469 | store::Item_t theIndexes; | ||
124 | 470 | |||
125 | 471 | // set of functions being invoked in the function | ||
126 | 472 | // whoes declaration is currently being processed | ||
127 | 473 | map<string, store::Item_t> theInvokedFunc; | ||
128 | 474 | |||
129 | 475 | // prefix -> uri | ||
130 | 476 | map<zstring, zstring> theNamespaceMap; | ||
131 | 477 | |||
132 | 478 | // prefix -> uri for the schema imports | ||
133 | 479 | map<zstring, zstring> theNamespaceSchemaMap; | ||
134 | 480 | |||
135 | 481 | const char* theXQDocNS; | ||
136 | 482 | const char* theXQDocPrefix; | ||
137 | 483 | |||
138 | 484 | zstring theFileName; | ||
139 | 485 | zstring theBaseURI; | ||
140 | 486 | zstring theVersion; | ||
141 | 487 | store::NsBindings theNSBindings; | ||
142 | 488 | |||
143 | 489 | store::ItemFactory * theFactory; | ||
144 | 490 | |||
145 | 491 | string theQuery; | ||
146 | 492 | zstring theEncoding; | ||
147 | 493 | zstring theXQueryVersion; | ||
148 | 494 | |||
149 | 495 | uint32_t theOptions; | ||
150 | 496 | |||
151 | 497 | // helper vars to compute index sources | ||
152 | 498 | bool theIsIndexDecl; | ||
153 | 499 | bool theWaitForIndexSourceLiteral; | ||
154 | 500 | std::vector<pair<zstring,zstring> > | ||
155 | 501 | theIndexSources; | ||
156 | 502 | |||
157 | 503 | public: | 503 | public: |
158 | 504 | 504 | ||
159 | 505 | ParseNodePrintXQDocVisitor(store::Item_t& aResult, | 505 | ParseNodePrintXQDocVisitor(store::Item_t& aResult, |
160 | 506 | 506 | ||
161 | === modified file 'src/diagnostics/diagnostic.h' | |||
162 | --- src/diagnostics/diagnostic.h 2013-02-07 17:24:36 +0000 | |||
163 | +++ src/diagnostics/diagnostic.h 2013-04-08 08:47:22 +0000 | |||
164 | @@ -22,7 +22,7 @@ | |||
165 | 22 | #include <zorba/xquery_exception.h> | 22 | #include <zorba/xquery_exception.h> |
166 | 23 | 23 | ||
167 | 24 | #include "compiler/parser/query_loc.h" | 24 | #include "compiler/parser/query_loc.h" |
169 | 25 | #include "store/api/item.h" | 25 | #include "store/api/shared_types.h" |
170 | 26 | 26 | ||
171 | 27 | namespace zorba { | 27 | namespace zorba { |
172 | 28 | namespace diagnostic { | 28 | namespace diagnostic { |
173 | @@ -30,25 +30,6 @@ | |||
174 | 30 | /////////////////////////////////////////////////////////////////////////////// | 30 | /////////////////////////////////////////////////////////////////////////////// |
175 | 31 | 31 | ||
176 | 32 | /** | 32 | /** |
177 | 33 | * Given a store::Item_t that represents a QName, creates an instance of | ||
178 | 34 | * QNameType having the same QName. | ||
179 | 35 | * | ||
180 | 36 | * @tparam QNameType The type of QName to create. | ||
181 | 37 | * @param qname The QName item. | ||
182 | 38 | * @return Returns said QNameType. | ||
183 | 39 | */ | ||
184 | 40 | template<class QNameType> inline | ||
185 | 41 | QNameType to_QName( store::Item_t const &qname ) { | ||
186 | 42 | return QNameType( | ||
187 | 43 | qname->getNamespace().c_str(), | ||
188 | 44 | qname->getPrefix().c_str(), | ||
189 | 45 | qname->getLocalName().c_str() | ||
190 | 46 | ); | ||
191 | 47 | } | ||
192 | 48 | |||
193 | 49 | /////////////////////////////////////////////////////////////////////////////// | ||
194 | 50 | |||
195 | 51 | /** | ||
196 | 52 | * Makes an empty location. | 33 | * Makes an empty location. |
197 | 53 | * | 34 | * |
198 | 54 | * @return Returns said location. | 35 | * @return Returns said location. |
199 | 55 | 36 | ||
200 | === added file 'src/diagnostics/qname.h' | |||
201 | --- src/diagnostics/qname.h 1970-01-01 00:00:00 +0000 | |||
202 | +++ src/diagnostics/qname.h 2013-04-08 08:47:22 +0000 | |||
203 | @@ -0,0 +1,47 @@ | |||
204 | 1 | /* | ||
205 | 2 | * Copyright 2006-2008 The FLWOR Foundation. | ||
206 | 3 | * | ||
207 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
208 | 5 | * you may not use this file except in compliance with the License. | ||
209 | 6 | * You may obtain a copy of the License at | ||
210 | 7 | * | ||
211 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
212 | 9 | * | ||
213 | 10 | * Unless required by applicable law or agreed to in writing, software | ||
214 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
215 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
216 | 13 | * See the License for the specific language governing permissions and | ||
217 | 14 | * limitations under the License. | ||
218 | 15 | */ | ||
219 | 16 | |||
220 | 17 | #ifndef ZORBA_DIAGNOSTIC_QNAME_H | ||
221 | 18 | #define ZORBA_DIAGNOSTIC_QNAME_H | ||
222 | 19 | |||
223 | 20 | #include <zorba/config.h> | ||
224 | 21 | |||
225 | 22 | #include "store/api/item.h" | ||
226 | 23 | |||
227 | 24 | namespace zorba { | ||
228 | 25 | namespace diagnostic { | ||
229 | 26 | |||
230 | 27 | |||
231 | 28 | template<class QNameType> | ||
232 | 29 | QNameType to_QName( store::Item_t const &qname ) { | ||
233 | 30 | return QNameType( | ||
234 | 31 | qname->getNamespace().c_str(), | ||
235 | 32 | qname->getPrefix().c_str(), | ||
236 | 33 | qname->getLocalName().c_str() | ||
237 | 34 | ); | ||
238 | 35 | } | ||
239 | 36 | |||
240 | 37 | |||
241 | 38 | } // namespace diagnostic | ||
242 | 39 | } // namespace zorba | ||
243 | 40 | |||
244 | 41 | #endif /* ZORBA_DIAGNOSTIC_QNAME_H */ | ||
245 | 42 | /* | ||
246 | 43 | * Local variables: | ||
247 | 44 | * mode: c++ | ||
248 | 45 | * End: | ||
249 | 46 | */ | ||
250 | 47 | /* vim:set et sw=2 ts=2: */ | ||
251 | 0 | 48 | ||
252 | === modified file 'src/diagnostics/xquery_stack_trace.cpp' | |||
253 | --- src/diagnostics/xquery_stack_trace.cpp 2013-02-07 17:24:36 +0000 | |||
254 | +++ src/diagnostics/xquery_stack_trace.cpp 2013-04-08 08:47:22 +0000 | |||
255 | @@ -25,6 +25,7 @@ | |||
256 | 25 | #include <zorba/xquery_exception.h> | 25 | #include <zorba/xquery_exception.h> |
257 | 26 | 26 | ||
258 | 27 | #include "diagnostic.h" | 27 | #include "diagnostic.h" |
259 | 28 | #include "qname.h" | ||
260 | 28 | 29 | ||
261 | 29 | namespace zorba { | 30 | namespace zorba { |
262 | 30 | 31 | ||
263 | 31 | 32 | ||
264 | === modified file 'src/store/api/item.h' | |||
265 | --- src/store/api/item.h 2013-03-24 20:40:03 +0000 | |||
266 | +++ src/store/api/item.h 2013-04-08 08:47:22 +0000 | |||
267 | @@ -29,6 +29,8 @@ | |||
268 | 29 | #include <zorba/store_consts.h> | 29 | #include <zorba/store_consts.h> |
269 | 30 | #include "store/api/shared_types.h" | 30 | #include "store/api/shared_types.h" |
270 | 31 | 31 | ||
271 | 32 | #include "diagnostics/xquery_diagnostics.h" | ||
272 | 33 | |||
273 | 32 | #ifndef ZORBA_NO_FULL_TEXT | 34 | #ifndef ZORBA_NO_FULL_TEXT |
274 | 33 | #include <zorba/locale.h> | 35 | #include <zorba/locale.h> |
275 | 34 | #include <zorba/tokenizer.h> | 36 | #include <zorba/tokenizer.h> |
276 | @@ -120,6 +122,7 @@ | |||
277 | 120 | void removeReference(); | 122 | void removeReference(); |
278 | 121 | 123 | ||
279 | 122 | virtual size_t alloc_size() const; | 124 | virtual size_t alloc_size() const; |
280 | 125 | |||
281 | 123 | virtual size_t dynamic_size() const; | 126 | virtual size_t dynamic_size() const; |
282 | 124 | 127 | ||
283 | 125 | /* ------------------- General Methods for Items ------------------------- */ | 128 | /* ------------------- General Methods for Items ------------------------- */ |
284 | @@ -331,7 +334,17 @@ | |||
285 | 331 | /** | 334 | /** |
286 | 332 | * @return The numeric code coresponding to the data type of this item. | 335 | * @return The numeric code coresponding to the data type of this item. |
287 | 333 | */ | 336 | */ |
289 | 334 | SchemaTypeCode getTypeCode() const; | 337 | SchemaTypeCode getTypeCode() const |
290 | 338 | { | ||
291 | 339 | if (isAtomic()) | ||
292 | 340 | { | ||
293 | 341 | return static_cast<SchemaTypeCode>(theUnion.itemKind >> 4); | ||
294 | 342 | } | ||
295 | 343 | |||
296 | 344 | throw ZORBA_EXCEPTION( | ||
297 | 345 | zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE, | ||
298 | 346 | ERROR_PARAMS(__FUNCTION__, typeid(*this).name())); | ||
299 | 347 | } | ||
300 | 335 | 348 | ||
301 | 336 | /** | 349 | /** |
302 | 337 | * @return If this is an atomic item with a user-defined data type UT, return | 350 | * @return If this is an atomic item with a user-defined data type UT, return |
303 | 338 | 351 | ||
304 | === modified file 'src/store/naive/atomic_items.cpp' | |||
305 | --- src/store/naive/atomic_items.cpp 2013-03-21 18:22:40 +0000 | |||
306 | +++ src/store/naive/atomic_items.cpp 2013-04-08 08:47:22 +0000 | |||
307 | @@ -2745,31 +2745,19 @@ | |||
308 | 2745 | } | 2745 | } |
309 | 2746 | 2746 | ||
310 | 2747 | 2747 | ||
325 | 2748 | long IntegerItemImpl::compare( Item const *other, long, | 2748 | long IntegerItemImpl::compare(Item const* other, long, const XQPCollator*) const |
312 | 2749 | const XQPCollator* ) const { | ||
313 | 2750 | try | ||
314 | 2751 | { | ||
315 | 2752 | return theValue.compare( other->getIntegerValue() ); | ||
316 | 2753 | } | ||
317 | 2754 | catch ( ZorbaException const& ) | ||
318 | 2755 | { | ||
319 | 2756 | return getDecimalValue().compare( other->getDecimalValue() ); | ||
320 | 2757 | } | ||
321 | 2758 | } | ||
322 | 2759 | |||
323 | 2760 | bool IntegerItemImpl::equals( const store::Item* other, long, | ||
324 | 2761 | const XQPCollator*) const | ||
326 | 2762 | { | 2749 | { |
327 | 2763 | try | 2750 | try |
328 | 2764 | { | 2751 | { |
330 | 2765 | return theValue == other->getIntegerValue(); | 2752 | return theValue.compare(other->getIntegerValue()); |
331 | 2766 | } | 2753 | } |
333 | 2767 | catch (ZorbaException const&) | 2754 | catch (ZorbaException const& ) |
334 | 2768 | { | 2755 | { |
336 | 2769 | return getDecimalValue() == other->getDecimalValue(); | 2756 | return getDecimalValue().compare(other->getDecimalValue()); |
337 | 2770 | } | 2757 | } |
338 | 2771 | } | 2758 | } |
339 | 2772 | 2759 | ||
340 | 2760 | |||
341 | 2773 | xs_decimal IntegerItemImpl::getDecimalValue() const | 2761 | xs_decimal IntegerItemImpl::getDecimalValue() const |
342 | 2774 | { | 2762 | { |
343 | 2775 | return xs_decimal(theValue); | 2763 | return xs_decimal(theValue); |
344 | @@ -2870,20 +2858,24 @@ | |||
345 | 2870 | return sizeof( *this ); | 2858 | return sizeof( *this ); |
346 | 2871 | } | 2859 | } |
347 | 2872 | 2860 | ||
350 | 2873 | long NonPositiveIntegerItem::compare( Item const *other, long, | 2861 | |
351 | 2874 | const XQPCollator* ) const { | 2862 | long NonPositiveIntegerItem::compare(Item const* other, long, const XQPCollator*) const |
352 | 2863 | { | ||
353 | 2875 | try | 2864 | try |
354 | 2876 | { | 2865 | { |
356 | 2877 | return theValue.compare( other->getIntegerValue() ); | 2866 | return theValue.compare(other->getIntegerValue()); |
357 | 2878 | } | 2867 | } |
359 | 2879 | catch ( ZorbaException const& ) | 2868 | catch (ZorbaException const&) |
360 | 2880 | { | 2869 | { |
362 | 2881 | return getDecimalValue().compare( other->getDecimalValue() ); | 2870 | return getDecimalValue().compare(other->getDecimalValue()); |
363 | 2882 | } | 2871 | } |
364 | 2883 | } | 2872 | } |
365 | 2884 | 2873 | ||
368 | 2885 | bool NonPositiveIntegerItem::equals( const store::Item* other, long, | 2874 | |
369 | 2886 | const XQPCollator* ) const | 2875 | bool NonPositiveIntegerItem::equals( |
370 | 2876 | const store::Item* other, | ||
371 | 2877 | long, | ||
372 | 2878 | const XQPCollator* ) const | ||
373 | 2887 | { | 2879 | { |
374 | 2888 | try | 2880 | try |
375 | 2889 | { | 2881 | { |
376 | @@ -2895,21 +2887,25 @@ | |||
377 | 2895 | } | 2887 | } |
378 | 2896 | } | 2888 | } |
379 | 2897 | 2889 | ||
380 | 2890 | |||
381 | 2898 | store::Item* NonPositiveIntegerItem::getType() const | 2891 | store::Item* NonPositiveIntegerItem::getType() const |
382 | 2899 | { | 2892 | { |
383 | 2900 | return GET_STORE().theSchemaTypeNames[store::XS_NON_POSITIVE_INTEGER]; | 2893 | return GET_STORE().theSchemaTypeNames[store::XS_NON_POSITIVE_INTEGER]; |
384 | 2901 | } | 2894 | } |
385 | 2902 | 2895 | ||
386 | 2896 | |||
387 | 2903 | xs_decimal NonPositiveIntegerItem::getDecimalValue() const | 2897 | xs_decimal NonPositiveIntegerItem::getDecimalValue() const |
388 | 2904 | { | 2898 | { |
389 | 2905 | return xs_decimal(theValue); | 2899 | return xs_decimal(theValue); |
390 | 2906 | } | 2900 | } |
391 | 2907 | 2901 | ||
392 | 2902 | |||
393 | 2908 | xs_integer NonPositiveIntegerItem::getIntegerValue() const | 2903 | xs_integer NonPositiveIntegerItem::getIntegerValue() const |
394 | 2909 | { | 2904 | { |
395 | 2910 | return xs_integer(theValue); | 2905 | return xs_integer(theValue); |
396 | 2911 | } | 2906 | } |
397 | 2912 | 2907 | ||
398 | 2908 | |||
399 | 2913 | xs_long NonPositiveIntegerItem::getLongValue() const | 2909 | xs_long NonPositiveIntegerItem::getLongValue() const |
400 | 2914 | { | 2910 | { |
401 | 2915 | try | 2911 | try |
402 | 2916 | 2912 | ||
403 | === modified file 'src/store/naive/atomic_items.h' | |||
404 | --- src/store/naive/atomic_items.h 2013-03-21 18:22:40 +0000 | |||
405 | +++ src/store/naive/atomic_items.h 2013-04-08 08:47:22 +0000 | |||
406 | @@ -114,8 +114,6 @@ | |||
407 | 114 | theTypeName.transfer(typeName); | 114 | theTypeName.transfer(typeName); |
408 | 115 | } | 115 | } |
409 | 116 | 116 | ||
410 | 117 | //UserTypedAtomicItem() {} | ||
411 | 118 | |||
412 | 119 | public: | 117 | public: |
413 | 120 | size_t alloc_size() const; | 118 | size_t alloc_size() const; |
414 | 121 | size_t dynamic_size() const; | 119 | size_t dynamic_size() const; |
415 | @@ -1566,17 +1564,21 @@ | |||
416 | 1566 | 1564 | ||
417 | 1567 | store::Item* getType() const; | 1565 | store::Item* getType() const; |
418 | 1568 | 1566 | ||
430 | 1569 | uint32_t hash(long = 0, const XQPCollator* aCollation = 0) const; | 1567 | uint32_t hash(long = 0, const XQPCollator* c = 0) const; |
431 | 1570 | 1568 | ||
432 | 1571 | long compare( | 1569 | long compare(const Item* other, long tz = 0, const XQPCollator* c = 0) const; |
433 | 1572 | const Item* other, | 1570 | |
434 | 1573 | long timezone = 0, | 1571 | bool equals(const Item* other, long tz = 0, const XQPCollator* c = 0) const |
435 | 1574 | const XQPCollator* aCollation = 0) const; | 1572 | { |
436 | 1575 | 1573 | try | |
437 | 1576 | bool equals( | 1574 | { |
438 | 1577 | const store::Item* other, | 1575 | return theValue == other->getIntegerValue(); |
439 | 1578 | long timezone = 0, | 1576 | } |
440 | 1579 | const XQPCollator* aCollation = 0) const; | 1577 | catch (ZorbaException const&) |
441 | 1578 | { | ||
442 | 1579 | return getDecimalValue() == other->getDecimalValue(); | ||
443 | 1580 | } | ||
444 | 1581 | } | ||
445 | 1580 | 1582 | ||
446 | 1581 | bool getEBV() const; | 1583 | bool getEBV() const; |
447 | 1582 | 1584 | ||
448 | 1583 | 1585 | ||
449 | === modified file 'src/store/naive/item.cpp' | |||
450 | --- src/store/naive/item.cpp 2013-03-26 23:32:03 +0000 | |||
451 | +++ src/store/naive/item.cpp 2013-04-08 08:47:22 +0000 | |||
452 | @@ -220,7 +220,6 @@ | |||
453 | 220 | ZORBA_ASSERT(false); | 220 | ZORBA_ASSERT(false); |
454 | 221 | } | 221 | } |
455 | 222 | } | 222 | } |
456 | 223 | |||
457 | 224 | #endif | 223 | #endif |
458 | 225 | } | 224 | } |
459 | 226 | 225 | ||
460 | @@ -289,19 +288,6 @@ | |||
461 | 289 | } | 288 | } |
462 | 290 | 289 | ||
463 | 291 | 290 | ||
464 | 292 | store::SchemaTypeCode Item::getTypeCode() const | ||
465 | 293 | { | ||
466 | 294 | if (isAtomic()) | ||
467 | 295 | { | ||
468 | 296 | return static_cast<SchemaTypeCode>(theUnion.itemKind >> 4); | ||
469 | 297 | } | ||
470 | 298 | |||
471 | 299 | throw ZORBA_EXCEPTION( | ||
472 | 300 | zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE, | ||
473 | 301 | ERROR_PARAMS(__FUNCTION__, typeid(*this).name())); | ||
474 | 302 | } | ||
475 | 303 | |||
476 | 304 | |||
477 | 305 | Item* Item::getType() const | 291 | Item* Item::getType() const |
478 | 306 | { | 292 | { |
479 | 307 | throw ZORBA_EXCEPTION( | 293 | throw ZORBA_EXCEPTION( |
480 | @@ -318,10 +304,7 @@ | |||
481 | 318 | }; | 304 | }; |
482 | 319 | 305 | ||
483 | 320 | 306 | ||
488 | 321 | bool Item::equals( | 307 | bool Item::equals(const store::Item* other, long tz, const XQPCollator* c) const |
485 | 322 | const store::Item* other, | ||
486 | 323 | long timezone, | ||
487 | 324 | const XQPCollator* aCollation) const | ||
489 | 325 | { | 308 | { |
490 | 326 | throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR, | 309 | throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR, |
491 | 327 | ERROR_PARAMS(ZED(NoCompareTypes_23), | 310 | ERROR_PARAMS(ZED(NoCompareTypes_23), |
492 | 328 | 311 | ||
493 | === modified file 'src/zorbaserialization/serialize_basic_types.cpp' | |||
494 | --- src/zorbaserialization/serialize_basic_types.cpp 2013-02-07 17:24:36 +0000 | |||
495 | +++ src/zorbaserialization/serialize_basic_types.cpp 2013-04-08 08:47:22 +0000 | |||
496 | @@ -22,6 +22,8 @@ | |||
497 | 22 | #include "zorbaserialization/archiver.h" | 22 | #include "zorbaserialization/archiver.h" |
498 | 23 | #include "zorbaserialization/base64impl.h" | 23 | #include "zorbaserialization/base64impl.h" |
499 | 24 | 24 | ||
500 | 25 | #include "zorbatypes/floatimpl.h" | ||
501 | 26 | |||
502 | 25 | #include "diagnostics/xquery_diagnostics.h" | 27 | #include "diagnostics/xquery_diagnostics.h" |
503 | 26 | #include "diagnostics/util_macros.h" | 28 | #include "diagnostics/util_macros.h" |
504 | 27 | #include "diagnostics/assert.h" | 29 | #include "diagnostics/assert.h" |
505 | 28 | 30 | ||
506 | === modified file 'src/zorbaserialization/serialize_template_types.h' | |||
507 | --- src/zorbaserialization/serialize_template_types.h 2013-03-04 21:00:58 +0000 | |||
508 | +++ src/zorbaserialization/serialize_template_types.h 2013-04-08 08:47:22 +0000 | |||
509 | @@ -32,6 +32,7 @@ | |||
510 | 32 | #include "diagnostics/assert.h" | 32 | #include "diagnostics/assert.h" |
511 | 33 | 33 | ||
512 | 34 | #include "zorbatypes/zstring.h" | 34 | #include "zorbatypes/zstring.h" |
513 | 35 | #include "zorbatypes/floatimpl.h" | ||
514 | 35 | 36 | ||
515 | 36 | #include "zorbautils/checked_vector.h" | 37 | #include "zorbautils/checked_vector.h" |
516 | 37 | 38 |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ markos- scratch- 2013-04- 08T01-08- 52.383Z/ log.html
Log at: http://