Changeset: f492768d86d7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f492768d86d7
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
        monetdb5/mal/Tests/tst013.stable.err
        monetdb5/mal/Tests/tst903.stable.out
        monetdb5/mal/Tests/tst904.stable.out
        monetdb5/mal/Tests/tst907.stable.out
        monetdb5/mal/mal.h
        monetdb5/mal/mal_builder.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_instruction.h
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_parser.c
        monetdb5/mal/mal_session.c
        monetdb5/mal/mal_type.c
        monetdb5/mal/mal_type.h
        monetdb5/modules/mal/Tests/inspect00.stable.out
        monetdb5/modules/mal/Tests/inspect05.stable.out.int128
        monetdb5/modules/mal/Tests/remote03.stable.err
        monetdb5/modules/mal/Tests/remote03.stable.out
        monetdb5/modules/mal/Tests/remote04.stable.out
        monetdb5/optimizer/Tests/Mexample.stable.out
        monetdb5/optimizer/Tests/dataflow.stable.out
        monetdb5/optimizer/Tests/dataflow3.stable.out
        monetdb5/optimizer/Tests/dataflow4.stable.out
        monetdb5/optimizer/Tests/inline00.stable.out
        monetdb5/optimizer/Tests/inline01.stable.out
        monetdb5/optimizer/Tests/inline02.stable.out
        monetdb5/optimizer/Tests/inline03.stable.out
        monetdb5/optimizer/Tests/inline04.stable.out
        monetdb5/optimizer/Tests/inline06.stable.out
        monetdb5/optimizer/Tests/inline07.stable.out
        monetdb5/optimizer/Tests/inline09.stable.out
        monetdb5/optimizer/Tests/inline10.stable.out
        monetdb5/optimizer/Tests/inline12.stable.out
        monetdb5/optimizer/Tests/inlineCst.stable.out
        monetdb5/optimizer/Tests/inlineFunction.stable.out
        monetdb5/optimizer/Tests/inlineFunction1.stable.out
        monetdb5/optimizer/Tests/inlineFunction2.stable.out
        monetdb5/optimizer/Tests/inlineFunction3.stable.out
        monetdb5/optimizer/Tests/inlineFunction4.stable.out
        monetdb5/optimizer/Tests/manifold2.stable.out
        monetdb5/optimizer/opt_factorize.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/optimizer/opt_querylog.c
        monetdb5/optimizer/opt_remoteQueries.c
        sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
        sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_optimizer.c
        sql/benchmarks/ssbm/Tests/01-explain.stable.out
        sql/benchmarks/ssbm/Tests/01-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/02-explain.stable.out
        sql/benchmarks/ssbm/Tests/02-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/03-explain.stable.out
        sql/benchmarks/ssbm/Tests/03-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/04-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/05-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/06-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/07-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/08-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/09-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/10-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/11-explain.stable.out
        sql/benchmarks/ssbm/Tests/11-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/12-explain.stable.out
        sql/benchmarks/ssbm/Tests/12-explain.stable.out.int128
        sql/benchmarks/ssbm/Tests/13-explain.stable.out
        sql/benchmarks/ssbm/Tests/13-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/01-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/02-explain.stable.out
        sql/benchmarks/tpch/Tests/03-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/04-explain.stable.out
        sql/benchmarks/tpch/Tests/05-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/06-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/07-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/08-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/09-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/10-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/11-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/12-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/13-explain.stable.out
        sql/benchmarks/tpch/Tests/14-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/15-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/16-explain.stable.out
        sql/benchmarks/tpch/Tests/17-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/18-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/19-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/20-explain.stable.out.int128
        sql/benchmarks/tpch/Tests/21-explain.stable.out
        sql/benchmarks/tpch/Tests/22-explain.stable.out.int128
        sql/rel.txt
        sql/server/rel_dump.c
        sql/server/rel_optimizer.c
        sql/server/rel_rel.c
        sql/server/rel_rel.h
        sql/server/rel_select.c
        sql/server/rel_select.h
        sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out
        
sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
        
sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out
        
sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out
        sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
        sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out
        
sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
        sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.int128
        sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out
        sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
        sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
        sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out
        sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out
        sql/test/BugTracker/Tests/explain.SF-1739353.stable.out
        sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
        sql/test/datacell/Tests/All
        sql/test/mapi/Tests/sql_int128.stable.out
        sql/test/mergetables/Tests/mergequery.stable.out
        sql/test/remote/Tests/partition_elim.stable.out
Branch: jit
Log Message:

Merge with default


diffs (truncated from 13512 to 300 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2040,7 +2040,6 @@ int defConstant(MalBlkPtr mb, int type, 
 str defineRef;
 void delArgument(InstrPtr p, int varid);
 void delName(const char *nme, size_t len);
-void delVariable(MalBlkPtr mb, int varid);
 str deleteRef;
 void deleteSymbol(Module scope, Symbol prg);
 str deltaRef;
@@ -2062,7 +2061,6 @@ str evalFile(Client c, str fname, int li
 str evalRef;
 str execRef;
 void expandMacro(MalBlkPtr mb, InstrPtr p, MalBlkPtr mc);
-void expandMalBlk(MalBlkPtr mb, int lines);
 str expandRef;
 str exportOperationRef;
 str export_tableRef;
@@ -2074,7 +2072,6 @@ str findRef;
 Scenario findScenario(str nme);
 Symbol findSymbol(Module nspace, str mod, str fcn);
 Symbol findSymbolInModule(Module v, str fcn);
-int findTmpVariable(MalBlkPtr mb, int type);
 int findVariable(MalBlkPtr mb, const char *name);
 int findVariableLength(MalBlkPtr mb, str name, int len);
 void finishNamespace(void);
@@ -2140,7 +2137,6 @@ malType getType(MalBlkPtr mb, str nme);
 str getTypeIdentifier(malType tpe);
 str getTypeName(malType tpe);
 lng getUserTime(void);
-str getVarName(MalBlkPtr mb, int i);
 lng getVolume(MalStkPtr stk, InstrPtr pci, int rd);
 str grabRef;
 str groupRef;
@@ -2206,7 +2202,6 @@ int isSideEffectFree(MalBlkPtr mb);
 int isSlice(InstrPtr q);
 int isSubJoin(InstrPtr q);
 int isSubSelect(InstrPtr q);
-int isTmpName(const char *n);
 int isTopn(InstrPtr q);
 int isUnsafeFunction(InstrPtr q);
 int isUnsafeInstruction(InstrPtr q);
@@ -2331,10 +2326,9 @@ str newRef;
 InstrPtr newReturnStmt(MalBlkPtr mb);
 InstrPtr newStmt(MalBlkPtr mb, const char *module, const char *name);
 Symbol newSymbol(str nme, int kind);
-int newTmpSink(MalBlkPtr mb, malType type);
 int newTmpVariable(MalBlkPtr mb, malType type);
 int newTypeVariable(MalBlkPtr mb, malType type);
-int newVariable(MalBlkPtr mb, str name, malType type);
+int newVariable(MalBlkPtr mb, str name, int len, malType type);
 str nextRef;
 str notRef;
 str not_ilikeRef;
@@ -2429,13 +2423,11 @@ str remoteRef;
 void removeDataflow(MalBlkPtr mb);
 void removeInstruction(MalBlkPtr mb, InstrPtr p);
 void removeInstructionBlock(MalBlkPtr mb, int pc, int cnt);
-void removeVariable(MalBlkPtr mb, int varid);
 void renameVariable(MalBlkPtr mb, int i, str pattern, int newid);
 str replaceRef;
 str replicatorRef;
 void resetMalBlk(MalBlkPtr mb, int stop);
 void resetScenario(Client c);
-void resetVarName(MalBlkPtr mb, int i);
 void resizeMalBlk(MalBlkPtr mb, int maxstmt, int maxvar);
 int resolveType(int dsttype, int srctype);
 str resultSetRef;
@@ -2551,7 +2543,6 @@ int timestamp_tostr(str *buf, int *len, 
 int timestamp_tz_fromstr(const char *buf, int *len, timestamp **ret);
 int timestamp_tz_tostr(str *buf, int *len, const timestamp *val, const tzone 
*timezone);
 str transRef;
-void trimMalBlk(MalBlkPtr mb);
 void trimMalVariables(MalBlkPtr mb, MalStkPtr stk);
 void trimMalVariables_(MalBlkPtr mb, bit *used, MalStkPtr glb);
 void typeChecker(stream *out, Module scope, MalBlkPtr mb, InstrPtr p, int 
silent);
diff --git 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
--- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
+++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
@@ -63,16 +63,16 @@ Ready.
 % clob # type
 % 126 # length
 function user.s8_1():void;
-    X_24:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';","default_pipe",12);
-barrier X_52 := language.dataflow();
-    X_1 := sql.mvc();
-    (X_11:bat[:int],X_12:bat[:int],X_13:bat[:int]) := 
sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str);
-exit X_52;
-    X_14 := sql.append(X_1,"sys","ttt","a",X_11);
-    X_18 := sql.append(X_14,"sys","ttt","b",X_12);
-    X_20 := sql.append(X_18,"sys","ttt","c",X_13);
-    X_22 := aggr.count(X_13);
-    sql.affectedRows(X_20,X_22);
+    X_38:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';","default_pipe",12);
+barrier X_58 := language.dataflow();
+    X_0 := sql.mvc();
+    (X_21:bat[:int],X_22:bat[:int],X_23:bat[:int]) := 
sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str);
+exit X_58;
+    X_25 := sql.append(X_0,"sys","ttt","a",X_21);
+    X_30 := sql.append(X_25,"sys","ttt","b",X_22);
+    X_33 := sql.append(X_30,"sys","ttt","c",X_23);
+    X_35 := aggr.count(X_23);
+    sql.affectedRows(X_33,X_35);
 end user.s8_1;
 #inline               actions= 0 time=1 usec 
 #candidates           actions= 1 time=14 usec 
@@ -124,16 +124,16 @@ end user.s8_1;
 % clob # type
 % 126 # length
 function user.s24_1():void;
-    X_24:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';","user_1",12);
-barrier X_53 := language.dataflow();
-    X_1 := sql.mvc();
-    (X_11:bat[:int],X_12:bat[:int],X_13:bat[:int]) := 
sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str);
-exit X_53;
-    X_14 := sql.append(X_1,"sys","ttt","a",X_11);
-    X_18 := sql.append(X_14,"sys","ttt","b",X_12);
-    X_22 := aggr.count(X_13);
-    X_20 := sql.append(X_18,"sys","ttt","c",X_13);
-    sql.affectedRows(X_20,X_22);
+    X_38:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';","user_1",12);
+barrier X_58 := language.dataflow();
+    X_0 := sql.mvc();
+    (X_21:bat[:int],X_22:bat[:int],X_23:bat[:int]) := 
sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str);
+exit X_58;
+    X_25 := sql.append(X_0,"sys","ttt","a",X_21);
+    X_30 := sql.append(X_25,"sys","ttt","b",X_22);
+    X_35 := aggr.count(X_23);
+    X_33 := sql.append(X_30,"sys","ttt","c",X_23);
+    sql.affectedRows(X_33,X_35);
 end user.s24_1;
 #inline               actions= 0 time=1 usec 
 #candidates           actions= 1 time=14 usec 
