[Zorba-coders] [Merge] lp:~zorba-coders/zorba/substring-intopt into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/substring-intopt-2011-11-21T23-02-12.07Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/substring-intopt into lp:zorba failed. Below is the output from the failed tests. CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message): Validation queue job substring-intopt-2011-11-21T23-02-12.07Z is finished. The final status was: 3 tests did not succeed - changes not commited. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/substring-intopt into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/substring-intopt into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/substring-intopt-2011-11-22T03-58-27.713Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Validation queue job substring-intopt-2011-11-22T03-58-27.713Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/substring-intopt into lp:zorba has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Did the changes, though the use of xs_integer instead of xs_int didn't work as elegantly as I expected. Can be easily undone though. -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
xs:integer has infinite precision. zstring's size_t is usually much smaller. Hence, I think we have to cast down to size_t and do range checking. If the integer is too big, the raised exception should be caught and a query location of the corresponding argument should be added. -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/substring-intopt into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/substring-intopt-2011-11-14T16-49-05.505Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 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/substring-intopt into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/substring-intopt into lp:zorba. Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 Optimization of the fn:substring function in the case when its $start and $length arguments are integers. -- https://code.launchpad.net/~zorba-coders/zorba/substring-intopt/+merge/81949 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/compiler/rewriter/rules/type_rules.cpp' --- src/compiler/rewriter/rules/type_rules.cpp 2011-07-01 05:22:12 + +++ src/compiler/rewriter/rules/type_rules.cpp 2011-11-11 08:41:26 + @@ -1,12 +1,12 @@ /* * Copyright 2006-2008 The FLWOR Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,7 +40,7 @@ #include diagnostics/assert.h -namespace zorba +namespace zorba { static expr_t wrap_in_num_promotion(expr* arg, xqtref_t oldt, xqtref_t t); @@ -51,14 +51,14 @@ #if 0 -RULE_REWRITE_POST(InferUDFTypes) +RULE_REWRITE_POST(InferUDFTypes) { if (node-get_expr_kind() != fo_expr_kind) return NULL; fo_expr* fo = static_castfo_expr*(node); user_function* udf = dynamic_castuser_function*(fo-get_func()); - + if (udf == NULL) return NULL; @@ -93,11 +93,11 @@ TypeManager* tm = sctx-get_typemanager(); RootTypeManager rtm = GENV_TYPESYSTEM; - if (node-get_expr_kind() == fo_expr_kind) + if (node-get_expr_kind() == fo_expr_kind) { fo_expr* fo = static_castfo_expr *(node); -if (fo-get_func()-getKind() == FunctionConsts::FN_BOOLEAN_1) +if (fo-get_func()-getKind() == FunctionConsts::FN_BOOLEAN_1) { expr_t arg = fo-get_arg(0); xqtref_t arg_type = arg-get_return_type(); @@ -107,7 +107,7 @@ return NULL; } -if (fo-get_func()-getKind() == FunctionConsts::FN_DATA_1) +if (fo-get_func()-getKind() == FunctionConsts::FN_DATA_1) { expr_t arg = fo-get_arg(0); xqtref_t arg_type = arg-get_return_type(); @@ -121,7 +121,7 @@ cast_base_expr* pe; // Note: the if cond is true for promote_expr, treat_expr, and cast_expr - if ((pe = dynamic_castcast_base_expr *(node)) != NULL) + if ((pe = dynamic_castcast_base_expr *(node)) != NULL) { expr_t arg = pe-get_input(); xqtref_t arg_type = arg-get_return_type(); @@ -143,7 +143,7 @@ (node-get_expr_kind() != cast_expr_kind TypeOps::is_subtype(tm, *arg_type, *target_type, arg-get_loc( return arg; - + xqtref_t arg_ptype = TypeOps::prime_type(tm, *arg_type); xqtref_t target_ptype = TypeOps::prime_type(tm, *target_type); @@ -166,7 +166,7 @@ { treat_expr* te = static_casttreat_expr * (pe); - if (te-get_check_prime() + if (te-get_check_prime() TypeOps::is_subtype(tm, *arg_ptype, *target_ptype, arg-get_loc())) { te-set_check_prime(false); @@ -205,7 +205,7 @@ static_context* sctx = node-get_sctx(); - if (node-get_expr_kind() == fo_expr_kind) + if (node-get_expr_kind() == fo_expr_kind) { fo_expr* fo = static_castfo_expr *(node); const function* fn = fo-get_func(); @@ -219,7 +219,7 @@ { expr_t argExpr = fo-get_arg(0); xqtref_t argType = argExpr-get_return_type(); - std::vectorxqtref_t argTypes; + std::vectorxqtref_t argTypes; argTypes.push_back(argType); function* replacement = fn-specialize(sctx, argTypes); @@ -236,7 +236,7 @@ argExpr-get_loc(), argExpr, rtm.DOUBLE_TYPE_STAR); - + fo-set_arg(0, promoteExpr); } @@ -248,7 +248,7 @@ { expr_t argExpr = fo-get_arg(0); xqtref_t argType = argExpr-get_return_type(); - std::vectorxqtref_t argTypes; + std::vectorxqtref_t argTypes; argTypes.push_back(argType); function* replacement = fn-specialize(sctx, argTypes); @@ -259,7 +259,9 @@ } } else if (fnKind == FunctionConsts::FN_SUBSEQUENCE_2 || - fnKind == FunctionConsts::FN_SUBSEQUENCE_3) + fnKind == FunctionConsts::FN_SUBSEQUENCE_3 || + fnKind == FunctionConsts::FN_SUBSTRING_2 || + fnKind == FunctionConsts::FN_SUBSTRING_3) { expr_t posExpr = fo-get_arg(1); if (posExpr-get_expr_kind() == promote_expr_kind) @@ -286,18 +288,24 @@ if