Exemple #1
0
void hb_compFixFuncPCode( HB_COMP_DECL, PHB_HFUNC pFunc )
{
   const PHB_FIX_FUNC * pFuncTable = s_fixlocals_table;
   HB_FIX_INFO fix_info;

   fix_info.HB_COMP_PARAM = HB_COMP_PARAM;

   assert( HB_P_LAST_PCODE == sizeof( s_fixlocals_table ) / sizeof( PHB_FIX_FUNC ) );

   hb_compPCodeEval( pFunc, ( const PHB_PCODE_FUNC * ) pFuncTable, ( void * ) &fix_info );
}
Exemple #2
0
void hb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info )
{
   ULONG ulLabel = 0, ul;

   assert( HB_P_LAST_PCODE == sizeof( s_GenLabelFuncTable ) / sizeof( PHB_LABEL_FUNC ) );

   hb_compPCodeEval( pFunc, ( HB_PCODE_FUNC_PTR * ) s_GenLabelFuncTable, ( void * ) label_info );

   for( ul = 0; ul < pFunc->lPCodePos; ++ul )
   {
      if( label_info->pulLabels[ ul ] )
      {
         label_info->pulLabels[ ul ] = ++ulLabel;
      }
   }
}
Exemple #3
0
void hb_compGenLabelTable( PFUNCTION pFunc, PHB_LABEL_INFO label_info )
{
    const PHB_LABEL_FUNC * pFuncTable = s_GenLabelFuncTable;
    HB_SIZE nLabel = 0, n;

    assert( HB_P_LAST_PCODE == sizeof( s_GenLabelFuncTable ) / sizeof( PHB_LABEL_FUNC ) );

    hb_compPCodeEval( pFunc, ( const HB_PCODE_FUNC_PTR * ) pFuncTable, ( void * ) label_info );

    for( n = 0; n < pFunc->nPCodePos; ++n )
    {
        if( label_info->pnLabels[ n ] )
        {
            label_info->pnLabels[ n ] = ++nLabel;
        }
    }
}