diff --git a/monetdb5/mal/Tests/tst013.stable.err 
b/monetdb5/mal/Tests/tst013.stable.err
--- a/monetdb5/mal/Tests/tst013.stable.err
+++ b/monetdb5/mal/Tests/tst013.stable.err
@@ -46,7 +46,7 @@ QUERY = # incomplete barrier blocks. Res
                exit t;
                redo;
         exit;
-ERROR = !SyntaxException:user.main[3]:label 'X_4' not in guarded block
+
         !SyntaxException:user.main[14]:label 't' not in guarded block
 
 # 13:20:00 >  
diff --git a/monetdb5/mal/Tests/tst903.stable.out 
b/monetdb5/mal/Tests/tst903.stable.out
--- a/monetdb5/mal/Tests/tst903.stable.out
+++ b/monetdb5/mal/Tests/tst903.stable.out
@@ -139,14 +139,14 @@ exit i;
     cnt := aggr.count(z9);
     mdb.setDebug(dbgmsk_set);
     t0 := alarm.usec();
-    X_103 := bat.new(nil:lng);
-barrier (X_106,X_107) := iterator.new(b);
-    X_109 := algebra.fetch(c,X_106);
-    X_111 := calc.+(X_107,X_109);
-    bat.append(X_103,X_111);
-    redo (X_106,X_107) := iterator.next(b);
-exit (X_106,X_107);
-    x:bat[:lng] := X_103;
+    X_71 := bat.new(nil:lng);
+barrier (X_74,X_75) := iterator.new(b);
+    X_77 := algebra.fetch(c,X_74);
+    X_79 := calc.+(X_75,X_77);
+    bat.append(X_71,X_79);
+    redo (X_74,X_75) := iterator.next(b);
+exit (X_74,X_75);
+    x:bat[:lng] := X_71;
     t1 := alarm.usec();
     mdb.setDebug(dbgmsk_restore);
     d0 := calc.-(t1,t0);
