[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: fixed bug #1237383 Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 fixed bug #1237383 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-10-10 03:54:10 + +++ src/compiler/translator/translator.cpp 2013-10-13 00:41:30 + @@ -10908,17 +10908,15 @@ // for each predicate in the list, before calling accept() on the predicate // expression itself. - // get the predicate input seq - expr* inputSeqExpr = pop_nodestack(); - if (dynamic_castconst JSONArrayConstructor*(pred) != NULL) { -// for $$dot in predInputSeq -flwor_expr* flworExpr = wrap_expr_in_flwor(inputSeqExpr, false); -push_nodestack(flworExpr); +return; } else { +// get the predicate input seq +expr* inputSeqExpr = pop_nodestack(); + // let $$temp := predInputSeq // let $$last-idx := count($$temp) // for $$dot at $$pos in $$temp @@ -10942,18 +10940,9 @@ const QueryLoc loc = predExpr-get_loc(); xqtref_t predType = predExpr-get_return_type(); - expr* f = pop_nodestack(); - ZORBA_ASSERT(f-get_expr_kind() == flwor_expr_kind); - flwor_expr* flworExpr = static_castflwor_expr*(f); - if (dynamic_castconst JSONArrayConstructor*(pred) != NULL) { -assert(flworExpr-num_clauses() == 1); -assert(flworExpr-get_clause(0)-get_kind() == flwor_clause::for_clause); - -for_clause* sourceClause = static_castfor_clause*(flworExpr-get_clause(0)); - -expr* arrayExpr = sourceClause-get_expr(); +expr* arrayExpr = pop_nodestack(); expr* selectorExpr = static_castjson_array_expr*(predExpr)-get_expr(); expr* accessorExpr; @@ -10974,13 +10963,15 @@ generate_fn_body(BUILTIN_FUNC(OP_ZORBA_SINGLE_ARRAY_LOOKUP_2), args, loc); } -pop_scope(); - push_nodestack(accessorExpr); return; } + expr* f = pop_nodestack(); + ZORBA_ASSERT(f-get_expr_kind() == flwor_expr_kind); + flwor_expr* flworExpr = static_castflwor_expr*(f); + ZORBA_ASSERT(flworExpr-num_clauses() == 3); if (TypeOps::is_subtype(tm, *predType, *rtm.INTEGER_TYPE_QUESTION, loc)) === modified file 'test/driver/testdriver.cpp' --- test/driver/testdriver.cpp 2013-09-26 07:38:44 + +++ test/driver/testdriver.cpp 2013-10-13 00:41:30 + @@ -26,7 +26,7 @@ #include time.h #endif -//#define ZORBA_TEST_PLAN_SERIALIZATION +#define ZORBA_TEST_PLAN_SERIALIZATION #include testdriverconfig.h // SRC and BIN dir definitions #include specification.h // parsing spec files === added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/nav_06.xml.res' === added file 'test/rbkt/Queries/zorba/jsoniq/nav_06.jq' --- test/rbkt/Queries/zorba/jsoniq/nav_06.jq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/jsoniq/nav_06.jq 2013-10-13 00:41:30 + @@ -0,0 +1,7 @@ + +jsoniq version 1.0; + +()[[$$]] + + + === modified file 'test/rbkt/Queries/zorba/sctx/sctx-functions-02.jq' --- test/rbkt/Queries/zorba/sctx/sctx-functions-02.jq 2013-10-01 22:00:14 + +++ test/rbkt/Queries/zorba/sctx/sctx-functions-02.jq 2013-10-13 00:41:30 + @@ -3,11 +3,15 @@ import module namespace file = http://expath.org/ns/file;; import module namespace sctx = http://zorba.io/modules/sctx;; +1+1 +(: for $f in sctx:functions() where exists( $f.annotations ) order by namespace-uri-from-QName($f.name), local-name-from-QName($f.name), $f.arity return $f +:) + (: vim:set syntax=xquery et sw=2 ts=2: :) -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/190817 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: Added/fixed some comments for SequenceType. Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Added/fixed some comments for SequenceType. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/typeident.h' --- include/zorba/typeident.h 2013-09-26 20:20:24 + +++ include/zorba/typeident.h 2013-09-27 09:23:49 + @@ -85,13 +85,18 @@ static SequenceType createItemType(Quantifier q = QUANT_ONE); /** - * \brief Create an AtomicOrUnion type with quantifier + * \brief Create a generalized atomic type (see + * http://www.w3.org/TR/xquery-30/#dt-generalized-atomic-type ) with quantifier * - * An AtomicOrUnion type is specified simply as a QName, which may identify - * an XMLSchema builtin atomic type or a user-defined atomic or union type. + * A generalized atomic type is specified simply as a QName, which may identify + * an XMLSchema builtin atomic type or a user-defined atomic or pure union type. * In the case of user-defined types, the QName must be among the in-scope * type names of a given static context. Otherwise, for builtin types, the * given sctx may be NULL. + * + * If the given QName (uri and local name pair) does not specify a generalized + * atomic type among the in-scope type names of a given static context, an + * invalid SequenceType is returned. */ static SequenceType createAtomicOrUnionType( const StaticContext_t sctx, @@ -128,12 +133,18 @@ bool nillable, Quantifier quant = QUANT_ONE); + /** + * + */ static SequenceType createSchemaElementType( const StaticContext_t sctx, const String uri, const String localName, Quantifier quant = QUANT_ONE); + /** + * + */ static SequenceType createAttributeType( const StaticContext_t sctx, const String nodeUri, @@ -142,29 +153,59 @@ const String contentTypeLocalName, Quantifier quant = QUANT_ONE); + /** + * + */ static SequenceType createSchemaAttributeType( const StaticContext_t sctx, const String uri, const String localName, Quantifier quant = QUANT_ONE); + /** + * + */ static SequenceType createPIType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createTextType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createCommentType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createNamespaceType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createJSONItemType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createJSONObjectType(Quantifier q = QUANT_ONE); + /** + * + */ static SequenceType createJSONArrayType(Quantifier q = QUANT_ONE); public: + /** + * Constructor for an invalid (NULL) type. + */ SequenceType(); + /** + * Copy constructor + */ SequenceType(const SequenceType other); /** @@ -173,7 +214,7 @@ ~SequenceType(); /** - * + * Returns true if this a valid (non-NULL) type; otherwise, returns false. */ bool isValid() const; @@ -188,29 +229,32 @@ Quantifier getQuantifier() const; /** - * If this is an atomic or union type, this method returns the URI of + * If this is a generalized atomic type, this method returns the URI of * the type name. For other kinds of types, an empty string is returned. */ String getTypeUri() const; /** - * If this is an atomic or union type, this method returns the local part of + * If this is a generalized atomic type, this method returns the local part of * the type name. For other kinds of types, an empty string is returned. */ String getTypeLocalName() const; /** * If this is an element() or attribute() type that contains a NodeName, - * this method returns the URI of that NodeName. In all other cases, an - * empty string is returned. + * this method returns the URI of that NodeName. If this is a schema-element(N) + * or schema-attribute(N) type, the method returns the URI of N. In all other + * cases, an empty string is returned. */ String getNodeUri() const; /** * If this is an element() or attribute() type that contains a NodeName, - * this method returns the URI of that NodeName. If this is a - * processing-instruction() that contains a TargetName, that TargetName is - * returned. In all other cases, an empty string is returned. + * this method returns the local part of that NodeName. If this is a + * schema-element(N) or schema-attribute(N) type, the method returns the + * local part of N. If this is a
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/188000 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: added comments and getContentType() method to SequenceType class Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 added comments and getContentType() method to SequenceType class -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/typeident.h' --- include/zorba/typeident.h 2013-09-16 09:08:27 + +++ include/zorba/typeident.h 2013-09-26 20:59:19 + @@ -35,10 +35,6 @@ * SequenceType may be returned by methods of Zorba's C++ API. The class also * provides static methods to create instances of SequenceType, which can then * be passed as arguments to other methods of Zorba's C++ API. - * - * Note: This class is reference counted. When writing multi-threaded clients, - * it is the responibility of the client code to synchronize assignments to the - * SmartPtr holding this object. */ class ZORBA_DLL_PUBLIC SequenceType { @@ -51,18 +47,18 @@ FUNCTION_TYPE,// function(*) and subtypes STRUCTURED_ITEM_TYPE, // structured-item() NODE_TYPE,// node() -DOCUMENT_TYPE, -ELEMENT_TYPE, -SCHEMA_ELEMENT_TYPE, -ATTRIBUTE_TYPE, -SCHEMA_ATTRIBUTE_TYPE, -PI_TYPE, -TEXT_TYPE, -COMMENT_TYPE, -NAMESPACE_TYPE, -JSON_ITEM_TYPE, -JSON_OBJECT_TYPE, -JSON_ARRAY_TYPE, +DOCUMENT_TYPE,// document-node() and subtypes +ELEMENT_TYPE, // element() and subtypes +SCHEMA_ELEMENT_TYPE, // schema-element() and subtypes +ATTRIBUTE_TYPE, // attribute() and subtypes +SCHEMA_ATTRIBUTE_TYPE,// schema-attribute() and subtypes +PI_TYPE, // processing-instruction() and subtypes +TEXT_TYPE,// text() +COMMENT_TYPE, // comment() +NAMESPACE_TYPE, // namespace-node() +JSON_ITEM_TYPE, // json-item() +JSON_OBJECT_TYPE, // object() +JSON_ARRAY_TYPE, // array() INVALID_TYPE } Kind; @@ -176,28 +172,88 @@ */ ~SequenceType(); + /** + * + */ bool isValid() const; + /** + * + */ Kind getKind() const; + /** + * + */ Quantifier getQuantifier() const; + /** + * If this is an atomic or union type, this method returns the URI of + * the type name. For other kinds of types, an empty string is returned. + */ String getTypeUri() const; + /** + * If this is an atomic or union type, this method returns the local part of + * the type name. For other kinds of types, an empty string is returned. + */ String getTypeLocalName() const; + /** + * If this is an element() or attribute() type that contains a NodeName, + * this method returns the URI of that NodeName. In all other cases, an + * empty string is returned. + */ String getNodeUri() const; + /** + * If this is an element() or attribute() type that contains a NodeName, + * this method returns the URI of that NodeName. If this is a + * processing-instruction() that contains a TargetName, that TargetName is + * returned. In all other cases, an empty string is returned. + */ String getNodeLocalName() const; + /** + * If this is an element() or attribute() type that does not contain a + * NodeName, this method returns true. In all other cases, false is returned. + */ bool isWildcard() const; + /** + * If this is an document-node() type that contains an embedded element() + * type, this method returns the embedded element() type. In all other cases, + * an invalid SequenceType is returned. + */ + SequenceType getContentType() const; + + /** + * If this is an element() or attribute() type that contains a TypeName, this + * method returns the URI of that TypeName. If this is a schema-element(N) or + * schema-attribute(N) type, the method returns the URI of the XMLSchema type + * associated with the global element or attribute declaration N. In all other + * cases, it returns an empty string. + */ String getContentTypeUri() const; + /** + * If this is an element() or attribute() type that contains a TypeName, this + * method returns the local name of that TypeName. If this is a schema-element(N) + * or schema-attribute(N) type, the method returns the local name of the + * XMLSchema type associated with the global element or attribute declaration N. + * In all other cases, it returns an empty string. + */ String getContentTypeLocalName() const; + /** + * Return true if this type is a schema-element() or schema-attribute() type, + * Otherwise return false. + */ bool isSchemaTest() const; + /** + * + */ std::ostream emit(std::ostream) const;
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/187917 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: cleanup + new test Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 cleanup + new test -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/compiler/expression/expr.cpp' --- src/compiler/expression/expr.cpp 2013-05-15 23:22:01 + +++ src/compiler/expression/expr.cpp 2013-09-12 08:26:43 + @@ -806,6 +806,9 @@ theInput(input) { compute_scripting_kind(); + + if (theInput-get_expr_kind() == var_expr_kind) +static_castvar_expr*(theInput)-add_ref(); } === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-09-12 07:54:03 + +++ src/compiler/translator/translator.cpp 2013-09-12 08:26:43 + @@ -1669,13 +1669,10 @@ argVars.push_back(argVar); expr* arg = CREATE(wrapper)(theRootSctx, theUDF, loc, argVar); -argVar-add_ref(); arg = normalize_fo_arg(i, arg, inlineUDF.get(), loc); arguments.push_back(arg); } - fiSubstVar-add_ref(); - expr* body = CREATE(dynamic_function_invocation)(theRootSctx, theUDF, @@ -1938,8 +1935,6 @@ // compute the size of the input seq expr* varWrapper = CREATE(wrapper)(theRootSctx, theUDF, loc, lcInputVar); -lcInputVar-add_ref(); - fo_expr* countExpr = CREATE(fo)(theRootSctx, theUDF, loc, @@ -6617,18 +6612,12 @@ expr* valueExpr = pop_nodestack(); if (varType != NULL) -valueExpr = theExprManager-create_treat_expr(theRootSctx, - theUDF, - loc, - valueExpr, - varType, - TREAT_TYPE_MATCH); +valueExpr = CREATE(treat)(theRootSctx, theUDF, loc, + valueExpr, + varType, + TREAT_TYPE_MATCH); - push_nodestack(theExprManager-create_var_set_expr(theRootSctx, - theUDF, - loc, - ve, - valueExpr)); + push_nodestack(CREATE(var_set)(theRootSctx, theUDF, loc, ve, valueExpr)); theAssignedVars.back().push_back(ve); } @@ -7636,8 +7625,6 @@ inputExpr = CREATE(wrapper)(theRootSctx, theUDF, specLoc, inputExpr); - var-getVar()-add_ref(); - inputExpr = wrap_in_atomization(inputExpr); inputExpr = wrap_in_type_match(inputExpr, @@ -7687,10 +7674,7 @@ bind_var(ngVar, theSctx); -expr* inputExpr = -theExprManager-create_wrapper_expr(theRootSctx, theUDF, loc, inputVar); - -inputVar-add_ref(); +expr* inputExpr = CREATE(wrapper)(theRootSctx, theUDF, loc, inputVar); nongrouping_rebind.push_back(std::pairexpr*, var_expr*(inputExpr, ngVar)); } @@ -10357,8 +10341,6 @@ relpath_expr* predPathExpr = CREATE(relpath)(theRootSctx, theUDF, loc); predPathExpr-add_back(CREATE(wrapper)(theRootSctx, theUDF, loc, fcOuterDot-get_var())); - fcOuterDot-get_var()-add_ref(); - predPathExpr-add_back(axisExpr); expr* predInputExpr = predPathExpr; @@ -11331,8 +11313,6 @@ throw; } - ve-add_ref(); - if (ve-get_kind() == var_expr::prolog_var) { TypeManager* tm = CTX_TM; @@ -11405,8 +11385,6 @@ } } - dotVar-add_ref(); - return CREATE(wrapper)(theRootSctx, theUDF, loc, dotVar); } @@ -11426,8 +11404,6 @@ } } - posVar-add_ref(); - return CREATE(wrapper)(theRootSctx, theUDF, loc, posVar); } @@ -11447,8 +11423,6 @@ } } - sizeVar-add_ref(); - return CREATE(wrapper)(theRootSctx, theUDF, loc, sizeVar); } @@ -12353,8 +12327,6 @@ std::vectorexpr* fncall_args; fncall_args.push_back(CREATE(wrapper)(theRootSctx, theUDF, loc, seq_fc-get_var())); -seq_fc-get_var()-add_ref(); - expr* dynamic_fncall = CREATE(dynamic_function_invocation)(theRootSctx, theUDF, loc, arguments[1], @@ -12384,8 +12356,6 @@ std::vectorexpr* fncall_args; fncall_args.push_back(CREATE(wrapper)(theRootSctx, theUDF, loc, seq_fc-get_var())); -seq_fc-get_var()-add_ref(); - expr* dynamic_fncall = CREATE(dynamic_function_invocation)(theRootSctx, theUDF, loc, arguments[1], @@ -12568,8 +12538,6 @@ sourceExpr = CREATE(wrapper)(theRootSctx, theUDF, loc, fc-get_var()); -
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185216 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: fixed bug #1223313 Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 fixed bug #1223313 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-09-12 08:25:47 + +++ src/compiler/translator/translator.cpp 2013-09-12 09:55:43 + @@ -10870,8 +10870,6 @@ { accessorExpr = generate_fn_body(BUILTIN_FUNC(OP_ZORBA_MULTI_ARRAY_LOOKUP_2), args, loc); - - pop_scope(); } else { @@ -10879,6 +10877,8 @@ generate_fn_body(BUILTIN_FUNC(OP_ZORBA_SINGLE_ARRAY_LOOKUP_2), args, loc); } +pop_scope(); + push_nodestack(accessorExpr); return; === added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/member_05.xml.res' === added file 'test/rbkt/Queries/zorba/jsoniq/member_05.xq' --- test/rbkt/Queries/zorba/jsoniq/member_05.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/jsoniq/member_05.xq 2013-09-12 09:55:43 + @@ -0,0 +1,1 @@ +()[[1]][[1]] -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185228 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: More aggressive eliminationof unused LET variables Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 More aggressive eliminationof unused LET variables -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2013-08-21 10:25:42 + +++ ChangeLog 2013-09-11 10:39:49 + @@ -36,6 +36,7 @@ * Optimized implementation of function caching and removed the restriction on the return type. * No node ordering/distinct required for self axis. + * More aggressive eliminationof unused LET variables Bug Fixes/Other Changes: * Fixed bug #1117952 (Improve XML error output format) === modified file 'src/compiler/expression/expr_base.h' --- src/compiler/expression/expr_base.h 2013-05-29 04:17:01 + +++ src/compiler/expression/expr_base.h 2013-09-11 10:39:49 + @@ -234,6 +234,8 @@ unsigned short get_scripting_detail() const { return theScriptingKind; } + void set_scripting_detail(unsigned short k) { theScriptingKind = k; } + bool is_updating() const; bool is_sequential() const; @@ -246,8 +248,6 @@ void set_not_exiting(); - void adjustSequential(); - void checkScriptingKind() const; void compute_return_type(bool deep, bool* modified); === modified file 'src/compiler/rewriter/rules/flwor_rules.cpp' --- src/compiler/rewriter/rules/flwor_rules.cpp 2013-08-09 10:23:10 + +++ src/compiler/rewriter/rules/flwor_rules.cpp 2013-09-11 10:39:49 + @@ -566,7 +566,8 @@ if (safe numRefs == 0) { -if (varDomExpr-isNonDiscardable() || !isSafeVar) +if (varDomExpr-get_function_kind() == FunctionConsts::OP_CREATE_INTERNAL_INDEX_2 || +!isSafeVar) { return false; } === modified file 'src/compiler/xqddf/value_index.cpp' --- src/compiler/xqddf/value_index.cpp 2013-05-31 01:47:24 + +++ src/compiler/xqddf/value_index.cpp 2013-09-11 10:39:49 + @@ -569,7 +569,7 @@ expr* keyClone = theKeyExprs[i]-clone(udf, subst); -keyClone-setNonDiscardable(ANNOTATION_TRUE_FIXED); +keyClone-set_scripting_detail(SEQUENTIAL_FUNC_EXPR); const QueryLoc keyloc = keyClone-get_loc(); === modified file 'src/functions/func_index_ddl.h' --- src/functions/func_index_ddl.h 2013-02-07 17:24:36 + +++ src/functions/func_index_ddl.h 2013-09-11 10:39:49 + @@ -45,10 +45,15 @@ { } - unsigned short getScriptingKind() const { return SIMPLE_EXPR; } - bool accessesDynCtx() const { return true; } + unsigned short getScriptingKind() const + { +// Although the index creation will be applied immediately, we should +// NOT mark this function as sequential. +return SIMPLE_EXPR; + } + bool mustCopyInputNodes(expr* fo, csize input) const { return false; } BoolAnnotationValue ignoresSortedNodes(expr* fo, csize input) const === modified file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter' --- test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter 2013-02-07 17:24:36 + +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter 2013-09-11 10:39:49 + @@ -19,40 +19,6 @@ SingletonIterator value=xs:QName(,,tests)/ /ElementIterator /CtxVarDeclareIterator - flwor::FLWORIterator -LetVariable name=test_old materialize=true - flwor::FLWORIterator -ForVariable name=$$context-item - CtxVarIterator varid=4 varname=tests varkind=global/ -/ForVariable -WhereClause - FnBooleanIterator -TypedValueCompareIterator_STRING - PromoteIterator type=xs:anyAtomicType -FnDataIterator - ChildAxisIterator test kind=match_text_test qname=* typename=* nill allowed=0 -ForVarIterator varname=$$context-item/ - /ChildAxisIterator -/FnDataIterator - /PromoteIterator - PromoteIterator type=xs:anyAtomicType -FnDataIterator - ChildAxisIterator test kind=match_text_test qname=* typename=* nill allowed=0 -CtxVarIterator varid=4 varname=tests varkind=global/ - /ChildAxisIterator -/FnDataIterator - /PromoteIterator -/TypedValueCompareIterator_STRING - /FnBooleanIterator -/WhereClause -ReturnClause - ForVarIterator varname=$$context-item/ -/ReturnClause - /flwor::FLWORIterator -/LetVariable -ReturnClause - SingletonIterator value=xs:integer(1)/ -/ReturnClause - /flwor::FLWORIterator + SingletonIterator value=xs:integer(1)/ /SequentialIterator === modified file
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Stage TestZorbaUbuntu failed. 5 tests failed (8425 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/280/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Stage TestZorbaUbuntu failed. 4 tests failed (8425 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/281/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/185014 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: removed depracated fetchmethod from xmldatamanager Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 removed depracated fetchmethod from xmldatamanager -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/xmldatamanager.h' --- include/zorba/xmldatamanager.h 2013-08-06 08:41:26 + +++ include/zorba/xmldatamanager.h 2013-09-09 08:51:29 + @@ -186,13 +186,6 @@ const String aBaseURI, ParseOptions aOptions) const = 0; - /** \brief Fetches an resource refered to by the given URI. - * - * @deprecated this function has been replaced by StaticContext::fetch. - */ - virtual Item - fetch(const String aURI) const = 0; - /** \brief Register a DiagnosticHandler to which errors occuring during the * management of documents and collections are reported. * === modified file 'src/api/xmldatamanagerimpl.cpp' --- src/api/xmldatamanagerimpl.cpp 2013-08-06 08:41:26 + +++ src/api/xmldatamanagerimpl.cpp 2013-09-09 08:51:29 + @@ -110,7 +110,6 @@ Zorba_CompilerHints_t lHints; std::ostringstream lProlog; lProlog - import module namespace d = ' static_context::ZORBA_FETCH_FN_NS '; import module namespace x = ' static_context::ZORBA_XML_FN_NS '; import schema namespace opt = ' static_context::ZORBA_XML_FN_OPTIONS_NS ';; @@ -355,33 +354,6 @@ /*** / -Item XmlDataManagerImpl::fetch(const String aURI) const -{ - ZORBA_DM_TRY - { -Item lQName = theFactory-createQName(static_context::ZORBA_FETCH_FN_NS, - content); - -// create a streamable string item -std::vectorItemSequence_t lArgs; -lArgs.push_back( -new SingletonItemSequence(theFactory-createString(aURI))); - -ItemSequence_t lSeq = theContext-invoke(lQName, lArgs); -Iterator_t lIter = lSeq-getIterator(); -lIter-open(); -Item lRes; -lIter-next(lRes); -return lRes; - } - ZORBA_DM_CATCH - return 0; -} - - -/*** - -/ void XmlDataManagerImpl::registerDiagnosticHandler(DiagnosticHandler* aDiagnosticHandler) { theContext = new StaticContextImpl(aDiagnosticHandler); === modified file 'src/api/xmldatamanagerimpl.h' --- src/api/xmldatamanagerimpl.h 2013-08-06 08:41:26 + +++ src/api/xmldatamanagerimpl.h 2013-09-09 08:51:29 + @@ -85,8 +85,6 @@ const String aBaseURI, ParseOptions aOptions) const; - Item fetch(const String aURI) const; - void registerDiagnosticHandler(DiagnosticHandler* aDiagnosticHandler); #ifndef ZORBA_NO_FULL_TEXT === modified file 'src/context/static_context.cpp' --- src/context/static_context.cpp 2013-09-02 20:43:22 + +++ src/context/static_context.cpp 2013-09-09 08:51:29 + @@ -263,7 +263,7 @@ ar lURI; ar.set_is_temp_field(false); ar dyn_loaded_module; -ar sctx; +ar theSctx; } else { @@ -275,12 +275,12 @@ ar lURI; ar.set_is_temp_field(false); ar dyn_loaded_module; -ar sctx; +ar theSctx; if (dyn_loaded_module) { - ZORBA_ASSERT(sctx); - module = GENV_DYNAMIC_LOADER-getExternalModule(lURI, *sctx); + ZORBA_ASSERT(theSctx); + module = GENV_DYNAMIC_LOADER-getExternalModule(lURI, *theSctx); // no way to get the module if (!module) @@ -2951,7 +2951,7 @@ ctx_module_t modinfo; modinfo.module = aModule; modinfo.dyn_loaded_module = aDynamicallyLoaded; - modinfo.sctx = this; + modinfo.theSctx = this; if (!theExternalModulesMap-insert(uri, modinfo)) { === modified file 'src/context/static_context.h' --- src/context/static_context.h 2013-08-24 23:38:45 + +++ src/context/static_context.h 2013-09-09 08:51:29 + @@ -473,7 +473,7 @@ { ExternalModule * module; bool dyn_loaded_module; -static_context * sctx; +static_context * theSctx; public: SERIALIZABLE_CLASS(ctx_module_t) === modified file 'src/zorbaserialization/archiver_consts.h' --- src/zorbaserialization/archiver_consts.h 2013-08-16 13:00:06 + +++ src/zorbaserialization/archiver_consts.h 2013-09-09 08:51:29 + @@ -36,7 +36,7 @@ serialized when a pointer to it was encountered. In this case, during deserialization, the archiver will allocate the obj on the heap and fill-in its data members. If the kind is NORMAL, then the obj was serialized when the - objitself was encountered (e.g., the
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/184518 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: implicit iteration for jsoniq rename exprs Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 implicit iteration for jsoniq rename exprs -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2013-08-14 16:34:05 + +++ ChangeLog 2013-08-21 10:29:13 + @@ -12,6 +12,16 @@ * The grouping variable in a group by clause is now optional * New syntax for array lookup: expr1[[expr2]] * New jsoniq functions: jn:trim() and libjn:descendant-arrays() + * jsoniq extension: Object/array navigation allows item()* as the type of the +input sequence (doing implicit iteration over the input sequence and skipping +items that are not objects/arrays). + * jsoniq extension: Several of the jsoniq functions now allow item()* as the +type of the input sequence (doing implicit iteration over the input sequence +and skipping or simply propagating items that are not objects/arrays). + * jsoniq extension: implicit iteration is also done for jsoniq delete, renames, +and value replacements. + * jsoniq extension: EBV on jsoniq items now returns true (instead of raising +an error). Optimizations: * Implemented hoisting optimization for general FLWOR. @@ -66,16 +76,9 @@ * jn:keys function takes item()* as aparameter (instead of item()) * Fixed bug #1189996 (Relocate some public API headers to util) * Fixed bug #1189790 (Update core module full-text) - * Object/array navigation allows item()* as the type of the input sequence -(doing implicit iteration over the input sequence and skipping items - that are not objects/arrays). - * Several of the jsoniq functions now allow item()* as the type of the input -sequence (doing implicit iteration over the input sequence and skipping or -simply propagating items that are not objects/arrays). * Bug fix: selector value in object/array navigation is always cast to string/integer * The function jn:is-null() has been removed. - * EBV on jsoniq items now returns true (instead of raising an error). * Removed from libjn module the functions that existed in the jn module as well. * Renamed xqxq module to zorba-query module(zq module). === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-08-19 13:00:41 + +++ src/compiler/translator/translator.cpp 2013-08-21 10:29:13 + @@ -15291,19 +15291,19 @@ std::vectorexpr* args(3); - args[0] = wrap_in_type_match(targetExpr, - theRTM.JSON_OBJECT_TYPE_ONE, - loc, - TREAT_JSONIQ_OBJECT_UPDATE_TARGET, // JNUP0008 - NULL); - - args[1] = wrap_in_type_promotion(nameExpr, - theRTM.STRING_TYPE_ONE, - PROMOTE_TYPE_PROMOTION); - - args[2] = wrap_in_type_promotion(newNameExpr, - theRTM.STRING_TYPE_ONE, - PROMOTE_JSONIQ_OBJECT_SELECTOR); // JNUP0007 + args[0] = targetExpr; + + args[1] = create_cast_expr(nameExpr-get_loc(), + nameExpr, + theRTM.STRING_TYPE_ONE, + true, + true); + + args[2] = create_cast_expr(newNameExpr-get_loc(), + newNameExpr, + theRTM.STRING_TYPE_ONE, + false, + true); fo_expr* updExpr = CREATE(fo)(theRootSctx, theUDF, === modified file 'src/functions/pregenerated/func_jsoniq_functions.cpp' --- src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-19 13:00:41 + +++ src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-21 10:29:13 + @@ -504,8 +504,8 @@ { DECL_WITH_KIND(sctx, op_zorba_json_rename, (createQName(http://zorba.io/internal/zorba-ops,,json-rename;), -GENV_TYPESYSTEM.JSON_OBJECT_TYPE_ONE, -GENV_TYPESYSTEM.STRING_TYPE_ONE, +GENV_TYPESYSTEM.ITEM_TYPE_STAR, +GENV_TYPESYSTEM.STRING_TYPE_QUESTION, GENV_TYPESYSTEM.STRING_TYPE_ONE, GENV_TYPESYSTEM.EMPTY_TYPE), FunctionConsts::OP_ZORBA_JSON_RENAME_3); === modified file 'src/runtime/json/jsoniq_functions_impl.cpp' --- src/runtime/json/jsoniq_functions_impl.cpp 2013-08-19 13:00:41 + +++ src/runtime/json/jsoniq_functions_impl.cpp 2013-08-21 10:29:13 + @@ -1871,8 +1871,8 @@ /*** updating function
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Stage TestZorbaUbuntu failed. 1 tests failed (8407 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/233/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/181246 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: implicit iteration for jsoniq delete and replace exprs Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 implicit iteration for jsoniq delete and replace exprs -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-08-16 13:00:06 + +++ src/compiler/translator/translator.cpp 2013-08-19 13:02:29 + @@ -15199,7 +15199,7 @@ PostfixExpr := PostfixExpr (( ArgList ))+ - The parser also makes sure that each ArgList contains exactly one arg. + The parser also makes sure that the last ArgList contains exactly one arg. If there are N ArgLists, the last one is considered to be the selector expr and the PrimaryExpr together with the N-1 ArgLists constitute the target expr. @@ -15215,26 +15215,18 @@ { TRACE_VISIT_OUT(); - expr* selExpr = pop_nodestack(); + expr* selectorExpr = pop_nodestack(); expr* targetExpr = pop_nodestack(); - selExpr = wrap_in_type_promotion(selExpr, - theRTM.ANY_ATOMIC_TYPE_ONE, - PROMOTE_JSONIQ_SELECTOR, // JNUP0007 - NULL); - - targetExpr = wrap_in_type_match(targetExpr, - theRTM.JSON_ITEM_TYPE_ONE, - loc, - TREAT_JSONIQ_UPDATE_TARGET, // JNUP0008 - NULL); - - fo_expr* updExpr = theExprManager- - create_fo_expr(theRootSctx, theUDF, - loc, - BUILTIN_FUNC(OP_ZORBA_JSON_DELETE_2), - targetExpr, - selExpr); + selectorExpr = wrap_in_type_promotion(selectorExpr, +theRTM.ANY_ATOMIC_TYPE_QUESTION, +PROMOTE_TYPE_PROMOTION, +NULL); + + fo_expr* updExpr = CREATE(fo)(theRootSctx, theUDF, loc, +BUILTIN_FUNC(OP_ZORBA_JSON_DELETE_2), +targetExpr, +selectorExpr); push_nodestack(updExpr); } @@ -15255,32 +15247,25 @@ TRACE_VISIT_OUT(); expr* valueExpr = pop_nodestack(); - expr* selExpr = pop_nodestack(); + expr* selectorExpr = pop_nodestack(); expr* targetExpr = pop_nodestack(); std::vectorexpr* args(3); - args[0] = wrap_in_type_match(targetExpr, - theRTM.JSON_ITEM_TYPE_ONE, - loc, - TREAT_JSONIQ_UPDATE_TARGET, // JNUP0008 - NULL); + args[0] = targetExpr; - args[1] = wrap_in_type_promotion(selExpr, - theRTM.ANY_ATOMIC_TYPE_ONE, - PROMOTE_JSONIQ_SELECTOR, // JNUP0007 + args[1] = wrap_in_type_promotion(selectorExpr, + theRTM.ANY_ATOMIC_TYPE_QUESTION, + PROMOTE_TYPE_PROMOTION, NULL); - args[2] = theExprManager-create_fo_expr(theRootSctx, theUDF, - valueExpr-get_loc(), - BUILTIN_FUNC(OP_ZORBA_JSON_BOX_1), - valueExpr); + args[2] = CREATE(fo)(theRootSctx, theUDF, valueExpr-get_loc(), + BUILTIN_FUNC(OP_ZORBA_JSON_BOX_1), + valueExpr); - fo_expr* updExpr = theExprManager- - create_fo_expr(theRootSctx, theUDF, - loc, - BUILTIN_FUNC(OP_ZORBA_JSON_REPLACE_VALUE_3), - args); + fo_expr* updExpr = CREATE(fo)(theRootSctx, theUDF, loc, +BUILTIN_FUNC(OP_ZORBA_JSON_REPLACE_VALUE_3), +args); push_nodestack(updExpr); } @@ -15314,7 +15299,7 @@ args[1] = wrap_in_type_promotion(nameExpr, theRTM.STRING_TYPE_ONE, - PROMOTE_JSONIQ_OBJECT_SELECTOR); // JNUP0007 + PROMOTE_TYPE_PROMOTION); args[2] = wrap_in_type_promotion(newNameExpr, theRTM.STRING_TYPE_ONE, === modified file 'src/functions/pregenerated/func_jsoniq_functions.cpp' --- src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-16 16:05:18 + +++ src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-19 13:02:29 + @@ -173,7 +173,7 @@ std::vectorPlanIter_t argv, expr ann) const { - return new JSONDeleteIterator(sctx, loc, argv); + return new
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180865 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Stage TestZorbaUbuntu failed. 7 tests failed (8403 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/223/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Stage TestZorbaUbuntu failed. 1 tests failed (8403 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/224/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180553 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: 1. EBV on jsoniq items returns true instead of error 2. Updated signature (and implementation) of jn and libjn functions according to latest spec 3. Removed from libjn functions that were also in jn 4. Removed jn:json-doc function Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 1. EBV on jsoniq items returns true instead of error 2. Updated signature (and implementation) of jn and libjn functions according to latest spec 3. Removed from libjn functions that were also in jn 4. Removed jn:json-doc function -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Stage TestZorbaUbuntu failed. 2 tests failed (8401 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/216/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Stage TestZorbaUbuntu failed. 1 tests failed (8401 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/219/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/180110 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Stage TestZorbaUbuntu failed. 1 tests failed (8402 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/202/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: removed jn:null() + allow empty seq as input to jn:size() Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 removed jn:null() + allow empty seq as input to jn:size() -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'modules/org/jsoniq/www/functions.xq' --- modules/org/jsoniq/www/functions.xq 2013-08-12 09:59:18 + +++ modules/org/jsoniq/www/functions.xq 2013-08-12 12:50:29 + @@ -215,7 +215,7 @@ : @param $j A JSON Array. : @return The number of items in $j. :) -declare function jn:size($j as array()) as xs:integer external; +declare function jn:size($j as array()?) as xs:integer? external; (:~ @@ -260,14 +260,4 @@ declare function jn:null() as js:null external; -(:~ - : Tests whether the supplied atomic item is a JSON null. - : - : @param An atomic item. - : - : @return true if the item is of type js:null. - :) -declare function jn:is-null($i as xs:anyAtomicType) as xs:boolean external; - - === modified file 'src/functions/func_jsoniq_functions_impl.cpp' --- src/functions/func_jsoniq_functions_impl.cpp 2013-08-09 10:23:10 + +++ src/functions/func_jsoniq_functions_impl.cpp 2013-08-12 12:50:29 + @@ -70,6 +70,18 @@ /*** / +xqtref_t fn_jsoniq_size::getReturnType(const fo_expr* caller) const +{ + if (caller-get_arg(0)-get_return_type()-get_quantifier() == TypeConstants::QUANT_ONE) +return GENV_TYPESYSTEM.INTEGER_TYPE_ONE; + + return theSignature.returnType(); +} + + +/*** + +/ PlanIter_t fn_jsoniq_keys::codegen( CompilerCB*, static_context* sctx, === modified file 'src/functions/pregenerated/func_jsoniq_functions.cpp' --- src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-12 10:27:18 + +++ src/functions/pregenerated/func_jsoniq_functions.cpp 2013-08-12 12:50:29 + @@ -154,16 +154,6 @@ return new JSONNullIterator(sctx, loc); } -PlanIter_t fn_jsoniq_is_null::codegen( - CompilerCB*, - static_context* sctx, - const QueryLoc loc, - std::vectorPlanIter_t argv, - expr ann) const -{ - return new JSONIsNullIterator(sctx, loc, argv[0]); -} - PlanIter_t op_zorba_json_object_insert::codegen( CompilerCB*, static_context* sctx, @@ -431,8 +421,8 @@ { DECL_WITH_KIND(sctx, fn_jsoniq_size, (createQName(http://jsoniq.org/functions,,size;), -GENV_TYPESYSTEM.JSON_ARRAY_TYPE_ONE, -GENV_TYPESYSTEM.INTEGER_TYPE_ONE), +GENV_TYPESYSTEM.JSON_ARRAY_TYPE_QUESTION, +GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION), FunctionConsts::FN_JSONIQ_SIZE_1); } @@ -464,18 +454,6 @@ { -DECL_WITH_KIND(sctx, fn_jsoniq_is_null, -(createQName(http://jsoniq.org/functions,,is-null;), -GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, -GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE), -FunctionConsts::FN_JSONIQ_IS_NULL_1); - - } - - - - - { DECL_WITH_KIND(sctx, op_zorba_json_object_insert, (createQName(http://zorba.io/internal/zorba-ops,,json-object-insert;), GENV_TYPESYSTEM.JSON_OBJECT_TYPE_ONE, === modified file 'src/functions/pregenerated/func_jsoniq_functions.h' --- src/functions/pregenerated/func_jsoniq_functions.h 2013-08-09 10:23:10 + +++ src/functions/pregenerated/func_jsoniq_functions.h 2013-08-12 12:50:29 + @@ -287,6 +287,8 @@ } + xqtref_t getReturnType(const fo_expr* caller) const; + bool propagatesInputNodes(expr* fo, csize producer) const { return false; } bool mustCopyInputNodes(expr* fo, csize producer) const { return false; } @@ -329,21 +331,6 @@ }; -//fn-jsoniq:is-null -class fn_jsoniq_is_null : public function -{ -public: - fn_jsoniq_is_null(const signature sig, FunctionConsts::FunctionKind kind) -: -function(sig, kind) - { - - } - - CODEGEN_DECL(); -}; - - //op-zorba:json-object-insert class op_zorba_json_object_insert : public function { === modified file 'src/functions/pregenerated/function_enum.h' --- src/functions/pregenerated/function_enum.h 2013-08-09 10:23:10 + +++ src/functions/pregenerated/function_enum.h 2013-08-12 12:50:29 + @@ -271,7 +271,6 @@ FN_JSONIQ_SIZE_1, FN_JSONIQ_FLATTEN_1, FN_JSONIQ_NULL_0, - FN_JSONIQ_IS_NULL_1, OP_ZORBA_JSON_OBJECT_INSERT_2, OP_ZORBA_JSON_ARRAY_INSERT_3, OP_ZORBA_JSON_DELETE_2, === modified file 'src/runtime/json/jsoniq_functions_impl.cpp' --- src/runtime/json/jsoniq_functions_impl.cpp 2013-08-09 10:23:10
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Stage TestZorbaUbuntu failed. 1 tests failed (8402 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/204/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: don't do unnecessary implicit iteration for jsoniq navigation Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 don't do unnecessary implicit iteration for jsoniq navigation -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'modules/org/jsoniq/www/functions.xq' --- modules/org/jsoniq/www/functions.xq 2013-06-19 14:19:40 + +++ modules/org/jsoniq/www/functions.xq 2013-08-09 10:32:03 + @@ -197,18 +197,6 @@ (:~ - : Returns the value of a JSON Pair with a given name within a given JSON object. - : If no such pair exists in the object, returns the empty sequence. - : - : @param $o A JSON Object. - : @param $name The name of the pair whose value is to be retrieved - : @return the value of specified pair within the given object, or the empty sequence. - :) -(: obsolete - use $o($name) instead :) -declare function jn:value($o as item(), $name as item()?) as item()? external; - - -(:~ : Creates an object from the specified pairs of another given object. : Specifically, for each name in $names, if the object $o has a pair with : that name, then a copy of that pair is included in the new object. @@ -231,18 +219,6 @@ (:~ - : Returns the member of an Array at the specified position (starting from 1). - : If the position is out of bounds of the array, returns the empty sequence. - : - : @param $a A JSON Array. - : @param $p The position in the array. - : @return The member at the specified position, or empty sequence. - :) -(: obsolete - use $a($p) or $a[[$p]] instead :) -declare function jn:member($a as item(), $p as item()?) as item()? external; - - -(:~ : Returns the items belonging to the arrays found inside a given sequence : of items. The items are returned in an implementation-defined order. : === modified file 'src/compiler/rewriter/rules/flwor_rules.cpp' --- src/compiler/rewriter/rules/flwor_rules.cpp 2013-06-14 04:50:39 + +++ src/compiler/rewriter/rules/flwor_rules.cpp 2013-08-09 10:32:03 + @@ -462,7 +462,8 @@ // since one value is still returned, count variables are changed to 1 subst_vars(rCtx, static_castcount_clause*(clause)-get_var(), - rCtx.theEM-create_const_expr(sctx, udf, loc, numeric_constsxs_integer::one()), + rCtx.theEM-create_const_expr(sctx, udf, loc, + numeric_constsxs_integer::one()), 2); theFlwor-remove_clause(0); @@ -537,7 +538,21 @@ if (is_trivial_expr(varDomExpr)) { numRefs = 2; -return isSafeVar; + +if (isSafeVar) +{ + return true; +} +else +{ + expr* retExpr = theFlwor-get_return_expr(); + xqtref_t type = retExpr-get_return_type_with_empty_input(var); + + return TypeOps::is_equal(theFlwor-get_type_manager(), + *type, + *GENV_TYPESYSTEM.EMPTY_TYPE, + retExpr-get_loc()); +} } // If set to true, then it is unsafe to fold, but we may still be able to === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-08-02 18:29:44 + +++ src/compiler/translator/translator.cpp 2013-08-09 10:32:03 + @@ -10843,7 +10843,7 @@ args[1] = selectorExpr; expr* accessorExpr = -generate_fn_body(BUILTIN_FUNC(FN_JSONIQ_MEMBER_2), args, loc); +generate_fn_body(BUILTIN_FUNC(OP_ZORBA_ARRAY_MEMBER_2), args, loc); assert(accessorExpr-get_expr_kind() == fo_expr_kind); @@ -10889,7 +10889,7 @@ { fo_expr* pointExpr = CREATE(fo)(sourceExpr-get_sctx(), theUDF, sourceExpr-get_loc(), - BUILTIN_FUNC(FN_JSONIQ_MEMBER_2), + BUILTIN_FUNC(OP_ZORBA_ARRAY_MEMBER_2), arrayExpr, predExpr); @@ -11072,27 +11072,42 @@ assert(selectExpr objectExpr); - flwor_expr* flworExpr = wrap_expr_in_flwor(objectExpr, false); - - for_clause* fc = static_castfor_clause*(flworExpr-get_clause(0)); - - expr* flworVarExpr = CREATE(wrapper)(theRootSctx, theUDF, loc, fc-get_var()); - - expr* accessorExpr; - - std::vectorexpr* args(2); - args[0] = flworVarExpr; - args[1] = selectExpr; - - accessorExpr = generate_fn_body(BUILTIN_FUNC(FN_JSONIQ_VALUE_2), args, loc); - - assert(accessorExpr-get_expr_kind() == fo_expr_kind); - - flworExpr-set_return_expr(accessorExpr); - - pop_scope(); - - push_nodestack(flworExpr); + xqtref_t domainType = objectExpr-get_return_type(); + + if (domainType-max_card() 1) + { +flwor_expr* flworExpr =
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Stage TestZorbaUbuntu failed. 1 tests failed (8403 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/195/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/179411 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: removed StaticContextImpl::checkInvokable() method == small optimization for invoke() Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 removed StaticContextImpl::checkInvokable() method == small optimization for invoke() -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'bin/zorbacmd.cpp' --- bin/zorbacmd.cpp 2013-08-05 11:24:53 + +++ bin/zorbacmd.cpp 2013-08-06 08:48:31 + @@ -904,13 +904,14 @@ ItemSequence_t docsSeq = docMgr-availableDocuments(); Iterator_t lIter = docsSeq-getIterator(); lIter-open(); + Item uri; std::vectorItem docURIs; - while (lIter-next(uri)) + while (docsIter-next(uri)) { docURIs.push_back(uri); } - lIter-close(); + docsIter-close(); size_t numDocs = docURIs.size(); === modified file 'doc/cxx/examples/datamanager.cpp' --- doc/cxx/examples/datamanager.cpp 2013-08-05 11:24:53 + +++ doc/cxx/examples/datamanager.cpp 2013-08-06 08:48:31 + @@ -51,7 +51,7 @@ Item lDoc = aDataManager-parseXML(lInStream); // (2) bind the document in the store using the DocumentManager -DocumentManager* lDocMgr = aDataManager-getDocumentManager(); +DocumentManager_t lDocMgr = aZorba-getDocumentManager(); lDocMgr-put(books.xml, lDoc); // (3) doc('books.xml') accesses the previously found document === modified file 'src/api/staticcontextimpl.cpp' --- src/api/staticcontextimpl.cpp 2013-08-05 11:54:06 + +++ src/api/staticcontextimpl.cpp 2013-08-06 08:48:31 + @@ -962,6 +962,9 @@ } +/*** + +/ void StaticContextImpl::getFunctions( const String aFnNameUri, @@ -992,6 +995,9 @@ } +/*** + +/ void StaticContextImpl::getFunctionAnnotations( const Item aQName, @@ -1020,6 +1026,9 @@ } +/*** + +/ void StaticContextImpl::setContextItemStaticType(TypeIdentifier_t type) { @@ -1032,6 +1041,9 @@ } +/*** + +/ TypeIdentifier_t StaticContextImpl::getContextItemStaticType() const { @@ -1044,6 +1056,9 @@ } +/*** + +/ void StaticContextImpl::setTraceStream(std::ostream os) { @@ -1051,6 +1066,9 @@ } +/*** + +/ void StaticContextImpl::resetTraceStream() { @@ -1058,6 +1076,9 @@ } +/*** + +/ bool StaticContextImpl::getOption(const Item aQName, String aOptionValue) const { @@ -1083,6 +1104,9 @@ } +/*** + +/ void StaticContextImpl::declareOption(const Item aQName, const String aOptionValue) { @@ -1099,6 +1123,9 @@ } +/*** + +/ void StaticContextImpl::loadProlog( const String prolog, const Zorba_CompilerHints_t hints) @@ -1119,6 +1146,9 @@ } +/*** + +/ static void toInternalPath( const std::vectorString aPublicStrings, @@ -1140,6 +1170,9 @@ } +/*** + +/ static void toPublicPath( const std::vectorzstring aInternalStrings, @@ -1153,6 +1186,9 @@ } +/*** +
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Commit Message changed to: removed StaticContextImpl::checkInvokable() method == small optimization for invoke() changed static base uri for root static context For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Description changed to: removed StaticContextImpl::checkInvokable() method == small optimization for invoke() changed static base uri for root static context For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178692 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: added a DynamicContextImpl::setVariable() function + cosmetic Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 added a DynamicContextImpl::setVariable() function + cosmetic -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/dynamic_context.h' --- include/zorba/dynamic_context.h 2013-06-11 23:38:49 + +++ include/zorba/dynamic_context.h 2013-08-01 08:00:47 + @@ -68,6 +68,25 @@ const String aQName, const Item aItem) = 0; + /** + * \brief Defines the external variable identified by an expanded QName and + * assigns it the value of aItem. + * + * The named external variable may be located in the main query or in any + * modules imported directly or indirectly by the query. + * + * @param aNamespace the namespace URI of the variable's expanded QName + * @param aLocalname the local name of the variable's expanded QName + * @param aItem the Item that is used as value for the variable. + * @return true if the variable has been set successfully, false otherwise. + * @throw ZorbaException if an error occured (e.g. the given Item is not valid). + */ + virtual bool + setVariable( + const String inNamespace, + const String inLocalname, + const Item inValue) = 0; + /** * \brief Defines the external variable identified by aQName and assigns it * the sequence that is returned by evaluating aIterator. === modified file 'src/api/dynamiccontextimpl.cpp' --- src/api/dynamiccontextimpl.cpp 2013-06-18 23:53:59 + +++ src/api/dynamiccontextimpl.cpp 2013-08-01 08:00:47 + @@ -34,6 +34,8 @@ #include api/xqueryimpl.h #include api/resultiteratorimpl.h #include api/storeiteratorimpl.h +//#include api/item_iter_query_result.h +//#include api/item_iter_store.h #include api/dynamiccontextimpl.h #include compiler/parser/query_loc.h @@ -231,6 +233,55 @@ / bool DynamicContextImpl::setVariable( +const String inVarName, +const Iterator_t inValue) +{ + ZORBA_DCTX_TRY + { +checkNoIterators(); + +if (!inValue.get()) +{ + throw ZORBA_EXCEPTION(zerr::ZAPI0014_INVALID_ARGUMENT, + ERROR_PARAMS(null, ZED( BadIterator))); +} + +const zstring varName = Unmarshaller::getInternalString(inVarName); +store::Iterator_t value = Unmarshaller::getInternalIterator(inValue.get()); + +VarInfo* var = NULL; + +try +{ + var = get_var_info(varName); +} +catch (ZorbaException const e) +{ + // Normally, we should be throwing an exception if the variable has not + // been declared inside the xquery program, but this cases many failures + // with the w3c XQTS. + if (e.diagnostic() == err::XPST0008) + { +return false; + } + throw; +} + +ulong varId = var-getId(); + +theCtx-add_variable(varId, value); + +return true; + } + ZORBA_DCTX_CATCH + return false; +} + + +///** + +/ +bool DynamicContextImpl::setVariable( const String inNamespace, const String inLocalname, const Iterator_t inValue) @@ -247,6 +298,7 @@ const zstring nameSpace = Unmarshaller::getInternalString(inNamespace); const zstring localName = Unmarshaller::getInternalString(inLocalname); + store::Iterator_t value = Unmarshaller::getInternalIterator(inValue.get()); VarInfo* var = NULL; @@ -282,6 +334,53 @@ / bool DynamicContextImpl::setVariable( +const String inNamespace, +const String inLocalname, +const Item inValue) +{ + ZORBA_DCTX_TRY + { +checkNoIterators(); + +const zstring nameSpace = Unmarshaller::getInternalString(inNamespace); +const zstring localName = Unmarshaller::getInternalString(inLocalname); + +store::Item_t value(Unmarshaller::getInternalItem(inValue)); +checkItem(value); + +VarInfo* var = NULL; + +try +{ + var = get_var_info(nameSpace, localName); +} +catch (ZorbaException const e) +{ + // Normally, we should be throwing an exception if the variable has not + // been declared inside the xquery program, but this causes many failures + // with the w3c XQTS. + if (e.diagnostic() == err::XPST0008) + { +return false; + } + throw; +} + +ulong varId = var-getId(); + +theCtx-add_variable(varId, value); + +return true; + } + ZORBA_DCTX_CATCH + return false; +} + +
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178011 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba. Commit message: Fixed an error message Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Fixed an error message -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-07-29 23:55:03 + +++ src/diagnostics/diagnostic_en.xml 2013-08-01 08:33:33 + @@ -2540,8 +2540,8 @@ value$1: document already exists in store/value /diagnostic -diagnostic code=ZAPI0021 name=ITEM_TO_LOAD_IS_NOT_NODE - value$1: item to load is not a node/value +diagnostic code=ZAPI0021 name=ITEM_TO_LOAD_IS_NOT_XML_DOC + value$1: item to add to the store is not an XML document node/value /diagnostic diagnostic code=ZAPI0023 name=NON_ATOMIC_CONTEXT_SIZE_VALUE -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Stage TestZorbaUbuntu failed. 3 tests failed (8404 total tests run). Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/145/testReport/ to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Stage BuildZorbaUbuntu failed. Check compiler output at http://jenkins.lambda.nu/job/BuildZorbaUbuntu/176/parsed_console to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue starting for the following merge proposals: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Validation queue succeeded - proposal merged! -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 -- https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/178016 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp