Changeset: a11b17b29b53 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a11b17b29b53
Modified Files:
MonetDB5/src/mal/mal_interpreter.mx
MonetDB5/src/mal/mal_resolve.mx
Branch: default
Log Message:
Merged from Oct2010
diffs (130 lines):
diff -r 262d0131a1af -r a11b17b29b53 MonetDB5/src/mal/mal_interpreter.mx
--- a/MonetDB5/src/mal/mal_interpreter.mx Wed Oct 27 17:20:22 2010 +0200
+++ b/MonetDB5/src/mal/mal_interpreter.mx Thu Oct 28 10:48:54 2010 +0200
@@ -536,7 +536,8 @@
#ifdef HAVE_SYS_RESOURCE_H
getrusage(RUSAGE_SELF, &oldResource);
#endif
- oldMemory= MT_mallinfo();
+ if (cntxt->flags & memoryFlag)
+ oldMemory= MT_mallinfo();
}
}
@@ -966,7 +967,7 @@
int startpc = flow->start;
InstrPtr pci;
lng oldtimer=0;
- struct Mallinfo oldMemory = MT_mallinfo();
+ struct Mallinfo oldMemory;
MT_Lock *lock = &flow->done->l;
int tid = t->id, prevpc= 0;
lng argclaim,retclaim,hotclaim;
@@ -978,6 +979,10 @@
#endif
@:performanceVariables@
+ if (cntxt->flags & memoryFlag)
+ oldMemory = MT_mallinfo();
+ else
+ oldMemory.arena = 0;
if (stk == NULL || stkpc < 0)
throw(MAL, "mal.interpreter", MAL_STACK_FAIL);
@@ -1008,7 +1013,8 @@
#ifdef HAVE_SYS_RESOURCE_H
getrusage(RUSAGE_SELF, &oldResource);
#endif
- oldMemory = MT_mallinfo();
+ if (cntxt->flags & memoryFlag)
+ oldMemory = MT_mallinfo();
}
}
diff -r 262d0131a1af -r a11b17b29b53 MonetDB5/src/mal/mal_resolve.mx
--- a/MonetDB5/src/mal/mal_resolve.mx Wed Oct 27 17:20:22 2010 +0200
+++ b/MonetDB5/src/mal/mal_resolve.mx Thu Oct 28 10:48:54 2010 +0200
@@ -440,49 +440,51 @@
}
}
@-
-We found the proper function. Copy some properties. In particuler,
+We found the proper function. Copy some properties. In particular,
determine the calling strategy, i.e. FCNcall, CMDcall, FACcall, PATcall
Beware that polymorphic functions may produce type-incorrect clones.
This piece of code may be shared by the separate binder
@= bindFunction
- if (s->def->errors){
- p->typechk= TYPE_UNKNOWN;
+ if (s->def->errors) {
+ p->typechk = TYPE_UNKNOWN;
mb->errors++;
return -3;
}
- if( p->token == ASSIGNsymbol){
- switch(getSignature(s)->token){
- case COMMANDsymbol:
- p->token = CMDcall;
- p->fcn = getSignature(s)->fcn; /* C implementation
mandatory */
- if( p->fcn == 0) {
- showScriptException( mb, getPC(mb,p), TYPE,
"Object code missing");
- p->typechk= TYPE_UNKNOWN;
+ if (p->token == ASSIGNsymbol) {
+ switch (getSignature(s)->token) {
+ case COMMANDsymbol:
+ p->token = CMDcall;
+ p->fcn = getSignature(s)->fcn; /* C
implementation mandatory */
+ if (p->fcn == NULL) {
+ showScriptException(mb, getPC(mb, p),
TYPE,
+ "object code for
command %s.%s missing",
+ p->modname, p->fcnname);
+ p->typechk = TYPE_UNKNOWN;
+ mb->errors++;
+ return -3;
+ }
+ break;
+ case PATTERNsymbol:
+ p->token = PATcall;
+ p->fcn = getSignature(s)->fcn; /* C
implementation optional */
+ break;
+ case FACTORYsymbol:
+ p->token = FACcall;
+ p->fcn = getSignature(s)->fcn; /* C
implementation optional */
+ break;
+ case FUNCTIONsymbol:
+ p->token = FCNcall;
+ if (getSignature(s)->fcn)
+ p->fcn = getSignature(s)->fcn; /* C
implementation optional */
+ break;
+ default: {
+ if (!silent)
+ showScriptException(mb, getPC(mb, p),
MAL,
+ "MALresolve: unexpected
token type");
mb->errors++;
return -3;
}
- break;
- case PATTERNsymbol:
- p->token = PATcall;
- p->fcn = getSignature(s)->fcn; /* C implementation
optional */
- break;
- case FACTORYsymbol:
- p->token = FACcall;
- p->fcn = getSignature(s)->fcn; /* C implementation
optional */
- break;
- case FUNCTIONsymbol:
- p->token = FCNcall;
- if( getSignature(s)->fcn)
- p->fcn = getSignature(s)->fcn; /* C
implementation optional */
- break;
- default: {
- if (!silent)
- showScriptException(mb, getPC(mb, p), MAL,
- "MALresolve: unexpected token type");
- mb->errors++;
- return -3;
}
- } /* retarded indenting */
p->blk = s->def;
}
@-
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list