Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11115
Merged at revision: 11474
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 725 lines (+120/-157)
14 files modified
src/compiler/translator/translator.cpp (+17/-2)
src/diagnostics/diagnostic_en.xml (+1/-1)
src/diagnostics/pregenerated/dict_en.cpp (+1/-1)
src/runtime/accessors/accessors_impl.cpp (+12/-5)
src/runtime/api/plan_iterator_wrapper.cpp (+10/-48)
src/runtime/api/plan_iterator_wrapper.h (+5/-8)
src/runtime/base/plan_iterator.cpp (+34/-7)
src/runtime/base/plan_iterator.h (+7/-14)
src/runtime/core/constructors.cpp (+33/-30)
src/runtime/core/fncall_iterator.h (+0/-2)
src/store/api/item.h (+0/-17)
src/store/naive/atomic_items.cpp (+0/-7)
src/store/naive/atomic_items.h (+0/-14)
test/fots/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+165747@code.launchpad.net

Commit message

fixed xray performance regression + cleanup

Description of the change

fixed xray performance regression + cleanup.

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job markos-scratch-2013-05-25T14-47-08.838Z is finished.
  The final status was:

  No tests were run - build or configure step must have failed.

  Not commiting changes.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

11114. By Markos Zaharioudakis

merge from trunk

11115. By Markos Zaharioudakis

