Changeset 357 in dev for trunk/abdev/BasicCompiler32


Ignore:
Timestamp:
Nov 5, 2007, 3:26:20 AM (17 years ago)
Author:
dai_9181
Message:

例外処理機構実装中...

Location:
trunk/abdev/BasicCompiler32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/Compile_Func.cpp

    r350 r357  
    1818    if( lstrcmpi( FuncName, "__delegate_dynamicmethod_call" ) == 0 )    return FUNC_DELEGATE_DYNAMICMETHOD_CALL;
    1919    if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 )     return FUNC_DELEGATE_STATICMETHOD_CALL;
     20    if( lstrcmpi( FuncName, "_System_GetNowScopeCatchAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS;
     21    if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 )    return FUNC_SYSTEM_GET_BP;
    2022    if( lstrcmpi( FuncName, "GetDouble" ) == 0 )        return FUNC_GETDOUBLE;
    2123    if( lstrcmpi( FuncName, "GetSingle" ) == 0 )        return FUNC_GETSINGLE;
     
    575577    resultType = UserProc::CompilingUserProc().ReturnType();
    576578}
     579void Opcode_Func_System_Get_Bp()
     580{
     581    //mov eax,ebp
     582    compiler.codeGenerator.op_mov_RR(REG_EAX,REG_EBP);
     583}
    577584
    578585void Opcode_Func_GetPtrData(const char *Parameter,const int type){
     
    670677            Opcode_Func_delegate_call( Parameter, resultType, false, isCallOn );
    671678            break;
     679        case FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS:
     680            if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeCatchAddress();
     681            resultType.SetBasicType( DEF_LONG );
     682            break;
     683        case FUNC_SYSTEM_GET_BP:
     684            if( isCallOn ) Opcode_Func_System_Get_Bp();
     685            resultType.SetBasicType( DEF_LONG );
     686            break;
    672687
    673688        case FUNC_GETDOUBLE:
  • trunk/abdev/BasicCompiler32/FunctionValue.h

    r325 r357  
    1717#define FUNC_DELEGATE_DYNAMICMETHOD_CALL    0x0621
    1818#define FUNC_DELEGATE_STATICMETHOD_CALL     0x0622
     19#define FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS 0x0623
     20#define FUNC_SYSTEM_GET_BP  0x0624
    1921
    2022//ポインタ
  • trunk/abdev/BasicCompiler32/MakePeHdr.cpp

    r355 r357  
    10791079    compiler.linker.SetImageBase( ImageBase );
    10801080    compiler.linker.ResolveDataTableSchedules( MemPos_DataSection );
     1081    compiler.linker.ResolveCatchAddressSchedules( MemPos_CodeSection );
    10811082    compiler.linker.ResolveDllProcSchedules( MemPos_CodeSection, MemPos_ImportSection, LookupSize, HintSize );
    10821083    compiler.linker.ResolveUserProcSchedules( MemPos_CodeSection );
  • trunk/abdev/BasicCompiler32/x86CodeGenerator.cpp

    r287 r357  
    175175    return pPertialSchedule;
    176176}
    177 void CodeGenerator::op_mov_RV(int reg,long offset, Schedule::Type scheduleType ){
     177const PertialSchedule *CodeGenerator::op_mov_RV(int reg,long offset, Schedule::Type scheduleType, bool isPertialSchedule ){
    178178    //mov reg,value
    179179
     
    182182
    183183    //DISP32
     184    const PertialSchedule *pPertialSchedule = NULL;
     185    if( isPertialSchedule )
     186    {
     187        pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
     188        pPertialSchedule = pertialSchedules.back();
     189    }
    184190    pNativeCode->PutEx( offset, scheduleType );
     191
     192    return pPertialSchedule;
    185193}
    186194void CodeGenerator::op_mov_RR(int reg1,int reg2){
Note: See TracChangeset for help on using the changeset viewer.