Changeset: a95e3abd46dc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a95e3abd46dc
Modified Files:
monetdb5/mal/mal_parser.mx
Branch: Mar2011
Log Message:
Making address sanity check in parseCommandPattern() less strict:
Let parseCommandPattern() trigger a parse error in case the address is not found
only in case cntxt->nspace->isAtomModule, i.e., only when malAtomProperty()
needs to be called.
Other cases seems to be handled by the mal interpreter in
monetdb5/mal/mal_resolve.mx:findFunctionType(),
yielding a "object code missing" error message.
This make the following tests work, again, as they did before adding this
sanity check in the first place:
monetdb5/mal/Tests/tst102.mal
monetdb5/mal/Tests/tst104.mal
monetdb5/mal/Tests/tst105.mal
monetdb5/mal/Tests/tst105a.mal
monetdb5/mal/Tests/tst106.mal
monetdb5/mal/Tests/tst115.mal
monetdb5/mal/Tests/tst150.mal
monetdb5/mal/Tests/dynamicload.mal
diffs (24 lines):
diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -1330,13 +1330,14 @@
setModuleScope(curInstr,
findModule(cntxt->nspace,
putName(modnme,strlen(modnme))) );
curInstr->fcn = getAddress(cntxt->srcFile, modnme, nme,TRUE);
- if (curInstr->fcn == NULL) {
- parseError(cntxt, "<address> not found\n");
- return 0;
+ curBlk->binding = nme;
+ if( cntxt->nspace->isAtomModule) {
+ if (curInstr->fcn == NULL) {
+ parseError(cntxt, "<address> not found\n");
+ return 0;
+ }
+ malAtomProperty(curBlk, curInstr);
}
- curBlk->binding = nme;
- if( cntxt->nspace->isAtomModule)
- malAtomProperty(curBlk, curInstr);
skipSpace(cntxt);
} else {
parseError(cntxt,"'address' expected\n");
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list