Changeset: 657eebffaee2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=657eebffaee2
Added Files:
clients/R/build-for-cran.sh
Modified Files:
.hgtags
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_listing.h
monetdb5/modules/mal/remote.c
monetdb5/optimizer/opt_coercion.c
Branch: newstorage
Log Message:
merged with default
diffs (141 lines):
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -588,3 +588,4 @@ 2da8cbcb65ed56690bad29f089d996eac347b48d
6607367487d91eb02c5eb7dfb9d96606f8f7c6f0 Oct2014_SP1_release
e3d0eecdc35dc633fdd89157ba704f60f03756c1 Oct2014_9
d98df578687e677ae3abbc0ba41e3bb0631ef08a Oct2014_SP2_release
+c80c3439c5d7b2bddb710e584eb0936adc21d462 MonetDB.R-0.9.6
diff --git a/clients/R/build-for-cran.sh b/clients/R/build-for-cran.sh
new file mode 100755
--- /dev/null
+++ b/clients/R/build-for-cran.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# set this to a path where the latest svn version or R was installed.
+# CRAN policies state that R CMD check must use the latest version
+R=~/r-trunk-install/R.framework/Resources/bin/R
+
+# can't have these in a R package, it wont build
+find MonetDB.R -name "Makefile*" -exec rm {} \;
+find MonetDB.R -name ".DS_Store" -exec rm {} \;
+
+# for now, no profiler
+rm MonetDB.R/src/profiler*
+rm MonetDB.R/src/Makevars.win
+
+# binary leftovers
+rm MonetDB.R/src/*.o
+rm MonetDB.R/src/*.so
+
+# remove windows artefacts
+rm -r MonetDB.R/src-*
+
+rm MonetDB.R_*.tar.gz
+mkdir -p /tmp/rcheck
+
+$R CMD build MonetDB.R
+$R CMD check -o /tmp/rcheck --as-cran MonetDB.R_*.tar.gz
+
+hgid=`hg id -i | sed s/+//`
+newname=`basename MonetDB.R_*.tar.gz .tar.gz`-$hgid.tar.gz
+mv MonetDB.R_*.tar.gz $newname
diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -68,7 +68,7 @@ renderTerm(MalBlkPtr mb, MalStkPtr stk,
val = &stk->stk[varid];
VALformat(&cv, val);
- if (strlen(cv) >= len)
+ if (len + strlen(cv) >= maxlen)
buf= GDKrealloc(buf, maxlen =len + strlen(cv) + BUFSIZ);
if( buf == 0){
@@ -399,7 +399,11 @@ mal2str(MalBlkPtr mb, int first, int las
if( i == 0)
txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i),
LIST_MAL_NAME | LIST_MAL_TYPE | LIST_MAL_PROPS);
else
- txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i),
LIST_MAL_CALL );
+ txt[i] = instruction2str(mb, 0, getInstrPtr(mb, i),
LIST_MAL_CALL | LIST_MAL_PROPS );
+#ifdef _DEBUG_LISTING_
+ mnstr_printf(GDKout,"%s\n",txt[i]);
+#endif
+
if ( txt[i])
totlen += len[i] = (int)strlen(txt[i]);
}
@@ -424,13 +428,8 @@ mal2str(MalBlkPtr mb, int first, int las
return ps;
}
-str
-function2str(MalBlkPtr mb){
- return mal2str(mb, 0,mb->stop);
-}
-
void
-promptInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int flg)
+printInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int flg)
{
str ps;
@@ -442,12 +441,6 @@ promptInstruction(stream *fd, MalBlkPtr
mnstr_printf(fd, "%s%s", (flg & LIST_MAL_MAPI ? "=" : ""), ps);
GDKfree(ps);
}
-}
-
-void
-printInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int flg)
-{
- promptInstruction(fd, mb, stk, p, flg);
mnstr_printf(fd, "\n");
}
diff --git a/monetdb5/mal/mal_listing.h b/monetdb5/mal/mal_listing.h
--- a/monetdb5/mal/mal_listing.h
+++ b/monetdb5/mal/mal_listing.h
@@ -22,7 +22,6 @@ mal_export str instructionCall(MalBlkPtr
mal_export void promptInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p, int flg);
mal_export str instruction2str(MalBlkPtr mb, MalStkPtr stl, InstrPtr p, int
hidden);
mal_export str mal2str(MalBlkPtr mb, int first, int last);
-mal_export str function2str(MalBlkPtr mb);
mal_export void showMalBlkHistory(stream *out, MalBlkPtr mb);
#endif /* _MAL_LIST_H */
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -839,7 +839,7 @@ str RMTregisterInternal(Client cntxt, st
mod, fcn);
}
- qry = function2str(sym->def);
+ qry = mal2str(sym->def, 0, sym->def->stop);
#ifdef _DEBUG_REMOTE
mnstr_printf(cntxt->fdout, "#remote.register:%s:%s\n", c->name, qry);
#endif
diff --git a/monetdb5/optimizer/opt_coercion.c
b/monetdb5/optimizer/opt_coercion.c
--- a/monetdb5/optimizer/opt_coercion.c
+++ b/monetdb5/optimizer/opt_coercion.c
@@ -73,12 +73,18 @@ coercionOptimizerCalcStep(Client cntxt,
b = getColumnType(getVarType(mb, getArg(p,2)));
if ( a == r && coerce[getArg(p,1)].src && coerce[getArg(p,1)].fromtype
< r )
{
+#ifdef _DEBUG_COERCION_
+ mnstr_printf(cntxt->fdout,"#remove upcast on first argument
%d\n", getArg(p,1));
+#endif
varid = getArg(p,1);
getArg(p,1) = coerce[getArg(p,1)].src;
if ( chkInstruction(NULL, cntxt->nspace, mb, p))
p->argv[1] = varid;
}
if ( b == r && coerce[getArg(p,2)].src && coerce[getArg(p,2)].fromtype
< r )
+#ifdef _DEBUG_COERCION_
+ mnstr_printf(cntxt->fdout,"#remove upcast on second argument
%d\n", getArg(p,2));
+#endif
{
varid = getArg(p,2);
getArg(p,2) = coerce[getArg(p,2)].src;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list