Update of /cvsroot/monetdb/MonetDB5/tests/gdkTests/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13006/gdkTests/Tests

Modified Files:
        bat_insert.mal bat_insert.stable.out refcnt.stable.out 
Log Message:
Approved


Index: refcnt.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/tests/gdkTests/Tests/refcnt.stable.out,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- refcnt.stable.out   25 Dec 2007 13:19:49 -0000      1.14
+++ refcnt.stable.out   2 Jan 2008 10:46:15 -0000       1.15
@@ -147,71 +147,71 @@
 ##     because the delete doesn't decrease the reference counter       # 9  
(_9:str)
 #PROC delBAT(bat b,str name) : void {  # 10  (_10:str)
 #      b.delete(name);         # 11  (_11:str)
-#}     # 12  (_7:str)
-#PROC createBAT(str name) : bat[int,int] {     # 13  (_12:str)
-#      VAR res := new(int,int);        # 14  (_13:str)
-#      res.rename(name);       # 15  (_14:str)
-#      RETURN res;     # 16  (_15:str)
-#}     # 17  (_7:str)
-#NOTE we can not return  (yet) a (:bat,:bat[:int,:int])        # 18  (_16:str)
-#into a multiplex. This means that the BATs created    # 19  (_17:str)
-# are immediately garbage collected when leaving the   # 20  (_18:str)
-#function. A hack would be to provide explicit incref/decref   # 21  (_19:str)
-#tmp();        # 22  (_20:str)
-    user.tmp();        # 23  (_21:void)
-#{     # 24  (_22:str)
-#VAR top := new(str,bat);      # 25  (_23:str)
-#top.rename("top");    # 26  (_24:str)
-    top := bat.new(:str,:BAT); # 27 CMDBATnew 
(top:bat[:str,:BAT])<-(_26:str)(_27:BAT)
-    bat.setName(top,"top");    # 28 BKCsetName 
(_28:void)<-(top:bat[:str,:BAT])(_29:str)
-#addBAT(top,"one");    # 29  (_30:str)
-#addBAT(top,"two");    # 30  (_31:str)
-    user.addBAT(top,"one");    # 31  (_32:void)<-(top:bat[:str,:BAT])(_33:str)
-    user.tmp();        # 32  (_34:void)
-    user.addBAT(top,"two");    # 33  (_35:void)<-(top:bat[:str,:BAT])(_36:str)
-#tmp();        # 34  (_20:str)
-    user.tmp();        # 35  (_37:void)
-#delBAT(top,"one");    # 36  (_38:str)
-    user.delBAT(top,"one");    # 37  (_39:void)<-(top:bat[:str,:BAT])(_33:str)
-    io.print("one droppped");  # 38 IOprint_val (_40:void)<-(_41:str)
-#tmp();        # 39  (_20:str)
-    user.tmp();        # 40  (_42:void)
-#VAR i := new(oid,str);        # 41  (_43:str)
-    m := bat.new(:oid,:str);   # 42 CMDBATnew 
(m:bat[:oid,:str])<-(_45:oid)(_46:str)
-#i.insert(oid(10),"ten");      # 43  (_47:str)
-    bat.insert(m,[EMAIL PROTECTED]:oid,"ten"); # 44 BKCinsert_bun 
(_48:void)<-(m:bat[:oid,:str])(_49:oid)(_50:str)
-#i.insert(oid(20),"twenty");   # 45  (_51:str)
-    bat.insert(m,[EMAIL PROTECTED]:oid,"twenty");      # 46 BKCinsert_bun 
(_52:void)<-(m:bat[:oid,:str])(_53:oid)(_54:str)
-#VAR res := [createBAT](i);    # 47  (_55:str)
-    io.print("do multiplex");  # 48 IOprint_val (_56:void)<-(_57:str)
-    _79 := bat.new(nil:oid,nil:BAT);   # 49 CMDBATnew 
(_79:bat[:oid,:BAT])<-(_80:oid)(_81:BAT)
-barrier (_83,_84,_85):= bat.newIterator(m);    # 50 CHPbunIterator 
(_83:lng)(_84:oid)(_85:str)<-(m:bat[:oid,:str]) jump 57
-    _87 := user.createBAT(_85);        # 51  (_87:BAT)<-(_85:str)
-    bat.insert(_79,_84,_87);   # 52 BKCinsert_bun 
(_88:void)<-(_79:bat[:oid,:BAT])(_84:oid)(_87:BAT)
-    redo (_83,_84,_85):= bat.hasMoreElements(m);       # 53 
CHPbunHasMoreElements (_83:lng)(_84:oid)(_85:str)<-(m:bat[:oid,:str]) jump 51
+#}     # 12  (_12:str)
+#PROC createBAT(str name) : bat[int,int] {     # 13  (_13:str)
+#      VAR res := new(int,int);        # 14  (_14:str)
+#      res.rename(name);       # 15  (_15:str)
+#      RETURN res;     # 16  (_16:str)
+#}     # 17  (_17:str)
+#NOTE we can not return  (yet) a (:bat,:bat[:int,:int])        # 18  (_18:str)
+#into a multiplex. This means that the BATs created    # 19  (_19:str)
+# are immediately garbage collected when leaving the   # 20  (_20:str)
+#function. A hack would be to provide explicit incref/decref   # 21  (_21:str)
+#tmp();        # 22  (_22:str)
+    user.tmp();        # 23  (_23:void)
+#{     # 24  (_24:str)
+#VAR top := new(str,bat);      # 25  (_25:str)
+#top.rename("top");    # 26  (_26:str)
+    top := bat.new(:str,:BAT); # 27 CMDBATnew 
(top:bat[:str,:BAT])<-(_28:str)(_29:BAT)
+    bat.setName(top,"top");    # 28 BKCsetName 
(_30:void)<-(top:bat[:str,:BAT])(_31:str)
+#addBAT(top,"one");    # 29  (_32:str)
+#addBAT(top,"two");    # 30  (_33:str)
+    user.addBAT(top,"one");    # 31  (_34:void)<-(top:bat[:str,:BAT])(_35:str)
+    user.tmp();        # 32  (_36:void)
+    user.addBAT(top,"two");    # 33  (_37:void)<-(top:bat[:str,:BAT])(_38:str)
+#tmp();        # 34  (_39:str)
+    user.tmp();        # 35  (_40:void)
+#delBAT(top,"one");    # 36  (_41:str)
+    user.delBAT(top,"one");    # 37  (_42:void)<-(top:bat[:str,:BAT])(_35:str)
+    io.print("one droppped");  # 38 IOprint_val (_43:void)<-(_44:str)
+#tmp();        # 39  (_45:str)
+    user.tmp();        # 40  (_46:void)
+#VAR i := new(oid,str);        # 41  (_47:str)
+    m := bat.new(:oid,:str);   # 42 CMDBATnew 
(m:bat[:oid,:str])<-(_49:oid)(_50:str)
+#i.insert(oid(10),"ten");      # 43  (_51:str)
+    bat.insert(m,[EMAIL PROTECTED]:oid,"ten"); # 44 BKCinsert_bun 
(_52:void)<-(m:bat[:oid,:str])(_53:oid)(_54:str)
+#i.insert(oid(20),"twenty");   # 45  (_55:str)
+    bat.insert(m,[EMAIL PROTECTED]:oid,"twenty");      # 46 BKCinsert_bun 
(_56:void)<-(m:bat[:oid,:str])(_57:oid)(_58:str)
+#VAR res := [createBAT](i);    # 47  (_59:str)
+    io.print("do multiplex");  # 48 IOprint_val (_60:void)<-(_61:str)
+    _84 := bat.new(nil:oid,nil:BAT);   # 49 CMDBATnew 
(_84:bat[:oid,:BAT])<-(_85:oid)(_86:BAT)
+barrier (_88,_89,_90):= bat.newIterator(m);    # 50 CHPbunIterator 
(_88:lng)(_89:oid)(_90:str)<-(m:bat[:oid,:str]) jump 57
+    _92 := user.createBAT(_90);        # 51  (_92:BAT)<-(_90:str)
+    bat.insert(_84,_89,_92);   # 52 BKCinsert_bun 
(_93:void)<-(_84:bat[:oid,:BAT])(_89:oid)(_92:BAT)
+    redo (_88,_89,_90):= bat.hasMoreElements(m);       # 53 
CHPbunHasMoreElements (_88:lng)(_89:oid)(_90:str)<-(m:bat[:oid,:str]) jump 51
 catch MALException:str ;       # 54  (MALException:str) jump 56
