- Timestamp:
- May 4, 2008, 10:56:44 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h
r529 r550 73 73 { 74 74 } 75 Schedule( const ::UserProc *pUserProc, long offset )76 : type( Schedule::UserProc)75 Schedule( Schedule::Type type, const ::UserProc *pUserProc, long offset ) 76 : type( type ) 77 77 , offset( offset ) 78 78 , pUserProc( pUserProc ) … … 114 114 const ::UserProc &GetUserProc() const; 115 115 const ::CClass &GetClass() const; 116 117 void SpecifyAddressOf();118 void SpecifyCatchAddress();119 116 }; 120 117 typedef std::vector<Schedule> Schedules; -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Exception.cpp
r537 r550 227 227 pUserProc = UserProc::pGlobalProc; 228 228 } 229 compiler.GetObjectModule().dataTable.schedules.push_back( Schedule( pUserProc, dataTableOffset + pos ) ); 230 compiler.GetObjectModule().dataTable.schedules.back().SpecifyCatchAddress(); 229 compiler.GetObjectModule().dataTable.schedules.push_back( 230 Schedule( Schedule::CatchAddress, pUserProc, dataTableOffset + pos ) 231 ); 231 232 pos += sizeof(LONG_PTR); 232 233 } -
trunk/ab5.0/abdev/BasicCompiler_Common/src/NativeCode.cpp
r549 r550 19 19 _ASSERT( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ); 20 20 return *pClass; 21 }22 23 void Schedule::SpecifyAddressOf()24 {25 _ASSERT( type == Schedule::UserProc );26 type = Schedule::AddressOf;27 }28 void Schedule::SpecifyCatchAddress()29 {30 _ASSERT( type == Schedule::UserProc );31 type = Schedule::CatchAddress;32 21 } 33 22 … … 92 81 pUserProc->Using(); 93 82 94 Schedule schedule( pUserProc, GetSize() ); 95 if( isCall == false ) 96 { 97 schedule.SpecifyAddressOf(); 98 } 99 schedules.push_back( schedule ); 83 Schedule::Type type = isCall ? Schedule::UserProc : Schedule::AddressOf; 84 85 schedules.push_back( Schedule( type, pUserProc, GetSize() ) ); 100 86 101 87 Put( (long)0 ); … … 106 92 pUserProc->Using(); 107 93 108 Schedule schedule( pUserProc, GetSize() ); 109 schedule.SpecifyCatchAddress(); 110 schedules.push_back( schedule ); 94 schedules.push_back( Schedule( Schedule::CatchAddress, pUserProc, GetSize() ) ); 111 95 112 96 Put( codePos );
Note:
See TracChangeset
for help on using the changeset viewer.