diff --git a/monetdb5/mal/Tests/tst904.stable.out 
b/monetdb5/mal/Tests/tst904.stable.out
--- a/monetdb5/mal/Tests/tst904.stable.out
+++ b/monetdb5/mal/Tests/tst904.stable.out
@@ -39,13 +39,13 @@ barrier i:lng := 0:lng;                 
 exit i:lng;                                    #[7] (0)  5 
     io.print(b:bat[:lng]);                     #[8] (0) IOprint_val 11 <- 3 
     c:int := 1:int;                            #[9] (0)  12 <- 13 
-    X_18:bat[:lng] := bat.new(nil:lng);        #[10] (0) CMDBATnew 18 <- 19 
-barrier (X_21:oid,X_22:lng) := iterator.new(b:bat[:lng]);      #[11] (0) 
ITRbunIterator 21 22 <- 3 
-    X_24:lng := calc.+(X_22:lng,c:int);        #[12] (0) CMDvarADDsignal 24 <- 
22 12 
-    bat.append(X_18:bat[:lng],X_24:lng);       #[13] (0) BKCappend_val_wrap 25 
<- 18 24 
-    redo (X_21:oid,X_22:lng) := iterator.next(b:bat[:lng]);    #[14] (0) 
ITRbunNext 21 22 <- 3 
-exit (X_21:oid,X_22:lng);                      #[15] (0)  21 22 
-    xz:bat[:lng] := X_18:bat[:lng];            #[16] (0)  14 <- 18 
+    X_13:bat[:lng] := bat.new(nil:lng);        #[10] (0) CMDBATnew 18 <- 19 
+barrier (X_16:oid,X_17:lng) := iterator.new(b:bat[:lng]);      #[11] (0) 
ITRbunIterator 21 22 <- 3 
+    X_19:lng := calc.+(X_17:lng,c:int);        #[12] (0) CMDvarADDsignal 24 <- 
22 12 
+    bat.append(X_13:bat[:lng],X_19:lng);       #[13] (0) BKCappend_val_wrap 25 
<- 18 24 
+    redo (X_16:oid,X_17:lng) := iterator.next(b:bat[:lng]);    #[14] (0) 
ITRbunNext 21 22 <- 3 
+exit (X_16:oid,X_17:lng);                      #[15] (0)  21 22 
+    xz:bat[:lng] := X_13:bat[:lng];            #[16] (0)  14 <- 18 
     io.print(xz:bat[:lng]);                    #[17] (0) IOprint_val 17 <- 14 
 end user.foo;                                  #[18] (0)  
 #--------------------------#
diff --git a/monetdb5/mal/Tests/tst907.stable.out 
b/monetdb5/mal/Tests/tst907.stable.out
--- a/monetdb5/mal/Tests/tst907.stable.out
+++ b/monetdb5/mal/Tests/tst907.stable.out
@@ -36,29 +36,29 @@ function user.foo():void;               
     b:bat[:int] := bat.new(:int);              #[4] (0) CMDBATnew 7 <- 8 
     bat.append(b:bat[:int],1:int);             #[5] (0) BKCappend_val_wrap 9 
