Merge lp:~zorba-coders/zorba/bug-1176038 into lp:zorba

Proposed by Paul J. Lucas
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/bug-1176038
Merge into: lp:zorba
Diff against target: 957 lines (+160/-67)
55 files modified
ChangeLog (+10/-0)
src/api/dynamiccontextimpl.cpp (+1/-0)
src/api/item.cpp (+3/-1)
src/api/itemfactoryimpl.cpp (+6/-3)
src/api/serialization/serializer.cpp (+1/-0)
src/capi/csequence.cpp (+4/-3)
src/compiler/expression/expr.cpp (+3/-0)
src/compiler/expression/expr_manager.cpp (+10/-8)
src/compiler/parser/symbol_table.cpp (+3/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+5/-2)
src/compiler/parsetree/parsenodes.cpp (+5/-3)
src/compiler/parsetree/parsenodes.h (+3/-0)
src/compiler/rewriter/rules/fold_rules.cpp (+2/-0)
src/functions/udf.cpp (+1/-0)
src/runtime/base/plan_iterator.cpp (+4/-8)
src/runtime/booleans/BooleanImpl.cpp (+1/-0)
src/runtime/collections/collections_base.h (+1/-0)
src/runtime/core/arithmetic_impl.cpp (+1/-0)
src/runtime/core/var_iterators.h (+1/-1)
src/runtime/durations_dates_times/durations_dates_times_impl.cpp (+2/-0)
src/runtime/full_text/ft_module_impl.cpp (+1/-0)
src/runtime/full_text/ft_util.cpp (+1/-0)
src/runtime/full_text/ftcontains_visitor.cpp (+1/-2)
src/runtime/hof/dynamic_fncall_iterator.cpp (+1/-0)
src/runtime/hof/fn_hof_functions_impl.cpp (+1/-0)
src/runtime/introspection/sctx_impl.cpp (+1/-0)
src/runtime/item/item_impl.cpp (+1/-0)
src/runtime/json/jsoniq_functions_impl.cpp (+1/-0)
src/runtime/maths/pregenerated/maths.h (+1/-0)
src/runtime/numerics/format_integer.cpp (+1/-0)
src/runtime/random/pregenerated/random.h (+1/-0)
src/runtime/sequences/pregenerated/sequences.h (+1/-0)
src/runtime/spec/maths/maths.xml (+1/-0)
src/runtime/spec/random/random.xml (+4/-0)
src/runtime/spec/sequences/sequences.xml (+1/-0)
src/runtime/store/maps_impl.cpp (+1/-0)
src/store/naive/atomic_items.cpp (+1/-1)
src/store/naive/atomic_items.h (+4/-1)
src/store/naive/collection.h (+1/-0)
src/store/naive/collection_tree_info.h (+1/-0)
src/store/naive/simple_index_value.h (+1/-0)
src/store/naive/simple_lazy_temp_seq.cpp (+2/-2)
src/store/naive/simple_pul.cpp (+3/-6)
src/store/naive/simple_temp_seq.cpp (+1/-0)
src/system/globalenv.cpp (+1/-0)
src/types/casting.cpp (+5/-2)
src/types/schema/XercesParseUtils.cpp (+7/-4)
src/util/stl_util.h (+18/-0)
src/zorbaserialization/serialize_basic_types.cpp (+1/-0)
src/zorbatypes/datetime.h (+3/-4)
src/zorbatypes/datetime/datetimetype.cpp (+9/-8)
src/zorbatypes/datetime/timezone.cpp (+1/-0)
src/zorbatypes/duration.h (+6/-6)
src/zorbatypes/numconversions.cpp (+8/-1)
src/zorbatypes/timezone.h (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1176038
Reviewer Review Type Date Requested Status
Paul J. Lucas Pending
Review via email: mp+162361@code.launchpad.net

Commit message

This is a bogus merge proposal just so I can see the diff between the trunk.

Description of the change

This is a bogus merge proposal just so I can see the diff between the trunk.

To post a comment you must log in.
lp:~zorba-coders/zorba/bug-1176038 updated
11432. By Nicolae Brinza

Fixed a bug in the parser that was revealed by bison 2.7

11433. By Nicolae Brinza

Merged with Zorba trunk

11434. By Nicolae Brinza

Updated changelog

11435. By Nicolae Brinza

Moved the bugfix #1176038 Changelog to 2.9

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-05-08 03:22:27 +0000
3+++ ChangeLog 2013-05-08 11:02:30 +0000
4@@ -1,5 +1,15 @@
5 Zorba - The XQuery Processor
6
7+version 3.x
8+
9+New Features:
10+
11+Optimizations:
12+
13+Bug Fixes/Other Changes:
14+ * Fixed bug #1176038 (memory error in parser revealed by Bison 2.7)
15+
16+
17 version 2.9
18
19 New Features:
20
21=== modified file 'src/api/dynamiccontextimpl.cpp'
22--- src/api/dynamiccontextimpl.cpp 2013-05-08 03:19:57 +0000
23+++ src/api/dynamiccontextimpl.cpp 2013-05-08 11:02:30 +0000
24@@ -27,6 +27,7 @@
25 #include "types/typemanager.h"
26 #include "types/root_typemanager.h"
27 #include "types/schema/validate.h"
28+#include "zorbatypes/integer.h"
29
30 #include "api/unmarshaller.h"
31 #include "api/zorbaimpl.h"
32
33=== modified file 'src/api/item.cpp'
34--- src/api/item.cpp 2013-02-26 04:12:43 +0000
35+++ src/api/item.cpp 2013-05-08 11:02:30 +0000
36@@ -38,7 +38,9 @@
37 #include "store/api/iterator.h"
38 #include "store/api/collection.h"
39
40-#include <zorbatypes/numconversions.h>
41+#include "zorbatypes/floatimpl.h"
42+#include "zorbatypes/integer.h"
43+#include "zorbatypes/numconversions.h"
44
45 namespace zorba {
46
47
48=== modified file 'src/api/itemfactoryimpl.cpp'
49--- src/api/itemfactoryimpl.cpp 2013-03-27 03:30:14 +0000
50+++ src/api/itemfactoryimpl.cpp 2013-05-08 11:02:30 +0000
51@@ -25,14 +25,17 @@
52
53 #include "api/itemfactoryimpl.h"
54
55-#include "zorbatypes/duration.h"
56+#include "zorbatypes/decimal.h"
57+#include "zorbatypes/floatimpl.h"
58+#include "zorbatypes/integer.h"
59+#include "zorbatypes/schema_types.h"
60
61 #include "system/globalenv.h"
62
63+#include "store/api/copymode.h"
64+#include "store/api/item.h"
65 #include "store/api/item_factory.h"
66 #include "store/api/store.h"
67-#include "store/api/copymode.h"
68-#include "store/api/item.h"
69
70 #include "api/unmarshaller.h"
71
72
73=== modified file 'src/api/serialization/serializer.cpp'
74--- src/api/serialization/serializer.cpp 2013-04-25 02:05:20 +0000
75+++ src/api/serialization/serializer.cpp 2013-05-08 11:02:30 +0000
76@@ -39,6 +39,7 @@
77
78 #include "system/globalenv.h"
79 #include "zorbamisc/ns_consts.h"
80+#include "zorbatypes/integer.h"
81 #include "zorbatypes/numconversions.h"
82
83 #include "store/api/iterator.h"
84
85=== modified file 'src/capi/csequence.cpp'
86--- src/capi/csequence.cpp 2013-02-07 17:24:36 +0000
87+++ src/capi/csequence.cpp 2013-05-08 11:02:30 +0000
88@@ -18,16 +18,17 @@
89 #include "capi/csequence.h"
90
91 #include <cassert>
92-#include <string.h>
93+#include <cstring>
94
95 #include <zorba/zorba.h>
96 #include <zorba/diagnostic_list.h>
97 #include <zorba/iterator.h>
98 #include <zorba/store_consts.h>
99-#include <zorbamisc/ns_consts.h>
100-#include <zorbatypes/numconversions.h>
101
102 #include "util/string_util.h"
103+#include "zorbamisc/ns_consts.h"
104+#include "zorbatypes/floatimpl.h"
105+#include "zorbatypes/numconversions.h"
106
107 #include "error.h"
108
109
110=== modified file 'src/compiler/expression/expr.cpp'
111--- src/compiler/expression/expr.cpp 2013-03-07 10:10:10 +0000
112+++ src/compiler/expression/expr.cpp 2013-05-08 11:02:30 +0000
113@@ -49,6 +49,9 @@
114
115 #include "store/api/store.h"
116 #include "store/api/item_factory.h"
117+#include "zorbatypes/decimal.h"
118+#include "zorbatypes/floatimpl.h"
119+#include "zorbatypes/integer.h"
120
121
122 namespace zorba
123
124=== modified file 'src/compiler/expression/expr_manager.cpp'
125--- src/compiler/expression/expr_manager.cpp 2013-04-16 20:06:08 +0000
126+++ src/compiler/expression/expr_manager.cpp 2013-05-08 11:02:30 +0000
127@@ -15,22 +15,24 @@
128 */
129
130 #include "stdafx.h"
131+
132+#include "zorbatypes/decimal.h"
133+#include "zorbatypes/integer.h"
134+
135+#include "expr.h"
136 #include "expr_manager.h"
137-
138-#include "mem_manager.h"
139-
140-#include "expr.h"
141-#include "ftnode.h"
142-#include "var_expr.h"
143 #include "flwor_expr.h"
144 #include "fo_expr.h"
145 #include "ft_expr.h"
146+#include "ftnode.h"
147 #include "function_item_expr.h"
148+#include "json_exprs.h"
149+#include "mem_manager.h"
150 #include "path_expr.h"
151+#include "pragma.h"
152 #include "script_exprs.h"
153 #include "update_exprs.h"
154-#include "json_exprs.h"
155-#include "pragma.h"
156+#include "var_expr.h"
157
158 namespace zorba
159 {
160
161=== modified file 'src/compiler/parser/symbol_table.cpp'
162--- src/compiler/parser/symbol_table.cpp 2013-03-25 19:47:18 +0000
163+++ src/compiler/parser/symbol_table.cpp 2013-05-08 11:02:30 +0000
164@@ -15,6 +15,9 @@
165 */
166 #include "stdafx.h"
167
168+#include "zorbatypes/decimal.h"
169+#include "zorbatypes/floatimpl.h"
170+#include "zorbatypes/integer.h"
171 #include "zorbatypes/numconversions.h"
172
173 #include "compiler/parser/symbol_table.h"
174
175=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
176--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2013-03-22 00:38:18 +0000
177+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2013-05-08 11:02:30 +0000
178@@ -16,9 +16,12 @@
179 #include "stdafx.h"
180
181 #include <ostream>
182-#include "compiler/parsetree/parsenode_print_xml_visitor.h"
183-#include "compiler/parsetree/parsenode_visitor.h"
184+
185 #include "types/typemanager.h"
186+#include "zorbatypes/integer.h"
187+
188+#include "parsenode_print_xml_visitor.h"
189+#include "parsenode_visitor.h"
190
191 using namespace std;
192
193
194=== modified file 'src/compiler/parsetree/parsenodes.cpp'
195--- src/compiler/parsetree/parsenodes.cpp 2013-04-17 22:41:05 +0000
196+++ src/compiler/parsetree/parsenodes.cpp 2013-05-08 11:02:30 +0000
197@@ -29,6 +29,7 @@
198 #include "compiler/parsetree/parsenodes.h"
199 #include "compiler/parser/parse_constants.h"
200 #include "compiler/parsetree/parsenode_visitor.h"
201+#include "zorbatypes/integer.h"
202
203 #include <iostream>
204 #include <sstream>
205@@ -3690,11 +3691,14 @@
206 void DirAttributeList::push_back(rchandle<DirAttr> attr)
207 {
208 const QName* qname = attr->get_name();
209+
210+ theAttributes.push_back(attr);
211
212 if (qname->get_qname() == "xmlns" || qname->get_prefix() == "xmlns")
213 {
214 std::vector<rchandle<DirAttr> >::const_iterator ite = theAttributes.begin();
215 std::vector<rchandle<DirAttr> >::const_iterator end = theAttributes.end();
216+ end--; // the last element is the one we've just pushed
217 for (; ite != end; ++ite)
218 {
219 if (*((*ite)->get_name()) == *(qname))
220@@ -3703,9 +3707,7 @@
221 ERROR_PARAMS(attr->get_name()->get_qname()));
222 }
223 }
224- }
225-
226- theAttributes.push_back(attr);
227+ }
228 }
229
230
231
232=== modified file 'src/compiler/parsetree/parsenodes.h'
233--- src/compiler/parsetree/parsenodes.h 2013-05-08 03:19:57 +0000
234+++ src/compiler/parsetree/parsenodes.h 2013-05-08 11:02:30 +0000
235@@ -32,6 +32,9 @@
236
237 #include "store/api/item.h"
238
239+#include "zorbatypes/decimal.h"
240+#include "zorbatypes/integer.h"
241+#include "zorbatypes/floatimpl.h"
242 #include "zorbatypes/rchandle.h"
243 #include "zorbatypes/schema_types.h"
244 #include "zorbatypes/zstring.h"
245
246=== modified file 'src/compiler/rewriter/rules/fold_rules.cpp'
247--- src/compiler/rewriter/rules/fold_rules.cpp 2013-05-04 20:20:05 +0000
248+++ src/compiler/rewriter/rules/fold_rules.cpp 2013-05-08 11:02:30 +0000
249@@ -47,6 +47,8 @@
250 #include "store/api/store.h"
251 #include "store/api/item_factory.h"
252
253+#include "zorbatypes/integer.h"
254+
255 #include <iterator>
256
257 namespace zorba {
258
259=== modified file 'src/functions/udf.cpp'
260--- src/functions/udf.cpp 2013-04-24 01:35:58 +0000
261+++ src/functions/udf.cpp 2013-05-08 11:02:30 +0000
262@@ -36,6 +36,7 @@
263 #include "diagnostics/assert.h"
264
265 #include "types/typeops.h"
266+#include "zorbatypes/integer.h"
267
268 #include "zorbaserialization/serialize_template_types.h"
269 #include "zorbaserialization/serialize_zorba_types.h"
270
271=== modified file 'src/runtime/base/plan_iterator.cpp'
272--- src/runtime/base/plan_iterator.cpp 2013-03-24 20:40:03 +0000
273+++ src/runtime/base/plan_iterator.cpp 2013-05-08 11:02:30 +0000
274@@ -15,18 +15,14 @@
275 */
276 #include "stdafx.h"
277
278+#include "compiler/api/compilercb.h"
279 #include "context/static_context.h"
280-
281-#include "compiler/api/compilercb.h"
282-
283 #include "runtime/base/plan_iterator.h"
284-
285 #include "runtime/util/flowctl_exception.h"
286-
287+#include "store/api/item_factory.h"
288+#include "store/api/store.h"
289 #include "system/globalenv.h"
290-
291-#include "store/api/store.h"
292-#include "store/api/item_factory.h"
293+#include "zorbatypes/integer.h"
294
295
296 namespace zorba
297
298=== modified file 'src/runtime/booleans/BooleanImpl.cpp'
299--- src/runtime/booleans/BooleanImpl.cpp 2013-05-02 00:18:56 +0000
300+++ src/runtime/booleans/BooleanImpl.cpp 2013-05-08 11:02:30 +0000
301@@ -20,6 +20,7 @@
302
303 #include "zorbatypes/collation_manager.h"
304 #include "zorbatypes/datetime.h"
305+#include "zorbatypes/integer.h"
306
307 #include "system/globalenv.h"
308
309
310=== modified file 'src/runtime/collections/collections_base.h'
311--- src/runtime/collections/collections_base.h 2013-02-07 17:24:36 +0000
312+++ src/runtime/collections/collections_base.h 2013-05-08 11:02:30 +0000
313@@ -31,6 +31,7 @@
314 #include "types/typeimpl.h"
315
316 #include "diagnostics/util_macros.h"
317+#include "zorbatypes/integer.h"
318
319
320 namespace zorba {
321
322=== modified file 'src/runtime/core/arithmetic_impl.cpp'
323--- src/runtime/core/arithmetic_impl.cpp 2013-04-08 21:32:54 +0000
324+++ src/runtime/core/arithmetic_impl.cpp 2013-05-08 11:02:30 +0000
325@@ -21,6 +21,7 @@
326 #include "diagnostics/util_macros.h"
327
328 #include "zorbatypes/datetime.h"
329+#include "zorbatypes/decimal.h"
330 #include "zorbatypes/duration.h"
331
332 #include "system/globalenv.h"
333
334=== modified file 'src/runtime/core/var_iterators.h'
335--- src/runtime/core/var_iterators.h 2013-05-08 08:01:05 +0000
336+++ src/runtime/core/var_iterators.h 2013-05-08 11:02:30 +0000
337@@ -23,7 +23,7 @@
338 #include "runtime/base/unarybase.h"
339 #include "runtime/base/narybase.h"
340
341-#include "zorbatypes/schema_types.h"
342+#include "zorbatypes/integer.h"
343
344
345 namespace zorba
346
347=== modified file 'src/runtime/durations_dates_times/durations_dates_times_impl.cpp'
348--- src/runtime/durations_dates_times/durations_dates_times_impl.cpp 2013-02-07 17:24:36 +0000
349+++ src/runtime/durations_dates_times/durations_dates_times_impl.cpp 2013-05-08 11:02:30 +0000
350@@ -17,6 +17,8 @@
351
352 #include "zorbatypes/datetime.h"
353 #include "zorbatypes/duration.h"
354+#include "zorbatypes/decimal.h"
355+#include "zorbatypes/integer.h"
356 #include "zorbatypes/numconversions.h"
357 #include "zorbatypes/datetime/parse.h"
358
359
360=== modified file 'src/runtime/full_text/ft_module_impl.cpp'
361--- src/runtime/full_text/ft_module_impl.cpp 2013-04-16 22:12:03 +0000
362+++ src/runtime/full_text/ft_module_impl.cpp 2013-05-08 11:02:30 +0000
363@@ -46,6 +46,7 @@
364 #include "types/typeops.h"
365 #include "util/stl_util.h"
366 #include "util/utf8_util.h"
367+#include "zorbatypes/integer.h"
368 #include "zorbatypes/URI.h"
369 #include "zorbautils/locale.h"
370
371
372=== modified file 'src/runtime/full_text/ft_util.cpp'
373--- src/runtime/full_text/ft_util.cpp 2013-02-07 17:24:36 +0000
374+++ src/runtime/full_text/ft_util.cpp 2013-05-08 11:02:30 +0000
375@@ -20,6 +20,7 @@
376
377 #include "diagnostics/xquery_diagnostics.h"
378 #include "zorbamisc/ns_consts.h"
379+#include "zorbatypes/integer.h"
380 #include "zorbatypes/numconversions.h"
381 #include "zorbautils/locale.h"
382
383
384=== modified file 'src/runtime/full_text/ftcontains_visitor.cpp'
385--- src/runtime/full_text/ftcontains_visitor.cpp 2013-02-07 17:24:36 +0000
386+++ src/runtime/full_text/ftcontains_visitor.cpp 2013-05-08 11:02:30 +0000
387@@ -24,12 +24,11 @@
388 #include "compiler/parser/query_loc.h"
389 #include "diagnostics/xquery_diagnostics.h"
390 #include "store/api/store.h"
391-
392 #include "system/globalenv.h"
393-
394 #include "util/cxx_util.h"
395 #include "util/indent.h"
396 #include "util/stl_util.h"
397+#include "zorbatypes/integer.h"
398
399 #ifndef NDEBUG
400 #include "system/properties.h"
401
402=== modified file 'src/runtime/hof/dynamic_fncall_iterator.cpp'
403--- src/runtime/hof/dynamic_fncall_iterator.cpp 2013-05-05 04:49:50 +0000
404+++ src/runtime/hof/dynamic_fncall_iterator.cpp 2013-05-08 11:02:30 +0000
405@@ -34,6 +34,7 @@
406 #include "types/root_typemanager.h"
407 #include "types/casting.h"
408 #include "types/typeops.h"
409+#include "zorbatypes/integer.h"
410
411 #include "system/globalenv.h"
412
413
414=== modified file 'src/runtime/hof/fn_hof_functions_impl.cpp'
415--- src/runtime/hof/fn_hof_functions_impl.cpp 2013-04-24 01:35:58 +0000
416+++ src/runtime/hof/fn_hof_functions_impl.cpp 2013-05-08 11:02:30 +0000
417@@ -42,6 +42,7 @@
418 #include "system/globalenv.h"
419
420 #include "zorbamisc/ns_consts.h"
421+#include "zorbatypes/integer.h"
422
423
424 #include "compiler/expression/expr_manager.h"
425
426=== modified file 'src/runtime/introspection/sctx_impl.cpp'
427--- src/runtime/introspection/sctx_impl.cpp 2013-02-07 17:24:36 +0000
428+++ src/runtime/introspection/sctx_impl.cpp 2013-05-08 11:02:30 +0000
429@@ -19,6 +19,7 @@
430
431 #include "diagnostics/assert.h"
432 #include "diagnostics/xquery_diagnostics.h"
433+#include "zorbatypes/integer.h"
434 #include "zorbatypes/numconversions.h"
435
436 #include "system/globalenv.h"
437
438=== modified file 'src/runtime/item/item_impl.cpp'
439--- src/runtime/item/item_impl.cpp 2012-07-17 18:47:54 +0000
440+++ src/runtime/item/item_impl.cpp 2013-05-08 11:02:30 +0000
441@@ -25,6 +25,7 @@
442 #include "store/api/store.h"
443
444 #include "util/mem_sizeof.h"
445+#include "zorbatypes/integer.h"
446
447 using namespace std;
448
449
450=== modified file 'src/runtime/json/jsoniq_functions_impl.cpp'
451--- src/runtime/json/jsoniq_functions_impl.cpp 2013-05-05 04:49:50 +0000
452+++ src/runtime/json/jsoniq_functions_impl.cpp 2013-05-08 11:02:30 +0000
453@@ -46,6 +46,7 @@
454 #include "types/typeimpl.h"
455 #include "types/typeops.h"
456 #include "types/root_typemanager.h"
457+#include "zorbatypes/integer.h"
458
459 #include <runtime/util/doc_uri_heuristics.h>
460
461
462=== modified file 'src/runtime/maths/pregenerated/maths.h'
463--- src/runtime/maths/pregenerated/maths.h 2013-03-05 23:11:50 +0000
464+++ src/runtime/maths/pregenerated/maths.h 2013-05-08 11:02:30 +0000
465@@ -29,6 +29,7 @@
466 #include "runtime/base/binarybase.h"
467 #include "runtime/base/noarybase.h"
468
469+#include "zorbatypes/integer.h"
470 #include "zorbatypes/schema_types.h"
471
472
473
474=== modified file 'src/runtime/numerics/format_integer.cpp'
475--- src/runtime/numerics/format_integer.cpp 2013-05-04 20:27:31 +0000
476+++ src/runtime/numerics/format_integer.cpp 2013-05-08 11:02:30 +0000
477@@ -34,6 +34,7 @@
478 #include "util/stream_util.h"
479 #include "util/unicode_util.h"
480 #include "util/utf8_string.h"
481+#include "zorbatypes/integer.h"
482 #include "zorbatypes/numconversions.h"
483
484 using namespace std;
485
486=== modified file 'src/runtime/random/pregenerated/random.h'
487--- src/runtime/random/pregenerated/random.h 2013-03-05 23:11:50 +0000
488+++ src/runtime/random/pregenerated/random.h 2013-05-08 11:02:30 +0000
489@@ -29,6 +29,7 @@
490
491
492 #include "runtime/base/narybase.h"
493+#include "zorbatypes/integer.h"
494
495
496 namespace zorba {
497
498=== modified file 'src/runtime/sequences/pregenerated/sequences.h'
499--- src/runtime/sequences/pregenerated/sequences.h 2013-04-15 20:57:28 +0000
500+++ src/runtime/sequences/pregenerated/sequences.h 2013-05-08 11:02:30 +0000
501@@ -31,6 +31,7 @@
502 #include "runtime/base/narybase.h"
503 #include "runtime/base/narybase.h"
504 #include "runtime/core/path_iterators.h"
505+#include "zorbatypes/integer.h"
506
507
508 namespace zorba {
509
510=== modified file 'src/runtime/spec/maths/maths.xml'
511--- src/runtime/spec/maths/maths.xml 2013-02-07 17:24:36 +0000
512+++ src/runtime/spec/maths/maths.xml 2013-05-08 11:02:30 +0000
513@@ -6,6 +6,7 @@
514 xsi:schemaLocation="http://www.zorba-xquery.com ../runtime.xsd">
515
516 <zorba:header>
517+ <zorba:include form="Quoted">zorbatypes/integer.h</zorba:include>
518 <zorba:include form="Quoted">zorbatypes/schema_types.h</zorba:include>
519 </zorba:header>
520
521
522=== modified file 'src/runtime/spec/random/random.xml'
523--- src/runtime/spec/random/random.xml 2013-02-07 17:24:36 +0000
524+++ src/runtime/spec/random/random.xml 2013-05-08 11:02:30 +0000
525@@ -12,6 +12,10 @@
526 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
527 xsi:schemaLocation="http://www.zorba-xquery.com ../runtime.xsd">
528
529+<zorba:header>
530+ <zorba:include form="Quoted">zorbatypes/integer.h</zorba:include>
531+</zorba:header>
532+
533 <!--
534 /*******************************************************************************
535 ********************************************************************************/
536
537=== modified file 'src/runtime/spec/sequences/sequences.xml'
538--- src/runtime/spec/sequences/sequences.xml 2013-04-15 20:57:28 +0000
539+++ src/runtime/spec/sequences/sequences.xml 2013-05-08 11:02:30 +0000
540@@ -15,6 +15,7 @@
541 <zorba:header>
542 <zorba:include form="Quoted">runtime/base/narybase.h</zorba:include>
543 <zorba:include form="Quoted">runtime/core/path_iterators.h</zorba:include>
544+ <zorba:include form="Quoted">zorbatypes/integer.h</zorba:include>
545 <zorba:fwd-decl ns="zorba">NodeHandleHashSet</zorba:fwd-decl>
546 <zorba:fwd-decl ns="zorba">AtomicItemHandleHashSet</zorba:fwd-decl>
547 </zorba:header>
548
549=== modified file 'src/runtime/store/maps_impl.cpp'
550--- src/runtime/store/maps_impl.cpp 2013-03-05 12:34:19 +0000
551+++ src/runtime/store/maps_impl.cpp 2013-05-08 11:02:30 +0000
552@@ -19,6 +19,7 @@
553 #include "diagnostics/util_macros.h"
554 #include "diagnostics/xquery_diagnostics.h"
555
556+#include "zorbatypes/integer.h"
557 #include "zorbatypes/URI.h"
558
559 #include "system/globalenv.h"
560
561=== modified file 'src/store/naive/atomic_items.cpp'
562--- src/store/naive/atomic_items.cpp 2013-04-16 21:12:12 +0000
563+++ src/store/naive/atomic_items.cpp 2013-05-08 11:02:30 +0000
564@@ -2691,7 +2691,7 @@
565
566 bool DecimalItem::getEBV() const
567 {
568- return ( theValue != xs_decimal::zero() );
569+ return !!theValue.sign();
570 }
571
572
573
574=== modified file 'src/store/naive/atomic_items.h'
575--- src/store/naive/atomic_items.h 2013-04-08 08:45:18 +0000
576+++ src/store/naive/atomic_items.h 2013-05-08 11:02:30 +0000
577@@ -38,8 +38,11 @@
578 #include "naive_ft_token_iterator.h"
579 #endif /* ZORBA_NO_FULL_TEXT */
580
581+#include "zorbatypes/datetime.h"
582+#include "zorbatypes/decimal.h"
583+#include "zorbatypes/floatimpl.h"
584+#include "zorbatypes/integer.h"
585 #include "zorbatypes/schema_types.h"
586-#include "zorbatypes/datetime.h"
587
588 #include "diagnostics/xquery_diagnostics.h"
589 #include "ordpath.h"
590
591=== modified file 'src/store/naive/collection.h'
592--- src/store/naive/collection.h 2013-02-26 04:12:43 +0000
593+++ src/store/naive/collection.h 2013-05-08 11:02:30 +0000
594@@ -17,6 +17,7 @@
595 #define ZORBA_SIMPLESTORE_COLLECTION
596
597 #include "store/api/collection.h"
598+#include "zorbatypes/integer.h"
599
600 #include "shared_types.h"
601 #include "tree_id.h"
602
603=== modified file 'src/store/naive/collection_tree_info.h'
604--- src/store/naive/collection_tree_info.h 2013-02-06 18:52:32 +0000
605+++ src/store/naive/collection_tree_info.h 2013-05-08 11:02:30 +0000
606@@ -18,6 +18,7 @@
607 #define ZORBA_STORE_COLLECTION_TREE_INFO_H
608
609 #include <zorba/config.h>
610+#include "zorbatypes/integer.h"
611
612 namespace zorba
613 {
614
615=== modified file 'src/store/naive/simple_index_value.h'
616--- src/store/naive/simple_index_value.h 2013-02-07 17:24:36 +0000
617+++ src/store/naive/simple_index_value.h 2013-05-08 11:02:30 +0000
618@@ -17,6 +17,7 @@
619 #define ZORBA_SIMPLE_STORE_INDEX_HASH_VALUE
620
621 #include "simple_index.h"
622+#include "zorbatypes/integer.h"
623 #include <map>
624
625 namespace zorba
626
627=== modified file 'src/store/naive/simple_lazy_temp_seq.cpp'
628--- src/store/naive/simple_lazy_temp_seq.cpp 2013-04-16 21:12:12 +0000
629+++ src/store/naive/simple_lazy_temp_seq.cpp 2013-05-08 11:02:30 +0000
630@@ -21,9 +21,9 @@
631 #include "diagnostics/dict.h"
632 #include "diagnostics/util_macros.h"
633 #include "diagnostics/xquery_exception.h"
634-
635+#include "simple_lazy_temp_seq.h"
636 #include "store/api/item.h"
637-#include "simple_lazy_temp_seq.h"
638+#include "zorbatypes/integer.h"
639
640
641 namespace zorba
642
643=== modified file 'src/store/naive/simple_pul.cpp'
644--- src/store/naive/simple_pul.cpp 2013-04-17 18:37:33 +0000
645+++ src/store/naive/simple_pul.cpp 2013-05-08 11:02:30 +0000
646@@ -1419,8 +1419,7 @@
647
648 xs_integer pos = position->getIntegerValue();
649
650- if (pos <= xs_integer::zero() ||
651- arr->getArraySize() + 1 < pos)
652+ if (pos.sign() <= 0 || arr->getArraySize() + 1 < pos)
653 {
654 RAISE_ERROR(jerr::JNUP0016, loc,
655 ERROR_PARAMS(ZED(JNUP0016_Array), position->getStringValue()));
656@@ -1557,8 +1556,7 @@
657
658 xs_integer pos = position->getIntegerValue();
659
660- if (pos <= xs_integer::zero() ||
661- arr->getArraySize() < pos)
662+ if (pos.sign() <= 0 || arr->getArraySize() < pos)
663 {
664 RAISE_ERROR(jerr::JNUP0016, loc,
665 ERROR_PARAMS(ZED(JNUP0016_Array), position->getStringValue()));
666@@ -1623,8 +1621,7 @@
667
668 xs_integer pos = position->getIntegerValue();
669
670- if (pos <= xs_integer::zero() ||
671- arr->getArraySize() < pos)
672+ if (pos.sign() <= 0 || arr->getArraySize() < pos)
673 {
674 RAISE_ERROR(jerr::JNUP0016, loc,
675 ERROR_PARAMS(ZED(JNUP0016_Array), position->getStringValue()));
676
677=== modified file 'src/store/naive/simple_temp_seq.cpp'
678--- src/store/naive/simple_temp_seq.cpp 2013-04-17 18:37:33 +0000
679+++ src/store/naive/simple_temp_seq.cpp 2013-05-08 11:02:30 +0000
680@@ -24,6 +24,7 @@
681 #include "store/api/item.h"
682 #include "simple_temp_seq.h"
683 #include "store/api/copymode.h"
684+#include "zorbatypes/integer.h"
685
686 namespace zorba { namespace simplestore {
687
688
689=== modified file 'src/system/globalenv.cpp'
690--- src/system/globalenv.cpp 2013-02-07 17:24:36 +0000
691+++ src/system/globalenv.cpp 2013-05-08 11:02:30 +0000
692@@ -42,6 +42,7 @@
693
694 #include "types/schema/schema.h"
695
696+#include "zorbatypes/m_apm.h"
697 #include "zorbautils/condition.h"
698
699 #include "store/api/collection.h"
700
701=== modified file 'src/types/casting.cpp'
702--- src/types/casting.cpp 2013-05-02 00:18:56 +0000
703+++ src/types/casting.cpp 2013-05-08 11:02:30 +0000
704@@ -17,10 +17,13 @@
705
706 #include <vector>
707
708-#include "zorbatypes/numconversions.h"
709+#include "zorbatypes/chartype.h"
710 #include "zorbatypes/datetime.h"
711+#include "zorbatypes/decimal.h"
712 #include "zorbatypes/duration.h"
713-#include "zorbatypes/chartype.h"
714+#include "zorbatypes/floatimpl.h"
715+#include "zorbatypes/integer.h"
716+#include "zorbatypes/numconversions.h"
717 #include "zorbatypes/URI.h"
718
719 #include "diagnostics/xquery_diagnostics.h"
720
721=== modified file 'src/types/schema/XercesParseUtils.cpp'
722--- src/types/schema/XercesParseUtils.cpp 2013-03-05 12:34:19 +0000
723+++ src/types/schema/XercesParseUtils.cpp 2013-05-08 11:02:30 +0000
724@@ -28,15 +28,18 @@
725 #include "LoadSchemaErrorHandler.h"
726 #include "PrintSchema.h"
727
728+#include "diagnostics/xquery_diagnostics.h"
729 #include "store/api/item.h"
730 #include "store/api/item_factory.h"
731+#include "system/globalenv.h"
732 #include "types/typeimpl.h"
733-#include "diagnostics/xquery_diagnostics.h"
734-#include <zorbatypes/numconversions.h>
735-#include "system/globalenv.h"
736+#include "util/utf8_util.h"
737 #include "zorbatypes/datetime.h"
738+#include "zorbatypes/decimal.h"
739 #include "zorbatypes/duration.h"
740-#include "util/utf8_util.h"
741+#include "zorbatypes/floatimpl.h"
742+#include "zorbatypes/integer.h"
743+#include "zorbatypes/numconversions.h"
744
745 using namespace std;
746 XERCES_CPP_NAMESPACE_USE;
747
748=== modified file 'src/util/stl_util.h'
749--- src/util/stl_util.h 2013-04-17 15:21:56 +0000
750+++ src/util/stl_util.h 2013-05-08 11:02:30 +0000
751@@ -421,6 +421,13 @@
752 return true;
753 }
754
755+inline std::enable_if<!ZORBA_TR1_NS::is_signed<char>::value
756+ && !ZORBA_TR1_NS::is_unsigned<char>::value,
757+ bool>::type
758+ge0( char c ) {
759+ return c >= 0;
760+}
761+
762 template<typename NumericType> inline
763 typename std::enable_if<ZORBA_TR1_NS::is_signed<NumericType>::value,bool>::type
764 lt0( NumericType n ) {
765@@ -433,6 +440,13 @@
766 return false;
767 }
768
769+inline std::enable_if<!ZORBA_TR1_NS::is_signed<char>::value
770+ && !ZORBA_TR1_NS::is_unsigned<char>::value,
771+ bool>::type
772+lt0( char c ) {
773+ return c < 0;
774+}
775+
776 template<typename NumericType> inline
777 typename std::enable_if<ZORBA_TR1_NS::is_signed<NumericType>::value,bool>::type
778 le0( NumericType n ) {
779@@ -445,6 +459,10 @@
780 return n == 0;
781 }
782
783+inline bool le0( char c ) {
784+ return c <= 0;
785+}
786+
787 ///////////////////////////////////////////////////////////////////////////////
788
789 //
790
791=== modified file 'src/zorbaserialization/serialize_basic_types.cpp'
792--- src/zorbaserialization/serialize_basic_types.cpp 2013-04-08 00:12:00 +0000
793+++ src/zorbaserialization/serialize_basic_types.cpp 2013-05-08 11:02:30 +0000
794@@ -22,6 +22,7 @@
795 #include "zorbaserialization/archiver.h"
796 #include "zorbaserialization/base64impl.h"
797
798+#include "zorbatypes/m_apm.h"
799 #include "zorbatypes/floatimpl.h"
800
801 #include "diagnostics/xquery_diagnostics.h"
802
803=== modified file 'src/zorbatypes/datetime.h'
804--- src/zorbatypes/datetime.h 2013-04-23 06:09:42 +0000
805+++ src/zorbatypes/datetime.h 2013-05-08 11:02:30 +0000
806@@ -20,11 +20,10 @@
807 #include <iostream>
808
809 #include <zorba/config.h>
810-#include "zorbatypes/timezone.h"
811-#include "zorbatypes/duration.h"
812-
813 #include "util/ascii_util.h"
814
815+#include "timezone.h"
816+#include "duration.h"
817
818 namespace zorba
819 {
820@@ -301,7 +300,7 @@
821
822 int getMinutes() const;
823
824- xs_decimal getSeconds() const;
825+ Decimal getSeconds() const;
826
827 int getIntSeconds() const;
828
829
830=== modified file 'src/zorbatypes/datetime/datetimetype.cpp'
831--- src/zorbatypes/datetime/datetimetype.cpp 2013-04-24 17:26:02 +0000
832+++ src/zorbatypes/datetime/datetimetype.cpp 2013-05-08 11:02:30 +0000
833@@ -29,14 +29,15 @@
834 #include <time.h>
835 #endif
836
837+#include "zorbatypes/datetime.h"
838+#include "zorbatypes/datetime/parse.h"
839+#include "zorbatypes/decimal.h"
840+#include "zorbatypes/duration.h"
841+#include "zorbatypes/integer.h"
842+#include "zorbatypes/timezone.h"
843+#include "zorbatypes/zorbatypes_decl.h"
844+#include "zorbatypes/zstring.h"
845 #include "zorbautils/hashfun.h"
846-#include <zorbatypes/datetime.h>
847-#include <zorbatypes/duration.h>
848-#include <zorbatypes/timezone.h>
849-#include <zorbatypes/zorbatypes_decl.h>
850-#include <zorbatypes/zstring.h>
851-
852-#include "zorbatypes/datetime/parse.h"
853
854 #include "util/ascii_util.h"
855 #include "util/time_util.h"
856@@ -1325,7 +1326,7 @@
857 // validate timezone value (-14 .. +14 H)
858 if (d->getYears() != 0 || d->getMonths() != 0 ||
859 d->getDays() != 0 ||
860- d->getSeconds() != Integer::zero() ||
861+ d->getSeconds().sign() != 0 ||
862 d->getHours()*3600 + d->getMinutes()*60 > 14*3600 ||
863 d->getHours()*3600 + d->getMinutes()*60 < -14*3600)
864 throw InvalidTimezoneException( d->getHours()*3600 + d->getMinutes()*60 );
865
866=== modified file 'src/zorbatypes/datetime/timezone.cpp'
867--- src/zorbatypes/datetime/timezone.cpp 2013-03-13 16:19:33 +0000
868+++ src/zorbatypes/datetime/timezone.cpp 2013-05-08 11:02:30 +0000
869@@ -22,6 +22,7 @@
870 #include <zorbatypes/timezone.h>
871
872 #include "zorbatypes/datetime/parse.h"
873+#include "zorbatypes/decimal.h"
874
875 #include "zorbautils/hashfun.h"
876
877
878=== modified file 'src/zorbatypes/duration.h'
879--- src/zorbatypes/duration.h 2013-02-07 17:24:36 +0000
880+++ src/zorbatypes/duration.h 2013-05-08 11:02:30 +0000
881@@ -18,10 +18,10 @@
882 #define ZORBA_TYPES_DURATION_H
883
884 #include <zorba/config.h>
885-#include "zorbatypes/zorbatypes_decl.h"
886-#include "zorbatypes/schema_types.h"
887+#include "zorbatypes_decl.h"
888
889 #include "util/ascii_util.h"
890+#include "zorbatypes/zstring.h"
891
892 namespace zorba
893 {
894@@ -175,9 +175,9 @@
895
896 Duration* operator-(const Duration& d) const;
897
898- Duration* operator*(const xs_double& value) const;
899+ Duration* operator*(const Double& value) const;
900
901- Duration* operator/(const xs_double& value) const;
902+ Duration* operator/(const Double& value) const;
903
904 Decimal operator/(const Duration& d) const;
905
906@@ -195,13 +195,13 @@
907
908 virtual long getMinutes() const;
909
910- virtual xs_decimal getSeconds() const;
911+ virtual Decimal getSeconds() const;
912
913 virtual long getFractionalSeconds() const;
914
915 virtual long getIntSeconds() const;
916
917- xs_double getTotalSeconds() const;
918+ Double getTotalSeconds() const;
919
920 long getTotalMilliseconds() const;
921
922
923=== modified file 'src/zorbatypes/numconversions.cpp'
924--- src/zorbatypes/numconversions.cpp 2013-03-22 19:06:44 +0000
925+++ src/zorbatypes/numconversions.cpp 2013-05-08 11:02:30 +0000
926@@ -15,11 +15,18 @@
927 */
928 #include "stdafx.h"
929
930+// standard
931 #include <stdexcept>
932
933+// Zorba
934 #include "common/common.h"
935 #include "util/string_util.h"
936-#include "zorbatypes/numconversions.h"
937+
938+// local
939+#include "decimal.h"
940+#include "floatimpl.h"
941+#include "integer.h"
942+#include "numconversions.h"
943
944 namespace zorba {
945
946
947=== modified file 'src/zorbatypes/timezone.h'
948--- src/zorbatypes/timezone.h 2013-02-07 17:24:36 +0000
949+++ src/zorbatypes/timezone.h 2013-05-08 11:02:30 +0000
950@@ -74,7 +74,7 @@
951
952 long getMinutes() const;
953
954- xs_decimal getSeconds() const;
955+ Decimal getSeconds() const;
956
957 long getIntSeconds() const;
958

Subscribers

People subscribed via source and target branches