Example #1
0
static void callBackFini(       // COMPLETE CALL-BACK
    COND_STK* cond )            // - entry to be completed
{
    patchMask( cond->handle_set, cond->mask_set );
    patchMask( cond->handle_clr, cond->mask_clr );
    CarveFree( carveInfo, cond );
}
Example #2
0
static void freeBuffer(         // FREE A BUFFER
    BUF_ALLOC* ba )             // - allocated buffer
{
    CMemFree( ba->buffer );
    RingPrune( &buffers, ba );
    CarveFree( carve_buf, ba );
}
Example #3
0
static void popTC_DATA( TC_DATA **h )
{
    TC_DATA *e;

    e = *h;
    *h = e->next;
    CarveFree( carveTC_DATA, e );
}
Example #4
0
static void patchSE(            // PATCH STATE ENTRY'S VALUE
    patch_entry* pe )           // - patch entry
{
    STATE_VAR state_var = SeStateOptimal( pe->se );
    FstabMarkedPosnSet( pe->se );
    BEPatchInteger( pe->patch, state_var );
    BEFiniPatch( pe->patch );
    CarveFree( carve_patch_se, pe );
}
Example #5
0
void RtnGenerate( void )
/**********************/
{
    RTN_GEN *c;
    bool keep_going = true;

    SetCurrScope( GetFileScope() );
    while( keep_going ) {
        keep_going = false;

        CtxSetCurrContext( CTX_FUNC_GEN );
        keep_going = ClassDefineRefdDefaults();

        ScopeEmitIndexMappings();

        while( useSYMBOL != NULL ) {
            c = useSYMBOL;
            useSYMBOL = c->next;
            keep_going = true;
            (*execSYMBOL[c->index])( c->parm );
            CarveFree( carveRTN_GEN, c );
        }
        while( useTYPE != NULL ) {
            c = useTYPE;
            useTYPE = c->next;
            keep_going = true;
            (*execTYPE[c->index])( c->parm );
            CarveFree( carveRTN_GEN, c );
        }
        CtxSetCurrContext( CTX_SOURCE );

        keep_going = TemplateProcessInstantiations() || keep_going;
        SetCurrScope( GetFileScope() );
    }

    TemplateFreeDefns();
}
Example #6
0
static void callBackCtorFlag(   // CALL-BACK FOR CTOR-FLAG AFTER CTORING
    void* data )                // - patch entry
{
    CTOR_FLAG_SET* cfs = data;  // - patch entry

    if( ctorTestReqd( FstabActualPosn(), cfs->se ) ) {
        FN_CTL* fctl = FnCtlTop();
        unsigned mask = 1 << ( FnCtlCondFlagCtor( fctl ) & 7 );
        BEPatchInteger( cfs->ph_clr, 255 - mask );
    } else {
        BEPatchInteger( cfs->ph_clr, -1 );
    }
    BEFiniPatch( cfs->ph_clr );
    CarveFree( carve_ctor_flag, cfs );
}
Example #7
0
void RewriteFree( REWRITE *r )
/****************************/
{
    REWRITE_TOKENS *free_rt;
    REWRITE_TOKENS *rt;
    SRCFILE_HANDLE *h;
    SRCFILE_HANDLE *next_h;

    if( r == NULL ) {
        return;
    }
    if( ! r->alternate ) {
        for( rt = r->list; rt != NULL; ) {
            free_rt = rt;
            rt = rt->next;
            CarveFree( carveREWRITE_TOKENS, free_rt );
        }
        for( h = r->srcfiles_refd; h != NULL; h = next_h ) {
            next_h = h->next;
            CarveFree( carveSRCFILE_HANDLE, h );
        }
    }
    CarveFree( carveREWRITE, r );
}
Example #8
0
void LinkagePop( void )
/*********************/
{
    LINKAGE_STACK top;

    if( nestedLinkages != NULL ) {
        top = nestedLinkages;
        nestedLinkages = top->prev;
        if( nestedLinkages != NULL ) {
            CurrLinkage = nestedLinkages->linkage;
        } else {
            CurrLinkage = NULL;
        }
        CarveFree( carveSTACK, top );
    }
}
Example #9
0
static void setTempDone(        // CALL BACK: SET END OF TEMP CTORING
    void* data )                // - state entry
{
    temp_entry* te = (temp_entry*)data;

//  FstabSetSvSe( te->start );
    FstabAdd( te->se );
    FstabMarkedPosnSet( te->se );
    if( te->patch != NULL ) {
        STATE_VAR state_var = SeStateOptimal( te->se );
        BEPatchInteger( te->patch, state_var );
        BEFiniPatch( te->patch );
    }
    BlkPosnTempBegSet( te->se );
    CarveFree( carve_temp_entry, te );
}
Example #10
0
static void deQueue             // TAKE (FIFO) INSTRUCTION FROM QUEUE
    ( void )
{
    PP_INS* ins;                // - queued instruction

    ins = ins_queue->next;
    DbgVerify( NULL != ins, "Empty instruction queue" );
    RingPrune( &ins_queue, ins );
    IfDbgToggle( browse ) {
        DbgStmt( printf( "dequeued %s %x\n   "
                       , DbgIcOpcode( ins->opcode )
                       , ins->parm ) );
        DbgStmt( DbgDumpTokenLocn( &ins->locn ) );
        DbgStmt( printf( "\n" ) );
    }
    writeIns( ins->opcode, ins->parm, &ins->locn );
    CarveFree( carvePpIns, ins );
}
Example #11
0
static void processCdtor(       // PROCESS A CDTOR ENTRY IF POSSIBLE
    call_handle handle,         // - handle for call
    boolean direct )            // - TRUE ==> direct call
{
    cdtor_entry* curr;          // - current entry
    cdtor_entry* prev;          // - previous entry

    prev = NULL;
    RingIterBeg( ring_cdtors, curr ) {
        if( curr->handle == handle ) {
            if( direct ) {
                CallStabCdArgSet( handle, curr->value );
            }
            RingPruneWithPrev( &ring_cdtors, curr, prev );
            CarveFree( carver_cdtors, curr );
            break;
        }
        prev = curr;
    } RingIterEnd( curr );
}
Example #12
0
static void cgrfFreeEdge(       // ALLOCATE AN EDGE
    CALLGRAPH *ctl,             // - control information
    CALLEDGE *edge )            // - edge to be freed
{
    CarveFree( ctl->carve_edges, edge );
}
Example #13
0
static void cgrfFreeNode(       // FREE A NODE
    CALLGRAPH *ctl,             // - control information
    CALLNODE *node )            // - node to be freed
{
    CarveFree( ctl->carve_nodes, node );
}
Example #14
0
void FreeSegData( void * sdata )
/*************************************/
/* put a segdata on the list of free segdatas */
{
    CarveFree( CarveSegData, sdata );
}
Example #15
0
void FreeModEntry( mod_entry *mod )
/****************************************/
{
    CarveFree( CarveModEntry, mod );
}
Example #16
0
static void FreeSymbol( symbol *sym )
/***********************************/
{
    WipeSym( sym );
    CarveFree( CarveSymbol, sym );
}
Example #17
0
void SymbolLocnFree(            // FREE A SYM_TOKEN_LOCN
    SYM_TOKEN_LOCN* loc )       // - the entry
{
    CarveFree( carveSYMBOL_LOCN, loc );
}