Merge lp:~zorba-coders/zorba/llvm into lp:zorba

Proposed by William Candillon
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
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_FILE_ACCESS=OFF

Description of the change

Fix build with the following options:
- ZORBA_NO_ICU
- ZORBA_NO_XMLSCHEMA
- ZORBA_NO_FULLTEXT
- ZORBA_WITH_FILE_ACCESS=OFF

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-12-24T08-58-46.681Z is finished. The final status was:

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
=== modified file 'CMakeCompiler.txt'
--- CMakeCompiler.txt 2012-09-19 21:16:15 +0000
+++ CMakeCompiler.txt 2012-12-24 23:26:24 +0000
@@ -257,8 +257,10 @@
257 MESSAGE (FATAL_ERROR "Could not find libuuid - required on Linux!")257 MESSAGE (FATAL_ERROR "Could not find libuuid - required on Linux!")
258 ENDIF (NOT LIBUUID_EXISTS)258 ENDIF (NOT LIBUUID_EXISTS)
259ELSE (APPLE)259ELSE (APPLE)
260 # We're not Apple or Win32, and we didn't find uuid.h - can't compile260 IF(NOT EMSCRIPTEN)
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
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 "
263 "look for similar packages on other platforms.")263 "required on Linux. On Ubuntu, the 'uuid-dev' package is required; "
264 "look for similar packages on other platforms.")
265 ENDIF(NOT EMSCRIPTEN)
264ENDIF (APPLE)266ENDIF (APPLE)
265267
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-10-08 12:09:36 +0000
+++ CMakeLists.txt 2012-12-24 23:26:24 +0000
@@ -95,11 +95,11 @@
95CHECK_INCLUDE_FILES ("limits.h" ZORBA_HAVE_LIMITS_H)95CHECK_INCLUDE_FILES ("limits.h" ZORBA_HAVE_LIMITS_H)
96CHECK_INCLUDE_FILES ("sys/types.h" ZORBA_HAVE_SYS_TYPES_H)96CHECK_INCLUDE_FILES ("sys/types.h" ZORBA_HAVE_SYS_TYPES_H)
97CHECK_INCLUDE_FILES ("iconv.h" ZORBA_HAVE_ICONV_H)97CHECK_INCLUDE_FILES ("iconv.h" ZORBA_HAVE_ICONV_H)
98IF (NOT APPLE OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.4")98IF (NOT APPLE OR CMAKE_SYSTEM_VERSION VERSION_GREATER "10.4")
99 # execinfo is found by this macro when cross compiling for Mac OS X 10.499 # execinfo is found by this macro when cross compiling for Mac OS X 10.4
100 # although it shouldn't be found for this platform100 # although it shouldn't be found for this platform
101 CHECK_INCLUDE_FILES ("execinfo.h" ZORBA_HAVE_EXECINFO_H)101 CHECK_INCLUDE_FILES ("execinfo.h" ZORBA_HAVE_EXECINFO_H)
102ENDIF (NOT APPLE OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "10.4")102ENDIF (NOT APPLE OR CMAKE_SYSTEM_VERSION VERSION_GREATER "10.4")
103CHECK_INCLUDE_FILE_CXX ("FlexLexer.h" ZORBA_HAVE_FLEXLEXER_H)103CHECK_INCLUDE_FILE_CXX ("FlexLexer.h" ZORBA_HAVE_FLEXLEXER_H)
104CHECK_INCLUDE_FILES ("uuid/uuid.h" ZORBA_HAVE_UUID_H)104CHECK_INCLUDE_FILES ("uuid/uuid.h" ZORBA_HAVE_UUID_H)
105105
@@ -324,18 +324,20 @@
324#324#
325# ICU325# ICU
326#326#
327MESSAGE(STATUS "Looking for ICU")327IF(NOT ZORBA_NO_ICU)
328FIND_PACKAGE(ICU)328 MESSAGE(STATUS "Looking for ICU")
329 FIND_PACKAGE(ICU)
330
331 IF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)
332 MESSAGE(STATUS "Found ICU library -- " ${ICU_LIBRARIES})
329 333
330IF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)334 INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS})
331 MESSAGE(STATUS "Found ICU library -- " ${ICU_LIBRARIES})335 SET(requiredlibs ${requiredlibs} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES} ${ICU_DATA_LIBRARIES})
332336 ELSE(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)
333 INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS})337 MESSAGE(FATAL_ERROR "The ICU library is required in order to build Zorba.")
334 SET(requiredlibs ${requiredlibs} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES} ${ICU_DATA_LIBRARIES}) 338 ENDIF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)
335ELSE(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)339 MESSAGE(STATUS "")
336 MESSAGE(FATAL_ERROR "The ICU library is required in order to build Zorba.")340ENDIF(NOT ZORBA_NO_ICU)
337ENDIF(ICU_FOUND AND ICU_I18N_FOUND AND ICU_DATA_FOUND)
338MESSAGE(STATUS "")
339341
340#342#
341# Xerces-C part 1 - finding in default locations343# Xerces-C part 1 - finding in default locations
342344
=== modified file 'bin/zorbacmd.cpp'
--- bin/zorbacmd.cpp 2012-11-06 10:11:37 +0000
+++ bin/zorbacmd.cpp 2012-12-24 23:26:24 +0000
@@ -622,6 +622,7 @@
622void622void
623removeOutputFileIfNeeded(const ZorbaCMDProperties& lProperties)623removeOutputFileIfNeeded(const ZorbaCMDProperties& lProperties)
624{624{
625#ifdef ZORBA_WITH_FILE_ACCESS
625 if (lProperties.outputFile().size() > 0)626 if (lProperties.outputFile().size() > 0)
626 {627 {
627 File_t lFile = zorba::File::createFile(lProperties.outputFile());628 File_t lFile = zorba::File::createFile(lProperties.outputFile());
@@ -630,6 +631,7 @@
630 lFile->remove();631 lFile->remove();
631 }632 }
632 }633 }
634#endif
633}635}
634636
635637
636638
=== modified file 'include/zorba/config.h.cmake'
--- include/zorba/config.h.cmake 2012-09-19 21:16:15 +0000
+++ include/zorba/config.h.cmake 2012-12-24 23:26:24 +0000
@@ -126,7 +126,7 @@
126126
127////////// C++ tr1 include directory & namespace //////////////////////////////127////////// C++ tr1 include directory & namespace //////////////////////////////
128128
129#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 430)129#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 430) && !defined(EMSCRIPTEN)
130# define ZORBA_GCC_OLDER_THAN_430 1130# define ZORBA_GCC_OLDER_THAN_430 1
131#endif131#endif
132132
133133
=== modified file 'src/api/CMakeLists.txt'
--- src/api/CMakeLists.txt 2012-12-05 03:33:46 +0000
+++ src/api/CMakeLists.txt 2012-12-24 23:26:24 +0000
@@ -46,7 +46,6 @@
46 invoke_item_sequence.cpp46 invoke_item_sequence.cpp
47 item_sequence_chainer.cpp47 item_sequence_chainer.cpp
48 empty_sequence.cpp48 empty_sequence.cpp
49 fileimpl.cpp
50 serializerimpl.cpp49 serializerimpl.cpp
51 base64impl.cpp50 base64impl.cpp
52 base64_streambuf.cpp51 base64_streambuf.cpp
@@ -63,6 +62,10 @@
63 uuid.cpp62 uuid.cpp
64 )63 )
6564
65IF (ZORBA_WITH_FILE_ACCESS)
66 LIST(APPEND API_SRCS fileimpl.cpp)
67ENDIF (ZORBA_WITH_FILE_ACCESS)
68
66IF (NOT ZORBA_NO_FULL_TEXT)69IF (NOT ZORBA_NO_FULL_TEXT)
67 LIST(APPEND API_SRCS70 LIST(APPEND API_SRCS
68 stemmer.cpp71 stemmer.cpp
6972
=== modified file 'src/api/dynamiccontextimpl.cpp'
--- src/api/dynamiccontextimpl.cpp 2012-11-28 12:32:38 +0000
+++ src/api/dynamiccontextimpl.cpp 2012-12-24 23:26:24 +0000
@@ -200,7 +200,7 @@
200200
201 VarInfo* var = get_var_info(nameSpace, localName);201 VarInfo* var = get_var_info(nameSpace, localName);
202202
203 ulong varId = var->getId();203 u_long varId = var->getId();
204204
205 store::Item_t item;205 store::Item_t item;
206 store::TempSeq_t tempseq;206 store::TempSeq_t tempseq;
@@ -265,7 +265,7 @@
265 throw;265 throw;
266 }266 }
267267
268 ulong varId = var->getId();268 u_long varId = var->getId();
269269
270 theCtx->add_variable(varId, value);270 theCtx->add_variable(varId, value);
271271
@@ -327,7 +327,7 @@
327 throw;327 throw;
328 }328 }
329329
330 ulong varId = var->getId();330 u_long varId = var->getId();
331331
332 // add it to the internal context332 // add it to the internal context
333 theCtx->add_variable(varId, value);333 theCtx->add_variable(varId, value);
@@ -377,7 +377,7 @@
377 throw;377 throw;
378 }378 }
379379
380 ulong varId = var->getId();380 u_long varId = var->getId();
381381
382 theCtx->add_variable(varId, value);382 theCtx->add_variable(varId, value);
383383
384384
=== modified file 'src/api/serialization/serializer.cpp'
--- src/api/serialization/serializer.cpp 2012-10-15 19:25:46 +0000
+++ src/api/serialization/serializer.cpp 2012-12-24 23:26:24 +0000
@@ -79,14 +79,14 @@
79 const char* str,79 const char* str,
80 zstring::size_type strlen,80 zstring::size_type strlen,
81 const char* separators,81 const char* separators,
82 ulong seplen,82 u_long seplen,
83 std::vector<zstring>& tokens)83 std::vector<zstring>& tokens)
84{84{
85 ulong start = 0;85 u_long start = 0;
8686
87 for (ulong i = 0; i < strlen; ++i)87 for (u_long i = 0; i < strlen; ++i)
88 {88 {
89 for (ulong j = 0; j < seplen; ++j)89 for (u_long j = 0; j < seplen; ++j)
90 {90 {
91 if (str[i] == separators[j])91 if (str[i] == separators[j])
92 {92 {
@@ -129,7 +129,7 @@
129 theIsFirstElementNode(true),129 theIsFirstElementNode(true),
130 theEmitAttributes(aEmitAttributes)130 theEmitAttributes(aEmitAttributes)
131{131{
132 for (ulong i = 0; i < 8; i++)132 for (u_long i = 0; i < 8; i++)
133 theChildIters[i] = GENV_ITERATOR_FACTORY->createChildrenIterator();133 theChildIters[i] = GENV_ITERATOR_FACTORY->createChildrenIterator();
134134
135 theAttrIter = GENV_ITERATOR_FACTORY->createAttributesIterator();135 theAttrIter = GENV_ITERATOR_FACTORY->createAttributesIterator();
@@ -141,8 +141,8 @@
141********************************************************************************/141********************************************************************************/
142serializer::emitter::~emitter()142serializer::emitter::~emitter()
143{143{
144 ulong numIters = (ulong)theChildIters.size();144 u_long numIters = (u_long)theChildIters.size();
145 for (ulong i = 0; i < numIters; i++)145 for (u_long i = 0; i < numIters; i++)
146 delete theChildIters[i];146 delete theChildIters[i];
147147
148 delete theAttrIter;148 delete theAttrIter;
@@ -616,7 +616,7 @@
616 zstring name;616 zstring name;
617 parent->getNodeName()->getStringValue2(name);617 parent->getNodeName()->getStringValue2(name);
618618
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)
620 {620 {
621 if (ser->cdata_section_elements_tokens[i] == name)621 if (ser->cdata_section_elements_tokens[i] == name)
622 {622 {
623623
=== modified file 'src/api/serialization/serializer.h'
--- src/api/serialization/serializer.h 2012-10-08 12:09:36 +0000
+++ src/api/serialization/serializer.h 2012-12-24 23:26:24 +0000
@@ -332,7 +332,7 @@
332 } thePreviousItemKind;332 } thePreviousItemKind;
333333
334 std::vector<store::ChildrenIterator*> theChildIters;334 std::vector<store::ChildrenIterator*> theChildIters;
335 ulong theFirstFreeChildIter;335 u_long theFirstFreeChildIter;
336 store::AttributesIterator * theAttrIter;336 store::AttributesIterator * theAttrIter;
337337
338 bool theIsFirstElementNode;338 bool theIsFirstElementNode;
339339
=== modified file 'src/api/staticcontextimpl.cpp'
--- src/api/staticcontextimpl.cpp 2012-10-10 21:15:05 +0000
+++ src/api/staticcontextimpl.cpp 2012-12-24 23:26:24 +0000
@@ -39,6 +39,7 @@
39#include "api/staticcollectionmanagerimpl.h"39#include "api/staticcollectionmanagerimpl.h"
40#include "api/vectoriterator.h"40#include "api/vectoriterator.h"
4141
42#include "context/dynamic_context.h"
42#include "context/static_context.h"43#include "context/static_context.h"
43#include "context/static_context_consts.h"44#include "context/static_context_consts.h"
44#ifndef ZORBA_NO_FULL_TEXT45#ifndef ZORBA_NO_FULL_TEXT
@@ -59,10 +60,10 @@
59#include "types/typeops.h"60#include "types/typeops.h"
6061
61#include "diagnostics/xquery_diagnostics.h"62#include "diagnostics/xquery_diagnostics.h"
63#include "diagnostics/assert.h"
6264
63#include "runtime/util/flowctl_exception.h"65#include "runtime/util/flowctl_exception.h"
6466
65
66namespace zorba {67namespace zorba {
6768
68/*******************************************************************************69/*******************************************************************************
6970
=== modified file 'src/api/staticcontextimpl.h'
--- src/api/staticcontextimpl.h 2012-10-08 12:09:36 +0000
+++ src/api/staticcontextimpl.h 2012-12-24 23:26:24 +0000
@@ -64,7 +64,7 @@
6464
65 CompilerCB * theCompilerCB;65 CompilerCB * theCompilerCB;
6666
67 ulong theMaxVarId;67 u_long theMaxVarId;
6868
69 DiagnosticHandler * theDiagnosticHandler;69 DiagnosticHandler * theDiagnosticHandler;
70 bool theUserDiagnosticHandler;70 bool theUserDiagnosticHandler;
@@ -84,9 +84,9 @@
8484
85 void loadProlog(const String&, const Zorba_CompilerHints_t& hints);85 void loadProlog(const String&, const Zorba_CompilerHints_t& hints);
8686
87 ulong getMaxVarId() const { return theMaxVarId; }87 u_long getMaxVarId() const { return theMaxVarId; }
8888
89 void setMaxVarId(ulong v) { if (v > theMaxVarId) theMaxVarId = v; }89 void setMaxVarId(u_long v) { if (v > theMaxVarId) theMaxVarId = v; }
9090
91 StaticContext_t createChildContext() const;91 StaticContext_t createChildContext() const;
9292
9393
=== modified file 'src/api/uuid.cpp'
--- src/api/uuid.cpp 2012-10-08 12:09:36 +0000
+++ src/api/uuid.cpp 2012-12-24 23:26:24 +0000
@@ -27,6 +27,8 @@
27# include <uuid/uuid.h>27# include <uuid/uuid.h>
28#elif defined( _WIN32 )28#elif defined( _WIN32 )
29# include <Rpc.h>29# include <Rpc.h>
30#elif defined( EMSCRIPTEN )
31# include <boost/uuid/uuid.hpp>
30#else32#else
31# error "Unsupported operating system for generating UUIDs"33# error "Unsupported operating system for generating UUIDs"
32#endif34#endif
@@ -47,6 +49,9 @@
47 uuid_generate( result->data );49 uuid_generate( result->data );
48#elif defined( _WIN32 )50#elif defined( _WIN32 )
49 UuidCreateSequential( (UUID*)result->data );51 UuidCreateSequential( (UUID*)result->data );
52#elif defined( EMSCRIPTEN )
53 boost::uuids::uuid u;
54 ::memcpy(&u, result->data, sizeof result->data );
50#endif /* _WIN32 */55#endif /* _WIN32 */
51}56}
5257
5358
=== modified file 'src/api/xqueryimpl.cpp'
--- src/api/xqueryimpl.cpp 2012-10-08 12:09:36 +0000
+++ src/api/xqueryimpl.cpp 2012-12-24 23:26:24 +0000
@@ -433,7 +433,7 @@
433433
434 // 0 is reserved as an invalid var id, and 1 is taken by the context item434 // 0 is reserved as an invalid var id, and 1 is taken by the context item
435 // in the main module.435 // in the main module.
436 ulong nextVarId = dynamic_context::MAX_IDVARS_RESERVED;436 u_long nextVarId = dynamic_context::MAX_IDVARS_RESERVED;
437437
438 doCompile(lQueryStream, aHints, true, nextVarId);438 doCompile(lQueryStream, aHints, true, nextVarId);
439 }439 }
@@ -457,7 +457,7 @@
457457
458 // 0 is reserved as an invalid var id, and 1 is taken by the context item458 // 0 is reserved as an invalid var id, and 1 is taken by the context item
459 // in the main module.459 // in the main module.
460 ulong nextVarId = dynamic_context::MAX_IDVARS_RESERVED;460 u_long nextVarId = dynamic_context::MAX_IDVARS_RESERVED;
461461
462 doCompile(aQuery, aHints, true, nextVarId);462 doCompile(aQuery, aHints, true, nextVarId);
463 }463 }
@@ -492,7 +492,7 @@
492 if (externalSctx->theCompilerCB)492 if (externalSctx->theCompilerCB)
493 theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap;493 theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap;
494494
495 ulong nextVarId = externalSctx->getMaxVarId();495 u_long nextVarId = externalSctx->getMaxVarId();
496496
497 std::istringstream lQueryStream(aQuery.c_str());497 std::istringstream lQueryStream(aQuery.c_str());
498498
@@ -535,7 +535,7 @@
535 if (externalSctx->theCompilerCB)535 if (externalSctx->theCompilerCB)
536 theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap;536 theCompilerCB->theSctxMap = externalSctx->theCompilerCB->theSctxMap;
537537
538 ulong nextVarId = externalSctx->getMaxVarId();538 u_long nextVarId = externalSctx->getMaxVarId();
539539
540 doCompile(aQuery, aHints, true, nextVarId);540 doCompile(aQuery, aHints, true, nextVarId);
541 }541 }
@@ -550,7 +550,7 @@
550 std::istream& aQuery,550 std::istream& aQuery,
551 const Zorba_CompilerHints_t& aHints,551 const Zorba_CompilerHints_t& aHints,
552 bool fork_sctx,552 bool fork_sctx,
553 ulong& nextDynamicVarId)553 u_long& nextDynamicVarId)
554{554{
555 if ( ! theStaticContext )555 if ( ! theStaticContext )
556 {556 {
@@ -641,7 +641,7 @@
641641
642 StaticContextImpl* sctx = static_cast<StaticContextImpl*>(aStaticContext.get());642 StaticContextImpl* sctx = static_cast<StaticContextImpl*>(aStaticContext.get());
643643
644 ulong nextVarId = sctx->getMaxVarId();644 u_long nextVarId = sctx->getMaxVarId();
645645
646 doCompile(lQueryStream, aHints, false, nextVarId);646 doCompile(lQueryStream, aHints, false, nextVarId);
647647
@@ -859,7 +859,7 @@
859 if (var->hasInitializer())859 if (var->hasInitializer())
860 return true;860 return true;
861 861
862 ulong varId = var->getId();862 u_long varId = var->getId();
863863
864 if (theDynamicContext->is_set_variable(varId))864 if (theDynamicContext->is_set_variable(varId))
865 return true;865 return true;
866866
=== modified file 'src/api/xqueryimpl.h'
--- src/api/xqueryimpl.h 2012-09-19 21:16:15 +0000
+++ src/api/xqueryimpl.h 2012-12-24 23:26:24 +0000
@@ -357,7 +357,7 @@
357 std::istream&,357 std::istream&,
358 const Zorba_CompilerHints_t& aHints,358 const Zorba_CompilerHints_t& aHints,
359 bool fork_sctx,359 bool fork_sctx,
360 ulong& nextVarId);360 u_long& nextVarId);
361361
362 PlanWrapper_t generateWrapper();362 PlanWrapper_t generateWrapper();
363363
364364
=== modified file 'src/api/zorbaimpl.h'
--- src/api/zorbaimpl.h 2012-09-19 21:16:15 +0000
+++ src/api/zorbaimpl.h 2012-12-24 23:26:24 +0000
@@ -57,7 +57,7 @@
57 friend class Zorba;57 friend class Zorba;
5858
59 SYNC_CODE(Mutex theUsersMutex);59 SYNC_CODE(Mutex theUsersMutex);
60 ulong theNumUsers;60 u_long theNumUsers;
61public:61public:
62#ifdef WIN3262#ifdef WIN32
63 static bool ctrl_c_signaled;63 static bool ctrl_c_signaled;
6464
=== modified file 'src/compiler/api/compiler_api.cpp'
--- src/compiler/api/compiler_api.cpp 2012-12-14 07:27:04 +0000
+++ src/compiler/api/compiler_api.cpp 2012-12-24 23:26:24 +0000
@@ -211,7 +211,7 @@
211PlanIter_t XQueryCompiler::compile(211PlanIter_t XQueryCompiler::compile(
212 std::istream& aXQuery,212 std::istream& aXQuery,
213 const zstring& aFileName,213 const zstring& aFileName,
214 ulong& nextDynamicVarId)214 u_long& nextDynamicVarId)
215{215{
216 audit::Event* ae = theCompilerCB->theRootSctx->get_audit_event();216 audit::Event* ae = theCompilerCB->theRootSctx->get_audit_event();
217 zorba::audit::ScopedRecord sar(ae);217 zorba::audit::ScopedRecord sar(ae);
@@ -248,7 +248,7 @@
248PlanIter_t XQueryCompiler::compile(248PlanIter_t XQueryCompiler::compile(
249 const parsenode_t& ast,249 const parsenode_t& ast,
250 bool applyPUL,250 bool applyPUL,
251 ulong& nextDynamicVarId,251 u_long& nextDynamicVarId,
252 audit::ScopedRecord& aAuditRecord)252 audit::ScopedRecord& aAuditRecord)
253{253{
254 expr* rootExpr;254 expr* rootExpr;
255255
=== modified file 'src/compiler/api/compiler_api.h'
--- src/compiler/api/compiler_api.h 2012-10-08 12:09:36 +0000
+++ src/compiler/api/compiler_api.h 2012-12-24 23:26:24 +0000
@@ -51,12 +51,12 @@
51 PlanIter_t compile(51 PlanIter_t compile(
52 std::istream& aXQuery,52 std::istream& aXQuery,
53 const zstring& aFileName,53 const zstring& aFileName,
54 ulong& nextDynamicVarId);54 u_long& nextDynamicVarId);
5555
56 PlanIter_t compile(56 PlanIter_t compile(
57 const parsenode_t& ast,57 const parsenode_t& ast,
58 bool applyPUL,58 bool applyPUL,
59 ulong& nextDynamicVarId,59 u_long& nextDynamicVarId,
60 audit::ScopedRecord& aAuditRecord);60 audit::ScopedRecord& aAuditRecord);
6161
62protected:62protected:
6363
=== modified file 'src/compiler/codegen/plan_visitor.cpp'
--- src/compiler/codegen/plan_visitor.cpp 2012-12-18 15:09:02 +0000
+++ src/compiler/codegen/plan_visitor.cpp 2012-12-24 23:26:24 +0000
@@ -336,7 +336,7 @@
336 std::stack<EnclosedExprContext> theEnclosedContextStack;336 std::stack<EnclosedExprContext> theEnclosedContextStack;
337 std::stack<bool> theCopyNodesStack;337 std::stack<bool> theCopyNodesStack;
338338
339 ulong theNextDynamicVarId;339 u_long theNextDynamicVarId;
340340
341 hash64map<std::vector<LetVarIter_t> *> * arg_var_iter_map;341 hash64map<std::vector<LetVarIter_t> *> * arg_var_iter_map;
342 hash64map<std::vector<LetVarIter_t> *> catchvar_iter_map;342 hash64map<std::vector<LetVarIter_t> *> catchvar_iter_map;
@@ -358,7 +358,7 @@
358358
359plan_visitor(359plan_visitor(
360 CompilerCB* ccb,360 CompilerCB* ccb,
361 ulong nextDynamicVarId,361 u_long nextDynamicVarId,
362 hash64map<std::vector<LetVarIter_t>*>* arg_var_map = NULL)362 hash64map<std::vector<LetVarIter_t>*>* arg_var_map = NULL)
363 :363 :
364 theDepth(0),364 theDepth(0),
@@ -390,7 +390,7 @@
390}390}
391391
392392
393ulong getNextDynamicVarId() const393u_long getNextDynamicVarId() const
394{394{
395 return theNextDynamicVarId;395 return theNextDynamicVarId;
396}396}
@@ -504,7 +504,7 @@
504{504{
505 CODEGEN_TRACE_OUT("");505 CODEGEN_TRACE_OUT("");
506506
507 ulong numArgs = (ulong)v.get_args().size() + 1;507 u_long numArgs = (u_long)v.get_args().size() + 1;
508508
509 std::vector<PlanIter_t> argIters(numArgs);509 std::vector<PlanIter_t> argIters(numArgs);
510510
@@ -570,10 +570,10 @@
570{570{
571 CODEGEN_TRACE_OUT("");571 CODEGEN_TRACE_OUT("");
572572
573 ulong numArgs = v.size();573 u_long numArgs = v.size();
574 checked_vector<PlanIter_t> args(numArgs);574 checked_vector<PlanIter_t> args(numArgs);
575575
576 for (ulong i = numArgs; i > 0; --i)576 for (u_long i = numArgs; i > 0; --i)
577 {577 {
578 PlanIter_t arg = pop_itstack();578 PlanIter_t arg = pop_itstack();
579 args[i-1] = arg;579 args[i-1] = arg;
@@ -1374,7 +1374,7 @@
1374 wincond_var_iters(1374 wincond_var_iters(
1375 const flwor_wincond* cond,1375 const flwor_wincond* cond,
1376 FlworClauseVarMap* clauseVarMap,1376 FlworClauseVarMap* clauseVarMap,
1377 ulong& varPos)1377 u_long& varPos)
1378 {1378 {
1379 const flwor_wincond::vars& inVars = cond->get_in_vars();1379 const flwor_wincond::vars& inVars = cond->get_in_vars();
1380 const flwor_wincond::vars& outVars = cond->get_out_vars();1380 const flwor_wincond::vars& outVars = cond->get_out_vars();
@@ -1461,7 +1461,7 @@
1461 if (c.get_kind() != flwor_clause::where_clause)1461 if (c.get_kind() != flwor_clause::where_clause)
1462 {1462 {
1463 ZORBA_ASSERT(!theClauseStack.empty());1463 ZORBA_ASSERT(!theClauseStack.empty());
1464 ulong stackSize = (ulong)theClauseStack.size();1464 u_long stackSize = (u_long)theClauseStack.size();
14651465
1466 clauseVarMap = theClauseStack[stackSize-1];1466 clauseVarMap = theClauseStack[stackSize-1];
1467 theClauseStack.resize(stackSize - 1);1467 theClauseStack.resize(stackSize - 1);
@@ -1555,7 +1555,7 @@
1555 std::auto_ptr<flwor::StartClause> start_clause;1555 std::auto_ptr<flwor::StartClause> start_clause;
1556 std::auto_ptr<flwor::EndClause> end_clause;1556 std::auto_ptr<flwor::EndClause> end_clause;
1557 const flwor_wincond* cond;1557 const flwor_wincond* cond;
1558 ulong varPos = 1;1558 u_long varPos = 1;
15591559
1560 if (NULL == (cond = wc->get_win_stop()))1560 if (NULL == (cond = wc->get_win_stop()))
1561 {1561 {
@@ -1616,16 +1616,16 @@
1616 //1616 //
1617 else if (c.get_kind() == flwor_clause::order_clause)1617 else if (c.get_kind() == flwor_clause::order_clause)
1618 {1618 {
1619 ulong numVars = (ulong)clauseVarMap->theVarRebinds.size();1619 u_long numVars = (u_long)clauseVarMap->theVarRebinds.size();
1620 ulong numForVars = 0;1620 u_long numForVars = 0;
1621 ulong numLetVars = 0;1621 u_long numLetVars = 0;
16221622
1623 std::vector<ForVarIter_t> inputForVars(numVars);1623 std::vector<ForVarIter_t> inputForVars(numVars);
1624 std::vector<LetVarIter_t> inputLetVars(numVars);1624 std::vector<LetVarIter_t> inputLetVars(numVars);
1625 std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars);1625 std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars);
1626 std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars);1626 std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars);
16271627
1628 for (ulong i = 0; i < numVars; ++i)1628 for (u_long i = 0; i < numVars; ++i)
1629 {1629 {
1630 VarRebind* varRebind = clauseVarMap->theVarRebinds[i].getp();1630 VarRebind* varRebind = clauseVarMap->theVarRebinds[i].getp();
16311631
@@ -1658,7 +1658,7 @@
1658 outputLetVarsRefs.resize(numLetVars);1658 outputLetVarsRefs.resize(numLetVars);
16591659
1660 const orderby_clause* obc = static_cast<const orderby_clause *>(&c);1660 const orderby_clause* obc = static_cast<const orderby_clause *>(&c);
1661 ulong numColumns = obc->num_columns();1661 u_long numColumns = obc->num_columns();
1662 const std::vector<OrderModifier>& modifiers = obc->get_modifiers();1662 const std::vector<OrderModifier>& modifiers = obc->get_modifiers();
16631663
1664 std::vector<flwor::OrderSpec> orderSpecs(numColumns);1664 std::vector<flwor::OrderSpec> orderSpecs(numColumns);
@@ -1743,16 +1743,16 @@
1743 //1743 //
1744 case flwor_clause::materialize_clause:1744 case flwor_clause::materialize_clause:
1745 {1745 {
1746 ulong numVars = (ulong)clauseVarMap->theVarRebinds.size();1746 u_long numVars = (u_long)clauseVarMap->theVarRebinds.size();
1747 ulong numForVars = 0;1747 u_long numForVars = 0;
1748 ulong numLetVars = 0;1748 u_long numLetVars = 0;
17491749
1750 std::vector<ForVarIter_t> inputForVars(numVars);1750 std::vector<ForVarIter_t> inputForVars(numVars);
1751 std::vector<LetVarIter_t> inputLetVars(numVars);1751 std::vector<LetVarIter_t> inputLetVars(numVars);
1752 std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars);1752 std::vector<std::vector<PlanIter_t> > outputForVarsRefs(numVars);
1753 std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars);1753 std::vector<std::vector<PlanIter_t> > outputLetVarsRefs(numVars);
17541754
1755 for (ulong i = 0; i < numVars; ++i)1755 for (u_long i = 0; i < numVars; ++i)
1756 {1756 {
1757 VarRebind* varRebind = clauseVarMap->theVarRebinds[i];1757 VarRebind* varRebind = clauseVarMap->theVarRebinds[i];
17581758
@@ -2367,8 +2367,8 @@
23672367
2368 if (v.is_sequential())2368 if (v.is_sequential())
2369 {2369 {
2370 ulong numArgs = v.num_args();2370 u_long numArgs = v.num_args();
2371 for (ulong i = 0; i < numArgs; ++i)2371 for (u_long i = 0; i < numArgs; ++i)
2372 {2372 {
2373 if (v.get_arg(i)->is_sequential())2373 if (v.get_arg(i)->is_sequential())
2374 {2374 {
@@ -3661,7 +3661,7 @@
3661 const char* descr,3661 const char* descr,
3662 expr* root,3662 expr* root,
3663 CompilerCB* ccb,3663 CompilerCB* ccb,
3664 ulong& nextDynamicVarId,3664 u_long& nextDynamicVarId,
3665 hash64map<std::vector<LetVarIter_t> *>* arg_var_map)3665 hash64map<std::vector<LetVarIter_t> *>* arg_var_map)
3666{3666{
3667 plan_visitor c(ccb, nextDynamicVarId, arg_var_map);3667 plan_visitor c(ccb, nextDynamicVarId, arg_var_map);
36683668
=== modified file 'src/compiler/codegen/plan_visitor.h'
--- src/compiler/codegen/plan_visitor.h 2012-09-19 21:16:15 +0000
+++ src/compiler/codegen/plan_visitor.h 2012-12-24 23:26:24 +0000
@@ -32,7 +32,7 @@
32 const char* descr,32 const char* descr,
33 expr* root,33 expr* root,
34 CompilerCB* ccb,34 CompilerCB* ccb,
35 ulong& nextDynamicVarId,35 u_long& nextDynamicVarId,
36 hash64map<std::vector<LetVarIter_t> *>* param_var_map = NULL);36 hash64map<std::vector<LetVarIter_t> *>* param_var_map = NULL);
3737
38} /* namespace zorba */38} /* namespace zorba */
3939
=== modified file 'src/compiler/expression/expr_manager.cpp'
--- src/compiler/expression/expr_manager.cpp 2012-10-26 07:13:42 +0000
+++ src/compiler/expression/expr_manager.cpp 2012-12-24 23:26:24 +0000
@@ -538,7 +538,7 @@
538 static_context* sctx,538 static_context* sctx,
539 user_function* udf,539 user_function* udf,
540 const QueryLoc& loc,540 const QueryLoc& loc,
541 ulong varKind,541 u_long varKind,
542 store::Item* name)542 store::Item* name)
543{543{
544 CREATE_AND_RETURN_EXPR(var_expr,544 CREATE_AND_RETURN_EXPR(var_expr,
@@ -813,7 +813,7 @@
813 CREATE_AND_RETURN_EXPR(function_item_expr, sctx, udf, loc);813 CREATE_AND_RETURN_EXPR(function_item_expr, sctx, udf, loc);
814}814}
815815
816816#ifndef ZORBA_NO_FULL_TEXT
817ftcontains_expr* ExprManager::create_ftcontains_expr(817ftcontains_expr* ExprManager::create_ftcontains_expr(
818 static_context* sctx,818 static_context* sctx,
819 user_function* udf,819 user_function* udf,
@@ -824,7 +824,7 @@
824{824{
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);
826}826}
827827#endif
828828
829////////////////////////////////////////////////////////////////////////////////829////////////////////////////////////////////////////////////////////////////////
830830
831831
=== modified file 'src/compiler/expression/expr_manager.h'
--- src/compiler/expression/expr_manager.h 2012-10-26 07:13:42 +0000
+++ src/compiler/expression/expr_manager.h 2012-12-24 23:26:24 +0000
@@ -333,7 +333,7 @@
333 static_context* sctx,333 static_context* sctx,
334 user_function* udf,334 user_function* udf,
335 const QueryLoc& loc,335 const QueryLoc& loc,
336 ulong varKind,336 u_long varKind,
337 store::Item* name);337 store::Item* name);
338338
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);
@@ -495,6 +495,7 @@
495 user_function* udf,495 user_function* udf,
496 const QueryLoc& loc);496 const QueryLoc& loc);
497497
498#ifndef ZORBA_NO_FULL_TEXT
498 ftcontains_expr* create_ftcontains_expr(499 ftcontains_expr* create_ftcontains_expr(
499 static_context*,500 static_context*,
500 user_function* udf,501 user_function* udf,
@@ -502,6 +503,7 @@
502 expr* range,503 expr* range,
503 ftnode* ftselection,504 ftnode* ftselection,
504 expr* ftignore);505 expr* ftignore);
506#endif
505507
506////////////////////////////////////////////////////////////////////////////////508////////////////////////////////////////////////////////////////////////////////
507509
508510
=== modified file 'src/compiler/expression/flwor_expr.cpp'
--- src/compiler/expression/flwor_expr.cpp 2012-10-26 07:13:42 +0000
+++ src/compiler/expression/flwor_expr.cpp 2012-12-24 23:26:24 +0000
@@ -1108,9 +1108,9 @@
1108********************************************************************************/1108********************************************************************************/
1109void flwor_expr::compute_scripting_kind()1109void flwor_expr::compute_scripting_kind()
1110{1110{
1111 ulong numClauses = num_clauses();1111 u_long numClauses = num_clauses();
11121112
1113 for (ulong i = 0; i < numClauses; ++i)1113 for (u_long i = 0; i < numClauses; ++i)
1114 {1114 {
1115 const flwor_clause* c = theClauses[i];1115 const flwor_clause* c = theClauses[i];
1116 flwor_clause::ClauseKind k = c->get_kind();1116 flwor_clause::ClauseKind k = c->get_kind();
11171117
=== modified file 'src/compiler/expression/var_expr.cpp'
--- src/compiler/expression/var_expr.cpp 2012-12-06 22:49:35 +0000
+++ src/compiler/expression/var_expr.cpp 2012-12-24 23:26:24 +0000
@@ -153,7 +153,7 @@
153/*******************************************************************************153/*******************************************************************************
154154
155********************************************************************************/155********************************************************************************/
156void var_expr::set_unique_id(ulong v)156void var_expr::set_unique_id(u_long v)
157{157{
158 assert(theUniqueId == 0);158 assert(theUniqueId == 0);
159159
160160
=== modified file 'src/compiler/expression/var_expr.h'
--- src/compiler/expression/var_expr.h 2012-12-06 22:49:35 +0000
+++ src/compiler/expression/var_expr.h 2012-12-24 23:26:24 +0000
@@ -151,7 +151,7 @@
151 };151 };
152152
153protected:153protected:
154 ulong theUniqueId;154 u_long theUniqueId;
155155
156 var_kind theVarKind;156 var_kind theVarKind;
157157
@@ -198,9 +198,9 @@
198198
199 VarInfo* get_var_info() const { return theVarInfo; }199 VarInfo* get_var_info() const { return theVarInfo; }
200200
201 ulong get_unique_id() const { return theUniqueId; }201 u_long get_unique_id() const { return theUniqueId; }
202202
203 void set_unique_id(ulong v);203 void set_unique_id(u_long v);
204204
205 store::Item* get_name() const;205 store::Item* get_name() const;
206206
207207
=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-09-19 21:16:15 +0000
+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2012-12-24 23:26:24 +0000
@@ -323,7 +323,6 @@
323323
324void *begin_visit(const SchemaImport &n)324void *begin_visit(const SchemaImport &n)
325{325{
326#ifndef ZORBA_NO_XMLSCHEMA
327 INDENT;326 INDENT;
328327
329 os << "<SchemaImport" << IDS;328 os << "<SchemaImport" << IDS;
@@ -332,9 +331,6 @@
332331
333 INDENT_INC; NL;332 INDENT_INC; NL;
334 return no_state;333 return no_state;
335#else
336 throw XQUERY_EXCEPTION(err::XQST0009);
337#endif
338}334}
339335
340void *begin_visit (const URILiteralList &n)336void *begin_visit (const URILiteralList &n)
@@ -347,7 +343,7 @@
347343
348 INDENT_INC; NL;344 INDENT_INC; NL;
349345
350 for (ulong i = 0; i < n.size(); i++)346 for (u_long i = 0; i < n.size(); i++)
351 {347 {
352 INDENT;348 INDENT;
353 os << "<URI>" << n [i] << "</URI>" << "\n";349 os << "<URI>" << n [i] << "</URI>" << "\n";
354350
=== modified file 'src/compiler/parsetree/parsenode_print_xquery_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2012-10-08 12:09:36 +0000
+++ src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2012-12-24 23:26:24 +0000
@@ -966,7 +966,7 @@
966966
967 void* begin_visit(const URILiteralList& n)967 void* begin_visit(const URILiteralList& n)
968 {968 {
969 for(ulong i = 0; i < n.size(); i++)969 for(u_long i = 0; i < n.size(); i++)
970 {970 {
971 if(i!=0)971 if(i!=0)
972 {972 {
973973
=== modified file 'src/compiler/parsetree/parsenodes.cpp'
--- src/compiler/parsetree/parsenodes.cpp 2012-10-09 14:06:08 +0000
+++ src/compiler/parsetree/parsenodes.cpp 2012-12-24 23:26:24 +0000
@@ -1192,7 +1192,7 @@
1192{1192{
1193 BEGIN_VISITOR();1193 BEGIN_VISITOR();
11941194
1195 for (ulong i = 0; i < size(); ++i)1195 for (u_long i = 0; i < size(); ++i)
1196 (*this)[i]->accept(v);1196 (*this)[i]->accept(v);
11971197
1198 END_VISITOR();1198 END_VISITOR();
11991199
=== modified file 'src/compiler/parsetree/parsenodes.h'
--- src/compiler/parsetree/parsenodes.h 2012-10-08 12:09:36 +0000
+++ src/compiler/parsetree/parsenodes.h 2012-12-24 23:26:24 +0000
@@ -740,7 +740,7 @@
740740
741 const zstring& operator[](int i) const { return theUris[i]; }741 const zstring& operator[](int i) const { return theUris[i]; }
742742
743 ulong size() const { return (ulong)theUris.size(); }743 u_long size() const { return (u_long)theUris.size(); }
744744
745 void accept(parsenode_visitor&) const;745 void accept(parsenode_visitor&) const;
746};746};
@@ -1334,9 +1334,9 @@
13341334
1335 void addKeySpec(IndexKeySpec* spec) { theKeySpecs.push_back(spec); }1335 void addKeySpec(IndexKeySpec* spec) { theKeySpecs.push_back(spec); }
13361336
1337 ulong size() const { return (ulong)theKeySpecs.size(); }1337 u_long size() const { return (u_long)theKeySpecs.size(); }
13381338
1339 const IndexKeySpec* getKeySpec(ulong i) const { return theKeySpecs[i].getp(); }1339 const IndexKeySpec* getKeySpec(u_long i) const { return theKeySpecs[i].getp(); }
13401340
1341 void accept(parsenode_visitor&) const;1341 void accept(parsenode_visitor&) const;
1342};1342};
@@ -1613,9 +1613,9 @@
1613 {1613 {
1614 }1614 }
16151615
1616 const parsenode* operator[](ulong k) const { return theStatements[k].getp(); }1616 const parsenode* operator[](u_long k) const { return theStatements[k].getp(); }
16171617
1618 parsenode* operator[](ulong k) { return theStatements[k].getp(); }1618 parsenode* operator[](u_long k) { return theStatements[k].getp(); }
16191619
1620 csize size() const { return theStatements.size(); }1620 csize size() const { return theStatements.size(); }
16211621
@@ -2661,7 +2661,7 @@
26612661
2662 rchandle<QVarInDecl> operator[](int i) const { return qvar_decl_hv[i]; }2662 rchandle<QVarInDecl> operator[](int i) const { return qvar_decl_hv[i]; }
26632663
2664 ulong size () const { return (ulong)qvar_decl_hv.size ();}2664 u_long size () const { return (u_long)qvar_decl_hv.size ();}
26652665
2666 void accept(parsenode_visitor&) const;2666 void accept(parsenode_visitor&) const;
2667};2667};
@@ -3913,7 +3913,7 @@
39133913
3914 rchandle<exprnode> operator[](int i) { return pred_hv[i]; }3914 rchandle<exprnode> operator[](int i) { return pred_hv[i]; }
39153915
3916 ulong size () const { return (ulong)pred_hv.size (); }3916 u_long size () const { return (u_long)pred_hv.size (); }
39173917
3918 void accept(parsenode_visitor&) const;3918 void accept(parsenode_visitor&) const;
3919};3919};
@@ -4202,7 +4202,7 @@
42024202
4203 rchandle<exprnode> operator[](int i) const { return arg_hv[i]; }4203 rchandle<exprnode> operator[](int i) const { return arg_hv[i]; }
42044204
4205 ulong size() const { return (ulong)arg_hv.size (); }4205 u_long size() const { return (u_long)arg_hv.size (); }
42064206
4207 void accept(parsenode_visitor&) const;4207 void accept(parsenode_visitor&) const;
4208};4208};
@@ -4361,7 +4361,7 @@
43614361
4362 const DirAttr *operator[] (int i) const { return theAttributes[i]; }4362 const DirAttr *operator[] (int i) const { return theAttributes[i]; }
43634363
4364 ulong size () const { return (ulong)theAttributes.size (); }4364 u_long size () const { return (u_long)theAttributes.size (); }
43654365
4366 void accept(parsenode_visitor&) const;4366 void accept(parsenode_visitor&) const;
4367};4367};
@@ -5762,7 +5762,7 @@
57625762
5763 rchandle<SequenceType> operator[](int i) const { return theTypes[i]; }5763 rchandle<SequenceType> operator[](int i) const { return theTypes[i]; }
57645764
5765 ulong size() const { return (ulong)theTypes.size (); }5765 u_long size() const { return (u_long)theTypes.size (); }
57665766
5767 void accept(parsenode_visitor&) const;5767 void accept(parsenode_visitor&) const;
5768};5768};
57695769
=== modified file 'src/compiler/rewriter/framework/rewriter_context.h'
--- src/compiler/rewriter/framework/rewriter_context.h 2012-10-26 18:24:00 +0000
+++ src/compiler/rewriter/framework/rewriter_context.h 2012-12-24 23:26:24 +0000
@@ -32,7 +32,7 @@
3232
33class user_function;33class user_function;
3434
35typedef std::map<var_expr *, ulong> VarIdMap;35typedef std::map<var_expr *, u_long> VarIdMap;
36typedef std::vector<var_expr*> IdVarMap;36typedef std::vector<var_expr*> IdVarMap;
37typedef std::map<const expr *, DynamicBitset> ExprVarsMap;37typedef std::map<const expr *, DynamicBitset> ExprVarsMap;
3838
3939
=== modified file 'src/compiler/rewriter/rewriters/default_optimizer.cpp'
--- src/compiler/rewriter/rewriters/default_optimizer.cpp 2012-10-26 18:24:00 +0000
+++ src/compiler/rewriter/rewriters/default_optimizer.cpp 2012-12-24 23:26:24 +0000
@@ -193,7 +193,7 @@
193 rCtx.theIdVarMap = new IdVarMap;193 rCtx.theIdVarMap = new IdVarMap;
194 rCtx.theExprVarsMap = new ExprVarsMap;194 rCtx.theExprVarsMap = new ExprVarsMap;
195195
196 ulong numVars = 0;196 u_long numVars = 0;
197 expr_tools::index_flwor_vars(rCtx.getRoot(),197 expr_tools::index_flwor_vars(rCtx.getRoot(),
198 numVars,198 numVars,
199 *rCtx.theVarIdMap,199 *rCtx.theVarIdMap,
200200
=== modified file 'src/compiler/rewriter/rules/flwor_rules.cpp'
--- src/compiler/rewriter/rules/flwor_rules.cpp 2012-12-18 15:09:02 +0000
+++ src/compiler/rewriter/rules/flwor_rules.cpp 2012-12-24 23:26:24 +0000
@@ -259,7 +259,7 @@
259 expr* domExpr = fc->get_expr();259 expr* domExpr = fc->get_expr();
260 xqtref_t domType = domExpr->get_return_type();260 xqtref_t domType = domExpr->get_return_type();
261 TypeConstants::quantifier_t domQuant = domType->get_quantifier();261 TypeConstants::quantifier_t domQuant = domType->get_quantifier();
262 ulong domCount = domType->max_card();262 u_long domCount = domType->max_card();
263 var_expr* pvar = fc->get_pos_var();263 var_expr* pvar = fc->get_pos_var();
264 var = fc->get_var();264 var = fc->get_var();
265265
@@ -1519,7 +1519,7 @@
1519 posExpr->get_loc()))1519 posExpr->get_loc()))
1520 {1520 {
1521 VarIdMap varidMap;1521 VarIdMap varidMap;
1522 ulong numFlworVars = 0;1522 u_long numFlworVars = 0;
1523 expr_tools::index_flwor_vars(flworExpr, numFlworVars, varidMap, NULL);1523 expr_tools::index_flwor_vars(flworExpr, numFlworVars, varidMap, NULL);
1524 1524
1525 DynamicBitset varset(numFlworVars);1525 DynamicBitset varset(numFlworVars);
@@ -1527,9 +1527,9 @@
1527 expr_tools::build_expr_to_vars_map(posExpr, varidMap, varset, exprVarMap);1527 expr_tools::build_expr_to_vars_map(posExpr, varidMap, varset, exprVarMap);
1528 1528
1529 var_expr* forVar = forClause->get_var();1529 var_expr* forVar = forClause->get_var();
1530 ulong forVarId = varidMap[forVar];1530 u_long forVarId = varidMap[forVar];
15311531
1532 std::vector<ulong> posExprVarIds;1532 std::vector<u_long> posExprVarIds;
1533 exprVarMap[posExpr].getSet(posExprVarIds);1533 exprVarMap[posExpr].getSet(posExprVarIds);
15341534
1535 csize numPosExprVars = posExprVarIds.size();1535 csize numPosExprVars = posExprVarIds.size();
15361536
=== modified file 'src/compiler/rewriter/rules/fold_rules.cpp'
--- src/compiler/rewriter/rules/fold_rules.cpp 2012-11-12 17:12:41 +0000
+++ src/compiler/rewriter/rules/fold_rules.cpp 2012-12-24 23:26:24 +0000
@@ -455,7 +455,7 @@
455 expr* node,455 expr* node,
456 store::Item_t& result)456 store::Item_t& result)
457{457{
458 ulong nextVarId = 1;458 u_long nextVarId = 1;
459 PlanIter_t plan = codegen("const-folded expr", node, compilercb, nextVarId);459 PlanIter_t plan = codegen("const-folded expr", node, compilercb, nextVarId);
460460
461 QueryLoc loc = LOC (node);461 QueryLoc loc = LOC (node);
462462
=== modified file 'src/compiler/rewriter/rules/hoist_rules.cpp'
--- src/compiler/rewriter/rules/hoist_rules.cpp 2012-12-06 22:49:35 +0000
+++ src/compiler/rewriter/rules/hoist_rules.cpp 2012-12-24 23:26:24 +0000
@@ -98,7 +98,7 @@
98{98{
99 assert(node == rCtx.getRoot());99 assert(node == rCtx.getRoot());
100100
101 ulong numVars = 0;101 u_long numVars = 0;
102 VarIdMap varmap;102 VarIdMap varmap;
103103
104 expr_tools::index_flwor_vars(node, numVars, varmap, NULL);104 expr_tools::index_flwor_vars(node, numVars, varmap, NULL);
105105
=== modified file 'src/compiler/rewriter/rules/index_join_rule.cpp'
--- src/compiler/rewriter/rules/index_join_rule.cpp 2012-12-06 22:49:35 +0000
+++ src/compiler/rewriter/rules/index_join_rule.cpp 2012-12-24 23:26:24 +0000
@@ -43,13 +43,13 @@
4343
44static void rewriteJoin(RewriterContext&, PredicateInfo&, bool&);44static void rewriteJoin(RewriterContext&, PredicateInfo&, bool&);
4545
46static var_expr* findForVar(static_context*, RewriterContext&, const expr*, ulong&);46static var_expr* findForVar(static_context*, RewriterContext&, const expr*, u_long&);
4747
48static bool checkVarDependency(RewriterContext&, expr*, ulong);48static bool checkVarDependency(RewriterContext&, expr*, u_long);
4949
50static bool expandVars(RewriterContext&, expr*, ulong, long&);50static bool expandVars(RewriterContext&, expr*, u_long, long&);
5151
52static bool findFlworForVar(RewriterContext&, const var_expr*, flwor_expr*&, ulong&, ulong&);52static bool findFlworForVar(RewriterContext&, const var_expr*, flwor_expr*&, u_long&, u_long&);
5353
5454
55struct PredicateInfo55struct PredicateInfo
@@ -58,7 +58,7 @@
58 expr * thePredicate;58 expr * thePredicate;
59 expr * theOuterOp;59 expr * theOuterOp;
60 var_expr * theOuterVar;60 var_expr * theOuterVar;
61 ulong theOuterVarId;61 u_long theOuterVarId;
62 expr * theInnerOp;62 expr * theInnerOp;
63 var_expr * theInnerVar;63 var_expr * theInnerVar;
64 bool theIsGeneral;64 bool theIsGeneral;
@@ -241,12 +241,12 @@
241241
242 // Analyze each operand of the eq to see if it depends on a single for242 // Analyze each operand of the eq to see if it depends on a single for
243 // variable. If that is not true, we reject this predicate.243 // variable. If that is not true, we reject this predicate.
244 ulong var1id;244 u_long var1id;
245 var_expr* var1 = findForVar(sctx, rCtx, op1, var1id);245 var_expr* var1 = findForVar(sctx, rCtx, op1, var1id);
246 if (var1 == NULL)246 if (var1 == NULL)
247 return false;247 return false;
248248
249 ulong var2id;249 u_long var2id;
250 var_expr* var2 = findForVar(sctx, rCtx, op2, var2id);250 var_expr* var2 = findForVar(sctx, rCtx, op2, var2id);
251 if (var2 == NULL)251 if (var2 == NULL)
252 return false;252 return false;
@@ -255,7 +255,7 @@
255 return false;255 return false;
256256
257 // Determine the outer and inner side of the join257 // Determine the outer and inner side of the join
258 ulong outerVarId;258 u_long outerVarId;
259259
260 if (var1id < var2id)260 if (var1id < var2id)
261 {261 {
@@ -363,13 +363,13 @@
363 static_context* sctx,363 static_context* sctx,
364 RewriterContext& rCtx,364 RewriterContext& rCtx,
365 const expr* curExpr,365 const expr* curExpr,
366 ulong& varid)366 u_long& varid)
367{367{
368 var_expr* var = NULL;368 var_expr* var = NULL;
369369
370 while (true)370 while (true)
371 {371 {
372 std::vector<ulong> varidSet;372 std::vector<u_long> varidSet;
373373
374 const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr];374 const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr];
375375
@@ -421,14 +421,14 @@
421static bool checkVarDependency(421static bool checkVarDependency(
422 RewriterContext& rCtx,422 RewriterContext& rCtx,
423 expr* curExpr,423 expr* curExpr,
424 ulong searchVarId)424 u_long searchVarId)
425{425{
426 const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr];426 const DynamicBitset& bitset = (*rCtx.theExprVarsMap)[curExpr];
427427
428 if (bitset.get(searchVarId))428 if (bitset.get(searchVarId))
429 return true;429 return true;
430430
431 std::vector<ulong> varidSet;431 std::vector<u_long> varidSet;
432 bitset.getSet(varidSet);432 bitset.getSet(varidSet);
433433
434 csize numVars = varidSet.size();434 csize numVars = varidSet.size();
@@ -515,8 +515,8 @@
515 flwor_clause* mostInnerVarClause = mostInnerVar->get_flwor_clause();515 flwor_clause* mostInnerVarClause = mostInnerVar->get_flwor_clause();
516516
517 flwor_expr* innerFlwor = NULL;517 flwor_expr* innerFlwor = NULL;
518 ulong innerPosInStack = 0;518 u_long innerPosInStack = 0;
519 ulong mostInnerVarPos = 0;519 u_long mostInnerVarPos = 0;
520520
521 if (!findFlworForVar(rCtx,521 if (!findFlworForVar(rCtx,
522 mostInnerVar,522 mostInnerVar,
@@ -604,8 +604,8 @@
604 // find the flwor expr defining the outer var and create the index just604 // find the flwor expr defining the outer var and create the index just
605 // before this flwor.605 // before this flwor.
606 flwor_expr* outerFlworExpr = NULL;606 flwor_expr* outerFlworExpr = NULL;
607 ulong outerPosInStack = 0;607 u_long outerPosInStack = 0;
608 ulong dummy = 0;608 u_long dummy = 0;
609609
610 if (!findFlworForVar(rCtx,610 if (!findFlworForVar(rCtx,
611 predInfo.theOuterVar,611 predInfo.theOuterVar,
@@ -730,7 +730,7 @@
730static bool expandVars(730static bool expandVars(
731 RewriterContext& rCtx,731 RewriterContext& rCtx,
732 expr* subExpr,732 expr* subExpr,
733 ulong outerVarId,733 u_long outerVarId,
734 long& maxVarId)734 long& maxVarId)
735{735{
736 if (subExpr->get_expr_kind() == wrapper_expr_kind)736 if (subExpr->get_expr_kind() == wrapper_expr_kind)
@@ -812,8 +812,8 @@
812 RewriterContext& rCtx,812 RewriterContext& rCtx,
813 const var_expr* var,813 const var_expr* var,
814 flwor_expr*& flworExpr,814 flwor_expr*& flworExpr,
815 ulong& varPos,815 u_long& varPos,
816 ulong& posInStack)816 u_long& posInStack)
817{817{
818 flworExpr = NULL;818 flworExpr = NULL;
819819
820820
=== modified file 'src/compiler/rewriter/tools/dataflow_annotations.cpp'
--- src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-12-20 22:22:31 +0000
+++ src/compiler/rewriter/tools/dataflow_annotations.cpp 2012-12-24 23:26:24 +0000
@@ -366,7 +366,7 @@
366 flwor_expr::clause_list_t::const_iterator end = e->clause_end();366 flwor_expr::clause_list_t::const_iterator end = e->clause_end();
367367
368 const forletwin_clause* fc = NULL;368 const forletwin_clause* fc = NULL;
369 ulong numForClauses = 0;369 u_long numForClauses = 0;
370370
371 for (; ite != end; ++ite)371 for (; ite != end; ++ite)
372 {372 {
@@ -462,7 +462,7 @@
462 {462 {
463 const function* f = e->get_func();463 const function* f = e->get_func();
464464
465 ulong nArgs = e->num_args();465 u_long nArgs = e->num_args();
466466
467 FunctionConsts::AnnotationValue sorted = f->producesSortedNodes();467 FunctionConsts::AnnotationValue sorted = f->producesSortedNodes();
468468
@@ -478,7 +478,7 @@
478 {478 {
479 BoolAnnotationValue sorted = ANNOTATION_FALSE;479 BoolAnnotationValue sorted = ANNOTATION_FALSE;
480480
481 for (ulong i = 0; i < nArgs; ++i)481 for (u_long i = 0; i < nArgs; ++i)
482 {482 {
483 if (f->propagatesSortedNodes(i))483 if (f->propagatesSortedNodes(i))
484 {484 {
@@ -504,7 +504,7 @@
504 {504 {
505 BoolAnnotationValue distinct = ANNOTATION_FALSE;505 BoolAnnotationValue distinct = ANNOTATION_FALSE;
506506
507 for (ulong i = 0; i < nArgs; ++i)507 for (u_long i = 0; i < nArgs; ++i)
508 {508 {
509 if (f->propagatesDistinctNodes(i))509 if (f->propagatesDistinctNodes(i))
510 {510 {
@@ -588,8 +588,8 @@
588 {588 {
589 csize num_steps = e->size();589 csize num_steps = e->size();
590 bool only_child_axes = true;590 bool only_child_axes = true;
591 ulong num_desc_axes = 0;591 u_long num_desc_axes = 0;
592 ulong num_following_axes = 0;592 u_long num_following_axes = 0;
593 bool reverse_axes = false;593 bool reverse_axes = false;
594594
595 for (csize i = 1; i < num_steps; ++i)595 for (csize i = 1; i < num_steps; ++i)
596596
=== modified file 'src/compiler/rewriter/tools/expr_tools.cpp'
--- src/compiler/rewriter/tools/expr_tools.cpp 2012-10-29 11:41:36 +0000
+++ src/compiler/rewriter/tools/expr_tools.cpp 2012-12-24 23:26:24 +0000
@@ -36,9 +36,9 @@
36namespace expr_tools36namespace expr_tools
37{37{
3838
39static void add_wincond_vars(const flwor_wincond*, ulong&, VarIdMap&, IdVarMap*);39static void add_wincond_vars(const flwor_wincond*, u_long&, VarIdMap&, IdVarMap*);
4040
41static void add_var(var_expr*, ulong&, VarIdMap&, IdVarMap*);41static void add_var(var_expr*, u_long&, VarIdMap&, IdVarMap*);
4242
43static void remove_wincond_vars(const flwor_wincond*, const VarIdMap&, DynamicBitset&);43static void remove_wincond_vars(const flwor_wincond*, const VarIdMap&, DynamicBitset&);
4444
@@ -251,7 +251,7 @@
251********************************************************************************/251********************************************************************************/
252void index_flwor_vars(252void index_flwor_vars(
253 const expr* e,253 const expr* e,
254 ulong& numVars,254 u_long& numVars,
255 VarIdMap& varidmap,255 VarIdMap& varidmap,
256 IdVarMap* idvarmap)256 IdVarMap* idvarmap)
257{257{
@@ -394,7 +394,7 @@
394********************************************************************************/394********************************************************************************/
395static void add_wincond_vars(395static void add_wincond_vars(
396 const flwor_wincond* cond,396 const flwor_wincond* cond,
397 ulong& numVars,397 u_long& numVars,
398 VarIdMap& varidmap,398 VarIdMap& varidmap,
399 IdVarMap* idvarmap)399 IdVarMap* idvarmap)
400{400{
@@ -420,7 +420,7 @@
420********************************************************************************/420********************************************************************************/
421static void add_var(421static void add_var(
422 var_expr* v,422 var_expr* v,
423 ulong& numVars,423 u_long& numVars,
424 VarIdMap& varidmap,424 VarIdMap& varidmap,
425 IdVarMap* idvarmap)425 IdVarMap* idvarmap)
426{426{
427427
=== modified file 'src/compiler/rewriter/tools/expr_tools.h'
--- src/compiler/rewriter/tools/expr_tools.h 2012-10-29 11:41:36 +0000
+++ src/compiler/rewriter/tools/expr_tools.h 2012-12-24 23:26:24 +0000
@@ -63,7 +63,7 @@
63 Util functions used by rules: HoistExprsOutOfLoops and IndexJoin.63 Util functions used by rules: HoistExprsOutOfLoops and IndexJoin.
64********************************************************************************/64********************************************************************************/
6565
66void index_flwor_vars(const expr*, ulong&, VarIdMap&, IdVarMap*);66void index_flwor_vars(const expr*, u_long&, VarIdMap&, IdVarMap*);
6767
68void build_expr_to_vars_map(expr*, const VarIdMap&, DynamicBitset&, ExprVarsMap&);68void build_expr_to_vars_map(expr*, const VarIdMap&, DynamicBitset&, ExprVarsMap&);
6969
7070
=== modified file 'src/compiler/rewriter/tools/udf_graph.cpp'
--- src/compiler/rewriter/tools/udf_graph.cpp 2012-10-31 08:02:16 +0000
+++ src/compiler/rewriter/tools/udf_graph.cpp 2012-12-24 23:26:24 +0000
@@ -192,7 +192,7 @@
192}192}
193193
194194
195void UDFGraph::optimizeUDFs(CompilerCB* ccb, UDFNode* node, ulong visit)195void UDFGraph::optimizeUDFs(CompilerCB* ccb, UDFNode* node, u_long visit)
196{196{
197 if (node->theVisitId == visit)197 if (node->theVisitId == visit)
198 return;198 return;
@@ -266,7 +266,7 @@
266}266}
267267
268268
269bool UDFGraph::inferDeterminism(UDFNode* node, ulong visit)269bool UDFGraph::inferDeterminism(UDFNode* node, u_long visit)
270{270{
271 if (node->theVisitId == visit)271 if (node->theVisitId == visit)
272 return node->theUDF->isDeterministic();272 return node->theUDF->isDeterministic();
273273
=== modified file 'src/compiler/rewriter/tools/udf_graph.h'
--- src/compiler/rewriter/tools/udf_graph.h 2012-10-19 20:42:38 +0000
+++ src/compiler/rewriter/tools/udf_graph.h 2012-12-24 23:26:24 +0000
@@ -39,7 +39,7 @@
39 user_function * theUDF;39 user_function * theUDF;
40 std::vector<UDFNode*> theParents;40 std::vector<UDFNode*> theParents;
41 std::vector<UDFNode*> theChildren;41 std::vector<UDFNode*> theChildren;
42 ulong theVisitId;42 u_long theVisitId;
4343
44public:44public:
45 UDFNode(user_function* udf)45 UDFNode(user_function* udf)
@@ -109,7 +109,7 @@
109 expr * theExpr;109 expr * theExpr;
110 UDFMap theNodes;110 UDFMap theNodes;
111 UDFNode * theRoot;111 UDFNode * theRoot;
112 ulong theVisitId;112 u_long theVisitId;
113113
114public:114public:
115 UDFGraph(expr* e);115 UDFGraph(expr* e);
@@ -129,9 +129,9 @@
129129
130 void addEdge(user_function* caller, user_function* callee);130 void addEdge(user_function* caller, user_function* callee);
131131
132 void optimizeUDFs(CompilerCB* ccb, UDFNode* node, ulong visit);132 void optimizeUDFs(CompilerCB* ccb, UDFNode* node, u_long visit);
133133
134 bool inferDeterminism(UDFNode* node, ulong visit);134 bool inferDeterminism(UDFNode* node, u_long visit);
135135
136 void display(std::ostream& o, UDFNode* node);136 void display(std::ostream& o, UDFNode* node);
137};137};
138138
=== modified file 'src/compiler/translator/prolog_graph.cpp'
--- src/compiler/translator/prolog_graph.cpp 2012-09-19 21:16:15 +0000
+++ src/compiler/translator/prolog_graph.cpp 2012-12-24 23:26:24 +0000
@@ -294,7 +294,7 @@
294 std::vector<const var_expr*> topsorted_vars; // dependencies first294 std::vector<const var_expr*> topsorted_vars; // dependencies first
295 std::set<const var_expr*> visited;295 std::set<const var_expr*> visited;
296296
297 std::stack<std::pair<ulong, const var_expr*> > todo; // format: action code + var_expr297 std::stack<std::pair<u_long, const var_expr*> > todo; // format: action code + var_expr
298 // need to declare the reverse end iterator here because of a bug in older gcc's298 // need to declare the reverse end iterator here because of a bug in older gcc's
299 // (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11729)299 // (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11729)
300 std::vector<const var_expr*>::const_reverse_iterator lEnd = theVarDecls.rend();300 std::vector<const var_expr*>::const_reverse_iterator lEnd = theVarDecls.rend();
@@ -302,13 +302,13 @@
302 it != lEnd;302 it != lEnd;
303 ++it)303 ++it)
304 {304 {
305 todo.push(std::pair<ulong, const var_expr*>(1, (*it)));305 todo.push(std::pair<u_long, const var_expr*>(1, (*it)));
306 }306 }
307307
308 while (! todo.empty())308 while (! todo.empty())
309 {309 {
310 const var_expr* var = todo.top().second;310 const var_expr* var = todo.top().second;
311 ulong action = todo.top().first;311 u_long action = todo.top().first;
312 todo.pop();312 todo.pop();
313313
314 switch (action)314 switch (action)
@@ -323,7 +323,7 @@
323 if (visited.find(var) == visited.end())323 if (visited.find(var) == visited.end())
324 {324 {
325 visited.insert(var);325 visited.insert(var);
326 todo.push(std::pair<ulong, const var_expr*>(0, var));326 todo.push(std::pair<u_long, const var_expr*>(0, var));
327327
328 GraphImpl::const_iterator var_graph_entry = theGraph.find(var);328 GraphImpl::const_iterator var_graph_entry = theGraph.find(var);
329329
@@ -337,7 +337,7 @@
337 {337 {
338 if (var_vset_ite->getKind() == PrologGraphVertex::VAR)338 if (var_vset_ite->getKind() == PrologGraphVertex::VAR)
339 {339 {
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()));
341 }341 }
342 }342 }
343 }343 }
344344
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2012-12-12 08:11:40 +0000
+++ src/compiler/translator/translator.cpp 2012-12-24 23:26:24 +0000
@@ -236,7 +236,7 @@
236 bool theSingleInput;236 bool theSingleInput;
237 bool theOnlyChildAxes;237 bool theOnlyChildAxes;
238 bool theHaveFilterSteps;238 bool theHaveFilterSteps;
239 ulong theNumSteps;239 u_long theNumSteps;
240240
241 NodeSortInfo()241 NodeSortInfo()
242 :242 :
@@ -588,7 +588,7 @@
588588
589 rchandle<namespace_context> theNSCtx;589 rchandle<namespace_context> theNSCtx;
590590
591 ulong thePrintDepth;591 u_long thePrintDepth;
592 int theScopeDepth;592 int theScopeDepth;
593593
594 user_function * theUDF;594 user_function * theUDF;
@@ -1318,7 +1318,7 @@
1318********************************************************************************/1318********************************************************************************/
1319void bind_fn(1319void bind_fn(
1320 function_t& f,1320 function_t& f,
1321 ulong nargs,1321 u_long nargs,
1322 const QueryLoc& loc)1322 const QueryLoc& loc)
1323{1323{
1324 theSctx->bind_fn(f, nargs, loc);1324 theSctx->bind_fn(f, nargs, loc);
@@ -1336,7 +1336,7 @@
1336 Lookup in the sctx the function object for a function with a given prefix1336 Lookup in the sctx the function object for a function with a given prefix
1337 local name and arity. Return NULL if such a function is not found1337 local name and arity. Return NULL if such a function is not found
1338********************************************************************************/1338********************************************************************************/
1339function* lookup_fn(const QName* qname, ulong arity, const QueryLoc& loc)1339function* lookup_fn(const QName* qname, u_long arity, const QueryLoc& loc)
1340{1340{
1341 store::Item_t qnameItem;1341 store::Item_t qnameItem;
1342 expand_function_qname(qnameItem, qname, loc);1342 expand_function_qname(qnameItem, qname, loc);
@@ -2191,7 +2191,7 @@
21912191
2192 if (atlist != NULL)2192 if (atlist != NULL)
2193 {2193 {
2194 for (ulong i = 0; i < atlist->size(); ++i)2194 for (u_long i = 0; i < atlist->size(); ++i)
2195 {2195 {
2196 // If current uri is relative, turn it to an absolute one, using the2196 // If current uri is relative, turn it to an absolute one, using the
2197 // base uri from the sctx.2197 // base uri from the sctx.
@@ -3057,7 +3057,7 @@
3057 }3057 }
3058 else3058 else
3059 {3059 {
3060 for (ulong i = 0; i < atlist->size(); ++i)3060 for (u_long i = 0; i < atlist->size(); ++i)
3061 {3061 {
3062 compURIs.push_back(theSctx->resolve_relative_uri((*atlist)[i]).str());3062 compURIs.push_back(theSctx->resolve_relative_uri((*atlist)[i]).str());
3063 }3063 }
@@ -4649,7 +4649,7 @@
46494649
4650 TypeManager* tm = CTX_TM;4650 TypeManager* tm = CTX_TM;
46514651
4652 ulong numColumns = v.size();4652 u_long numColumns = v.size();
46534653
4654 std::vector<expr*> keyExprs(numColumns);4654 std::vector<expr*> keyExprs(numColumns);
4655 std::vector<xqtref_t> keyTypes(numColumns);4655 std::vector<xqtref_t> keyTypes(numColumns);
@@ -5535,7 +5535,7 @@
5535 if (theCCB->theConfig.optimize_cb != NULL)5535 if (theCCB->theConfig.optimize_cb != NULL)
5536 theCCB->theConfig.optimize_cb(body, msg.str());5536 theCCB->theConfig.optimize_cb(body, msg.str());
55375537
5538 ulong nextVarId = 1;5538 u_long nextVarId = 1;
5539 PlanIter_t icIter = codegen("integrity constraint", body, theCCB, nextVarId);5539 PlanIter_t icIter = codegen("integrity constraint", body, theCCB, nextVarId);
55405540
5541 // Update static context5541 // Update static context
@@ -8007,8 +8007,8 @@
80078007
8008 if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N)8008 if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N)
8009 {8009 {
8010 ulong numArgs = foArg->num_args();8010 u_long numArgs = foArg->num_args();
8011 for (ulong i = 0; i < numArgs; ++i)8011 for (u_long i = 0; i < numArgs; ++i)
8012 args.push_back(foArg->get_arg(i));8012 args.push_back(foArg->get_arg(i));
8013 }8013 }
8014 else8014 else
@@ -8027,8 +8027,8 @@
80278027
8028 if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N)8028 if (foArg->get_func()->getKind() == FunctionConsts::OP_OR_N)
8029 {8029 {
8030 ulong numArgs = foArg->num_args();8030 u_long numArgs = foArg->num_args();
8031 for (ulong i = 0; i < numArgs; ++i)8031 for (u_long i = 0; i < numArgs; ++i)
8032 args.push_back(foArg->get_arg(i));8032 args.push_back(foArg->get_arg(i));
8033 }8033 }
8034 else8034 else
@@ -11334,7 +11334,7 @@
11334 std::vector<expr*> foArgs(arity);11334 std::vector<expr*> foArgs(arity);
11335 std::vector<var_expr*> udfArgs(arity);11335 std::vector<var_expr*> udfArgs(arity);
1133611336
11337 for (ulong i = 0; i < arity; ++i)11337 for (u_long i = 0; i < arity; ++i)
11338 {11338 {
11339 var_expr* argVar = create_temp_var(loc, var_expr::arg_var);11339 var_expr* argVar = create_temp_var(loc, var_expr::arg_var);
1134011340
1134111341
=== modified file 'src/compiler/xqddf/value_index.cpp'
--- src/compiler/xqddf/value_index.cpp 2012-10-24 11:32:56 +0000
+++ src/compiler/xqddf/value_index.cpp 2012-12-24 23:26:24 +0000
@@ -566,7 +566,7 @@
566566
567 expr* buildExpr = getBuildExpr(ccb, loc);567 expr* buildExpr = getBuildExpr(ccb, loc);
568568
569 ulong nextVarId = 1;569 u_long nextVarId = 1;
570 theBuildPlan = codegen("index", buildExpr, ccb, nextVarId);570 theBuildPlan = codegen("index", buildExpr, ccb, nextVarId);
571571
572 return theBuildPlan.getp();572 return theBuildPlan.getp();
@@ -625,7 +625,7 @@
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);
626626
627 docVar->set_unique_id(1);627 docVar->set_unique_id(1);
628 ulong nextVarId = 2;628 u_long nextVarId = 2;
629629
630 expr* wrapperExpr = theCCB->theEM->630 expr* wrapperExpr = theCCB->theEM->
631 create_wrapper_expr(sctx, udf, dot->get_loc(), docVar);631 create_wrapper_expr(sctx, udf, dot->get_loc(), docVar);
632632
=== modified file 'src/context/default_url_resolvers.cpp'
--- src/context/default_url_resolvers.cpp 2012-11-06 10:11:37 +0000
+++ src/context/default_url_resolvers.cpp 2012-12-24 23:26:24 +0000
@@ -113,12 +113,14 @@
113 if (lScheme != uri::file) {113 if (lScheme != uri::file) {
114 return NULL;114 return NULL;
115 }115 }
116 zstring lPath = fs::get_normalized_path(aUrl);116#ifdef ZORBA_WITH_FILE_ACCESS
117 zstring lPath = fs::get_normalized_path(aUrl);
117 if (fs::get_type(lPath) == fs::file) {118 if (fs::get_type(lPath) == fs::file) {
118 std::ifstream* lStream = new std::ifstream(lPath.c_str());119 std::ifstream* lStream = new std::ifstream(lPath.c_str());
119 return new StreamResource(120 return new StreamResource(
120 lStream, &fileStreamReleaser, "", true /* seekable */);121 lStream, &fileStreamReleaser, "", true /* seekable */);
121 }122 }
123#endif
122 return NULL;124 return NULL;
123}125}
124126
125127
=== modified file 'src/context/dynamic_context.cpp'
--- src/context/dynamic_context.cpp 2012-12-11 00:22:26 +0000
+++ src/context/dynamic_context.cpp 2012-12-24 23:26:24 +0000
@@ -417,27 +417,27 @@
417/*******************************************************************************417/*******************************************************************************
418418
419********************************************************************************/419********************************************************************************/
420void dynamic_context::add_variable(ulong varid, store::Iterator_t& value) 420void dynamic_context::add_variable(u_long varid, store::Iterator_t& value)
421{421{
422 declare_variable(varid);422 declare_variable(varid);
423 set_variable(varid, NULL, QueryLoc::null, value);423 set_variable(varid, NULL, QueryLoc::null, value);
424}424}
425425
426426
427/*******************************************************************************427/*******************************************************************************
428428
429********************************************************************************/429********************************************************************************/
430void dynamic_context::add_variable(ulong varid, store::Item_t& value) 430void dynamic_context::add_variable(u_long varid, store::Item_t& value)
431{431{
432 declare_variable(varid);432 declare_variable(varid);
433 set_variable(varid, NULL, QueryLoc::null, value);433 set_variable(varid, NULL, QueryLoc::null, value);
434}434}
435435
436436
437/*******************************************************************************437/*******************************************************************************
438438
439********************************************************************************/439********************************************************************************/
440void dynamic_context::declare_variable(ulong varid)440void dynamic_context::declare_variable(u_long varid)
441{441{
442 assert(varid > 0);442 assert(varid > 0);
443443
@@ -453,7 +453,7 @@
453453
454********************************************************************************/454********************************************************************************/
455void dynamic_context::set_variable(455void dynamic_context::set_variable(
456 ulong varid,456 u_long varid,
457 const store::Item_t& varname,457 const store::Item_t& varname,
458 const QueryLoc& loc,458 const QueryLoc& loc,
459 store::Iterator_t& valueIter)459 store::Iterator_t& valueIter)
@@ -507,7 +507,7 @@
507507
508********************************************************************************/508********************************************************************************/
509void dynamic_context::set_variable(509void dynamic_context::set_variable(
510 ulong varid,510 u_long varid,
511 const store::Item_t& varname,511 const store::Item_t& varname,
512 const QueryLoc& loc,512 const QueryLoc& loc,
513 store::Item_t& valueItem)513 store::Item_t& valueItem)
@@ -551,7 +551,7 @@
551551
552********************************************************************************/552********************************************************************************/
553void dynamic_context::unset_variable(553void dynamic_context::unset_variable(
554 ulong varid,554 u_long varid,
555 const store::Item_t& varname,555 const store::Item_t& varname,
556 const QueryLoc& loc)556 const QueryLoc& loc)
557{557{
@@ -592,7 +592,7 @@
592592
593********************************************************************************/593********************************************************************************/
594void dynamic_context::get_variable(594void dynamic_context::get_variable(
595 ulong varid,595 u_long varid,
596 const store::Item_t& varname,596 const store::Item_t& varname,
597 const QueryLoc& loc,597 const QueryLoc& loc,
598 store::Item_t& itemValue,598 store::Item_t& itemValue,
@@ -628,7 +628,7 @@
628/*******************************************************************************628/*******************************************************************************
629629
630********************************************************************************/630********************************************************************************/
631bool dynamic_context::is_set_variable(ulong varid) const631bool dynamic_context::is_set_variable(u_long varid) const
632{632{
633 if (varid >= theVarValues.size() ||633 if (varid >= theVarValues.size() ||
634 theVarValues[varid].theState == VarValue::undeclared ||634 theVarValues[varid].theState == VarValue::undeclared ||
@@ -644,7 +644,7 @@
644/*******************************************************************************644/*******************************************************************************
645645
646********************************************************************************/646********************************************************************************/
647bool dynamic_context::exists_variable(ulong varid) const647bool dynamic_context::exists_variable(u_long varid) const
648{648{
649 if (varid >= theVarValues.size() ||649 if (varid >= theVarValues.size() ||
650 theVarValues[varid].theState == VarValue::undeclared)650 theVarValues[varid].theState == VarValue::undeclared)
@@ -659,7 +659,7 @@
659/*******************************************************************************659/*******************************************************************************
660660
661********************************************************************************/661********************************************************************************/
662ulong dynamic_context::get_next_var_id() const662u_long dynamic_context::get_next_var_id() const
663{663{
664 // 0 is reserved as an invalide var id, and 1 is taken by the context item664 // 0 is reserved as an invalide var id, and 1 is taken by the context item
665 // in the main module.665 // in the main module.
666666
=== modified file 'src/context/dynamic_context.h'
--- src/context/dynamic_context.h 2012-10-22 17:08:12 +0000
+++ src/context/dynamic_context.h 2012-12-24 23:26:24 +0000
@@ -173,42 +173,42 @@
173173
174 const std::vector<VarValue>& get_variables() const { return theVarValues; }174 const std::vector<VarValue>& get_variables() const { return theVarValues; }
175175
176 void add_variable(ulong varid, store::Item_t& value);176 void add_variable(u_long varid, store::Item_t& value);
177177
178 void add_variable(ulong varid, store::Iterator_t& value);178 void add_variable(u_long varid, store::Iterator_t& value);
179179
180 void declare_variable(ulong varid);180 void declare_variable(u_long varid);
181181
182 void set_variable(182 void set_variable(
183 ulong varid,183 u_long varid,
184 const store::Item_t& varname,184 const store::Item_t& varname,
185 const QueryLoc& loc,185 const QueryLoc& loc,
186 store::Item_t& value);186 store::Item_t& value);
187187
188 void set_variable(188 void set_variable(
189 ulong varid, 189 u_long varid,
190 const store::Item_t& varname,190 const store::Item_t& varname,
191 const QueryLoc& loc,191 const QueryLoc& loc,
192 store::Iterator_t& value);192 store::Iterator_t& value);
193193
194 void unset_variable(194 void unset_variable(
195 ulong varid, 195 u_long varid,
196 const store::Item_t& varname,196 const store::Item_t& varname,
197 const QueryLoc& loc);197 const QueryLoc& loc);
198198
199199
200 void get_variable(200 void get_variable(
201 ulong varid,201 u_long varid,
202 const store::Item_t& varname,202 const store::Item_t& varname,
203 const QueryLoc& loc,203 const QueryLoc& loc,
204 store::Item_t& itemValue,204 store::Item_t& itemValue,
205 store::TempSeq_t& seqValue) const;205 store::TempSeq_t& seqValue) const;
206206
207 bool is_set_variable(ulong varid) const;207 bool is_set_variable(u_long varid) const;
208208
209 bool exists_variable(ulong varid) const;209 bool exists_variable(u_long varid) const;
210210
211 ulong get_next_var_id() const;211 u_long get_next_var_id() const;
212212
213 store::Index* getIndex(store::Item* qname) const;213 store::Index* getIndex(store::Item* qname) const;
214214
215215
=== modified file 'src/context/namespace_context.cpp'
--- src/context/namespace_context.cpp 2012-09-19 21:16:15 +0000
+++ src/context/namespace_context.cpp 2012-12-24 23:26:24 +0000
@@ -128,14 +128,14 @@
128 while (parentContext)128 while (parentContext)
129 {129 {
130 const store::NsBindings& parentBindings = parentContext->m_bindings;130 const store::NsBindings& parentBindings = parentContext->m_bindings;
131 ulong parentSize = (ulong)parentBindings.size();131 u_long parentSize = (u_long)parentBindings.size();
132 ulong currSize = (ulong)bindings.size();132 u_long currSize = (u_long)bindings.size();
133133
134 // for each parent binding, add it to the result, if it doesn't have the134 // for each parent binding, add it to the result, if it doesn't have the
135 // same prefix as another binding that is already in the result.135 // same prefix as another binding that is already in the result.
136 for (ulong i = 0; i < parentSize; ++i)136 for (u_long i = 0; i < parentSize; ++i)
137 {137 {
138 ulong j;138 u_long j;
139 for (j = 0; j < currSize; ++j)139 for (j = 0; j < currSize; ++j)
140 {140 {
141 if (bindings[j].first == parentBindings[i].first)141 if (bindings[j].first == parentBindings[i].first)
142142
=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp 2012-12-11 20:27:40 +0000
+++ src/context/static_context.cpp 2012-12-24 23:26:24 +0000
@@ -2157,7 +2157,7 @@
21572157
2158 // Ignore duplicates2158 // Ignore duplicates
2159 const zstring& prefix = binding.first;2159 const zstring& prefix = binding.first;
2160 ulong numBindings = (ulong)bindings.size();2160 u_long numBindings = (u_long)bindings.size();
2161 bool found = 0;2161 bool found = 0;
2162 for (unsigned int i = 0; i < numBindings; ++i)2162 for (unsigned int i = 0; i < numBindings; ++i)
2163 {2163 {
@@ -2382,7 +2382,7 @@
2382********************************************************************************/2382********************************************************************************/
2383void static_context::bind_fn(2383void static_context::bind_fn(
2384 function_t& f,2384 function_t& f,
2385 ulong arity,2385 u_long arity,
2386 const QueryLoc& loc)2386 const QueryLoc& loc)
2387{2387{
2388 store::Item* qname = f->getName();2388 store::Item* qname = f->getName();
@@ -2394,7 +2394,7 @@
23942394
2395 if (theFunctionMap == NULL)2395 if (theFunctionMap == NULL)
2396 {2396 {
2397 ulong size = (is_global_root_sctx() ? 500 : 32);2397 u_long size = (is_global_root_sctx() ? 500 : 32);
2398 theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL), size, false);2398 theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL), size, false);
2399 }2399 }
24002400
@@ -2456,7 +2456,7 @@
2456********************************************************************************/2456********************************************************************************/
2457void static_context::unbind_fn(2457void static_context::unbind_fn(
2458 const store::Item* qname,2458 const store::Item* qname,
2459 ulong arity)2459 u_long arity)
2460{2460{
2461 ZORBA_ASSERT(!is_global_root_sctx());2461 ZORBA_ASSERT(!is_global_root_sctx());
24622462
@@ -2525,7 +2525,7 @@
2525********************************************************************************/2525********************************************************************************/
2526function* static_context::lookup_fn(2526function* static_context::lookup_fn(
2527 const store::Item* qname,2527 const store::Item* qname,
2528 ulong arity,2528 u_long arity,
2529 bool skipDisabled)2529 bool skipDisabled)
2530{2530{
2531 FunctionInfo fi;2531 FunctionInfo fi;
@@ -2580,7 +2580,7 @@
2580********************************************************************************/2580********************************************************************************/
2581function* static_context::lookup_local_fn(2581function* static_context::lookup_local_fn(
2582 const store::Item* qname,2582 const store::Item* qname,
2583 ulong arity,2583 u_long arity,
2584 bool skipDisabled)2584 bool skipDisabled)
2585{2585{
2586 FunctionInfo fi;2586 FunctionInfo fi;
@@ -2708,8 +2708,8 @@
2708 {2708 {
2709 std::vector<FunctionInfo>* fv = (*ite).second;2709 std::vector<FunctionInfo>* fv = (*ite).second;
27102710
2711 ulong numFunctions = (ulong)fv->size();2711 u_long numFunctions = (u_long)fv->size();
2712 for (ulong i = 0; i < numFunctions; ++i)2712 for (u_long i = 0; i < numFunctions; ++i)
2713 {2713 {
2714 function* f = (*fv)[i].theFunction.getp();2714 function* f = (*fv)[i].theFunction.getp();
27152715
@@ -2782,8 +2782,8 @@
27822782
2783 if (theFunctionArityMap != NULL && theFunctionArityMap->get(qname2, fv))2783 if (theFunctionArityMap != NULL && theFunctionArityMap->get(qname2, fv))
2784 {2784 {
2785 ulong numFunctions = (ulong)fv->size();2785 u_long numFunctions = (u_long)fv->size();
2786 for (ulong i = 0; i < numFunctions; ++i)2786 for (u_long i = 0; i < numFunctions; ++i)
2787 {2787 {
2788 if (!(*fv)[i].theIsDisabled)2788 if (!(*fv)[i].theIsDisabled)
2789 functions.push_back((*fv)[i].theFunction.getp());2789 functions.push_back((*fv)[i].theFunction.getp());
@@ -4113,7 +4113,7 @@
4113 if (theFunctionMap == NULL)4113 if (theFunctionMap == NULL)
4114 {4114 {
4115 theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL),4115 theFunctionMap = new FunctionMap(HashMapItemPointerCmp(0, NULL),
4116 (ulong)module->theFunctionMap->capacity(),4116 (u_long)module->theFunctionMap->capacity(),
4117 false);4117 false);
4118 }4118 }
41194119
@@ -4133,7 +4133,7 @@
4133 {4133 {
4134 theFunctionArityMap =4134 theFunctionArityMap =
4135 new FunctionArityMap(HashMapItemPointerCmp(0, NULL),4135 new FunctionArityMap(HashMapItemPointerCmp(0, NULL),
4136 (ulong)module->theFunctionArityMap->capacity(),4136 (u_long)module->theFunctionArityMap->capacity(),
4137 false);4137 false);
4138 }4138 }
41394139
41404140
=== modified file 'src/context/static_context.h'
--- src/context/static_context.h 2012-12-06 01:17:18 +0000
+++ src/context/static_context.h 2012-12-24 23:26:24 +0000
@@ -160,7 +160,7 @@
160protected:160protected:
161 store::Item_t theName;161 store::Item_t theName;
162162
163 ulong theId;163 u_long theId;
164164
165 int theKind;165 int theKind;
166166
@@ -186,9 +186,9 @@
186186
187 const store::Item_t& getName() const { return theName; }187 const store::Item_t& getName() const { return theName; }
188188
189 ulong getId() const { return theId; }189 u_long getId() const { return theId; }
190190
191 void setId(ulong id) { theId = id; }191 void setId(u_long id) { theId = id; }
192192
193 int getKind() const { return theKind; }193 int getKind() const { return theKind; }
194194
@@ -891,18 +891,18 @@
891 //891 //
892 // Functions892 // Functions
893 //893 //
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);
895895
896 void unbind_fn(const store::Item* qname, ulong arity);896 void unbind_fn(const store::Item* qname, u_long arity);
897897
898 function* lookup_fn(898 function* lookup_fn(
899 const store::Item* qname,899 const store::Item* qname,
900 ulong arity,900 u_long arity,
901 bool skipDisabled = true);901 bool skipDisabled = true);
902902
903 function* lookup_local_fn(903 function* lookup_local_fn(
904 const store::Item* qname,904 const store::Item* qname,
905 ulong arity,905 u_long arity,
906 bool skipDisabled = true);906 bool skipDisabled = true);
907907
908 void get_functions(std::vector<function*>& functions) const;908 void get_functions(std::vector<function*>& functions) const;
909909
=== modified file 'src/functions/function.cpp'
--- src/functions/function.cpp 2012-09-19 21:16:15 +0000
+++ src/functions/function.cpp 2012-12-24 23:26:24 +0000
@@ -102,7 +102,7 @@
102********************************************************************************/102********************************************************************************/
103bool function::validate_args(std::vector<PlanIter_t>& argv) const103bool function::validate_args(std::vector<PlanIter_t>& argv) const
104{104{
105 ulong n = theSignature.paramCount();105 u_long n = theSignature.paramCount();
106 return n == VARIADIC_SIG_SIZE || argv.size() == n;106 return n == VARIADIC_SIG_SIZE || argv.size() == n;
107}107}
108108
109109
=== modified file 'src/functions/function_impl.h'
--- src/functions/function_impl.h 2012-09-19 21:16:15 +0000
+++ src/functions/function_impl.h 2012-12-24 23:26:24 +0000
@@ -46,7 +46,7 @@
46 { \46 { \
47 function_t type##_ptr(new type(signature sig, kind)); \47 function_t type##_ptr(new type(signature sig, kind)); \
48 const store::Item* fname = type##_ptr->getName(); \48 const store::Item* fname = type##_ptr->getName(); \
49 ulong cnt = type##_ptr->getSignature().paramCount(); \49 u_long cnt = type##_ptr->getSignature().paramCount(); \
50 DEBUG_FN_DECL(fname, cnt); \50 DEBUG_FN_DECL(fname, cnt); \
51 sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \51 sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \
52 BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \52 BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \
@@ -57,7 +57,7 @@
57 { \57 { \
58 function_t type##_ptr(new type(signature sig)); \58 function_t type##_ptr(new type(signature sig)); \
59 const store::Item* fname = type##_ptr->getName(); \59 const store::Item* fname = type##_ptr->getName(); \
60 ulong cnt = type##_ptr->getSignature().paramCount(); \60 u_long cnt = type##_ptr->getSignature().paramCount(); \
61 DEBUG_FN_DECL(fname, cnt); \61 DEBUG_FN_DECL(fname, cnt); \
62 sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \62 sctx->bind_fn(type##_ptr, cnt, QueryLoc::null); \
63 BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \63 BuiltinFunctionLibrary::theFunctions[type##_ptr->getKind()] = type##_ptr.getp(); \
6464
=== modified file 'src/functions/udf.cpp'
--- src/functions/udf.cpp 2012-10-20 21:29:37 +0000
+++ src/functions/udf.cpp 2012-12-24 23:26:24 +0000
@@ -539,7 +539,7 @@
539 argVarToRefsMap.put((uint64_t)&*theArgVars[i], &theArgVarsRefs[i]);539 argVarToRefsMap.put((uint64_t)&*theArgVars[i], &theArgVarsRefs[i]);
540 }540 }
541541
542 ulong nextVarId = 1;542 u_long nextVarId = 1;
543 const store::Item* lName = getName();543 const store::Item* lName = getName();
544 //lName may be null of inlined functions544 //lName may be null of inlined functions
545 thePlan = zorba::codegen((lName == 0 ?545 thePlan = zorba::codegen((lName == 0 ?
546546
=== modified file 'src/runtime/core/apply_updates.cpp'
--- src/runtime/core/apply_updates.cpp 2012-12-01 00:06:15 +0000
+++ src/runtime/core/apply_updates.cpp 2012-12-24 23:26:24 +0000
@@ -95,7 +95,7 @@
95 CompilerCB* ccb = planState.theCompilerCB;95 CompilerCB* ccb = planState.theCompilerCB;
9696
97 store::Item_t item;97 store::Item_t item;
98 ulong numItems = 0;98 u_long numItems = 0;
99 store::PUL_t pul;99 store::PUL_t pul;
100100
101 ApplyIteratorState* state;101 ApplyIteratorState* state;
@@ -209,7 +209,7 @@
209 {209 {
210 indexPul = GENV_ITEMFACTORY->createPendingUpdateList();210 indexPul = GENV_ITEMFACTORY->createPendingUpdateList();
211211
212 for (ulong i = 0; i < numIndices; ++i)212 for (u_long i = 0; i < numIndices; ++i)
213 {213 {
214 IndexDecl* zorbaIndex = zorbaIndexes[i];214 IndexDecl* zorbaIndex = zorbaIndexes[i];
215215
216216
=== modified file 'src/runtime/core/flwor_iterator.cpp'
--- src/runtime/core/flwor_iterator.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/core/flwor_iterator.cpp 2012-12-24 23:26:24 +0000
@@ -946,7 +946,7 @@
946********************************************************************************/946********************************************************************************/
947bool FLWORIterator::nextImpl(store::Item_t& result, PlanState& planState) const947bool FLWORIterator::nextImpl(store::Item_t& result, PlanState& planState) const
948{948{
949 ulong curVar = 0;949 u_long curVar = 0;
950 store::Item_t curItem;950 store::Item_t curItem;
951951
952 FlworState* state;952 FlworState* state;
@@ -1004,7 +1004,7 @@
1004 }1004 }
10051005
1006 state->theCurTuplePos = 0;1006 state->theCurTuplePos = 0;
1007 state->theNumTuples = (ulong)state->theTuplesTable.size();1007 state->theNumTuples = (u_long)state->theTuplesTable.size();
10081008
1009 while (state->theCurTuplePos < state->theNumTuples)1009 while (state->theCurTuplePos < state->theNumTuples)
1010 {1010 {
@@ -1030,7 +1030,7 @@
1030 else1030 else
1031 {1031 {
1032 state->theCurTuplePos = 0;1032 state->theCurTuplePos = 0;
1033 state->theNumTuples = (ulong)state->theTuplesTable.size();1033 state->theNumTuples = (u_long)state->theTuplesTable.size();
10341034
1035 while (state->theCurTuplePos < state->theNumTuples)1035 while (state->theCurTuplePos < state->theNumTuples)
1036 {1036 {
@@ -1080,7 +1080,7 @@
1080 }1080 }
10811081
1082 state->theCurTuplePos = 0;1082 state->theCurTuplePos = 0;
1083 state->theNumTuples = (ulong)state->theSortTable.size();1083 state->theNumTuples = (u_long)state->theSortTable.size();
10841084
1085 while (state->theCurTuplePos < state->theNumTuples)1085 while (state->theCurTuplePos < state->theNumTuples)
1086 {1086 {
@@ -1192,7 +1192,7 @@
1192 false otherwise.1192 false otherwise.
1193********************************************************************************/1193********************************************************************************/
1194bool FLWORIterator::bindVariable(1194bool FLWORIterator::bindVariable(
1195 ulong varNo,1195 u_long varNo,
1196 FlworState* iterState,1196 FlworState* iterState,
1197 PlanState& planState) const1197 PlanState& planState) const
1198{1198{
@@ -1518,7 +1518,7 @@
1518 that appear after the groupby clause. 1518 that appear after the groupby clause.
1519********************************************************************************/1519********************************************************************************/
1520void FLWORIterator::rebindStreamTuple( 1520void FLWORIterator::rebindStreamTuple(
1521 ulong tuplePos,1521 u_long tuplePos,
1522 FlworState* iterState,1522 FlworState* iterState,
1523 PlanState& planState) const1523 PlanState& planState) const
1524{1524{
15251525
=== modified file 'src/runtime/core/flwor_iterator.h'
--- src/runtime/core/flwor_iterator.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/flwor_iterator.h 2012-12-24 23:26:24 +0000
@@ -375,9 +375,9 @@
375375
376 ResultTable theResultTable;376 ResultTable theResultTable;
377377
378 ulong theNumTuples;378 u_long theNumTuples;
379379
380 ulong theCurTuplePos;380 u_long theCurTuplePos;
381381
382 store::Iterator_t theOrderResultIter; 382 store::Iterator_t theOrderResultIter;
383383
@@ -470,7 +470,7 @@
470470
471private:471private:
472 bool bindVariable(472 bool bindVariable(
473 ulong varNo,473 u_long varNo,
474 FlworState* flworState,474 FlworState* flworState,
475 PlanState& planState) const;475 PlanState& planState) const;
476476
@@ -491,7 +491,7 @@
491 PlanState& planState) const;491 PlanState& planState) const;
492492
493 void rebindStreamTuple(493 void rebindStreamTuple(
494 ulong tuplePos, 494 u_long tuplePos,
495 FlworState* iterState,495 FlworState* iterState,
496 PlanState& planState) const;496 PlanState& planState) const;
497497
498498
=== modified file 'src/runtime/core/fncall_iterator.cpp'
--- src/runtime/core/fncall_iterator.cpp 2012-11-26 20:49:01 +0000
+++ src/runtime/core/fncall_iterator.cpp 2012-12-24 23:26:24 +0000
@@ -735,9 +735,9 @@
735 ExtFunctionCallIteratorState* state =735 ExtFunctionCallIteratorState* state =
736 StateTraitsImpl<ExtFunctionCallIteratorState>::getState(planState,736 StateTraitsImpl<ExtFunctionCallIteratorState>::getState(planState,
737 theStateOffset);737 theStateOffset);
738 ulong n = (ulong)theChildren.size();738 u_long n = (u_long)theChildren.size();
739 state->m_extArgs.resize(n);739 state->m_extArgs.resize(n);
740 for(ulong i = 0; i < n; ++i)740 for(u_long i = 0; i < n; ++i)
741 {741 {
742 state->m_extArgs[i] = new ExtFuncArgItemSequence(theChildren[i], planState);742 state->m_extArgs[i] = new ExtFuncArgItemSequence(theChildren[i], planState);
743 // the iterator does not have exlcusive ownership over the sequences743 // the iterator does not have exlcusive ownership over the sequences
744744
=== modified file 'src/runtime/core/gflwor/common.h'
--- src/runtime/core/gflwor/common.h 2012-10-08 12:09:36 +0000
+++ src/runtime/core/gflwor/common.h 2012-12-24 23:26:24 +0000
@@ -281,7 +281,7 @@
281 size_t numIters = sourceVector.size();281 size_t numIters = sourceVector.size();
282 destVector.resize(numIters);282 destVector.resize(numIters);
283283
284 for (ulong i = 0; i < numIters; ++i)284 for (u_long i = 0; i < numIters; ++i)
285 destVector[i] = reinterpret_cast<T*>(sourceVector[i].getp());285 destVector[i] = reinterpret_cast<T*>(sourceVector[i].getp());
286 }286 }
287287
288288
=== modified file 'src/runtime/core/gflwor/groupby_iterator.cpp'
--- src/runtime/core/gflwor/groupby_iterator.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/core/gflwor/groupby_iterator.cpp 2012-12-24 23:26:24 +0000
@@ -173,16 +173,16 @@
173 int32_t size = this->getStateSize();173 int32_t size = this->getStateSize();
174 size += theTupleIter->getStateSizeOfSubtree();174 size += theTupleIter->getStateSizeOfSubtree();
175175
176 ulong numSpecs = (ulong)theGroupingSpecs.size();176 u_long numSpecs = (u_long)theGroupingSpecs.size();
177177
178 for (ulong i = 0; i < numSpecs; ++i)178 for (u_long i = 0; i < numSpecs; ++i)
179 {179 {
180 size += theGroupingSpecs[i].getStateSizeOfSubtree();180 size += theGroupingSpecs[i].getStateSizeOfSubtree();
181 }181 }
182182
183 numSpecs = (ulong)theNonGroupingSpecs.size();183 numSpecs = (u_long)theNonGroupingSpecs.size();
184184
185 for (ulong i = 0; i < numSpecs; ++i)185 for (u_long i = 0; i < numSpecs; ++i)
186 {186 {
187 size += theNonGroupingSpecs[i].getStateSizeOfSubtree();187 size += theNonGroupingSpecs[i].getStateSizeOfSubtree();
188 }188 }
189189
=== modified file 'src/runtime/core/gflwor/orderby_iterator.cpp'
--- src/runtime/core/gflwor/orderby_iterator.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/core/gflwor/orderby_iterator.cpp 2012-12-24 23:26:24 +0000
@@ -160,9 +160,9 @@
160160
161void OrderByState::clearSortTable()161void OrderByState::clearSortTable()
162{162{
163 ulong numTuples = (ulong)theSortTable.size();163 u_long numTuples = (u_long)theSortTable.size();
164164
165 for (ulong i = 0; i < numTuples; ++i)165 for (u_long i = 0; i < numTuples; ++i)
166 {166 {
167 theSortTable[i].clear();167 theSortTable[i].clear();
168 }168 }
@@ -241,15 +241,15 @@
241{241{
242 v.beginVisit(*this);242 v.beginVisit(*this);
243243
244 ulong numVars = (ulong)theInputForVars.size();244 u_long numVars = (u_long)theInputForVars.size();
245 for (ulong i = 0; i < numVars; ++i)245 for (u_long i = 0; i < numVars; ++i)
246 {246 {
247 v.beginVisitOrderByForVariable(theInputForVars[i], theOutputForVarsRefs[i]);247 v.beginVisitOrderByForVariable(theInputForVars[i], theOutputForVarsRefs[i]);
248 v.endVisitOrderByForVariable();248 v.endVisitOrderByForVariable();
249 }249 }
250250
251 numVars = (ulong)theInputLetVars.size();251 numVars = (u_long)theInputLetVars.size();
252 for (ulong i = 0; i < numVars; ++i)252 for (u_long i = 0; i < numVars; ++i)
253 {253 {
254 v.beginVisitOrderByLetVariable(theInputLetVars[i], theOutputLetVarsRefs[i]);254 v.beginVisitOrderByLetVariable(theInputLetVars[i], theOutputLetVarsRefs[i]);
255 v.endVisitOrderByLetVariable();255 v.endVisitOrderByLetVariable();
@@ -271,8 +271,8 @@
271 theStateOffset);271 theStateOffset);
272272
273 // Do a manual pass to set the Collator273 // Do a manual pass to set the Collator
274 ulong numSpecs = (ulong)theOrderSpecs.size();274 u_long numSpecs = (u_long)theOrderSpecs.size();
275 for (ulong i = 0; i < numSpecs; ++i)275 for (u_long i = 0; i < numSpecs; ++i)
276 {276 {
277 theOrderSpecs[i].open(planState, aOffset);277 theOrderSpecs[i].open(planState, aOffset);
278278
@@ -348,7 +348,7 @@
348 }348 }
349349
350 iterState->theCurTuplePos = 0;350 iterState->theCurTuplePos = 0;
351 iterState->theNumTuples = (ulong)iterState->theSortTable.size();351 iterState->theNumTuples = (u_long)iterState->theSortTable.size();
352352
353 while(iterState->theCurTuplePos < iterState->theNumTuples)353 while(iterState->theCurTuplePos < iterState->theNumTuples)
354 {354 {
@@ -450,14 +450,14 @@
450 StreamTuple& streamTuple = 450 StreamTuple& streamTuple =
451 iterState->theDataTable[iterState->theSortTable[iterState->theCurTuplePos].theDataPos];451 iterState->theDataTable[iterState->theSortTable[iterState->theCurTuplePos].theDataPos];
452452
453 ulong numForVarsRefs = (ulong)theOutputForVarsRefs.size();453 u_long numForVarsRefs = (u_long)theOutputForVarsRefs.size();
454 for (ulong i = 0; i < numForVarsRefs; ++i)454 for (u_long i = 0; i < numForVarsRefs; ++i)
455 {455 {
456 bindVariables(streamTuple.theItems[i], theOutputForVarsRefs[i], planState);456 bindVariables(streamTuple.theItems[i], theOutputForVarsRefs[i], planState);
457 }457 }
458458
459 ulong numLetVarsRefs = (ulong)theOutputLetVarsRefs.size();459 u_long numLetVarsRefs = (u_long)theOutputLetVarsRefs.size();
460 for(ulong i = 0; i < numLetVarsRefs; ++i)460 for(u_long i = 0; i < numLetVarsRefs; ++i)
461 {461 {
462 bindVariables(streamTuple.theSequences[i], theOutputLetVarsRefs[i], planState);462 bindVariables(streamTuple.theSequences[i], theOutputLetVarsRefs[i], planState);
463 }463 }
464464
=== modified file 'src/runtime/core/gflwor/orderby_iterator.h'
--- src/runtime/core/gflwor/orderby_iterator.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/gflwor/orderby_iterator.h 2012-12-24 23:26:24 +0000
@@ -116,7 +116,7 @@
116{116{
117public:117public:
118 std::vector<store::Item*> theKeyValues;118 std::vector<store::Item*> theKeyValues;
119 ulong theDataPos;119 u_long theDataPos;
120120
121public:121public:
122 SortTuple() { }122 SortTuple() { }
@@ -125,8 +125,8 @@
125125
126 void clear()126 void clear()
127 {127 {
128 ulong numColumns = (ulong)theKeyValues.size();128 u_long numColumns = (u_long)theKeyValues.size();
129 for (ulong i = 0; i < numColumns; ++i)129 for (u_long i = 0; i < numColumns; ++i)
130 {130 {
131 if (theKeyValues[i] != NULL)131 if (theKeyValues[i] != NULL)
132 {132 {
@@ -159,8 +159,8 @@
159protected:159protected:
160 SortTable theSortTable;160 SortTable theSortTable;
161 DataTable theDataTable;161 DataTable theDataTable;
162 ulong theNumTuples;162 u_long theNumTuples;
163 ulong theCurTuplePos;163 u_long theCurTuplePos;
164164
165public:165public:
166 OrderByState();166 OrderByState();
167167
=== modified file 'src/runtime/core/gflwor/window_iterator.cpp'
--- src/runtime/core/gflwor/window_iterator.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/core/gflwor/window_iterator.cpp 2012-12-24 23:26:24 +0000
@@ -186,7 +186,7 @@
186void WindowVars::bindIntern(186void WindowVars::bindIntern(
187 PlanState& planState,187 PlanState& planState,
188 const store::TempSeq_t& inputSeq,188 const store::TempSeq_t& inputSeq,
189 const ulong pos) const189 const u_long pos) const
190{190{
191 store::Item_t item;191 store::Item_t item;
192192
@@ -234,7 +234,7 @@
234void WindowVars::bindExtern(234void WindowVars::bindExtern(
235 PlanState& planState,235 PlanState& planState,
236 const store::TempSeq_t& inputSeq,236 const store::TempSeq_t& inputSeq,
237 const ulong pos) const237 const u_long pos) const
238{238{
239 store::Item_t item;239 store::Item_t item;
240240
@@ -360,7 +360,7 @@
360bool StartClause::evaluate(360bool StartClause::evaluate(
361 PlanState& planState,361 PlanState& planState,
362 const store::TempSeq_t& inputSeq,362 const store::TempSeq_t& inputSeq,
363 const ulong pos) const363 const u_long pos) const
364{364{
365 theWindowVars.bindIntern(planState, inputSeq, pos);365 theWindowVars.bindIntern(planState, inputSeq, pos);
366366
@@ -376,7 +376,7 @@
376void StartClause::bindExtern(376void StartClause::bindExtern(
377 PlanState& planState,377 PlanState& planState,
378 const store::TempSeq_t& inputSeq,378 const store::TempSeq_t& inputSeq,
379 const ulong pos) const379 const u_long pos) const
380{380{
381 theWindowVars.bindExtern(planState, inputSeq, pos);381 theWindowVars.bindExtern(planState, inputSeq, pos);
382}382}
@@ -388,7 +388,7 @@
388void StartClause::bindIntern(388void StartClause::bindIntern(
389 PlanState& planState,389 PlanState& planState,
390 const store::TempSeq_t& inputSeq,390 const store::TempSeq_t& inputSeq,
391 const ulong pos) const391 const u_long pos) const
392{392{
393 theWindowVars.bindIntern(planState, inputSeq, pos);393 theWindowVars.bindIntern(planState, inputSeq, pos);
394}394}
@@ -512,7 +512,7 @@
512bool EndClause::evaluate(512bool EndClause::evaluate(
513 PlanState& planState,513 PlanState& planState,
514 const store::TempSeq_t& inputSeq,514 const store::TempSeq_t& inputSeq,
515 const ulong pos) const515 const u_long pos) const
516{516{
517 theWindowVars.bindIntern(planState, inputSeq, pos);517 theWindowVars.bindIntern(planState, inputSeq, pos);
518518
@@ -526,7 +526,7 @@
526void EndClause::bindIntern(526void EndClause::bindIntern(
527 PlanState& planState,527 PlanState& planState,
528 const store::TempSeq_t& inputSeq,528 const store::TempSeq_t& inputSeq,
529 const ulong pos) const529 const u_long pos) const
530{530{
531 theWindowVars.bindIntern(planState, inputSeq, pos);531 theWindowVars.bindIntern(planState, inputSeq, pos);
532}532}
@@ -538,7 +538,7 @@
538void EndClause::bindExtern(538void EndClause::bindExtern(
539 PlanState& planState,539 PlanState& planState,
540 const store::TempSeq_t& inputSeq,540 const store::TempSeq_t& inputSeq,
541 const ulong pos) const541 const u_long pos) const
542{542{
543 theWindowVars.bindExtern(planState, inputSeq, pos);543 theWindowVars.bindExtern(planState, inputSeq, pos);
544}544}
@@ -555,7 +555,7 @@
555{555{
556}556}
557557
558WindowDef::WindowDef(ulong aStartPos) : theStartPos(aStartPos), theEndPos(0)558WindowDef::WindowDef(u_long aStartPos) : theStartPos(aStartPos), theEndPos(0)
559{559{
560}560}
561561
@@ -600,7 +600,7 @@
600// //600// //
601/////////////////////////////////////////////////////////////////////////////////601/////////////////////////////////////////////////////////////////////////////////
602602
603const ulong WindowIterator::MAX_HISTORY = 2147483647; //TODO should be set platform dependent, but somebody hat comment out everything in platform.h!603const u_long WindowIterator::MAX_HISTORY = 2147483647; //TODO should be set platform dependent, but somebody hat comment out everything in platform.h!
604604
605605
606/***************************************************************************//**606/***************************************************************************//**
@@ -617,7 +617,7 @@
617 StartClause& startClause,617 StartClause& startClause,
618 EndClause& endClause,618 EndClause& endClause,
619 bool lazyEval,619 bool lazyEval,
620 ulong maxNeededHistory)620 u_long maxNeededHistory)
621 :621 :
622 Batcher<WindowIterator>(sctx, loc),622 Batcher<WindowIterator>(sctx, loc),
623 theWindowType(windowType),623 theWindowType(windowType),
@@ -759,8 +759,8 @@
759void WindowIterator::bindVariable(759void WindowIterator::bindVariable(
760 PlanState& planState,760 PlanState& planState,
761 store::TempSeq_t& inputSeq,761 store::TempSeq_t& inputSeq,
762 ulong aStartPos,762 u_long aStartPos,
763 ulong aEndPos) const763 u_long aEndPos) const
764{764{
765 xs_integer const lStartPos( aStartPos );765 xs_integer const lStartPos( aStartPos );
766 xs_integer const lEndPos( aEndPos );766 xs_integer const lEndPos( aEndPos );
@@ -848,7 +848,7 @@
848 state->theDomainSeq,848 state->theDomainSeq,
849 state->theCurWindow->theStartPos);849 state->theCurWindow->theStartPos);
850850
851 ulong lCurPos = state->theCurInputPos;851 u_long lCurPos = state->theCurInputPos;
852 if ( theEndClause.evaluate(planState,852 if ( theEndClause.evaluate(planState,
853 state->theDomainSeq,853 state->theDomainSeq,
854 lCurPos))854 lCurPos))
855855
=== modified file 'src/runtime/core/gflwor/window_iterator.h'
--- src/runtime/core/gflwor/window_iterator.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/gflwor/window_iterator.h 2012-12-24 23:26:24 +0000
@@ -98,12 +98,12 @@
98 void bindIntern(98 void bindIntern(
99 PlanState& planState,99 PlanState& planState,
100 const store::TempSeq_t& inSeq,100 const store::TempSeq_t& inSeq,
101 ulong pos) const;101 u_long pos) const;
102102
103 void bindExtern(103 void bindExtern(
104 PlanState& planState,104 PlanState& planState,
105 const store::TempSeq_t& inSeq,105 const store::TempSeq_t& inSeq,
106 ulong pos) const;106 u_long pos) const;
107};107};
108108
109109
@@ -150,17 +150,17 @@
150 bool evaluate(150 bool evaluate(
151 PlanState& planState,151 PlanState& planState,
152 const store::TempSeq_t& inSeq,152 const store::TempSeq_t& inSeq,
153 ulong pos) const;153 u_long pos) const;
154154
155 void bindIntern(155 void bindIntern(
156 PlanState& planState,156 PlanState& planState,
157 const store::TempSeq_t& inSeq,157 const store::TempSeq_t& inSeq,
158 ulong pos) const;158 u_long pos) const;
159159
160 void bindExtern(160 void bindExtern(
161 PlanState& planState,161 PlanState& planState,
162 const store::TempSeq_t& inSeq,162 const store::TempSeq_t& inSeq,
163 ulong pos) const;163 u_long pos) const;
164};164};
165165
166166
@@ -224,17 +224,17 @@
224 bool evaluate(224 bool evaluate(
225 PlanState& planState,225 PlanState& planState,
226 const store::TempSeq_t& inSeq,226 const store::TempSeq_t& inSeq,
227 ulong pos) const;227 u_long pos) const;
228228
229 void bindIntern(229 void bindIntern(
230 PlanState& planState,230 PlanState& planState,
231 const store::TempSeq_t& inSeq,231 const store::TempSeq_t& inSeq,
232 ulong pos) const;232 u_long pos) const;
233233
234 void bindExtern(234 void bindExtern(
235 PlanState& planState,235 PlanState& planState,
236 const store::TempSeq_t& inSeq,236 const store::TempSeq_t& inSeq,
237 ulong pos) const;237 u_long pos) const;
238};238};
239239
240240
@@ -255,11 +255,11 @@
255class WindowDef255class WindowDef
256{256{
257public:257public:
258 ulong theStartPos;258 u_long theStartPos;
259 ulong theEndPos;259 u_long theEndPos;
260260
261public:261public:
262 WindowDef(ulong aStartPos);262 WindowDef(u_long aStartPos);
263263
264 ~WindowDef();264 ~WindowDef();
265};265};
@@ -281,7 +281,7 @@
281281
282protected:282protected:
283 store::TempSeq_t theDomainSeq;283 store::TempSeq_t theDomainSeq;
284 ulong theCurInputPos;284 u_long theCurInputPos;
285 std::vector<WindowDef> theOpenWindows;285 std::vector<WindowDef> theOpenWindows;
286 std::vector<WindowDef>::iterator theCurWindow;286 std::vector<WindowDef>::iterator theCurWindow;
287287
@@ -315,7 +315,7 @@
315class WindowIterator : public Batcher<WindowIterator>315class WindowIterator : public Batcher<WindowIterator>
316{316{
317public:317public:
318 static const ulong MAX_HISTORY;318 static const u_long MAX_HISTORY;
319319
320 enum WindowType320 enum WindowType
321 {321 {
@@ -336,7 +336,7 @@
336 EndClause theEndClause;336 EndClause theEndClause;
337337
338 bool theLazyEval;338 bool theLazyEval;
339 ulong theMaxNeededHistory;339 u_long theMaxNeededHistory;
340340
341public:341public:
342 SERIALIZABLE_CLASS(WindowIterator);342 SERIALIZABLE_CLASS(WindowIterator);
@@ -360,7 +360,7 @@
360 StartClause& startClause,360 StartClause& startClause,
361 EndClause& endClause,361 EndClause& endClause,
362 bool lazyEval,362 bool lazyEval,
363 ulong maxNeededHistory = MAX_HISTORY);363 u_long maxNeededHistory = MAX_HISTORY);
364364
365 ~WindowIterator();365 ~WindowIterator();
366366
@@ -379,8 +379,8 @@
379 void bindVariable(379 void bindVariable(
380 PlanState& planState,380 PlanState& planState,
381 store::TempSeq_t& aInputSeq,381 store::TempSeq_t& aInputSeq,
382 ulong aStartPos,382 u_long aStartPos,
383 ulong aEndPos) const;383 u_long aEndPos) const;
384384
385 void doGarbageCollection(WindowState* lState) const;385 void doGarbageCollection(WindowState* lState) const;
386};386};
387387
=== modified file 'src/runtime/core/path.cpp'
--- src/runtime/core/path.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/core/path.cpp 2012-12-24 23:26:24 +0000
@@ -269,8 +269,8 @@
269********************************************************************************/269********************************************************************************/
270DescendantStepState::~DescendantStepState()270DescendantStepState::~DescendantStepState()
271{271{
272 ulong len = theCurrentPath.size();272 u_long len = theCurrentPath.size();
273 for (ulong i = 0; i < len; i++)273 for (u_long i = 0; i < len; i++)
274 {274 {
275 delete theCurrentPath[i].second;275 delete theCurrentPath[i].second;
276 }276 }
@@ -303,8 +303,8 @@
303********************************************************************************/303********************************************************************************/
304PathIteratorState::~PathIteratorState()304PathIteratorState::~PathIteratorState()
305{305{
306 ulong numSteps = theStepStates.size();306 u_long numSteps = theStepStates.size();
307 for (ulong i = 0; i < numSteps; i++)307 for (u_long i = 0; i < numSteps; i++)
308 delete theStepStates[i];308 delete theStepStates[i];
309}309}
310310
@@ -321,7 +321,7 @@
321321
322 theCurrentStep = 0;322 theCurrentStep = 0;
323323
324 for (ulong i = 0; i < theNumSteps; i++)324 for (u_long i = 0; i < theNumSteps; i++)
325 theStepStates[i]->reset();325 theStepStates[i]->reset();
326}326}
327327
@@ -331,8 +331,8 @@
331********************************************************************************/331********************************************************************************/
332PathIterator::~PathIterator() 332PathIterator::~PathIterator()
333{333{
334 ulong numSteps = theAxes.size();334 u_long numSteps = theAxes.size();
335 for (ulong i = 0; i < numSteps; i++)335 for (u_long i = 0; i < numSteps; i++)
336 delete theNodePreds[i];336 delete theNodePreds[i];
337}337}
338338
@@ -351,11 +351,11 @@
351 PathIteratorState* state;351 PathIteratorState* state;
352 state = StateTraitsImpl<PathIteratorState>::getState(planState, this->stateOffset);352 state = StateTraitsImpl<PathIteratorState>::getState(planState, this->stateOffset);
353353
354 ulong numSteps = theAxes.size();354 u_long numSteps = theAxes.size();
355 state->theNumSteps = numSteps;355 state->theNumSteps = numSteps;
356 state->theStepStates.resize(numSteps);356 state->theStepStates.resize(numSteps);
357357
358 for (ulong i = 0; i < numSteps; i++)358 for (u_long i = 0; i < numSteps; i++)
359 {359 {
360 switch (theAxes[i])360 switch (theAxes[i])
361 {361 {
@@ -402,7 +402,7 @@
402402
403bool PathIterator::nextImpl(store::Item_t& result, PlanState& planState) const403bool PathIterator::nextImpl(store::Item_t& result, PlanState& planState) const
404{404{
405 ulong curStep;405 u_long curStep;
406 axis_kind_t curAxis;406 axis_kind_t curAxis;
407 NodePredicate* curPred;407 NodePredicate* curPred;
408 store::Item* curResult;408 store::Item* curResult;
409409
=== modified file 'src/runtime/core/path.h'
--- src/runtime/core/path.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/path.h 2012-12-24 23:26:24 +0000
@@ -194,7 +194,7 @@
194class DescendantStepState : public PathStepState194class DescendantStepState : public PathStepState
195{195{
196public:196public:
197 ulong theTop;197 u_long theTop;
198 std::vector<std::pair<store::Item*, store::ChildrenIterator*> > theCurrentPath;198 std::vector<std::pair<store::Item*, store::ChildrenIterator*> > theCurrentPath;
199199
200public:200public:
@@ -266,9 +266,9 @@
266public:266public:
267 store::Item_t theContextNode; 267 store::Item_t theContextNode;
268268
269 ulong theCurrentStep;269 u_long theCurrentStep;
270270
271 ulong theNumSteps;271 u_long theNumSteps;
272272
273 std::vector<PathStepState*> theStepStates;273 std::vector<PathStepState*> theStepStates;
274274
275275
=== modified file 'src/runtime/core/path_iterators.cpp'
--- src/runtime/core/path_iterators.cpp 2012-10-12 21:07:51 +0000
+++ src/runtime/core/path_iterators.cpp 2012-12-24 23:26:24 +0000
@@ -1181,8 +1181,8 @@
1181********************************************************************************/1181********************************************************************************/
1182DescendantAxisState::~DescendantAxisState()1182DescendantAxisState::~DescendantAxisState()
1183{1183{
1184 ulong len = (ulong)theCurrentPath.size();1184 u_long len = (u_long)theCurrentPath.size();
1185 for (ulong i = 0; i < len; ++i)1185 for (u_long i = 0; i < len; ++i)
1186 {1186 {
1187 delete theCurrentPath[i].second;1187 delete theCurrentPath[i].second;
1188 }1188 }
@@ -1595,8 +1595,8 @@
1595 if (theAncestor.second != NULL)1595 if (theAncestor.second != NULL)
1596 delete theAncestor.second;1596 delete theAncestor.second;
15971597
1598 ulong len = (ulong)theCurrentPath.size();1598 u_long len = (u_long)theCurrentPath.size();
1599 for (ulong i = 0; i < len; ++i)1599 for (u_long i = 0; i < len; ++i)
1600 {1600 {
1601 delete theCurrentPath[i].second;1601 delete theCurrentPath[i].second;
1602 }1602 }
@@ -1616,7 +1616,7 @@
1616{1616{
1617 AxisState::reset(planState);1617 AxisState::reset(planState);
16181618
1619 for (ulong i = 0; i < theTop; ++i)1619 for (u_long i = 0; i < theTop; ++i)
1620 {1620 {
1621 theCurrentPath[i].second->close();1621 theCurrentPath[i].second->close();
1622 }1622 }
16231623
=== modified file 'src/runtime/core/path_iterators.h'
--- src/runtime/core/path_iterators.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/path_iterators.h 2012-12-24 23:26:24 +0000
@@ -603,7 +603,7 @@
603 typedef std::pair<const store::Item*, store::ChildrenIterator*> PathPair;603 typedef std::pair<const store::Item*, store::ChildrenIterator*> PathPair;
604604
605public:605public:
606 ulong theTop;606 u_long theTop;
607 std::vector<PathPair> theCurrentPath;607 std::vector<PathPair> theCurrentPath;
608608
609public:609public:
@@ -622,7 +622,7 @@
622622
623 void clear()623 void clear()
624 {624 {
625 for (ulong i = 0; i < theTop; ++i)625 for (u_long i = 0; i < theTop; ++i)
626 {626 {
627 theCurrentPath[i].second->close();627 theCurrentPath[i].second->close();
628 }628 }
@@ -788,7 +788,7 @@
788 PathPair theAncestor;788 PathPair theAncestor;
789 const store::Item* theAncestorChild;789 const store::Item* theAncestorChild;
790790
791 ulong theTop;791 u_long theTop;
792 std::vector<PathPair> theCurrentPath;792 std::vector<PathPair> theCurrentPath;
793793
794 PrecedingReverseAxisState();794 PrecedingReverseAxisState();
795795
=== modified file 'src/runtime/core/trycatch.h'
--- src/runtime/core/trycatch.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/trycatch.h 2012-12-24 23:26:24 +0000
@@ -65,7 +65,7 @@
65 };65 };
6666
67 public:67 public:
68 typedef std::map<ulong, std::vector<LetVarIter_t> > VarMap_t;68 typedef std::map<u_long, std::vector<LetVarIter_t> > VarMap_t;
6969
70 public:70 public:
71 std::vector<NodeNameTest_t> node_names;71 std::vector<NodeNameTest_t> node_names;
7272
=== modified file 'src/runtime/core/var_iterators.cpp'
--- src/runtime/core/var_iterators.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/core/var_iterators.cpp 2012-12-24 23:26:24 +0000
@@ -63,7 +63,7 @@
63 static_context* sctx,63 static_context* sctx,
64 const QueryLoc& loc,64 const QueryLoc& loc,
65 std::vector<PlanIter_t>& args,65 std::vector<PlanIter_t>& args,
66 ulong varid,66 u_long varid,
67 const store::Item_t& varName,67 const store::Item_t& varName,
68 bool isExtern,68 bool isExtern,
69 bool singleItem)69 bool singleItem)
@@ -267,7 +267,7 @@
267CtxVarIterator::CtxVarIterator(267CtxVarIterator::CtxVarIterator(
268 static_context* sctx,268 static_context* sctx,
269 const QueryLoc& loc,269 const QueryLoc& loc,
270 ulong varid,270 u_long varid,
271 const store::Item_t& varName,271 const store::Item_t& varName,
272 bool isLocal)272 bool isLocal)
273 :273 :
274274
=== modified file 'src/runtime/core/var_iterators.h'
--- src/runtime/core/var_iterators.h 2012-09-19 21:16:15 +0000
+++ src/runtime/core/var_iterators.h 2012-12-24 23:26:24 +0000
@@ -61,7 +61,7 @@
61 PlanIteratorState>61 PlanIteratorState>
62{62{
63private:63private:
64 ulong theVarId;64 u_long theVarId;
65 store::Item_t theVarName;65 store::Item_t theVarName;
66 bool theIsExternal;66 bool theIsExternal;
67 bool theSingleItem;67 bool theSingleItem;
@@ -80,12 +80,12 @@
80 static_context* sctx,80 static_context* sctx,
81 const QueryLoc& loc,81 const QueryLoc& loc,
82 std::vector<PlanIter_t>& args,82 std::vector<PlanIter_t>& args,
83 ulong varid,83 u_long varid,
84 const store::Item_t& varName,84 const store::Item_t& varName,
85 bool isExtern,85 bool isExtern,
86 bool singleItem);86 bool singleItem);
8787
88 ulong getVarId() const { return theVarId; }88 u_long getVarId() const { return theVarId; }
8989
90 const store::Item* getVarName() const { return theVarName.getp(); }90 const store::Item* getVarName() const { return theVarName.getp(); }
9191
@@ -109,7 +109,7 @@
109 PlanIteratorState>109 PlanIteratorState>
110{110{
111private:111private:
112 ulong theVarId;112 u_long theVarId;
113 store::Item_t theVarName;113 store::Item_t theVarName;
114 bool theIsLocal;114 bool theIsLocal;
115 bool theSingleItem;115 bool theSingleItem;
@@ -127,7 +127,7 @@
127 CtxVarAssignIterator(127 CtxVarAssignIterator(
128 static_context* sctx,128 static_context* sctx,
129 const QueryLoc& loc,129 const QueryLoc& loc,
130 ulong varid,130 u_long varid,
131 const store::Item_t& varName,131 const store::Item_t& varName,
132 bool isLocal,132 bool isLocal,
133 PlanIter_t& arg) 133 PlanIter_t& arg)
@@ -140,7 +140,7 @@
140 {140 {
141 }141 }
142142
143 ulong getVarId() const { return theVarId; }143 u_long getVarId() const { return theVarId; }
144144
145 const store::Item* getVarName() const { return theVarName.getp(); }145 const store::Item* getVarName() const { return theVarName.getp(); }
146146
@@ -163,7 +163,7 @@
163 PlanIteratorState>163 PlanIteratorState>
164{164{
165private:165private:
166 ulong theVarId;166 u_long theVarId;
167 store::Item_t theVarName;167 store::Item_t theVarName;
168168
169public:169public:
@@ -179,7 +179,7 @@
179 CtxVarIsSetIterator(179 CtxVarIsSetIterator(
180 static_context* sctx,180 static_context* sctx,
181 const QueryLoc& loc,181 const QueryLoc& loc,
182 ulong varid,182 u_long varid,
183 const store::Item_t& varName) 183 const store::Item_t& varName)
184 :184 :
185 NoaryBaseIterator<CtxVarIsSetIterator, PlanIteratorState>(sctx, loc),185 NoaryBaseIterator<CtxVarIsSetIterator, PlanIteratorState>(sctx, loc),
@@ -188,7 +188,7 @@
188 {188 {
189 }189 }
190190
191 ulong getVarId() const { return theVarId; }191 u_long getVarId() const { return theVarId; }
192192
193 const store::Item* getVarName() const { return theVarName.getp(); }193 const store::Item* getVarName() const { return theVarName.getp(); }
194194
@@ -243,7 +243,7 @@
243class CtxVarIterator : public NoaryBaseIterator<CtxVarIterator, CtxVarState>243class CtxVarIterator : public NoaryBaseIterator<CtxVarIterator, CtxVarState>
244{244{
245protected:245protected:
246 ulong theVarId;246 u_long theVarId;
247 store::Item_t theVarName;247 store::Item_t theVarName;
248 bool theIsLocal;248 bool theIsLocal;
249249
@@ -265,13 +265,13 @@
265 CtxVarIterator(265 CtxVarIterator(
266 static_context* sctx,266 static_context* sctx,
267 const QueryLoc& loc,267 const QueryLoc& loc,
268 ulong varid,268 u_long varid,
269 const store::Item_t& varName,269 const store::Item_t& varName,
270 bool local);270 bool local);
271271
272 virtual ~CtxVarIterator() {}272 virtual ~CtxVarIterator() {}
273273
274 ulong getVarId() const { return theVarId; }274 u_long getVarId() const { return theVarId; }
275275
276 const store::Item* getVarName() const { return theVarName.getp(); }276 const store::Item* getVarName() const { return theVarName.getp(); }
277277
278278
=== modified file 'src/runtime/eval/eval.cpp'
--- src/runtime/eval/eval.cpp 2012-10-24 11:32:56 +0000
+++ src/runtime/eval/eval.cpp 2012-12-24 23:26:24 +0000
@@ -155,7 +155,7 @@
155 state->dctx.reset(evalDctx);155 state->dctx.reset(evalDctx);
156156
157 // Import the outer environment.157 // Import the outer environment.
158 ulong maxOuterVarId;158 u_long maxOuterVarId;
159 importOuterEnv(planState, evalCCB, importSctx, evalDctx, maxOuterVarId);159 importOuterEnv(planState, evalCCB, importSctx, evalDctx, maxOuterVarId);
160160
161 // If we are here after a reset, we must set state->thePlanWrapper to NULL161 // If we are here after a reset, we must set state->thePlanWrapper to NULL
@@ -219,7 +219,7 @@
219 CompilerCB* evalCCB,219 CompilerCB* evalCCB,
220 static_context* importSctx,220 static_context* importSctx,
221 dynamic_context* evalDctx,221 dynamic_context* evalDctx,
222 ulong& maxOuterVarId) const222 u_long& maxOuterVarId) const
223{223{
224 maxOuterVarId = 1;224 maxOuterVarId = 1;
225225
@@ -245,7 +245,7 @@
245 if (!outerVar.isSet())245 if (!outerVar.isSet())
246 continue;246 continue;
247247
248 ulong outerVarId = static_cast<ulong>(i);248 u_long outerVarId = static_cast<u_long>(i);
249249
250 if (outerVarId > maxOuterVarId)250 if (outerVarId > maxOuterVarId)
251 maxOuterVarId = outerVarId;251 maxOuterVarId = outerVarId;
@@ -305,7 +305,7 @@
305 VarInfo* outerGlobalVar = outerSctx->lookup_var(theOuterVarNames[i]);305 VarInfo* outerGlobalVar = outerSctx->lookup_var(theOuterVarNames[i]);
306 ZORBA_ASSERT(outerGlobalVar);306 ZORBA_ASSERT(outerGlobalVar);
307307
308 ulong outerGlobalVarId = outerGlobalVar->getId();308 u_long outerGlobalVarId = outerGlobalVar->getId();
309309
310 ve->set_unique_id(outerGlobalVarId);310 ve->set_unique_id(outerGlobalVarId);
311 }311 }
@@ -351,7 +351,7 @@
351 if (!innerVar->isExternal())351 if (!innerVar->isExternal())
352 continue;352 continue;
353353
354 ulong innerVarId = innerVar->getId();354 u_long innerVarId = innerVar->getId();
355355
356 VarInfo* outerVar = importSctx->lookup_var(innerVar->getName());356 VarInfo* outerVar = importSctx->lookup_var(innerVar->getName());
357357
@@ -389,7 +389,7 @@
389PlanIter_t EvalIterator::compile(389PlanIter_t EvalIterator::compile(
390 CompilerCB* ccb,390 CompilerCB* ccb,
391 const zstring& query,391 const zstring& query,
392 ulong maxOuterVarId) const392 u_long maxOuterVarId) const
393{393{
394 std::stringstream os;394 std::stringstream os;
395395
396396
=== modified file 'src/runtime/eval/eval.h'
--- src/runtime/eval/eval.h 2012-09-19 21:16:15 +0000
+++ src/runtime/eval/eval.h 2012-12-24 23:26:24 +0000
@@ -128,7 +128,7 @@
128 CompilerCB* evalCCB,128 CompilerCB* evalCCB,
129 static_context* importSctx,129 static_context* importSctx,
130 dynamic_context* evalDctx,130 dynamic_context* evalDctx,
131 ulong& maxOuterVarId) const;131 u_long& maxOuterVarId) const;
132132
133 void setExternalVariables(133 void setExternalVariables(
134 CompilerCB* ccb,134 CompilerCB* ccb,
@@ -139,7 +139,7 @@
139 PlanIter_t compile(139 PlanIter_t compile(
140 CompilerCB* ccb,140 CompilerCB* ccb,
141 const zstring& query,141 const zstring& query,
142 ulong maxOuterVarId) const;142 u_long maxOuterVarId) const;
143};143};
144144
145145
146146
=== modified file 'src/runtime/indexing/doc_indexer.h'
--- src/runtime/indexing/doc_indexer.h 2012-09-19 21:16:15 +0000
+++ src/runtime/indexing/doc_indexer.h 2012-12-24 23:26:24 +0000
@@ -38,7 +38,7 @@
38 PlanIter_t theIndexerPlan;38 PlanIter_t theIndexerPlan;
3939
40 store::Item_t theNodeVarName;40 store::Item_t theNodeVarName;
41 ulong theNodeVarId; 41 u_long theNodeVarId;
4242
43 dynamic_context * theDctx;43 dynamic_context * theDctx;
44 store::Iterator_t thePlanWrapper;44 store::Iterator_t thePlanWrapper;
4545
=== modified file 'src/runtime/indexing/index_ddl.cpp'
--- src/runtime/indexing/index_ddl.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/indexing/index_ddl.cpp 2012-12-24 23:26:24 +0000
@@ -74,7 +74,7 @@
74 const QueryLoc& loc,74 const QueryLoc& loc,
75 TypeManager* tm,75 TypeManager* tm,
76 const IndexDecl* indexDecl,76 const IndexDecl* indexDecl,
77 ulong keyNo,77 u_long keyNo,
78 store::Item_t& searchKey)78 store::Item_t& searchKey)
79{79{
80 RootTypeManager& rtm = GENV_TYPESYSTEM;80 RootTypeManager& rtm = GENV_TYPESYSTEM;
@@ -601,13 +601,13 @@
601 store::Item_t qnameItem;601 store::Item_t qnameItem;
602 store::Item_t keyItem;602 store::Item_t keyItem;
603 store::IndexCondition_t cond;603 store::IndexCondition_t cond;
604 ulong numChildren = (ulong)theChildren.size();604 u_long numChildren = (u_long)theChildren.size();
605 ulong i;605 u_long i;
606 bool status;606 bool status;
607 TypeManager* tm = theSctx->get_typemanager();607 TypeManager* tm = theSctx->get_typemanager();
608 RootTypeManager& rtm = GENV_TYPESYSTEM;608 RootTypeManager& rtm = GENV_TYPESYSTEM;
609 xs_integer lSkip = xs_integer::zero();609 xs_integer lSkip = xs_integer::zero();
610 ulong lAmountNonKeyParams = (theSkip ? 2 : 1);610 u_long lAmountNonKeyParams = (theSkip ? 2 : 1);
611611
612 try612 try
613 {613 {
@@ -795,7 +795,7 @@
795{795{
796 store::Item_t qnameItem;796 store::Item_t qnameItem;
797 store::Item_t keyItem;797 store::Item_t keyItem;
798 ulong numChildren = (ulong)theChildren.size();798 u_long numChildren = (u_long)theChildren.size();
799 bool status;799 bool status;
800800
801 try801 try
@@ -996,12 +996,12 @@
996 store::Item_t qname;996 store::Item_t qname;
997 IndexDecl_t indexDecl;997 IndexDecl_t indexDecl;
998 store::IndexCondition_t cond;998 store::IndexCondition_t cond;
999 ulong numChildren = (ulong)theChildren.size();999 u_long numChildren = (u_long)theChildren.size();
1000 bool status;1000 bool status;
1001 TypeManager* tm = theSctx->get_typemanager();1001 TypeManager* tm = theSctx->get_typemanager();
1002 RootTypeManager& rtm = GENV_TYPESYSTEM;1002 RootTypeManager& rtm = GENV_TYPESYSTEM;
1003 xs_integer lSkip = xs_integer::zero();1003 xs_integer lSkip = xs_integer::zero();
1004 ulong lAmountNonKeyParams = (theSkip ? 2 : 1);1004 u_long lAmountNonKeyParams = (theSkip ? 2 : 1);
10051005
1006 try1006 try
1007 {1007 {
@@ -1073,8 +1073,8 @@
1073 lSkip = xs_integer::zero();1073 lSkip = xs_integer::zero();
1074 }1074 }
10751075
1076 ulong keyNo;1076 u_long keyNo;
1077 ulong i;1077 u_long i;
1078 for (i = lAmountNonKeyParams, keyNo = 0; i < numChildren; i += 6, ++keyNo) 1078 for (i = lAmountNonKeyParams, keyNo = 0; i < numChildren; i += 6, ++keyNo)
1079 {1079 {
1080 store::Item_t tempLeft;1080 store::Item_t tempLeft;
@@ -1551,7 +1551,7 @@
1551 TypeManager* tm = theSctx->get_typemanager();1551 TypeManager* tm = theSctx->get_typemanager();
1552 RootTypeManager& rtm = GENV_TYPESYSTEM;1552 RootTypeManager& rtm = GENV_TYPESYSTEM;
15531553
1554 ulong childIdx = (haveLower ? 1 : 2);1554 u_long childIdx = (haveLower ? 1 : 2);
15551555
1556 assert(!(haveLower && haveUpper));1556 assert(!(haveLower && haveUpper));
15571557
15581558
=== modified file 'src/runtime/introspection/pregenerated/sctx.h'
--- src/runtime/introspection/pregenerated/sctx.h 2012-10-08 12:09:36 +0000
+++ src/runtime/introspection/pregenerated/sctx.h 2012-12-24 23:26:24 +0000
@@ -44,7 +44,7 @@
44{44{
45public:45public:
46 store::NsBindings theBindings; //vector of namespace bindings46 store::NsBindings theBindings; //vector of namespace bindings
47 ulong thePosition; //current position47 u_long thePosition; //current position
4848
49 StaticNamespacesIteratorState();49 StaticNamespacesIteratorState();
5050
@@ -328,7 +328,7 @@
328{328{
329public:329public:
330 std::vector < zstring > theDocuments; //vector of document URIs330 std::vector < zstring > theDocuments; //vector of document URIs
331 ulong thePosition; //current position331 u_long thePosition; //current position
332332
333 StaticallyKnownDocumentsIteratorState();333 StaticallyKnownDocumentsIteratorState();
334334
@@ -406,7 +406,7 @@
406{406{
407public:407public:
408 std::vector < std::string > theCollations; //vector of collation uris408 std::vector < std::string > theCollations; //vector of collation uris
409 ulong thePosition; //current position409 u_long thePosition; //current position
410410
411 StaticallyKnownCollationsIteratorState();411 StaticallyKnownCollationsIteratorState();
412412
@@ -612,7 +612,7 @@
612{612{
613public:613public:
614 std::vector < function *> theFunctions; //vector of functions614 std::vector < function *> theFunctions; //vector of functions
615 ulong thePosition; //current position615 u_long thePosition; //current position
616616
617 FunctionNamesIteratorState();617 FunctionNamesIteratorState();
618618
@@ -966,7 +966,7 @@
966{966{
967public:967public:
968 const function* theFunction; //the function968 const function* theFunction; //the function
969 ulong thePosition; //current position969 u_long thePosition; //current position
970970
971 FunctionAnnotationsIteratorState();971 FunctionAnnotationsIteratorState();
972972
973973
=== modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp'
--- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp 2012-12-24 23:26:24 +0000
@@ -205,7 +205,7 @@
205 throw XQUERY_EXCEPTION(205 throw XQUERY_EXCEPTION(
206 err::XQDY0027,206 err::XQDY0027,
207 ERROR_PARAMS(lSb.str()),207 ERROR_PARAMS(lSb.str()),
208 ERROR_LOC( loc ));208 ERROR_LOC( aLoc ));
209 }209 }
210#endif210#endif
211 }211 }
@@ -220,7 +220,7 @@
220 throw XQUERY_EXCEPTION(220 throw XQUERY_EXCEPTION(
221 err::XQDY0027,221 err::XQDY0027,
222 ERROR_PARAMS(lSb.str()),222 ERROR_PARAMS(lSb.str()),
223 ERROR_LOC( loc ));223 ERROR_LOC( aLoc ));
224 }224 }
225#endif225#endif
226 }226 }
227227
=== modified file 'src/runtime/sequences/SequencesImpl.cpp'
--- src/runtime/sequences/SequencesImpl.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/sequences/SequencesImpl.cpp 2012-12-24 23:26:24 +0000
@@ -286,7 +286,7 @@
286 store::Item* attr = 0;286 store::Item* attr = 0;
287 store::Item_t tmp;287 store::Item_t tmp;
288 bool isMatchingId;288 bool isMatchingId;
289 ulong i;289 u_long i;
290290
291 FnIdIteratorState *state;291 FnIdIteratorState *state;
292 DEFAULT_STACK_INIT(FnIdIteratorState, state, planState);292 DEFAULT_STACK_INIT(FnIdIteratorState, state, planState);
@@ -420,7 +420,7 @@
420 store::Item* attr = 0;420 store::Item* attr = 0;
421 store::Item_t tmp;421 store::Item_t tmp;
422 bool isMatchingId;422 bool isMatchingId;
423 ulong i;423 u_long i;
424424
425 FnElementWithIdIteratorState* state;425 FnElementWithIdIteratorState* state;
426 DEFAULT_STACK_INIT(FnElementWithIdIteratorState, state, planState);426 DEFAULT_STACK_INIT(FnElementWithIdIteratorState, state, planState);
@@ -561,7 +561,7 @@
561 store::Iterator_t typedValueIte;561 store::Iterator_t typedValueIte;
562562
563 bool isMatchingId;563 bool isMatchingId;
564 ulong i;564 u_long i;
565565
566 std::vector<zstring> idrefs;566 std::vector<zstring> idrefs;
567567
568568
=== modified file 'src/runtime/sequences/sequences_impl.cpp'
--- src/runtime/sequences/sequences_impl.cpp 2012-10-16 14:30:02 +0000
+++ src/runtime/sequences/sequences_impl.cpp 2012-12-24 23:26:24 +0000
@@ -1211,7 +1211,7 @@
1211bool FnCountIterator::nextImpl(store::Item_t& result, PlanState& planState) const1211bool FnCountIterator::nextImpl(store::Item_t& result, PlanState& planState) const
1212{1212{
1213 store::Item_t lSequenceItem;1213 store::Item_t lSequenceItem;
1214 ulong lCount = 0;1214 u_long lCount = 0;
12151215
1216 PlanIteratorState* state;1216 PlanIteratorState* state;
1217 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);1217 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
12181218
=== modified file 'src/runtime/spec/codegen-cpp.xq'
--- src/runtime/spec/codegen-cpp.xq 2012-09-19 21:16:15 +0000
+++ src/runtime/spec/codegen-cpp.xq 2012-12-24 23:26:24 +0000
@@ -161,7 +161,7 @@
161 fn:exists($function/@propagesOne))161 fn:exists($function/@propagesOne))
162 then162 then
163 concat (163 concat (
164 'bool ', $name, '::propagatesInputToOutput ( ulong ', $param, ') const {',164 'bool ', $name, '::propagatesInputToOutput ( u_long ', $param, ') const {',
165 $gen:newline,165 $gen:newline,
166 $gen:indent, $body,166 $gen:indent, $body,
167 $gen:newline,167 $gen:newline,
168168
=== modified file 'src/runtime/spec/introspection/sctx.xml'
--- src/runtime/spec/introspection/sctx.xml 2012-09-19 21:16:15 +0000
+++ src/runtime/spec/introspection/sctx.xml 2012-12-24 23:26:24 +0000
@@ -37,7 +37,7 @@
37 <zorba:state generateReset="false" generateDestructor="false">37 <zorba:state generateReset="false" generateDestructor="false">
38 <zorba:member type="store::NsBindings" name="theBindings"38 <zorba:member type="store::NsBindings" name="theBindings"
39 brief="vector of namespace bindings"/>39 brief="vector of namespace bindings"/>
40 <zorba:member type="ulong" name="thePosition" brief="current position"/>40 <zorba:member type="u_long" name="thePosition" brief="current position"/>
41 </zorba:state>41 </zorba:state>
4242
43</zorba:iterator>43</zorba:iterator>
@@ -193,7 +193,7 @@
193 <zorba:state generateReset="false" generateDestructor="false">193 <zorba:state generateReset="false" generateDestructor="false">
194 <zorba:member type="std::vector &lt; zstring &gt;" name="theDocuments"194 <zorba:member type="std::vector &lt; zstring &gt;" name="theDocuments"
195 brief="vector of document URIs"/>195 brief="vector of document URIs"/>
196 <zorba:member type="ulong" name="thePosition" brief="current position"/>196 <zorba:member type="u_long" name="thePosition" brief="current position"/>
197 </zorba:state>197 </zorba:state>
198198
199</zorba:iterator>199</zorba:iterator>
@@ -238,7 +238,7 @@
238 <zorba:state generateReset="false" generateDestructor="false">238 <zorba:state generateReset="false" generateDestructor="false">
239 <zorba:member type="std::vector &lt; std::string &gt;" name="theCollations"239 <zorba:member type="std::vector &lt; std::string &gt;" name="theCollations"
240 brief="vector of collation uris"/>240 brief="vector of collation uris"/>
241 <zorba:member type="ulong" name="thePosition" brief="current position"/>241 <zorba:member type="u_long" name="thePosition" brief="current position"/>
242 </zorba:state>242 </zorba:state>
243243
244</zorba:iterator>244</zorba:iterator>
@@ -358,7 +358,7 @@
358 <zorba:state generateReset="false" generateDestructor="false">358 <zorba:state generateReset="false" generateDestructor="false">
359 <zorba:member type="std::vector &lt; function *&gt;" name="theFunctions"359 <zorba:member type="std::vector &lt; function *&gt;" name="theFunctions"
360 brief="vector of functions"/>360 brief="vector of functions"/>
361 <zorba:member type="ulong" name="thePosition" brief="current position"/>361 <zorba:member type="u_long" name="thePosition" brief="current position"/>
362 </zorba:state>362 </zorba:state>
363363
364</zorba:iterator>364</zorba:iterator>
@@ -552,7 +552,7 @@
552 <zorba:state generateReset="false" generateDestructor="false">552 <zorba:state generateReset="false" generateDestructor="false">
553 <zorba:member type="const function*" name="theFunction"553 <zorba:member type="const function*" name="theFunction"
554 brief="the function"/>554 brief="the function"/>
555 <zorba:member type="ulong" name="thePosition" brief="current position"/>555 <zorba:member type="u_long" name="thePosition" brief="current position"/>
556 </zorba:state>556 </zorba:state>
557557
558</zorba:iterator>558</zorba:iterator>
559559
=== modified file 'src/runtime/store/maps_impl.cpp'
--- src/runtime/store/maps_impl.cpp 2012-10-15 13:35:59 +0000
+++ src/runtime/store/maps_impl.cpp 2012-12-24 23:26:24 +0000
@@ -315,7 +315,7 @@
315 store::Item_t lQName;315 store::Item_t lQName;
316 std::vector<store::Item_t> lKey;316 std::vector<store::Item_t> lKey;
317 store::Index* lIndex;317 store::Index* lIndex;
318 ulong i;318 u_long i;
319 store::Item_t lKeyItem;319 store::Item_t lKeyItem;
320 store::IndexSpecification lSpec;320 store::IndexSpecification lSpec;
321321
@@ -476,7 +476,7 @@
476 store::Item_t lQName;476 store::Item_t lQName;
477 std::vector<store::Item_t> lKey;477 std::vector<store::Item_t> lKey;
478 store::Index* lIndex;478 store::Index* lIndex;
479 ulong i;479 u_long i;
480 store::Item_t lKeyItem;480 store::Item_t lKeyItem;
481 std::auto_ptr<store::PUL> lPul;481 std::auto_ptr<store::PUL> lPul;
482 store::IndexSpecification lSpec;482 store::IndexSpecification lSpec;
483483
=== modified file 'src/runtime/update/update.cpp'
--- src/runtime/update/update.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/update/update.cpp 2012-12-24 23:26:24 +0000
@@ -121,8 +121,8 @@
121 store::Item_t source;121 store::Item_t source;
122 std::vector<store::Item_t> attrs(16);122 std::vector<store::Item_t> attrs(16);
123 std::vector<store::Item_t> nodes(16);123 std::vector<store::Item_t> nodes(16);
124 ulong numAttrs = 0;124 u_long numAttrs = 0;
125 ulong numNodes = 0;125 u_long numNodes = 0;
126 std::auto_ptr<store::PUL> pul;126 std::auto_ptr<store::PUL> pul;
127 store::Item_t temp;127 store::Item_t temp;
128128
@@ -202,7 +202,7 @@
202 {202 {
203 attrs.resize(numAttrs);203 attrs.resize(numAttrs);
204204
205 for (ulong i = 0; i < numAttrs; ++i)205 for (u_long i = 0; i < numAttrs; ++i)
206 attrs[i] = attrs[i]->copy(NULL, lCopyMode);206 attrs[i] = attrs[i]->copy(NULL, lCopyMode);
207207
208 pul->addInsertAttributes(&loc, parent, attrs);208 pul->addInsertAttributes(&loc, parent, attrs);
@@ -212,7 +212,7 @@
212 {212 {
213 nodes.resize(numNodes);213 nodes.resize(numNodes);
214214
215 for (ulong i = 0; i < numNodes; ++i)215 for (u_long i = 0; i < numNodes; ++i)
216 nodes[i] = nodes[i]->copy(NULL, lCopyMode);216 nodes[i] = nodes[i]->copy(NULL, lCopyMode);
217217
218 if (theType == store::UpdateConsts::BEFORE)218 if (theType == store::UpdateConsts::BEFORE)
@@ -277,7 +277,7 @@
277 {277 {
278 attrs.resize(numAttrs);278 attrs.resize(numAttrs);
279279
280 for (ulong i = 0; i < numAttrs; ++i)280 for (u_long i = 0; i < numAttrs; ++i)
281 attrs[i] = attrs[i]->copy(NULL, lCopyMode);281 attrs[i] = attrs[i]->copy(NULL, lCopyMode);
282282
283 pul->addInsertAttributes(&loc, target, attrs);283 pul->addInsertAttributes(&loc, target, attrs);
@@ -287,7 +287,7 @@
287 {287 {
288 nodes.resize(numNodes);288 nodes.resize(numNodes);
289289
290 for (ulong i = 0; i < numNodes; ++i)290 for (u_long i = 0; i < numNodes; ++i)
291 nodes[i] = nodes[i]->copy(NULL, lCopyMode);291 nodes[i] = nodes[i]->copy(NULL, lCopyMode);
292292
293 if (theType == store::UpdateConsts::INTO)293 if (theType == store::UpdateConsts::INTO)
@@ -380,7 +380,7 @@
380 store::Item_t lParent;380 store::Item_t lParent;
381 store::Item_t temp;381 store::Item_t temp;
382 std::vector<store::Item_t> lNodes(16);382 std::vector<store::Item_t> lNodes(16);
383 ulong lNumNodes = 0;383 u_long lNumNodes = 0;
384 std::auto_ptr<store::PUL> lPul;384 std::auto_ptr<store::PUL> lPul;
385385
386 store::CopyMode lCopyMode;386 store::CopyMode lCopyMode;
387387
=== modified file 'src/runtime/visitors/printer_visitor_impl.cpp'
--- src/runtime/visitors/printer_visitor_impl.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/visitors/printer_visitor_impl.cpp 2012-12-24 23:26:24 +0000
@@ -775,8 +775,8 @@
775 {775 {
776 std::ostringstream str;776 std::ostringstream str;
777777
778 ulong numRefs = (ulong)posRefs.size();778 u_long numRefs = (u_long)posRefs.size();
779 for (ulong i = 0; i < numRefs; i++)779 for (u_long i = 0; i < numRefs; i++)
780 {780 {
781 str << posRefs[i].getp();781 str << posRefs[i].getp();
782 if (i < numRefs-1)782 if (i < numRefs-1)
@@ -1004,8 +1004,8 @@
10041004
1005 std::ostringstream str;1005 std::ostringstream str;
10061006
1007 ulong numRefs = (ulong)varRefs.size();1007 u_long numRefs = (u_long)varRefs.size();
1008 for (ulong i = 0; i < numRefs; i++)1008 for (u_long i = 0; i < numRefs; i++)
1009 {1009 {
1010 str << varRefs[i].getp();1010 str << varRefs[i].getp();
1011 if (i < numRefs-1)1011 if (i < numRefs-1)
10121012
=== modified file 'src/store/api/item_factory.h'
--- src/store/api/item_factory.h 2012-09-19 21:16:15 +0000
+++ src/store/api/item_factory.h 2012-12-24 23:26:24 +0000
@@ -384,7 +384,7 @@
384 * Specification: [http://www.w3.org/TR/xmlschema-2/#dateTime]384 * Specification: [http://www.w3.org/TR/xmlschema-2/#dateTime]
385 * @param value string representation of the value385 * @param value string representation of the value
386 */386 */
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;
388388
389 /**389 /**
390 * Specification: [http://www.w3.org/TR/xpath-functions/] Section 5.2390 * Specification: [http://www.w3.org/TR/xpath-functions/] Section 5.2
@@ -408,7 +408,7 @@
408 * Specification: [http://www.w3.org/TR/xmlschema-2/#date]408 * Specification: [http://www.w3.org/TR/xmlschema-2/#date]
409 * @param value string representation of the value409 * @param value string representation of the value
410 */410 */
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;
412412
413 /**413 /**
414 *414 *
@@ -419,7 +419,7 @@
419 * Specification: [http://www.w3.org/TR/xmlschema-2/#time]419 * Specification: [http://www.w3.org/TR/xmlschema-2/#time]
420 * @param value string representation of the value420 * @param value string representation of the value
421 */421 */
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;
423423
424 /**424 /**
425 * @param hour425 * @param hour
@@ -447,7 +447,7 @@
447 * Specification: [http://www.w3.org/TR/xmlschema-2/#gDay]447 * Specification: [http://www.w3.org/TR/xmlschema-2/#gDay]
448 * @param value string representation of the value448 * @param value string representation of the value
449 */449 */
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;
451451
452 /**452 /**
453 * @param day453 * @param day
@@ -460,7 +460,7 @@
460 * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonth]460 * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonth]
461 * @param value string representation of the value461 * @param value string representation of the value
462 */462 */
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;
464464
465 /**465 /**
466 * @param month466 * @param month
@@ -473,7 +473,7 @@
473 * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonthDay]473 * Specification: [http://www.w3.org/TR/xmlschema-2/#gMonthDay]
474 * @param value string representation of the value474 * @param value string representation of the value
475 */475 */
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;
477477
478 /**478 /**
479 * @param month479 * @param month
@@ -487,7 +487,7 @@
487 * Specification: [http://www.w3.org/TR/xmlschema-2/#gYear]487 * Specification: [http://www.w3.org/TR/xmlschema-2/#gYear]
488 * @param value string representation of the value488 * @param value string representation of the value
489 */489 */
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;
491491
492 /**492 /**
493 * @param year493 * @param year
@@ -500,7 +500,7 @@
500 * Specification: [http://www.w3.org/TR/xmlschema-2/#gYearMonth]500 * Specification: [http://www.w3.org/TR/xmlschema-2/#gYearMonth]
501 * @param value string representation of the value501 * @param value string representation of the value
502 */502 */
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;
504504
505 /**505 /**
506 * @param year506 * @param year
@@ -512,17 +512,17 @@
512512
513 virtual bool createYearMonthDuration(Item_t& result, xs_yearMonthDuration* value ) = 0;513 virtual bool createYearMonthDuration(Item_t& result, xs_yearMonthDuration* value ) = 0;
514514
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;
516516
517 virtual bool createDayTimeDuration(Item_t& result, xs_dayTimeDuration* value ) = 0;517 virtual bool createDayTimeDuration(Item_t& result, xs_dayTimeDuration* value ) = 0;
518518
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;
520520
521 /**521 /**
522 * Specification: [http://www.w3.org/TR/xmlschema-2/#duration]522 * Specification: [http://www.w3.org/TR/xmlschema-2/#duration]
523 * @param value string representation of the value523 * @param value string representation of the value
524 */524 */
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;
526526
527 /**527 /**
528 * @param years528 * @param years
529529
=== modified file 'src/store/api/item_handle.h'
--- src/store/api/item_handle.h 2012-09-19 21:16:15 +0000
+++ src/store/api/item_handle.h 2012-12-24 23:26:24 +0000
@@ -183,14 +183,6 @@
183 return tmp;183 return tmp;
184 }184 }
185185
186public:
187 std::string debug() const
188 {
189 std::ostringstream oss;
190 oss << "ItemHandle[refcount=" << p->getRefCount() << ']';
191 return oss.str();
192 }
193
194protected:186protected:
195 template <class otherT> ItemHandle& assign(const ItemHandle<otherT>& rhs)187 template <class otherT> ItemHandle& assign(const ItemHandle<otherT>& rhs)
196 {188 {
197189
=== modified file 'src/store/naive/atomic_items.cpp'
--- src/store/naive/atomic_items.cpp 2012-11-17 01:08:54 +0000
+++ src/store/naive/atomic_items.cpp 2012-12-24 23:26:24 +0000
@@ -1106,7 +1106,7 @@
1106********************************************************************************/1106********************************************************************************/
11071107
1108StructuralAnyUriItem::StructuralAnyUriItem(1108StructuralAnyUriItem::StructuralAnyUriItem(
1109 ulong collectionId,1109 u_long collectionId,
1110 const TreeId& treeId, 1110 const TreeId& treeId,
1111 store::StoreConsts::NodeKind nodeKind,1111 store::StoreConsts::NodeKind nodeKind,
1112 const OrdPath& ordPath)1112 const OrdPath& ordPath)
@@ -1129,7 +1129,7 @@
1129 theEncodedValue.take(value);1129 theEncodedValue.take(value);
1130 std::istringstream input(theEncodedValue.str());1130 std::istringstream input(theEncodedValue.str());
11311131
1132 ulong prefixlen = (ulong)strlen("zorba:");1132 u_long prefixlen = (u_long)strlen("zorba:");
11331133
1134 input.width(prefixlen);1134 input.width(prefixlen);
11351135
11361136
=== modified file 'src/store/naive/atomic_items.h'
--- src/store/naive/atomic_items.h 2012-10-08 12:09:36 +0000
+++ src/store/naive/atomic_items.h 2012-12-24 23:26:24 +0000
@@ -704,7 +704,7 @@
704class StructuralAnyUriItem : public AtomicItem704class StructuralAnyUriItem : public AtomicItem
705{705{
706protected:706protected:
707 ulong theCollectionId;707 u_long theCollectionId;
708 TreeId theTreeId;708 TreeId theTreeId;
709 store::StoreConsts::NodeKind theNodeKind;709 store::StoreConsts::NodeKind theNodeKind;
710 OrdPath theOrdPath;710 OrdPath theOrdPath;
@@ -837,7 +837,7 @@
837 StructuralAnyUriItem(zstring& value);837 StructuralAnyUriItem(zstring& value);
838838
839 StructuralAnyUriItem(839 StructuralAnyUriItem(
840 ulong collectionId,840 u_long collectionId,
841 const TreeId& treeId,841 const TreeId& treeId,
842 store::StoreConsts::NodeKind nodeKind,842 store::StoreConsts::NodeKind nodeKind,
843 const OrdPath& ordPath);843 const OrdPath& ordPath);
844844
=== modified file 'src/store/naive/collection.cpp'
--- src/store/naive/collection.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/collection.cpp 2012-12-24 23:26:24 +0000
@@ -48,7 +48,7 @@
48 const std::vector<store::Item_t>& indexSources = indexSpec.theSources;48 const std::vector<store::Item_t>& indexSources = indexSpec.theSources;
49 uint64_t numIndexSources = (uint64_t)indexSources.size();49 uint64_t numIndexSources = (uint64_t)indexSources.size();
5050
51 for (ulong i = 0; i < numIndexSources; ++i)51 for (u_long i = 0; i < numIndexSources; ++i)
52 {52 {
53 if (indexSources[i]->equals(name))53 if (indexSources[i]->equals(name))
54 {54 {
5555
=== modified file 'src/store/naive/collection.h'
--- src/store/naive/collection.h 2012-12-05 14:51:50 +0000
+++ src/store/naive/collection.h 2012-12-24 23:26:24 +0000
@@ -98,7 +98,7 @@
9898
99 /***************************** ID Management ********************************/99 /***************************** ID Management ********************************/
100100
101 virtual ulong getId() const = 0;101 virtual u_long getId() const = 0;
102102
103 virtual TreeId createTreeId() = 0;103 virtual TreeId createTreeId() = 0;
104104
105105
=== modified file 'src/store/naive/dataguide.cpp'
--- src/store/naive/dataguide.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/dataguide.cpp 2012-12-24 23:26:24 +0000
@@ -33,14 +33,14 @@
33{33{
34 assert(theParent == NULL);34 assert(theParent == NULL);
3535
36 ulong numChildren = this->numChildren();36 u_long numChildren = this->numChildren();
37 ulong numAttrs = this->numAttributes();37 u_long numAttrs = this->numAttributes();
3838
39 if (numChildren > 0 || numAttrs > 0)39 if (numChildren > 0 || numAttrs > 0)
40 {40 {
41 ElementGuideNode* node = reinterpret_cast<ElementGuideNode*>(this);41 ElementGuideNode* node = reinterpret_cast<ElementGuideNode*>(this);
4242
43 for (ulong i = 0; i < numChildren; i++)43 for (u_long i = 0; i < numChildren; i++)
44 {44 {
45 GuideNode* child = node->theChildren[i];45 GuideNode* child = node->theChildren[i];
46 assert(child->theParent == this);46 assert(child->theParent == this);
@@ -48,7 +48,7 @@
48 child->deleteTree();48 child->deleteTree();
49 }49 }
5050
51 for (ulong i = 0; i < numAttrs; i++)51 for (u_long i = 0; i < numAttrs; i++)
52 {52 {
53 GuideNode* attr = node->theAttributes[i];53 GuideNode* attr = node->theAttributes[i];
54 assert(attr->theParent == this);54 assert(attr->theParent == this);
@@ -129,9 +129,9 @@
129129
130 unique = true;130 unique = true;
131131
132 ulong pathLen = (ulong)path.size();132 u_long pathLen = (u_long)path.size();
133133
134 for (ulong i = 0; i < pathLen; i++)134 for (u_long i = 0; i < pathLen; i++)
135 {135 {
136 if (attrPath && i == pathLen - 1)136 if (attrPath && i == pathLen - 1)
137 {137 {
@@ -160,8 +160,8 @@
160********************************************************************************/160********************************************************************************/
161ElementGuideNode* ElementGuideNode::findChild(const store::Item* name)161ElementGuideNode* ElementGuideNode::findChild(const store::Item* name)
162{162{
163 ulong numChildren = (ulong)theChildren.size();163 u_long numChildren = (u_long)theChildren.size();
164 for (ulong i = 0; i < numChildren; i++)164 for (u_long i = 0; i < numChildren; i++)
165 {165 {
166 if (theChildren[i]->theName->equals(name))166 if (theChildren[i]->theName->equals(name))
167 return theChildren[i];167 return theChildren[i];
@@ -176,8 +176,8 @@
176********************************************************************************/176********************************************************************************/
177AttributeGuideNode* ElementGuideNode::findAttr(const store::Item* name)177AttributeGuideNode* ElementGuideNode::findAttr(const store::Item* name)
178{178{
179 ulong numAttrs = (ulong)theAttributes.size();179 u_long numAttrs = (u_long)theAttributes.size();
180 for (ulong i = 0; i < numAttrs; i++)180 for (u_long i = 0; i < numAttrs; i++)
181 {181 {
182 if (theAttributes[i]->theName->equals(name))182 if (theAttributes[i]->theName->equals(name))
183 return theAttributes[i];183 return theAttributes[i];
@@ -190,7 +190,7 @@
190/*******************************************************************************190/*******************************************************************************
191191
192********************************************************************************/192********************************************************************************/
193std::string ElementGuideNode::show(ulong depth) const193std::string ElementGuideNode::show(u_long depth) const
194{194{
195 std::stringstream str;195 std::stringstream str;
196196
@@ -202,7 +202,7 @@
202202
203 depth += 2;203 depth += 2;
204204
205 ulong numChildren = (ulong)theChildren.size();205 u_long numChildren = (u_long)theChildren.size();
206206
207 if (theName != NULL)207 if (theName != NULL)
208 {208 {
@@ -218,7 +218,7 @@
218 str << "<DOC>" << std::endl;218 str << "<DOC>" << std::endl;
219 }219 }
220220
221 for (ulong i = 0; i < numChildren; i++)221 for (u_long i = 0; i < numChildren; i++)
222 {222 {
223 str << theChildren[i]->show(depth);223 str << theChildren[i]->show(depth);
224 }224 }
225225
=== modified file 'src/store/naive/dataguide.h'
--- src/store/naive/dataguide.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/dataguide.h 2012-12-24 23:26:24 +0000
@@ -60,8 +60,8 @@
60 bool getUnique() const { return theIsUnique; }60 bool getUnique() const { return theIsUnique; }
61 void setUnique(bool v) { theIsUnique = v; }61 void setUnique(bool v) { theIsUnique = v; }
6262
63 virtual ulong numChildren() const { return 0; }63 virtual u_long numChildren() const { return 0; }
64 virtual ulong numAttributes() const { return 0; }64 virtual u_long numAttributes() const { return 0; }
6565
66 void deleteTree();66 void deleteTree();
6767
@@ -72,7 +72,7 @@
72 bool& found,72 bool& found,
73 bool& unique) = 0;73 bool& unique) = 0;
7474
75 virtual std::string show(ulong depth) const = 0;75 virtual std::string show(u_long depth) const = 0;
76};76};
7777
7878
@@ -103,7 +103,7 @@
103 bool& found,103 bool& found,
104 bool& unique);104 bool& unique);
105105
106 std::string show(ulong depth) const { return "attr"; }106 std::string show(u_long depth) const { return "attr"; }
107};107};
108108
109109
@@ -132,8 +132,8 @@
132 return store::StoreConsts::elementNode; 132 return store::StoreConsts::elementNode;
133 }133 }
134134
135 ulong numChildren() const { return (ulong)theChildren.size(); }135 u_long numChildren() const { return (u_long)theChildren.size(); }
136 ulong numAttributes() const { return (ulong)theAttributes.size(); }136 u_long numAttributes() const { return (u_long)theAttributes.size(); }
137137
138 void getPathInfo(138 void getPathInfo(
139 std::vector<const store::Item*>& ctxPath,139 std::vector<const store::Item*>& ctxPath,
@@ -150,7 +150,7 @@
150 ElementGuideNode* findChild(const store::Item* name);150 ElementGuideNode* findChild(const store::Item* name);
151 AttributeGuideNode* findAttr(const store::Item* name);151 AttributeGuideNode* findAttr(const store::Item* name);
152152
153 std::string show(ulong depth) const;153 std::string show(u_long depth) const;
154};154};
155155
156156
157157
=== modified file 'src/store/naive/hashmap_nodep.h'
--- src/store/naive/hashmap_nodep.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/hashmap_nodep.h 2012-12-24 23:26:24 +0000
@@ -57,7 +57,7 @@
57 NodePointerHashMapCmp>57 NodePointerHashMapCmp>
58{58{
59public:59public:
60 NodePointerHashMap(ulong size, bool sync) 60 NodePointerHashMap(u_long size, bool sync)
61 :61 :
62 HashMap<const XmlNode*, V, NodePointerHashMapCmp>(size, sync)62 HashMap<const XmlNode*, V, NodePointerHashMapCmp>(size, sync)
63 {63 {
6464
=== modified file 'src/store/naive/item_vector.cpp'
--- src/store/naive/item_vector.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/item_vector.cpp 2012-12-24 23:26:24 +0000
@@ -104,7 +104,7 @@
104{104{
105 std::ostringstream res;105 std::ostringstream res;
106 res << "ItemVector size: " << size() + " [";106 res << "ItemVector size: " << size() + " [";
107 for ( ulong i = 0; i < size(); i++)107 for ( u_long i = 0; i < size(); i++)
108 res << getItem(i)->show() << ", ";108 res << getItem(i)->show() << ", ";
109 res << "]";109 res << "]";
110110
111111
=== modified file 'src/store/naive/item_vector.h'
--- src/store/naive/item_vector.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/item_vector.h 2012-12-24 23:26:24 +0000
@@ -48,7 +48,7 @@
4848
49 void appendStringValue(zstring& buf) const;49 void appendStringValue(zstring& buf) const;
5050
51 ulong size() const { return (ulong)theItems.size(); }51 u_long size() const { return (u_long)theItems.size(); }
5252
53 bool empty() const { return theItems.empty(); }53 bool empty() const { return theItems.empty(); }
5454
@@ -56,7 +56,7 @@
5656
57 std::vector<store::Item_t>& getItems() { return theItems; }57 std::vector<store::Item_t>& getItems() { return theItems; }
5858
59 store::Item* getItem(ulong pos) const { return theItems[pos].getp(); }59 store::Item* getItem(u_long pos) const { return theItems[pos].getp(); }
60 60
61 zstring show() const;61 zstring show() const;
62};62};
6363
=== modified file 'src/store/naive/loader.h'
--- src/store/naive/loader.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/loader.h 2012-12-24 23:26:24 +0000
@@ -72,7 +72,7 @@
72class XmlLoader72class XmlLoader
73{73{
74protected:74protected:
75 static const ulong INPUT_CHUNK_SIZE = 8192;75 static const u_long INPUT_CHUNK_SIZE = 8192;
7676
77protected:77protected:
78 const store::LoadProperties & theLoadProperties;78 const store::LoadProperties & theLoadProperties;
7979
=== modified file 'src/store/naive/loader_dtd.cpp'
--- src/store/naive/loader_dtd.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/loader_dtd.cpp 2012-12-24 23:26:24 +0000
@@ -1098,11 +1098,11 @@
1098 ZORBA_LOADER_CHECK_ERROR(loader);1098 ZORBA_LOADER_CHECK_ERROR(loader);
10991099
1100 zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack;1100 zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack;
1101 ulong stackSize = nodeStack.size();1101 u_long stackSize = nodeStack.size();
1102 ulong firstChildPos;1102 u_long firstChildPos;
1103 ulong numChildren;1103 u_long numChildren;
1104 ulong numActualChildren;1104 u_long numActualChildren;
1105 ulong i;1105 u_long i;
1106 DocumentNode* docNode;1106 DocumentNode* docNode;
1107 XmlNode* currChild;1107 XmlNode* currChild;
11081108
11091109
=== modified file 'src/store/naive/loader_fast.cpp'
--- src/store/naive/loader_fast.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/loader_fast.cpp 2012-12-24 23:26:24 +0000
@@ -469,11 +469,11 @@
469 ZORBA_LOADER_CHECK_ERROR(loader);469 ZORBA_LOADER_CHECK_ERROR(loader);
470470
471 zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack;471 zorba::Stack<XmlNode*>& nodeStack = loader.theNodeStack;
472 ulong stackSize = nodeStack.size();472 u_long stackSize = nodeStack.size();
473 ulong firstChildPos;473 u_long firstChildPos;
474 ulong numChildren;474 u_long numChildren;
475 ulong numActualChildren;475 u_long numActualChildren;
476 ulong i;476 u_long i;
477 DocumentNode* docNode;477 DocumentNode* docNode;
478 XmlNode* currChild;478 XmlNode* currChild;
479 479
480480
=== modified file 'src/store/naive/node_factory.cpp'
--- src/store/naive/node_factory.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/node_factory.cpp 2012-12-24 23:26:24 +0000
@@ -66,8 +66,8 @@
6666
67ElementNode* NodeFactory::createElementNode(67ElementNode* NodeFactory::createElementNode(
68 store::Item_t& nodeName,68 store::Item_t& nodeName,
69 ulong numBindings,69 u_long numBindings,
70 ulong numAttributes)70 u_long numAttributes)
71{71{
72 return new ElementNode(nodeName, numBindings, numAttributes);72 return new ElementNode(nodeName, numBindings, numAttributes);
73}73}
7474
=== modified file 'src/store/naive/node_factory.h'
--- src/store/naive/node_factory.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/node_factory.h 2012-12-24 23:26:24 +0000
@@ -73,8 +73,8 @@
7373
74 virtual ElementNode* createElementNode(74 virtual ElementNode* createElementNode(
75 store::Item_t& nodeName,75 store::Item_t& nodeName,
76 ulong numBindings,76 u_long numBindings,
77 ulong numAttributes);77 u_long numAttributes);
7878
79 virtual ElementNode* createElementNode(79 virtual ElementNode* createElementNode(
80 XmlTree* tree,80 XmlTree* tree,
8181
=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp 2012-12-14 13:11:08 +0000
+++ src/store/naive/node_items.cpp 2012-12-24 23:26:24 +0000
@@ -132,7 +132,7 @@
132/*******************************************************************************132/*******************************************************************************
133133
134********************************************************************************/134********************************************************************************/
135ulong XmlTree::getCollectionId() const135u_long XmlTree::getCollectionId() const
136{136{
137 if (theCollection != NULL)137 if (theCollection != NULL)
138 return theCollection->getId();138 return theCollection->getId();
@@ -1397,7 +1397,7 @@
1397********************************************************************************/1397********************************************************************************/
1398store::Item_t OrdPathNode::getLevel() const1398store::Item_t OrdPathNode::getLevel() const
1399{ 1399{
1400 ulong lNumLevels = 1;1400 u_long lNumLevels = 1;
1401 store::Item_t lCurrent = this->getParent();1401 store::Item_t lCurrent = this->getParent();
1402 while (lCurrent)1402 while (lCurrent)
1403 {1403 {
@@ -2175,7 +2175,7 @@
21752175
2176 if (numAttrs() != 0)2176 if (numAttrs() != 0)
2177 {2177 {
2178 ulong pos = 0;2178 u_long pos = 0;
2179 XmlNode* attr = getAttr(pos);2179 XmlNode* attr = getAttr(pos);
2180 removeAttr(pos);2180 removeAttr(pos);
2181 delete attr;2181 delete attr;
@@ -2185,7 +2185,7 @@
2185 }2185 }
21862186
2187 STORE_TRACE1("Constructed element node " << this << " parent = "2187 STORE_TRACE1("Constructed element node " << this << " parent = "
2188 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos2188 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
2189 << " tree = " << getTree()->getId() << ":" << getTree()2189 << " tree = " << getTree()->getId() << ":" << getTree()
2190 << " ordpath = " << theOrdPath.show()2190 << " ordpath = " << theOrdPath.show()
2191 << " name = " << theName->getStringValue()2191 << " name = " << theName->getStringValue()
@@ -2878,7 +2878,7 @@
2878 nilled = false;2878 nilled = false;
28792879
2880 //const char* xsi = "http://www.w3.org/2001/XMLSchema-instance";2880 //const char* xsi = "http://www.w3.org/2001/XMLSchema-instance";
2881 //ulong xsilen = strlen(xsi);2881 //u_long xsilen = strlen(xsi);
28822882
2883 ite = attrsBegin();2883 ite = attrsBegin();
2884 end = attrsEnd();2884 end = attrsEnd();
@@ -3667,7 +3667,7 @@
3667 }3667 }
36683668
3669 STORE_TRACE1("Constructed attribute node " << this << " parent = "3669 STORE_TRACE1("Constructed attribute node " << this << " parent = "
3670 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos3670 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
3671 << " tree = " << getTree()->getId() << ":" << getTree()3671 << " tree = " << getTree()->getId() << ":" << getTree()
3672 << " ordpath = " << theOrdPath.show()3672 << " ordpath = " << theOrdPath.show()
3673 << " name = " << theName->getStringValue()3673 << " name = " << theName->getStringValue()
@@ -3751,7 +3751,7 @@
37513751
3752 STORE_TRACE1("Copied attribute node " << this << " to node " << copyNode3752 STORE_TRACE1("Copied attribute node " << this << " to node " << copyNode
3753 << " name = " << theName->show() << " parent = "3753 << " name = " << theName->show() << " parent = "
3754 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos3754 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
3755 << " copy mode = " << copymode.toString());3755 << " copy mode = " << copymode.toString());
37563756
3757 return copyNode;3757 return copyNode;
@@ -4108,13 +4108,13 @@
41084108
4109#ifdef TEXT_ORDPATH4109#ifdef TEXT_ORDPATH
4110 STORE_TRACE1("Constructed text node " << this << " parent = "4110 STORE_TRACE1("Constructed text node " << this << " parent = "
4111 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos4111 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
4112 << " tree = " << getTree()->getId() << ":" << getTree()4112 << " tree = " << getTree()->getId() << ":" << getTree()
4113 << " ordpath = " << theOrdPath.show()4113 << " ordpath = " << theOrdPath.show()
4114 << " content = " << getText());4114 << " content = " << getText());
4115#else4115#else
4116 STORE_TRACE1("Constructed text node " << this << " parent = "4116 STORE_TRACE1("Constructed text node " << this << " parent = "
4117 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos4117 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
4118 << " tree = " << getTree()->getId() << ":" << getTree()4118 << " tree = " << getTree()->getId() << ":" << getTree()
4119 << " content = " << getText());4119 << " content = " << getText());
4120#endif4120#endif
@@ -4169,12 +4169,12 @@
41694169
4170#ifdef TEXT_ORDPATH4170#ifdef TEXT_ORDPATH
4171 STORE_TRACE1("Constructed text node " << this << " parent = "4171 STORE_TRACE1("Constructed text node " << this << " parent = "
4172 << std::hex << (parent ? (ulong)parent : 0)4172 << std::hex << (parent ? (u_long)parent : 0)
4173 << " ordpath = " << theOrdPath.show()4173 << " ordpath = " << theOrdPath.show()
4174 << " content = " << getValue()->getStringValue());4174 << " content = " << getValue()->getStringValue());
4175#else4175#else
4176 STORE_TRACE1("Constructed text node " << this << " parent = "4176 STORE_TRACE1("Constructed text node " << this << " parent = "
4177 << std::hex << (parent ? (ulong)parent : 0)4177 << std::hex << (parent ? (u_long)parent : 0)
4178 << " content = " << getValue()->getStringValue());4178 << " content = " << getValue()->getStringValue());
4179#endif4179#endif
4180}4180}
@@ -4286,7 +4286,7 @@
4286 }4286 }
42874287
4288 STORE_TRACE1("Copied text node " << this << " to node " << copyNode4288 STORE_TRACE1("Copied text node " << this << " to node " << copyNode
4289 << " parent = " << std::hex << (parent ? (ulong)parent : 0)4289 << " parent = " << std::hex << (parent ? (u_long)parent : 0)
4290 << " pos = " << pos);4290 << " pos = " << pos);
42914291
4292 return copyNode;4292 return copyNode;
@@ -4813,7 +4813,7 @@
4813 }4813 }
48144814
4815 STORE_TRACE1("Constructed pi node " << this << " parent = "4815 STORE_TRACE1("Constructed pi node " << this << " parent = "
4816 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos4816 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
4817 << " tree = " << getTree()->getId() << ":" << getTree()4817 << " tree = " << getTree()->getId() << ":" << getTree()
4818 << " ordpath = " << theOrdPath.show() << " target = " << theTarget);4818 << " ordpath = " << theOrdPath.show() << " target = " << theTarget);
4819}4819}
@@ -4862,7 +4862,7 @@
4862 }4862 }
48634863
4864 STORE_TRACE1("Copied pi node " << this << " to node " << copyNode4864 STORE_TRACE1("Copied pi node " << this << " to node " << copyNode
4865 << " parent = " << std::hex << (parent ? (ulong)parent : 0)4865 << " parent = " << std::hex << (parent ? (u_long)parent : 0)
4866 << " pos = " << pos);4866 << " pos = " << pos);
48674867
4868 return copyNode;4868 return copyNode;
@@ -4956,7 +4956,7 @@
4956 }4956 }
49574957
4958 STORE_TRACE1("Constructed comment node " << this << " parent = "4958 STORE_TRACE1("Constructed comment node " << this << " parent = "
4959 << std::hex << (parent ? (ulong)parent : 0) << " pos = " << pos4959 << std::hex << (parent ? (u_long)parent : 0) << " pos = " << pos
4960 << " tree = " << getTree()->getId() << ":" << getTree()4960 << " tree = " << getTree()->getId() << ":" << getTree()
4961 << " ordpath = " << theOrdPath.show() << " content = "4961 << " ordpath = " << theOrdPath.show() << " content = "
4962 << theContent);4962 << theContent);
@@ -5003,7 +5003,7 @@
5003 }5003 }
50045004
5005 STORE_TRACE1("Copied coment node " << this << " to node " << copyNode5005 STORE_TRACE1("Copied coment node " << this << " to node " << copyNode
5006 << " parent = " << std::hex << (parent ? (ulong)parent : 0)5006 << " parent = " << std::hex << (parent ? (u_long)parent : 0)
5007 << " pos = " << pos);5007 << " pos = " << pos);
50085008
5009 return copyNode;5009 return copyNode;
50105010
=== modified file 'src/store/naive/node_items.h'
--- src/store/naive/node_items.h 2012-12-14 13:23:51 +0000
+++ src/store/naive/node_items.h 2012-12-24 23:26:24 +0000
@@ -200,7 +200,7 @@
200200
201 const TreeId& getId() const { return theId; }201 const TreeId& getId() const { return theId; }
202202
203 ulong getCollectionId() const;203 u_long getCollectionId() const;
204204
205 const Collection* getCollection() const { return theCollection; }205 const Collection* getCollection() const { return theCollection; }
206206
@@ -508,7 +508,7 @@
508 getTree()->setCollection(coll, pos);508 getTree()->setCollection(coll, pos);
509 }509 }
510510
511 ulong getCollectionId() const 511 u_long getCollectionId() const
512 {512 {
513 assert(!isConnectorNode());513 assert(!isConnectorNode());
514 return getTree()->getCollectionId(); 514 return getTree()->getCollectionId();
@@ -1571,8 +1571,8 @@
1571 if (this == other)1571 if (this == other)
1572 return 0;1572 return 0;
15731573
1574 ulong col1 = this->getCollectionId();1574 u_long col1 = this->getCollectionId();
1575 ulong col2 = other->getCollectionId();1575 u_long col2 = other->getCollectionId();
15761576
1577 if (col1 < col2)1577 if (col1 < col2)
1578 return -1;1578 return -1;
@@ -1621,8 +1621,8 @@
1621 if (this == other)1621 if (this == other)
1622 return 0;1622 return 0;
16231623
1624 ulong col1 = this->getCollectionId();1624 u_long col1 = this->getCollectionId();
1625 ulong col2 = other->getCollectionId();1625 u_long col2 = other->getCollectionId();
16261626
1627 if (col1 < col2)1627 if (col1 < col2)
1628 return -1;1628 return -1;
16291629
=== modified file 'src/store/naive/node_updates.cpp'
--- src/store/naive/node_updates.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/node_updates.cpp 2012-12-24 23:26:24 +0000
@@ -279,7 +279,7 @@
279 ite = elem->childrenBegin();279 ite = elem->childrenBegin();
280 end = elem->childrenEnd();280 end = elem->childrenEnd();
281281
282 for (ulong i = 0; ite != end; ++i, ++ite)282 for (u_long i = 0; ite != end; ++i, ++ite)
283 {283 {
284 XmlNode* child = (*ite);284 XmlNode* child = (*ite);
285285
@@ -310,7 +310,7 @@
310 }310 }
311 }311 }
312312
313 ulong refcount = oldTree->getRefCount();313 u_long refcount = oldTree->getRefCount();
314 oldTree->getRefCount() = 0;314 oldTree->getRefCount() = 0;
315 oldTree->free();315 oldTree->free();
316316
@@ -332,7 +332,7 @@
332 {332 {
333 ZORBA_ASSERT(theParent != NULL);333 ZORBA_ASSERT(theParent != NULL);
334334
335 ulong refcount = 0;335 u_long refcount = 0;
336336
337 XmlTree* oldTree = getTree();337 XmlTree* oldTree = getTree();
338 XmlTree* newTree = GET_STORE().getNodeFactory().createXmlTree();338 XmlTree* newTree = GET_STORE().getNodeFactory().createXmlTree();
@@ -690,8 +690,8 @@
690 if (undoList.empty())690 if (undoList.empty())
691 return;691 return;
692692
693 ulong pos = 0;693 u_long pos = 0;
694 ulong numNodes = (ulong)undoList.size();694 u_long numNodes = (u_long)undoList.size();
695 XmlNode* currNode = this;695 XmlNode* currNode = this;
696696
697 while(currNode != NULL && pos < numNodes)697 while(currNode != NULL && pos < numNodes)
@@ -840,7 +840,7 @@
840 removeType(upd);840 removeType(upd);
841841
842 // Insert the new children without merging text nodes842 // Insert the new children without merging text nodes
843 for (ulong i = 0; i < numNewChildren; ++i)843 for (u_long i = 0; i < numNewChildren; ++i)
844 {844 {
845 XmlNode* child = BASE_NODE(upd.theNewChildren[i]);845 XmlNode* child = BASE_NODE(upd.theNewChildren[i]);
846846
847847
=== modified file 'src/store/naive/nsbindings.cpp'
--- src/store/naive/nsbindings.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/nsbindings.cpp 2012-12-24 23:26:24 +0000
@@ -129,9 +129,9 @@
129 while (currentContext != NULL)129 while (currentContext != NULL)
130 {130 {
131 const store::NsBindings& bindings = currentContext->theBindings;131 const store::NsBindings& bindings = currentContext->theBindings;
132 ulong numBindings = (ulong)bindings.size();132 u_long numBindings = (u_long)bindings.size();
133133
134 for (ulong i = 0; i < numBindings; ++i)134 for (u_long i = 0; i < numBindings; ++i)
135 {135 {
136 if (bindings[i].first == prefix)136 if (bindings[i].first == prefix)
137 {137 {
@@ -185,9 +185,9 @@
185********************************************************************************/185********************************************************************************/
186void NsBindingsContext::updateBinding(const zstring& prefix, const zstring& ns)186void NsBindingsContext::updateBinding(const zstring& prefix, const zstring& ns)
187{187{
188 ulong numBindings = (ulong)theBindings.size();188 u_long numBindings = (u_long)theBindings.size();
189189
190 for (ulong i = 0; i < numBindings; ++i)190 for (u_long i = 0; i < numBindings; ++i)
191 {191 {
192 if (theBindings[i].first == prefix)192 if (theBindings[i].first == prefix)
193 {193 {
@@ -206,9 +206,9 @@
206********************************************************************************/206********************************************************************************/
207void NsBindingsContext::removeBinding(const zstring& prefix, const zstring& ns)207void NsBindingsContext::removeBinding(const zstring& prefix, const zstring& ns)
208{208{
209 ulong numBindings = (ulong)theBindings.size();209 u_long numBindings = (u_long)theBindings.size();
210210
211 for (ulong i = 0; i < numBindings; i++)211 for (u_long i = 0; i < numBindings; i++)
212 {212 {
213 if (theBindings[i].first == prefix)213 if (theBindings[i].first == prefix)
214 {214 {
215215
=== modified file 'src/store/naive/ordpath.cpp'
--- src/store/naive/ordpath.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/ordpath.cpp 2012-12-24 23:26:24 +0000
@@ -193,7 +193,7 @@
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)
194 of binary data.194 of binary data.
195********************************************************************************/195********************************************************************************/
196OrdPath::OrdPath(const unsigned char* str, ulong strLen, bool isBinary)196OrdPath::OrdPath(const unsigned char* str, u_long strLen, bool isBinary)
197{197{
198 if (isBinary)198 if (isBinary)
199 {199 {
@@ -209,7 +209,7 @@
209/*******************************************************************************209/*******************************************************************************
210 Inits the instance with binary ORDPATH data.210 Inits the instance with binary ORDPATH data.
211********************************************************************************/211********************************************************************************/
212void OrdPath::initFromData(const unsigned char* buf, ulong byteLen)212void OrdPath::initFromData(const unsigned char* buf, u_long byteLen)
213{213{
214 memset(theBuffer.local, 0, MAX_EMBEDDED_BYTE_LEN);214 memset(theBuffer.local, 0, MAX_EMBEDDED_BYTE_LEN);
215215
@@ -230,7 +230,7 @@
230 Inits the instance with a string containing a hexadecimal representation of 230 Inits the instance with a string containing a hexadecimal representation of
231 the binary ORDPATH data.231 the binary ORDPATH data.
232********************************************************************************/232********************************************************************************/
233void OrdPath::initFromString(const unsigned char* str, ulong strLen)233void OrdPath::initFromString(const unsigned char* str, u_long strLen)
234{234{
235 unsigned char* buf;235 unsigned char* buf;
236 bool isLocal;236 bool isLocal;
@@ -238,7 +238,7 @@
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)
239 ZORBA_FATAL(strLen % 2 == 0, "");239 ZORBA_FATAL(strLen % 2 == 0, "");
240240
241 ulong byteLen = strLen / 2;241 u_long byteLen = strLen / 2;
242242
243 if (byteLen > MAX_BYTE_LEN)243 if (byteLen > MAX_BYTE_LEN)
244 {244 {
@@ -264,7 +264,7 @@
264 }264 }
265265
266 const unsigned char* start = str;266 const unsigned char* start = str;
267 ulong i = 0;267 u_long i = 0;
268268
269 try269 try
270 {270 {
@@ -347,7 +347,7 @@
347 }347 }
348 else348 else
349 {349 {
350 ulong len = other.getRemoteByteLength();350 u_long len = other.getRemoteByteLength();
351351
352 ZORBA_ASSERT(len >= MAX_EMBEDDED_BYTE_LEN);352 ZORBA_ASSERT(len >= MAX_EMBEDDED_BYTE_LEN);
353353
@@ -366,7 +366,7 @@
366********************************************************************************/366********************************************************************************/
367OrdPath& OrdPath::operator=(const OrdPathStack& ops)367OrdPath& OrdPath::operator=(const OrdPathStack& ops)
368{368{
369 ulong len = ops.getByteLength();369 u_long len = ops.getByteLength();
370370
371 if (len > MAX_EMBEDDED_BYTE_LEN ||371 if (len > MAX_EMBEDDED_BYTE_LEN ||
372 (len == MAX_EMBEDDED_BYTE_LEN && ops.theBitsAvailable == 0))372 (len == MAX_EMBEDDED_BYTE_LEN && ops.theBitsAvailable == 0))
@@ -380,7 +380,7 @@
380 {380 {
381 reset();381 reset();
382382
383 for (ulong i = 0; i < len; ++i)383 for (u_long i = 0; i < len; ++i)
384 theBuffer.local[i] = ops.theBuffer[i];384 theBuffer.local[i] = ops.theBuffer[i];
385385
386 markLocal();386 markLocal();
@@ -392,7 +392,7 @@
392/*******************************************************************************392/*******************************************************************************
393393
394********************************************************************************/394********************************************************************************/
395ulong OrdPath::getLocalBitLength(ulong& byteLen) const395u_long OrdPath::getLocalBitLength(u_long& byteLen) const
396{396{
397 ZORBA_ASSERT_WITH_MSG(isLocal(),397 ZORBA_ASSERT_WITH_MSG(isLocal(),
398 "OrdPath::getLocalBitLength was called even though" <<398 "OrdPath::getLocalBitLength was called even though" <<
@@ -403,7 +403,7 @@
403 if (byteLen == 0)403 if (byteLen == 0)
404 return 0;404 return 0;
405405
406 ulong bitLen = byteLen * 8;406 u_long bitLen = byteLen * 8;
407407
408 unsigned char lastByte = getLocalData()[byteLen - 1];408 unsigned char lastByte = getLocalData()[byteLen - 1];
409 if (byteLen == MAX_EMBEDDED_BYTE_LEN)409 if (byteLen == MAX_EMBEDDED_BYTE_LEN)
@@ -426,14 +426,14 @@
426/*******************************************************************************426/*******************************************************************************
427427
428********************************************************************************/428********************************************************************************/
429ulong OrdPath::getRemoteBitLength(ulong& byteLen) const429u_long OrdPath::getRemoteBitLength(u_long& byteLen) const
430{430{
431 byteLen = getRemoteByteLength();431 byteLen = getRemoteByteLength();
432432
433 if (byteLen == 0)433 if (byteLen == 0)
434 return 0;434 return 0;
435435
436 ulong bitLen = byteLen * 8;436 u_long bitLen = byteLen * 8;
437437
438 unsigned char lastByte = getRemoteData()[byteLen - 1];438 unsigned char lastByte = getRemoteData()[byteLen - 1];
439439
@@ -463,7 +463,7 @@
463********************************************************************************/463********************************************************************************/
464bool OrdPath::operator==(const OrdPath& other) const464bool OrdPath::operator==(const OrdPath& other) const
465{465{
466 ulong len = getByteLength();466 u_long len = getByteLength();
467467
468 if (len != other.getByteLength())468 if (len != other.getByteLength())
469 return false;469 return false;
@@ -477,8 +477,8 @@
477********************************************************************************/477********************************************************************************/
478int OrdPath::operator<(const OrdPath& other) const478int OrdPath::operator<(const OrdPath& other) const
479{479{
480 ulong len1;480 u_long len1;
481 ulong len2;481 u_long len2;
482 unsigned char* p1 = getDataAndLength(len1);482 unsigned char* p1 = getDataAndLength(len1);
483 unsigned char* p2 = other.getDataAndLength(len2);483 unsigned char* p2 = other.getDataAndLength(len2);
484484
@@ -524,8 +524,8 @@
524********************************************************************************/524********************************************************************************/
525int OrdPath::operator>(const OrdPath& other) const525int OrdPath::operator>(const OrdPath& other) const
526{526{
527 ulong len1;527 u_long len1;
528 ulong len2;528 u_long len2;
529 unsigned char* p1 = getDataAndLength(len1);529 unsigned char* p1 = getDataAndLength(len1);
530 unsigned char* p2 = other.getDataAndLength(len2);530 unsigned char* p2 = other.getDataAndLength(len2);
531531
@@ -572,8 +572,8 @@
572********************************************************************************/572********************************************************************************/
573OrdPath::RelativePosition OrdPath::getRelativePosition(const OrdPath& other) const573OrdPath::RelativePosition OrdPath::getRelativePosition(const OrdPath& other) const
574{574{
575 ulong len1;575 u_long len1;
576 ulong len2;576 u_long len2;
577 unsigned char* data1 = getDataAndLength(len1);577 unsigned char* data1 = getDataAndLength(len1);
578 unsigned char* data2 = other.getDataAndLength(len2);578 unsigned char* data2 = other.getDataAndLength(len2);
579579
@@ -673,16 +673,16 @@
673OrdPath::RelativePosition OrdPath::getRelativePosition2(const OrdPath& other) const673OrdPath::RelativePosition OrdPath::getRelativePosition2(const OrdPath& other) const
674{674{
675 int32_t dewey1[MAX_NUM_COMPS], dewey2[MAX_NUM_COMPS];675 int32_t dewey1[MAX_NUM_COMPS], dewey2[MAX_NUM_COMPS];
676 ulong offsets1[MAX_NUM_COMPS], offsets2[MAX_NUM_COMPS];676 u_long offsets1[MAX_NUM_COMPS], offsets2[MAX_NUM_COMPS];
677 ulong numComps1 = 0, numComps2 = 0;677 u_long numComps1 = 0, numComps2 = 0;
678 ulong bitLen1 = 0, bitLen2 = 0;678 u_long bitLen1 = 0, bitLen2 = 0;
679 bool thisFirst;679 bool thisFirst;
680680
681 decompress(0, dewey1, offsets1, numComps1, bitLen1);681 decompress(0, dewey1, offsets1, numComps1, bitLen1);
682 other.decompress(0, dewey2, offsets2, numComps2, bitLen2);682 other.decompress(0, dewey2, offsets2, numComps2, bitLen2);
683683
684 // curr will be the first non-shared component684 // curr will be the first non-shared component
685 ulong curr = 0;685 u_long curr = 0;
686686
687 if (numComps1 < numComps2)687 if (numComps1 < numComps2)
688 {688 {
@@ -703,15 +703,15 @@
703 else703 else
704 thisFirst = false;704 thisFirst = false;
705705
706 ulong extraLevels1 = 0, extraLevels2 = 0;706 u_long extraLevels1 = 0, extraLevels2 = 0;
707707
708 for (ulong i = curr; i < numComps1; ++i)708 for (u_long i = curr; i < numComps1; ++i)
709 {709 {
710 if (dewey1[i] % 2 == 1)710 if (dewey1[i] % 2 == 1)
711 ++extraLevels1;711 ++extraLevels1;
712 }712 }
713713
714 for (ulong i = curr; i < numComps2; ++i)714 for (u_long i = curr; i < numComps2; ++i)
715 {715 {
716 if (dewey2[i] % 2 == 1)716 if (dewey2[i] % 2 == 1)
717 ++extraLevels2;717 ++extraLevels2;
@@ -755,10 +755,10 @@
755{755{
756 reset();756 reset();
757757
758 ulong bitLen = 0;758 u_long bitLen = 0;
759759
760 ulong numComps = (ulong)dewey.size();760 u_long numComps = (u_long)dewey.size();
761 for (ulong i = 0; i < numComps; ++i)761 for (u_long i = 0; i < numComps; ++i)
762 {762 {
763 if (! pushComp(getLocalData(), MAX_EMBEDDED_BIT_LEN, dewey[i], bitLen))763 if (! pushComp(getLocalData(), MAX_EMBEDDED_BIT_LEN, dewey[i], bitLen))
764 return false;764 return false;
@@ -777,7 +777,7 @@
777{777{
778 reset();778 reset();
779779
780 ulong bitLen = 0;780 u_long bitLen = 0;
781781
782 unsigned char* databuf = new unsigned char[MAX_BYTE_LEN];782 unsigned char* databuf = new unsigned char[MAX_BYTE_LEN];
783783
@@ -785,14 +785,14 @@
785 {785 {
786 memset(databuf, 0, MAX_BYTE_LEN);786 memset(databuf, 0, MAX_BYTE_LEN);
787787
788 ulong numComps = (ulong)dewey.size();788 u_long numComps = (u_long)dewey.size();
789 for (ulong i = 0; i < numComps; ++i)789 for (u_long i = 0; i < numComps; ++i)
790 {790 {
791 bool success = pushComp(databuf, MAX_BIT_LEN, dewey[i], bitLen);791 bool success = pushComp(databuf, MAX_BIT_LEN, dewey[i], bitLen);
792 ZORBA_ASSERT(success);792 ZORBA_ASSERT(success);
793 }793 }
794794
795 ulong byteLen = (bitLen + 7) / 8;795 u_long byteLen = (bitLen + 7) / 8;
796796
797 initRemote(byteLen);797 initRemote(byteLen);
798 memcpy(getRemoteData(), databuf, byteLen);798 memcpy(getRemoteData(), databuf, byteLen);
@@ -854,15 +854,15 @@
854 const OrdPath& sibling,854 const OrdPath& sibling,
855 OrdPath& result)855 OrdPath& result)
856{856{
857 ulong numComps = 0;857 u_long numComps = 0;
858 int32_t dewey[MAX_NUM_COMPS];858 int32_t dewey[MAX_NUM_COMPS];
859 ulong offsets[MAX_NUM_COMPS];859 u_long offsets[MAX_NUM_COMPS];
860 ulong bitLen;860 u_long bitLen;
861 ulong byteLen;861 u_long byteLen;
862 unsigned char* data;862 unsigned char* data;
863863
864 ulong parentByteLen;864 u_long parentByteLen;
865 ulong parentBitLen = parent.getBitLength(parentByteLen);865 u_long parentBitLen = parent.getBitLength(parentByteLen);
866866
867 // Decompress the last level-component of sibling.867 // Decompress the last level-component of sibling.
868 sibling.decompress(parentBitLen, dewey, offsets, numComps, bitLen);868 sibling.decompress(parentBitLen, dewey, offsets, numComps, bitLen);
@@ -892,13 +892,13 @@
892 newcomp += 2;892 newcomp += 2;
893 }893 }
894894
895 ulong newBits;895 u_long newBits;
896 uint32_t dummy;896 uint32_t dummy;
897 uint64_t dummy2;897 uint64_t dummy2;
898 bitsNeeded(newcomp, newBits, dummy, dummy2);898 bitsNeeded(newcomp, newBits, dummy, dummy2);
899899
900 ulong commonBitLen = offsets[numComps-1];900 u_long commonBitLen = offsets[numComps-1];
901 ulong commonByteLen = (commonBitLen + 7) / 8;901 u_long commonByteLen = (commonBitLen + 7) / 8;
902902
903 bitLen = commonBitLen + newBits;903 bitLen = commonBitLen + newBits;
904 byteLen = (bitLen + 7) / 8;904 byteLen = (bitLen + 7) / 8;
@@ -944,18 +944,18 @@
944{944{
945 assert(sib1 < sib2);945 assert(sib1 < sib2);
946946
947 ulong parentByteLen;947 u_long parentByteLen;
948 ulong parentBitLen = parent.getBitLength(parentByteLen);948 u_long parentBitLen = parent.getBitLength(parentByteLen);
949949
950 ulong numComps1 = 0;950 u_long numComps1 = 0;
951 ulong bitLen1 = 0;951 u_long bitLen1 = 0;
952 int32_t dewey1[MAX_NUM_COMPS];952 int32_t dewey1[MAX_NUM_COMPS];
953 ulong offsets1[MAX_NUM_COMPS];953 u_long offsets1[MAX_NUM_COMPS];
954954
955 ulong numComps2 = 0;955 u_long numComps2 = 0;
956 ulong bitLen2 = 0;956 u_long bitLen2 = 0;
957 int32_t dewey2[MAX_BYTE_LEN];957 int32_t dewey2[MAX_BYTE_LEN];
958 ulong offsets2[MAX_BYTE_LEN];958 u_long offsets2[MAX_BYTE_LEN];
959959
960 // decompress the last level-comp of sib1960 // decompress the last level-comp of sib1
961 sib1.decompress(parentBitLen, dewey1, offsets1, numComps1, bitLen1);961 sib1.decompress(parentBitLen, dewey1, offsets1, numComps1, bitLen1);
@@ -964,7 +964,7 @@
964 sib2.decompress(parentBitLen, dewey2, offsets2, numComps2, bitLen2);964 sib2.decompress(parentBitLen, dewey2, offsets2, numComps2, bitLen2);
965965
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.
967 ulong compPos = 0;967 u_long compPos = 0;
968 while (dewey1[compPos] == dewey2[compPos])968 while (dewey1[compPos] == dewey2[compPos])
969 {969 {
970 ++compPos;970 ++compPos;
@@ -992,12 +992,12 @@
992 << "comp2: " << comp2 << ", " \992 << "comp2: " << comp2 << ", " \
993 << "compPos: " << compPos << ".");993 << "compPos: " << compPos << ".");
994994
995 ulong diff = comp2 - comp1;995 u_long diff = comp2 - comp1;
996996
997 int32_t newcomp1;997 int32_t newcomp1;
998 int32_t newcomp2 = 0;998 int32_t newcomp2 = 0;
999 ulong commonBitLen;999 u_long commonBitLen;
1000 ulong newBits;1000 u_long newBits;
1001 uint32_t dummy;1001 uint32_t dummy;
1002 uint64_t dummy2;1002 uint64_t dummy2;
10031003
@@ -1097,9 +1097,9 @@
1097 ZORBA_ASSERT(0);1097 ZORBA_ASSERT(0);
1098 }1098 }
10991099
1100 ulong commonByteLen = (commonBitLen + 7) / 8;1100 u_long commonByteLen = (commonBitLen + 7) / 8;
1101 ulong bitLen = commonBitLen + newBits;1101 u_long bitLen = commonBitLen + newBits;
1102 ulong byteLen = (bitLen + 7) / 8;1102 u_long byteLen = (bitLen + 7) / 8;
1103 unsigned char* data;1103 unsigned char* data;
11041104
1105 bool isLocal = (bitLen <= MAX_EMBEDDED_BIT_LEN);1105 bool isLocal = (bitLen <= MAX_EMBEDDED_BIT_LEN);
@@ -1165,22 +1165,22 @@
1165********************************************************************************/1165********************************************************************************/
1166bool OrdPath::pushComp(1166bool OrdPath::pushComp(
1167 unsigned char* data,1167 unsigned char* data,
1168 ulong maxBitLen,1168 u_long maxBitLen,
1169 int32_t value,1169 int32_t value,
1170 ulong& bitLen)1170 u_long& bitLen)
1171{1171{
1172 assert(maxBitLen >= bitLen);1172 assert(maxBitLen >= bitLen);
11731173
1174 uint32_t eval;1174 uint32_t eval;
1175 uint64_t eval2;1175 uint64_t eval2;
1176 ulong bitsNeeded;1176 u_long bitsNeeded;
11771177
1178 OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2);1178 OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2);
11791179
1180 ulong byteIndex = bitLen / 8;1180 u_long byteIndex = bitLen / 8;
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.
11821182
1183 ulong bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8;1183 u_long bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8;
1184 if (bytesNeeded > MAX_BYTE_LEN)1184 if (bytesNeeded > MAX_BYTE_LEN)
1185 {1185 {
1186 throw ZORBA_EXCEPTION(1186 throw ZORBA_EXCEPTION(
@@ -1245,11 +1245,11 @@
1245 uint32_t eval;1245 uint32_t eval;
1246 uint64_t eval2;1246 uint64_t eval2;
12471247
1248 ulong byteLen;1248 u_long byteLen;
1249 ulong bitLen;1249 u_long bitLen;
1250 ulong byteIndex;1250 u_long byteIndex;
1251 ulong bitsAvailable = 0;1251 u_long bitsAvailable = 0;
1252 ulong bitsNeeded;1252 u_long bitsNeeded;
1253 unsigned char* data;1253 unsigned char* data;
12541254
1255 bool isLocal = this->isLocal();1255 bool isLocal = this->isLocal();
@@ -1261,7 +1261,7 @@
12611261
1262 OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2);1262 OrdPath::bitsNeeded(value, bitsNeeded, eval, eval2);
12631263
1264 ulong bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8;1264 u_long bytesNeeded = byteIndex + (bitsNeeded + 15 - bitsAvailable) / 8;
1265 if (bytesNeeded > MAX_BYTE_LEN)1265 if (bytesNeeded > MAX_BYTE_LEN)
1266 {1266 {
1267 throw ZORBA_EXCEPTION(1267 throw ZORBA_EXCEPTION(
@@ -1356,15 +1356,15 @@
1356********************************************************************************/1356********************************************************************************/
1357void OrdPath::appendEncodedComp(1357void OrdPath::appendEncodedComp(
1358 uint32_t eval,1358 uint32_t eval,
1359 ulong bitsNeeded,1359 u_long bitsNeeded,
1360 ulong byteIndex,1360 u_long byteIndex,
1361 ulong bitsAvailable,1361 u_long bitsAvailable,
1362 unsigned char* data)1362 unsigned char* data)
1363{1363{
1364 do1364 do
1365 {1365 {
1366 // Number of bits to consume in the current iteration1366 // Number of bits to consume in the current iteration
1367 ulong bitsToUse = (bitsNeeded < bitsAvailable ?1367 u_long bitsToUse = (bitsNeeded < bitsAvailable ?
1368 bitsNeeded : bitsAvailable);1368 bitsNeeded : bitsAvailable);
13691369
1370 unsigned char byte = (unsigned char)1370 unsigned char byte = (unsigned char)
@@ -1389,7 +1389,7 @@
1389********************************************************************************/1389********************************************************************************/
1390void OrdPath::bitsNeeded(1390void OrdPath::bitsNeeded(
1391 int32_t value,1391 int32_t value,
1392 ulong& bitsNeeded,1392 u_long& bitsNeeded,
1393 uint32_t& eval,1393 uint32_t& eval,
1394 uint64_t& eval2)1394 uint64_t& eval2)
1395{1395{
@@ -1531,7 +1531,7 @@
15311531
1532 str << "";1532 str << "";
15331533
1534 ulong len;1534 u_long len;
1535 unsigned char* buf = getDataAndLength(len);1535 unsigned char* buf = getDataAndLength(len);
15361536
1537 if (len == 0)1537 if (len == 0)
@@ -1542,7 +1542,7 @@
1542 if (local && len == MAX_EMBEDDED_BYTE_LEN)1542 if (local && len == MAX_EMBEDDED_BYTE_LEN)
1543 buf[MAX_EMBEDDED_BYTE] &= 0xFE;1543 buf[MAX_EMBEDDED_BYTE] &= 0xFE;
15441544
1545 for (ulong i = 0; i < len; ++i)1545 for (u_long i = 0; i < len; ++i)
1546 {1546 {
1547 // bugfix: Add a leading 0 if one-digit1547 // bugfix: Add a leading 0 if one-digit
1548 // Each output should always be two-digit1548 // Each output should always be two-digit
@@ -1579,13 +1579,13 @@
15791579
1580 str << "";1580 str << "";
15811581
1582 ulong len;1582 u_long len;
1583 unsigned char* buf = getDataAndLength(len);1583 unsigned char* buf = getDataAndLength(len);
15841584
1585 if (len == 0)1585 if (len == 0)
1586 return str.str().c_str();1586 return str.str().c_str();
15871587
1588 for (ulong i = 0; i < len; i++)1588 for (u_long i = 0; i < len; i++)
1589 {1589 {
1590 // bugfix Add a leading 0 if one-digit1590 // bugfix Add a leading 0 if one-digit
1591 // Each output should always be two-digit1591 // Each output should always be two-digit
@@ -1596,14 +1596,14 @@
15961596
1597 str << " ";1597 str << " ";
15981598
1599 ulong numComps = 0;1599 u_long numComps = 0;
1600 ulong bitSize = 0;1600 u_long bitSize = 0;
1601 int32_t deweyid[MAX_NUM_COMPS];1601 int32_t deweyid[MAX_NUM_COMPS];
1602 ulong offsets[MAX_NUM_COMPS];1602 u_long offsets[MAX_NUM_COMPS];
16031603
1604 decompress(0, deweyid, offsets, numComps, bitSize);1604 decompress(0, deweyid, offsets, numComps, bitSize);
16051605
1606 for (ulong i = 0; i < numComps; ++i)1606 for (u_long i = 0; i < numComps; ++i)
1607 {1607 {
1608 str << std::dec << deweyid[i];1608 str << std::dec << deweyid[i];
1609 if (i < numComps-1)1609 if (i < numComps-1)
@@ -1617,18 +1617,18 @@
1617/*******************************************************************************1617/*******************************************************************************
16181618
1619********************************************************************************/1619********************************************************************************/
1620ulong OrdPath::getLevel() const1620u_long OrdPath::getLevel() const
1621{1621{
1622 int32_t dewey[MAX_NUM_COMPS];1622 int32_t dewey[MAX_NUM_COMPS];
1623 ulong offsets[MAX_NUM_COMPS];1623 u_long offsets[MAX_NUM_COMPS];
1624 ulong numComps = 0;1624 u_long numComps = 0;
1625 ulong bitLen = 0;1625 u_long bitLen = 0;
16261626
1627 decompress(0, dewey, offsets, numComps, bitLen);1627 decompress(0, dewey, offsets, numComps, bitLen);
16281628
1629 ulong level = 0;1629 u_long level = 0;
16301630
1631 for (ulong i = 0; i < numComps; ++i)1631 for (u_long i = 0; i < numComps; ++i)
1632 {1632 {
1633 if (dewey[i] % 2 == 1)1633 if (dewey[i] % 2 == 1)
1634 ++level;1634 ++level;
@@ -1644,18 +1644,18 @@
1644 the start of some component).1644 the start of some component).
1645********************************************************************************/1645********************************************************************************/
1646void OrdPath::decompress(1646void OrdPath::decompress(
1647 ulong startOffset,1647 u_long startOffset,
1648 int32_t* deweyid,1648 int32_t* deweyid,
1649 ulong* compOffsets,1649 u_long* compOffsets,
1650 ulong& numComps,1650 u_long& numComps,
1651 ulong& bitLen) const1651 u_long& bitLen) const
1652{1652{
1653 unsigned char tmpbuf[MAX_EMBEDDED_BYTE_LEN];1653 unsigned char tmpbuf[MAX_EMBEDDED_BYTE_LEN];
16541654
1655 ulong byteIndex = startOffset / 8;1655 u_long byteIndex = startOffset / 8;
1656 ulong bitIndex = startOffset % 8;1656 u_long bitIndex = startOffset % 8;
16571657
1658 ulong byteLen;1658 u_long byteLen;
1659 unsigned char* data;1659 unsigned char* data;
1660 bool isLocal = this->isLocal();1660 bool isLocal = this->isLocal();
16611661
@@ -1713,13 +1713,13 @@
1713********************************************************************************/1713********************************************************************************/
1714void OrdPath::decodeByte(1714void OrdPath::decodeByte(
1715 unsigned char* data,1715 unsigned char* data,
1716 ulong& bitLen,1716 u_long& bitLen,
1717 ulong& byteIndex,1717 u_long& byteIndex,
1718 ulong& bitIndex,1718 u_long& bitIndex,
1719 unsigned char byte,1719 unsigned char byte,
1720 int32_t* deweyid,1720 int32_t* deweyid,
1721 ulong* compOffsets,1721 u_long* compOffsets,
1722 ulong& numComps)1722 u_long& numComps)
1723{1723{
1724 compOffsets[numComps] = bitLen;1724 compOffsets[numComps] = bitLen;
17251725
@@ -4092,10 +4092,10 @@
4092********************************************************************************/4092********************************************************************************/
4093void OrdPath::extractValue(4093void OrdPath::extractValue(
4094 unsigned char* data,4094 unsigned char* data,
4095 ulong& bitLen,4095 u_long& bitLen,
4096 ulong& byteIndex,4096 u_long& byteIndex,
4097 ulong& bitIndex,4097 u_long& bitIndex,
4098 ulong numBits,4098 u_long numBits,
4099 int32_t baseValue,4099 int32_t baseValue,
4100 int32_t& result)4100 int32_t& result)
4101{4101{
@@ -4117,9 +4117,9 @@
4117 numBits -= (8 - bitIndex);4117 numBits -= (8 - bitIndex);
4118 byteIndex++;4118 byteIndex++;
41194119
4120 ulong numBytes = numBits / 8;4120 u_long numBytes = numBits / 8;
41214121
4122 for (ulong i = 0; i < numBytes; ++i)4122 for (u_long i = 0; i < numBytes; ++i)
4123 {4123 {
4124 result <<= 8;4124 result <<= 8;
4125 result |= data[byteIndex];4125 result |= data[byteIndex];
@@ -4180,7 +4180,7 @@
4180/*******************************************************************************4180/*******************************************************************************
41814181
4182********************************************************************************/4182********************************************************************************/
4183ulong OrdPathStack::getByteLength() const4183u_long OrdPathStack::getByteLength() const
4184{4184{
4185 return theByteIndex + 1;4185 return theByteIndex + 1;
4186}4186}
@@ -4246,8 +4246,8 @@
4246 theDeweyId[theNumComps - 1] += 2;4246 theDeweyId[theNumComps - 1] += 2;
42474247
4248 // Pop the last 2 compressed components4248 // Pop the last 2 compressed components
4249 ulong numBits = theCompLens[theNumComps] + theCompLens[theNumComps-1];4249 u_long numBits = theCompLens[theNumComps] + theCompLens[theNumComps-1];
4250 ulong numBytes = (numBits + theBitsAvailable) / 8;4250 u_long numBytes = (numBits + theBitsAvailable) / 8;
4251 theByteIndex -= numBytes;4251 theByteIndex -= numBytes;
4252 theBitsAvailable = (numBits + theBitsAvailable) % 8;4252 theBitsAvailable = (numBits + theBitsAvailable) % 8;
42534253
@@ -4280,8 +4280,8 @@
4280 theDeweyId[theNumComps - 1] += 2;4280 theDeweyId[theNumComps - 1] += 2;
42814281
4282 // Pop the last compressed component4282 // Pop the last compressed component
4283 ulong numBits = theCompLens[theNumComps-1];4283 u_long numBits = theCompLens[theNumComps-1];
4284 ulong numBytes = (numBits + theBitsAvailable) / 8;4284 u_long numBytes = (numBits + theBitsAvailable) / 8;
4285 theByteIndex -= numBytes;4285 theByteIndex -= numBytes;
4286 theBitsAvailable = (numBits + theBitsAvailable) % 8;4286 theBitsAvailable = (numBits + theBitsAvailable) % 8;
42874287
@@ -4298,11 +4298,11 @@
4298/*******************************************************************************4298/*******************************************************************************
42994299
4300********************************************************************************/4300********************************************************************************/
4301void OrdPathStack::compressComp(ulong comp, int32_t value)4301void OrdPathStack::compressComp(u_long comp, int32_t value)
4302{4302{
4303 uint32_t eval;4303 uint32_t eval;
4304 bool overflow = false;4304 bool overflow = false;
4305 ulong bitsNeeded;4305 u_long bitsNeeded;
43064306
4307 if (value < 0)4307 if (value < 0)
4308 {4308 {
@@ -4361,7 +4361,7 @@
4361 }4361 }
4362 }4362 }
43634363
4364 ulong bytesNeeded = theByteIndex +4364 u_long bytesNeeded = theByteIndex +
4365 (bitsNeeded + 15 - theBitsAvailable) / 8;4365 (bitsNeeded + 15 - theBitsAvailable) / 8;
43664366
4367 if (bytesNeeded > OrdPath::MAX_BYTE_LEN)4367 if (bytesNeeded > OrdPath::MAX_BYTE_LEN)
@@ -4398,7 +4398,7 @@
43984398
4399 do4399 do
4400 {4400 {
4401 ulong bitsUsed = (bitsNeeded < theBitsAvailable ?4401 u_long bitsUsed = (bitsNeeded < theBitsAvailable ?
4402 bitsNeeded : theBitsAvailable);4402 bitsNeeded : theBitsAvailable);
44034403
4404 unsigned char byte = (unsigned char)4404 unsigned char byte = (unsigned char)
@@ -4428,7 +4428,7 @@
4428{4428{
4429 std::stringstream str;4429 std::stringstream str;
44304430
4431 for (ulong i = 0; i < theNumComps; i++)4431 for (u_long i = 0; i < theNumComps; i++)
4432 {4432 {
4433 str << theDeweyId[i];4433 str << theDeweyId[i];
4434 if (i < theNumComps-1)4434 if (i < theNumComps-1)
@@ -4437,9 +4437,9 @@
4437#if 14437#if 1
4438 str << " ";4438 str << " ";
44394439
4440 ulong len = getByteLength();4440 u_long len = getByteLength();
44414441
4442 for (ulong i = 0; i < len; i++)4442 for (u_long i = 0; i < len; i++)
4443 {4443 {
4444 str << std::hex << (unsigned short)theBuffer[i] << '|';4444 str << std::hex << (unsigned short)theBuffer[i] << '|';
4445 }4445 }
44464446
=== modified file 'src/store/naive/ordpath.h'
--- src/store/naive/ordpath.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/ordpath.h 2012-12-24 23:26:24 +0000
@@ -66,12 +66,12 @@
66 };66 };
6767
68protected:68protected:
69 static const ulong MAX_EMBEDDED_BYTE_LEN = 8;69 static const u_long MAX_EMBEDDED_BYTE_LEN = 8;
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;
7171
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;
7373
74 static const ulong MAX_NUM_COMPS = MAX_BYTE_LEN * 4;74 static const u_long MAX_NUM_COMPS = MAX_BYTE_LEN * 4;
7575
76 // decompression76 // decompression
77 static const unsigned char theByteMasks[8][2];77 static const unsigned char theByteMasks[8][2];
@@ -113,21 +113,21 @@
113protected:113protected:
114 static bool pushComp(114 static bool pushComp(
115 unsigned char* buf,115 unsigned char* buf,
116 ulong maxBitSize,116 u_long maxBitSize,
117 int32_t value,117 int32_t value,
118 ulong& bitSize);118 u_long& bitSize);
119119
120 static void bitsNeeded(120 static void bitsNeeded(
121 int32_t value, 121 int32_t value,
122 ulong& bitsNeeded,122 u_long& bitsNeeded,
123 uint32_t& eval,123 uint32_t& eval,
124 uint64_t& eval2);124 uint64_t& eval2);
125125
126 static void appendEncodedComp(126 static void appendEncodedComp(
127 uint32_t eval,127 uint32_t eval,
128 ulong bitsNeeded,128 u_long bitsNeeded,
129 ulong byteIndex,129 u_long byteIndex,
130 ulong bitsAvailable,130 u_long bitsAvailable,
131 unsigned char* data);131 unsigned char* data);
132132
133 static void insertBeforeOrAfter(133 static void insertBeforeOrAfter(
@@ -138,20 +138,20 @@
138138
139 static void decodeByte(139 static void decodeByte(
140 unsigned char* data,140 unsigned char* data,
141 ulong& bitSize,141 u_long& bitSize,
142 ulong& byteIndex,142 u_long& byteIndex,
143 ulong& bitIndex,143 u_long& bitIndex,
144 unsigned char byte,144 unsigned char byte,
145 int32_t* deweyid,145 int32_t* deweyid,
146 ulong* compOffsets,146 u_long* compOffsets,
147 ulong& numComps);147 u_long& numComps);
148148
149 static void extractValue(149 static void extractValue(
150 unsigned char* data,150 unsigned char* data,
151 ulong& bitLen,151 u_long& bitLen,
152 ulong& byteIndex,152 u_long& byteIndex,
153 ulong& bitIndex,153 u_long& bitIndex,
154 ulong numBits,154 u_long numBits,
155 int32_t baseValue,155 int32_t baseValue,
156 int32_t& result);156 int32_t& result);
157157
@@ -165,7 +165,7 @@
165165
166 OrdPath(166 OrdPath(
167 const unsigned char* buf,167 const unsigned char* buf,
168 ulong byteLen,168 u_long byteLen,
169 bool isBinary = false);169 bool isBinary = false);
170170
171 ~OrdPath() 171 ~OrdPath()
@@ -174,9 +174,9 @@
174 delete [] getRemoteBuffer();174 delete [] getRemoteBuffer();
175 }175 }
176176
177 void initFromData(const unsigned char* buf, ulong byteLen);177 void initFromData(const unsigned char* buf, u_long byteLen);
178178
179 void initFromString(const unsigned char* buf, ulong byteLen);179 void initFromString(const unsigned char* buf, u_long byteLen);
180180
181 bool isValid() const { return getByteLength() != 0; }181 bool isValid() const { return getByteLength() != 0; }
182182
@@ -197,7 +197,7 @@
197197
198 RelativePosition getRelativePosition2(const OrdPath& other) const;198 RelativePosition getRelativePosition2(const OrdPath& other) const;
199199
200 ulong getLevel() const;200 u_long getLevel() const;
201201
202 void compress(const DeweyID& dewey);202 void compress(const DeweyID& dewey);
203203
@@ -239,7 +239,7 @@
239 }239 }
240240
241241
242 void initRemote(ulong byteLen)242 void initRemote(u_long byteLen)
243 {243 {
244 if (!isLocal())244 if (!isLocal())
245 delete [] getRemoteBuffer();245 delete [] getRemoteBuffer();
@@ -252,7 +252,7 @@
252 }252 }
253253
254254
255 unsigned char* getDataAndLength(ulong& len) const255 unsigned char* getDataAndLength(u_long& len) const
256 {256 {
257 if (isLocal())257 if (isLocal())
258 {258 {
@@ -286,13 +286,13 @@
286 }286 }
287287
288288
289 ulong getByteLength() const289 u_long getByteLength() const
290 {290 {
291 return (isLocal() ? getLocalByteLength() : getRemoteByteLength());291 return (isLocal() ? getLocalByteLength() : getRemoteByteLength());
292 }292 }
293293
294294
295 ulong getLocalByteLength() const295 u_long getLocalByteLength() const
296 {296 {
297 if (theBuffer.local[MAX_EMBEDDED_BYTE] != 1)297 if (theBuffer.local[MAX_EMBEDDED_BYTE] != 1)
298 return MAX_EMBEDDED_BYTE_LEN;298 return MAX_EMBEDDED_BYTE_LEN;
@@ -307,31 +307,31 @@
307 }307 }
308308
309309
310 ulong getRemoteByteLength() const310 u_long getRemoteByteLength() const
311 {311 {
312 return getRemoteBuffer()[0];312 return getRemoteBuffer()[0];
313 }313 }
314314
315315
316 ulong getBitLength(ulong& byteLen) const316 u_long getBitLength(u_long& byteLen) const
317 {317 {
318 return (isLocal() ? getLocalBitLength(byteLen) : getRemoteBitLength(byteLen));318 return (isLocal() ? getLocalBitLength(byteLen) : getRemoteBitLength(byteLen));
319 }319 }
320320
321 ulong getLocalBitLength(ulong& byteLen) const;321 u_long getLocalBitLength(u_long& byteLen) const;
322322
323 ulong getRemoteBitLength(ulong& byteLen) const;323 u_long getRemoteBitLength(u_long& byteLen) const;
324324
325 bool compressLocal(const DeweyID& dewey);325 bool compressLocal(const DeweyID& dewey);
326326
327 void compressRemote(const DeweyID& dewey);327 void compressRemote(const DeweyID& dewey);
328328
329 void decompress(329 void decompress(
330 ulong startOffset,330 u_long startOffset,
331 int32_t* deweyid,331 int32_t* deweyid,
332 ulong* compOffsets,332 u_long* compOffsets,
333 ulong& numComps,333 u_long& numComps,
334 ulong& bitSize) const;334 u_long& bitSize) const;
335};335};
336336
337337
@@ -351,15 +351,15 @@
351 friend class OrdPath;351 friend class OrdPath;
352352
353protected:353protected:
354 ulong theNumComps;354 u_long theNumComps;
355355
356 int32_t theDeweyId[OrdPath::MAX_NUM_COMPS];356 int32_t theDeweyId[OrdPath::MAX_NUM_COMPS];
357357
358 unsigned char theCompLens[OrdPath::MAX_NUM_COMPS];358 unsigned char theCompLens[OrdPath::MAX_NUM_COMPS];
359359
360 unsigned char theBuffer[OrdPath::MAX_BYTE_LEN];360 unsigned char theBuffer[OrdPath::MAX_BYTE_LEN];
361 ulong theByteIndex;361 u_long theByteIndex;
362 ulong theBitsAvailable;362 u_long theBitsAvailable;
363363
364public:364public:
365 OrdPathStack();365 OrdPathStack();
@@ -368,9 +368,9 @@
368368
369 void init();369 void init();
370370
371 ulong getNumComps() const { return theNumComps; }371 u_long getNumComps() const { return theNumComps; }
372 372
373 ulong getByteLength() const;373 u_long getByteLength() const;
374374
375 void pushChild();375 void pushChild();
376 void popChild();376 void popChild();
@@ -382,7 +382,7 @@
382 OrdPathStack(const OrdPathStack& other);382 OrdPathStack(const OrdPathStack& other);
383 OrdPathStack& operator=(const OrdPathStack& other);383 OrdPathStack& operator=(const OrdPathStack& other);
384384
385 void compressComp(ulong comp, int32_t value);385 void compressComp(u_long comp, int32_t value);
386};386};
387387
388388
389389
=== modified file 'src/store/naive/pul_primitives.h'
--- src/store/naive/pul_primitives.h 2012-12-10 16:02:05 +0000
+++ src/store/naive/pul_primitives.h 2012-12-24 23:26:24 +0000
@@ -262,7 +262,7 @@
262protected:262protected:
263 std::vector<store::Item_t> theNewAttrs;263 std::vector<store::Item_t> theNewAttrs;
264264
265 ulong theNumApplied;265 u_long theNumApplied;
266 std::vector<store::Item*> theNewBindings;266 std::vector<store::Item*> theNewBindings;
267267
268 UpdInsertAttributes(268 UpdInsertAttributes(
@@ -297,9 +297,9 @@
297 store::Item_t theAttr;297 store::Item_t theAttr;
298 std::vector<store::Item_t> theNewAttrs;298 std::vector<store::Item_t> theNewAttrs;
299299
300 ulong theNumApplied;300 u_long theNumApplied;
301 std::vector<store::Item*> theNewBindings;301 std::vector<store::Item*> theNewBindings;
302 ulong thePos;302 u_long thePos;
303303
304 UpdReplaceAttribute(304 UpdReplaceAttribute(
305 CollectionPul* pul,305 CollectionPul* pul,
@@ -335,7 +335,7 @@
335 store::Item_t theChild;335 store::Item_t theChild;
336 std::vector<store::Item_t> theNewChildren;336 std::vector<store::Item_t> theNewChildren;
337337
338 ulong theNumApplied;338 u_long theNumApplied;
339339
340 csize thePos;340 csize thePos;
341341
@@ -535,7 +535,7 @@
535 zstring theNewContent;535 zstring theNewContent;
536536
537 store::Item_t theOldNode;537 store::Item_t theOldNode;
538 ulong theOldPos;538 u_long theOldPos;
539 TextNodeContent theOldContent;539 TextNodeContent theOldContent;
540 bool theIsTyped;540 bool theIsTyped;
541541
@@ -930,7 +930,7 @@
930930
931 csize numNodes() const { return theNodes.size(); }931 csize numNodes() const { return theNodes.size(); }
932932
933 store::Item* getNode(ulong i) const { return theNodes[i].getp(); }933 store::Item* getNode(u_long i) const { return theNodes[i].getp(); }
934934
935 bool dynamicCollection() const { return theIsDynamic; }935 bool dynamicCollection() const { return theIsDynamic; }
936};936};
@@ -1012,7 +1012,7 @@
1012 friend class PULPrimitiveFactory;1012 friend class PULPrimitiveFactory;
10131013
1014protected:1014protected:
1015 ulong theNumApplied;1015 u_long theNumApplied;
10161016
1017 UpdInsertIntoCollection(1017 UpdInsertIntoCollection(
1018 CollectionPul* pul,1018 CollectionPul* pul,
@@ -1045,7 +1045,7 @@
1045 friend class PULPrimitiveFactory;1045 friend class PULPrimitiveFactory;
10461046
1047protected:1047protected:
1048 ulong theNumApplied;1048 u_long theNumApplied;
10491049
1050 UpdInsertFirstIntoCollection(1050 UpdInsertFirstIntoCollection(
1051 CollectionPul* pul,1051 CollectionPul* pul,
@@ -1078,7 +1078,7 @@
1078 friend class PULPrimitiveFactory;1078 friend class PULPrimitiveFactory;
10791079
1080protected:1080protected:
1081 ulong theNumApplied;1081 u_long theNumApplied;
10821082
1083 UpdInsertLastIntoCollection(1083 UpdInsertLastIntoCollection(
1084 CollectionPul* pul,1084 CollectionPul* pul,
@@ -1181,7 +1181,7 @@
1181protected:1181protected:
1182 bool theIsLast;1182 bool theIsLast;
11831183
1184 ulong theNumApplied;1184 u_long theNumApplied;
1185 std::vector<bool> theFound;1185 std::vector<bool> theFound;
1186 std::vector<xs_integer> thePositions;1186 std::vector<xs_integer> thePositions;
11871187
11881188
=== modified file 'src/store/naive/qname_pool.cpp'
--- src/store/naive/qname_pool.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/qname_pool.cpp 2012-12-24 23:26:24 +0000
@@ -35,7 +35,7 @@
35/*******************************************************************************35/*******************************************************************************
3636
37********************************************************************************/37********************************************************************************/
38QNamePool::QNamePool(ulong size, StringPool* nspool) 38QNamePool::QNamePool(u_long size, StringPool* nspool)
39 :39 :
40 theCache(new QNameItem[size]),40 theCache(new QNameItem[size]),
41 theCacheSize(size),41 theCacheSize(size),
@@ -260,7 +260,7 @@
260 zstring pooledNs;260 zstring pooledNs;
261 theNamespacePool->insertc(ns, pooledNs);261 theNamespacePool->insertc(ns, pooledNs);
262262
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)));
264264
265 try265 try
266 {266 {
@@ -347,7 +347,7 @@
347 zstring pooledNs;347 zstring pooledNs;
348 theNamespacePool->insert(ns, pooledNs);348 theNamespacePool->insert(ns, pooledNs);
349349
350 ulong hval = hashfun::h32(pre.c_str(),350 u_long hval = hashfun::h32(pre.c_str(),
351 hashfun::h32(ln.c_str(),351 hashfun::h32(ln.c_str(),
352 hashfun::h32(ns.c_str())));352 hashfun::h32(ns.c_str())));
353 try353 try
@@ -437,7 +437,7 @@
437437
438 if (qn->isValid())438 if (qn->isValid())
439 {439 {
440 ulong hval = CompareFunction::hash(qn);440 u_long hval = CompareFunction::hash(qn);
441 theHashSet.eraseNoSync(qn, hval);441 theHashSet.eraseNoSync(qn, hval);
442 qn->invalidate(true, &normVictim);442 qn->invalidate(true, &normVictim);
443 }443 }
444444
=== modified file 'src/store/naive/qname_pool.h'
--- src/store/naive/qname_pool.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/qname_pool.h 2012-12-24 23:26:24 +0000
@@ -87,7 +87,7 @@
87 friend class QNamePool;87 friend class QNamePool;
8888
89 public:89 public:
90 QNamePoolHashSet(ulong size) 90 QNamePoolHashSet(u_long size)
91 :91 :
92 HashSet<QNameItem*, CompareFunction>(size, true)92 HashSet<QNameItem*, CompareFunction>(size, true)
93 {93 {
@@ -98,20 +98,20 @@
98 typedef HashEntry<QNameItem*, DummyHashValue> QNHashEntry;98 typedef HashEntry<QNameItem*, DummyHashValue> QNHashEntry;
9999
100public:100public:
101 static const ulong MAX_CACHE_SIZE = 32768;101 static const u_long MAX_CACHE_SIZE = 32768;
102102
103protected:103protected:
104 QNameItem * theCache;104 QNameItem * theCache;
105 ulong theCacheSize;105 u_long theCacheSize;
106 ulong theFirstFree;106 u_long theFirstFree;
107 ulong theNumFree;107 u_long theNumFree;
108108
109 QNamePoolHashSet theHashSet;109 QNamePoolHashSet theHashSet;
110110
111 StringPool * theNamespacePool;111 StringPool * theNamespacePool;
112112
113public:113public:
114 QNamePool(ulong size, StringPool* nspool);114 QNamePool(u_long size, StringPool* nspool);
115115
116 ~QNamePool();116 ~QNamePool();
117117
118118
=== modified file 'src/store/naive/query_context.h'
--- src/store/naive/query_context.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/query_context.h 2012-12-24 23:26:24 +0000
@@ -76,13 +76,13 @@
76class QueryContextContainer76class QueryContextContainer
77{77{
78protected:78protected:
79 std::map<ulong, QueryContext> theContainer;79 std::map<u_long, QueryContext> theContainer;
80 SYNC_CODE(Mutex theMutex;)80 SYNC_CODE(Mutex theMutex;)
8181
82public:82public:
83 QueryContext& getContext(ulong queryId);83 QueryContext& getContext(u_long queryId);
8484
85 void removeContext(ulong queryId);85 void removeContext(u_long queryId);
86};86};
8787
8888
8989
=== modified file 'src/store/naive/simple_collection.h'
--- src/store/naive/simple_collection.h 2012-12-05 14:51:50 +0000
+++ src/store/naive/simple_collection.h 2012-12-24 23:26:24 +0000
@@ -72,7 +72,7 @@
7272
7373
74protected:74protected:
75 ulong theId;75 u_long theId;
76 store::Item_t theName;76 store::Item_t theName;
77 checked_vector<store::Item_t> theXmlTrees;77 checked_vector<store::Item_t> theXmlTrees;
78 bool theIsDynamic;78 bool theIsDynamic;
@@ -101,7 +101,7 @@
101 /********************** All these methods implement the **********************101 /********************** All these methods implement the **********************
102 ***************** zorba::simplestore::Collection interface ******************/102 ***************** zorba::simplestore::Collection interface ******************/
103103
104 ulong getId() const { return theId; }104 u_long getId() const { return theId; }
105105
106 const store::Item* getName() const { return theName.getp(); }106 const store::Item* getName() const { return theName.getp(); }
107107
108108
=== modified file 'src/store/naive/simple_collection_set.cpp'
--- src/store/naive/simple_collection_set.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/simple_collection_set.cpp 2012-12-24 23:26:24 +0000
@@ -93,7 +93,7 @@
93/*******************************************************************************93/*******************************************************************************
9494
95********************************************************************************/95********************************************************************************/
96const ulong SimpleCollectionSet::DEFAULT_COLLECTION_MAP_SIZE = 32;96const u_long SimpleCollectionSet::DEFAULT_COLLECTION_MAP_SIZE = 32;
9797
9898
99SimpleCollectionSet::SimpleCollectionSet()99SimpleCollectionSet::SimpleCollectionSet()
100100
=== modified file 'src/store/naive/simple_collection_set.h'
--- src/store/naive/simple_collection_set.h 2012-09-19 21:16:15 +0000
+++ src/store/naive/simple_collection_set.h 2012-12-24 23:26:24 +0000
@@ -36,7 +36,7 @@
36public:36public:
37 ITEM_PTR_HASH_MAP(zorba::store::Collection_t, Set);37 ITEM_PTR_HASH_MAP(zorba::store::Collection_t, Set);
38 38
39 static const ulong DEFAULT_COLLECTION_MAP_SIZE;39 static const u_long DEFAULT_COLLECTION_MAP_SIZE;
40 40
41protected:41protected:
42 Set theCollections;42 Set theCollections;
4343
=== modified file 'src/store/naive/simple_index.cpp'
--- src/store/naive/simple_index.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/simple_index.cpp 2012-12-24 23:26:24 +0000
@@ -422,11 +422,11 @@
422********************************************************************************/422********************************************************************************/
423bool IndexPointCondition::test(const store::IndexKey& key) const423bool IndexPointCondition::test(const store::IndexKey& key) const
424{424{
425 ulong numCols = theKey.size();425 u_long numCols = theKey.size();
426426
427 ZORBA_ASSERT(numCols == theIndex->getNumColumns());427 ZORBA_ASSERT(numCols == theIndex->getNumColumns());
428428
429 for (ulong i = 0; i < numCols; i++)429 for (u_long i = 0; i < numCols; i++)
430 {430 {
431 if (! theKey[i]->equals(key[i],431 if (! theKey[i]->equals(key[i],
432 theIndex->getSpecification().theTimezone,432 theIndex->getSpecification().theTimezone,
@@ -488,7 +488,7 @@
488 bool lowerIncl,488 bool lowerIncl,
489 bool upperIncl)489 bool upperIncl)
490{490{
491 ulong size = theLowerBounds.size();491 u_long size = theLowerBounds.size();
492 theLowerBounds.resize(size + 1);492 theLowerBounds.resize(size + 1);
493 theUpperBounds.resize(size + 1);493 theUpperBounds.resize(size + 1);
494 theRangeFlags.resize(size + 1);494 theRangeFlags.resize(size + 1);
@@ -507,13 +507,13 @@
507********************************************************************************/507********************************************************************************/
508bool IndexBoxValueCondition::test(const store::IndexKey& key) const508bool IndexBoxValueCondition::test(const store::IndexKey& key) const
509{509{
510 ulong numCols = theLowerBounds.size();510 u_long numCols = theLowerBounds.size();
511511
512 ZORBA_ASSERT(numCols <= theIndex->getNumColumns());512 ZORBA_ASSERT(numCols <= theIndex->getNumColumns());
513513
514 long timezone = theIndex->getSpecification().theTimezone;514 long timezone = theIndex->getSpecification().theTimezone;
515515
516 for (ulong i = 0; i < numCols; i++)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches