Changeset: 8f6bf632e70e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f6bf632e70e Modified Files: monetdb5/mal/mal_interpreter.mx monetdb5/mal/mal_linker.mx Branch: default Log Message:
Merge with Mar2011 branch. diffs (76 lines): diff --git a/monetdb5/mal/Tests/tst606.stable.out b/monetdb5/mal/Tests/tst606.stable.out --- a/monetdb5/mal/Tests/tst606.stable.out +++ b/monetdb5/mal/Tests/tst606.stable.out @@ -59,6 +59,13 @@ BoxException := "releasing a constant is forbidden"; raise BoxException; end release; +!SyntaxException:parseError:address space_deposit; +!SyntaxException:parseError: ^<address> not found +!SyntaxException:parseError: +!<identifier> expected +function constants.deposit(v:any_1,name:str):void; + ; +end deposit; # 08:01:25 > # 08:01:25 > Done. diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx --- a/monetdb5/mal/mal_interpreter.mx +++ b/monetdb5/mal/mal_interpreter.mx @@ -2027,6 +2027,7 @@ { @:safeTarget(@1)@ /* improve performance with 20 ms/1M calls*/ + assert(pci->fcn != NULL); switch(pci->argc){ case 0 : ret = (str) (*pci->fcn)(); break; case 1 : ret = (str) (*pci->fcn)( diff --git a/monetdb5/mal/mal_module.mx b/monetdb5/mal/mal_module.mx --- a/monetdb5/mal/mal_module.mx +++ b/monetdb5/mal/mal_module.mx @@ -244,6 +244,7 @@ if (pci && pci->token == COMMANDsymbol && pci->argc == 1) { int ret = 0; + assert(pci->fcn != NULL); (*pci->fcn)(&ret); (void)ret; } 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,14 +1330,18 @@ setModuleScope(curInstr, findModule(cntxt->nspace, putName(modnme,strlen(modnme))) ); curInstr->fcn = getAddress(cntxt->srcFile, modnme, nme,TRUE); - if (curInstr->fcn == NULL) - return (MalBlkPtr) parseError(cntxt, "<address> not found\n"); curBlk->binding = nme; - if( cntxt->nspace->isAtomModule) + if( cntxt->nspace->isAtomModule) { + if (curInstr->fcn == NULL) { + parseError(cntxt, "<address> not found\n"); + return 0; + } malAtomProperty(curBlk, curInstr); + } skipSpace(cntxt); } else { - return (MalBlkPtr) parseError(cntxt,"'address' expected\n"); + parseError(cntxt,"'address' expected\n"); + return 0; } @:helpInfo(curBlk->help)@ showErrors(cntxt); @@ -1369,6 +1373,10 @@ nme = idCopy(cntxt,i); curInstr->fcn = getAddress(cntxt->srcFile, cntxt->nspace->name, nme,TRUE); GDKfree(nme); + if (curInstr->fcn == NULL) { + parseError(cntxt, "<address> not found\n"); + return 0; + } skipSpace(cntxt); } /* block is terminated at the END statement */ _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list