-    redo (_83,_84,_85):= bat.hasMoreElements(m);       # 55 
CHPbunHasMoreElements (_83:lng)(_84:oid)(_85:str)<-(m:bat[:oid,:str]) jump 51
+    redo (_88,_89,_90):= bat.hasMoreElements(m);       # 55 
CHPbunHasMoreElements (_88:lng)(_89:oid)(_90:str)<-(m:bat[:oid,:str]) jump 51
 exit MALException:str ;        # 56  (MALException:str)
-exit (_83,_84,_85);    # 57  (_83:lng)(_84:oid)(_85:str)
-    r:bat[:oid,:BAT]  := _79;  # 58  (r:bat[:oid,:BAT])<-(_79:bat[:oid,:BAT])
-    io.print(r);       # 59 IOprint_val (_61:void)<-(r:bat[:oid,:BAT])
-#tmp();        # 60  (_62:str)
-    io.print("done multiplex");        # 61 IOprint_val (_63:void)<-(_64:str)
-#top := nil;   # 62  (_65:str)
-#res := nil;   # 63  (_66:str)
-#}     # 64  (_67:str)
-##BUGS:        # 65  (_68:str)
-# in M5 this bug does not appear, because there is one reference       # 66  
(_69:str)
-# returned from createBAT.     # 67  (_70:str)
-##- bat("one") still exists, due to not decreasing the reference counter       
# 68  (_71:str)
-##  at the delete from bat("top")      # 69  (_72:str)
-##- bat("ten") and bat("twenty") still exist, due to creation during multiplex 
        # 70  (_73:str)
