Ignore:
Timestamp:
May 10, 2008, 3:09:26 PM (16 years ago)
Author:
dai_9181
Message:

[585][586]をリバース。NativeCodeクラスとMetaクラスは依存関係があるので分離しない方針とする。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp

    r585 r587  
    33using namespace ActiveBasic::Compiler;
    44
    5 int VtblGenerator::GenerateVTablePart( const Methods &methods )
     5LONG_PTR VtblGenerator::GenerateVTablePart( const Methods &methods )
    66{
    77    const UserProc **ppsi = (const UserProc **)malloc(methods.GetVtblNum()*sizeof(UserProc *));
     
    2929    }
    3030
    31     int vtableDataTableOffset = compiler.GetObjectModule().nativeSection.dataTable.AddBinary( (void *)ppsi, methods.GetVtblNum()*sizeof(LONG_PTR) );
     31    LONG_PTR vtableDataTableOffset = compiler.GetObjectModule().dataTable.AddBinary( (void *)ppsi, methods.GetVtblNum()*sizeof(LONG_PTR) );
    3232
    3333    for( int i=0; i < methods.GetVtblNum(); i++ )
     
    6161
    6262    // 自身のクラスのvtblを生成
    63     int thisClassVtblOffset = GenerateVTablePart( _class.GetDynamicMethods() );
     63    LONG_PTR thisClassVtblOffset = GenerateVTablePart( _class.GetDynamicMethods() );
    6464    _class.SetVtblOffset( thisClassVtblOffset );
    6565    _class.vtblMasterList.push_back( thisClassVtblOffset );
     
    6868    BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )
    6969    {
    70         int tempVtblOffset = GenerateVTablePart( pInterface->GetDynamicMethods() );
     70        LONG_PTR tempVtblOffset = GenerateVTablePart( pInterface->GetDynamicMethods() );
    7171        _class.vtblMasterList.push_back( tempVtblOffset );
    7272
     
    8484
    8585    // vtblマスターリストを生成
    86     int offset = compiler.GetObjectModule().nativeSection.dataTable.AddBinary(
     86    int offset = compiler.GetObjectModule().dataTable.AddBinary(
    8787        (void *)&_class.vtblMasterList[0],
    8888        static_cast<int>(_class.vtblMasterList.size()*sizeof(LONG_PTR))
     
    119119    // 自身のクラスのvtbl
    120120    {
    121         LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + _class.GetVtblOffset());
     121        LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().dataTable.GetPtr() + _class.GetVtblOffset());
    122122
    123123        for( int i=0; i<_class.GetVtblNum(); i++ ){
     
    138138    BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )
    139139    {
    140         LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + pInterface->GetVtblOffset());
     140        LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().dataTable.GetPtr() + pInterface->GetVtblOffset());
    141141
    142142        for( int i=0; i<pInterface->GetClass().GetVtblNum(); i++ ){
     
    155155
    156156    // vtblマスターリスト
    157     LONG_PTR *pVtblMasterList = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + _class.GetVtblMasterListOffset() );
     157    LONG_PTR *pVtblMasterList = (LONG_PTR *)((char *)compiler.GetObjectModule().dataTable.GetPtr() + _class.GetVtblMasterListOffset() );
    158158    for( int i=0; i<static_cast<int>(_class.vtblMasterList.size()); i++ )
    159159    {
Note: See TracChangeset for help on using the changeset viewer.