merge from trunk

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 markos-scratch-2013-05-25T15-21-52.13Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2013-05-24 16:34:11 +0000
+++ src/compiler/translator/translator.cpp 2013-05-25 15:17:29 +0000
@@ -11969,8 +11969,10 @@
11969 }11969 }
11970 case FunctionConsts::FN_HEAD_1:11970 case FunctionConsts::FN_HEAD_1:
11971 {11971 {
11972 arguments.push_back(CREATE(const)(theRootSctx, theUDF, loc, numeric_consts<xs_integer>::one()));11972 arguments.push_back(CREATE(const)(theRootSctx, theUDF, loc,
11973 arguments.push_back(CREATE(const)(theRootSctx, theUDF, loc, numeric_consts<xs_integer>::one()));11973 numeric_consts<xs_integer>::one()));
11974 arguments.push_back(CREATE(const)(theRootSctx, theUDF, loc,
11975 numeric_consts<xs_integer>::one()));
1197411976
11975 function* f = BUILTIN_FUNC(OP_ZORBA_SUBSEQUENCE_INT_3);11977 function* f = BUILTIN_FUNC(OP_ZORBA_SUBSEQUENCE_INT_3);
1197611978
@@ -12653,6 +12655,19 @@
1265312655
12654 break;12656 break;
12655 }12657 }
12658 case FunctionConsts::FN_MAP_2:
12659 case FunctionConsts::FN_FILTER_2:
12660 {
12661 flwor_expr* flworBody = CREATE(flwor)(theRootSctx, theUDF, loc);
12662
12663 let_clause* lc = wrap_in_letclause(foArgs[0]);
12664 flworBody->add_clause(lc);
12665 foArgs[0] = CREATE(wrapper)(theRootSctx, theUDF, loc, lc->get_var());
12666
12667 flworBody->set_return_expr(generate_fn_body(f, foArgs, loc));
12668 body = flworBody;
12669 break;
12670 }
12656 case FunctionConsts::FN_FUNCTION_LOOKUP_2:12671 case FunctionConsts::FN_FUNCTION_LOOKUP_2:
12657 {12672 {
12658 bool varAdded = false;12673 bool varAdded = false;
1265912674
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2013-05-16 22:26:07 +0000
+++ src/diagnostics/diagnostic_en.xml 2013-05-25 15:17:29 +0000
@@ -1641,7 +1641,7 @@
1641 An argument to \c fn:data() contains a node that does not have a typed1641 An argument to \c fn:data() contains a node that does not have a typed
1642 value.1642 value.
1643 </comment>1643 </comment>
1644 <value>"$1": argument to fn:data() is function item</value>1644 <value>"$1": function item passed as argument to fn:data()</value>
1645 </diagnostic>1645 </diagnostic>
16461646
1647 <diagnostic code="FOTY0014">1647 <diagnostic code="FOTY0014">
16481648
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2013-05-16 22:26:07 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2013-05-25 15:17:29 +0000
@@ -71,7 +71,7 @@
71 { "FORX0003", "\"$1\": regular expression matches zero-length string" },71 { "FORX0003", "\"$1\": regular expression matches zero-length string" },
72 { "FORX0004", "\"$1\": invalid replacement string${: 2}" },72 { "FORX0004", "\"$1\": invalid replacement string${: 2}" },
73 { "FOTY0012", "\"$1\": element node of type $2 does not have a typed value" },73 { "FOTY0012", "\"$1\": element node of type $2 does not have a typed value" },
74 { "FOTY0013", "\"$1\": argument to fn:data() is function item" },74 { "FOTY0013", "\"$1\": function item passed as argument to fn:data()" },
75 { "FOTY0014", "\"$1\": argument to fn:string() is a function item" },75 { "FOTY0014", "\"$1\": argument to fn:string() is a function item" },
76 { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },76 { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },
77 { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },77 { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },
7878
=== modified file 'src/runtime/accessors/accessors_impl.cpp'
--- src/runtime/accessors/accessors_impl.cpp 2013-05-04 20:20:05 +0000
+++ src/runtime/accessors/accessors_impl.cpp 2013-05-25 15:17:29 +0000
@@ -183,6 +183,7 @@
183{183{
184 PlanIter_t iter;184 PlanIter_t iter;
185 store::Item_t itemNode;185 store::Item_t itemNode;
186 store::Item::ItemKind resKind;
186187
187 FnDataIteratorState* state;188 FnDataIteratorState* state;
188 DEFAULT_STACK_INIT(FnDataIteratorState, state, planState);189 DEFAULT_STACK_INIT(FnDataIteratorState, state, planState);
@@ -192,7 +193,9 @@
192 if (!consumeNext(result, theChildren[0], planState))193 if (!consumeNext(result, theChildren[0], planState))
193 break;194 break;
194195
195 if (result->isNode())196 resKind = result->getKind();
197
198 if (resKind == store::Item::NODE)
196 {199 {
197 itemNode.transfer(result);200 itemNode.transfer(result);
198201
@@ -227,22 +230,26 @@
227 }230 }
228 }231 }
229 }232 }
230 else if (result->isAtomic())233 else if (resKind == store::Item::ATOMIC)
231 {234 {
232 STACK_PUSH(true, state);235 STACK_PUSH(true, state);
233 }236 }
234 else if (result->isJSONItem())237 else if (resKind == store::Item::JSONIQ)
235 {238 {
236 RAISE_ERROR(jerr::JNTY0004, loc,239 RAISE_ERROR(jerr::JNTY0004, loc,
237 ERROR_PARAMS(result->isJSONObject() ? "object" : "array"));240 ERROR_PARAMS(result->isJSONObject() ? "object" : "array"));
238 }241 }
239 else //(result->isFunction())242 else if (resKind == store::Item::FUNCTION)
240 {243 {
241 store::Item_t fnName = result->getFunctionName();244 store::Item_t fnName = result->getFunctionName();
242 RAISE_ERROR(err::FOTY0013, loc, 245 RAISE_ERROR(err::FOTY0013, loc,
243 ERROR_PARAMS(fnName.getp() ?246 ERROR_PARAMS(fnName.getp() ?
244 result->getFunctionName()->getStringValue() :247 result->getFunctionName()->getStringValue() :
245 result->show()));248 zstring("???")));
249 }
250 else
251 {
252 ZORBA_ASSERT(false);
246 }253 }
247 }254 }
248255
249256
=== modified file 'src/runtime/api/plan_iterator_wrapper.cpp'
--- src/runtime/api/plan_iterator_wrapper.cpp 2013-03-17 13:55:28 +0000
+++ src/runtime/api/plan_iterator_wrapper.cpp 2013-05-25 15:17:29 +0000
@@ -44,12 +44,6 @@
44}44}
4545
4646
47void PlanIteratorWrapper::reset()
48{
49 theIterator->reset(*theStateBlock);
50}
51
52
53#ifndef NDEBUG47#ifndef NDEBUG
54std::string PlanIteratorWrapper::toString() const48std::string PlanIteratorWrapper::toString() const
55{49{
@@ -65,25 +59,16 @@
65********************************************************************************/59********************************************************************************/
66SERIALIZE_INTERNAL_METHOD(PlanStateIteratorWrapper);60SERIALIZE_INTERNAL_METHOD(PlanStateIteratorWrapper);
6761
62
68void PlanStateIteratorWrapper::serialize(::zorba::serialization::Archiver& ar)63void PlanStateIteratorWrapper::serialize(::zorba::serialization::Archiver& ar)
69{64{
70 PlanIterator::serialize(ar);65 PlanIterator::serialize(ar);
71}66}
7267
73PlanStateIteratorWrapper::PlanStateIteratorWrapper(PlanIterator* iter, PlanState& state, uint32_t offset)
74 :
75 PlanIterator(NULL, QueryLoc()),
76 theIterator(iter),
77 theStoreIterator(NULL),
78 theStateBlock(&state),
79 theOffset(offset)
80{
81}
8268
83PlanStateIteratorWrapper::PlanStateIteratorWrapper(const store::Iterator_t& iter)69PlanStateIteratorWrapper::PlanStateIteratorWrapper(const store::Iterator_t& iter)
84 :70 :
85 PlanIterator(NULL, QueryLoc()),71 PlanIterator(NULL, QueryLoc()),
86 theIterator(NULL),
87 theStoreIterator(iter),72 theStoreIterator(iter),
88 theStateBlock(NULL)73 theStateBlock(NULL)
89{74{
@@ -96,55 +81,35 @@
96}81}
9782
9883
99void PlanStateIteratorWrapper::open()
100{
101 if (theIterator)
102 theIterator->open(*theStateBlock, theOffset);
103 else
104 theStoreIterator->open();
105}
106
107
108// both arguments will be ignored
109void PlanStateIteratorWrapper::open(PlanState& planState, uint32_t& offset) 84void PlanStateIteratorWrapper::open(PlanState& planState, uint32_t& offset)
110{85{
111 open();86 theStoreIterator->open();
112}87}
11388
11489
115bool PlanStateIteratorWrapper::produceNext(store::Item_t& result, PlanState& planState) const90bool PlanStateIteratorWrapper::produceNext(
91 store::Item_t& result,
92 PlanState& planState) const
116{93{
117 if (theIterator)94 return theStoreIterator->next(result);
118 return theIterator->produceNext(result, *theStateBlock);
119 else
120 return theStoreIterator->next(result);
121}95}
12296
12397
124bool PlanStateIteratorWrapper::next(store::Item_t& result)98bool PlanStateIteratorWrapper::next(store::Item_t& result)
125{99{
126 if (theIterator)100 return theStoreIterator->next(result);
127 return PlanIterator::consumeNext(result, theIterator, *theStateBlock);
128 else
129 return theStoreIterator->next(result);
130}101}
131102
132103
133void PlanStateIteratorWrapper::reset() const104void PlanStateIteratorWrapper::reset() const
134{105{
135 if (theIterator)106 theStoreIterator->reset();
136 theIterator->reset(*theStateBlock);
137 else
138 theStoreIterator->reset();
139}107}
140108
141109
142void PlanStateIteratorWrapper::reset(PlanState& planState) const110void PlanStateIteratorWrapper::reset(PlanState& planState) const
143{111{
144 if (theIterator)112 theStoreIterator->reset();
145 theIterator->reset(*theStateBlock);
146 else
147 theStoreIterator->reset();
148}113}
149114
150115
@@ -157,10 +122,7 @@
157std::string PlanStateIteratorWrapper::toString() const122std::string PlanStateIteratorWrapper::toString() const
158{123{
159 std::stringstream ss;124 std::stringstream ss;
160 if (theIterator)125 ss << getId() << " = PlanStateIteratorWrapper iterator: " << theStoreIterator->toString();
161 ss << getId() << " = PlanStateIteratorWrapper iterator: " << theIterator->toString();
162 else
163 ss << getId() << " = PlanStateIteratorWrapper iterator: " << theStoreIterator->toString();
164 return ss.str();126 return ss.str();
165}127}
166#endif128#endif
167129
=== modified file 'src/runtime/api/plan_iterator_wrapper.h'
--- src/runtime/api/plan_iterator_wrapper.h 2013-03-05 02:20:27 +0000
+++ src/runtime/api/plan_iterator_wrapper.h 2013-05-25 15:17:29 +0000
@@ -16,8 +16,10 @@
16#ifndef XQP_PLAN_ITERATOR_WRAPPER_H16#ifndef XQP_PLAN_ITERATOR_WRAPPER_H
17#define XQP_PLAN_ITERATOR_WRAPPER_H17#define XQP_PLAN_ITERATOR_WRAPPER_H
1818
19#include "common/shared_types.h"
20
19#include "store/api/iterator.h"21#include "store/api/iterator.h"
20#include "common/shared_types.h"22
21#include "runtime/base/plan_iterator.h"23#include "runtime/base/plan_iterator.h"
2224
23namespace zorba {25namespace zorba {
@@ -47,7 +49,7 @@
4749
48 bool next(store::Item_t&);50 bool next(store::Item_t&);
4951
50 void reset();52 void reset() {}
5153
52 void close() {}54 void close() {}
5355
@@ -56,13 +58,13 @@
56#endif58#endif
57};59};
5860
61
59/*******************************************************************************62/*******************************************************************************
6063
61********************************************************************************/64********************************************************************************/
62class PlanStateIteratorWrapper : public PlanIterator65class PlanStateIteratorWrapper : public PlanIterator
63{66{
64protected:67protected:
65 PlanIterator * theIterator; // only one of these is used
66 const store::Iterator_t theStoreIterator; 68 const store::Iterator_t theStoreIterator;
67 69
68 PlanState * theStateBlock;70 PlanState * theStateBlock;
@@ -76,17 +78,12 @@
76 void serialize(::zorba::serialization::Archiver& ar);78 void serialize(::zorba::serialization::Archiver& ar);
7779
78public:80public:
79 PlanStateIteratorWrapper(PlanIterator* iterator, PlanState& planState, uint32_t offset);
80
81 PlanStateIteratorWrapper(const store::Iterator_t& iterator);81 PlanStateIteratorWrapper(const store::Iterator_t& iterator);
8282
83 virtual ~PlanStateIteratorWrapper();83 virtual ~PlanStateIteratorWrapper();
8484
85 virtual void accept(PlanIterVisitor& v) const;85 virtual void accept(PlanIterVisitor& v) const;
8686
87 virtual void open();
88
89 // both arguments will be ignored, and the class members equivalents will be used instead
90 virtual void open(PlanState& planState, uint32_t& offset); 87 virtual void open(PlanState& planState, uint32_t& offset);
9188
92 virtual bool produceNext(store::Item_t& result, PlanState& planState) const;89 virtual bool produceNext(store::Item_t& result, PlanState& planState) const;
9390
=== modified file 'src/runtime/base/plan_iterator.cpp'
--- src/runtime/base/plan_iterator.cpp 2013-05-08 20:14:47 +0000
+++ src/runtime/base/plan_iterator.cpp 2013-05-25 15:17:29 +0000
@@ -16,14 +16,20 @@
16#include "stdafx.h"16#include "stdafx.h"
1717
18#include "compiler/api/compilercb.h"18#include "compiler/api/compilercb.h"
19
19#include "context/static_context.h"20#include "context/static_context.h"
21
20#include "runtime/base/plan_iterator.h"22#include "runtime/base/plan_iterator.h"
21#include "runtime/util/flowctl_exception.h"23#include "runtime/util/flowctl_exception.h"
24
22#include "store/api/item_factory.h"25#include "store/api/item_factory.h"
23#include "store/api/store.h"26#include "store/api/store.h"
27
24#include "system/globalenv.h"28#include "system/globalenv.h"
29
25#include "zorbatypes/integer.h"30#include "zorbatypes/integer.h"
2631
32#include "diagnostics/util_macros.h"
2733
28namespace zorba34namespace zorba
29{35{
@@ -69,11 +75,7 @@
69void PlanState::checkDepth(const QueryLoc& loc)75void PlanState::checkDepth(const QueryLoc& loc)
70{76{
71 if (theStackDepth > 256)77 if (theStackDepth > 256)
72 throw XQUERY_EXCEPTION(78 RAISE_ERROR(zerr::ZXQP0003_INTERNAL_ERROR, loc, ERROR_PARAMS(ZED(StackOverflow)));
73 zerr::ZXQP0003_INTERNAL_ERROR,
74 ERROR_PARAMS( ZED( StackOverflow ) ),
75 ERROR_LOC( loc )
76 );
77}79}
7880
7981
@@ -95,11 +97,12 @@
95{97{
96}98}
9799
98PlanIterator::PlanIterator(static_context* aContext, const QueryLoc& aLoc)100
101PlanIterator::PlanIterator(static_context* sctx, const QueryLoc& aLoc)
99 :102 :
100 theStateOffset(0),103 theStateOffset(0),
101 loc(aLoc),104 loc(aLoc),
102 theSctx(aContext)105 theSctx(sctx)
103{106{
104// Used for debugging purposes107// Used for debugging purposes
105#ifndef NDEBUG108#ifndef NDEBUG
@@ -107,6 +110,20 @@
107#endif110#endif
108}111}
109112
113
114PlanIterator::PlanIterator(const PlanIterator& it)
115 :
116 SimpleRCObject(it),
117 theStateOffset(0),
118 loc(it.loc),
119 theSctx(it.theSctx)
120#ifndef NDEBUG
121 , theId(it.theId)
122#endif
123{
124}
125
126
110SERIALIZE_INTERNAL_METHOD(PlanIterator)127SERIALIZE_INTERNAL_METHOD(PlanIterator)
111128
112129
@@ -130,6 +147,16 @@
130}147}
131148
132149
150#ifndef NDEBUG
151std::string PlanIterator::toString() const
152{
153 std::stringstream ss;
154 ss << getId() << " = " << getClassName();
155 return ss.str();
156}
157#endif
158
159
133TypeManager* PlanIterator::getTypeManager() const160TypeManager* PlanIterator::getTypeManager() const
134{161{
135 return theSctx->get_typemanager();162 return theSctx->get_typemanager();
136163
=== modified file 'src/runtime/base/plan_iterator.h'
--- src/runtime/base/plan_iterator.h 2013-03-24 20:40:03 +0000
+++ src/runtime/base/plan_iterator.h 2013-05-25 15:17:29 +0000
@@ -301,11 +301,14 @@
301// Stable IDs for debugging purposes. An individual ID is assigned to each iterator301// Stable IDs for debugging purposes. An individual ID is assigned to each iterator
302// and this can be used to identify it in the debug information.302// and this can be used to identify it in the debug information.
303#ifndef NDEBUG303#ifndef NDEBUG
304public:
305 int theId;304 int theId;
305
306public:
306 int getId() const { return theId;}307 int getId() const { return theId;}
308
307 void setId(int id) { theId = id;}309 void setId(int id) { theId = id;}
308 virtual std::string toString() const { std::stringstream ss; ss << getId() << " = " << getClassName(); return ss.str(); }310
311 virtual std::string toString() const;
309#endif312#endif
310313
311public:314public:
@@ -316,19 +319,9 @@
316 void serialize(::zorba::serialization::Archiver& ar);319 void serialize(::zorba::serialization::Archiver& ar);
317320
318public:321public:
319 PlanIterator(static_context* aContext, const QueryLoc& aLoc);322 PlanIterator(static_context* sctx, const QueryLoc& loc);
320323
321 PlanIterator(const PlanIterator& it)324 PlanIterator(const PlanIterator& it);
322 :
323 SimpleRCObject(it),
324 theStateOffset(0),
325 loc(it.loc),
326 theSctx(it.theSctx)
327#ifndef NDEBUG
328 , theId(it.theId)
329#endif
330 {
331 }
332325
333 virtual ~PlanIterator() {}326 virtual ~PlanIterator() {}
334327
335328
=== modified file 'src/runtime/core/constructors.cpp'
--- src/runtime/core/constructors.cpp 2013-05-08 01:05:04 +0000
+++ src/runtime/core/constructors.cpp 2013-05-25 15:17:29 +0000
@@ -336,7 +336,7 @@
336 if (pre == "xmlns" ||336 if (pre == "xmlns" ||
337 ns == "http://www.w3.org/2000/xmlns/" ||337 ns == "http://www.w3.org/2000/xmlns/" ||
338 (pre == "xml" && ns != "http://www.w3.org/XML/1998/namespace") ||338 (pre == "xml" && ns != "http://www.w3.org/XML/1998/namespace") ||
339 (pre != "xml" && ns == "http://www.w3.org/XML/1998/namespace"))339 (ns == "http://www.w3.org/XML/1998/namespace" && pre != "xml"))
340 {340 {
341 RAISE_ERROR(err::XQDY0096, loc, ERROR_PARAMS(nodeName->getStringValue()));341 RAISE_ERROR(err::XQDY0096, loc, ERROR_PARAMS(nodeName->getStringValue()));
342 }342 }
@@ -832,7 +832,7 @@
832/*******************************************************************************832/*******************************************************************************
833833
834********************************************************************************/834********************************************************************************/
835PiIterator::PiIterator (835PiIterator::PiIterator(
836 static_context* sctx,836 static_context* sctx,
837 const QueryLoc& loc,837 const QueryLoc& loc,
838 PlanIter_t& aTarget,838 PlanIter_t& aTarget,
@@ -1163,6 +1163,7 @@
1163 std::stack<store::Item*>& path = planState.theNodeConstuctionPath;1163 std::stack<store::Item*>& path = planState.theNodeConstuctionPath;
1164 bool haveContent = false;1164 bool haveContent = false;
1165 store::Item* parent;1165 store::Item* parent;
1166 store::Item::ItemKind resKind;
11661167
1167 EnclosedIteratorState* state;1168 EnclosedIteratorState* state;
1168 DEFAULT_STACK_INIT(EnclosedIteratorState, state, planState);1169 DEFAULT_STACK_INIT(EnclosedIteratorState, state, planState);
@@ -1173,7 +1174,9 @@
1173 {1174 {
1174 haveContent = true;1175 haveContent = true;
11751176
1176 if (result->isNode())1177 resKind = result->getKind();
1178
1179 if (resKind == store::Item::NODE)
1177 {1180 {
1178 store::Item_t typedValue;1181 store::Item_t typedValue;
1179 store::Iterator_t typedIter;1182 store::Iterator_t typedIter;
@@ -1197,25 +1200,26 @@
1197 }1200 }
1198 }1201 }
1199 }1202 }
1200#ifdef ZORBA_WITH_JSON1203 else if (resKind == store::Item::JSONIQ)
1201 else if (result->isJSONItem())
1202 {1204 {
1203 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);1205 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);
1204 }1206 }
1205#endif1207 else if (resKind == store::Item::ATOMIC)
1206 else
1207 {1208 {
1208 if (result->isFunction())
1209 {
1210 store::Item_t fnName = result->getFunctionName();
1211 RAISE_ERROR(err::FOTY0013, loc,
1212 ERROR_PARAMS(fnName.getp() ? result->getFunctionName()->getStringValue() : result->show()));
1213 }
1214
1215 assert(result->isAtomic());
1216
1217 result->getStringValue2(strval);1209 result->getStringValue2(strval);
1218 }1210 }
1211 else if (result->isFunction())
1212 {
1213 store::Item_t fnName = result->getFunctionName();
1214 RAISE_ERROR(err::FOTY0013, loc,
1215 ERROR_PARAMS(fnName.getp() ?
1216 result->getFunctionName()->getStringValue() :
1217 zstring("???")));
1218 }
1219 else
1220 {
1221 ZORBA_ASSERT(false);
1222 }
12191223
1220 while (consumeNext(result, theChild, planState))1224 while (consumeNext(result, theChild, planState))
1221 {1225 {
@@ -1245,12 +1249,10 @@
1245 }1249 }
1246 }1250 }
1247 }1251 }
1248#ifdef ZORBA_WITH_JSON
1249 else if (result->isJSONItem())1252 else if (result->isJSONItem())
1250 {1253 {
1251 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);1254 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);
1252 }1255 }
1253#endif
1254 else1256 else
1255 {1257 {
1256 assert(result->isAtomic());1258 assert(result->isAtomic());
@@ -1291,7 +1293,9 @@
1291 if (!consumeNext(result, theChild, planState))1293 if (!consumeNext(result, theChild, planState))
1292 break;1294 break;
12931295
1294 if (result->isNode())1296 resKind = result->getKind();
1297
1298 if (resKind == store::Item::NODE)
1295 {1299 {
1296 if (result->getNodeKind() == store::StoreConsts::documentNode)1300 if (result->getNodeKind() == store::StoreConsts::documentNode)
1297 {1301 {
@@ -1303,21 +1307,12 @@
1303 STACK_PUSH(true, state);1307 STACK_PUSH(true, state);
1304 }1308 }
1305 }1309 }
1306#ifdef ZORBA_WITH_JSON1310 else if (resKind == store::Item::JSONIQ)
1307 else if (result->isJSONItem())
1308 {1311 {
1309 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);1312 RAISE_ERROR_NO_PARAMS(jerr::JNTY0011, loc);
1310 }1313 }
1311#endif1314 else if (resKind == store::Item::ATOMIC)
1312 else
1313 {1315 {
1314 if (result->isFunction())
1315 {
1316 RAISE_ERROR_NO_PARAMS(err::XQTY0105, loc);
1317 }
1318
1319 assert(result->isAtomic());
1320
1321 result->getStringValue2(strval);1316 result->getStringValue2(strval);
13221317
1323 {1318 {
@@ -1360,6 +1355,14 @@
1360 STACK_PUSH(result != NULL, state);1355 STACK_PUSH(result != NULL, state);
1361 }1356 }
1362 }1357 }
1358 else if (resKind == store::Item::FUNCTION)
1359 {
1360 RAISE_ERROR_NO_PARAMS(err::XQTY0105, loc);
1361 }
1362 else
1363 {
1364 ZORBA_ASSERT(false);
1365 }
1363 }1366 }
1364 }1367 }
1365 }1368 }
13661369
=== modified file 'src/runtime/core/fncall_iterator.h'
--- src/runtime/core/fncall_iterator.h 2013-04-24 01:35:58 +0000
+++ src/runtime/core/fncall_iterator.h 2013-05-25 15:17:29 +0000
@@ -24,8 +24,6 @@
2424
25#include "runtime/hof/function_item.h"25#include "runtime/hof/function_item.h"
2626
27// TODO remove the next three includes
28#include "api/unmarshaller.h"
29#include "context/static_context.h"27#include "context/static_context.h"
3028
31#include "runtime/base/narybase.h"29#include "runtime/base/narybase.h"
3230
=== modified file 'src/store/api/item.h'
--- src/store/api/item.h 2013-05-21 21:44:25 +0000
+++ src/store/api/item.h 2013-05-25 15:17:29 +0000
@@ -67,9 +67,7 @@
67 PUL = 0x3, 67 PUL = 0x3,
68 FUNCTION = 0x5,68 FUNCTION = 0x5,
69 LIST = 0x7,69 LIST = 0x7,
70#ifdef ZORBA_WITH_JSON
71 JSONIQ = 0x9,70 JSONIQ = 0x9,
72#endif
73 ERROR_ = 0xB71 ERROR_ = 0xB
74 };72 };
7573
@@ -86,15 +84,6 @@
86 mutable long theRefCount;84 mutable long theRefCount;
87 mutable ItemUnion theUnion;85 mutable ItemUnion theUnion;
8886
89#ifndef NDEBUG
90 // This class member is set by some atomic type items to the
91 // item's value in order to aid debugging. The debug_str might
92 // not always be updated to the current value.
93protected:
94 const char* debug_str_; // similar to zorba_string.h
95 zstring debug_holder;
96#endif
97
98protected:87protected:
9988
100 Item() : theRefCount(0)89 Item() : theRefCount(0)
@@ -147,7 +136,6 @@
147 theUnion.treeRCPtr != 0);136 theUnion.treeRCPtr != 0);
148 }137 }
149138
150#ifdef ZORBA_WITH_JSON
151 /**139 /**
152 * @return "true" if the item is a JSON item140 * @return "true" if the item is a JSON item
153 */141 */
@@ -155,7 +143,6 @@
155 {143 {
156 return ((theUnion.itemKind & 0xF) == JSONIQ); 144 return ((theUnion.itemKind & 0xF) == JSONIQ);
157 }145 }
158#endif
159146
160 /**147 /**
161 * @return "true" if the item is an atomic value148 * @return "true" if the item is an atomic value
@@ -212,7 +199,6 @@
212 */199 */
213 zstring printKind() const;200 zstring printKind() const;
214201
215#ifdef ZORBA_WITH_JSON
216 /**202 /**
217 * @return "true" if the item is a JSON object item203 * @return "true" if the item is a JSON object item
218 */204 */
@@ -224,7 +210,6 @@
224 */210 */
225 virtual bool 211 virtual bool
226 isJSONArray() const;212 isJSONArray() const;
227#endif
228213
229 /**214 /**
230 * @return the qname identifying the XQuery type of the item215 * @return the qname identifying the XQuery type of the item
@@ -905,7 +890,6 @@
905 leastCommonAncestor(const store::Item_t&) const;890 leastCommonAncestor(const store::Item_t&) const;
906891
907892
908#ifdef ZORBA_WITH_JSON
909 /* -------------------- Methods for JSON items --------------------- */893 /* -------------------- Methods for JSON items --------------------- */
910894
911 /**895 /**
@@ -962,7 +946,6 @@
962 virtual xs_integer946 virtual xs_integer
963 getNumObjectPairs() const;947 getNumObjectPairs() const;
964948
965#endif // ZORBA_WITH_JSON
966949
967950
968 /* -------------------- Methods for ErrorItem --------------------- */951 /* -------------------- Methods for ErrorItem --------------------- */
969952
=== modified file 'src/store/naive/atomic_items.cpp'
--- src/store/naive/atomic_items.cpp 2013-05-16 22:16:00 +0000
+++ src/store/naive/atomic_items.cpp 2013-05-25 15:17:29 +0000
@@ -695,13 +695,6 @@
695 initializeAsUnnormalizedQName(lNormalized, aPrefix);695 initializeAsUnnormalizedQName(lNormalized, aPrefix);
696696
697 theIsInPool = false;697 theIsInPool = false;
698
699#ifndef NDEBUG
700 debug_holder = theLocal.c_str();
701 if (!thePrefix.empty())
702 debug_holder = thePrefix + ":" + debug_holder;
703 debug_str_ = debug_holder.c_str();
704#endif
705}698}
706699
707700
708701
=== modified file 'src/store/naive/atomic_items.h'
--- src/store/naive/atomic_items.h 2013-05-16 22:16:00 +0000
+++ src/store/naive/atomic_items.h 2013-05-25 15:17:29 +0000
@@ -492,13 +492,6 @@
492492
493 assert(isNormalized());493 assert(isNormalized());
494 assert(isValid());494 assert(isValid());
495
496#ifndef NDEBUG
497 debug_holder = theLocal.c_str();
498 if (!thePrefix.empty())
499 debug_holder = thePrefix + ":" + debug_holder;
500 debug_str_ = debug_holder.c_str();
501#endif
502 }495 }
503 496
504 void initializeAsUnnormalizedQName(497 void initializeAsUnnormalizedQName(
@@ -515,13 +508,6 @@
515508
516 assert(!isNormalized());509 assert(!isNormalized());
517 assert(isValid());510 assert(isValid());
518
519#ifndef NDEBUG
520 debug_holder = theLocal.c_str();
521 if (!thePrefix.empty())
522 debug_holder = thePrefix + ":" + debug_holder;
523 debug_str_ = debug_holder.c_str();
524#endif
525 }511 }
526512
527 void initializeAsQNameNotInPool(513 void initializeAsQNameNotInPool(
528514
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-05-23 20:33:33 +0000
+++ test/fots/CMakeLists.txt 2013-05-25 15:17:29 +0000
@@ -108,7 +108,6 @@
108EXPECTED_FOTS_FAILURE (SLOW fn-subsequence cbcl-subsequence-014 1069794)108EXPECTED_FOTS_FAILURE (SLOW fn-subsequence cbcl-subsequence-014 1069794)
109EXPECTED_FOTS_FAILURE (SLOW fn-matches.re re00987 1131313)109EXPECTED_FOTS_FAILURE (SLOW fn-matches.re re00987 1131313)
110EXPECTED_FOTS_FAILURE (SLOW app-Demos itunes 0)110EXPECTED_FOTS_FAILURE (SLOW app-Demos itunes 0)
111EXPECTED_FOTS_FAILURE (SLOW app-Demos raytracer 0)
112111
113#"crashing/hanging" tests. These are not run but marked as 'tooBig' by FOTS driver.112#"crashing/hanging" tests. These are not run but marked as 'tooBig' by FOTS driver.
114EXPECTED_FOTS_FAILURE (CRASH fn-matches.re re00975 1070533)113EXPECTED_FOTS_FAILURE (CRASH fn-matches.re re00975 1070533)

Subscribers

People subscribed via source and target branches