Ignore:
Timestamp:
Nov 15, 2007, 3:18:41 AM (16 years ago)
Author:
dai_9181
Message:

COM修飾子に対応。COMインターフェイスを呼び出せるようにした

File:
1 edited

Legend:

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

    r350 r370  
    326326        if( pobj_c->IsInterface() )
    327327        {
    328             // インターフェイスメソッド呼び出し
     328            // インターフェイス メソッド呼び出し
    329329
    330330            int offset_vtbl = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__vtbl" );
     
    349349                SetError();
    350350            }
     351        }
     352        else if( pobj_c->IsComInterface() )
     353        {
     354            // COMインターフェイス メソッド呼び出し
     355
     356            //仮想関数(オブジェクトメソッド)呼び出し
     357            // pObj -> vtbl1 -> func1
     358            //               -> func2
     359            //               -> func3
     360
     361            int vtblMasterListIndex;
     362            pobj_c->GetVtblMasterListIndexAndVtblIndex( pUserProc, vtblMasterListIndex, vtblIndex );
     363
     364            // vtblのポインタを取得
     365            //mov edx,dword ptr[ecx]
     366            compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_ECX, 0, MOD_BASE );
    351367        }
    352368        else
     
    364380
    365381            // vtblマスターリストのポインタを取得
    366             //mov edx,dword ptr[ecx]
    367             compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_ECX, 0, MOD_BASE );
     382            //mov edx,dword ptr[ecx+sizeof(com_vtbl)]
     383            compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_ECX, PTR_SIZE, MOD_BASE_DISP8 );
    368384           
    369385            // vtblのポインタを取得
Note: See TracChangeset for help on using the changeset viewer.