static HB_LABEL_FUNC( hb_p_tryend ) { BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ]; LONG lOffset = HB_PCODE_MKINT24( pAddr ); ULONG ulNewPos = lPCodePos + lOffset; LONG lFinally = 0; if( lOffset != 4 && pFunc->pCode[ lPCodePos + 4 ] == HB_P_TRYRECOVER ) lFinally = HB_PCODE_MKINT24( &pFunc->pCode[ lPCodePos + 5 ] ); if( cargo->fSetSeqBegin || ( lOffset != 4 && lFinally == 0 ) ) cargo->pulLabels[ ulNewPos ]++; return 4; }
static HB_CODETRACE_FUNC( hb_p_jumpfar ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_SIZE nNewPos = nPCodePos + HB_PCODE_MKINT24( pAddr ); hb_compCodeTraceMark( cargo, nPCodePos, 4 ); return hb_compCodeTraceNextPos( cargo, nNewPos ); }
static HB_LABEL_FUNC( hb_p_jumpfar ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_SIZE nNewPos = nPCodePos + HB_PCODE_MKINT24( pAddr ); cargo->pnLabels[ nNewPos ]++; return 4; }
static HB_LABEL_FUNC( hb_p_jumpfar ) { BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ]; ULONG ulNewPos = lPCodePos + HB_PCODE_MKINT24( pAddr ); cargo->pulLabels[ ulNewPos ]++; return 4; }
static HB_LABEL_FUNC( hb_p_seqbegin ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_SIZE nRecoverPos = nPCodePos + HB_PCODE_MKINT24( pAddr ); if( cargo->fSetSeqBegin ) cargo->pnLabels[ nRecoverPos ]++; return 4; }
static HB_LABEL_FUNC( hb_p_tryrecover ) { BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ]; LONG lFinally = HB_PCODE_MKINT24( pAddr ); if( lFinally ) cargo->pulLabels[ lPCodePos + lFinally ]++; return 4; }
static HB_LABEL_FUNC( hb_p_trybegin ) { BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ]; ULONG ulRecoverPos = lPCodePos + HB_PCODE_MKINT24( pAddr ); if( cargo->fSetSeqBegin ) cargo->pulLabels[ ulRecoverPos ]++; return 4; }
static HB_CODETRACE_FUNC( hb_p_alwaysbegin ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_SIZE nAlwaysEndPos = nPCodePos + HB_PCODE_MKINT24( pAddr ); hb_compCodeTraceMark( cargo, nPCodePos, 4 ); hb_compCodeTraceAddJump( cargo, nAlwaysEndPos ); return hb_compCodeTraceNextPos( cargo, nPCodePos + 4 ); }
static HB_LABEL_FUNC( hb_p_seqend ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_ISIZ nOffset = HB_PCODE_MKINT24( pAddr ); HB_SIZE nNewPos = nPCodePos + nOffset; if( cargo->fSetSeqBegin || nOffset != 4 ) cargo->pnLabels[ nNewPos ]++; return 4; }
static HB_LABEL_FUNC( hb_p_seqend ) { BYTE * pAddr = &pFunc->pCode[ lPCodePos + 1 ]; LONG lOffset = HB_PCODE_MKINT24( pAddr ); ULONG ulNewPos = lPCodePos + lOffset; if( cargo->fSetSeqBegin || lOffset != 4 ) cargo->pulLabels[ ulNewPos ]++; return 4; }
static HB_CODETRACE_FUNC( hb_p_seqbegin ) { HB_BYTE * pAddr = &pFunc->pCode[ nPCodePos + 1 ]; HB_SIZE nRecoverPos = nPCodePos + HB_PCODE_MKINT24( pAddr ); /* this is a hack for -gc3 output - it's not really necessary * for pure PCODE evaluation */ if( pFunc->pCode[ nRecoverPos ] != HB_P_SEQEND && pFunc->pCode[ nRecoverPos - 4 ] == HB_P_SEQEND ) { hb_compCodeTraceAddJump( cargo, nRecoverPos - 4 ); } hb_compCodeTraceMark( cargo, nPCodePos, 4 ); hb_compCodeTraceAddJump( cargo, nRecoverPos ); return hb_compCodeTraceNextPos( cargo, nPCodePos + 4 ); }
static HB_CODETRACE_FUNC( hb_p_switch ) { HB_USHORT usCases = HB_PCODE_MKUSHORT( &pFunc->pCode[ nPCodePos + 1 ] ), us; HB_SIZE nStart = nPCodePos, nNewPos; nPCodePos += 3; for( us = 0; us < usCases; ++us ) { switch( pFunc->pCode[ nPCodePos ] ) { case HB_P_PUSHBYTE: nPCodePos += 2; break; case HB_P_PUSHINT: nPCodePos += 3; break; case HB_P_PUSHLONG: case HB_P_PUSHDATE: nPCodePos += 5; break; case HB_P_PUSHLONGLONG: nPCodePos += 9; break; case HB_P_PUSHSTRSHORT: nPCodePos += 2 + pFunc->pCode[ nPCodePos + 1 ]; break; case HB_P_PUSHSTR: nPCodePos += 3 + HB_PCODE_MKUSHORT( &pFunc->pCode[ nPCodePos + 1 ] ); break; case HB_P_PUSHSTRLARGE: nPCodePos += 4 + HB_PCODE_MKUINT24( &pFunc->pCode[ nPCodePos + 1 ] ); break; case HB_P_PUSHNIL: /* default clause */ us = usCases; nPCodePos++; break; } switch( pFunc->pCode[ nPCodePos ] ) { case HB_P_JUMPNEAR: nNewPos = nPCodePos + ( signed char ) pFunc->pCode[ nPCodePos + 1 ]; nPCodePos += 2; break; case HB_P_JUMP: nNewPos = nPCodePos + HB_PCODE_MKSHORT( &pFunc->pCode[ nPCodePos + 1 ] ); nPCodePos += 3; break; /*case HB_P_JUMPFAR:*/ default: nNewPos = nPCodePos + HB_PCODE_MKINT24( &pFunc->pCode[ nPCodePos + 1 ] ); nPCodePos += 4; break; } hb_compCodeTraceAddJump( cargo, nNewPos ); } hb_compCodeTraceMark( cargo, nStart, nPCodePos - nStart ); return hb_compCodeTraceNextPos( cargo, us > usCases ? cargo->nPCodeSize : nPCodePos ); }