Ejemplo n.º 1
0
void    STUnShadow( sym_id sym ) {
//================================

// Unshadow the specified symbol.

    sym_id      shadow;

    sym->ns.flags &= ~SY_SPECIAL_PARM;
    shadow = FindShadow( sym );
    shadow->ns.flags &= ~SY_SPECIAL_PARM;
    shadow->ns.si.ms.sym = NULL;
}
Ejemplo n.º 2
0
void    GetFunctionShadow( void ) {
//===========================

    sym_id      fn_shadow;

    // update type in function shadow symbol in case an
    // IMPLICIT statement changed the type of the function
    fn_shadow = FindShadow( CITNode->sym_ptr );
    fn_shadow->ns.typ = CITNode->sym_ptr->ns.typ;
    if( fn_shadow->ns.typ == FT_STRUCTURE ) {
        fn_shadow->ns.xt.record = CITNode->sym_ptr->ns.xt.record;
    } else {
        fn_shadow->ns.xt.size = CITNode->sym_ptr->ns.xt.size;
    }
    CITNode->sym_ptr = fn_shadow;
    CITNode->flags = fn_shadow->ns.flags;
}
Ejemplo n.º 3
0
sym_id  STName( char *name, int length ) {
//========================================

// Lookup the specified name in the symbol table.

    sym_id    sym;

    if( length > MAX_SYMLEN ) {
        length = MAX_SYMLEN;
    }
    sym = STNameSearch( name, length );
    if( sym == NULL ) {
        sym = STAdd( name, length );
        sym->ns.si.va.vi.ec_ext = NULL;
        sym->ns.u3.address = NULL;
        HashInsert( HashTable, HashValue, &NList, sym );
    } else if( ( ( sym->ns.flags & SY_CLASS ) == SY_VARIABLE ) &&
               ( sym->ns.flags & SY_SPECIAL_PARM ) ) {
        sym = FindShadow( sym ); // Shadowed variable
    }
    return( sym );
}