<- 7 2 
     io.print("do multiplex three test":str);   #[6] (0) IOprint_val 10 <- 11 
-    X_22:bat[:int] := bat.new(nil:int);        #[7] (0) CMDBATnew 22 <- 23 
-barrier (X_25:oid,X_26:int) := iterator.new(b:bat[:int]);      #[8] (0) 
ITRbunIterator 25 26 <- 7 
-    X_28:int := user.three(X_26:int,2:int,3:int);      #[9] (0)  28 <- 26 4 5 
-    bat.append(X_22:bat[:int],X_28:int);       #[10] (0) BKCappend_val_wrap 29 
<- 22 28 
-    redo (X_25:oid,X_26:int) := iterator.next(b:bat[:int]);    #[11] (0) 
ITRbunNext 25 26 <- 7 
-exit (X_25:oid,X_26:int);                      #[12] (0)  25 26 
-    z:bat[:int] := X_22:bat[:int];             #[13] (0)  12 <- 22 
+    X_16:bat[:int] := bat.new(nil:int);        #[7] (0) CMDBATnew 22 <- 23 
+barrier (X_19:oid,X_20:int) := iterator.new(b:bat[:int]);      #[8] (0) 
ITRbunIterator 25 26 <- 7 
+    X_22:int := user.three(X_20:int,2:int,3:int);      #[9] (0)  28 <- 26 4 5 
+    bat.append(X_16:bat[:int],X_22:int);       #[10] (0) BKCappend_val_wrap 29 
<- 22 28 
+    redo (X_19:oid,X_20:int) := iterator.next(b:bat[:int]);    #[11] (0) 
ITRbunNext 25 26 <- 7 
+exit (X_19:oid,X_20:int);                      #[12] (0)  25 26 
+    z:bat[:int] := X_16:bat[:int];             #[13] (0)  12 <- 22 
     io.print("do multiplex one test":str);     #[14] (0) IOprint_val 15 <- 16 
-    X_33:bat[:int] := bat.new(nil:int);        #[15] (0) CMDBATnew 33 <- 23 
-barrier (X_35:oid,X_36:int) := iterator.new(b:bat[:int]);      #[16] (0) 
ITRbunIterator 35 36 <- 7 
-    X_38:int := user.one(X_36:int);            #[17] (0)  38 <- 36 
-    bat.append(X_33:bat[:int],X_38:int);       #[18] (0) BKCappend_val_wrap 39 
<- 33 38 
-    redo (X_35:oid,X_36:int) := iterator.next(b:bat[:int]);    #[19] (0) 
ITRbunNext 35 36 <- 7 
-exit (X_35:oid,X_36:int);                      #[20] (0)  35 36 
-    z:bat[:int] := X_33:bat[:int];             #[21] (0)  12 <- 33 
+    X_27:bat[:int] := bat.new(nil:int);        #[15] (0) CMDBATnew 33 <- 23 
+barrier (X_29:oid,X_30:int) := iterator.new(b:bat[:int]);      #[16] (0) 
ITRbunIterator 35 36 <- 7 
+    X_32:int := user.one(X_30:int);            #[17] (0)  38 <- 36 
+    bat.append(X_27:bat[:int],X_32:int);       #[18] (0) BKCappend_val_wrap 39 
<- 33 38 
+    redo (X_29:oid,X_30:int) := iterator.next(b:bat[:int]);    #[19] (0) 
ITRbunNext 35 36 <- 7 
+exit (X_29:oid,X_30:int);                      #[20] (0)  35 36 
+    z:bat[:int] := X_27:bat[:int];             #[21] (0)  12 <- 33 
     io.print("do multiplex pow test":str);     #[22] (0) IOprint_val 18 <- 19 
