void FieldOp( TYPE typ1, TYPE typ2, OPTR op ) { //================================================ // Generate code for a field selection operator. typ1 = typ1; op = op; PushOpn( CITNode->link ); PushOpn( CITNode ); if( CITNode->opn.us & USOPN_FLD ) { // sub-field reference EmitOp( FC_ADD ); DumpTypes( FT_INTEGER, TypeSize( FT_INTEGER ), FT_INTEGER, TypeSize( FT_INTEGER ) ); } else { EmitOp( FC_FIELD_OP ); OutPtr( CITNode->sym_ptr ); if( ( StmtSw & SS_DATA_INIT ) == 0 ) { if( typ2 == FT_CHAR ) { if( ( CITNode->link->opn.us & USOPN_WHAT ) != USOPN_ARR ) { if( ( ( CITNode->link->opn.us & USOPN_WHAT ) != USOPN_NWL ) && ( ( CITNode->link->opn.us & USOPN_WHAT ) != USOPN_ASS ) ) { GFieldSCB( CITNode->link->size ); } EmitOp( FC_MAKE_SCB ); OutPtr( GTempString( 0 ) ); } } } else { OutPtr( CITNode->link->sym_ptr ); } } }
static void GCnvTo( TYPE typ, uint size ) { //============================================= // Convert operand. EmitOp( FC_CONVERT ); DumpTypes( CITNode->typ, CITNode->size, typ, size ); CITNode->typ = typ; CITNode->size = size; }
static void ProcessPdbFile(const char *fileNameA) { HRESULT hr; IDiaDataSource * dia = NULL; IDiaSession * session = NULL; str::Str<char> report; dia = LoadDia(); if (!dia) return; ScopedMem<WCHAR> fileName(str::conv::FromAnsi(fileNameA)); hr = dia->loadDataForExe(fileName, 0, 0); if (FAILED(hr)) { logf(" failed to load %s or its debug symbols from .pdb file\n", fileNameA); goto Exit; } hr = dia->openSession(&session); if (FAILED(hr)) { log(" failed to open DIA session\n"); goto Exit; } if (g_dumpTypes) DumpTypes(session); if (g_dumpSections) DumpSections(session); if (g_dumpSymbols) DumpSymbols(session); fputs("Format: 1\n", stdout); if (g_compact) { str::Str<char> res; GetInternedStringsReport(res); fputs(res.Get(), stdout); } fputs(g_report.Get(), stdout); Exit: UnkReleaseSafe(session); }
static void Unary( TYPE typ, OPTR opr ) { //======================================= // Generate code for unary plus or unary minus. PushOpn( CITNode->link ); if( opr == OPTR_SUB ) { // unary minus if( TypeCmplx( typ ) ) { EmitOp( FC_CUMINUS ); } else { EmitOp( FC_UMINUS ); } GenType( CITNode->link ); } else if( ( _IsTypeInteger( CITNode->link->typ ) ) && ( CITNode->link->size < sizeof( intstar4 ) ) ) { // convert INTEGER*1 or INTEGER*2 to INTEGER*4 EmitOp( FC_CONVERT ); DumpTypes( CITNode->link->typ, CITNode->link->size, FT_INTEGER, sizeof( intstar4 ) ); } SetOpn( CITNode, USOPN_SAFE ); }
void InotifyEvent::DumpTypes(std::string& rStr) const { DumpTypes(m_uMask, rStr); }