Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba

2012-04-18 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-04-18 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba 
has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-22 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Matthias Brantner
Matthias Brantner has proposed merging 
lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671

proper return type specification for analyze-string done manually instead of 
automatically done by the code generation.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/functions/func_strings_impl.cpp'
--- src/functions/func_strings_impl.cpp	2012-01-11 17:30:25 +
+++ src/functions/func_strings_impl.cpp	2012-03-15 15:00:28 +
@@ -61,6 +61,44 @@
   return NULL;
 }
 
+
+/***
+
+/
+void populate_context_strings_impl(static_context* sctx)
+{
+  xqtref_t lAnalyzeStringResultType =
+GENV_TYPESYSTEM.create_node_type(
+store::StoreConsts::elementNode,
+createQName(http://www.w3.org/2005/xpath-functions,,analyze-string-result;),
+NULL,
+TypeConstants::QUANT_ONE,
+false,
+false
+  );
+
+  {
+DECL_WITH_KIND(sctx, fn_analyze_string_3_0,
+(createQName(http://www.w3.org/2005/xpath-functions,,analyze-string;), 
+GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+lAnalyzeStringResultType),
+FunctionConsts::FN_ANALYZE_STRING_2);
+
+  }
+
+
+  {
+DECL_WITH_KIND(sctx, fn_analyze_string_3_0,
+(createQName(http://www.w3.org/2005/xpath-functions,,analyze-string;), 
+GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+lAnalyzeStringResultType),
+FunctionConsts::FN_ANALYZE_STRING_3);
+  }
+}
+
 }
 
 /* vim:set et sw=2 ts=2: */

=== added file 'src/functions/func_strings_impl.h'
--- src/functions/func_strings_impl.h	1970-01-01 00:00:00 +
+++ src/functions/func_strings_impl.h	2012-03-15 15:00:28 +
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006-2012 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+#ifndef ZORBA_FUNCTIONS_STRINGS_IMPL_H
+#define ZORBA_FUNCTIONS_STRINGS_IMPL_H
+
+
+#include common/shared_types.h
+#include functions/function.h
+#include functions/function_impl.h
+#include functions/function_consts.h
+
+
+namespace zorba {
+
+
+void populate_context_strings_impl(static_context* sctx);
+
+
+} //namespace zorba
+
+
+#endif 
+/* vim:set et sw=2 ts=2: */
+

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2012-03-07 15:49:25 +
+++ src/functions/library.cpp	2012-03-15 15:00:28 +
@@ -57,6 +57,7 @@
 #include functions/func_sequences.h
 #include functions/func_sequences_impl.h
 #include functions/func_strings.h
+#include functions/func_strings_impl.h
 #include functions/func_uris.h
 #include functions/func_json.h
 #include functions/func_var_decl.h
@@ -122,6 +123,7 @@
   populate_context_schema(sctx);
   populate_context_sctx(sctx);
   populate_context_strings(sctx);
+  populate_context_strings_impl(sctx);
   populate_context_uris(sctx);
   populate_context_sequences(sctx);
   populate_context_sequences_impl(sctx);

=== modified file 'src/functions/pregenerated/func_strings.cpp'
--- src/functions/pregenerated/func_strings.cpp	2012-02-16 12:48:17 +
+++ src/functions/pregenerated/func_strings.cpp	2012-03-15 15:00:28 +
@@ -853,33 +853,6 @@
   {
 
 
-DECL_WITH_KIND(sctx, fn_analyze_string_3_0,
-(createQName(http://www.w3.org/2005/xpath-functions,,analyze-string;), 
-GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-GENV_TYPESYSTEM.ELEMENT_TYPE_ONE),
-FunctionConsts::FN_ANALYZE_STRING_2);
-
-  }
-
-
-  {
-
-
-DECL_WITH_KIND(sctx, fn_analyze_string_3_0,
-(createQName(http://www.w3.org/2005/xpath-functions,,analyze-string;), 
-GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-GENV_TYPESYSTEM.ELEMENT_TYPE_ONE),
-FunctionConsts::FN_ANALYZE_STRING_3);
-
-  }
-
-
-  {
-
-
 DECL_WITH_KIND(sctx, fn_zorba_string_materialize,
 

[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba

2012-03-15 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba 
has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-analyze_string-2012-03-15T15-01-13.07Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Paul J. Lucas
Why isn't code-generation improved so it *can* be done via code-generation 
instead?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Paul J. Lucas
 Why isn't code-generation improved so it *can* be done via code-generation
 instead?

Automatic code-generation is going to be even more important (and necessary) in 
light of the forthcoming LLVM stuff.  There's going to be even more code that 
ought to be generated automatically, e.g., C thunks, and lots of boilerplate 
LLVM C++ API code.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve  1, Disapprove  1, 
Needs Fixing  1, Pending  1. Got: 3 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug-analyze_string into lp:zorba 
has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Matthias Brantner
 Why isn't code-generation improved so it *can* be done via code-generation
 instead?
There are plenty of cases to specify the user-defined types. Handling each of 
them automatically (i.e. generate the correct create_* function call to create 
the type) is not worth it for the 2 functions that we have _in the core_ that 
require this. I don't think there will be a lot more such functions in the core 
with user-defined return types. Hence, doing it manually seems to be the right 
thing to me.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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/bug-analyze_string into lp:zorba

2012-03-15 Thread Matthias Brantner
  Why isn't code-generation improved so it *can* be done via code-generation
  instead?
 
 Automatic code-generation is going to be even more important (and necessary)
 in light of the forthcoming LLVM stuff.  There's going to be even more code
 that ought to be generated automatically, e.g., C thunks, and lots of
 boilerplate LLVM C++ API code.
I totally agree. However, as far as I understand the issue is orthogonal 
because this mostly concerns the runtime code and not the code for declaring 
the functions in the compiler/context. 
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-analyze_string/+merge/97671
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