-##  operation (?)      # 71  (_74:str)
-# moreover, due to multiplex code inlining the reference count of "twenty" is 
2        # 72  (_75:str)
-# instead of the initial expected 1.   # 73  (_76:str)
-#tmp();        # 74  (_62:str)
-#quit();       # 75  (_77:str)
-    clients.quit();    # 76 CLTquit (_78:void)
+exit (_88,_89,_90);    # 57  (_88:lng)(_89:oid)(_90:str)
+    r:bat[:oid,:BAT]  := _84;  # 58  (r:bat[:oid,:BAT])<-(_84:bat[:oid,:BAT])
+    io.print(r);       # 59 IOprint_val (_65:void)<-(r:bat[:oid,:BAT])
+#tmp();        # 60  (_66:str)
+    io.print("done multiplex");        # 61 IOprint_val (_67:void)<-(_68:str)
+#top := nil;   # 62  (_69:str)
+#res := nil;   # 63  (_70:str)
+#}     # 64  (_71:str)
+##BUGS:        # 65  (_72:str)
+# in M5 this bug does not appear, because there is one reference       # 66  
(_73:str)
+# returned from createBAT.     # 67  (_74:str)
+##- bat("one") still exists, due to not decreasing the reference counter       
# 68  (_75:str)
+##  at the delete from bat("top")      # 69  (_76:str)
+##- bat("ten") and bat("twenty") still exist, due to creation during multiplex 
        # 70  (_77:str)
+##  operation (?)      # 71  (_78:str)
+# moreover, due to multiplex code inlining the reference count of "twenty" is 
2        # 72  (_79:str)
+# instead of the initial expected 1.   # 73  (_80:str)
+#tmp();        # 74  (_81:str)
+#quit();       # 75  (_82:str)
+    clients.quit();    # 76 CLTquit (_83:void)
 end main;      # 77  
 [ "one droppped" ]
 [ "do multiplex" ]

Index: bat_insert.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/tests/gdkTests/Tests/bat_insert.stable.out,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- bat_insert.stable.out       12 Jun 2007 17:22:18 -0000      1.3
+++ bat_insert.stable.out       2 Jan 2008 10:46:15 -0000       1.4
@@ -83,42 +83,43 @@
 #clients.quit();
 #
 function user.main():void;     # 0  (main:void)
