Changeset: 6d667778f955 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6d667778f955
Modified Files:
        monetdb5/modules/mal/Makefile.ag
        monetdb5/modules/mal/array.c
        sql/backends/monet5/Makefile.ag
        sql/scripts/Makefile.ag
Branch: SciQL-2
Log Message:

replaced array.mx with the correct array file
fixed BATnew to have also the mode
replaced BBPreleaseref


diffs (truncated from 2439 to 300 lines):

diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -1,9 +1,20 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+# The contents of this file are subject to the MonetDB Public License
+# Version 1.1 (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.monetdb.org/Legal/MonetDBLicense
 #
-# Copyright 2008-2015 MonetDB B.V.
-
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the MonetDB Database System.
+#
+# The Initial Developer of the Original Code is CWI.
+# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+# Copyright August 2008-2015 MonetDB B.V.
+# All Rights Reserved.
+ 
 INCLUDES = ../../mal ../atoms ../kernel \
        ../../../clients/mapilib \
        ../../../common/options \
@@ -18,7 +29,6 @@ MTSAFE
 lib_mal = {
        NOINST
        SOURCES = \
-               array.mx \
                batExtensions.c batExtensions.h \
                bbp.c bbp.h \
                clients.c clients.h \
@@ -50,7 +60,8 @@ lib_mal = {
                zorder.c zorder.h \
                sample.c sample.h \
                json_util.c json_util.h \
-               calc.c batcalc.c
+               calc.c batcalc.c \
+               array.c array.h
 }
 
 headers_mal = {
@@ -66,8 +77,8 @@ headers_mal = {
                txtsim.mal recycle.mal \
                cluster.mal \
                tokenizer.mal zorder.mal sample.mal json_util.mal \
-               calc.mal batcalc.mal batmtime.mal \
-               array.mx
+               batmtime.mal querylog.mal sysmon.mal \
+               array.mal
 }
 
 headers_auto = {
@@ -91,6 +102,7 @@ EXTRA_DIST = batExtensions.mal iterator.
        transaction.mal txtsim.mal tablet.mal tablet.h sample.mal json_util.mal 
\
        mal_mapi.mal mat.mal tokenizer.mal \
        batmtime.mal querylog.mal sysmon.mal \
+       array.mal \
        01_calc.mal 01_batcalc.mal \
        00_calc_hge.mal 00_batcalc_hge.mal \
        00_cluster_hge.mal 00_iterator_hge.mal 00_language_hge.mal \
diff --git a/monetdb5/modules/mal/array.c b/monetdb5/modules/mal/array.c
--- a/monetdb5/modules/mal/array.c
+++ b/monetdb5/modules/mal/array.c
@@ -17,7 +17,6 @@
  * All Rights Reserved.
  */
 
-#line 213 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 
/*============================================================================*/
 #include "monetdb_config.h"
 #include "mal_client.h"
@@ -27,14 +26,10 @@
 
 
 
-#line 221 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 #include "mal.h"
 #include "mal_interpreter.h"
 
 
-#line 315 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_bte(bat *ret, bte *start, bte *step, bte *stop, int *group, int 
*series)
 {
@@ -55,7 +50,7 @@ ARRAYseries_bte(bat *ret, bte *start, bt
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_bte, cnt);
+       bn = BATnew(TYPE_void, TYPE_bte, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -86,7 +81,7 @@ ARRAYseries_bte(bat *ret, bte *start, bt
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
@@ -104,7 +99,7 @@ ARRAYoffsets_bte(Client cntxt, MalBlkPtr
        (void) cntxt;
        (void) mb;
 
-       res = BATnew(TYPE_void, TYPE_bte, rescnt);
+       res = BATnew(TYPE_void, TYPE_bte, rescnt, TRANSIENT);
        if(res == NULL) {
                throw(MAL, "array.offsets", MAL_MALLOC_FAIL);
        }
@@ -127,10 +122,6 @@ ARRAYoffsets_bte(Client cntxt, MalBlkPtr
 
 
 
-#line 315 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_sht(bat *ret, sht *start, sht *step, sht *stop, int *group, int 
*series)
 {
@@ -151,7 +142,7 @@ ARRAYseries_sht(bat *ret, sht *start, sh
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_sht, cnt);
+       bn = BATnew(TYPE_void, TYPE_sht, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -182,7 +173,7 @@ ARRAYseries_sht(bat *ret, sht *start, sh
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
@@ -200,7 +191,7 @@ ARRAYoffsets_sht(Client cntxt, MalBlkPtr
        (void) cntxt;
        (void) mb;
 
-       res = BATnew(TYPE_void, TYPE_sht, rescnt);
+       res = BATnew(TYPE_void, TYPE_sht, rescnt, TRANSIENT);
        if(res == NULL) {
                throw(MAL, "array.offsets", MAL_MALLOC_FAIL);
        }
@@ -223,10 +214,6 @@ ARRAYoffsets_sht(Client cntxt, MalBlkPtr
 
 
 
-#line 316 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_int(bat *ret, int *start, int *step, int *stop, int *group, int 
*series)
 {
@@ -247,7 +234,7 @@ ARRAYseries_int(bat *ret, int *start, in
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_int, cnt);
+       bn = BATnew(TYPE_void, TYPE_int, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -278,7 +265,7 @@ ARRAYseries_int(bat *ret, int *start, in
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
@@ -296,7 +283,7 @@ ARRAYoffsets_int(Client cntxt, MalBlkPtr
        (void) cntxt;
        (void) mb;
 
-       res = BATnew(TYPE_void, TYPE_int, rescnt);
+       res = BATnew(TYPE_void, TYPE_int, rescnt, TRANSIENT);
        if(res == NULL) {
                throw(MAL, "array.offsets", MAL_MALLOC_FAIL);
        }
@@ -319,10 +306,6 @@ ARRAYoffsets_int(Client cntxt, MalBlkPtr
 
 
 
-#line 317 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_lng(bat *ret, lng *start, lng *step, lng *stop, int *group, int 
*series)
 {
@@ -343,7 +326,7 @@ ARRAYseries_lng(bat *ret, lng *start, ln
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_lng, cnt);
+       bn = BATnew(TYPE_void, TYPE_lng, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -374,7 +357,7 @@ ARRAYseries_lng(bat *ret, lng *start, ln
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
@@ -392,7 +375,7 @@ ARRAYoffsets_lng(Client cntxt, MalBlkPtr
        (void) cntxt;
        (void) mb;
 
-       res = BATnew(TYPE_void, TYPE_lng, rescnt);
+       res = BATnew(TYPE_void, TYPE_lng, rescnt, TRANSIENT);
        if(res == NULL) {
                throw(MAL, "array.offsets", MAL_MALLOC_FAIL);
        }
@@ -415,10 +398,6 @@ ARRAYoffsets_lng(Client cntxt, MalBlkPtr
 
 
 
-#line 318 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_flt(bat *ret, flt *start, flt *step, flt *stop, int *group, int 
*series)
 {
@@ -439,7 +418,7 @@ ARRAYseries_flt(bat *ret, flt *start, fl
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_flt, cnt);
+       bn = BATnew(TYPE_void, TYPE_flt, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -470,7 +449,7 @@ ARRAYseries_flt(bat *ret, flt *start, fl
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
@@ -488,7 +467,7 @@ ARRAYoffsets_flt(Client cntxt, MalBlkPtr
        (void) cntxt;
        (void) mb;
 
-       res = BATnew(TYPE_void, TYPE_flt, rescnt);
+       res = BATnew(TYPE_void, TYPE_flt, rescnt, TRANSIENT);
        if(res == NULL) {
                throw(MAL, "array.offsets", MAL_MALLOC_FAIL);
        }
@@ -511,10 +490,6 @@ ARRAYoffsets_flt(Client cntxt, MalBlkPtr
 
 
 
-#line 319 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
-
-
-#line 224 "/ufs/alvanaki/DEV/MonetDB-private/monetdb5/modules/mal/array.mx"
 str
 ARRAYseries_dbl(bat *ret, dbl *start, dbl *step, dbl *stop, int *group, int 
*series)
 {
@@ -535,7 +510,7 @@ ARRAYseries_dbl(bat *ret, dbl *start, db
 
 
        cnt =  (BUN) ceil(((*stop * 1.0 - *start) / *step)) * *group * *series ;
-       bn = BATnew(TYPE_void, TYPE_dbl, cnt);
+       bn = BATnew(TYPE_void, TYPE_dbl, cnt, TRANSIENT);
        if ( bn == NULL)
                throw(MAL, "array.series", MAL_MALLOC_FAIL);
 
@@ -566,7 +541,7 @@ ARRAYseries_dbl(bat *ret, dbl *start, db
        bn->trevsorted = (cnt <= 1 || (*series == 1 && *step < 0));
        bn->T->nonil = TRUE;
 
-       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
+       if (!(bn->batDirty&2)) BATsetaccess(bn, BAT_READ); \
        *ret = bn->batCacheid;
        BBPkeepref(*ret);
        return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to