コード例 #1
0
ファイル: rewrite.c プロジェクト: ABratovic/open-watcom-v2
pch_status PCHReadRewrites( void )
{
    SRCFILE srcfile;
    REWRITE *r;
    REWRITE_TOKENS *rt;
    cvinit_t data;

    CarveInitStart( carveREWRITE, &data );
    for( ; (r = PCHReadCVIndexElement( &data )) != NULL; ) {
        PCHReadVar( *r );
        r->list = RewriteTokensMapIndex( r->list );
        r->curr = RewriteTokensMapIndex( r->curr );
        r->stream = _TokenPosMapIndex( r );  // must be last
        r->srcfiles_refd = NULL;
        while( (srcfile = SrcFilePCHRead()) != NULL ) {
            newSrcFileHandle( r, srcfile );
        }
    }
    CarveInitStart( carveREWRITE_TOKENS, &data );
    for( ; (rt = PCHReadCVIndexElement( &data )) != NULL; ) {
        PCHReadVar( *rt );
        rt->next = RewriteTokensMapIndex( rt->next );
    }
    return( PCHCB_OK );
}
コード例 #2
0
pch_status PCHReadTokenLocns( void )
{
    SYM_TOKEN_LOCN *b;
    auto cvinit_t data;

    // DbgVerify( sizeof( uint_32 ) >= sizeof( void* ), "Bad assumption" );
    CarveInitStart( carveSYMBOL_LOCN, &data );
    for( ; (b = PCHReadCVIndexElement( &data )) != NULL; ) {
        PCHReadVar( *b );
        b->tl.src_file = SrcFileMapIndex( b->tl.src_file );
    }
    return( PCHCB_OK );
}
コード例 #3
0
pch_status PCHReadTypeSigs( void )
{
    TYPE_SIG *s;
    auto cvinit_t data;

    type_sigs = TypeSigPCHRead();
    CarveInitStart( carveTYPE_SIG, &data );
    for( ; (s = PCHReadCVIndexElement( &data )) != NULL; ) {
        PCHReadVar( *s );
        s->next = TypeSigMapIndex( s->next );
        s->base = TypeSigMapIndex( s->base );
        s->type = TypeMapIndex( s->type );
        s->sym = SymbolMapIndex( s->sym );
        s->dtor = SymbolMapIndex( s->dtor );
        s->default_ctor = SymbolMapIndex( s->default_ctor );
        s->copy_ctor = SymbolMapIndex( s->copy_ctor );
    }
    return( PCHCB_OK );
}
コード例 #4
0
ファイル: conpool.c プロジェクト: Azarien/open-watcom-v2
pch_status PCHReadConstantPool( void )
{
    unsigned len;
    POOL_CON *c;
    auto cvinit_t data;

    pool_float = ConstantPoolPCHRead();
    pool_int64 = ConstantPoolPCHRead();
    CarveInitStart( carvePOOL_CON, &data );
    for( ; (c = PCHReadCVIndexElement( &data )) != NULL; ) {
        PCHReadVar( *c );
        c->next = ConstantPoolMapIndex( c->next );
        if( c->flt ) {
            len = c->u.s.len;
            c->u.s.fp_constant = CPermAlloc( len );
            PCHRead( c->u.s.fp_constant, len );
        }
    }
    return( PCHCB_OK );
}