-    b := bat.new(:oid,:oid);   # 1 CMDBATnew 
(b:bat[:oid,:oid])<-(_2:oid)(_2:oid)
-    bat.setName(b,"b");        # 2 BKCsetName 
(_3:void)<-(b:bat[:oid,:oid])(_4:str)
-    bat.setPersistent(b,true); # 3 BKCpersists 
(_5:void)<-(b:bat[:oid,:oid])(_6:bit)
-    cap := bat.getCapacity(b); # 4 BKCgetCapacity (cap:lng)<-(b:bat[:oid,:oid])
-    cap := calc./(cap,4);      # 5 CALCbinarycheckDIVlngint 
(cap:lng)<-(cap:lng)(_8:int)
-    ci := calc.int(cap);       # 6 CALClng2int (ci:int)<-(cap:lng)
-    ci := calc.+(ci,1);        # 7 CALCbinaryADDintint 
(ci:int)<-(ci:int)(_10:int)
-    i := calc.*(ci,3); # 8 CALCbinaryMULintint (i:int)<-(ci:int)(_12:int)
-barrier go := calc.>(i,0);     # 9 CALCcompGTintint (go:bit)<-(i:int)(_14:int) 
jump 14
-    o := calc.oid(i);  # 10 CALCint2oid (o:oid)<-(i:int)
-    bat.insert(b,o,o); # 11 BKCinsert_bun 
(_16:void)<-(b:bat[:oid,:oid])(o:oid)(o:oid)
-    i := calc.-(i,1);  # 12 CALCbinarySUBintint (i:int)<-(i:int)(_10:int)
-    redo go := calc.>(i,0);    # 13 CALCcompGTintint 
(go:bit)<-(i:int)(_14:int) jump 10
-exit go;       # 14  (go:bit)
-    transaction.commit();      # 15 TRNglobal_commit (_17:bit)
-    i := calc.*(ci,2); # 16 CALCbinaryMULintint (i:int)<-(ci:int)(_18:int)
-barrier go := calc.>(i,0);     # 17 CALCcompGTintint 
(go:bit)<-(i:int)(_14:int) jump 22
-    o := calc.oid(i);  # 18 CALCint2oid (o:oid)<-(i:int)
-    bat.delete(b,o);   # 19 BKCdelete (_19:void)<-(b:bat[:oid,:oid])(o:oid)
-    i := calc.-(i,1);  # 20 CALCbinarySUBintint (i:int)<-(i:int)(_10:int)
-    redo go := calc.>(i,0);    # 21 CALCcompGTintint 
(go:bit)<-(i:int)(_14:int) jump 18
-exit go;       # 22  (go:bit)
-    c := bat.new(:oid,:oid);   # 23 CMDBATnew 
(c:bat[:oid,:oid])<-(_2:oid)(_2:oid)
-    i := calc.*(ci,2); # 24 CALCbinaryMULintint (i:int)<-(ci:int)(_18:int)
-barrier go := calc.>(i,0);     # 25 CALCcompGTintint 
(go:bit)<-(i:int)(_14:int) jump 30
-    o := calc.oid(i);  # 26 CALCint2oid (o:oid)<-(i:int)
-    bat.insert(c,o,o); # 27 BKCinsert_bun 
(_21:void)<-(c:bat[:oid,:oid])(o:oid)(o:oid)
-    i := calc.-(i,1);  # 28 CALCbinarySUBintint (i:int)<-(i:int)(_10:int)
-    redo go := calc.>(i,0);    # 29 CALCcompGTintint 
(go:bit)<-(i:int)(_14:int) jump 26
-exit go;       # 30  (go:bit)
-    bat.insert(b,c);   # 31 BKCinsert_bat 
(_22:void)<-(b:bat[:oid,:oid])(c:bat[:oid,:oid])
-    user.check_cap(b); # 32  (_23:void)<-(b:bat[:oid,:oid])
-    bat.setPersistent(b,false);        # 33 BKCpersists 
(_24:void)<-(b:bat[:oid,:oid])(_25:bit)
-    transaction.commit();      # 34 TRNglobal_commit (_26:bit)
-    clients.quit();    # 35 CLTquit (_27:void)
-end main;      # 36  
+    o := nil:oid;      # 1  (o:oid)<-(_2:oid)
+    b := bat.new(:oid,:oid);   # 2 CMDBATnew 
(b:bat[:oid,:oid])<-(_4:oid)(_5:oid)
+    bat.setName(b,"b");        # 3 BKCsetName 
(_6:void)<-(b:bat[:oid,:oid])(_7:str)
+    bat.setPersistent(b,true); # 4 BKCpersists 
(_8:void)<-(b:bat[:oid,:oid])(_9:bit)
+    cap := bat.getCapacity(b); # 5 BKCgetCapacity (cap:lng)<-(b:bat[:oid,:oid])
+    cap := calc./(cap,4);      # 6 CALCbinarycheckDIVlngint 
(cap:lng)<-(cap:lng)(_11:int)
+    ci := calc.int(cap);       # 7 CALClng2int (ci:int)<-(cap:lng)
+    ci := calc.+(ci,1);        # 8 CALCbinaryADDintint 
(ci:int)<-(ci:int)(_13:int)
+    i := calc.*(ci,3); # 9 CALCbinaryMULintint (i:int)<-(ci:int)(_15:int)
+barrier go := calc.>(i,0);     # 10 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 15
+    o := calc.oid(i);  # 11 CALCint2oid (o:oid)<-(i:int)
+    bat.insert(b,o,o); # 12 BKCinsert_bun 
(_18:void)<-(b:bat[:oid,:oid])(o:oid)(o:oid)
+    i := calc.-(i,1);  # 13 CALCbinarySUBintint (i:int)<-(i:int)(_13:int)
+    redo go := calc.>(i,0);    # 14 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 11
+exit go;       # 15  (go:bit)
+    transaction.commit();      # 16 TRNglobal_commit (_19:bit)
+    i := calc.*(ci,2); # 17 CALCbinaryMULintint (i:int)<-(ci:int)(_20:int)
+barrier go := calc.>(i,0);     # 18 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 23
+    o := calc.oid(i);  # 19 CALCint2oid (o:oid)<-(i:int)
+    bat.delete(b,o);   # 20 BKCdelete (_21:void)<-(b:bat[:oid,:oid])(o:oid)
+    i := calc.-(i,1);  # 21 CALCbinarySUBintint (i:int)<-(i:int)(_13:int)
+    redo go := calc.>(i,0);    # 22 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 19
+exit go;       # 23  (go:bit)
+    c := bat.new(:oid,:oid);   # 24 CMDBATnew 
(c:bat[:oid,:oid])<-(_23:oid)(_24:oid)
+    i := calc.*(ci,2); # 25 CALCbinaryMULintint (i:int)<-(ci:int)(_20:int)
+barrier go := calc.>(i,0);     # 26 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 31
+    o := calc.oid(i);  # 27 CALCint2oid (o:oid)<-(i:int)
+    bat.insert(c,o,o); # 28 BKCinsert_bun 
(_25:void)<-(c:bat[:oid,:oid])(o:oid)(o:oid)
+    i := calc.-(i,1);  # 29 CALCbinarySUBintint (i:int)<-(i:int)(_13:int)
+    redo go := calc.>(i,0);    # 30 CALCcompGTintint 
(go:bit)<-(i:int)(_17:int) jump 27
+exit go;       # 31  (go:bit)
+    bat.insert(b,c);   # 32 BKCinsert_bat 
(_26:void)<-(b:bat[:oid,:oid])(c:bat[:oid,:oid])
+    user.check_cap(b); # 33  (_27:void)<-(b:bat[:oid,:oid])
+    bat.setPersistent(b,false);        # 34 BKCpersists 
(_28:void)<-(b:bat[:oid,:oid])(_29:bit)
+    transaction.commit();      # 35 TRNglobal_commit (_30:bit)
+    clients.quit();    # 36 CLTquit (_31:void)
+end main;      # 37  
 
 # 20:34:11 >  
 # 20:34:11 >  Done.

Index: bat_insert.mal
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/tests/gdkTests/Tests/bat_insert.mal,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bat_insert.mal      21 Aug 2006 19:49:47 -0000      1.1
+++ bat_insert.mal      2 Jan 2008 10:46:15 -0000       1.2
@@ -1,3 +1,4 @@
+o:= nil:oid;
 function check_cap(b:bat[:any_1,:any_2]) :void;
        inserted := aggr.count(b);
        d:= bat.getDelta(b);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to