Status: | Superseded |
---|---|
Proposed branch: | lp:~zorba-coders/zorba/llvm |
Merge into: | lp:zorba |
Diff against target: |
6480 lines (+870/-842) 152 files modified
CMakeCompiler.txt (+6/-4) CMakeLists.txt (+15/-13) bin/zorbacmd.cpp (+2/-0) include/zorba/config.h.cmake (+1/-1) src/api/CMakeLists.txt (+4/-1) src/api/dynamiccontextimpl.cpp (+4/-4) src/api/serialization/serializer.cpp (+8/-8) src/api/serialization/serializer.h (+1/-1) src/api/staticcontextimpl.cpp (+2/-1) src/api/staticcontextimpl.h (+3/-3) src/api/uuid.cpp (+5/-0) src/api/xqueryimpl.cpp (+7/-7) src/api/xqueryimpl.h (+1/-1) src/api/zorbaimpl.h (+1/-1) src/compiler/api/compiler_api.cpp (+2/-2) src/compiler/api/compiler_api.h (+2/-2) src/compiler/codegen/plan_visitor.cpp (+21/-21) src/compiler/codegen/plan_visitor.h (+1/-1) src/compiler/expression/expr_manager.cpp (+3/-3) src/compiler/expression/expr_manager.h (+3/-1) src/compiler/expression/flwor_expr.cpp (+2/-2) src/compiler/expression/var_expr.cpp (+1/-1) src/compiler/expression/var_expr.h (+3/-3) src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+1/-5) src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+1/-1) src/compiler/parsetree/parsenodes.cpp (+1/-1) src/compiler/parsetree/parsenodes.h (+10/-10) src/compiler/rewriter/framework/rewriter_context.h (+1/-1) src/compiler/rewriter/rewriters/default_optimizer.cpp (+1/-1) src/compiler/rewriter/rules/flwor_rules.cpp (+4/-4) src/compiler/rewriter/rules/fold_rules.cpp (+1/-1) src/compiler/rewriter/rules/hoist_rules.cpp (+1/-1) src/compiler/rewriter/rules/index_join_rule.cpp (+22/-22) src/compiler/rewriter/tools/dataflow_annotations.cpp (+6/-6) src/compiler/rewriter/tools/expr_tools.cpp (+5/-5) src/compiler/rewriter/tools/expr_tools.h (+1/-1) src/compiler/rewriter/tools/udf_graph.cpp (+2/-2) src/compiler/rewriter/tools/udf_graph.h (+4/-4) src/compiler/translator/prolog_graph.cpp (+5/-5) src/compiler/translator/translator.cpp (+13/-13) src/compiler/xqddf/value_index.cpp (+2/-2) src/context/default_url_resolvers.cpp (+3/-1) src/context/dynamic_context.cpp (+28/-28) src/context/dynamic_context.h (+14/-14) src/context/namespace_context.cpp (+4/-4) src/context/static_context.cpp (+12/-12) src/context/static_context.h (+7/-7) src/functions/function.cpp (+1/-1) src/functions/function_impl.h (+2/-2) src/functions/udf.cpp (+1/-1) src/runtime/core/apply_updates.cpp (+2/-2) src/runtime/core/flwor_iterator.cpp (+6/-6) src/runtime/core/flwor_iterator.h (+4/-4) src/runtime/core/fncall_iterator.cpp (+2/-2) src/runtime/core/gflwor/common.h (+1/-1) src/runtime/core/gflwor/groupby_iterator.cpp (+4/-4) src/runtime/core/gflwor/orderby_iterator.cpp (+13/-13) src/runtime/core/gflwor/orderby_iterator.h (+5/-5) src/runtime/core/gflwor/window_iterator.cpp (+14/-14) src/runtime/core/gflwor/window_iterator.h (+17/-17) src/runtime/core/path.cpp (+10/-10) src/runtime/core/path.h (+3/-3) src/runtime/core/path_iterators.cpp (+5/-5) src/runtime/core/path_iterators.h (+3/-3) src/runtime/core/trycatch.h (+1/-1) src/runtime/core/var_iterators.cpp (+2/-2) src/runtime/core/var_iterators.h (+12/-12) src/runtime/eval/eval.cpp (+6/-6) src/runtime/eval/eval.h (+2/-2) src/runtime/indexing/doc_indexer.h (+1/-1) src/runtime/indexing/index_ddl.cpp (+10/-10) src/runtime/introspection/pregenerated/sctx.h (+5/-5) src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp (+2/-2) src/runtime/sequences/SequencesImpl.cpp (+3/-3) src/runtime/sequences/sequences_impl.cpp (+1/-1) src/runtime/spec/codegen-cpp.xq (+1/-1) src/runtime/spec/introspection/sctx.xml (+5/-5) src/runtime/store/maps_impl.cpp (+2/-2) src/runtime/update/update.cpp (+7/-7) src/runtime/visitors/printer_visitor_impl.cpp (+4/-4) src/store/api/item_factory.h (+11/-11) src/store/api/item_handle.h (+0/-8) src/store/naive/atomic_items.cpp (+2/-2) src/store/naive/atomic_items.h (+2/-2) src/store/naive/collection.cpp (+1/-1) src/store/naive/collection.h (+1/-1) src/store/naive/dataguide.cpp (+13/-13) src/store/naive/dataguide.h (+7/-7) src/store/naive/hashmap_nodep.h (+1/-1) src/store/naive/item_vector.cpp (+1/-1) src/store/naive/item_vector.h (+2/-2) src/store/naive/loader.h (+1/-1) src/store/naive/loader_dtd.cpp (+5/-5) src/store/naive/loader_fast.cpp (+5/-5) src/store/naive/node_factory.cpp (+2/-2) src/store/naive/node_factory.h (+2/-2) src/store/naive/node_items.cpp (+16/-16) src/store/naive/node_items.h (+6/-6) src/store/naive/node_updates.cpp (+6/-6) src/store/naive/nsbindings.cpp (+6/-6) src/store/naive/ordpath.cpp (+118/-118) src/store/naive/ordpath.h (+43/-43) src/store/naive/pul_primitives.h (+10/-10) src/store/naive/qname_pool.cpp (+4/-4) src/store/naive/qname_pool.h (+6/-6) src/store/naive/query_context.h (+3/-3) src/store/naive/simple_collection.h (+2/-2) src/store/naive/simple_collection_set.cpp (+1/-1) src/store/naive/simple_collection_set.h (+1/-1) src/store/naive/simple_index.cpp (+7/-7) src/store/naive/simple_index_general.h (+1/-1) src/store/naive/simple_item_factory.cpp (+18/-18) src/store/naive/simple_item_factory.h (+18/-18) src/store/naive/simple_pul.h (+2/-2) src/store/naive/simple_store.cpp (+1/-1) src/store/naive/simple_store.h (+2/-2) src/store/naive/store.cpp (+10/-10) src/store/naive/store.h (+10/-10) src/store/naive/string_pool.cpp (+1/-1) src/store/naive/string_pool.h (+1/-1) src/store/naive/tree_id.h (+1/-1) src/store/naive/tree_id_generator.cpp (+1/-1) src/store/naive/tree_id_generator.h (+3/-3) src/store/util/hashmap_stringbuf.h (+1/-1) src/store/util/item_vector.cpp (+2/-2) src/types/typemanagerimpl.cpp (+2/-2) src/unit_tests/CMakeLists.txt (+10/-2) src/unit_tests/test_fs_iterator.cpp (+2/-1) src/util/cxx_util.h (+2/-1) src/util/dynamic_bitset.cpp (+1/-1) src/util/dynamic_bitset.h (+14/-14) src/util/file.cpp (+2/-0) src/util/regex_xquery.cpp (+2/-0) src/util/unicode_util.cpp (+3/-1) src/util/unicode_util.h (+0/-1) src/util/utf8_util.cpp (+2/-0) src/util/utf8_util.h (+2/-3) src/zorbaserialization/serialize_basic_types.cpp (+2/-2) src/zorbaserialization/serialize_basic_types.h (+1/-1) src/zorbaserialization/serialize_template_types.h (+2/-2) src/zorbatypes/URI.cpp (+16/-16) src/zorbatypes/URI.h (+5/-5) src/zorbatypes/datetime/datetimetype.cpp (+5/-5) src/zorbatypes/datetime/duration.cpp (+1/-1) src/zorbautils/hashmap.h (+14/-14) src/zorbautils/hashmap_itemh.h (+1/-1) src/zorbautils/hashset.h (+2/-2) src/zorbautils/lock.h (+2/-2) src/zorbautils/stack.h (+5/-5) src/zorbautils/string_util.cpp (+5/-0) test/update/specification.h (+2/-2) test/update/updtestdriver.cpp (+4/-4) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/llvm |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul J. Lucas | Approve | ||
Matthias Brantner | Pending | ||
Review via email: mp+141181@code.launchpad.net |
Commit message
Fix build with the following options:
- ZORBA_NO_ICU
- ZORBA_NO_XMLSCHEMA
- ZORBA_NO_FULLTEXT
- ZORBA_WITH_
Description of the change
Fix build with the following options:
- ZORBA_NO_ICU
- ZORBA_NO_XMLSCHEMA
- ZORBA_NO_FULLTEXT
- ZORBA_WITH_
To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) : | # |
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 llvm-2012-
All tests succeeded!
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.
lp:~zorba-coders/zorba/llvm
updated
- 11166. By William Candillon
-
Add UUID support for emscripten.
- 11167. By William Candillon
-
Merge.
- 11168. By William Candillon
-
Remove references to ulong to u_long
- 11169. By William Candillon
-
Fix ZORBA_NO_ICU build.
- 11170. By William Candillon
-
Merge.
- 11171. By William Candillon
-
Merge.
- 11172. By William Candillon
-
Merge.
- 11173. By William Candillon
-
Merge.
- 11174. By William Candillon
-
Merged.
- 11175. By William Candillon
-
Merge.
- 11176. By William Candillon
-
Merge.
- 11177. By William Candillon
-
Merge.
Unmerged revisions
- 11177. By William Candillon
-
Merge.
- 11176. By William Candillon
-
Merge.
- 11175. By William Candillon
-
Merge.
- 11174. By William Candillon
-
Merged.
- 11173. By William Candillon
-
Merge.
- 11172. By William Candillon
-
Merge.
- 11171. By William Candillon
-
Merge.
- 11170. By William Candillon
-
Merge.
- 11169. By William Candillon
-
Fix ZORBA_NO_ICU build.
- 11168. By William Candillon
-
Remove references to ulong to u_long
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeCompiler.txt' |
2 | --- CMakeCompiler.txt 2012-09-19 21:16:15 +0000 |
3 | +++ CMakeCompiler.txt 2012-12-24 23:26:24 +0000 |
4 | @@ -257,8 +257,10 @@ |
5 | MESSAGE (FATAL_ERROR "Could not find libuuid - required on Linux!") |
6 | ENDIF (NOT LIBUUID_EXISTS) |
7 | ELSE (APPLE) |
8 | - # We're not Apple or Win32, and we didn't find uuid.h - can't compile |
9 | - MESSAGE (FATAL_ERROR "Could not find uuid/uuid.h header, which is " |
10 | - "required on Linux. On Ubuntu, the 'uuid-dev' package is required; " |
11 | - "look for similar packages on other platforms.") |
12 | + IF(NOT EMSCRIPTEN) |
13 | + # We're not Apple or Win32, and we didn't find uuid.h - can't compile |
14 | + MESSAGE (FATAL_ERROR "Could not find uuid/uuid.h header, which is " |
15 | + "required on Linux. On Ubuntu, the 'uuid-dev' package is required; " |
16 | + "look for similar packages on other platforms.") |
17 | + ENDIF(NOT EMSCRIPTEN) |
18 | ENDIF (APPLE) |
19 | |
20 | === modified file 'CMakeLists.txt' |
21 | --- CMakeLists.txt 2012-10-08 12:09:36 +0000 |
22 | +++ CMakeLists.txt 2012-12-24 23:26:24 +0000 |
23 | @@ -95,11 +95,11 @@ |
24 | CHECK_INCLUDE_FILES ("limits.h" ZORBA_HAVE_LIMITS_H) |
25 | CHECK_INCLUDE_FILES ("sys/types.h" ZORBA_HAVE_SYS_TYPES_H) |
26 | CHECK_INCLUDE_FILES ("iconv.h" ZORBA_HAVE_ICONV_H) |
27 | -IF (NOT APPLE OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.4") |
28 | +IF (NOT APPLE OR CMAKE_SYSTEM_VERSION VERSION_GREATER "10.4") |
29 | # execinfo is found by this macro when cross compiling for Mac OS X 10.4 |
30 | # although it shouldn't be found for this platform |
31 | CHECK_INCLUDE_FILES ("execinfo.h" ZORBA_HAVE_EXECINFO_H) |
32 | -ENDIF (NOT APPLE OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.4") |
33 | +ENDIF (NOT APPLE OR CMAKE_SYSTEM_VERSION VERSION_GREATER "10.4") |
34 | CHECK_INCLUDE_FILE_CXX ("FlexLexer.h" ZORBA_HAVE_FLEXLEXER_H) |
35 | CHECK_INCLUDE_FILES ("uuid/uuid.h" ZORBA_HAVE_UUID_H) |
36 | |
37 | @@ -324,18 +324,20 @@ |
38 | # |
39 | # ICU |
40 | # |
41 | -MESSAGE(STATUS "Looking for ICU") |
42 | -FIND_PACKAGE(ICU) |
43 | +IF(NOT ZORBA_NO_ICU) |
44 | + MESSAGE(STATUS "Looking for ICU") |
45 | + FIND_PACKAGE(ICU) |
46 | + |
47 | + IF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
48 | + MESSAGE(STATUS "Found ICU library -- " ${ICU_LIBRARIES}) |
49 | |
50 | -IF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
51 | - MESSAGE(STATUS "Found ICU library -- " ${ICU_LIBRARIES}) |
52 | - |
53 | - INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS}) |
54 | - SET(requiredlibs ${requiredlibs} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES} ${ICU_DATA_LIBRARIES}) |
55 | -ELSE(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
56 | - MESSAGE(FATAL_ERROR "The ICU library is required in order to build Zorba.") |
57 | -ENDIF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
58 | -MESSAGE(STATUS "") |
59 | + INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS}) |
60 | + SET(requiredlibs ${requiredlibs} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES} ${ICU_DATA_LIBRARIES}) |
61 | + ELSE(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
62 | + MESSAGE(FATAL_ERROR "The ICU library is required in order to build Zorba.") |
63 | + ENDIF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND) |
64 | + MESSAGE(STATUS "") |
65 | +ENDIF(NOT ZORBA_NO_ICU) |
66 | |
67 | # |
68 | # Xerces-C part 1 - finding in default locations |
69 | |
70 | === modified file 'bin/zorbacmd.cpp' |
71 | --- bin/zorbacmd.cpp 2012-11-06 10:11:37 +0000 |
72 | +++ bin/zorbacmd.cpp 2012-12-24 23:26:24 +0000 |
73 | @@ -622,6 +622,7 @@ |
74 | void |
75 | removeOutputFileIfNeeded(const ZorbaCMDProperties& lProperties) |
76 | { |
77 | +#ifdef ZORBA_WITH_FILE_ACCESS |
78 | if (lProperties.outputFile().size() > 0) |
79 | { |
80 | File_t lFile = zorba::File::createFile(lProperties.outputFile()); |
81 | @@ -630,6 +631,7 @@ |
82 | lFile->remove(); |
83 | } |
84 | } |
85 | +#endif |
86 | } |
87 | |
88 | |
89 | |
90 | === modified file 'include/zorba/config.h.cmake' |
91 | --- include/zorba/config.h.cmake 2012-09-19 21:16:15 +0000 |
92 | +++ include/zorba/config.h.cmake 2012-12-24 23:26:24 +0000 |
93 | @@ -126,7 +126,7 @@ |
94 | |
95 | ////////// C++ tr1 include directory & namespace ////////////////////////////// |
96 | |
97 | -#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 430) |
98 | +#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 430) && !defined(EMSCRIPTEN) |
99 | # define ZORBA_GCC_OLDER_THAN_430 1 |
100 | #endif |
101 | |
102 | |
103 | === modified file 'src/api/CMakeLists.txt' |
104 | --- src/api/CMakeLists.txt 2012-12-05 03:33:46 +0000 |
105 | +++ src/api/CMakeLists.txt 2012-12-24 23:26:24 +0000 |
106 | @@ -46,7 +46,6 @@ |
107 | invoke_item_sequence.cpp |
108 | item_sequence_chainer.cpp |
109 | empty_sequence.cpp |
110 | - fileimpl.cpp |
111 | serializerimpl.cpp |
112 | base64impl.cpp |
113 | base64_streambuf.cpp |
114 | @@ -63,6 +62,10 @@ |
115 | uuid.cpp |
116 | ) |
117 | |
118 | +IF (ZORBA_WITH_FILE_ACCESS) |
119 | + LIST(APPEND API_SRCS fileimpl.cpp) |
120 | +ENDIF (ZORBA_WITH_FILE_ACCESS) |
121 | + |
122 | IF (NOT ZORBA_NO_FULL_TEXT) |
123 | LIST(APPEND API_SRCS |
124 | stemmer.cpp |
125 | |
126 | === modified file 'src/api/dynamiccontextimpl.cpp' |
127 | --- src/api/dynamiccontextimpl.cpp 2012-11-28 12:32:38 +0000 |
128 | +++ src/api/dynamiccontextimpl.cpp 2012-12-24 23:26:24 +0000 |
129 | @@ -200,7 +200,7 @@ |
130 | |
131 | VarInfo* var = get_var_info(nameSpace, localName); |
132 | |
133 | - ulong varId = var->getId(); |
134 | + u_long varId = var->getId(); |
135 | |
136 | store::Item_t item; |
137 | store::TempSeq_t tempseq; |
138 | @@ -265,7 +265,7 @@ |
139 | throw; |
140 | } |
141 | |
142 | - ulong varId = var->getId(); |
143 | + u_long varId = var->getId(); |
144 | |
145 | theCtx->add_variable(varId, value); |
146 | |
147 | @@ -327,7 +327,7 @@ |
148 | throw; |
149 | } |
150 | |
151 | - ulong varId = var->getId(); |
152 | + u_long varId = var->getId(); |
153 | |
154 | // add it to the internal context |
155 | theCtx->add_variable(varId, value); |
156 | @@ -377,7 +377,7 @@ |
157 | throw; |
158 | } |
159 | |
160 | - ulong varId = var->getId(); |
161 | + u_long varId = var->getId(); |
162 | |
163 | theCtx->add_variable(varId, value); |
164 | |
165 | |
166 | === modified file 'src/api/serialization/serializer.cpp' |
167 | --- src/api/serialization/serializer.cpp 2012-10-15 19:25:46 +0000 |
168 | +++ src/api/serialization/serializer.cpp 2012-12-24 23:26:24 +0000 |
169 | @@ -79,14 +79,14 @@ |
170 | const char* str, |
171 | zstring::size_type strlen, |
172 | const char* separators, |
173 | - ulong seplen, |
174 | + u_long seplen, |
175 | std::vector<zstring>& tokens) |
176 | { |
177 | - ulong start = 0; |
178 | + u_long start = 0; |
179 | |
180 | - for (ulong i = 0; i < strlen; ++i) |
181 | + for (u_long i = 0; i < strlen; ++i) |
182 | { |
183 | - for (ulong j = 0; j < seplen; ++j) |
184 | + for (u_long j = 0; j < seplen; ++j) |
185 | { |
186 | if (str[i] == separators[j]) |
187 | { |
188 | @@ -129,7 +129,7 @@ |
189 | theIsFirstElementNode(true), |
190 | theEmitAttributes(aEmitAttributes) |
191 | { |
192 | - for (ulong i = 0; i < 8; i++) |
193 | + for (u_long i = 0; i < 8; i++) |
194 | theChildIters[i] = GENV_ITERATOR_FACTORY->createChildrenIterator(); |
195 | |
196 | theAttrIter = GENV_ITERATOR_FACTORY->createAttributesIterator(); |
197 | @@ -141,8 +141,8 @@ |
198 | ********************************************************************************/ |
199 | serializer::emitter::~emitter() |
200 | { |
201 | - ulong numIters = (ulong)theChildIters.size(); |
202 | - for (ulong i = 0; i < numIters; i++) |
203 | + u_long numIters = (u_long)theChildIters.size(); |
204 | + for (u_long i = 0; i < numIters; i++) |
205 | delete theChildIters[i]; |
206 | |
207 | delete theAttrIter; |
208 | @@ -616,7 +616,7 @@ |
209 | zstring name; |
210 | parent->getNodeName()->getStringValue2(name); |
211 | |
212 | - for (ulong i = 0; i < ser->cdata_section_elements_tokens.size(); ++i) |
213 | + for (u_long i = 0; i < ser->cdata_section_elements_tokens.size(); ++i) |
214 | { |
215 | if (ser->cdata_section_elements_tokens[i] == name) |
216 | { |
217 | |
218 | === modified file 'src/api/serialization/serializer.h' |
219 | --- src/api/serialization/serializer.h 2012-10-08 12:09:36 +0000 |
220 | +++ src/api/serialization/serializer.h 2012-12-24 23:26:24 +0000 |
221 | @@ -332,7 +332,7 @@ |
222 | } thePreviousItemKind; |
223 | |
224 | std::vector<store::ChildrenIterator*> theChildIters; |
225 | - ulong theFirstFreeChildIter; |
226 | + u_long theFirstFreeChildIter; |
227 | store::AttributesIterator * theAttrIter; |
228 | |
229 | bool theIsFirstElementNode; |
230 | |
231 | === modified file 'src/api/staticcontextimpl.cpp' |
232 | --- src/api/staticcontextimpl.cpp 2012-10-10 21:15:05 +0000 |
233 | +++ src/api/staticcontextimpl.cpp 2012-12-24 23:26:24 +0000 |
234 | @@ -39,6 +39,7 @@ |
235 | #include "api/staticcollectionmanagerimpl.h" |
236 | #include "api/vectoriterator.h" |
237 | |
238 | +#include "context/dynamic_context.h" |
239 | #include "context/static_context.h" |
240 | #include "context/static_context_consts.h" |
241 | #ifndef ZORBA_NO_FULL_TEXT |
242 | @@ -59,10 +60,10 @@ |
243 | #include "types/typeops.h" |
244 | |
245 | #include "diagnostics/xquery_diagnostics.h" |
246 | +#include "diagnostics/assert.h" |
247 | |
248 | #include "runtime/util/flowctl_exception.h" |
249 | |
250 | - |
251 | namespace zorba { |
252 | |
253 | /******************************************************************************* |
254 | |
255 | === modified file 'src/api/staticcontextimpl.h' |
256 | --- src/api/staticcontextimpl.h 2012-10-08 12:09:36 +0000 |
257 | +++ src/api/staticcontextimpl.h 2012-12-24 23:26:24 +0000 |
258 | @@ -64,7 +64,7 @@ |
259 | |
260 | CompilerCB * theCompilerCB; |
261 | |
262 | - ulong theMaxVarId; |
263 | + u_long theMaxVarId; |
264 | |
265 | DiagnosticHandler * theDiagnosticHandler; |
266 | bool theUserDiagnosticHandler; |
267 | @@ -84,9 +84,9 @@ |
268 | |
269 | void loadProlog(const String&, const Zorba_CompilerHints_t& hints); |
270 | |
271 | - ulong getMaxVarId() const { return theMaxVarId; } |
272 | + u_long getMaxVarId() const { return theMaxVarId; } |
273 | |
274 | - void setMaxVarId(ulong v) { if (v > theMaxVarId) theMaxVarId = v; } |
275 | + void setMaxVarId(u_long v) { if (v > theMaxVarId) theMaxVarId = v; } |
276 | |
277 | StaticContext_t createChildContext() const; |
278 | |
279 | |
280 | === modified file 'src/api/uuid.cpp' |
281 | --- src/api/uuid.cpp 2012-10-08 12:09:36 +0000 |
282 | +++ src/api/uuid.cpp 2012-12-24 23:26:24 +0000 |
283 | @@ -27,6 +27,8 @@ |
284 | # include <uuid/uuid.h> |
285 | #elif defined( _WIN32 ) |
286 | # include <Rpc.h> |
287 | +#elif defined( EMSCRIPTEN ) |
288 | +# include <boost/uuid/uuid.hpp> |
289 | #else |
290 | # error "Unsupported operating system for generating UUIDs" |
291 | #endif |
292 | @@ -47,6 +49,9 @@ |
293 | uuid_generate( result->data ); |
294 | #elif defined( _WIN32 ) |
295 | UuidCreateSequential( (UUID*)result->data ); |
296 | +#elif defined( EMSCRIPTEN ) |
297 | + boost::uuids::uuid u; |
298 | + ::memcpy(&u, result->data, sizeof result->data ); |
299 | #endif /* _WIN32 */ |
300 | } |
301 | |
302 | |
303 | === modified file 'src/api/xqueryimpl.cpp' |
304 | --- src/api/xqueryimpl.cpp 2012-10-08 12:09:36 +0000 |
305 | +++ src/api/xqueryimpl.cpp 2012-12-24 23:26:24 +0000 |
306 | @@ -433,7 +433,7 @@ |
307 | |
308 | // 0 is reserved as an invalid var id, and 1 is taken by the context item |
309 | // in the main module. |
310 | - ulong nextVarId = dynamic_context::MAX_IDVARS_RESERVED; |
311 | + u_long nextVarId = dynamic_context::MAX_IDVARS_RESERVED; |
312 | |
313 | doCompile(lQueryStream, aHints, true, nextVarId); |
314 | } |
315 | @@ -457,7 +457,7 @@ |
316 | |
317 | // 0 is reserved as an invalid var id, and 1 is taken by the context item |
318 | // in the main module. |
319 | - ulong nextVarId = dynamic_context::MAX_IDVARS_RESERVED; |
320 | + u_long nextVarId = dynamic_context::MAX_IDVARS_RESERVED; |
321 | |
322 | doCompile(aQuery, aHints, true, nextVarId); |
323 | } |
324 | @@ -492,7 +492,7 @@ |
325 | if (externalSctx->theCompilerCB) |
326 | theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap; |
327 | |
328 | - ulong nextVarId = externalSctx->getMaxVarId(); |
329 | + u_long nextVarId = externalSctx->getMaxVarId(); |
330 | |
331 | std::istringstream lQueryStream(aQuery.c_str()); |
332 | |
333 | @@ -535,7 +535,7 @@ |
334 | if (externalSctx->theCompilerCB) |
335 | theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap; |
336 | |
337 | - ulong nextVarId = externalSctx->getMaxVarId(); |
338 | + u_long nextVarId = externalSctx->getMaxVarId(); |
339 | |
340 | doCompile(aQuery, aHints, true, nextVarId); |
341 | } |
342 | @@ -550,7 +550,7 @@ |
343 | std::istream& aQuery, |
344 | const Zorba_CompilerHints_t& aHints, |
345 | bool fork_sctx, |
346 | - ulong& nextDynamicVarId) |
347 | + u_long& nextDynamicVarId) |
348 | { |
349 | if ( ! theStaticContext ) |
350 | { |
351 | @@ -641,7 +641,7 @@ |
352 | |
353 | StaticContextImpl* sctx = static_cast<StaticContextImpl*>(aStaticContext.get()); |
354 | |
355 | - ulong nextVarId = sctx->getMaxVarId(); |
356 | + u_long nextVarId = sctx->getMaxVarId(); |
357 | |
358 | doCompile(lQueryStream, aHints, false, nextVarId); |
359 | |
360 | @@ -859,7 +859,7 @@ |
361 | if (var->hasInitializer()) |
362 | return true; |
363 | |
364 | - ulong varId = var->getId(); |
365 | + u_long varId = var->getId(); |
366 | |
367 | if (theDynamicContext->is_set_variable(varId)) |
368 | return true; |
369 | |
370 | === modified file 'src/api/xqueryimpl.h' |
371 | --- src/api/xqueryimpl.h 2012-09-19 21:16:15 +0000 |
372 | +++ src/api/xqueryimpl.h 2012-12-24 23:26:24 +0000 |
373 | @@ -357,7 +357,7 @@ |
374 | std::istream&, |
375 | const Zorba_CompilerHints_t& aHints, |
376 | bool fork_sctx, |
377 | - ulong& nextVarId); |
378 | + u_long& nextVarId); |
379 | |
380 | PlanWrapper_t generateWrapper(); |
381 | |
382 | |
383 | === modified file 'src/api/zorbaimpl.h' |
384 | --- src/api/zorbaimpl.h 2012-09-19 21:16:15 +0000 |
385 | +++ src/api/zorbaimpl.h 2012-12-24 23:26:24 +0000 |
386 | @@ -57,7 +57,7 @@ |
387 | friend class Zorba; |
388 | |
389 | SYNC_CODE(Mutex theUsersMutex); |
390 | - ulong theNumUsers; |
391 | + u_long theNumUsers; |
392 | public: |
393 | #ifdef WIN32 |
394 | static bool ctrl_c_signaled; |
395 | |
396 | === modified file 'src/compiler/api/compiler_api.cpp' |
397 | --- src/compiler/api/compiler_api.cpp 2012-12-14 07:27:04 +0000 |
398 | +++ src/compiler/api/compiler_api.cpp 2012-12-24 23:26:24 +0000 |
399 | @@ -211,7 +211,7 @@ |
400 | PlanIter_t XQueryCompiler::compile( |
401 | std::istream& aXQuery, |
402 | const zstring& aFileName, |
403 | - ulong& nextDynamicVarId) |
404 | + u_long& nextDynamicVarId) |
405 | { |
406 | audit::Event* ae = theCompilerCB->theRootSctx->get_audit_event(); |
407 | zorba::audit::ScopedRecord sar(ae); |
408 | @@ -248,7 +248,7 @@ |
409 | PlanIter_t XQueryCompiler::compile( |
410 | const parsenode_t& ast, |
411 | bool applyPUL, |
412 | - ulong& nextDynamicVarId, |
413 | + u_long& nextDynamicVarId, |
414 | audit::ScopedRecord& aAuditRecord) |
415 | { |
416 | expr* rootExpr; |
417 | |
418 | === modified file 'src/compiler/api/compiler_api.h' |
419 | --- src/compiler/api/compiler_api.h 2012-10-08 12:09:36 +0000 |
420 | +++ src/compiler/api/compiler_api.h 2012-12-24 23:26:24 +0000 |
421 | @@ -51,12 +51,12 @@ |
422 | PlanIter_t compile( |
423 | std::istream& aXQuery, |
424 | const zstring& aFileName, |
425 | - ulong& nextDynamicVarId); |
426 | + u_long& nextDynamicVarId); |
427 | |
428 | PlanIter_t compile( |
429 | const parsenode_t& ast, |
430 | bool applyPUL, |
431 | - ulong& nextDynamicVarId, |
432 | + u_long& nextDynamicVarId, |
433 | audit::ScopedRecord& aAuditRecord); |
434 | |
435 | protected: |
436 | |
437 | === modified file 'src/compiler/codegen/plan_visitor.cpp' |
438 | --- src/compiler/codegen/plan_visitor.cpp 2012-12-18 15:09:02 +0000 |
439 | +++ src/compiler/codegen/plan_visitor.cpp 2012-12-24 23:26:24 +0000 |
440 | @@ -336,7 +336,7 @@ |
441 | std::stack<EnclosedExprContext> theEnclosedContextStack; |
442 | std::stack<bool> theCopyNodesStack; |
443 | |
444 | - ulong theNextDynamicVarId; |
445 | + u_long theNextDynamicVarId; |
446 | |
447 | hash64map<std::vector<LetVarIter_t> *> * arg_var_iter_map; |
448 | hash64map<std::vector<LetVarIter_t> *> catchvar_iter_map; |
449 | @@ -358,7 +358,7 @@ |
450 | |
451 | plan_visitor( |
452 | CompilerCB* ccb, |
453 | - ulong nextDynamicVarId, |
454 | + u_long nextDynamicVarId, |
455 | hash64map<std::vector<LetVarIter_t>*>* arg_var_map = NULL) |
456 | : |
457 | theDepth(0), |
458 | @@ -390,7 +390,7 @@ |
459 | } |
460 | |
461 | |
462 | -ulong getNextDynamicVarId() const |
463 | +u_long getNextDynamicVarId() const |
464 | { |
465 | return theNextDynamicVarId; |
466 | } |
467 | @@ -504,7 +504,7 @@ |
468 | { |
469 | CODEGEN_TRACE_OUT(""); |
470 | |
471 | - ulong numArgs = (ulong)v.get_args().size() + 1; |
472 | + u_long numArgs = (u_long)v.get_args().size() + 1; |
473 | |
474 | std::vector<PlanIter_t> argIters(numArgs); |
475 | |
476 | @@ -570,10 +570,10 @@ |
477 | { |
478 | CODEGEN_TRACE_OUT(""); |
479 | |
480 | - ulong numArgs = v.size(); |
481 | + u_long numArgs = v.size(); |
482 | checked_vector<PlanIter_t> args(numArgs); |
483 | |
484 | - for (ulong i = numArgs; i > 0; --i) |
485 | + for (u_long i = numArgs; i > 0; --i) |
486 | { |
487 | PlanIter_t arg = pop_itstack(); |
488 | args[i-1] = arg; |
489 | @@ -1374,7 +1374,7 @@ |
490 | wincond_var_iters( |
491 | const flwor_wincond* cond, |
492 | FlworClauseVarMap* clauseVarMap, |
493 | - ulong& varPos) |
494 | + u_long& varPos) |
495 | { |
496 | const flwor_wincond::vars& inVars = cond->get_in_vars(); |
497 | const flwor_wincond::vars& outVars = cond->get_out_vars(); |
498 | @@ -1461,7 +1461,7 @@ |
499 | if (c.get_kind() != flwor_clause::where_clause) |
500 | { |
501 | ZORBA_ASSERT(!theClauseStack.empty()); |
502 | - ulong stackSize = (ulong)theClauseStack.size(); |
503 | + u_long stackSize = (u_long)theClauseStack.size(); |
504 | |
505 | clauseVarMap = theClauseStack[stackSize-1]; |
506 | theClauseStack.resize(stackSize - 1); |
507 | @@ -1555,7 +1555,7 @@ |
508 | std::auto_ptr<flwor::StartClause> start_clause; |
509 | std::auto_ptr<flwor::EndClause> end_clause; |
510 | const flwor_wincond* cond; |
511 | - ulong varPos = 1; |
512 | + u_long varPos = 1; |
513 | |
514 | if (NULL == (cond = wc->get_win_stop())) |
515 | { |
516 | @@ -1616,16 +1616,16 @@ |
517 | // |
518 | else if (c.get_kind() == flwor_clause::order_clause) |
519 | { |
520 | - ulong numVars = (ulong)clauseVarMap->theVarRebinds.size(); |
521 | - ulong numForVars = 0; |
522 | - ulong numLetVars = 0; |
523 | + u_long numVars = (u_long)clauseVarMap->theVarRebinds.size(); |
524 | + u_long numForVars = 0; |
525 | + u_long numLetVars = 0; |
526 | |
527 | std::vector<ForVarIter_t> inputForVars(numVars); |
528 | std::vector<LetVarIter_t> inputLetVars(numVars); |
529 | std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars); |
530 | std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars); |
531 | |
532 | - for (ulong i = 0; i < numVars; ++i) |
533 | + for (u_long i = 0; i < numVars; ++i) |
534 | { |
535 | VarRebind* varRebind = clauseVarMap->theVarRebinds[i].getp(); |
536 | |
537 | @@ -1658,7 +1658,7 @@ |
538 | outputLetVarsRefs.resize(numLetVars); |
539 | |
540 | const orderby_clause* obc = static_cast<const orderby_clause *>(&c); |
541 | - ulong numColumns = obc->num_columns(); |
542 | + u_long numColumns = obc->num_columns(); |
543 | const std::vector<OrderModifier>& modifiers = obc->get_modifiers(); |
544 | |
545 | std::vector<flwor::OrderSpec> orderSpecs(numColumns); |
546 | @@ -1743,16 +1743,16 @@ |
547 | // |
548 | case flwor_clause::materialize_clause: |
549 | { |
550 | - ulong numVars = (ulong)clauseVarMap->theVarRebinds.size(); |
551 | - ulong numForVars = 0; |
552 | - ulong numLetVars = 0; |
553 | + u_long numVars = (u_long)clauseVarMap->theVarRebinds.size(); |
554 | + u_long numForVars = 0; |
555 | + u_long numLetVars = 0; |
556 | |
557 | std::vector<ForVarIter_t> inputForVars(numVars); |
558 | std::vector<LetVarIter_t> inputLetVars(numVars); |
559 | std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars); |
560 | std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars); |
561 | |
562 | - for (ulong i = 0; i < numVars; ++i) |
563 | + for (u_long i = 0; i < numVars; ++i) |
564 | { |
565 | VarRebind* varRebind = clauseVarMap->theVarRebinds[i]; |
566 | |
567 | @@ -2367,8 +2367,8 @@ |
568 | |
569 | if (v.is_sequential()) |
570 | { |
571 | - ulong numArgs = v.num_args(); |
572 | - for (ulong i = 0; i < numArgs; ++i) |
573 | + u_long numArgs = v.num_args(); |
574 | + for (u_long i = 0; i < numArgs; ++i) |
575 | { |
576 | if (v.get_arg(i)->is_sequential()) |
577 | { |
578 | @@ -3661,7 +3661,7 @@ |
579 | const char* descr, |
580 | expr* root, |
581 | CompilerCB* ccb, |
582 | - ulong& nextDynamicVarId, |
583 | + u_long& nextDynamicVarId, |
584 | hash64map<std::vector<LetVarIter_t> *>* arg_var_map) |
585 | { |
586 | plan_visitor c(ccb, nextDynamicVarId, arg_var_map); |
587 | |
588 | === modified file 'src/compiler/codegen/plan_visitor.h' |
589 | --- src/compiler/codegen/plan_visitor.h 2012-09-19 21:16:15 +0000 |
590 | +++ src/compiler/codegen/plan_visitor.h 2012-12-24 23:26:24 +0000 |
591 | @@ -32,7 +32,7 @@ |
592 | const char* descr, |
593 | expr* root, |
594 | CompilerCB* ccb, |
595 | - ulong& nextDynamicVarId, |
596 | + u_long& nextDynamicVarId, |
597 | hash64map<std::vector<LetVarIter_t> *>* param_var_map = NULL); |
598 | |
599 | } /* namespace zorba */ |
600 | |
601 | === modified file 'src/compiler/expression/expr_manager.cpp' |
602 | --- src/compiler/expression/expr_manager.cpp 2012-10-26 07:13:42 +0000 |
603 | +++ src/compiler/expression/expr_manager.cpp 2012-12-24 23:26:24 +0000 |
604 | @@ -538,7 +538,7 @@ |
605 | static_context* sctx, |
606 | user_function* udf, |
607 | const QueryLoc& loc, |
608 | - ulong varKind, |
609 | + u_long varKind, |
610 | store::Item* name) |
611 | { |
612 | CREATE_AND_RETURN_EXPR(var_expr, |
613 | @@ -813,7 +813,7 @@ |
614 | CREATE_AND_RETURN_EXPR(function_item_expr, sctx, udf, loc); |
615 | } |
616 | |
617 | - |
618 | +#ifndef ZORBA_NO_FULL_TEXT |
619 | ftcontains_expr* ExprManager::create_ftcontains_expr( |
620 | static_context* sctx, |
621 | user_function* udf, |
622 | @@ -824,7 +824,7 @@ |
623 | { |
624 | CREATE_AND_RETURN_EXPR(ftcontains_expr, sctx, udf, loc, range, ftselection, ftignore); |
625 | } |
626 | - |
627 | +#endif |
628 | |
629 | //////////////////////////////////////////////////////////////////////////////// |
630 | |
631 | |
632 | === modified file 'src/compiler/expression/expr_manager.h' |
633 | --- src/compiler/expression/expr_manager.h 2012-10-26 07:13:42 +0000 |
634 | +++ src/compiler/expression/expr_manager.h 2012-12-24 23:26:24 +0000 |
635 | @@ -333,7 +333,7 @@ |
636 | static_context* sctx, |
637 | user_function* udf, |
638 | const QueryLoc& loc, |
639 | - ulong varKind, |
640 | + u_long varKind, |
641 | store::Item* name); |
642 | |
643 | var_expr* create_var_expr(user_function* udf, const var_expr& source); |
644 | @@ -495,6 +495,7 @@ |
645 | user_function* udf, |
646 | const QueryLoc& loc); |
647 | |
648 | +#ifndef ZORBA_NO_FULL_TEXT |
649 | ftcontains_expr* create_ftcontains_expr( |
650 | static_context*, |
651 | user_function* udf, |
652 | @@ -502,6 +503,7 @@ |
653 | expr* range, |
654 | ftnode* ftselection, |
655 | expr* ftignore); |
656 | +#endif |
657 | |
658 | //////////////////////////////////////////////////////////////////////////////// |
659 | |
660 | |
661 | === modified file 'src/compiler/expression/flwor_expr.cpp' |
662 | --- src/compiler/expression/flwor_expr.cpp 2012-10-26 07:13:42 +0000 |
663 | +++ src/compiler/expression/flwor_expr.cpp 2012-12-24 23:26:24 +0000 |
664 | @@ -1108,9 +1108,9 @@ |
665 | ********************************************************************************/ |
666 | void flwor_expr::compute_scripting_kind() |
667 | { |
668 | - ulong numClauses = num_clauses(); |
669 | + u_long numClauses = num_clauses(); |
670 | |
671 | - for (ulong i = 0; i < numClauses; ++i) |
672 | + for (u_long i = 0; i < numClauses; ++i) |
673 | { |
674 | const flwor_clause* c = theClauses[i]; |
675 | flwor_clause::ClauseKind k = c->get_kind(); |
676 | |
677 | === modified file 'src/compiler/expression/var_expr.cpp' |
678 | --- src/compiler/expression/var_expr.cpp 2012-12-06 22:49:35 +0000 |
679 | +++ src/compiler/expression/var_expr.cpp 2012-12-24 23:26:24 +0000 |
680 | @@ -153,7 +153,7 @@ |
681 | /******************************************************************************* |
682 | |
683 | ********************************************************************************/ |
684 | -void var_expr::set_unique_id(ulong v) |
685 | +void var_expr::set_unique_id(u_long v) |
686 | { |
687 | assert(theUniqueId == 0); |
688 | |
689 | |
690 | === modified file 'src/compiler/expression/var_expr.h' |
691 | --- src/compiler/expression/var_expr.h 2012-12-06 22:49:35 +0000 |
692 | +++ src/compiler/expression/var_expr.h 2012-12-24 23:26:24 +0000 |
693 | @@ -151,7 +151,7 @@ |
694 | }; |
695 | |
696 | protected: |
697 | - ulong theUniqueId; |
698 | + u_long theUniqueId; |
699 | |
700 | var_kind theVarKind; |
701 | |
702 | @@ -198,9 +198,9 @@ |
703 | |
704 | VarInfo* get_var_info() const { return theVarInfo; } |
705 | |
706 | - ulong get_unique_id() const { return theUniqueId; } |
707 | + u_long get_unique_id() const { return theUniqueId; } |
708 | |
709 | - void set_unique_id(ulong v); |
710 | + void set_unique_id(u_long v); |
711 | |
712 | store::Item* get_name() const; |
713 | |
714 | |
715 | === modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp' |
716 | --- src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-09-19 21:16:15 +0000 |
717 | +++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-12-24 23:26:24 +0000 |
718 | @@ -323,7 +323,6 @@ |
719 | |
720 | void *begin_visit(const SchemaImport &n) |
721 | { |
722 | -#ifndef ZORBA_NO_XMLSCHEMA |
723 | INDENT; |
724 | |
725 | os << "<SchemaImport" << IDS; |
726 | @@ -332,9 +331,6 @@ |
727 | |
728 | INDENT_INC; NL; |
729 | return no_state; |
730 | -#else |
731 | - throw XQUERY_EXCEPTION(err::XQST0009); |
732 | -#endif |
733 | } |
734 | |
735 | void *begin_visit (const URILiteralList &n) |
736 | @@ -347,7 +343,7 @@ |
737 | |
738 | INDENT_INC; NL; |
739 | |
740 | - for (ulong i = 0; i < n.size(); i++) |
741 | + for (u_long i = 0; i < n.size(); i++) |
742 | { |
743 | INDENT; |
744 | os << "<URI>" << n [i] << "</URI>" << "\n"; |
745 | |
746 | === modified file 'src/compiler/parsetree/parsenode_print_xquery_visitor.cpp' |
747 | --- src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2012-10-08 12:09:36 +0000 |
748 | +++ src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2012-12-24 23:26:24 +0000 |
749 | @@ -966,7 +966,7 @@ |
750 | |
751 | void* begin_visit(const URILiteralList& n) |
752 | { |
753 | - for(ulong i = 0; i < n.size(); i++) |
754 | + for(u_long i = 0; i < n.size(); i++) |
755 | { |
756 | if(i!=0) |
757 | { |
758 | |
759 | === modified file 'src/compiler/parsetree/parsenodes.cpp' |
760 | --- src/compiler/parsetree/parsenodes.cpp 2012-10-09 14:06:08 +0000 |
761 | +++ src/compiler/parsetree/parsenodes.cpp 2012-12-24 23:26:24 +0000 |
762 | @@ -1192,7 +1192,7 @@ |
763 | { |
764 | BEGIN_VISITOR(); |
765 | |
766 | - for (ulong i = 0; i < size(); ++i) |
767 | + for (u_long i = 0; i < size(); ++i) |
768 | (*this)[i]->accept(v); |
769 | |
770 | END_VISITOR(); |
771 | |
772 | === modified file 'src/compiler/parsetree/parsenodes.h' |
773 | --- src/compiler/parsetree/parsenodes.h 2012-10-08 12:09:36 +0000 |
774 | +++ src/compiler/parsetree/parsenodes.h 2012-12-24 23:26:24 +0000 |
775 | @@ -740,7 +740,7 @@ |
776 | |
777 | const zstring& operator[](int i) const { return theUris[i]; } |
778 | |
779 | - ulong size() const { return (ulong)theUris.size(); } |
780 | + u_long size() const { return (u_long)theUris.size(); } |
781 | |
782 | void accept(parsenode_visitor&) const; |
783 | }; |
784 | @@ -1334,9 +1334,9 @@ |
785 | |
786 | void addKeySpec(IndexKeySpec* spec) { theKeySpecs.push_back(spec); } |
787 | |
788 | - ulong size() const { return (ulong)theKeySpecs.size(); } |
789 | + u_long size() const { return (u_long)theKeySpecs.size(); } |
790 | |
791 | - const IndexKeySpec* getKeySpec(ulong i) const { return theKeySpecs[i].getp(); } |
792 | + const IndexKeySpec* getKeySpec(u_long i) const { return theKeySpecs[i].getp(); } |
793 | |
794 | void accept(parsenode_visitor&) const; |
795 | }; |
796 | @@ -1613,9 +1613,9 @@ |
797 | { |
798 | } |
799 | |
800 | - const parsenode* operator[](ulong k) const { return theStatements[k].getp(); } |
801 | + const parsenode* operator[](u_long k) const { return theStatements[k].getp(); } |
802 | |
803 | - parsenode* operator[](ulong k) { return theStatements[k].getp(); } |
804 | + parsenode* operator[](u_long k) { return theStatements[k].getp(); } |
805 | |
806 | csize size() const { return theStatements.size(); } |
807 | |
808 | @@ -2661,7 +2661,7 @@ |
809 | |
810 | rchandle<QVarInDecl> operator[](int i) const { return qvar_decl_hv[i]; } |
811 | |
812 | - ulong size () const { return (ulong)qvar_decl_hv.size ();} |
813 | + u_long size () const { return (u_long)qvar_decl_hv.size ();} |
814 | |
815 | void accept(parsenode_visitor&) const; |
816 | }; |
817 | @@ -3913,7 +3913,7 @@ |
818 | |
819 | rchandle<exprnode> operator[](int i) { return pred_hv[i]; } |
820 | |
821 | - ulong size () const { return (ulong)pred_hv.size (); } |
822 | + u_long size () const { return (u_long)pred_hv.size (); } |
823 | |
824 | void accept(parsenode_visitor&) const; |
825 | }; |
826 | @@ -4202,7 +4202,7 @@ |
827 | |
828 | rchandle<exprnode> operator[](int i) const { return arg_hv[i]; } |
829 | |
830 | - ulong size() const { return (ulong)arg_hv.size (); } |
831 | + u_long size() const { return (u_long)arg_hv.size (); } |
832 | |
833 | void accept(parsenode_visitor&) const; |
834 | }; |
835 | @@ -4361,7 +4361,7 @@ |
836 | |
837 | const DirAttr *operator[] (int i) const { return theAttributes[i]; } |
838 | |
839 | - ulong size () const { return (ulong)theAttributes.size (); } |
840 | + u_long size () const { return (u_long)theAttributes.size (); } |
841 | |
842 | void accept(parsenode_visitor&) const; |
843 | }; |
844 | @@ -5762,7 +5762,7 @@ |
845 | |
846 | rchandle<SequenceType> operator[](int i) const { return theTypes[i]; } |
847 | |
848 | - ulong size() const { return (ulong)theTypes.size (); } |
849 | + u_long size() const { return (u_long)theTypes.size (); } |
850 | |
851 | void accept(parsenode_visitor&) const; |
852 | }; |
853 | |
854 | === modified file 'src/compiler/rewriter/framework/rewriter_context.h' |
855 | --- src/compiler/rewriter/framework/rewriter_context.h 2012-10-26 18:24:00 +0000 |
856 | +++ src/compiler/rewriter/framework/rewriter_context.h 2012-12-24 23:26:24 +0000 |
857 | @@ -32,7 +32,7 @@ |
858 | |
859 | class user_function; |
860 | |
861 | -typedef std::map<var_expr *, ulong> VarIdMap; |
862 | +typedef std::map<var_expr *, u_long> VarIdMap; |
863 | typedef std::vector<var_expr*> IdVarMap; |
864 | typedef std::map<const expr *, DynamicBitset> ExprVarsMap; |
865 | |
866 | |
867 | === modified file 'src/compiler/rewriter/rewriters/default_optimizer.cpp' |
868 | --- src/compiler/rewriter/rewriters/default_optimizer.cpp 2012-10-26 18:24:00 +0000 |
869 | +++ src/compiler/rewriter/rewriters/default_optimizer.cpp 2012-12-24 23:26:24 +0000 |
870 | @@ -193,7 +193,7 @@ |
871 | rCtx.theIdVarMap = new IdVarMap; |
872 | rCtx.theExprVarsMap = new ExprVarsMap; |
873 | |
874 | - ulong numVars = 0; |
875 | + u_long numVars = 0; |
876 | expr_tools::index_flwor_vars(rCtx.getRoot(), |
877 | numVars, |
878 | *rCtx.theVarIdMap, |
879 | |
880 | === modified file 'src/compiler/rewriter/rules/flwor_rules.cpp' |
881 | --- src/compiler/rewriter/rules/flwor_rules.cpp 2012-12-18 15:09:02 +0000 |
882 | +++ src/compiler/rewriter/rules/flwor_rules.cpp 2012-12-24 23:26:24 +0000 |
883 | @@ -259,7 +259,7 @@ |
884 | expr* domExpr = fc->get_expr(); |
885 | xqtref_t domType = domExpr->get_return_type(); |
886 | TypeConstants::quantifier_t domQuant = domType->get_quantifier(); |
887 | - ulong domCount = domType->max_card(); |
888 | + u_long domCount = domType->max_card(); |
889 | var_expr* pvar = fc->get_pos_var(); |
890 | var = fc->get_var(); |
891 | |
892 | @@ -1519,7 +1519,7 @@ |
893 | posExpr->get_loc())) |
894 | { |
895 | VarIdMap varidMap; |
896 | - ulong numFlworVars = 0; |
897 | + u_long numFlworVars = 0; |
898 | expr_tools::index_flwor_vars(flworExpr, numFlworVars, varidMap, NULL); |
899 | |
900 | DynamicBitset varset(numFlworVars); |
901 | @@ -1527,9 +1527,9 @@ |
902 | expr_tools::build_expr_to_vars_map(posExpr, varidMap, varset, exprVarMap); |
903 | |
904 | var_expr* forVar = forClause->get_var(); |
905 | - ulong forVarId = varidMap[forVar]; |
906 | + u_long forVarId = varidMap[forVar]; |
907 | |
908 | - std::vector<ulong> posExprVarIds; |
909 | + std::vector<u_long> posExprVarIds; |
910 | exprVarMap[posExpr].getSet(posExprVarIds); |
911 | |
912 | csize numPosExprVars = posExprVarIds.size(); |
913 | |
914 | === modified file 'src/compiler/rewriter/rules/fold_rules.cpp' |
915 | --- src/compiler/rewriter/rules/fold_rules.cpp 2012-11-12 17:12:41 +0000 |
916 | +++ src/compiler/rewriter/rules/fold_rules.cpp 2012-12-24 23:26:24 +0000 |
917 | @@ -455,7 +455,7 @@ |
918 | expr* node, |
919 | store::Item_t& result) |
920 | { |
921 | - ulong nextVarId = 1; |
922 | + u_long nextVarId = 1; |
923 | PlanIter_t plan = codegen("const-folded expr", node, compilercb, nextVarId); |
924 | |
925 | QueryLoc loc = LOC (node); |
926 | |
927 | === modified file 'src/compiler/rewriter/rules/hoist_rules.cpp' |
928 | --- src/compiler/rewriter/rules/hoist_rules.cpp 2012-12-06 22:49:35 +0000 |
929 | +++ src/compiler/rewriter/rules/hoist_rules.cpp 2012-12-24 23:26:24 +0000 |
930 | @@ -98,7 +98,7 @@ |
931 | { |
932 | assert(node == rCtx.getRoot()); |
933 | |
934 | - ulong numVars = 0; |
935 | + u_long numVars = 0; |
936 | VarIdMap varmap; |
937 | |
938 | expr_tools::index_flwor_vars(node, numVars, varmap, NULL); |
939 | |
940 | === modified file 'src/compiler/rewriter/rules/index_join_rule.cpp' |
941 | --- src/compiler/rewriter/rules/index_join_rule.cpp 2012-12-06 22:49:35 +0000 |
942 | +++ src/compiler/rewriter/rules/index_join_rule.cpp 2012-12-24 23:26:24 +0000 |
943 | @@ -43,13 +43,13 @@ |
944 | |
945 | static void rewriteJoin(RewriterContext&, PredicateInfo&, bool&); |
946 | |
947 | -static var_expr* findForVar(static_context*, RewriterContext&, const expr*, ulong&); |
948 | - |
949 | -static bool checkVarDependency(RewriterContext&, expr*, ulong); |
950 | - |
951 | -static bool expandVars(RewriterContext&, expr*, ulong, long&); |
952 | - |
953 | -static bool findFlworForVar(RewriterContext&, const var_expr*, flwor_expr*&, ulong&, ulong&); |
954 | +static var_expr* findForVar(static_context*, RewriterContext&, const expr*, u_long&); |
955 | + |
956 | +static bool checkVarDependency(RewriterContext&, expr*, u_long); |
957 | + |
958 | +static bool expandVars(RewriterContext&, expr*, u_long, long&); |
959 | + |
960 | +static bool findFlworForVar(RewriterContext&, const var_expr*, flwor_expr*&, u_long&, u_long&); |
961 | |
962 | |
963 | struct PredicateInfo |
964 | @@ -58,7 +58,7 @@ |
965 | expr * thePredicate; |
966 | expr * theOuterOp; |
967 | var_expr * theOuterVar; |
968 | - ulong theOuterVarId; |
969 | + u_long theOuterVarId; |
970 | expr * theInnerOp; |
971 | var_expr * theInnerVar; |
972 | bool theIsGeneral; |
973 | @@ -241,12 +241,12 @@ |
974 | |
975 | // Analyze each operand of the eq to see if it depends on a single for |
976 | // variable. If that is not true, we reject this predicate. |
977 | - ulong var1id; |
978 | + u_long var1id; |
979 | var_expr* var1 = findForVar(sctx, rCtx, op1, var1id); |
980 | if (var1 == NULL) |
981 | return false; |
982 | |
983 | - ulong var2id; |
984 | + u_long var2id; |
985 | var_expr* var2 = findForVar(sctx, rCtx, op2, var2id); |
986 | if (var2 == NULL) |
987 | return false; |
988 | @@ -255,7 +255,7 @@ |
989 | return false; |
990 | |
991 | // Determine the outer and inner side of the join |
992 | - ulong outerVarId; |
993 | + u_long outerVarId; |
994 | |
995 | if (var1id < var2id) |
996 | { |
997 | @@ -363,13 +363,13 @@ |
998 | static_context* sctx, |
999 | RewriterContext& rCtx, |
1000 | const expr* curExpr, |
1001 | - ulong& varid) |
1002 | + u_long& varid) |
1003 | { |
1004 | var_expr* var = NULL; |
1005 | |
1006 | while (true) |
1007 | { |
1008 | - std::vector<ulong> varidSet; |
1009 | + std::vector<u_long> varidSet; |
1010 | |
1011 | const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr]; |
1012 | |
1013 | @@ -421,14 +421,14 @@ |
1014 | static bool checkVarDependency( |
1015 | RewriterContext& rCtx, |
1016 | expr* curExpr, |
1017 | - ulong searchVarId) |
1018 | + u_long searchVarId) |
1019 | { |
1020 | const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr]; |
1021 | |
1022 | if (bitset.get(searchVarId)) |
1023 | return true; |
1024 | |
1025 | - std::vector<ulong> varidSet; |
1026 | + std::vector<u_long> varidSet; |
1027 | bitset.getSet(varidSet); |
1028 | |
1029 | csize numVars = varidSet.size(); |
1030 | @@ -515,8 +515,8 @@ |
1031 | flwor_clause* mostInnerVarClause = mostInnerVar->get_flwor_clause(); |
1032 | |
1033 | flwor_expr* innerFlwor = NULL; |
1034 | - ulong innerPosInStack = 0; |
1035 | - ulong mostInnerVarPos = 0; |
1036 | + u_long innerPosInStack = 0; |
1037 | + u_long mostInnerVarPos = 0; |
1038 | |
1039 | if (!findFlworForVar(rCtx, |
1040 | mostInnerVar, |
1041 | @@ -604,8 +604,8 @@ |
1042 | // find the flwor expr defining the outer var and create the index just |
1043 | // before this flwor. |
1044 | flwor_expr* outerFlworExpr = NULL; |
1045 | - ulong outerPosInStack = 0; |
1046 | - ulong dummy = 0; |
1047 | + u_long outerPosInStack = 0; |
1048 | + u_long dummy = 0; |
1049 | |
1050 | if (!findFlworForVar(rCtx, |
1051 | predInfo.theOuterVar, |
1052 | @@ -730,7 +730,7 @@ |
1053 | static bool expandVars( |
1054 | RewriterContext& rCtx, |
1055 | expr* subExpr, |
1056 | - ulong outerVarId, |
1057 | + u_long outerVarId, |
1058 | long& maxVarId) |
1059 | { |
1060 | if (subExpr->get_expr_kind() == wrapper_expr_kind) |
1061 | @@ -812,8 +812,8 @@ |
1062 | RewriterContext& rCtx, |
1063 | const var_expr* var, |
1064 | flwor_expr*& flworExpr, |
1065 | - ulong& varPos, |
1066 | - ulong& posInStack) |
1067 | + u_long& varPos, |
1068 | + u_long& posInStack) |
1069 | { |
1070 | flworExpr = NULL; |
1071 | |
1072 | |
1073 | === modified file 'src/compiler/rewriter/tools/dataflow_annotations.cpp' |
1074 | --- src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-12-20 22:22:31 +0000 |
1075 | +++ src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-12-24 23:26:24 +0000 |
1076 | @@ -366,7 +366,7 @@ |
1077 | flwor_expr::clause_list_t::const_iterator end = e->clause_end(); |
1078 | |
1079 | const forletwin_clause* fc = NULL; |
1080 | - ulong numForClauses = 0; |
1081 | + u_long numForClauses = 0; |
1082 | |
1083 | for (; ite != end; ++ite) |
1084 | { |
1085 | @@ -462,7 +462,7 @@ |
1086 | { |
1087 | const function* f = e->get_func(); |
1088 | |
1089 | - ulong nArgs = e->num_args(); |
1090 | + u_long nArgs = e->num_args(); |
1091 | |
1092 | FunctionConsts::AnnotationValue sorted = f->producesSortedNodes(); |
1093 | |
1094 | @@ -478,7 +478,7 @@ |
1095 | { |
1096 | BoolAnnotationValue sorted = ANNOTATION_FALSE; |
1097 | |
1098 | - for (ulong i = 0; i < nArgs; ++i) |
1099 | + for (u_long i = 0; i < nArgs; ++i) |
1100 | { |
1101 | if (f->propagatesSortedNodes(i)) |
1102 | { |
1103 | @@ -504,7 +504,7 @@ |
1104 | { |
1105 | BoolAnnotationValue distinct = ANNOTATION_FALSE; |
1106 | |
1107 | - for (ulong i = 0; i < nArgs; ++i) |
1108 | + for (u_long i = 0; i < nArgs; ++i) |
1109 | { |
1110 | if (f->propagatesDistinctNodes(i)) |
1111 | { |
1112 | @@ -588,8 +588,8 @@ |
1113 | { |
1114 | csize num_steps = e->size(); |
1115 | bool only_child_axes = true; |
1116 | - ulong num_desc_axes = 0; |
1117 | - ulong num_following_axes = 0; |
1118 | + u_long num_desc_axes = 0; |
1119 | + u_long num_following_axes = 0; |
1120 | bool reverse_axes = false; |
1121 | |
1122 | for (csize i = 1; i < num_steps; ++i) |
1123 | |
1124 | === modified file 'src/compiler/rewriter/tools/expr_tools.cpp' |
1125 | --- src/compiler/rewriter/tools/expr_tools.cpp 2012-10-29 11:41:36 +0000 |
1126 | +++ src/compiler/rewriter/tools/expr_tools.cpp 2012-12-24 23:26:24 +0000 |
1127 | @@ -36,9 +36,9 @@ |
1128 | namespace expr_tools |
1129 | { |
1130 | |
1131 | -static void add_wincond_vars(const flwor_wincond*, ulong&, VarIdMap&, IdVarMap*); |
1132 | +static void add_wincond_vars(const flwor_wincond*, u_long&, VarIdMap&, IdVarMap*); |
1133 | |
1134 | -static void add_var(var_expr*, ulong&, VarIdMap&, IdVarMap*); |
1135 | +static void add_var(var_expr*, u_long&, VarIdMap&, IdVarMap*); |
1136 | |
1137 | static void remove_wincond_vars(const flwor_wincond*, const VarIdMap&, DynamicBitset&); |
1138 | |
1139 | @@ -251,7 +251,7 @@ |
1140 | ********************************************************************************/ |
1141 | void index_flwor_vars( |
1142 | const expr* e, |
1143 | - ulong& numVars, |
1144 | + u_long& numVars, |
1145 | VarIdMap& varidmap, |
1146 | IdVarMap* idvarmap) |
1147 | { |
1148 | @@ -394,7 +394,7 @@ |
1149 | ********************************************************************************/ |
1150 | static void add_wincond_vars( |
1151 | const flwor_wincond* cond, |
1152 | - ulong& numVars, |
1153 | + u_long& numVars, |
1154 | VarIdMap& varidmap, |
1155 | IdVarMap* idvarmap) |
1156 | { |
1157 | @@ -420,7 +420,7 @@ |
1158 | ********************************************************************************/ |
1159 | static void add_var( |
1160 | var_expr* v, |
1161 | - ulong& numVars, |
1162 | + u_long& numVars, |
1163 | VarIdMap& varidmap, |
1164 | IdVarMap* idvarmap) |
1165 | { |
1166 | |
1167 | === modified file 'src/compiler/rewriter/tools/expr_tools.h' |
1168 | --- src/compiler/rewriter/tools/expr_tools.h 2012-10-29 11:41:36 +0000 |
1169 | +++ src/compiler/rewriter/tools/expr_tools.h 2012-12-24 23:26:24 +0000 |
1170 | @@ -63,7 +63,7 @@ |
1171 | Util functions used by rules: HoistExprsOutOfLoops and IndexJoin. |
1172 | ********************************************************************************/ |
1173 | |
1174 | -void index_flwor_vars(const expr*, ulong&, VarIdMap&, IdVarMap*); |
1175 | +void index_flwor_vars(const expr*, u_long&, VarIdMap&, IdVarMap*); |
1176 | |
1177 | void build_expr_to_vars_map(expr*, const VarIdMap&, DynamicBitset&, ExprVarsMap&); |
1178 | |
1179 | |
1180 | === modified file 'src/compiler/rewriter/tools/udf_graph.cpp' |
1181 | --- src/compiler/rewriter/tools/udf_graph.cpp 2012-10-31 08:02:16 +0000 |
1182 | +++ src/compiler/rewriter/tools/udf_graph.cpp 2012-12-24 23:26:24 +0000 |
1183 | @@ -192,7 +192,7 @@ |
1184 | } |
1185 | |
1186 | |
1187 | -void UDFGraph::optimizeUDFs(CompilerCB* ccb, UDFNode* node, ulong visit) |
1188 | +void UDFGraph::optimizeUDFs(CompilerCB* ccb, UDFNode* node, u_long visit) |
1189 | { |
1190 | if (node->theVisitId == visit) |
1191 | return; |
1192 | @@ -266,7 +266,7 @@ |
1193 | } |
1194 | |
1195 | |
1196 | -bool UDFGraph::inferDeterminism(UDFNode* node, ulong visit) |
1197 | +bool UDFGraph::inferDeterminism(UDFNode* node, u_long visit) |
1198 | { |
1199 | if (node->theVisitId == visit) |
1200 | return node->theUDF->isDeterministic(); |
1201 | |
1202 | === modified file 'src/compiler/rewriter/tools/udf_graph.h' |
1203 | --- src/compiler/rewriter/tools/udf_graph.h 2012-10-19 20:42:38 +0000 |
1204 | +++ src/compiler/rewriter/tools/udf_graph.h 2012-12-24 23:26:24 +0000 |
1205 | @@ -39,7 +39,7 @@ |
1206 | user_function * theUDF; |
1207 | std::vector<UDFNode*> theParents; |
1208 | std::vector<UDFNode*> theChildren; |
1209 | - ulong theVisitId; |
1210 | + u_long theVisitId; |
1211 | |
1212 | public: |
1213 | UDFNode(user_function* udf) |
1214 | @@ -109,7 +109,7 @@ |
1215 | expr * theExpr; |
1216 | UDFMap theNodes; |
1217 | UDFNode * theRoot; |
1218 | - ulong theVisitId; |
1219 | + u_long theVisitId; |
1220 | |
1221 | public: |
1222 | UDFGraph(expr* e); |
1223 | @@ -129,9 +129,9 @@ |
1224 | |
1225 | void addEdge(user_function* caller, user_function* callee); |
1226 | |
1227 | - void optimizeUDFs(CompilerCB* ccb, UDFNode* node, ulong visit); |
1228 | + void optimizeUDFs(CompilerCB* ccb, UDFNode* node, u_long visit); |
1229 | |
1230 | - bool inferDeterminism(UDFNode* node, ulong visit); |
1231 | + bool inferDeterminism(UDFNode* node, u_long visit); |
1232 | |
1233 | void display(std::ostream& o, UDFNode* node); |
1234 | }; |
1235 | |
1236 | === modified file 'src/compiler/translator/prolog_graph.cpp' |
1237 | --- src/compiler/translator/prolog_graph.cpp 2012-09-19 21:16:15 +0000 |
1238 | +++ src/compiler/translator/prolog_graph.cpp 2012-12-24 23:26:24 +0000 |
1239 | @@ -294,7 +294,7 @@ |
1240 | std::vector<const var_expr*> topsorted_vars; // dependencies first |
1241 | std::set<const var_expr*> visited; |
1242 | |
1243 | - std::stack<std::pair<ulong, const var_expr*> > todo; // format: action code + var_expr |
1244 | + std::stack<std::pair<u_long, const var_expr*> > todo; // format: action code + var_expr |
1245 | // need to declare the reverse end iterator here because of a bug in older gcc's |
1246 | // (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11729) |
1247 | std::vector<const var_expr*>::const_reverse_iterator lEnd = theVarDecls.rend(); |
1248 | @@ -302,13 +302,13 @@ |
1249 | it != lEnd; |
1250 | ++it) |
1251 | { |
1252 | - todo.push(std::pair<ulong, const var_expr*>(1, (*it))); |
1253 | + todo.push(std::pair<u_long, const var_expr*>(1, (*it))); |
1254 | } |
1255 | |
1256 | while (! todo.empty()) |
1257 | { |
1258 | const var_expr* var = todo.top().second; |
1259 | - ulong action = todo.top().first; |
1260 | + u_long action = todo.top().first; |
1261 | todo.pop(); |
1262 | |
1263 | switch (action) |
1264 | @@ -323,7 +323,7 @@ |
1265 | if (visited.find(var) == visited.end()) |
1266 | { |
1267 | visited.insert(var); |
1268 | - todo.push(std::pair<ulong, const var_expr*>(0, var)); |
1269 | + todo.push(std::pair<u_long, const var_expr*>(0, var)); |
1270 | |
1271 | GraphImpl::const_iterator var_graph_entry = theGraph.find(var); |
1272 | |
1273 | @@ -337,7 +337,7 @@ |
1274 | { |
1275 | if (var_vset_ite->getKind() == PrologGraphVertex::VAR) |
1276 | { |
1277 | - todo.push(std::pair<ulong, const var_expr*>(1, var_vset_ite->getVarExpr())); |
1278 | + todo.push(std::pair<u_long, const var_expr*>(1, var_vset_ite->getVarExpr())); |
1279 | } |
1280 | } |
1281 | } |
1282 | |
1283 | === modified file 'src/compiler/translator/translator.cpp' |
1284 | --- src/compiler/translator/translator.cpp 2012-12-12 08:11:40 +0000 |
1285 | +++ src/compiler/translator/translator.cpp 2012-12-24 23:26:24 +0000 |
1286 | @@ -236,7 +236,7 @@ |
1287 | bool theSingleInput; |
1288 | bool theOnlyChildAxes; |
1289 | bool theHaveFilterSteps; |
1290 | - ulong theNumSteps; |
1291 | + u_long theNumSteps; |
1292 | |
1293 | NodeSortInfo() |
1294 | : |
1295 | @@ -588,7 +588,7 @@ |
1296 | |
1297 | rchandle<namespace_context> theNSCtx; |
1298 | |
1299 | - ulong thePrintDepth; |
1300 | + u_long thePrintDepth; |
1301 | int theScopeDepth; |
1302 | |
1303 | user_function * theUDF; |
1304 | @@ -1318,7 +1318,7 @@ |
1305 | ********************************************************************************/ |
1306 | void bind_fn( |
1307 | function_t& f, |
1308 | - ulong nargs, |
1309 | + u_long nargs, |
1310 | const QueryLoc& loc) |
1311 | { |
1312 | theSctx->bind_fn(f, nargs, loc); |
1313 | @@ -1336,7 +1336,7 @@ |
1314 | Lookup in the sctx the function object for a function with a given prefix |
1315 | local name and arity. Return NULL if such a function is not found |
1316 | ********************************************************************************/ |
1317 | -function* lookup_fn(const QName* qname, ulong arity, const QueryLoc& loc) |
1318 | +function* lookup_fn(const QName* qname, u_long arity, const QueryLoc& loc) |
1319 | { |
1320 | store::Item_t qnameItem; |
1321 | expand_function_qname(qnameItem, qname, loc); |
1322 | @@ -2191,7 +2191,7 @@ |
1323 | |
1324 | if (atlist != NULL) |
1325 | { |
1326 | - for (ulong i = 0; i < atlist->size(); ++i) |
1327 | + for (u_long i = 0; i < atlist->size(); ++i) |
1328 | { |
1329 | // If current uri is relative, turn it to an absolute one, using the |
1330 | // base uri from the sctx. |
1331 | @@ -3057,7 +3057,7 @@ |
1332 | } |
1333 | else |
1334 | { |
1335 | - for (ulong i = 0; i < atlist->size(); ++i) |
1336 | + for (u_long i = 0; i < atlist->size(); ++i) |
1337 | { |
1338 | compURIs.push_back(theSctx->resolve_relative_uri((*atlist)[i]).str()); |
1339 | } |
1340 | @@ -4649,7 +4649,7 @@ |
1341 | |
1342 | TypeManager* tm = CTX_TM; |
1343 | |
1344 | - ulong numColumns = v.size(); |
1345 | + u_long numColumns = v.size(); |
1346 | |
1347 | std::vector<expr*> keyExprs(numColumns); |
1348 | std::vector<xqtref_t> keyTypes(numColumns); |
1349 | @@ -5535,7 +5535,7 @@ |
1350 | if (theCCB->theConfig.optimize_cb != NULL) |
1351 | theCCB->theConfig.optimize_cb(body, msg.str()); |
1352 | |
1353 | - ulong nextVarId = 1; |
1354 | + u_long nextVarId = 1; |
1355 | PlanIter_t icIter = codegen("integrity constraint", body, theCCB, nextVarId); |
1356 | |
1357 | // Update static context |
1358 | @@ -8007,8 +8007,8 @@ |
1359 | |
1360 | if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N) |
1361 | { |
1362 | - ulong numArgs = foArg->num_args(); |
1363 | - for (ulong i = 0; i < numArgs; ++i) |
1364 | + u_long numArgs = foArg->num_args(); |
1365 | + for (u_long i = 0; i < numArgs; ++i) |
1366 | args.push_back(foArg->get_arg(i)); |
1367 | } |
1368 | else |
1369 | @@ -8027,8 +8027,8 @@ |
1370 | |
1371 | if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N) |
1372 | { |
1373 | - ulong numArgs = foArg->num_args(); |
1374 | - for (ulong i = 0; i < numArgs; ++i) |
1375 | + u_long numArgs = foArg->num_args(); |
1376 | + for (u_long i = 0; i < numArgs; ++i) |
1377 | args.push_back(foArg->get_arg(i)); |
1378 | } |
1379 | else |
1380 | @@ -11334,7 +11334,7 @@ |
1381 | std::vector<expr*> foArgs(arity); |
1382 | std::vector<var_expr*> udfArgs(arity); |
1383 | |
1384 | - for (ulong i = 0; i < arity; ++i) |
1385 | + for (u_long i = 0; i < arity; ++i) |
1386 | { |
1387 | var_expr* argVar = create_temp_var(loc, var_expr::arg_var); |
1388 | |
1389 | |
1390 | === modified file 'src/compiler/xqddf/value_index.cpp' |
1391 | --- src/compiler/xqddf/value_index.cpp 2012-10-24 11:32:56 +0000 |
1392 | +++ src/compiler/xqddf/value_index.cpp 2012-12-24 23:26:24 +0000 |
1393 | @@ -566,7 +566,7 @@ |
1394 | |
1395 | expr* buildExpr = getBuildExpr(ccb, loc); |
1396 | |
1397 | - ulong nextVarId = 1; |
1398 | + u_long nextVarId = 1; |
1399 | theBuildPlan = codegen("index", buildExpr, ccb, nextVarId); |
1400 | |
1401 | return theBuildPlan.getp(); |
1402 | @@ -625,7 +625,7 @@ |
1403 | create_var_expr(sctx, udf, dot->get_loc(), var_expr::prolog_var, docVarName); |
1404 | |
1405 | docVar->set_unique_id(1); |
1406 | - ulong nextVarId = 2; |
1407 | + u_long nextVarId = 2; |
1408 | |
1409 | expr* wrapperExpr = theCCB->theEM-> |
1410 | create_wrapper_expr(sctx, udf, dot->get_loc(), docVar); |
1411 | |
1412 | === modified file 'src/context/default_url_resolvers.cpp' |
1413 | --- src/context/default_url_resolvers.cpp 2012-11-06 10:11:37 +0000 |
1414 | +++ src/context/default_url_resolvers.cpp 2012-12-24 23:26:24 +0000 |
1415 | @@ -113,12 +113,14 @@ |
1416 | if (lScheme != uri::file) { |
1417 | return NULL; |
1418 | } |
1419 | - zstring lPath = fs::get_normalized_path(aUrl); |
1420 | +#ifdef ZORBA_WITH_FILE_ACCESS |
1421 | + zstring lPath = fs::get_normalized_path(aUrl); |
1422 | if (fs::get_type(lPath) == fs::file) { |
1423 | std::ifstream* lStream = new std::ifstream(lPath.c_str()); |
1424 | return new StreamResource( |
1425 | lStream, &fileStreamReleaser, "", true /* seekable */); |
1426 | } |
1427 | +#endif |
1428 | return NULL; |
1429 | } |
1430 | |
1431 | |
1432 | === modified file 'src/context/dynamic_context.cpp' |
1433 | --- src/context/dynamic_context.cpp 2012-12-11 00:22:26 +0000 |
1434 | +++ src/context/dynamic_context.cpp 2012-12-24 23:26:24 +0000 |
1435 | @@ -417,27 +417,27 @@ |
1436 | /******************************************************************************* |
1437 | |
1438 | ********************************************************************************/ |
1439 | -void dynamic_context::add_variable(ulong varid, store::Iterator_t& value) |
1440 | -{ |
1441 | - declare_variable(varid); |
1442 | - set_variable(varid, NULL, QueryLoc::null, value); |
1443 | -} |
1444 | - |
1445 | - |
1446 | -/******************************************************************************* |
1447 | - |
1448 | -********************************************************************************/ |
1449 | -void dynamic_context::add_variable(ulong varid, store::Item_t& value) |
1450 | -{ |
1451 | - declare_variable(varid); |
1452 | - set_variable(varid, NULL, QueryLoc::null, value); |
1453 | -} |
1454 | - |
1455 | - |
1456 | -/******************************************************************************* |
1457 | - |
1458 | -********************************************************************************/ |
1459 | -void dynamic_context::declare_variable(ulong varid) |
1460 | +void dynamic_context::add_variable(u_long varid, store::Iterator_t& value) |
1461 | +{ |
1462 | + declare_variable(varid); |
1463 | + set_variable(varid, NULL, QueryLoc::null, value); |
1464 | +} |
1465 | + |
1466 | + |
1467 | +/******************************************************************************* |
1468 | + |
1469 | +********************************************************************************/ |
1470 | +void dynamic_context::add_variable(u_long varid, store::Item_t& value) |
1471 | +{ |
1472 | + declare_variable(varid); |
1473 | + set_variable(varid, NULL, QueryLoc::null, value); |
1474 | +} |
1475 | + |
1476 | + |
1477 | +/******************************************************************************* |
1478 | + |
1479 | +********************************************************************************/ |
1480 | +void dynamic_context::declare_variable(u_long varid) |
1481 | { |
1482 | assert(varid > 0); |
1483 | |
1484 | @@ -453,7 +453,7 @@ |
1485 | |
1486 | ********************************************************************************/ |
1487 | void dynamic_context::set_variable( |
1488 | - ulong varid, |
1489 | + u_long varid, |
1490 | const store::Item_t& varname, |
1491 | const QueryLoc& loc, |
1492 | store::Iterator_t& valueIter) |
1493 | @@ -507,7 +507,7 @@ |
1494 | |
1495 | ********************************************************************************/ |
1496 | void dynamic_context::set_variable( |
1497 | - ulong varid, |
1498 | + u_long varid, |
1499 | const store::Item_t& varname, |
1500 | const QueryLoc& loc, |
1501 | store::Item_t& valueItem) |
1502 | @@ -551,7 +551,7 @@ |
1503 | |
1504 | ********************************************************************************/ |
1505 | void dynamic_context::unset_variable( |
1506 | - ulong varid, |
1507 | + u_long varid, |
1508 | const store::Item_t& varname, |
1509 | const QueryLoc& loc) |
1510 | { |
1511 | @@ -592,7 +592,7 @@ |
1512 | |
1513 | ********************************************************************************/ |
1514 | void dynamic_context::get_variable( |
1515 | - ulong varid, |
1516 | + u_long varid, |
1517 | const store::Item_t& varname, |
1518 | const QueryLoc& loc, |
1519 | store::Item_t& itemValue, |
1520 | @@ -628,7 +628,7 @@ |
1521 | /******************************************************************************* |
1522 | |
1523 | ********************************************************************************/ |
1524 | -bool dynamic_context::is_set_variable(ulong varid) const |
1525 | +bool dynamic_context::is_set_variable(u_long varid) const |
1526 | { |
1527 | if (varid >= theVarValues.size() || |
1528 | theVarValues[varid].theState == VarValue::undeclared || |
1529 | @@ -644,7 +644,7 @@ |
1530 | /******************************************************************************* |
1531 | |
1532 | ********************************************************************************/ |
1533 | -bool dynamic_context::exists_variable(ulong varid) const |
1534 | +bool dynamic_context::exists_variable(u_long varid) const |
1535 | { |
1536 | if (varid >= theVarValues.size() || |
1537 | theVarValues[varid].theState == VarValue::undeclared) |
1538 | @@ -659,7 +659,7 @@ |
1539 | /******************************************************************************* |
1540 | |
1541 | ********************************************************************************/ |
1542 | -ulong dynamic_context::get_next_var_id() const |
1543 | +u_long dynamic_context::get_next_var_id() const |
1544 | { |
1545 | // 0 is reserved as an invalide var id, and 1 is taken by the context item |
1546 | // in the main module. |
1547 | |
1548 | === modified file 'src/context/dynamic_context.h' |
1549 | --- src/context/dynamic_context.h 2012-10-22 17:08:12 +0000 |
1550 | +++ src/context/dynamic_context.h 2012-12-24 23:26:24 +0000 |
1551 | @@ -173,42 +173,42 @@ |
1552 | |
1553 | const std::vector<VarValue>& get_variables() const { return theVarValues; } |
1554 | |
1555 | - void add_variable(ulong varid, store::Item_t& value); |
1556 | - |
1557 | - void add_variable(ulong varid, store::Iterator_t& value); |
1558 | - |
1559 | - void declare_variable(ulong varid); |
1560 | + void add_variable(u_long varid, store::Item_t& value); |
1561 | + |
1562 | + void add_variable(u_long varid, store::Iterator_t& value); |
1563 | + |
1564 | + void declare_variable(u_long varid); |
1565 | |
1566 | void set_variable( |
1567 | - ulong varid, |
1568 | + u_long varid, |
1569 | const store::Item_t& varname, |
1570 | const QueryLoc& loc, |
1571 | store::Item_t& value); |
1572 | |
1573 | void set_variable( |
1574 | - ulong varid, |
1575 | + u_long varid, |
1576 | const store::Item_t& varname, |
1577 | const QueryLoc& loc, |
1578 | store::Iterator_t& value); |
1579 | |
1580 | void unset_variable( |
1581 | - ulong varid, |
1582 | + u_long varid, |
1583 | const store::Item_t& varname, |
1584 | const QueryLoc& loc); |
1585 | |
1586 | |
1587 | void get_variable( |
1588 | - ulong varid, |
1589 | + u_long varid, |
1590 | const store::Item_t& varname, |
1591 | const QueryLoc& loc, |
1592 | store::Item_t& itemValue, |
1593 | store::TempSeq_t& seqValue) const; |
1594 | |
1595 | - bool is_set_variable(ulong varid) const; |
1596 | - |
1597 | - bool exists_variable(ulong varid) const; |
1598 | - |
1599 | - ulong get_next_var_id() const; |
1600 | + bool is_set_variable(u_long varid) const; |
1601 | + |
1602 | + bool exists_variable(u_long varid) const; |
1603 | + |
1604 | + u_long get_next_var_id() const; |
1605 | |
1606 | store::Index* getIndex(store::Item* qname) const; |
1607 | |
1608 | |
1609 | === modified file 'src/context/namespace_context.cpp' |
1610 | --- src/context/namespace_context.cpp 2012-09-19 21:16:15 +0000 |
1611 | +++ src/context/namespace_context.cpp 2012-12-24 23:26:24 +0000 |
1612 | @@ -128,14 +128,14 @@ |
1613 | while (parentContext) |
1614 | { |
1615 | const store::NsBindings& parentBindings = parentContext->m_bindings; |
1616 | - ulong parentSize = (ulong)parentBindings.size(); |
1617 | - ulong currSize = (ulong)bindings.size(); |
1618 | + u_long parentSize = (u_long)parentBindings.size(); |
1619 | + u_long currSize = (u_long)bindings.size(); |
1620 | |
1621 | // for each parent binding, add it to the result, if it doesn't have the |
1622 | // same prefix as another binding that is already in the result. |
1623 | - for (ulong i = 0; i < parentSize; ++i) |
1624 | + for (u_long i = 0; i < parentSize; ++i) |
1625 | { |
1626 | - ulong j; |
1627 | + u_long j; |
1628 | for (j = 0; j < currSize; ++j) |
1629 | { |
1630 | if (bindings[j].first == parentBindings[i].first) |
1631 | |
1632 | === modified file 'src/context/static_context.cpp' |
1633 | --- src/context/static_context.cpp 2012-12-11 20:27:40 +0000 |
1634 | +++ src/context/static_context.cpp 2012-12-24 23:26:24 +0000 |
1635 | @@ -2157,7 +2157,7 @@ |
1636 | |
1637 | // Ignore duplicates |
1638 | const zstring& prefix = binding.first; |
1639 | - ulong numBindings = (ulong)bindings.size(); |
1640 | + u_long numBindings = (u_long)bindings.size(); |
1641 | bool found = 0; |
1642 | for (unsigned int i = 0; i < numBindings; ++i) |
1643 | { |
1644 | @@ -2382,7 +2382,7 @@ |
1645 | ********************************************************************************/ |
1646 | void static_context::bind_fn( |
1647 | function_t& f, |
1648 | - ulong arity, |
1649 | + u_long arity, |
1650 | const QueryLoc& loc) |
1651 | { |
1652 | store::Item* qname = f->getName(); |
1653 | @@ -2394,7 +2394,7 @@ |
1654 | |
1655 | if (theFunctionMap == NULL) |
1656 | { |
1657 | - ulong size = (is_global_root_sctx() ? 500 : 32); |
1658 | + u_long size = (is_global_root_sctx() ? 500 : 32); |
1659 | theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL), size, false); |
1660 | } |
1661 | |
1662 | @@ -2456,7 +2456,7 @@ |
1663 | ********************************************************************************/ |
1664 | void static_context::unbind_fn( |
1665 | const store::Item* qname, |
1666 | - ulong arity) |
1667 | + u_long arity) |
1668 | { |
1669 | ZORBA_ASSERT(!is_global_root_sctx()); |
1670 | |
1671 | @@ -2525,7 +2525,7 @@ |
1672 | ********************************************************************************/ |
1673 | function* static_context::lookup_fn( |
1674 | const store::Item* qname, |
1675 | - ulong arity, |
1676 | + u_long arity, |
1677 | bool skipDisabled) |
1678 | { |
1679 | FunctionInfo fi; |
1680 | @@ -2580,7 +2580,7 @@ |
1681 | ********************************************************************************/ |
1682 | function* static_context::lookup_local_fn( |
1683 | const store::Item* qname, |
1684 | - ulong arity, |
1685 | + u_long arity, |
1686 | bool skipDisabled) |
1687 | { |
1688 | FunctionInfo fi; |
1689 | @@ -2708,8 +2708,8 @@ |
1690 | { |
1691 | std::vector<FunctionInfo>* fv = (*ite).second; |
1692 | |
1693 | - ulong numFunctions = (ulong)fv->size(); |
1694 | - for (ulong i = 0; i < numFunctions; ++i) |
1695 | + u_long numFunctions = (u_long)fv->size(); |
1696 | + for (u_long i = 0; i < numFunctions; ++i) |
1697 | { |
1698 | function* f = (*fv)[i].theFunction.getp(); |
1699 | |
1700 | @@ -2782,8 +2782,8 @@ |
1701 | |
1702 | if (theFunctionArityMap != NULL && theFunctionArityMap->get(qname2, fv)) |
1703 | { |
1704 | - ulong numFunctions = (ulong)fv->size(); |
1705 | - for (ulong i = 0; i < numFunctions; ++i) |
1706 | + u_long numFunctions = (u_long)fv->size(); |
1707 | + for (u_long i = 0; i < numFunctions; ++i) |
1708 | { |
1709 | if (!(*fv)[i].theIsDisabled) |
1710 | functions.push_back((*fv)[i].theFunction.getp()); |
1711 | @@ -4113,7 +4113,7 @@ |
1712 | if (theFunctionMap == NULL) |
1713 | { |
1714 | theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL), |
1715 | - (ulong)module->theFunctionMap->capacity(), |
1716 | + (u_long)module->theFunctionMap->capacity(), |
1717 | false); |
1718 | } |
1719 | |
1720 | @@ -4133,7 +4133,7 @@ |
1721 | { |
1722 | theFunctionArityMap = |
1723 | new FunctionArityMap(HashMapItemPointerCmp(0, NULL), |
1724 | - (ulong)module->theFunctionArityMap->capacity(), |
1725 | + (u_long)module->theFunctionArityMap->capacity(), |
1726 | false); |
1727 | } |
1728 | |
1729 | |
1730 | === modified file 'src/context/static_context.h' |
1731 | --- src/context/static_context.h 2012-12-06 01:17:18 +0000 |
1732 | +++ src/context/static_context.h 2012-12-24 23:26:24 +0000 |
1733 | @@ -160,7 +160,7 @@ |
1734 | protected: |
1735 | store::Item_t theName; |
1736 | |
1737 | - ulong theId; |
1738 | + u_long theId; |
1739 | |
1740 | int theKind; |
1741 | |
1742 | @@ -186,9 +186,9 @@ |
1743 | |
1744 | const store::Item_t& getName() const { return theName; } |
1745 | |
1746 | - ulong getId() const { return theId; } |
1747 | + u_long getId() const { return theId; } |
1748 | |
1749 | - void setId(ulong id) { theId = id; } |
1750 | + void setId(u_long id) { theId = id; } |
1751 | |
1752 | int getKind() const { return theKind; } |
1753 | |
1754 | @@ -891,18 +891,18 @@ |
1755 | // |
1756 | // Functions |
1757 | // |
1758 | - void bind_fn(function_t& f, ulong arity, const QueryLoc& loc); |
1759 | + void bind_fn(function_t& f, u_long arity, const QueryLoc& loc); |
1760 | |
1761 | - void unbind_fn(const store::Item* qname, ulong arity); |
1762 | + void unbind_fn(const store::Item* qname, u_long arity); |
1763 | |
1764 | function* lookup_fn( |
1765 | const store::Item* qname, |
1766 | - ulong arity, |
1767 | + u_long arity, |
1768 | bool skipDisabled = true); |
1769 | |
1770 | function* lookup_local_fn( |
1771 | const store::Item* qname, |
1772 | - ulong arity, |
1773 | + u_long arity, |
1774 | bool skipDisabled = true); |
1775 | |
1776 | void get_functions(std::vector<function*>& functions) const; |
1777 | |
1778 | === modified file 'src/functions/function.cpp' |
1779 | --- src/functions/function.cpp 2012-09-19 21:16:15 +0000 |
1780 | +++ src/functions/function.cpp 2012-12-24 23:26:24 +0000 |
1781 | @@ -102,7 +102,7 @@ |
1782 | ********************************************************************************/ |
1783 | bool function::validate_args(std::vector<PlanIter_t>& argv) const |
1784 | { |
1785 | - ulong n = theSignature.paramCount(); |
1786 | + u_long n = theSignature.paramCount(); |
1787 | return n == VARIADIC_SIG_SIZE || argv.size() == n; |
1788 | } |
1789 | |
1790 | |
1791 | === modified file 'src/functions/function_impl.h' |
1792 | --- src/functions/function_impl.h 2012-09-19 21:16:15 +0000 |
1793 | +++ src/functions/function_impl.h 2012-12-24 23:26:24 +0000 |
1794 | @@ -46,7 +46,7 @@ |
1795 | { \ |
1796 | function_t type##_ptr(new type(signature sig, kind)); \ |
1797 | const store::Item* fname = type##_ptr->getName(); \ |
1798 | - ulong cnt = type##_ptr->getSignature().paramCount(); \ |
1799 | + u_long cnt = type##_ptr->getSignature().paramCount(); \ |
1800 | DEBUG_FN_DECL(fname, cnt); \ |
1801 | sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \ |
1802 | BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \ |
1803 | @@ -57,7 +57,7 @@ |
1804 | { \ |
1805 | function_t type##_ptr(new type(signature sig)); \ |
1806 | const store::Item* fname = type##_ptr->getName(); \ |
1807 | - ulong cnt = type##_ptr->getSignature().paramCount(); \ |
1808 | + u_long cnt = type##_ptr->getSignature().paramCount(); \ |
1809 | DEBUG_FN_DECL(fname, cnt); \ |
1810 | sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \ |
1811 | BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \ |
1812 | |
1813 | === modified file 'src/functions/udf.cpp' |
1814 | --- src/functions/udf.cpp 2012-10-20 21:29:37 +0000 |
1815 | +++ src/functions/udf.cpp 2012-12-24 23:26:24 +0000 |
1816 | @@ -539,7 +539,7 @@ |
1817 | argVarToRefsMap.put((uint64_t)&*theArgVars[i], &theArgVarsRefs[i]); |
1818 | } |
1819 | |
1820 | - ulong nextVarId = 1; |
1821 | + u_long nextVarId = 1; |
1822 | const store::Item* lName = getName(); |
1823 | //lName may be null of inlined functions |
1824 | thePlan = zorba::codegen((lName == 0 ? |
1825 | |
1826 | === modified file 'src/runtime/core/apply_updates.cpp' |
1827 | --- src/runtime/core/apply_updates.cpp 2012-12-01 00:06:15 +0000 |
1828 | +++ src/runtime/core/apply_updates.cpp 2012-12-24 23:26:24 +0000 |
1829 | @@ -95,7 +95,7 @@ |
1830 | CompilerCB* ccb = planState.theCompilerCB; |
1831 | |
1832 | store::Item_t item; |
1833 | - ulong numItems = 0; |
1834 | + u_long numItems = 0; |
1835 | store::PUL_t pul; |
1836 | |
1837 | ApplyIteratorState* state; |
1838 | @@ -209,7 +209,7 @@ |
1839 | { |
1840 | indexPul = GENV_ITEMFACTORY->createPendingUpdateList(); |
1841 | |
1842 | - for (ulong i = 0; i < numIndices; ++i) |
1843 | + for (u_long i = 0; i < numIndices; ++i) |
1844 | { |
1845 | IndexDecl* zorbaIndex = zorbaIndexes[i]; |
1846 | |
1847 | |
1848 | === modified file 'src/runtime/core/flwor_iterator.cpp' |
1849 | --- src/runtime/core/flwor_iterator.cpp 2012-10-08 12:09:36 +0000 |
1850 | +++ src/runtime/core/flwor_iterator.cpp 2012-12-24 23:26:24 +0000 |
1851 | @@ -946,7 +946,7 @@ |
1852 | ********************************************************************************/ |
1853 | bool FLWORIterator::nextImpl(store::Item_t& result, PlanState& planState) const |
1854 | { |
1855 | - ulong curVar = 0; |
1856 | + u_long curVar = 0; |
1857 | store::Item_t curItem; |
1858 | |
1859 | FlworState* state; |
1860 | @@ -1004,7 +1004,7 @@ |
1861 | } |
1862 | |
1863 | state->theCurTuplePos = 0; |
1864 | - state->theNumTuples = (ulong)state->theTuplesTable.size(); |
1865 | + state->theNumTuples = (u_long)state->theTuplesTable.size(); |
1866 | |
1867 | while (state->theCurTuplePos < state->theNumTuples) |
1868 | { |
1869 | @@ -1030,7 +1030,7 @@ |
1870 | else |
1871 | { |
1872 | state->theCurTuplePos = 0; |
1873 | - state->theNumTuples = (ulong)state->theTuplesTable.size(); |
1874 | + state->theNumTuples = (u_long)state->theTuplesTable.size(); |
1875 | |
1876 | while (state->theCurTuplePos < state->theNumTuples) |
1877 | { |
1878 | @@ -1080,7 +1080,7 @@ |
1879 | } |
1880 | |
1881 | state->theCurTuplePos = 0; |
1882 | - state->theNumTuples = (ulong)state->theSortTable.size(); |
1883 | + state->theNumTuples = (u_long)state->theSortTable.size(); |
1884 | |
1885 | while (state->theCurTuplePos < state->theNumTuples) |
1886 | { |
1887 | @@ -1192,7 +1192,7 @@ |
1888 | false otherwise. |
1889 | ********************************************************************************/ |
1890 | bool FLWORIterator::bindVariable( |
1891 | - ulong varNo, |
1892 | + u_long varNo, |
1893 | FlworState* iterState, |
1894 | PlanState& planState) const |
1895 | { |
1896 | @@ -1518,7 +1518,7 @@ |
1897 | that appear after the groupby clause. |
1898 | ********************************************************************************/ |
1899 | void FLWORIterator::rebindStreamTuple( |
1900 | - ulong tuplePos, |
1901 | + u_long tuplePos, |
1902 | FlworState* iterState, |
1903 | PlanState& planState) const |
1904 | { |
1905 | |
1906 | === modified file 'src/runtime/core/flwor_iterator.h' |
1907 | --- src/runtime/core/flwor_iterator.h 2012-09-19 21:16:15 +0000 |
1908 | +++ src/runtime/core/flwor_iterator.h 2012-12-24 23:26:24 +0000 |
1909 | @@ -375,9 +375,9 @@ |
1910 | |
1911 | ResultTable theResultTable; |
1912 | |
1913 | - ulong theNumTuples; |
1914 | + u_long theNumTuples; |
1915 | |
1916 | - ulong theCurTuplePos; |
1917 | + u_long theCurTuplePos; |
1918 | |
1919 | store::Iterator_t theOrderResultIter; |
1920 | |
1921 | @@ -470,7 +470,7 @@ |
1922 | |
1923 | private: |
1924 | bool bindVariable( |
1925 | - ulong varNo, |
1926 | + u_long varNo, |
1927 | FlworState* flworState, |
1928 | PlanState& planState) const; |
1929 | |
1930 | @@ -491,7 +491,7 @@ |
1931 | PlanState& planState) const; |
1932 | |
1933 | void rebindStreamTuple( |
1934 | - ulong tuplePos, |
1935 | + u_long tuplePos, |
1936 | FlworState* iterState, |
1937 | PlanState& planState) const; |
1938 | |
1939 | |
1940 | === modified file 'src/runtime/core/fncall_iterator.cpp' |
1941 | --- src/runtime/core/fncall_iterator.cpp 2012-11-26 20:49:01 +0000 |
1942 | +++ src/runtime/core/fncall_iterator.cpp 2012-12-24 23:26:24 +0000 |
1943 | @@ -735,9 +735,9 @@ |
1944 | ExtFunctionCallIteratorState* state = |
1945 | StateTraitsImpl<ExtFunctionCallIteratorState>::getState(planState, |
1946 | theStateOffset); |
1947 | - ulong n = (ulong)theChildren.size(); |
1948 | + u_long n = (u_long)theChildren.size(); |
1949 | state->m_extArgs.resize(n); |
1950 | - for(ulong i = 0; i < n; ++i) |
1951 | + for(u_long i = 0; i < n; ++i) |
1952 | { |
1953 | state->m_extArgs[i] = new ExtFuncArgItemSequence(theChildren[i], planState); |
1954 | // the iterator does not have exlcusive ownership over the sequences |
1955 | |
1956 | === modified file 'src/runtime/core/gflwor/common.h' |
1957 | --- src/runtime/core/gflwor/common.h 2012-10-08 12:09:36 +0000 |
1958 | +++ src/runtime/core/gflwor/common.h 2012-12-24 23:26:24 +0000 |
1959 | @@ -281,7 +281,7 @@ |
1960 | size_t numIters = sourceVector.size(); |
1961 | destVector.resize(numIters); |
1962 | |
1963 | - for (ulong i = 0; i < numIters; ++i) |
1964 | + for (u_long i = 0; i < numIters; ++i) |
1965 | destVector[i] = reinterpret_cast<T*>(sourceVector[i].getp()); |
1966 | } |
1967 | |
1968 | |
1969 | === modified file 'src/runtime/core/gflwor/groupby_iterator.cpp' |
1970 | --- src/runtime/core/gflwor/groupby_iterator.cpp 2012-10-08 12:09:36 +0000 |
1971 | +++ src/runtime/core/gflwor/groupby_iterator.cpp 2012-12-24 23:26:24 +0000 |
1972 | @@ -173,16 +173,16 @@ |
1973 | int32_t size = this->getStateSize(); |
1974 | size += theTupleIter->getStateSizeOfSubtree(); |
1975 | |
1976 | - ulong numSpecs = (ulong)theGroupingSpecs.size(); |
1977 | + u_long numSpecs = (u_long)theGroupingSpecs.size(); |
1978 | |
1979 | - for (ulong i = 0; i < numSpecs; ++i) |
1980 | + for (u_long i = 0; i < numSpecs; ++i) |
1981 | { |
1982 | size += theGroupingSpecs[i].getStateSizeOfSubtree(); |
1983 | } |
1984 | |
1985 | - numSpecs = (ulong)theNonGroupingSpecs.size(); |
1986 | + numSpecs = (u_long)theNonGroupingSpecs.size(); |
1987 | |
1988 | - for (ulong i = 0; i < numSpecs; ++i) |
1989 | + for (u_long i = 0; i < numSpecs; ++i) |
1990 | { |
1991 | size += theNonGroupingSpecs[i].getStateSizeOfSubtree(); |
1992 | } |
1993 | |
1994 | === modified file 'src/runtime/core/gflwor/orderby_iterator.cpp' |
1995 | --- src/runtime/core/gflwor/orderby_iterator.cpp 2012-09-19 21:16:15 +0000 |
1996 | +++ src/runtime/core/gflwor/orderby_iterator.cpp 2012-12-24 23:26:24 +0000 |
1997 | @@ -160,9 +160,9 @@ |
1998 | |
1999 | void OrderByState::clearSortTable() |
2000 | { |
2001 | - ulong numTuples = (ulong)theSortTable.size(); |
2002 | + u_long numTuples = (u_long)theSortTable.size(); |
2003 | |
2004 | - for (ulong i = 0; i < numTuples; ++i) |
2005 | + for (u_long i = 0; i < numTuples; ++i) |
2006 | { |
2007 | theSortTable[i].clear(); |
2008 | } |
2009 | @@ -241,15 +241,15 @@ |
2010 | { |
2011 | v.beginVisit(*this); |
2012 | |
2013 | - ulong numVars = (ulong)theInputForVars.size(); |
2014 | - for (ulong i = 0; i < numVars; ++i) |
2015 | + u_long numVars = (u_long)theInputForVars.size(); |
2016 | + for (u_long i = 0; i < numVars; ++i) |
2017 | { |
2018 | v.beginVisitOrderByForVariable(theInputForVars[i], theOutputForVarsRefs[i]); |
2019 | v.endVisitOrderByForVariable(); |
2020 | } |
2021 | |
2022 | - numVars = (ulong)theInputLetVars.size(); |
2023 | - for (ulong i = 0; i < numVars; ++i) |
2024 | + numVars = (u_long)theInputLetVars.size(); |
2025 | + for (u_long i = 0; i < numVars; ++i) |
2026 | { |
2027 | v.beginVisitOrderByLetVariable(theInputLetVars[i], theOutputLetVarsRefs[i]); |
2028 | v.endVisitOrderByLetVariable(); |
2029 | @@ -271,8 +271,8 @@ |
2030 | theStateOffset); |
2031 | |
2032 | // Do a manual pass to set the Collator |
2033 | - ulong numSpecs = (ulong)theOrderSpecs.size(); |
2034 | - for (ulong i = 0; i < numSpecs; ++i) |
2035 | + u_long numSpecs = (u_long)theOrderSpecs.size(); |
2036 | + for (u_long i = 0; i < numSpecs; ++i) |
2037 | { |
2038 | theOrderSpecs[i].open(planState, aOffset); |
2039 | |
2040 | @@ -348,7 +348,7 @@ |
2041 | } |
2042 | |
2043 | iterState->theCurTuplePos = 0; |
2044 | - iterState->theNumTuples = (ulong)iterState->theSortTable.size(); |
2045 | + iterState->theNumTuples = (u_long)iterState->theSortTable.size(); |
2046 | |
2047 | while(iterState->theCurTuplePos < iterState->theNumTuples) |
2048 | { |
2049 | @@ -450,14 +450,14 @@ |
2050 | StreamTuple& streamTuple = |
2051 | iterState->theDataTable[iterState->theSortTable[iterState->theCurTuplePos].theDataPos]; |
2052 | |
2053 | - ulong numForVarsRefs = (ulong)theOutputForVarsRefs.size(); |
2054 | - for (ulong i = 0; i < numForVarsRefs; ++i) |
2055 | + u_long numForVarsRefs = (u_long)theOutputForVarsRefs.size(); |
2056 | + for (u_long i = 0; i < numForVarsRefs; ++i) |
2057 | { |
2058 | bindVariables(streamTuple.theItems[i], theOutputForVarsRefs[i], planState); |
2059 | } |
2060 | |
2061 | - ulong numLetVarsRefs = (ulong)theOutputLetVarsRefs.size(); |
2062 | - for(ulong i = 0; i < numLetVarsRefs; ++i) |
2063 | + u_long numLetVarsRefs = (u_long)theOutputLetVarsRefs.size(); |
2064 | + for(u_long i = 0; i < numLetVarsRefs; ++i) |
2065 | { |
2066 | bindVariables(streamTuple.theSequences[i], theOutputLetVarsRefs[i], planState); |
2067 | } |
2068 | |
2069 | === modified file 'src/runtime/core/gflwor/orderby_iterator.h' |
2070 | --- src/runtime/core/gflwor/orderby_iterator.h 2012-09-19 21:16:15 +0000 |
2071 | +++ src/runtime/core/gflwor/orderby_iterator.h 2012-12-24 23:26:24 +0000 |
2072 | @@ -116,7 +116,7 @@ |
2073 | { |
2074 | public: |
2075 | std::vector<store::Item*> theKeyValues; |
2076 | - ulong theDataPos; |
2077 | + u_long theDataPos; |
2078 | |
2079 | public: |
2080 | SortTuple() { } |
2081 | @@ -125,8 +125,8 @@ |
2082 | |
2083 | void clear() |
2084 | { |
2085 | - ulong numColumns = (ulong)theKeyValues.size(); |
2086 | - for (ulong i = 0; i < numColumns; ++i) |
2087 | + u_long numColumns = (u_long)theKeyValues.size(); |
2088 | + for (u_long i = 0; i < numColumns; ++i) |
2089 | { |
2090 | if (theKeyValues[i] != NULL) |
2091 | { |
2092 | @@ -159,8 +159,8 @@ |
2093 | protected: |
2094 | SortTable theSortTable; |
2095 | DataTable theDataTable; |
2096 | - ulong theNumTuples; |
2097 | - ulong theCurTuplePos; |
2098 | + u_long theNumTuples; |
2099 | + u_long theCurTuplePos; |
2100 | |
2101 | public: |
2102 | OrderByState(); |
2103 | |
2104 | === modified file 'src/runtime/core/gflwor/window_iterator.cpp' |
2105 | --- src/runtime/core/gflwor/window_iterator.cpp 2012-09-19 21:16:15 +0000 |
2106 | +++ src/runtime/core/gflwor/window_iterator.cpp 2012-12-24 23:26:24 +0000 |
2107 | @@ -186,7 +186,7 @@ |
2108 | void WindowVars::bindIntern( |
2109 | PlanState& planState, |
2110 | const store::TempSeq_t& inputSeq, |
2111 | - const ulong pos) const |
2112 | + const u_long pos) const |
2113 | { |
2114 | store::Item_t item; |
2115 | |
2116 | @@ -234,7 +234,7 @@ |
2117 | void WindowVars::bindExtern( |
2118 | PlanState& planState, |
2119 | const store::TempSeq_t& inputSeq, |
2120 | - const ulong pos) const |
2121 | + const u_long pos) const |
2122 | { |
2123 | store::Item_t item; |
2124 | |
2125 | @@ -360,7 +360,7 @@ |
2126 | bool StartClause::evaluate( |
2127 | PlanState& planState, |
2128 | const store::TempSeq_t& inputSeq, |
2129 | - const ulong pos) const |
2130 | + const u_long pos) const |
2131 | { |
2132 | theWindowVars.bindIntern(planState, inputSeq, pos); |
2133 | |
2134 | @@ -376,7 +376,7 @@ |
2135 | void StartClause::bindExtern( |
2136 | PlanState& planState, |
2137 | const store::TempSeq_t& inputSeq, |
2138 | - const ulong pos) const |
2139 | + const u_long pos) const |
2140 | { |
2141 | theWindowVars.bindExtern(planState, inputSeq, pos); |
2142 | } |
2143 | @@ -388,7 +388,7 @@ |
2144 | void StartClause::bindIntern( |
2145 | PlanState& planState, |
2146 | const store::TempSeq_t& inputSeq, |
2147 | - const ulong pos) const |
2148 | + const u_long pos) const |
2149 | { |
2150 | theWindowVars.bindIntern(planState, inputSeq, pos); |
2151 | } |
2152 | @@ -512,7 +512,7 @@ |
2153 | bool EndClause::evaluate( |
2154 | PlanState& planState, |
2155 | const store::TempSeq_t& inputSeq, |
2156 | - const ulong pos) const |
2157 | + const u_long pos) const |
2158 | { |
2159 | theWindowVars.bindIntern(planState, inputSeq, pos); |
2160 | |
2161 | @@ -526,7 +526,7 @@ |
2162 | void EndClause::bindIntern( |
2163 | PlanState& planState, |
2164 | const store::TempSeq_t& inputSeq, |
2165 | - const ulong pos) const |
2166 | + const u_long pos) const |
2167 | { |
2168 | theWindowVars.bindIntern(planState, inputSeq, pos); |
2169 | } |
2170 | @@ -538,7 +538,7 @@ |
2171 | void EndClause::bindExtern( |
2172 | PlanState& planState, |
2173 | const store::TempSeq_t& inputSeq, |
2174 | - const ulong pos) const |
2175 | + const u_long pos) const |
2176 | { |
2177 | theWindowVars.bindExtern(planState, inputSeq, pos); |
2178 | } |
2179 | @@ -555,7 +555,7 @@ |
2180 | { |
2181 | } |
2182 | |
2183 | -WindowDef::WindowDef(ulong aStartPos) : theStartPos(aStartPos), theEndPos(0) |
2184 | +WindowDef::WindowDef(u_long aStartPos) : theStartPos(aStartPos), theEndPos(0) |
2185 | { |
2186 | } |
2187 | |
2188 | @@ -600,7 +600,7 @@ |
2189 | // // |
2190 | ///////////////////////////////////////////////////////////////////////////////// |
2191 | |
2192 | -const ulong WindowIterator::MAX_HISTORY = 2147483647; //TODO should be set platform dependent, but somebody hat comment out everything in platform.h! |
2193 | +const u_long WindowIterator::MAX_HISTORY = 2147483647; //TODO should be set platform dependent, but somebody hat comment out everything in platform.h! |
2194 | |
2195 | |
2196 | /***************************************************************************//** |
2197 | @@ -617,7 +617,7 @@ |
2198 | StartClause& startClause, |
2199 | EndClause& endClause, |
2200 | bool lazyEval, |
2201 | - ulong maxNeededHistory) |
2202 | + u_long maxNeededHistory) |
2203 | : |
2204 | Batcher<WindowIterator>(sctx, loc), |
2205 | theWindowType(windowType), |
2206 | @@ -759,8 +759,8 @@ |
2207 | void WindowIterator::bindVariable( |
2208 | PlanState& planState, |
2209 | store::TempSeq_t& inputSeq, |
2210 | - ulong aStartPos, |
2211 | - ulong aEndPos) const |
2212 | + u_long aStartPos, |
2213 | + u_long aEndPos) const |
2214 | { |
2215 | xs_integer const lStartPos( aStartPos ); |
2216 | xs_integer const lEndPos( aEndPos ); |
2217 | @@ -848,7 +848,7 @@ |
2218 | state->theDomainSeq, |
2219 | state->theCurWindow->theStartPos); |
2220 | |
2221 | - ulong lCurPos = state->theCurInputPos; |
2222 | + u_long lCurPos = state->theCurInputPos; |
2223 | if ( theEndClause.evaluate(planState, |
2224 | state->theDomainSeq, |
2225 | lCurPos)) |
2226 | |
2227 | === modified file 'src/runtime/core/gflwor/window_iterator.h' |
2228 | --- src/runtime/core/gflwor/window_iterator.h 2012-09-19 21:16:15 +0000 |
2229 | +++ src/runtime/core/gflwor/window_iterator.h 2012-12-24 23:26:24 +0000 |
2230 | @@ -98,12 +98,12 @@ |
2231 | void bindIntern( |
2232 | PlanState& planState, |
2233 | const store::TempSeq_t& inSeq, |
2234 | - ulong pos) const; |
2235 | + u_long pos) const; |
2236 | |
2237 | void bindExtern( |
2238 | PlanState& planState, |
2239 | const store::TempSeq_t& inSeq, |
2240 | - ulong pos) const; |
2241 | + u_long pos) const; |
2242 | }; |
2243 | |
2244 | |
2245 | @@ -150,17 +150,17 @@ |
2246 | bool evaluate( |
2247 | PlanState& planState, |
2248 | const store::TempSeq_t& inSeq, |
2249 | - ulong pos) const; |
2250 | + u_long pos) const; |
2251 | |
2252 | void bindIntern( |
2253 | PlanState& planState, |
2254 | const store::TempSeq_t& inSeq, |
2255 | - ulong pos) const; |
2256 | + u_long pos) const; |
2257 | |
2258 | void bindExtern( |
2259 | PlanState& planState, |
2260 | const store::TempSeq_t& inSeq, |
2261 | - ulong pos) const; |
2262 | + u_long pos) const; |
2263 | }; |
2264 | |
2265 | |
2266 | @@ -224,17 +224,17 @@ |
2267 | bool evaluate( |
2268 | PlanState& planState, |
2269 | const store::TempSeq_t& inSeq, |
2270 | - ulong pos) const; |
2271 | + u_long pos) const; |
2272 | |
2273 | void bindIntern( |
2274 | PlanState& planState, |
2275 | const store::TempSeq_t& inSeq, |
2276 | - ulong pos) const; |
2277 | + u_long pos) const; |
2278 | |
2279 | void bindExtern( |
2280 | PlanState& planState, |
2281 | const store::TempSeq_t& inSeq, |
2282 | - ulong pos) const; |
2283 | + u_long pos) const; |
2284 | }; |
2285 | |
2286 | |
2287 | @@ -255,11 +255,11 @@ |
2288 | class WindowDef |
2289 | { |
2290 | public: |
2291 | - ulong theStartPos; |
2292 | - ulong theEndPos; |
2293 | + u_long theStartPos; |
2294 | + u_long theEndPos; |
2295 | |
2296 | public: |
2297 | - WindowDef(ulong aStartPos); |
2298 | + WindowDef(u_long aStartPos); |
2299 | |
2300 | ~WindowDef(); |
2301 | }; |
2302 | @@ -281,7 +281,7 @@ |
2303 | |
2304 | protected: |
2305 | store::TempSeq_t theDomainSeq; |
2306 | - ulong theCurInputPos; |
2307 | + u_long theCurInputPos; |
2308 | std::vector<WindowDef> theOpenWindows; |
2309 | std::vector<WindowDef>::iterator theCurWindow; |
2310 | |
2311 | @@ -315,7 +315,7 @@ |
2312 | class WindowIterator : public Batcher<WindowIterator> |
2313 | { |
2314 | public: |
2315 | - static const ulong MAX_HISTORY; |
2316 | + static const u_long MAX_HISTORY; |
2317 | |
2318 | enum WindowType |
2319 | { |
2320 | @@ -336,7 +336,7 @@ |
2321 | EndClause theEndClause; |
2322 | |
2323 | bool theLazyEval; |
2324 | - ulong theMaxNeededHistory; |
2325 | + u_long theMaxNeededHistory; |
2326 | |
2327 | public: |
2328 | SERIALIZABLE_CLASS(WindowIterator); |
2329 | @@ -360,7 +360,7 @@ |
2330 | StartClause& startClause, |
2331 | EndClause& endClause, |
2332 | bool lazyEval, |
2333 | - ulong maxNeededHistory = MAX_HISTORY); |
2334 | + u_long maxNeededHistory = MAX_HISTORY); |
2335 | |
2336 | ~WindowIterator(); |
2337 | |
2338 | @@ -379,8 +379,8 @@ |
2339 | void bindVariable( |
2340 | PlanState& planState, |
2341 | store::TempSeq_t& aInputSeq, |
2342 | - ulong aStartPos, |
2343 | - ulong aEndPos) const; |
2344 | + u_long aStartPos, |
2345 | + u_long aEndPos) const; |
2346 | |
2347 | void doGarbageCollection(WindowState* lState) const; |
2348 | }; |
2349 | |
2350 | === modified file 'src/runtime/core/path.cpp' |
2351 | --- src/runtime/core/path.cpp 2012-09-19 21:16:15 +0000 |
2352 | +++ src/runtime/core/path.cpp 2012-12-24 23:26:24 +0000 |
2353 | @@ -269,8 +269,8 @@ |
2354 | ********************************************************************************/ |
2355 | DescendantStepState::~DescendantStepState() |
2356 | { |
2357 | - ulong len = theCurrentPath.size(); |
2358 | - for (ulong i = 0; i < len; i++) |
2359 | + u_long len = theCurrentPath.size(); |
2360 | + for (u_long i = 0; i < len; i++) |
2361 | { |
2362 | delete theCurrentPath[i].second; |
2363 | } |
2364 | @@ -303,8 +303,8 @@ |
2365 | ********************************************************************************/ |
2366 | PathIteratorState::~PathIteratorState() |
2367 | { |
2368 | - ulong numSteps = theStepStates.size(); |
2369 | - for (ulong i = 0; i < numSteps; i++) |
2370 | + u_long numSteps = theStepStates.size(); |
2371 | + for (u_long i = 0; i < numSteps; i++) |
2372 | delete theStepStates[i]; |
2373 | } |
2374 | |
2375 | @@ -321,7 +321,7 @@ |
2376 | |
2377 | theCurrentStep = 0; |
2378 | |
2379 | - for (ulong i = 0; i < theNumSteps; i++) |
2380 | + for (u_long i = 0; i < theNumSteps; i++) |
2381 | theStepStates[i]->reset(); |
2382 | } |
2383 | |
2384 | @@ -331,8 +331,8 @@ |
2385 | ********************************************************************************/ |
2386 | PathIterator::~PathIterator() |
2387 | { |
2388 | - ulong numSteps = theAxes.size(); |
2389 | - for (ulong i = 0; i < numSteps; i++) |
2390 | + u_long numSteps = theAxes.size(); |
2391 | + for (u_long i = 0; i < numSteps; i++) |
2392 | delete theNodePreds[i]; |
2393 | } |
2394 | |
2395 | @@ -351,11 +351,11 @@ |
2396 | PathIteratorState* state; |
2397 | state = StateTraitsImpl<PathIteratorState>::getState(planState, this->stateOffset); |
2398 | |
2399 | - ulong numSteps = theAxes.size(); |
2400 | + u_long numSteps = theAxes.size(); |
2401 | state->theNumSteps = numSteps; |
2402 | state->theStepStates.resize(numSteps); |
2403 | |
2404 | - for (ulong i = 0; i < numSteps; i++) |
2405 | + for (u_long i = 0; i < numSteps; i++) |
2406 | { |
2407 | switch (theAxes[i]) |
2408 | { |
2409 | @@ -402,7 +402,7 @@ |
2410 | |
2411 | bool PathIterator::nextImpl(store::Item_t& result, PlanState& planState) const |
2412 | { |
2413 | - ulong curStep; |
2414 | + u_long curStep; |
2415 | axis_kind_t curAxis; |
2416 | NodePredicate* curPred; |
2417 | store::Item* curResult; |
2418 | |
2419 | === modified file 'src/runtime/core/path.h' |
2420 | --- src/runtime/core/path.h 2012-09-19 21:16:15 +0000 |
2421 | +++ src/runtime/core/path.h 2012-12-24 23:26:24 +0000 |
2422 | @@ -194,7 +194,7 @@ |
2423 | class DescendantStepState : public PathStepState |
2424 | { |
2425 | public: |
2426 | - ulong theTop; |
2427 | + u_long theTop; |
2428 | std::vector<std::pair<store::Item*, store::ChildrenIterator*> > theCurrentPath; |
2429 | |
2430 | public: |
2431 | @@ -266,9 +266,9 @@ |
2432 | public: |
2433 | store::Item_t theContextNode; |
2434 | |
2435 | - ulong theCurrentStep; |
2436 | + u_long theCurrentStep; |
2437 | |
2438 | - ulong theNumSteps; |
2439 | + u_long theNumSteps; |
2440 | |
2441 | std::vector<PathStepState*> theStepStates; |
2442 | |
2443 | |
2444 | === modified file 'src/runtime/core/path_iterators.cpp' |
2445 | --- src/runtime/core/path_iterators.cpp 2012-10-12 21:07:51 +0000 |
2446 | +++ src/runtime/core/path_iterators.cpp 2012-12-24 23:26:24 +0000 |
2447 | @@ -1181,8 +1181,8 @@ |
2448 | ********************************************************************************/ |
2449 | DescendantAxisState::~DescendantAxisState() |
2450 | { |
2451 | - ulong len = (ulong)theCurrentPath.size(); |
2452 | - for (ulong i = 0; i < len; ++i) |
2453 | + u_long len = (u_long)theCurrentPath.size(); |
2454 | + for (u_long i = 0; i < len; ++i) |
2455 | { |
2456 | delete theCurrentPath[i].second; |
2457 | } |
2458 | @@ -1595,8 +1595,8 @@ |
2459 | if (theAncestor.second != NULL) |
2460 | delete theAncestor.second; |
2461 | |
2462 | - ulong len = (ulong)theCurrentPath.size(); |
2463 | - for (ulong i = 0; i < len; ++i) |
2464 | + u_long len = (u_long)theCurrentPath.size(); |
2465 | + for (u_long i = 0; i < len; ++i) |
2466 | { |
2467 | delete theCurrentPath[i].second; |
2468 | } |
2469 | @@ -1616,7 +1616,7 @@ |
2470 | { |
2471 | AxisState::reset(planState); |
2472 | |
2473 | - for (ulong i = 0; i < theTop; ++i) |
2474 | + for (u_long i = 0; i < theTop; ++i) |
2475 | { |
2476 | theCurrentPath[i].second->close(); |
2477 | } |
2478 | |
2479 | === modified file 'src/runtime/core/path_iterators.h' |
2480 | --- src/runtime/core/path_iterators.h 2012-09-19 21:16:15 +0000 |
2481 | +++ src/runtime/core/path_iterators.h 2012-12-24 23:26:24 +0000 |
2482 | @@ -603,7 +603,7 @@ |
2483 | typedef std::pair<const store::Item*, store::ChildrenIterator*> PathPair; |
2484 | |
2485 | public: |
2486 | - ulong theTop; |
2487 | + u_long theTop; |
2488 | std::vector<PathPair> theCurrentPath; |
2489 | |
2490 | public: |
2491 | @@ -622,7 +622,7 @@ |
2492 | |
2493 | void clear() |
2494 | { |
2495 | - for (ulong i = 0; i < theTop; ++i) |
2496 | + for (u_long i = 0; i < theTop; ++i) |
2497 | { |
2498 | theCurrentPath[i].second->close(); |
2499 | } |
2500 | @@ -788,7 +788,7 @@ |
2501 | PathPair theAncestor; |
2502 | const store::Item* theAncestorChild; |
2503 | |
2504 | - ulong theTop; |
2505 | + u_long theTop; |
2506 | std::vector<PathPair> theCurrentPath; |
2507 | |
2508 | PrecedingReverseAxisState(); |
2509 | |
2510 | === modified file 'src/runtime/core/trycatch.h' |
2511 | --- src/runtime/core/trycatch.h 2012-09-19 21:16:15 +0000 |
2512 | +++ src/runtime/core/trycatch.h 2012-12-24 23:26:24 +0000 |
2513 | @@ -65,7 +65,7 @@ |
2514 | }; |
2515 | |
2516 | public: |
2517 | - typedef std::map<ulong, std::vector<LetVarIter_t> > VarMap_t; |
2518 | + typedef std::map<u_long, std::vector<LetVarIter_t> > VarMap_t; |
2519 | |
2520 | public: |
2521 | std::vector<NodeNameTest_t> node_names; |
2522 | |
2523 | === modified file 'src/runtime/core/var_iterators.cpp' |
2524 | --- src/runtime/core/var_iterators.cpp 2012-10-08 12:09:36 +0000 |
2525 | +++ src/runtime/core/var_iterators.cpp 2012-12-24 23:26:24 +0000 |
2526 | @@ -63,7 +63,7 @@ |
2527 | static_context* sctx, |
2528 | const QueryLoc& loc, |
2529 | std::vector<PlanIter_t>& args, |
2530 | - ulong varid, |
2531 | + u_long varid, |
2532 | const store::Item_t& varName, |
2533 | bool isExtern, |
2534 | bool singleItem) |
2535 | @@ -267,7 +267,7 @@ |
2536 | CtxVarIterator::CtxVarIterator( |
2537 | static_context* sctx, |
2538 | const QueryLoc& loc, |
2539 | - ulong varid, |
2540 | + u_long varid, |
2541 | const store::Item_t& varName, |
2542 | bool isLocal) |
2543 | : |
2544 | |
2545 | === modified file 'src/runtime/core/var_iterators.h' |
2546 | --- src/runtime/core/var_iterators.h 2012-09-19 21:16:15 +0000 |
2547 | +++ src/runtime/core/var_iterators.h 2012-12-24 23:26:24 +0000 |
2548 | @@ -61,7 +61,7 @@ |
2549 | PlanIteratorState> |
2550 | { |
2551 | private: |
2552 | - ulong theVarId; |
2553 | + u_long theVarId; |
2554 | store::Item_t theVarName; |
2555 | bool theIsExternal; |
2556 | bool theSingleItem; |
2557 | @@ -80,12 +80,12 @@ |
2558 | static_context* sctx, |
2559 | const QueryLoc& loc, |
2560 | std::vector<PlanIter_t>& args, |
2561 | - ulong varid, |
2562 | + u_long varid, |
2563 | const store::Item_t& varName, |
2564 | bool isExtern, |
2565 | bool singleItem); |
2566 | |
2567 | - ulong getVarId() const { return theVarId; } |
2568 | + u_long getVarId() const { return theVarId; } |
2569 | |
2570 | const store::Item* getVarName() const { return theVarName.getp(); } |
2571 | |
2572 | @@ -109,7 +109,7 @@ |
2573 | PlanIteratorState> |
2574 | { |
2575 | private: |
2576 | - ulong theVarId; |
2577 | + u_long theVarId; |
2578 | store::Item_t theVarName; |
2579 | bool theIsLocal; |
2580 | bool theSingleItem; |
2581 | @@ -127,7 +127,7 @@ |
2582 | CtxVarAssignIterator( |
2583 | static_context* sctx, |
2584 | const QueryLoc& loc, |
2585 | - ulong varid, |
2586 | + u_long varid, |
2587 | const store::Item_t& varName, |
2588 | bool isLocal, |
2589 | PlanIter_t& arg) |
2590 | @@ -140,7 +140,7 @@ |
2591 | { |
2592 | } |
2593 | |
2594 | - ulong getVarId() const { return theVarId; } |
2595 | + u_long getVarId() const { return theVarId; } |
2596 | |
2597 | const store::Item* getVarName() const { return theVarName.getp(); } |
2598 | |
2599 | @@ -163,7 +163,7 @@ |
2600 | PlanIteratorState> |
2601 | { |
2602 | private: |
2603 | - ulong theVarId; |
2604 | + u_long theVarId; |
2605 | store::Item_t theVarName; |
2606 | |
2607 | public: |
2608 | @@ -179,7 +179,7 @@ |
2609 | CtxVarIsSetIterator( |
2610 | static_context* sctx, |
2611 | const QueryLoc& loc, |
2612 | - ulong varid, |
2613 | + u_long varid, |
2614 | const store::Item_t& varName) |
2615 | : |
2616 | NoaryBaseIterator<CtxVarIsSetIterator, PlanIteratorState>(sctx, loc), |
2617 | @@ -188,7 +188,7 @@ |
2618 | { |
2619 | } |
2620 | |
2621 | - ulong getVarId() const { return theVarId; } |
2622 | + u_long getVarId() const { return theVarId; } |
2623 | |
2624 | const store::Item* getVarName() const { return theVarName.getp(); } |
2625 | |
2626 | @@ -243,7 +243,7 @@ |
2627 | class CtxVarIterator : public NoaryBaseIterator<CtxVarIterator, CtxVarState> |
2628 | { |
2629 | protected: |
2630 | - ulong theVarId; |
2631 | + u_long theVarId; |
2632 | store::Item_t theVarName; |
2633 | bool theIsLocal; |
2634 | |
2635 | @@ -265,13 +265,13 @@ |
2636 | CtxVarIterator( |
2637 | static_context* sctx, |
2638 | const QueryLoc& loc, |
2639 | - ulong varid, |
2640 | + u_long varid, |
2641 | const store::Item_t& varName, |
2642 | bool local); |
2643 | |
2644 | virtual ~CtxVarIterator() {} |
2645 | |
2646 | - ulong getVarId() const { return theVarId; } |
2647 | + u_long getVarId() const { return theVarId; } |
2648 | |
2649 | const store::Item* getVarName() const { return theVarName.getp(); } |
2650 | |
2651 | |
2652 | === modified file 'src/runtime/eval/eval.cpp' |
2653 | --- src/runtime/eval/eval.cpp 2012-10-24 11:32:56 +0000 |
2654 | +++ src/runtime/eval/eval.cpp 2012-12-24 23:26:24 +0000 |
2655 | @@ -155,7 +155,7 @@ |
2656 | state->dctx.reset(evalDctx); |
2657 | |
2658 | // Import the outer environment. |
2659 | - ulong maxOuterVarId; |
2660 | + u_long maxOuterVarId; |
2661 | importOuterEnv(planState, evalCCB, importSctx, evalDctx, maxOuterVarId); |
2662 | |
2663 | // If we are here after a reset, we must set state->thePlanWrapper to NULL |
2664 | @@ -219,7 +219,7 @@ |
2665 | CompilerCB* evalCCB, |
2666 | static_context* importSctx, |
2667 | dynamic_context* evalDctx, |
2668 | - ulong& maxOuterVarId) const |
2669 | + u_long& maxOuterVarId) const |
2670 | { |
2671 | maxOuterVarId = 1; |
2672 | |
2673 | @@ -245,7 +245,7 @@ |
2674 | if (!outerVar.isSet()) |
2675 | continue; |
2676 | |
2677 | - ulong outerVarId = static_cast<ulong>(i); |
2678 | + u_long outerVarId = static_cast<u_long>(i); |
2679 | |
2680 | if (outerVarId > maxOuterVarId) |
2681 | maxOuterVarId = outerVarId; |
2682 | @@ -305,7 +305,7 @@ |
2683 | VarInfo* outerGlobalVar = outerSctx->lookup_var(theOuterVarNames[i]); |
2684 | ZORBA_ASSERT(outerGlobalVar); |
2685 | |
2686 | - ulong outerGlobalVarId = outerGlobalVar->getId(); |
2687 | + u_long outerGlobalVarId = outerGlobalVar->getId(); |
2688 | |
2689 | ve->set_unique_id(outerGlobalVarId); |
2690 | } |
2691 | @@ -351,7 +351,7 @@ |
2692 | if (!innerVar->isExternal()) |
2693 | continue; |
2694 | |
2695 | - ulong innerVarId = innerVar->getId(); |
2696 | + u_long innerVarId = innerVar->getId(); |
2697 | |
2698 | VarInfo* outerVar = importSctx->lookup_var(innerVar->getName()); |
2699 | |
2700 | @@ -389,7 +389,7 @@ |
2701 | PlanIter_t EvalIterator::compile( |
2702 | CompilerCB* ccb, |
2703 | const zstring& query, |
2704 | - ulong maxOuterVarId) const |
2705 | + u_long maxOuterVarId) const |
2706 | { |
2707 | std::stringstream os; |
2708 | |
2709 | |
2710 | === modified file 'src/runtime/eval/eval.h' |
2711 | --- src/runtime/eval/eval.h 2012-09-19 21:16:15 +0000 |
2712 | +++ src/runtime/eval/eval.h 2012-12-24 23:26:24 +0000 |
2713 | @@ -128,7 +128,7 @@ |
2714 | CompilerCB* evalCCB, |
2715 | static_context* importSctx, |
2716 | dynamic_context* evalDctx, |
2717 | - ulong& maxOuterVarId) const; |
2718 | + u_long& maxOuterVarId) const; |
2719 | |
2720 | void setExternalVariables( |
2721 | CompilerCB* ccb, |
2722 | @@ -139,7 +139,7 @@ |
2723 | PlanIter_t compile( |
2724 | CompilerCB* ccb, |
2725 | const zstring& query, |
2726 | - ulong maxOuterVarId) const; |
2727 | + u_long maxOuterVarId) const; |
2728 | }; |
2729 | |
2730 | |
2731 | |
2732 | === modified file 'src/runtime/indexing/doc_indexer.h' |
2733 | --- src/runtime/indexing/doc_indexer.h 2012-09-19 21:16:15 +0000 |
2734 | +++ src/runtime/indexing/doc_indexer.h 2012-12-24 23:26:24 +0000 |
2735 | @@ -38,7 +38,7 @@ |
2736 | PlanIter_t theIndexerPlan; |
2737 | |
2738 | store::Item_t theNodeVarName; |
2739 | - ulong theNodeVarId; |
2740 | + u_long theNodeVarId; |
2741 | |
2742 | dynamic_context * theDctx; |
2743 | store::Iterator_t thePlanWrapper; |
2744 | |
2745 | === modified file 'src/runtime/indexing/index_ddl.cpp' |
2746 | --- src/runtime/indexing/index_ddl.cpp 2012-09-19 21:16:15 +0000 |
2747 | +++ src/runtime/indexing/index_ddl.cpp 2012-12-24 23:26:24 +0000 |
2748 | @@ -74,7 +74,7 @@ |
2749 | const QueryLoc& loc, |
2750 | TypeManager* tm, |
2751 | const IndexDecl* indexDecl, |
2752 | - ulong keyNo, |
2753 | + u_long keyNo, |
2754 | store::Item_t& searchKey) |
2755 | { |
2756 | RootTypeManager& rtm = GENV_TYPESYSTEM; |
2757 | @@ -601,13 +601,13 @@ |
2758 | store::Item_t qnameItem; |
2759 | store::Item_t keyItem; |
2760 | store::IndexCondition_t cond; |
2761 | - ulong numChildren = (ulong)theChildren.size(); |
2762 | - ulong i; |
2763 | + u_long numChildren = (u_long)theChildren.size(); |
2764 | + u_long i; |
2765 | bool status; |
2766 | TypeManager* tm = theSctx->get_typemanager(); |
2767 | RootTypeManager& rtm = GENV_TYPESYSTEM; |
2768 | xs_integer lSkip = xs_integer::zero(); |
2769 | - ulong lAmountNonKeyParams = (theSkip ? 2 : 1); |
2770 | + u_long lAmountNonKeyParams = (theSkip ? 2 : 1); |
2771 | |
2772 | try |
2773 | { |
2774 | @@ -795,7 +795,7 @@ |
2775 | { |
2776 | store::Item_t qnameItem; |
2777 | store::Item_t keyItem; |
2778 | - ulong numChildren = (ulong)theChildren.size(); |
2779 | + u_long numChildren = (u_long)theChildren.size(); |
2780 | bool status; |
2781 | |
2782 | try |
2783 | @@ -996,12 +996,12 @@ |
2784 | store::Item_t qname; |
2785 | IndexDecl_t indexDecl; |
2786 | store::IndexCondition_t cond; |
2787 | - ulong numChildren = (ulong)theChildren.size(); |
2788 | + u_long numChildren = (u_long)theChildren.size(); |
2789 | bool status; |
2790 | TypeManager* tm = theSctx->get_typemanager(); |
2791 | RootTypeManager& rtm = GENV_TYPESYSTEM; |
2792 | xs_integer lSkip = xs_integer::zero(); |
2793 | - ulong lAmountNonKeyParams = (theSkip ? 2 : 1); |
2794 | + u_long lAmountNonKeyParams = (theSkip ? 2 : 1); |
2795 | |
2796 | try |
2797 | { |
2798 | @@ -1073,8 +1073,8 @@ |
2799 | lSkip = xs_integer::zero(); |
2800 | } |
2801 | |
2802 | - ulong keyNo; |
2803 | - ulong i; |
2804 | + u_long keyNo; |
2805 | + u_long i; |
2806 | for (i = lAmountNonKeyParams, keyNo = 0; i < numChildren; i += 6, ++keyNo) |
2807 | { |
2808 | store::Item_t tempLeft; |
2809 | @@ -1551,7 +1551,7 @@ |
2810 | TypeManager* tm = theSctx->get_typemanager(); |
2811 | RootTypeManager& rtm = GENV_TYPESYSTEM; |
2812 | |
2813 | - ulong childIdx = (haveLower ? 1 : 2); |
2814 | + u_long childIdx = (haveLower ? 1 : 2); |
2815 | |
2816 | assert(!(haveLower && haveUpper)); |
2817 | |
2818 | |
2819 | === modified file 'src/runtime/introspection/pregenerated/sctx.h' |
2820 | --- src/runtime/introspection/pregenerated/sctx.h 2012-10-08 12:09:36 +0000 |
2821 | +++ src/runtime/introspection/pregenerated/sctx.h 2012-12-24 23:26:24 +0000 |
2822 | @@ -44,7 +44,7 @@ |
2823 | { |
2824 | public: |
2825 | store::NsBindings theBindings; //vector of namespace bindings |
2826 | - ulong thePosition; //current position |
2827 | + u_long thePosition; //current position |
2828 | |
2829 | StaticNamespacesIteratorState(); |
2830 | |
2831 | @@ -328,7 +328,7 @@ |
2832 | { |
2833 | public: |
2834 | std::vector < zstring > theDocuments; //vector of document URIs |
2835 | - ulong thePosition; //current position |
2836 | + u_long thePosition; //current position |
2837 | |
2838 | StaticallyKnownDocumentsIteratorState(); |
2839 | |
2840 | @@ -406,7 +406,7 @@ |
2841 | { |
2842 | public: |
2843 | std::vector < std::string > theCollations; //vector of collation uris |
2844 | - ulong thePosition; //current position |
2845 | + u_long thePosition; //current position |
2846 | |
2847 | StaticallyKnownCollationsIteratorState(); |
2848 | |
2849 | @@ -612,7 +612,7 @@ |
2850 | { |
2851 | public: |
2852 | std::vector < function *> theFunctions; //vector of functions |
2853 | - ulong thePosition; //current position |
2854 | + u_long thePosition; //current position |
2855 | |
2856 | FunctionNamesIteratorState(); |
2857 | |
2858 | @@ -966,7 +966,7 @@ |
2859 | { |
2860 | public: |
2861 | const function* theFunction; //the function |
2862 | - ulong thePosition; //current position |
2863 | + u_long thePosition; //current position |
2864 | |
2865 | FunctionAnnotationsIteratorState(); |
2866 | |
2867 | |
2868 | === modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp' |
2869 | --- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-10-08 12:09:36 +0000 |
2870 | +++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-12-24 23:26:24 +0000 |
2871 | @@ -205,7 +205,7 @@ |
2872 | throw XQUERY_EXCEPTION( |
2873 | err::XQDY0027, |
2874 | ERROR_PARAMS(lSb.str()), |
2875 | - ERROR_LOC( loc )); |
2876 | + ERROR_LOC( aLoc )); |
2877 | } |
2878 | #endif |
2879 | } |
2880 | @@ -220,7 +220,7 @@ |
2881 | throw XQUERY_EXCEPTION( |
2882 | err::XQDY0027, |
2883 | ERROR_PARAMS(lSb.str()), |
2884 | - ERROR_LOC( loc )); |
2885 | + ERROR_LOC( aLoc )); |
2886 | } |
2887 | #endif |
2888 | } |
2889 | |
2890 | === modified file 'src/runtime/sequences/SequencesImpl.cpp' |
2891 | --- src/runtime/sequences/SequencesImpl.cpp 2012-09-19 21:16:15 +0000 |
2892 | +++ src/runtime/sequences/SequencesImpl.cpp 2012-12-24 23:26:24 +0000 |
2893 | @@ -286,7 +286,7 @@ |
2894 | store::Item* attr = 0; |
2895 | store::Item_t tmp; |
2896 | bool isMatchingId; |
2897 | - ulong i; |
2898 | + u_long i; |
2899 | |
2900 | FnIdIteratorState *state; |
2901 | DEFAULT_STACK_INIT(FnIdIteratorState, state, planState); |
2902 | @@ -420,7 +420,7 @@ |
2903 | store::Item* attr = 0; |
2904 | store::Item_t tmp; |
2905 | bool isMatchingId; |
2906 | - ulong i; |
2907 | + u_long i; |
2908 | |
2909 | FnElementWithIdIteratorState* state; |
2910 | DEFAULT_STACK_INIT(FnElementWithIdIteratorState, state, planState); |
2911 | @@ -561,7 +561,7 @@ |
2912 | store::Iterator_t typedValueIte; |
2913 | |
2914 | bool isMatchingId; |
2915 | - ulong i; |
2916 | + u_long i; |
2917 | |
2918 | std::vector<zstring> idrefs; |
2919 | |
2920 | |
2921 | === modified file 'src/runtime/sequences/sequences_impl.cpp' |
2922 | --- src/runtime/sequences/sequences_impl.cpp 2012-10-16 14:30:02 +0000 |
2923 | +++ src/runtime/sequences/sequences_impl.cpp 2012-12-24 23:26:24 +0000 |
2924 | @@ -1211,7 +1211,7 @@ |
2925 | bool FnCountIterator::nextImpl(store::Item_t& result, PlanState& planState) const |
2926 | { |
2927 | store::Item_t lSequenceItem; |
2928 | - ulong lCount = 0; |
2929 | + u_long lCount = 0; |
2930 | |
2931 | PlanIteratorState* state; |
2932 | DEFAULT_STACK_INIT(PlanIteratorState, state, planState); |
2933 | |
2934 | === modified file 'src/runtime/spec/codegen-cpp.xq' |
2935 | --- src/runtime/spec/codegen-cpp.xq 2012-09-19 21:16:15 +0000 |
2936 | +++ src/runtime/spec/codegen-cpp.xq 2012-12-24 23:26:24 +0000 |
2937 | @@ -161,7 +161,7 @@ |
2938 | fn:exists($function/@propagesOne)) |
2939 | then |
2940 | concat ( |
2941 | - 'bool ', $name, '::propagatesInputToOutput ( ulong ', $param, ') const {', |
2942 | + 'bool ', $name, '::propagatesInputToOutput ( u_long ', $param, ') const {', |
2943 | $gen:newline, |
2944 | $gen:indent, $body, |
2945 | $gen:newline, |
2946 | |
2947 | === modified file 'src/runtime/spec/introspection/sctx.xml' |
2948 | --- src/runtime/spec/introspection/sctx.xml 2012-09-19 21:16:15 +0000 |
2949 | +++ src/runtime/spec/introspection/sctx.xml 2012-12-24 23:26:24 +0000 |
2950 | @@ -37,7 +37,7 @@ |
2951 | <zorba:state generateReset="false" generateDestructor="false"> |
2952 | <zorba:member type="store::NsBindings" name="theBindings" |
2953 | brief="vector of namespace bindings"/> |
2954 | - <zorba:member type="ulong" name="thePosition" brief="current position"/> |
2955 | + <zorba:member type="u_long" name="thePosition" brief="current position"/> |
2956 | </zorba:state> |
2957 | |
2958 | </zorba:iterator> |
2959 | @@ -193,7 +193,7 @@ |
2960 | <zorba:state generateReset="false" generateDestructor="false"> |
2961 | <zorba:member type="std::vector < zstring >" name="theDocuments" |
2962 | brief="vector of document URIs"/> |
2963 | - <zorba:member type="ulong" name="thePosition" brief="current position"/> |
2964 | + <zorba:member type="u_long" name="thePosition" brief="current position"/> |
2965 | </zorba:state> |
2966 | |
2967 | </zorba:iterator> |
2968 | @@ -238,7 +238,7 @@ |
2969 | <zorba:state generateReset="false" generateDestructor="false"> |
2970 | <zorba:member type="std::vector < std::string >" name="theCollations" |
2971 | brief="vector of collation uris"/> |
2972 | - <zorba:member type="ulong" name="thePosition" brief="current position"/> |
2973 | + <zorba:member type="u_long" name="thePosition" brief="current position"/> |
2974 | </zorba:state> |
2975 | |
2976 | </zorba:iterator> |
2977 | @@ -358,7 +358,7 @@ |
2978 | <zorba:state generateReset="false" generateDestructor="false"> |
2979 | <zorba:member type="std::vector < function *>" name="theFunctions" |
2980 | brief="vector of functions"/> |
2981 | - <zorba:member type="ulong" name="thePosition" brief="current position"/> |
2982 | + <zorba:member type="u_long" name="thePosition" brief="current position"/> |
2983 | </zorba:state> |
2984 | |
2985 | </zorba:iterator> |
2986 | @@ -552,7 +552,7 @@ |
2987 | <zorba:state generateReset="false" generateDestructor="false"> |
2988 | <zorba:member type="const function*" name="theFunction" |
2989 | brief="the function"/> |
2990 | - <zorba:member type="ulong" name="thePosition" brief="current position"/> |
2991 | + <zorba:member type="u_long" name="thePosition" brief="current position"/> |
2992 | </zorba:state> |
2993 | |
2994 | </zorba:iterator> |
2995 | |
2996 | === modified file 'src/runtime/store/maps_impl.cpp' |
2997 | --- src/runtime/store/maps_impl.cpp 2012-10-15 13:35:59 +0000 |
2998 | +++ src/runtime/store/maps_impl.cpp 2012-12-24 23:26:24 +0000 |
2999 | @@ -315,7 +315,7 @@ |
3000 | store::Item_t lQName; |
3001 | std::vector<store::Item_t> lKey; |
3002 | store::Index* lIndex; |
3003 | - ulong i; |
3004 | + u_long i; |
3005 | store::Item_t lKeyItem; |
3006 | store::IndexSpecification lSpec; |
3007 | |
3008 | @@ -476,7 +476,7 @@ |
3009 | store::Item_t lQName; |
3010 | std::vector<store::Item_t> lKey; |
3011 | store::Index* lIndex; |
3012 | - ulong i; |
3013 | + u_long i; |
3014 | store::Item_t lKeyItem; |
3015 | std::auto_ptr<store::PUL> lPul; |
3016 | store::IndexSpecification lSpec; |
3017 | |
3018 | === modified file 'src/runtime/update/update.cpp' |
3019 | --- src/runtime/update/update.cpp 2012-10-08 12:09:36 +0000 |
3020 | +++ src/runtime/update/update.cpp 2012-12-24 23:26:24 +0000 |
3021 | @@ -121,8 +121,8 @@ |
3022 | store::Item_t source; |
3023 | std::vector<store::Item_t> attrs(16); |
3024 | std::vector<store::Item_t> nodes(16); |
3025 | - ulong numAttrs = 0; |
3026 | - ulong numNodes = 0; |
3027 | + u_long numAttrs = 0; |
3028 | + u_long numNodes = 0; |
3029 | std::auto_ptr<store::PUL> pul; |
3030 | store::Item_t temp; |
3031 | |
3032 | @@ -202,7 +202,7 @@ |
3033 | { |
3034 | attrs.resize(numAttrs); |
3035 | |
3036 | - for (ulong i = 0; i < numAttrs; ++i) |
3037 | + for (u_long i = 0; i < numAttrs; ++i) |
3038 | attrs[i] = attrs[i]->copy(NULL, lCopyMode); |
3039 | |
3040 | pul->addInsertAttributes(&loc, parent, attrs); |
3041 | @@ -212,7 +212,7 @@ |
3042 | { |
3043 | nodes.resize(numNodes); |
3044 | |
3045 | - for (ulong i = 0; i < numNodes; ++i) |
3046 | + for (u_long i = 0; i < numNodes; ++i) |
3047 | nodes[i] = nodes[i]->copy(NULL, lCopyMode); |
3048 | |
3049 | if (theType == store::UpdateConsts::BEFORE) |
3050 | @@ -277,7 +277,7 @@ |
3051 | { |
3052 | attrs.resize(numAttrs); |
3053 | |
3054 | - for (ulong i = 0; i < numAttrs; ++i) |
3055 | + for (u_long i = 0; i < numAttrs; ++i) |
3056 | attrs[i] = attrs[i]->copy(NULL, lCopyMode); |
3057 | |
3058 | pul->addInsertAttributes(&loc, target, attrs); |
3059 | @@ -287,7 +287,7 @@ |
3060 | { |
3061 | nodes.resize(numNodes); |
3062 | |
3063 | - for (ulong i = 0; i < numNodes; ++i) |
3064 | + for (u_long i = 0; i < numNodes; ++i) |
3065 | nodes[i] = nodes[i]->copy(NULL, lCopyMode); |
3066 | |
3067 | if (theType == store::UpdateConsts::INTO) |
3068 | @@ -380,7 +380,7 @@ |
3069 | store::Item_t lParent; |
3070 | store::Item_t temp; |
3071 | std::vector<store::Item_t> lNodes(16); |
3072 | - ulong lNumNodes = 0; |
3073 | + u_long lNumNodes = 0; |
3074 | std::auto_ptr<store::PUL> lPul; |
3075 | |
3076 | store::CopyMode lCopyMode; |
3077 | |
3078 | === modified file 'src/runtime/visitors/printer_visitor_impl.cpp' |
3079 | --- src/runtime/visitors/printer_visitor_impl.cpp 2012-10-08 12:09:36 +0000 |
3080 | +++ src/runtime/visitors/printer_visitor_impl.cpp 2012-12-24 23:26:24 +0000 |
3081 | @@ -775,8 +775,8 @@ |
3082 | { |
3083 | std::ostringstream str; |
3084 | |
3085 | - ulong numRefs = (ulong)posRefs.size(); |
3086 | - for (ulong i = 0; i < numRefs; i++) |
3087 | + u_long numRefs = (u_long)posRefs.size(); |
3088 | + for (u_long i = 0; i < numRefs; i++) |
3089 | { |
3090 | str << posRefs[i].getp(); |
3091 | if (i < numRefs-1) |
3092 | @@ -1004,8 +1004,8 @@ |
3093 | |
3094 | std::ostringstream str; |
3095 | |
3096 | - ulong numRefs = (ulong)varRefs.size(); |
3097 | - for (ulong i = 0; i < numRefs; i++) |
3098 | + u_long numRefs = (u_long)varRefs.size(); |
3099 | + for (u_long i = 0; i < numRefs; i++) |
3100 | { |
3101 | str << varRefs[i].getp(); |
3102 | if (i < numRefs-1) |
3103 | |
3104 | === modified file 'src/store/api/item_factory.h' |
3105 | --- src/store/api/item_factory.h 2012-09-19 21:16:15 +0000 |
3106 | +++ src/store/api/item_factory.h 2012-12-24 23:26:24 +0000 |
3107 | @@ -384,7 +384,7 @@ |
3108 | * Specification: [http://www.w3.org/TR/xmlschema-2/#dateTime] |
3109 | * @param value string representation of the value |
3110 | */ |
3111 | - virtual bool createDateTime(Item_t& result, const char* str, ulong strlen) = 0; |
3112 | + virtual bool createDateTime(Item_t& result, const char* str, u_long strlen) = 0; |
3113 | |
3114 | /** |
3115 | * Specification: [http://www.w3.org/TR/xpath-functions/] Section 5.2 |
3116 | @@ -408,7 +408,7 @@ |
3117 | * Specification: [http://www.w3.org/TR/xmlschema-2/#date] |
3118 | * @param value string representation of the value |
3119 | */ |
3120 | - virtual bool createDate(Item_t& result, const char* str, ulong strlen) = 0; |
3121 | + virtual bool createDate(Item_t& result, const char* str, u_long strlen) = 0; |
3122 | |
3123 | /** |
3124 | * |
3125 | @@ -419,7 +419,7 @@ |
3126 | * Specification: [http://www.w3.org/TR/xmlschema-2/#time] |
3127 | * @param value string representation of the value |
3128 | */ |
3129 | - virtual bool createTime(Item_t& result, const char* str, ulong strlen) = 0; |
3130 | + virtual bool createTime(Item_t& result, const char* str, u_long strlen) = 0; |
3131 | |
3132 | /** |
3133 | * @param hour |
3134 | @@ -447,7 +447,7 @@ |
3135 | * Specification: [http://www.w3.org/TR/xmlschema-2/#gDay] |
3136 | * @param value string representation of the value |
3137 | */ |
3138 | - virtual bool createGDay(Item_t& result, const char* str, ulong strlen) = 0; |
3139 | + virtual bool createGDay(Item_t& result, const char* str, u_long strlen) = 0; |
3140 | |
3141 | /** |
3142 | * @param day |
3143 | @@ -460,7 +460,7 @@ |
3144 | * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonth] |
3145 | * @param value string representation of the value |
3146 | */ |
3147 | - virtual bool createGMonth(Item_t& result, const char* str, ulong strlen) = 0; |
3148 | + virtual bool createGMonth(Item_t& result, const char* str, u_long strlen) = 0; |
3149 | |
3150 | /** |
3151 | * @param month |
3152 | @@ -473,7 +473,7 @@ |
3153 | * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonthDay] |
3154 | * @param value string representation of the value |
3155 | */ |
3156 | - virtual bool createGMonthDay(Item_t& result, const char* str, ulong strlen) = 0; |
3157 | + virtual bool createGMonthDay(Item_t& result, const char* str, u_long strlen) = 0; |
3158 | |
3159 | /** |
3160 | * @param month |
3161 | @@ -487,7 +487,7 @@ |
3162 | * Specification: [http://www.w3.org/TR/xmlschema-2/#gYear] |
3163 | * @param value string representation of the value |
3164 | */ |
3165 | - virtual bool createGYear(Item_t& result, const char* str, ulong strlen) = 0; |
3166 | + virtual bool createGYear(Item_t& result, const char* str, u_long strlen) = 0; |
3167 | |
3168 | /** |
3169 | * @param year |
3170 | @@ -500,7 +500,7 @@ |
3171 | * Specification: [http://www.w3.org/TR/xmlschema-2/#gYearMonth] |
3172 | * @param value string representation of the value |
3173 | */ |
3174 | - virtual bool createGYearMonth(Item_t& result, const char* str, ulong strlen) = 0; |
3175 | + virtual bool createGYearMonth(Item_t& result, const char* str, u_long strlen) = 0; |
3176 | |
3177 | /** |
3178 | * @param year |
3179 | @@ -512,17 +512,17 @@ |
3180 | |
3181 | virtual bool createYearMonthDuration(Item_t& result, xs_yearMonthDuration* value ) = 0; |
3182 | |
3183 | - virtual bool createYearMonthDuration(Item_t& result, const char* str, ulong strlen ) = 0; |
3184 | + virtual bool createYearMonthDuration(Item_t& result, const char* str, u_long strlen ) = 0; |
3185 | |
3186 | virtual bool createDayTimeDuration(Item_t& result, xs_dayTimeDuration* value ) = 0; |
3187 | |
3188 | - virtual bool createDayTimeDuration(Item_t& result, const char* str, ulong strlen ) = 0; |
3189 | + virtual bool createDayTimeDuration(Item_t& result, const char* str, u_long strlen ) = 0; |
3190 | |
3191 | /** |
3192 | * Specification: [http://www.w3.org/TR/xmlschema-2/#duration] |
3193 | * @param value string representation of the value |
3194 | */ |
3195 | - virtual bool createDuration(Item_t& result, const char* str, ulong strlen) = 0; |
3196 | + virtual bool createDuration(Item_t& result, const char* str, u_long strlen) = 0; |
3197 | |
3198 | /** |
3199 | * @param years |
3200 | |
3201 | === modified file 'src/store/api/item_handle.h' |
3202 | --- src/store/api/item_handle.h 2012-09-19 21:16:15 +0000 |
3203 | +++ src/store/api/item_handle.h 2012-12-24 23:26:24 +0000 |
3204 | @@ -183,14 +183,6 @@ |
3205 | return tmp; |
3206 | } |
3207 | |
3208 | -public: |
3209 | - std::string debug() const |
3210 | - { |
3211 | - std::ostringstream oss; |
3212 | - oss << "ItemHandle[refcount=" << p->getRefCount() << ']'; |
3213 | - return oss.str(); |
3214 | - } |
3215 | - |
3216 | protected: |
3217 | template <class otherT> ItemHandle& assign(const ItemHandle<otherT>& rhs) |
3218 | { |
3219 | |
3220 | === modified file 'src/store/naive/atomic_items.cpp' |
3221 | --- src/store/naive/atomic_items.cpp 2012-11-17 01:08:54 +0000 |
3222 | +++ src/store/naive/atomic_items.cpp 2012-12-24 23:26:24 +0000 |
3223 | @@ -1106,7 +1106,7 @@ |
3224 | ********************************************************************************/ |
3225 | |
3226 | StructuralAnyUriItem::StructuralAnyUriItem( |
3227 | - ulong collectionId, |
3228 | + u_long collectionId, |
3229 | const TreeId& treeId, |
3230 | store::StoreConsts::NodeKind nodeKind, |
3231 | const OrdPath& ordPath) |
3232 | @@ -1129,7 +1129,7 @@ |
3233 | theEncodedValue.take(value); |
3234 | std::istringstream input(theEncodedValue.str()); |
3235 | |
3236 | - ulong prefixlen = (ulong)strlen("zorba:"); |
3237 | + u_long prefixlen = (u_long)strlen("zorba:"); |
3238 | |
3239 | input.width(prefixlen); |
3240 | |
3241 | |
3242 | === modified file 'src/store/naive/atomic_items.h' |
3243 | --- src/store/naive/atomic_items.h 2012-10-08 12:09:36 +0000 |
3244 | +++ src/store/naive/atomic_items.h 2012-12-24 23:26:24 +0000 |
3245 | @@ -704,7 +704,7 @@ |
3246 | class StructuralAnyUriItem : public AtomicItem |
3247 | { |
3248 | protected: |
3249 | - ulong theCollectionId; |
3250 | + u_long theCollectionId; |
3251 | TreeId theTreeId; |
3252 | store::StoreConsts::NodeKind theNodeKind; |
3253 | OrdPath theOrdPath; |
3254 | @@ -837,7 +837,7 @@ |
3255 | StructuralAnyUriItem(zstring& value); |
3256 | |
3257 | StructuralAnyUriItem( |
3258 | - ulong collectionId, |
3259 | + u_long collectionId, |
3260 | const TreeId& treeId, |
3261 | store::StoreConsts::NodeKind nodeKind, |
3262 | const OrdPath& ordPath); |
3263 | |
3264 | === modified file 'src/store/naive/collection.cpp' |
3265 | --- src/store/naive/collection.cpp 2012-09-19 21:16:15 +0000 |
3266 | +++ src/store/naive/collection.cpp 2012-12-24 23:26:24 +0000 |
3267 | @@ -48,7 +48,7 @@ |
3268 | const std::vector<store::Item_t>& indexSources = indexSpec.theSources; |
3269 | uint64_t numIndexSources = (uint64_t)indexSources.size(); |
3270 | |
3271 | - for (ulong i = 0; i < numIndexSources; ++i) |
3272 | + for (u_long i = 0; i < numIndexSources; ++i) |
3273 | { |
3274 | if (indexSources[i]->equals(name)) |
3275 | { |
3276 | |
3277 | === modified file 'src/store/naive/collection.h' |
3278 | --- src/store/naive/collection.h 2012-12-05 14:51:50 +0000 |
3279 | +++ src/store/naive/collection.h 2012-12-24 23:26:24 +0000 |
3280 | @@ -98,7 +98,7 @@ |
3281 | |
3282 | /***************************** ID Management ********************************/ |
3283 | |
3284 | - virtual ulong getId() const = 0; |
3285 | + virtual u_long getId() const = 0; |
3286 | |
3287 | virtual TreeId createTreeId() = 0; |
3288 | |
3289 | |
3290 | === modified file 'src/store/naive/dataguide.cpp' |
3291 | --- src/store/naive/dataguide.cpp 2012-09-19 21:16:15 +0000 |
3292 | +++ src/store/naive/dataguide.cpp 2012-12-24 23:26:24 +0000 |
3293 | @@ -33,14 +33,14 @@ |
3294 | { |
3295 | assert(theParent == NULL); |
3296 | |
3297 | - ulong numChildren = this->numChildren(); |
3298 | - ulong numAttrs = this->numAttributes(); |
3299 | + u_long numChildren = this->numChildren(); |
3300 | + u_long numAttrs = this->numAttributes(); |
3301 | |
3302 | if (numChildren > 0 || numAttrs > 0) |
3303 | { |
3304 | ElementGuideNode* node = reinterpret_cast<ElementGuideNode*>(this); |
3305 | |
3306 | - for (ulong i = 0; i < numChildren; i++) |
3307 | + for (u_long i = 0; i < numChildren; i++) |
3308 | { |
3309 | GuideNode* child = node->theChildren[i]; |
3310 | assert(child->theParent == this); |
3311 | @@ -48,7 +48,7 @@ |
3312 | child->deleteTree(); |
3313 | } |
3314 | |
3315 | - for (ulong i = 0; i < numAttrs; i++) |
3316 | + for (u_long i = 0; i < numAttrs; i++) |
3317 | { |
3318 | GuideNode* attr = node->theAttributes[i]; |
3319 | assert(attr->theParent == this); |
3320 | @@ -129,9 +129,9 @@ |
3321 | |
3322 | unique = true; |
3323 | |
3324 | - ulong pathLen = (ulong)path.size(); |
3325 | + u_long pathLen = (u_long)path.size(); |
3326 | |
3327 | - for (ulong i = 0; i < pathLen; i++) |
3328 | + for (u_long i = 0; i < pathLen; i++) |
3329 | { |
3330 | if (attrPath && i == pathLen - 1) |
3331 | { |
3332 | @@ -160,8 +160,8 @@ |
3333 | ********************************************************************************/ |
3334 | ElementGuideNode* ElementGuideNode::findChild(const store::Item* name) |
3335 | { |
3336 | - ulong numChildren = (ulong)theChildren.size(); |
3337 | - for (ulong i = 0; i < numChildren; i++) |
3338 | + u_long numChildren = (u_long)theChildren.size(); |
3339 | + for (u_long i = 0; i < numChildren; i++) |
3340 | { |
3341 | if (theChildren[i]->theName->equals(name)) |
3342 | return theChildren[i]; |
3343 | @@ -176,8 +176,8 @@ |
3344 | ********************************************************************************/ |
3345 | AttributeGuideNode* ElementGuideNode::findAttr(const store::Item* name) |
3346 | { |
3347 | - ulong numAttrs = (ulong)theAttributes.size(); |
3348 | - for (ulong i = 0; i < numAttrs; i++) |
3349 | + u_long numAttrs = (u_long)theAttributes.size(); |
3350 | + for (u_long i = 0; i < numAttrs; i++) |
3351 | { |
3352 | if (theAttributes[i]->theName->equals(name)) |
3353 | return theAttributes[i]; |
3354 | @@ -190,7 +190,7 @@ |
3355 | /******************************************************************************* |
3356 | |
3357 | ********************************************************************************/ |
3358 | -std::string ElementGuideNode::show(ulong depth) const |
3359 | +std::string ElementGuideNode::show(u_long depth) const |
3360 | { |
3361 | std::stringstream str; |
3362 | |
3363 | @@ -202,7 +202,7 @@ |
3364 | |
3365 | depth += 2; |
3366 | |
3367 | - ulong numChildren = (ulong)theChildren.size(); |
3368 | + u_long numChildren = (u_long)theChildren.size(); |
3369 | |
3370 | if (theName != NULL) |
3371 | { |
3372 | @@ -218,7 +218,7 @@ |
3373 | str << "<DOC>" << std::endl; |
3374 | } |
3375 | |
3376 | - for (ulong i = 0; i < numChildren; i++) |
3377 | + for (u_long i = 0; i < numChildren; i++) |
3378 | { |
3379 | str << theChildren[i]->show(depth); |
3380 | } |
3381 | |
3382 | === modified file 'src/store/naive/dataguide.h' |
3383 | --- src/store/naive/dataguide.h 2012-09-19 21:16:15 +0000 |
3384 | +++ src/store/naive/dataguide.h 2012-12-24 23:26:24 +0000 |
3385 | @@ -60,8 +60,8 @@ |
3386 | bool getUnique() const { return theIsUnique; } |
3387 | void setUnique(bool v) { theIsUnique = v; } |
3388 | |
3389 | - virtual ulong numChildren() const { return 0; } |
3390 | - virtual ulong numAttributes() const { return 0; } |
3391 | + virtual u_long numChildren() const { return 0; } |
3392 | + virtual u_long numAttributes() const { return 0; } |
3393 | |
3394 | void deleteTree(); |
3395 | |
3396 | @@ -72,7 +72,7 @@ |
3397 | bool& found, |
3398 | bool& unique) = 0; |
3399 | |
3400 | - virtual std::string show(ulong depth) const = 0; |
3401 | + virtual std::string show(u_long depth) const = 0; |
3402 | }; |
3403 | |
3404 | |
3405 | @@ -103,7 +103,7 @@ |
3406 | bool& found, |
3407 | bool& unique); |
3408 | |
3409 | - std::string show(ulong depth) const { return "attr"; } |
3410 | + std::string show(u_long depth) const { return "attr"; } |
3411 | }; |
3412 | |
3413 | |
3414 | @@ -132,8 +132,8 @@ |
3415 | return store::StoreConsts::elementNode; |
3416 | } |
3417 | |
3418 | - ulong numChildren() const { return (ulong)theChildren.size(); } |
3419 | - ulong numAttributes() const { return (ulong)theAttributes.size(); } |
3420 | + u_long numChildren() const { return (u_long)theChildren.size(); } |
3421 | + u_long numAttributes() const { return (u_long)theAttributes.size(); } |
3422 | |
3423 | void getPathInfo( |
3424 | std::vector<const store::Item*>& ctxPath, |
3425 | @@ -150,7 +150,7 @@ |
3426 | ElementGuideNode* findChild(const store::Item* name); |
3427 | AttributeGuideNode* findAttr(const store::Item* name); |
3428 | |
3429 | - std::string show(ulong depth) const; |
3430 | + std::string show(u_long depth) const; |
3431 | }; |
3432 | |
3433 | |
3434 | |
3435 | === modified file 'src/store/naive/hashmap_nodep.h' |
3436 | --- src/store/naive/hashmap_nodep.h 2012-09-19 21:16:15 +0000 |
3437 | +++ src/store/naive/hashmap_nodep.h 2012-12-24 23:26:24 +0000 |
3438 | @@ -57,7 +57,7 @@ |
3439 | NodePointerHashMapCmp> |
3440 | { |
3441 | public: |
3442 | - NodePointerHashMap(ulong size, bool sync) |
3443 | + NodePointerHashMap(u_long size, bool sync) |
3444 | : |
3445 | HashMap<const XmlNode*, V, NodePointerHashMapCmp>(size, sync) |
3446 | { |
3447 | |
3448 | === modified file 'src/store/naive/item_vector.cpp' |
3449 | --- src/store/naive/item_vector.cpp 2012-09-19 21:16:15 +0000 |
3450 | +++ src/store/naive/item_vector.cpp 2012-12-24 23:26:24 +0000 |
3451 | @@ -104,7 +104,7 @@ |
3452 | { |
3453 | std::ostringstream res; |
3454 | res << "ItemVector size: " << size() + " ["; |
3455 | - for ( ulong i = 0; i < size(); i++) |
3456 | + for ( u_long i = 0; i < size(); i++) |
3457 | res << getItem(i)->show() << ", "; |
3458 | res << "]"; |
3459 | |
3460 | |
3461 | === modified file 'src/store/naive/item_vector.h' |
3462 | --- src/store/naive/item_vector.h 2012-09-19 21:16:15 +0000 |
3463 | +++ src/store/naive/item_vector.h 2012-12-24 23:26:24 +0000 |
3464 | @@ -48,7 +48,7 @@ |
3465 | |
3466 | void appendStringValue(zstring& buf) const; |
3467 | |
3468 | - ulong size() const { return (ulong)theItems.size(); } |
3469 | + u_long size() const { return (u_long)theItems.size(); } |
3470 | |
3471 | bool empty() const { return theItems.empty(); } |
3472 | |
3473 | @@ -56,7 +56,7 @@ |
3474 | |
3475 | std::vector<store::Item_t>& getItems() { return theItems; } |
3476 | |
3477 | - store::Item* getItem(ulong pos) const { return theItems[pos].getp(); } |
3478 | + store::Item* getItem(u_long pos) const { return theItems[pos].getp(); } |
3479 | |
3480 | zstring show() const; |
3481 | }; |
3482 | |
3483 | === modified file 'src/store/naive/loader.h' |
3484 | --- src/store/naive/loader.h 2012-09-19 21:16:15 +0000 |
3485 | +++ src/store/naive/loader.h 2012-12-24 23:26:24 +0000 |
3486 | @@ -72,7 +72,7 @@ |
3487 | class XmlLoader |
3488 | { |
3489 | protected: |
3490 | - static const ulong INPUT_CHUNK_SIZE = 8192; |
3491 | + static const u_long INPUT_CHUNK_SIZE = 8192; |
3492 | |
3493 | protected: |
3494 | const store::LoadProperties & theLoadProperties; |
3495 | |
3496 | === modified file 'src/store/naive/loader_dtd.cpp' |
3497 | --- src/store/naive/loader_dtd.cpp 2012-09-19 21:16:15 +0000 |
3498 | +++ src/store/naive/loader_dtd.cpp 2012-12-24 23:26:24 +0000 |
3499 | @@ -1098,11 +1098,11 @@ |
3500 | ZORBA_LOADER_CHECK_ERROR(loader); |
3501 | |
3502 | zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack; |
3503 | - ulong stackSize = nodeStack.size(); |
3504 | - ulong firstChildPos; |
3505 | - ulong numChildren; |
3506 | - ulong numActualChildren; |
3507 | - ulong i; |
3508 | + u_long stackSize = nodeStack.size(); |
3509 | + u_long firstChildPos; |
3510 | + u_long numChildren; |
3511 | + u_long numActualChildren; |
3512 | + u_long i; |
3513 | DocumentNode* docNode; |
3514 | XmlNode* currChild; |
3515 | |
3516 | |
3517 | === modified file 'src/store/naive/loader_fast.cpp' |
3518 | --- src/store/naive/loader_fast.cpp 2012-09-19 21:16:15 +0000 |
3519 | +++ src/store/naive/loader_fast.cpp 2012-12-24 23:26:24 +0000 |
3520 | @@ -469,11 +469,11 @@ |
3521 | ZORBA_LOADER_CHECK_ERROR(loader); |
3522 | |
3523 | zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack; |
3524 | - ulong stackSize = nodeStack.size(); |
3525 | - ulong firstChildPos; |
3526 | - ulong numChildren; |
3527 | - ulong numActualChildren; |
3528 | - ulong i; |
3529 | + u_long stackSize = nodeStack.size(); |
3530 | + u_long firstChildPos; |
3531 | + u_long numChildren; |
3532 | + u_long numActualChildren; |
3533 | + u_long i; |
3534 | DocumentNode* docNode; |
3535 | XmlNode* currChild; |
3536 | |
3537 | |
3538 | === modified file 'src/store/naive/node_factory.cpp' |
3539 | --- src/store/naive/node_factory.cpp 2012-09-19 21:16:15 +0000 |
3540 | +++ src/store/naive/node_factory.cpp 2012-12-24 23:26:24 +0000 |
3541 | @@ -66,8 +66,8 @@ |
3542 | |
3543 | ElementNode* NodeFactory::createElementNode( |
3544 | store::Item_t& nodeName, |
3545 | - ulong numBindings, |
3546 | - ulong numAttributes) |
3547 | + u_long numBindings, |
3548 | + u_long numAttributes) |
3549 | { |
3550 | return new ElementNode(nodeName, numBindings, numAttributes); |
3551 | } |
3552 | |
3553 | === modified file 'src/store/naive/node_factory.h' |
3554 | --- src/store/naive/node_factory.h 2012-09-19 21:16:15 +0000 |
3555 | +++ src/store/naive/node_factory.h 2012-12-24 23:26:24 +0000 |
3556 | @@ -73,8 +73,8 @@ |
3557 | |
3558 | virtual ElementNode* createElementNode( |
3559 | store::Item_t& nodeName, |
3560 | - ulong numBindings, |
3561 | - ulong numAttributes); |
3562 | + u_long numBindings, |
3563 | + u_long numAttributes); |
3564 | |
3565 | virtual ElementNode* createElementNode( |
3566 | XmlTree* tree, |
3567 | |
3568 | === modified file 'src/store/naive/node_items.cpp' |
3569 | --- src/store/naive/node_items.cpp 2012-12-14 13:11:08 +0000 |
3570 | +++ src/store/naive/node_items.cpp 2012-12-24 23:26:24 +0000 |
3571 | @@ -132,7 +132,7 @@ |
3572 | /******************************************************************************* |
3573 | |
3574 | ********************************************************************************/ |
3575 | -ulong XmlTree::getCollectionId() const |
3576 | +u_long XmlTree::getCollectionId() const |
3577 | { |
3578 | if (theCollection != NULL) |
3579 | return theCollection->getId(); |
3580 | @@ -1397,7 +1397,7 @@ |
3581 | ********************************************************************************/ |
3582 | store::Item_t OrdPathNode::getLevel() const |
3583 | { |
3584 | - ulong lNumLevels = 1; |
3585 | + u_long lNumLevels = 1; |
3586 | store::Item_t lCurrent = this->getParent(); |
3587 | while (lCurrent) |
3588 | { |
3589 | @@ -2175,7 +2175,7 @@ |
3590 | |
3591 | if (numAttrs() != 0) |
3592 | { |
3593 | - ulong pos = 0; |
3594 | + u_long pos = 0; |
3595 | XmlNode* attr = getAttr(pos); |
3596 | removeAttr(pos); |
3597 | delete attr; |
3598 | @@ -2185,7 +2185,7 @@ |
3599 | } |
3600 | |
3601 | STORE_TRACE1("Constructed element node " << this << " parent = " |
3602 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3603 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3604 | << " tree = " << getTree()->getId() << ":" << getTree() |
3605 | << " ordpath = " << theOrdPath.show() |
3606 | << " name = " << theName->getStringValue() |
3607 | @@ -2878,7 +2878,7 @@ |
3608 | nilled = false; |
3609 | |
3610 | //const char* xsi = "http://www.w3.org/2001/XMLSchema-instance"; |
3611 | - //ulong xsilen = strlen(xsi); |
3612 | + //u_long xsilen = strlen(xsi); |
3613 | |
3614 | ite = attrsBegin(); |
3615 | end = attrsEnd(); |
3616 | @@ -3667,7 +3667,7 @@ |
3617 | } |
3618 | |
3619 | STORE_TRACE1("Constructed attribute node " << this << " parent = " |
3620 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3621 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3622 | << " tree = " << getTree()->getId() << ":" << getTree() |
3623 | << " ordpath = " << theOrdPath.show() |
3624 | << " name = " << theName->getStringValue() |
3625 | @@ -3751,7 +3751,7 @@ |
3626 | |
3627 | STORE_TRACE1("Copied attribute node " << this << " to node " << copyNode |
3628 | << " name = " << theName->show() << " parent = " |
3629 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3630 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3631 | << " copy mode = " << copymode.toString()); |
3632 | |
3633 | return copyNode; |
3634 | @@ -4108,13 +4108,13 @@ |
3635 | |
3636 | #ifdef TEXT_ORDPATH |
3637 | STORE_TRACE1("Constructed text node " << this << " parent = " |
3638 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3639 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3640 | << " tree = " << getTree()->getId() << ":" << getTree() |
3641 | << " ordpath = " << theOrdPath.show() |
3642 | << " content = " << getText()); |
3643 | #else |
3644 | STORE_TRACE1("Constructed text node " << this << " parent = " |
3645 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3646 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3647 | << " tree = " << getTree()->getId() << ":" << getTree() |
3648 | << " content = " << getText()); |
3649 | #endif |
3650 | @@ -4169,12 +4169,12 @@ |
3651 | |
3652 | #ifdef TEXT_ORDPATH |
3653 | STORE_TRACE1("Constructed text node " << this << " parent = " |
3654 | - << std::hex << (parent ? (ulong)parent : 0) |
3655 | + << std::hex << (parent ? (u_long)parent : 0) |
3656 | << " ordpath = " << theOrdPath.show() |
3657 | << " content = " << getValue()->getStringValue()); |
3658 | #else |
3659 | STORE_TRACE1("Constructed text node " << this << " parent = " |
3660 | - << std::hex << (parent ? (ulong)parent : 0) |
3661 | + << std::hex << (parent ? (u_long)parent : 0) |
3662 | << " content = " << getValue()->getStringValue()); |
3663 | #endif |
3664 | } |
3665 | @@ -4286,7 +4286,7 @@ |
3666 | } |
3667 | |
3668 | STORE_TRACE1("Copied text node " << this << " to node " << copyNode |
3669 | - << " parent = " << std::hex << (parent ? (ulong)parent : 0) |
3670 | + << " parent = " << std::hex << (parent ? (u_long)parent : 0) |
3671 | << " pos = " << pos); |
3672 | |
3673 | return copyNode; |
3674 | @@ -4813,7 +4813,7 @@ |
3675 | } |
3676 | |
3677 | STORE_TRACE1("Constructed pi node " << this << " parent = " |
3678 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3679 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3680 | << " tree = " << getTree()->getId() << ":" << getTree() |
3681 | << " ordpath = " << theOrdPath.show() << " target = " << theTarget); |
3682 | } |
3683 | @@ -4862,7 +4862,7 @@ |
3684 | } |
3685 | |
3686 | STORE_TRACE1("Copied pi node " << this << " to node " << copyNode |
3687 | - << " parent = " << std::hex << (parent ? (ulong)parent : 0) |
3688 | + << " parent = " << std::hex << (parent ? (u_long)parent : 0) |
3689 | << " pos = " << pos); |
3690 | |
3691 | return copyNode; |
3692 | @@ -4956,7 +4956,7 @@ |
3693 | } |
3694 | |
3695 | STORE_TRACE1("Constructed comment node " << this << " parent = " |
3696 | - << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos |
3697 | + << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos |
3698 | << " tree = " << getTree()->getId() << ":" << getTree() |
3699 | << " ordpath = " << theOrdPath.show() << " content = " |
3700 | << theContent); |
3701 | @@ -5003,7 +5003,7 @@ |
3702 | } |
3703 | |
3704 | STORE_TRACE1("Copied coment node " << this << " to node " << copyNode |
3705 | - << " parent = " << std::hex << (parent ? (ulong)parent : 0) |
3706 | + << " parent = " << std::hex << (parent ? (u_long)parent : 0) |
3707 | << " pos = " << pos); |
3708 | |
3709 | return copyNode; |
3710 | |
3711 | === modified file 'src/store/naive/node_items.h' |
3712 | --- src/store/naive/node_items.h 2012-12-14 13:23:51 +0000 |
3713 | +++ src/store/naive/node_items.h 2012-12-24 23:26:24 +0000 |
3714 | @@ -200,7 +200,7 @@ |
3715 | |
3716 | const TreeId& getId() const { return theId; } |
3717 | |
3718 | - ulong getCollectionId() const; |
3719 | + u_long getCollectionId() const; |
3720 | |
3721 | const Collection* getCollection() const { return theCollection; } |
3722 | |
3723 | @@ -508,7 +508,7 @@ |
3724 | getTree()->setCollection(coll, pos); |
3725 | } |
3726 | |
3727 | - ulong getCollectionId() const |
3728 | + u_long getCollectionId() const |
3729 | { |
3730 | assert(!isConnectorNode()); |
3731 | return getTree()->getCollectionId(); |
3732 | @@ -1571,8 +1571,8 @@ |
3733 | if (this == other) |
3734 | return 0; |
3735 | |
3736 | - ulong col1 = this->getCollectionId(); |
3737 | - ulong col2 = other->getCollectionId(); |
3738 | + u_long col1 = this->getCollectionId(); |
3739 | + u_long col2 = other->getCollectionId(); |
3740 | |
3741 | if (col1 < col2) |
3742 | return -1; |
3743 | @@ -1621,8 +1621,8 @@ |
3744 | if (this == other) |
3745 | return 0; |
3746 | |
3747 | - ulong col1 = this->getCollectionId(); |
3748 | - ulong col2 = other->getCollectionId(); |
3749 | + u_long col1 = this->getCollectionId(); |
3750 | + u_long col2 = other->getCollectionId(); |
3751 | |
3752 | if (col1 < col2) |
3753 | return -1; |
3754 | |
3755 | === modified file 'src/store/naive/node_updates.cpp' |
3756 | --- src/store/naive/node_updates.cpp 2012-09-19 21:16:15 +0000 |
3757 | +++ src/store/naive/node_updates.cpp 2012-12-24 23:26:24 +0000 |
3758 | @@ -279,7 +279,7 @@ |
3759 | ite = elem->childrenBegin(); |
3760 | end = elem->childrenEnd(); |
3761 | |
3762 | - for (ulong i = 0; ite != end; ++i, ++ite) |
3763 | + for (u_long i = 0; ite != end; ++i, ++ite) |
3764 | { |
3765 | XmlNode* child = (*ite); |
3766 | |
3767 | @@ -310,7 +310,7 @@ |
3768 | } |
3769 | } |
3770 | |
3771 | - ulong refcount = oldTree->getRefCount(); |
3772 | + u_long refcount = oldTree->getRefCount(); |
3773 | oldTree->getRefCount() = 0; |
3774 | oldTree->free(); |
3775 | |
3776 | @@ -332,7 +332,7 @@ |
3777 | { |
3778 | ZORBA_ASSERT(theParent != NULL); |
3779 | |
3780 | - ulong refcount = 0; |
3781 | + u_long refcount = 0; |
3782 | |
3783 | XmlTree* oldTree = getTree(); |
3784 | XmlTree* newTree = GET_STORE().getNodeFactory().createXmlTree(); |
3785 | @@ -690,8 +690,8 @@ |
3786 | if (undoList.empty()) |
3787 | return; |
3788 | |
3789 | - ulong pos = 0; |
3790 | - ulong numNodes = (ulong)undoList.size(); |
3791 | + u_long pos = 0; |
3792 | + u_long numNodes = (u_long)undoList.size(); |
3793 | XmlNode* currNode = this; |
3794 | |
3795 | while(currNode != NULL && pos < numNodes) |
3796 | @@ -840,7 +840,7 @@ |
3797 | removeType(upd); |
3798 | |
3799 | // Insert the new children without merging text nodes |
3800 | - for (ulong i = 0; i < numNewChildren; ++i) |
3801 | + for (u_long i = 0; i < numNewChildren; ++i) |
3802 | { |
3803 | XmlNode* child = BASE_NODE(upd.theNewChildren[i]); |
3804 | |
3805 | |
3806 | === modified file 'src/store/naive/nsbindings.cpp' |
3807 | --- src/store/naive/nsbindings.cpp 2012-09-19 21:16:15 +0000 |
3808 | +++ src/store/naive/nsbindings.cpp 2012-12-24 23:26:24 +0000 |
3809 | @@ -129,9 +129,9 @@ |
3810 | while (currentContext != NULL) |
3811 | { |
3812 | const store::NsBindings& bindings = currentContext->theBindings; |
3813 | - ulong numBindings = (ulong)bindings.size(); |
3814 | + u_long numBindings = (u_long)bindings.size(); |
3815 | |
3816 | - for (ulong i = 0; i < numBindings; ++i) |
3817 | + for (u_long i = 0; i < numBindings; ++i) |
3818 | { |
3819 | if (bindings[i].first == prefix) |
3820 | { |
3821 | @@ -185,9 +185,9 @@ |
3822 | ********************************************************************************/ |
3823 | void NsBindingsContext::updateBinding(const zstring& prefix, const zstring& ns) |
3824 | { |
3825 | - ulong numBindings = (ulong)theBindings.size(); |
3826 | + u_long numBindings = (u_long)theBindings.size(); |
3827 | |
3828 | - for (ulong i = 0; i < numBindings; ++i) |
3829 | + for (u_long i = 0; i < numBindings; ++i) |
3830 | { |
3831 | if (theBindings[i].first == prefix) |
3832 | { |
3833 | @@ -206,9 +206,9 @@ |
3834 | ********************************************************************************/ |
3835 | void NsBindingsContext::removeBinding(const zstring& prefix, const zstring& ns) |
3836 | { |
3837 | - ulong numBindings = (ulong)theBindings.size(); |
3838 | + u_long numBindings = (u_long)theBindings.size(); |
3839 | |
3840 | - for (ulong i = 0; i < numBindings; i++) |
3841 | + for (u_long i = 0; i < numBindings; i++) |
3842 | { |
3843 | if (theBindings[i].first == prefix) |
3844 | { |
3845 | |
3846 | === modified file 'src/store/naive/ordpath.cpp' |
3847 | --- src/store/naive/ordpath.cpp 2012-09-19 21:16:15 +0000 |
3848 | +++ src/store/naive/ordpath.cpp 2012-12-24 23:26:24 +0000 |
3849 | @@ -193,7 +193,7 @@ |
3850 | it is false, interprets it as a hexadecimal representation (with even length) |
3851 | of binary data. |
3852 | ********************************************************************************/ |
3853 | -OrdPath::OrdPath(const unsigned char* str, ulong strLen, bool isBinary) |
3854 | +OrdPath::OrdPath(const unsigned char* str, u_long strLen, bool isBinary) |
3855 | { |
3856 | if (isBinary) |
3857 | { |
3858 | @@ -209,7 +209,7 @@ |
3859 | /******************************************************************************* |
3860 | Inits the instance with binary ORDPATH data. |
3861 | ********************************************************************************/ |
3862 | -void OrdPath::initFromData(const unsigned char* buf, ulong byteLen) |
3863 | +void OrdPath::initFromData(const unsigned char* buf, u_long byteLen) |
3864 | { |
3865 | memset(theBuffer.local, 0, MAX_EMBEDDED_BYTE_LEN); |
3866 | |
3867 | @@ -230,7 +230,7 @@ |
3868 | Inits the instance with a string containing a hexadecimal representation of |
3869 | the binary ORDPATH data. |
3870 | ********************************************************************************/ |
3871 | -void OrdPath::initFromString(const unsigned char* str, ulong strLen) |
3872 | +void OrdPath::initFromString(const unsigned char* str, u_long strLen) |
3873 | { |
3874 | unsigned char* buf; |
3875 | bool isLocal; |
3876 | @@ -238,7 +238,7 @@ |
3877 | // The string length should always be even (each buffer entry is encoded in two digits) |
3878 | ZORBA_FATAL(strLen % 2 == 0, ""); |
3879 | |
3880 | - ulong byteLen = strLen / 2; |
3881 | + u_long byteLen = strLen / 2; |
3882 | |
3883 | if (byteLen > MAX_BYTE_LEN) |
3884 | { |
3885 | @@ -264,7 +264,7 @@ |
3886 | } |
3887 | |
3888 | const unsigned char* start = str; |
3889 | - ulong i = 0; |
3890 | + u_long i = 0; |
3891 | |
3892 | try |
3893 | { |
3894 | @@ -347,7 +347,7 @@ |
3895 | } |
3896 | else |
3897 | { |
3898 | - ulong len = other.getRemoteByteLength(); |
3899 | + u_long len = other.getRemoteByteLength(); |
3900 | |
3901 | ZORBA_ASSERT(len >= MAX_EMBEDDED_BYTE_LEN); |
3902 | |
3903 | @@ -366,7 +366,7 @@ |
3904 | ********************************************************************************/ |
3905 | OrdPath& OrdPath::operator=(const OrdPathStack& ops) |
3906 | { |
3907 | - ulong len = ops.getByteLength(); |
3908 | + u_long len = ops.getByteLength(); |
3909 | |
3910 | if (len > MAX_EMBEDDED_BYTE_LEN || |
3911 | (len == MAX_EMBEDDED_BYTE_LEN && ops.theBitsAvailable == 0)) |
3912 | @@ -380,7 +380,7 @@ |
3913 | { |
3914 | reset(); |
3915 | |
3916 | - for (ulong i = 0; i < len; ++i) |
3917 | + for (u_long i = 0; i < len; ++i) |
3918 | theBuffer.local[i] = ops.theBuffer[i]; |
3919 | |
3920 | markLocal(); |
3921 | @@ -392,7 +392,7 @@ |
3922 | /******************************************************************************* |
3923 | |
3924 | ********************************************************************************/ |
3925 | -ulong OrdPath::getLocalBitLength(ulong& byteLen) const |
3926 | +u_long OrdPath::getLocalBitLength(u_long& byteLen) const |
3927 | { |
3928 | ZORBA_ASSERT_WITH_MSG(isLocal(), |
3929 | "OrdPath::getLocalBitLength was called even though" << |
3930 | @@ -403,7 +403,7 @@ |
3931 | if (byteLen == 0) |
3932 | return 0; |
3933 | |
3934 | - ulong bitLen = byteLen * 8; |
3935 | + u_long bitLen = byteLen * 8; |
3936 | |
3937 | unsigned char lastByte = getLocalData()[byteLen - 1]; |
3938 | if (byteLen == MAX_EMBEDDED_BYTE_LEN) |
3939 | @@ -426,14 +426,14 @@ |
3940 | /******************************************************************************* |
3941 | |
3942 | ********************************************************************************/ |
3943 | -ulong OrdPath::getRemoteBitLength(ulong& byteLen) const |
3944 | +u_long OrdPath::getRemoteBitLength(u_long& byteLen) const |
3945 | { |
3946 | byteLen = getRemoteByteLength(); |
3947 | |
3948 | if (byteLen == 0) |
3949 | return 0; |
3950 | |
3951 | - ulong bitLen = byteLen * 8; |
3952 | + u_long bitLen = byteLen * 8; |
3953 | |
3954 | unsigned char lastByte = getRemoteData()[byteLen - 1]; |
3955 | |
3956 | @@ -463,7 +463,7 @@ |
3957 | ********************************************************************************/ |
3958 | bool OrdPath::operator==(const OrdPath& other) const |
3959 | { |
3960 | - ulong len = getByteLength(); |
3961 | + u_long len = getByteLength(); |
3962 | |
3963 | if (len != other.getByteLength()) |
3964 | return false; |
3965 | @@ -477,8 +477,8 @@ |
3966 | ********************************************************************************/ |
3967 | int OrdPath::operator<(const OrdPath& other) const |
3968 | { |
3969 | - ulong len1; |
3970 | - ulong len2; |
3971 | + u_long len1; |
3972 | + u_long len2; |
3973 | unsigned char* p1 = getDataAndLength(len1); |
3974 | unsigned char* p2 = other.getDataAndLength(len2); |
3975 | |
3976 | @@ -524,8 +524,8 @@ |
3977 | ********************************************************************************/ |
3978 | int OrdPath::operator>(const OrdPath& other) const |
3979 | { |
3980 | - ulong len1; |
3981 | - ulong len2; |
3982 | + u_long len1; |
3983 | + u_long len2; |
3984 | unsigned char* p1 = getDataAndLength(len1); |
3985 | unsigned char* p2 = other.getDataAndLength(len2); |
3986 | |
3987 | @@ -572,8 +572,8 @@ |
3988 | ********************************************************************************/ |
3989 | OrdPath::RelativePosition OrdPath::getRelativePosition(const OrdPath& other) const |
3990 | { |
3991 | - ulong len1; |
3992 | - ulong len2; |
3993 | + u_long len1; |
3994 | + u_long len2; |
3995 | unsigned char* data1 = getDataAndLength(len1); |
3996 | unsigned char* data2 = other.getDataAndLength(len2); |
3997 | |
3998 | @@ -673,16 +673,16 @@ |
3999 | OrdPath::RelativePosition OrdPath::getRelativePosition2(const OrdPath& other) const |
4000 | { |
4001 | int32_t dewey1[MAX_NUM_COMPS], dewey2[MAX_NUM_COMPS]; |
4002 | - ulong offsets1[MAX_NUM_COMPS], offsets2[MAX_NUM_COMPS]; |
4003 | - ulong numComps1 = 0, numComps2 = 0; |
4004 | - ulong bitLen1 = 0, bitLen2 = 0; |
4005 | + u_long offsets1[MAX_NUM_COMPS], offsets2[MAX_NUM_COMPS]; |
4006 | + u_long numComps1 = 0, numComps2 = 0; |
4007 | + u_long bitLen1 = 0, bitLen2 = 0; |
4008 | bool thisFirst; |
4009 | |
4010 | decompress(0, dewey1, offsets1, numComps1, bitLen1); |
4011 | other.decompress(0, dewey2, offsets2, numComps2, bitLen2); |
4012 | |
4013 | // curr will be the first non-shared component |
4014 | - ulong curr = 0; |
4015 | + u_long curr = 0; |
4016 | |
4017 | if (numComps1 < numComps2) |
4018 | { |
4019 | @@ -703,15 +703,15 @@ |
4020 | else |
4021 | thisFirst = false; |
4022 | |
4023 | - ulong extraLevels1 = 0, extraLevels2 = 0; |
4024 | + u_long extraLevels1 = 0, extraLevels2 = 0; |
4025 | |
4026 | - for (ulong i = curr; i < numComps1; ++i) |
4027 | + for (u_long i = curr; i < numComps1; ++i) |
4028 | { |
4029 | if (dewey1[i] % 2 == 1) |
4030 | ++extraLevels1; |
4031 | } |
4032 | |
4033 | - for (ulong i = curr; i < numComps2; ++i) |
4034 | + for (u_long i = curr; i < numComps2; ++i) |
4035 | { |
4036 | if (dewey2[i] % 2 == 1) |
4037 | ++extraLevels2; |
4038 | @@ -755,10 +755,10 @@ |
4039 | { |
4040 | reset(); |
4041 | |
4042 | - ulong bitLen = 0; |
4043 | + u_long bitLen = 0; |
4044 | |
4045 | - ulong numComps = (ulong)dewey.size(); |
4046 | - for (ulong i = 0; i < numComps; ++i) |
4047 | + u_long numComps = (u_long)dewey.size(); |
4048 | + for (u_long i = 0; i < numComps; ++i) |
4049 | { |
4050 | if (! pushComp(getLocalData(), MAX_EMBEDDED_BIT_LEN, dewey[i], bitLen)) |
4051 | return false; |
4052 | @@ -777,7 +777,7 @@ |
4053 | { |
4054 | reset(); |
4055 | |
4056 | - ulong bitLen = 0; |
4057 | + u_long bitLen = 0; |
4058 | |
4059 | unsigned char* databuf = new unsigned char[MAX_BYTE_LEN]; |
4060 | |
4061 | @@ -785,14 +785,14 @@ |
4062 | { |
4063 | memset(databuf, 0, MAX_BYTE_LEN); |
4064 | |
4065 | - ulong numComps = (ulong)dewey.size(); |
4066 | - for (ulong i = 0; i < numComps; ++i) |
4067 | + u_long numComps = (u_long)dewey.size(); |
4068 | + for (u_long i = 0; i < numComps; ++i) |
4069 | { |
4070 | bool success = pushComp(databuf, MAX_BIT_LEN, dewey[i], bitLen); |
4071 | ZORBA_ASSERT(success); |
4072 | } |
4073 | |
4074 | - ulong byteLen = (bitLen + 7) / 8; |
4075 | + u_long byteLen = (bitLen + 7) / 8; |
4076 | |
4077 | initRemote(byteLen); |
4078 | memcpy(getRemoteData(), databuf, byteLen); |
4079 | @@ -854,15 +854,15 @@ |
4080 | const OrdPath& sibling, |
4081 | OrdPath& result) |
4082 | { |
4083 | - ulong numComps = 0; |
4084 | + u_long numComps = 0; |
4085 | int32_t dewey[MAX_NUM_COMPS]; |
4086 | - ulong offsets[MAX_NUM_COMPS]; |
4087 | - ulong bitLen; |
4088 | - ulong byteLen; |
4089 | + u_long offsets[MAX_NUM_COMPS]; |
4090 | + u_long bitLen; |
4091 | + u_long byteLen; |
4092 | unsigned char* data; |
4093 | |
4094 | - ulong parentByteLen; |
4095 | - ulong parentBitLen = parent.getBitLength(parentByteLen); |
4096 | + u_long parentByteLen; |
4097 | + u_long parentBitLen = parent.getBitLength(parentByteLen); |
4098 | |
4099 | // Decompress the last level-component of sibling. |
4100 | sibling.decompress(parentBitLen, dewey, offsets, numComps, bitLen); |
4101 | @@ -892,13 +892,13 @@ |
4102 | newcomp += 2; |
4103 | } |
4104 | |
4105 | - ulong newBits; |
4106 | + u_long newBits; |
4107 | uint32_t dummy; |
4108 | uint64_t dummy2; |
4109 | bitsNeeded(newcomp, newBits, dummy, dummy2); |
4110 | |
4111 | - ulong commonBitLen = offsets[numComps-1]; |
4112 | - ulong commonByteLen = (commonBitLen + 7) / 8; |
4113 | + u_long commonBitLen = offsets[numComps-1]; |
4114 | + u_long commonByteLen = (commonBitLen + 7) / 8; |
4115 | |
4116 | bitLen = commonBitLen + newBits; |
4117 | byteLen = (bitLen + 7) / 8; |
4118 | @@ -944,18 +944,18 @@ |
4119 | { |
4120 | assert(sib1 < sib2); |
4121 | |
4122 | - ulong parentByteLen; |
4123 | - ulong parentBitLen = parent.getBitLength(parentByteLen); |
4124 | + u_long parentByteLen; |
4125 | + u_long parentBitLen = parent.getBitLength(parentByteLen); |
4126 | |
4127 | - ulong numComps1 = 0; |
4128 | - ulong bitLen1 = 0; |
4129 | + u_long numComps1 = 0; |
4130 | + u_long bitLen1 = 0; |
4131 | int32_t dewey1[MAX_NUM_COMPS]; |
4132 | - ulong offsets1[MAX_NUM_COMPS]; |
4133 | + u_long offsets1[MAX_NUM_COMPS]; |
4134 | |
4135 | - ulong numComps2 = 0; |
4136 | - ulong bitLen2 = 0; |
4137 | + u_long numComps2 = 0; |
4138 | + u_long bitLen2 = 0; |
4139 | int32_t dewey2[MAX_BYTE_LEN]; |
4140 | - ulong offsets2[MAX_BYTE_LEN]; |
4141 | + u_long offsets2[MAX_BYTE_LEN]; |
4142 | |
4143 | // decompress the last level-comp of sib1 |
4144 | sib1.decompress(parentBitLen, dewey1, offsets1, numComps1, bitLen1); |
4145 | @@ -964,7 +964,7 @@ |
4146 | sib2.decompress(parentBitLen, dewey2, offsets2, numComps2, bitLen2); |
4147 | |
4148 | // Within the last level-component, find the 1st pair of differing comps. |
4149 | - ulong compPos = 0; |
4150 | + u_long compPos = 0; |
4151 | while (dewey1[compPos] == dewey2[compPos]) |
4152 | { |
4153 | ++compPos; |
4154 | @@ -992,12 +992,12 @@ |
4155 | << "comp2: " << comp2 << ", " \ |
4156 | << "compPos: " << compPos << "."); |
4157 | |
4158 | - ulong diff = comp2 - comp1; |
4159 | + u_long diff = comp2 - comp1; |
4160 | |
4161 | int32_t newcomp1; |
4162 | int32_t newcomp2 = 0; |
4163 | - ulong commonBitLen; |
4164 | - ulong newBits; |
4165 | + u_long commonBitLen; |
4166 | + u_long newBits; |
4167 | uint32_t dummy; |
4168 | uint64_t dummy2; |
4169 | |
4170 | @@ -1097,9 +1097,9 @@ |
4171 | ZORBA_ASSERT(0); |
4172 | } |
4173 | |
4174 | - ulong commonByteLen = (commonBitLen + 7) / 8; |
4175 | - ulong bitLen = commonBitLen + newBits; |
4176 | - ulong byteLen = (bitLen + 7) / 8; |
4177 | + u_long commonByteLen = (commonBitLen + 7) / 8; |
4178 | + u_long bitLen = commonBitLen + newBits; |
4179 | + u_long byteLen = (bitLen + 7) / 8; |
4180 | unsigned char* data; |
4181 | |
4182 | bool isLocal = (bitLen <= MAX_EMBEDDED_BIT_LEN); |
4183 | @@ -1165,22 +1165,22 @@ |
4184 | ********************************************************************************/ |
4185 | bool OrdPath::pushComp( |
4186 | unsigned char* data, |
4187 | - ulong maxBitLen, |
4188 | + u_long maxBitLen, |
4189 | int32_t value, |
4190 | - ulong& bitLen) |
4191 | + u_long& bitLen) |
4192 | { |
4193 | assert(maxBitLen >= bitLen); |
4194 | |
4195 | uint32_t eval; |
4196 | uint64_t eval2; |
4197 | - ulong bitsNeeded; |
4198 | + u_long bitsNeeded; |
4199 | |
4200 | OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2); |
4201 | |
4202 | - ulong byteIndex = bitLen / 8; |
4203 | - ulong bitsAvailable = 8 - bitLen % 8; // # bits available in the "current" byte. |
4204 | + u_long byteIndex = bitLen / 8; |
4205 | + u_long bitsAvailable = 8 - bitLen % 8; // # bits available in the "current" byte. |
4206 | |
4207 | - ulong bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8; |
4208 | + u_long bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8; |
4209 | if (bytesNeeded > MAX_BYTE_LEN) |
4210 | { |
4211 | throw ZORBA_EXCEPTION( |
4212 | @@ -1245,11 +1245,11 @@ |
4213 | uint32_t eval; |
4214 | uint64_t eval2; |
4215 | |
4216 | - ulong byteLen; |
4217 | - ulong bitLen; |
4218 | - ulong byteIndex; |
4219 | - ulong bitsAvailable = 0; |
4220 | - ulong bitsNeeded; |
4221 | + u_long byteLen; |
4222 | + u_long bitLen; |
4223 | + u_long byteIndex; |
4224 | + u_long bitsAvailable = 0; |
4225 | + u_long bitsNeeded; |
4226 | unsigned char* data; |
4227 | |
4228 | bool isLocal = this->isLocal(); |
4229 | @@ -1261,7 +1261,7 @@ |
4230 | |
4231 | OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2); |
4232 | |
4233 | - ulong bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8; |
4234 | + u_long bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8; |
4235 | if (bytesNeeded > MAX_BYTE_LEN) |
4236 | { |
4237 | throw ZORBA_EXCEPTION( |
4238 | @@ -1356,15 +1356,15 @@ |
4239 | ********************************************************************************/ |
4240 | void OrdPath::appendEncodedComp( |
4241 | uint32_t eval, |
4242 | - ulong bitsNeeded, |
4243 | - ulong byteIndex, |
4244 | - ulong bitsAvailable, |
4245 | + u_long bitsNeeded, |
4246 | + u_long byteIndex, |
4247 | + u_long bitsAvailable, |
4248 | unsigned char* data) |
4249 | { |
4250 | do |
4251 | { |
4252 | // Number of bits to consume in the current iteration |
4253 | - ulong bitsToUse = (bitsNeeded < bitsAvailable ? |
4254 | + u_long bitsToUse = (bitsNeeded < bitsAvailable ? |
4255 | bitsNeeded : bitsAvailable); |
4256 | |
4257 | unsigned char byte = (unsigned char) |
4258 | @@ -1389,7 +1389,7 @@ |
4259 | ********************************************************************************/ |
4260 | void OrdPath::bitsNeeded( |
4261 | int32_t value, |
4262 | - ulong& bitsNeeded, |
4263 | + u_long& bitsNeeded, |
4264 | uint32_t& eval, |
4265 | uint64_t& eval2) |
4266 | { |
4267 | @@ -1531,7 +1531,7 @@ |
4268 | |
4269 | str << ""; |
4270 | |
4271 | - ulong len; |
4272 | + u_long len; |
4273 | unsigned char* buf = getDataAndLength(len); |
4274 | |
4275 | if (len == 0) |
4276 | @@ -1542,7 +1542,7 @@ |
4277 | if (local && len == MAX_EMBEDDED_BYTE_LEN) |
4278 | buf[MAX_EMBEDDED_BYTE] &= 0xFE; |
4279 | |
4280 | - for (ulong i = 0; i < len; ++i) |
4281 | + for (u_long i = 0; i < len; ++i) |
4282 | { |
4283 | // bugfix: Add a leading 0 if one-digit |
4284 | // Each output should always be two-digit |
4285 | @@ -1579,13 +1579,13 @@ |
4286 | |
4287 | str << ""; |
4288 | |
4289 | - ulong len; |
4290 | + u_long len; |
4291 | unsigned char* buf = getDataAndLength(len); |
4292 | |
4293 | if (len == 0) |
4294 | return str.str().c_str(); |
4295 | |
4296 | - for (ulong i = 0; i < len; i++) |
4297 | + for (u_long i = 0; i < len; i++) |
4298 | { |
4299 | // bugfix Add a leading 0 if one-digit |
4300 | // Each output should always be two-digit |
4301 | @@ -1596,14 +1596,14 @@ |
4302 | |
4303 | str << " "; |
4304 | |
4305 | - ulong numComps = 0; |
4306 | - ulong bitSize = 0; |
4307 | + u_long numComps = 0; |
4308 | + u_long bitSize = 0; |
4309 | int32_t deweyid[MAX_NUM_COMPS]; |
4310 | - ulong offsets[MAX_NUM_COMPS]; |
4311 | + u_long offsets[MAX_NUM_COMPS]; |
4312 | |
4313 | decompress(0, deweyid, offsets, numComps, bitSize); |
4314 | |
4315 | - for (ulong i = 0; i < numComps; ++i) |
4316 | + for (u_long i = 0; i < numComps; ++i) |
4317 | { |
4318 | str << std::dec << deweyid[i]; |
4319 | if (i < numComps-1) |
4320 | @@ -1617,18 +1617,18 @@ |
4321 | /******************************************************************************* |
4322 | |
4323 | ********************************************************************************/ |
4324 | -ulong OrdPath::getLevel() const |
4325 | +u_long OrdPath::getLevel() const |
4326 | { |
4327 | int32_t dewey[MAX_NUM_COMPS]; |
4328 | - ulong offsets[MAX_NUM_COMPS]; |
4329 | - ulong numComps = 0; |
4330 | - ulong bitLen = 0; |
4331 | + u_long offsets[MAX_NUM_COMPS]; |
4332 | + u_long numComps = 0; |
4333 | + u_long bitLen = 0; |
4334 | |
4335 | decompress(0, dewey, offsets, numComps, bitLen); |
4336 | |
4337 | - ulong level = 0; |
4338 | + u_long level = 0; |
4339 | |
4340 | - for (ulong i = 0; i < numComps; ++i) |
4341 | + for (u_long i = 0; i < numComps; ++i) |
4342 | { |
4343 | if (dewey[i] % 2 == 1) |
4344 | ++level; |
4345 | @@ -1644,18 +1644,18 @@ |
4346 | the start of some component). |
4347 | ********************************************************************************/ |
4348 | void OrdPath::decompress( |
4349 | - ulong startOffset, |
4350 | + u_long startOffset, |
4351 | int32_t* deweyid, |
4352 | - ulong* compOffsets, |
4353 | - ulong& numComps, |
4354 | - ulong& bitLen) const |
4355 | + u_long* compOffsets, |
4356 | + u_long& numComps, |
4357 | + u_long& bitLen) const |
4358 | { |
4359 | unsigned char tmpbuf[MAX_EMBEDDED_BYTE_LEN]; |
4360 | |
4361 | - ulong byteIndex = startOffset / 8; |
4362 | - ulong bitIndex = startOffset % 8; |
4363 | + u_long byteIndex = startOffset / 8; |
4364 | + u_long bitIndex = startOffset % 8; |
4365 | |
4366 | - ulong byteLen; |
4367 | + u_long byteLen; |
4368 | unsigned char* data; |
4369 | bool isLocal = this->isLocal(); |
4370 | |
4371 | @@ -1713,13 +1713,13 @@ |
4372 | ********************************************************************************/ |
4373 | void OrdPath::decodeByte( |
4374 | unsigned char* data, |
4375 | - ulong& bitLen, |
4376 | - ulong& byteIndex, |
4377 | - ulong& bitIndex, |
4378 | + u_long& bitLen, |
4379 | + u_long& byteIndex, |
4380 | + u_long& bitIndex, |
4381 | unsigned char byte, |
4382 | int32_t* deweyid, |
4383 | - ulong* compOffsets, |
4384 | - ulong& numComps) |
4385 | + u_long* compOffsets, |
4386 | + u_long& numComps) |
4387 | { |
4388 | compOffsets[numComps] = bitLen; |
4389 | |
4390 | @@ -4092,10 +4092,10 @@ |
4391 | ********************************************************************************/ |
4392 | void OrdPath::extractValue( |
4393 | unsigned char* data, |
4394 | - ulong& bitLen, |
4395 | - ulong& byteIndex, |
4396 | - ulong& bitIndex, |
4397 | - ulong numBits, |
4398 | + u_long& bitLen, |
4399 | + u_long& byteIndex, |
4400 | + u_long& bitIndex, |
4401 | + u_long numBits, |
4402 | int32_t baseValue, |
4403 | int32_t& result) |
4404 | { |
4405 | @@ -4117,9 +4117,9 @@ |
4406 | numBits -= (8 - bitIndex); |
4407 | byteIndex++; |
4408 | |
4409 | - ulong numBytes = numBits / 8; |
4410 | + u_long numBytes = numBits / 8; |
4411 | |
4412 | - for (ulong i = 0; i < numBytes; ++i) |
4413 | + for (u_long i = 0; i < numBytes; ++i) |
4414 | { |
4415 | result <<= 8; |
4416 | result |= data[byteIndex]; |
4417 | @@ -4180,7 +4180,7 @@ |
4418 | /******************************************************************************* |
4419 | |
4420 | ********************************************************************************/ |
4421 | -ulong OrdPathStack::getByteLength() const |
4422 | +u_long OrdPathStack::getByteLength() const |
4423 | { |
4424 | return theByteIndex + 1; |
4425 | } |
4426 | @@ -4246,8 +4246,8 @@ |
4427 | theDeweyId[theNumComps - 1] += 2; |
4428 | |
4429 | // Pop the last 2 compressed components |
4430 | - ulong numBits = theCompLens[theNumComps] + theCompLens[theNumComps-1]; |
4431 | - ulong numBytes = (numBits + theBitsAvailable) / 8; |
4432 | + u_long numBits = theCompLens[theNumComps] + theCompLens[theNumComps-1]; |
4433 | + u_long numBytes = (numBits + theBitsAvailable) / 8; |
4434 | theByteIndex -= numBytes; |
4435 | theBitsAvailable = (numBits + theBitsAvailable) % 8; |
4436 | |
4437 | @@ -4280,8 +4280,8 @@ |
4438 | theDeweyId[theNumComps - 1] += 2; |
4439 | |
4440 | // Pop the last compressed component |
4441 | - ulong numBits = theCompLens[theNumComps-1]; |
4442 | - ulong numBytes = (numBits + theBitsAvailable) / 8; |
4443 | + u_long numBits = theCompLens[theNumComps-1]; |
4444 | + u_long numBytes = (numBits + theBitsAvailable) / 8; |
4445 | theByteIndex -= numBytes; |
4446 | theBitsAvailable = (numBits + theBitsAvailable) % 8; |
4447 | |
4448 | @@ -4298,11 +4298,11 @@ |
4449 | /******************************************************************************* |
4450 | |
4451 | ********************************************************************************/ |
4452 | -void OrdPathStack::compressComp(ulong comp, int32_t value) |
4453 | +void OrdPathStack::compressComp(u_long comp, int32_t value) |
4454 | { |
4455 | uint32_t eval; |
4456 | bool overflow = false; |
4457 | - ulong bitsNeeded; |
4458 | + u_long bitsNeeded; |
4459 | |
4460 | if (value < 0) |
4461 | { |
4462 | @@ -4361,7 +4361,7 @@ |
4463 | } |
4464 | } |
4465 | |
4466 | - ulong bytesNeeded = theByteIndex + |
4467 | + u_long bytesNeeded = theByteIndex + |
4468 | (bitsNeeded + 15 - theBitsAvailable) / 8; |
4469 | |
4470 | if (bytesNeeded > OrdPath::MAX_BYTE_LEN) |
4471 | @@ -4398,7 +4398,7 @@ |
4472 | |
4473 | do |
4474 | { |
4475 | - ulong bitsUsed = (bitsNeeded < theBitsAvailable ? |
4476 | + u_long bitsUsed = (bitsNeeded < theBitsAvailable ? |
4477 | bitsNeeded : theBitsAvailable); |
4478 | |
4479 | unsigned char byte = (unsigned char) |
4480 | @@ -4428,7 +4428,7 @@ |
4481 | { |
4482 | std::stringstream str; |
4483 | |
4484 | - for (ulong i = 0; i < theNumComps; i++) |
4485 | + for (u_long i = 0; i < theNumComps; i++) |
4486 | { |
4487 | str << theDeweyId[i]; |
4488 | if (i < theNumComps-1) |
4489 | @@ -4437,9 +4437,9 @@ |
4490 | #if 1 |
4491 | str << " "; |
4492 | |
4493 | - ulong len = getByteLength(); |
4494 | + u_long len = getByteLength(); |
4495 | |
4496 | - for (ulong i = 0; i < len; i++) |
4497 | + for (u_long i = 0; i < len; i++) |
4498 | { |
4499 | str << std::hex << (unsigned short)theBuffer[i] << '|'; |
4500 | } |
4501 | |
4502 | === modified file 'src/store/naive/ordpath.h' |
4503 | --- src/store/naive/ordpath.h 2012-09-19 21:16:15 +0000 |
4504 | +++ src/store/naive/ordpath.h 2012-12-24 23:26:24 +0000 |
4505 | @@ -66,12 +66,12 @@ |
4506 | }; |
4507 | |
4508 | protected: |
4509 | - static const ulong MAX_EMBEDDED_BYTE_LEN = 8; |
4510 | - static const ulong MAX_EMBEDDED_BIT_LEN = MAX_EMBEDDED_BYTE_LEN * 8 - 1; |
4511 | - |
4512 | - static const ulong MAX_EMBEDDED_BYTE = MAX_EMBEDDED_BYTE_LEN - 1; |
4513 | - |
4514 | - static const ulong MAX_NUM_COMPS = MAX_BYTE_LEN * 4; |
4515 | + static const u_long MAX_EMBEDDED_BYTE_LEN = 8; |
4516 | + static const u_long MAX_EMBEDDED_BIT_LEN = MAX_EMBEDDED_BYTE_LEN * 8 - 1; |
4517 | + |
4518 | + static const u_long MAX_EMBEDDED_BYTE = MAX_EMBEDDED_BYTE_LEN - 1; |
4519 | + |
4520 | + static const u_long MAX_NUM_COMPS = MAX_BYTE_LEN * 4; |
4521 | |
4522 | // decompression |
4523 | static const unsigned char theByteMasks[8][2]; |
4524 | @@ -113,21 +113,21 @@ |
4525 | protected: |
4526 | static bool pushComp( |
4527 | unsigned char* buf, |
4528 | - ulong maxBitSize, |
4529 | + u_long maxBitSize, |
4530 | int32_t value, |
4531 | - ulong& bitSize); |
4532 | + u_long& bitSize); |
4533 | |
4534 | static void bitsNeeded( |
4535 | int32_t value, |
4536 | - ulong& bitsNeeded, |
4537 | + u_long& bitsNeeded, |
4538 | uint32_t& eval, |
4539 | uint64_t& eval2); |
4540 | |
4541 | static void appendEncodedComp( |
4542 | uint32_t eval, |
4543 | - ulong bitsNeeded, |
4544 | - ulong byteIndex, |
4545 | - ulong bitsAvailable, |
4546 | + u_long bitsNeeded, |
4547 | + u_long byteIndex, |
4548 | + u_long bitsAvailable, |
4549 | unsigned char* data); |
4550 | |
4551 | static void insertBeforeOrAfter( |
4552 | @@ -138,20 +138,20 @@ |
4553 | |
4554 | static void decodeByte( |
4555 | unsigned char* data, |
4556 | - ulong& bitSize, |
4557 | - ulong& byteIndex, |
4558 | - ulong& bitIndex, |
4559 | + u_long& bitSize, |
4560 | + u_long& byteIndex, |
4561 | + u_long& bitIndex, |
4562 | unsigned char byte, |
4563 | int32_t* deweyid, |
4564 | - ulong* compOffsets, |
4565 | - ulong& numComps); |
4566 | + u_long* compOffsets, |
4567 | + u_long& numComps); |
4568 | |
4569 | static void extractValue( |
4570 | unsigned char* data, |
4571 | - ulong& bitLen, |
4572 | - ulong& byteIndex, |
4573 | - ulong& bitIndex, |
4574 | - ulong numBits, |
4575 | + u_long& bitLen, |
4576 | + u_long& byteIndex, |
4577 | + u_long& bitIndex, |
4578 | + u_long numBits, |
4579 | int32_t baseValue, |
4580 | int32_t& result); |
4581 | |
4582 | @@ -165,7 +165,7 @@ |
4583 | |
4584 | OrdPath( |
4585 | const unsigned char* buf, |
4586 | - ulong byteLen, |
4587 | + u_long byteLen, |
4588 | bool isBinary = false); |
4589 | |
4590 | ~OrdPath() |
4591 | @@ -174,9 +174,9 @@ |
4592 | delete [] getRemoteBuffer(); |
4593 | } |
4594 | |
4595 | - void initFromData(const unsigned char* buf, ulong byteLen); |
4596 | + void initFromData(const unsigned char* buf, u_long byteLen); |
4597 | |
4598 | - void initFromString(const unsigned char* buf, ulong byteLen); |
4599 | + void initFromString(const unsigned char* buf, u_long byteLen); |
4600 | |
4601 | bool isValid() const { return getByteLength() != 0; } |
4602 | |
4603 | @@ -197,7 +197,7 @@ |
4604 | |
4605 | RelativePosition getRelativePosition2(const OrdPath& other) const; |
4606 | |
4607 | - ulong getLevel() const; |
4608 | + u_long getLevel() const; |
4609 | |
4610 | void compress(const DeweyID& dewey); |
4611 | |
4612 | @@ -239,7 +239,7 @@ |
4613 | } |
4614 | |
4615 | |
4616 | - void initRemote(ulong byteLen) |
4617 | + void initRemote(u_long byteLen) |
4618 | { |
4619 | if (!isLocal()) |
4620 | delete [] getRemoteBuffer(); |
4621 | @@ -252,7 +252,7 @@ |
4622 | } |
4623 | |
4624 | |
4625 | - unsigned char* getDataAndLength(ulong& len) const |
4626 | + unsigned char* getDataAndLength(u_long& len) const |
4627 | { |
4628 | if (isLocal()) |
4629 | { |
4630 | @@ -286,13 +286,13 @@ |
4631 | } |
4632 | |
4633 | |
4634 | - ulong getByteLength() const |
4635 | + u_long getByteLength() const |
4636 | { |
4637 | return (isLocal() ? getLocalByteLength() : getRemoteByteLength()); |
4638 | } |
4639 | |
4640 | |
4641 | - ulong getLocalByteLength() const |
4642 | + u_long getLocalByteLength() const |
4643 | { |
4644 | if (theBuffer.local[MAX_EMBEDDED_BYTE] != 1) |
4645 | return MAX_EMBEDDED_BYTE_LEN; |
4646 | @@ -307,31 +307,31 @@ |
4647 | } |
4648 | |
4649 | |
4650 | - ulong getRemoteByteLength() const |
4651 | + u_long getRemoteByteLength() const |
4652 | { |
4653 | return getRemoteBuffer()[0]; |
4654 | } |
4655 | |
4656 | |
4657 | - ulong getBitLength(ulong& byteLen) const |
4658 | + u_long getBitLength(u_long& byteLen) const |
4659 | { |
4660 | return (isLocal() ? getLocalBitLength(byteLen) : getRemoteBitLength(byteLen)); |
4661 | } |
4662 | |
4663 | - ulong getLocalBitLength(ulong& byteLen) const; |
4664 | + u_long getLocalBitLength(u_long& byteLen) const; |
4665 | |
4666 | - ulong getRemoteBitLength(ulong& byteLen) const; |
4667 | + u_long getRemoteBitLength(u_long& byteLen) const; |
4668 | |
4669 | bool compressLocal(const DeweyID& dewey); |
4670 | |
4671 | void compressRemote(const DeweyID& dewey); |
4672 | |
4673 | void decompress( |
4674 | - ulong startOffset, |
4675 | + u_long startOffset, |
4676 | int32_t* deweyid, |
4677 | - ulong* compOffsets, |
4678 | - ulong& numComps, |
4679 | - ulong& bitSize) const; |
4680 | + u_long* compOffsets, |
4681 | + u_long& numComps, |
4682 | + u_long& bitSize) const; |
4683 | }; |
4684 | |
4685 | |
4686 | @@ -351,15 +351,15 @@ |
4687 | friend class OrdPath; |
4688 | |
4689 | protected: |
4690 | - ulong theNumComps; |
4691 | + u_long theNumComps; |
4692 | |
4693 | int32_t theDeweyId[OrdPath::MAX_NUM_COMPS]; |
4694 | |
4695 | unsigned char theCompLens[OrdPath::MAX_NUM_COMPS]; |
4696 | |
4697 | unsigned char theBuffer[OrdPath::MAX_BYTE_LEN]; |
4698 | - ulong theByteIndex; |
4699 | - ulong theBitsAvailable; |
4700 | + u_long theByteIndex; |
4701 | + u_long theBitsAvailable; |
4702 | |
4703 | public: |
4704 | OrdPathStack(); |
4705 | @@ -368,9 +368,9 @@ |
4706 | |
4707 | void init(); |
4708 | |
4709 | - ulong getNumComps() const { return theNumComps; } |
4710 | + u_long getNumComps() const { return theNumComps; } |
4711 | |
4712 | - ulong getByteLength() const; |
4713 | + u_long getByteLength() const; |
4714 | |
4715 | void pushChild(); |
4716 | void popChild(); |
4717 | @@ -382,7 +382,7 @@ |
4718 | OrdPathStack(const OrdPathStack& other); |
4719 | OrdPathStack& operator=(const OrdPathStack& other); |
4720 | |
4721 | - void compressComp(ulong comp, int32_t value); |
4722 | + void compressComp(u_long comp, int32_t value); |
4723 | }; |
4724 | |
4725 | |
4726 | |
4727 | === modified file 'src/store/naive/pul_primitives.h' |
4728 | --- src/store/naive/pul_primitives.h 2012-12-10 16:02:05 +0000 |
4729 | +++ src/store/naive/pul_primitives.h 2012-12-24 23:26:24 +0000 |
4730 | @@ -262,7 +262,7 @@ |
4731 | protected: |
4732 | std::vector<store::Item_t> theNewAttrs; |
4733 | |
4734 | - ulong theNumApplied; |
4735 | + u_long theNumApplied; |
4736 | std::vector<store::Item*> theNewBindings; |
4737 | |
4738 | UpdInsertAttributes( |
4739 | @@ -297,9 +297,9 @@ |
4740 | store::Item_t theAttr; |
4741 | std::vector<store::Item_t> theNewAttrs; |
4742 | |
4743 | - ulong theNumApplied; |
4744 | + u_long theNumApplied; |
4745 | std::vector<store::Item*> theNewBindings; |
4746 | - ulong thePos; |
4747 | + u_long thePos; |
4748 | |
4749 | UpdReplaceAttribute( |
4750 | CollectionPul* pul, |
4751 | @@ -335,7 +335,7 @@ |
4752 | store::Item_t theChild; |
4753 | std::vector<store::Item_t> theNewChildren; |
4754 | |
4755 | - ulong theNumApplied; |
4756 | + u_long theNumApplied; |
4757 | |
4758 | csize thePos; |
4759 | |
4760 | @@ -535,7 +535,7 @@ |
4761 | zstring theNewContent; |
4762 | |
4763 | store::Item_t theOldNode; |
4764 | - ulong theOldPos; |
4765 | + u_long theOldPos; |
4766 | TextNodeContent theOldContent; |
4767 | bool theIsTyped; |
4768 | |
4769 | @@ -930,7 +930,7 @@ |
4770 | |
4771 | csize numNodes() const { return theNodes.size(); } |
4772 | |
4773 | - store::Item* getNode(ulong i) const { return theNodes[i].getp(); } |
4774 | + store::Item* getNode(u_long i) const { return theNodes[i].getp(); } |
4775 | |
4776 | bool dynamicCollection() const { return theIsDynamic; } |
4777 | }; |
4778 | @@ -1012,7 +1012,7 @@ |
4779 | friend class PULPrimitiveFactory; |
4780 | |
4781 | protected: |
4782 | - ulong theNumApplied; |
4783 | + u_long theNumApplied; |
4784 | |
4785 | UpdInsertIntoCollection( |
4786 | CollectionPul* pul, |
4787 | @@ -1045,7 +1045,7 @@ |
4788 | friend class PULPrimitiveFactory; |
4789 | |
4790 | protected: |
4791 | - ulong theNumApplied; |
4792 | + u_long theNumApplied; |
4793 | |
4794 | UpdInsertFirstIntoCollection( |
4795 | CollectionPul* pul, |
4796 | @@ -1078,7 +1078,7 @@ |
4797 | friend class PULPrimitiveFactory; |
4798 | |
4799 | protected: |
4800 | - ulong theNumApplied; |
4801 | + u_long theNumApplied; |
4802 | |
4803 | UpdInsertLastIntoCollection( |
4804 | CollectionPul* pul, |
4805 | @@ -1181,7 +1181,7 @@ |
4806 | protected: |
4807 | bool theIsLast; |
4808 | |
4809 | - ulong theNumApplied; |
4810 | + u_long theNumApplied; |
4811 | std::vector<bool> theFound; |
4812 | std::vector<xs_integer> thePositions; |
4813 | |
4814 | |
4815 | === modified file 'src/store/naive/qname_pool.cpp' |
4816 | --- src/store/naive/qname_pool.cpp 2012-09-19 21:16:15 +0000 |
4817 | +++ src/store/naive/qname_pool.cpp 2012-12-24 23:26:24 +0000 |
4818 | @@ -35,7 +35,7 @@ |
4819 | /******************************************************************************* |
4820 | |
4821 | ********************************************************************************/ |
4822 | -QNamePool::QNamePool(ulong size, StringPool* nspool) |
4823 | +QNamePool::QNamePool(u_long size, StringPool* nspool) |
4824 | : |
4825 | theCache(new QNameItem[size]), |
4826 | theCacheSize(size), |
4827 | @@ -260,7 +260,7 @@ |
4828 | zstring pooledNs; |
4829 | theNamespacePool->insertc(ns, pooledNs); |
4830 | |
4831 | - ulong hval = hashfun::h32(pre, hashfun::h32(ln, hashfun::h32(ns))); |
4832 | + u_long hval = hashfun::h32(pre, hashfun::h32(ln, hashfun::h32(ns))); |
4833 | |
4834 | try |
4835 | { |
4836 | @@ -347,7 +347,7 @@ |
4837 | zstring pooledNs; |
4838 | theNamespacePool->insert(ns, pooledNs); |
4839 | |
4840 | - ulong hval = hashfun::h32(pre.c_str(), |
4841 | + u_long hval = hashfun::h32(pre.c_str(), |
4842 | hashfun::h32(ln.c_str(), |
4843 | hashfun::h32(ns.c_str()))); |
4844 | try |
4845 | @@ -437,7 +437,7 @@ |
4846 | |
4847 | if (qn->isValid()) |
4848 | { |
4849 | - ulong hval = CompareFunction::hash(qn); |
4850 | + u_long hval = CompareFunction::hash(qn); |
4851 | theHashSet.eraseNoSync(qn, hval); |
4852 | qn->invalidate(true, &normVictim); |
4853 | } |
4854 | |
4855 | === modified file 'src/store/naive/qname_pool.h' |
4856 | --- src/store/naive/qname_pool.h 2012-09-19 21:16:15 +0000 |
4857 | +++ src/store/naive/qname_pool.h 2012-12-24 23:26:24 +0000 |
4858 | @@ -87,7 +87,7 @@ |
4859 | friend class QNamePool; |
4860 | |
4861 | public: |
4862 | - QNamePoolHashSet(ulong size) |
4863 | + QNamePoolHashSet(u_long size) |
4864 | : |
4865 | HashSet<QNameItem*, CompareFunction>(size, true) |
4866 | { |
4867 | @@ -98,20 +98,20 @@ |
4868 | typedef HashEntry<QNameItem*, DummyHashValue> QNHashEntry; |
4869 | |
4870 | public: |
4871 | - static const ulong MAX_CACHE_SIZE = 32768; |
4872 | + static const u_long MAX_CACHE_SIZE = 32768; |
4873 | |
4874 | protected: |
4875 | QNameItem * theCache; |
4876 | - ulong theCacheSize; |
4877 | - ulong theFirstFree; |
4878 | - ulong theNumFree; |
4879 | + u_long theCacheSize; |
4880 | + u_long theFirstFree; |
4881 | + u_long theNumFree; |
4882 | |
4883 | QNamePoolHashSet theHashSet; |
4884 | |
4885 | StringPool * theNamespacePool; |
4886 | |
4887 | public: |
4888 | - QNamePool(ulong size, StringPool* nspool); |
4889 | + QNamePool(u_long size, StringPool* nspool); |
4890 | |
4891 | ~QNamePool(); |
4892 | |
4893 | |
4894 | === modified file 'src/store/naive/query_context.h' |
4895 | --- src/store/naive/query_context.h 2012-09-19 21:16:15 +0000 |
4896 | +++ src/store/naive/query_context.h 2012-12-24 23:26:24 +0000 |
4897 | @@ -76,13 +76,13 @@ |
4898 | class QueryContextContainer |
4899 | { |
4900 | protected: |
4901 | - std::map<ulong, QueryContext> theContainer; |
4902 | + std::map<u_long, QueryContext> theContainer; |
4903 | SYNC_CODE(Mutex theMutex;) |
4904 | |
4905 | public: |
4906 | - QueryContext& getContext(ulong queryId); |
4907 | + QueryContext& getContext(u_long queryId); |
4908 | |
4909 | - void removeContext(ulong queryId); |
4910 | + void removeContext(u_long queryId); |
4911 | }; |
4912 | |
4913 | |
4914 | |
4915 | === modified file 'src/store/naive/simple_collection.h' |
4916 | --- src/store/naive/simple_collection.h 2012-12-05 14:51:50 +0000 |
4917 | +++ src/store/naive/simple_collection.h 2012-12-24 23:26:24 +0000 |
4918 | @@ -72,7 +72,7 @@ |
4919 | |
4920 | |
4921 | protected: |
4922 | - ulong theId; |
4923 | + u_long theId; |
4924 | store::Item_t theName; |
4925 | checked_vector<store::Item_t> theXmlTrees; |
4926 | bool theIsDynamic; |
4927 | @@ -101,7 +101,7 @@ |
4928 | /********************** All these methods implement the ********************** |
4929 | ***************** zorba::simplestore::Collection interface ******************/ |
4930 | |
4931 | - ulong getId() const { return theId; } |
4932 | + u_long getId() const { return theId; } |
4933 | |
4934 | const store::Item* getName() const { return theName.getp(); } |
4935 | |
4936 | |
4937 | === modified file 'src/store/naive/simple_collection_set.cpp' |
4938 | --- src/store/naive/simple_collection_set.cpp 2012-09-19 21:16:15 +0000 |
4939 | +++ src/store/naive/simple_collection_set.cpp 2012-12-24 23:26:24 +0000 |
4940 | @@ -93,7 +93,7 @@ |
4941 | /******************************************************************************* |
4942 | |
4943 | ********************************************************************************/ |
4944 | -const ulong SimpleCollectionSet::DEFAULT_COLLECTION_MAP_SIZE = 32; |
4945 | +const u_long SimpleCollectionSet::DEFAULT_COLLECTION_MAP_SIZE = 32; |
4946 | |
4947 | |
4948 | SimpleCollectionSet::SimpleCollectionSet() |
4949 | |
4950 | === modified file 'src/store/naive/simple_collection_set.h' |
4951 | --- src/store/naive/simple_collection_set.h 2012-09-19 21:16:15 +0000 |
4952 | +++ src/store/naive/simple_collection_set.h 2012-12-24 23:26:24 +0000 |
4953 | @@ -36,7 +36,7 @@ |
4954 | public: |
4955 | ITEM_PTR_HASH_MAP(zorba::store::Collection_t, Set); |
4956 | |
4957 | - static const ulong DEFAULT_COLLECTION_MAP_SIZE; |
4958 | + static const u_long DEFAULT_COLLECTION_MAP_SIZE; |
4959 | |
4960 | protected: |
4961 | Set theCollections; |
4962 | |
4963 | === modified file 'src/store/naive/simple_index.cpp' |
4964 | --- src/store/naive/simple_index.cpp 2012-09-19 21:16:15 +0000 |
4965 | +++ src/store/naive/simple_index.cpp 2012-12-24 23:26:24 +0000 |
4966 | @@ -422,11 +422,11 @@ |
4967 | ********************************************************************************/ |
4968 | bool IndexPointCondition::test(const store::IndexKey& key) const |
4969 | { |
4970 | - ulong numCols = theKey.size(); |
4971 | + u_long numCols = theKey.size(); |
4972 | |
4973 | ZORBA_ASSERT(numCols == theIndex->getNumColumns()); |
4974 | |
4975 | - for (ulong i = 0; i < numCols; i++) |
4976 | + for (u_long i = 0; i < numCols; i++) |
4977 | { |
4978 | if (! theKey[i]->equals(key[i], |
4979 | theIndex->getSpecification().theTimezone, |
4980 | @@ -488,7 +488,7 @@ |
4981 | bool lowerIncl, |
4982 | bool upperIncl) |
4983 | { |
4984 | - ulong size = theLowerBounds.size(); |
4985 | + u_long size = theLowerBounds.size(); |
4986 | theLowerBounds.resize(size + 1); |
4987 | theUpperBounds.resize(size + 1); |
4988 | theRangeFlags.resize(size + 1); |
4989 | @@ -507,13 +507,13 @@ |
4990 | ********************************************************************************/ |
4991 | bool IndexBoxValueCondition::test(const store::IndexKey& key) const |
4992 | { |
4993 | - ulong numCols = theLowerBounds.size(); |
4994 | + u_long numCols = theLowerBounds.size(); |
4995 | |
4996 | ZORBA_ASSERT(numCols <= theIndex->getNumColumns()); |
4997 | |
4998 | long timezone = theIndex->getSpecification().theTimezone; |
4999 | |
5000 | - for (ulong i = 0; i < numCols; i++) |
The diff has been truncated for viewing.
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ llvm-2012- 12-24T08- 58-46.681Z/ log.html
Log at: http://