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