コード例 #1
0
ファイル: parser.c プロジェクト: markcheno/topaz
Int32 parse(Pointer prog,Int32 size)
{
	break_num=0;
	setlocal_num=0;
	return_num=0;
	in_class=FALSE;
	in_method=FALSE;
	cur_scope=SYM_PUBLIC;
	local_num=0;
	global_num=0;
	base_class=NULL;
	super_class=NULL;
	new_class=NULL;
	compile_error=FALSE;
	ScnInit(prog,size);
	if( Token==tERROR || Token==tEOF )
    {
        compileError("EOF detected");
    }
    else
    {
        compile_error=FALSE;
	    SymInit();
    	Program();
        SymFree();
    }

    return compile_error;
}
コード例 #2
0
ファイル: segment.c プロジェクト: tonylazarew/jwasm
void FreeLnameQueue( void )
/*************************/
{
    struct asym  *sym;
    struct qnode *curr;
    struct qnode *next;

    DebugMsg(("FreeLnameQueue enter\n" ));
    for( curr = ModuleInfo.g.LnameQueue.head; curr; curr = next ) {
        next = curr->next;
        sym = (struct asym *)curr->elmt;
        /* the class name symbols are not part of the
         * symbol table and hence must be freed now.
         */
        if( sym->state == SYM_CLASS_LNAME ) {
            SymFree( sym );
        }
        LclFree( curr );
    }
}
コード例 #3
0
void ShutDown(void)
{
  clock_t tim;
  double  rtmp;
  
  rtmp=fabs(sdat->pobj-sdat->dobj)/(1.0+fabs(sdat->dobj));
  if (rtmp>sdat->par.tolgap) {
    tim=GetTime()-stim[START];
  
#ifdef PCMACHINE
    printf(" time=%.2f\n\n",(double)tim/CLOCKS_PER_SEC);
#else
    printf(" time=%.2f\n\n",(double)0.01*tim);
#endif

    fclose(fout);
  }

  dFree(&sdat->y);
  dFree(&sdat->dy);
  dFree(&sdat->s);
  dFree(&sdat->sinv);

  SmtFree(&sdat->c);
  SymFree(&sdat->cy);
  SyoFree(&sdat->st);
  
  if (sdat->mf)
	sdat->mf->uval=NULL;
  CfcFree(&sdat->mf);
  CfcFree(&sdat->sf);
  
  dPtFree(&sdat->u);
  dPtFree(&sdat->v);
  
  iFree(&sdat->iw);
  dFree(&sdat->rw);
  
} /* ShutDown */