-    X_43:bat[:int] := bat.new(nil:int);        #[23] (0) CMDBATnew 43 <- 23 
-barrier (X_45:oid,X_46:int) := iterator.new(b:bat[:int]);      #[24] (0) 
ITRbunIterator 45 46 <- 7 
-    X_48:int := user.pow(X_46:int,2:int);      #[25] (0)  48 <- 46 4 
-    bat.append(X_43:bat[:int],X_48:int);       #[26] (0) BKCappend_val_wrap 49 
<- 43 48 
-    redo (X_45:oid,X_46:int) := iterator.next(b:bat[:int]);    #[27] (0) 
ITRbunNext 45 46 <- 7 
-exit (X_45:oid,X_46:int);                      #[28] (0)  45 46 
-    z:bat[:int] := X_43:bat[:int];             #[29] (0)  12 <- 43 
+    X_37:bat[:int] := bat.new(nil:int);        #[23] (0) CMDBATnew 43 <- 23 
+barrier (X_39:oid,X_40:int) := iterator.new(b:bat[:int]);      #[24] (0) 
ITRbunIterator 45 46 <- 7 
+    X_42:int := user.pow(X_40:int,2:int);      #[25] (0)  48 <- 46 4 
+    bat.append(X_37:bat[:int],X_42:int);       #[26] (0) BKCappend_val_wrap 49 
<- 43 48 
+    redo (X_39:oid,X_40:int) := iterator.next(b:bat[:int]);    #[27] (0) 
ITRbunNext 45 46 <- 7 
+exit (X_39:oid,X_40:int);                      #[28] (0)  45 46 
+    z:bat[:int] := X_37:bat[:int];             #[29] (0)  12 <- 43 
     io.print(z:bat[:int]);                     #[30] (0) IOprint_val 21 <- 12 
 end user.foo;                                  #[31] (0)  
 [ 1 ]
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -144,16 +144,15 @@ typedef struct SYMDEF {
 } *Symbol, SymRecord;
 
 typedef struct VARRECORD {
-       str name;                                       /* argname or lexical 
value repr */
+       char id[IDLENGTH];                      /* use the space for the full 
name */
        malType type;                           /* internal type signature */
        int flags;                                      /* see below, reserve 
some space */
-       int tmpindex;                           /* temporary variable */
        ValRecord value;
        int declared;                           /* pc index when it was first 
assigned */
        int updated;                            /* pc index when it was first 
updated */
        int eolife;                                     /* pc index when it 
should be garbage collected */
        int depth;                                      /* scope block depth */
-       int worker;                                     /* tread id of last 
worker producing it */
+       int worker;                                     /* thread id of last 
worker producing it */
        str stc;                                        /* rendering 
schema.table.column */
        BUN rowcnt;                                     /* estimated row count*/
 } *VarPtr, VarRecord;
@@ -198,6 +197,7 @@ typedef struct MALBLK {
        struct MALBLK *alternative;
        int vtop;                                       /* next free slot */
        int vsize;                                      /* size of variable 
arena */
+       int vid;                                        /* generate local 
variable counter */
        VarRecord **var;                        /* Variable table */
        int stop;                                       /* next free slot */
        int ssize;                                      /* byte size of arena */
diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c
--- a/monetdb5/mal/mal_builder.c
+++ b/monetdb5/mal/mal_builder.c
@@ -128,7 +128,7 @@ newCatchStmt(MalBlkPtr mb, str nme)
                return NULL;
        q->barrier = CATCHsymbol;
        if ( i< 0) {
-               if ((getArg(q,0)= newVariable(mb, GDKstrdup(nme),TYPE_str)) < 
0) {
+               if ((getArg(q,0)= newVariable(mb, nme, strlen(nme),TYPE_str)) < 
0) {
                        freeInstruction(q);
                        return NULL;
                }
@@ -146,7 +146,7 @@ newRaiseStmt(MalBlkPtr mb, str nme)
                return NULL;
        q->barrier = RAISEsymbol;
        if ( i< 0) {
-               if ((getArg(q,0)= newVariable(mb, GDKstrdup(nme),TYPE_str)) < 
0) {
+               if ((getArg(q,0)= newVariable(mb, nme, strlen(nme),TYPE_str)) < 
0) {
                        freeInstruction(q);
                        return NULL;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to