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

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

Location:
trunk/abdev/BasicCompiler_Common/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Binary.h

    r288 r357  
    122122        *(long *)( buffer + pos ) = newLongValue;
    123123    }
     124    void Overwrite( int pos, _int64 newInt64Value )
     125    {
     126        *(_int64 *)( buffer + pos ) = newInt64Value;
     127    }
    124128
    125129    void Put( const char *buffer, int size )
  • trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h

    r317 r357  
    263263    void CheckUnresolveSchedule();
    264264
    265     void opfix( const PertialSchedule *pPertialSchedule, long newValue );
     265    void opfix( const PertialSchedule *pPertialSchedule, _int64 newValue );
    266266    void opfix_offset( const PertialSchedule *pPertialSchedule, long offset );
    267267    void opfix_JmpPertialSchedule( const PertialSchedule *pPertialSchedule );
     
    300300    const PertialSchedule *__op_format(int op_size,char op_prefix,char opcode1,char opcode2,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
    301301public:
    302     void op_mov_RV                  (int op_size,int reg,long i32data, Schedule::Type scheduleType = Schedule::None );
    303     void op_mov_RV64                (int reg,_int64 i64data);
     302    const PertialSchedule *op_mov_RV        (int op_size,int reg,long i32data, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
     303    const PertialSchedule *op_mov_RV64      ( int reg, _int64 i64data, bool isPertialSchedule = false );
    304304    const PertialSchedule *op_mov_RM        (int op_size,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
    305305    const PertialSchedule *op_mov_RM_ex     (int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
     
    381381public:
    382382    const PertialSchedule *op_mov_MV        ( int op_size, int base_reg, long offset, Schedule::Type offsetScheduleType, bool isPertialSchedule, long value, Schedule::Type valueScheduleType = Schedule::None );
    383     void op_mov_RV                          ( int reg,long offset, Schedule::Type scheduleType = Schedule::None );
     383    const PertialSchedule *op_mov_RV        ( int reg, long offset, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
    384384    void op_mov_RR                          ( int reg1,int reg2);
    385385    const PertialSchedule *op_mov_RM        ( int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType = Schedule::None, bool isPertialSchedule = false );
  • trunk/abdev/BasicCompiler_Common/include/Compiler.h

    r322 r357  
    99#include <Linker.h>
    1010#include <Delegate.h>
     11#include <Exception.h>
    1112
    1213class Compiler
  • trunk/abdev/BasicCompiler_Common/include/Exception.h

    r124 r357  
    99    void ThrowCommand( const char *Parameter );
    1010
     11    void Opcode_Func_System_GetNowScopeCatchAddress();
     12
    1113}
  • trunk/abdev/BasicCompiler_Common/include/Linker.h

    r355 r357  
    3131    void ResolveDataTableSchedules( long dataSectionBaseOffset );
    3232
     33    // Catchアドレス スケジュール
     34    void ResolveCatchAddressSchedules( long codeSectionBaseOffset );
     35
    3336    // DLL関数スケジュール
    3437    void ResolveDllProcSchedules( long codeSectionBaseOffset, long importSectionBaseOffset, long lookupSize, long hintSize );
  • trunk/abdev/BasicCompiler_Common/include/NativeCode.h

    r355 r357  
    1919        GlobalVar,      // グローバル変数スケジュール
    2020        DataTable,      // データテーブル スケジュール
     21        CatchAddress,   // Catchアドレス スケジュール
    2122        Relocation,     // リロケーション情報スケジュール
    2223        UserProc,       // ユーザ定義関数呼び出し側スケジュール
     
    5253        case UserProc:
    5354        case AddressOf:
     55        case CatchAddress:
    5456            ar & boost::serialization::make_nvp("pUserProc", const_cast<::UserProc *&>(pUserProc));
    5557            break;
     
    127129    const ::UserProc &GetUserProc() const
    128130    {
    129         if( !( type == Schedule::UserProc || type == Schedule::AddressOf ) )
     131        if( !( type == Schedule::UserProc || type == Schedule::AddressOf || type == Schedule::CatchAddress ) )
    130132        {
    131133            SetError();
     
    149151        }
    150152        type = Schedule::AddressOf;
     153    }
     154    void SpecifyCatchAddress()
     155    {
     156        if( type != Schedule::UserProc )
     157        {
     158            SetError();
     159        }
     160        type = Schedule::CatchAddress;
    151161    }
    152162};
     
    279289
    280290    void PutEx( const NativeCode &nativeCode );
    281     void PutEx( long l, Schedule::Type scheduleType )
    282     {
    283         if( scheduleType != Schedule::None )
    284         {
    285             schedules.push_back( Schedule( scheduleType, GetSize() ) );
    286         }
    287 
    288         Put( l );
    289     }
     291    void PutEx( long l, Schedule::Type scheduleType );
    290292    void PutUserProcSchedule( const UserProc *pUserProc, bool isCall );
     293    void PutCatchAddressSchedule( const UserProc *pUserProc, long codePos );
    291294    void PutDllProcSchedule( const DllProc *pDllProc );
    292295    void PutVtblSchedule( const CClass *pClass );
Note: See TracChangeset for help on using the changeset viewer.