示例#1
0
sym_id        STFreeName( sym_id sym_ptr ) {
//==========================================

// Free a symbol name.

    if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_COMMON ) {
        sym_ptr = FreeLink( (void **)sym_ptr );
    } else {
        if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_VARIABLE ) {
            if( sym_ptr->u.ns.flags & SY_SUBSCRIPTED ) {
                if( sym_ptr->u.ns.si.va.u.dim_ext != NULL ) {
                    FMemFree( sym_ptr->u.ns.si.va.u.dim_ext );
                }
            }
            if( sym_ptr->u.ns.flags & SY_IN_EC ) {
                if( sym_ptr->u.ns.si.va.vi.ec_ext != NULL ) {
                    FMemFree( sym_ptr->u.ns.si.va.vi.ec_ext );
                }
            }
        } else if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_SUBPROGRAM ) {
            if( ( sym_ptr->u.ns.flags & SY_SUBPROG_TYPE ) == SY_STMT_FUNC ) {
                FreeSFHeader( sym_ptr );
            }
        }
        sym_ptr = STFree( sym_ptr );
    }
    return( sym_ptr );
}
示例#2
0
static  sym_id    STFreeMSTE( sym_id sym_ptr ) {
//==============================================

// Free a "magic" symbol table entry.

    sym_ptr = STFree( sym_ptr );
    return( sym_ptr );
}
示例#3
0
static  void    FreeList( sym_id sym_ptr ) {
//==========================================

// Free a symbol table (CList, LList or SList ).

    while( sym_ptr != NULL ) {
        sym_ptr = STFree( sym_ptr );
    }
}
示例#4
0
void    FreeRtRtns( void ) {
//====================

// Free symbol table entries for run-time routines.

    int         rt_index;
    sym_id      sym;

    rt_index = 0;
    while( rt_index <= MAX_RT_INDEX ) {
        sym = RtnTab[ rt_index ].sym_ptr;
        if( sym != NULL ) {
            if( ( CGFlags & CG_FATAL ) == 0 ) {
                if( sym->u.ns.u3.address != NULL ) {
                    BEFreeBack( sym->u.ns.u3.address );
                }
            }
            STFree( sym );
            RtnTab[ rt_index ].sym_ptr = NULL;
        }
        rt_index++;
    }
}
示例#5
0
void    FreeInlinePragmas( void ) {
//===========================

// Free symbol table entries for run-time routines.

#if _CPU == 386 || _CPU == 8086
    int         index;
    sym_id      sym;

    if( !CreatedPragmas ) return;
    for( index = 0; index < MAX_IN_INDEX; index++ ) {
        sym = InlineTab[ index ].sym_ptr;
        if( sym != NULL ) {
            if( ( CGFlags & CG_FATAL ) == 0 ) {
                if( sym->u.ns.u3.address != NULL ) {
                    BEFreeBack( sym->u.ns.u3.address );
                }
            }
            STFree( sym );
            InlineTab[ index ].sym_ptr = NULL;
        }
    }
#endif
}