/* * The multiplexSimple is called by the MAL scenario. It bypasses * the optimizer infrastructure, to avoid excessive space allocation * and interpretation overhead. */ str OPTmultiplexSimple(Client cntxt) { MalBlkPtr mb= cntxt->curprg->def; int i, doit=0; InstrPtr p; if(mb) for( i=0; i<mb->stop; i++){ p= getInstrPtr(mb,i); if(getModuleId(p) == malRef && getFunctionId(p) == multiplexRef) doit++; } if( doit) { OPTmultiplexImplementation(cntxt, mb, 0, 0); chkTypes(cntxt->fdout, cntxt->nspace, mb,TRUE); if ( mb->errors == 0) { chkFlow(cntxt->fdout, mb); chkDeclarations(cntxt->fdout,mb); } } return 0; }
/* * The multiplexSimple is called by the MAL scenario. It bypasses * the optimizer infrastructure, to avoid excessive space allocation * and interpretation overhead. */ str OPTmultiplexSimple(Client cntxt, MalBlkPtr mb) { //MalBlkPtr mb= cntxt->curprg->def; int i, doit=0; InstrPtr p; str msg = MAL_SUCCEED; if(mb) for( i=0; i<mb->stop; i++){ p= getInstrPtr(mb,i); if(isMultiplex(p)) { p->typechk = TYPE_UNKNOWN; doit++; } } if( doit) { msg = OPTmultiplexImplementation(cntxt, mb, 0, 0); chkTypes(cntxt->usermodule, mb,TRUE); chkFlow(mb); chkDeclarations(mb); } return msg; }