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/BasicCompiler64/Compile_CallProc.cpp

    r350 r370  
    359359        if( pobj_c->IsInterface() )
    360360        {
    361             // インターフェイスメソッド呼び出し
     361            // インターフェイス メソッド呼び出し
    362362
    363363            int offset_vtbl = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__vtbl" );
     
    380380            }
    381381        }
     382        else if( pobj_c->IsComInterface() )
     383        {
     384            // COMインターフェイス メソッド呼び出し
     385
     386            //仮想関数(オブジェクトメソッド)呼び出し
     387            // pObj -> vtbl1 -> func1
     388            //               -> func2
     389            //               -> func3
     390
     391            int vtblMasterListIndex;
     392            pobj_c->GetVtblMasterListIndexAndVtblIndex( pUserProc, vtblMasterListIndex, vtblIndex );
     393
     394            // vtblのポインタを取得
     395            //mov r11,qword ptr[rcx]
     396            compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);        }
    382397        else
    383398        {
     
    394409
    395410            // vtblマスターリストのポインタを取得
    396             //mov r11,qword ptr[rcx]
    397             compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);
     411            //mov r11,qword ptr[rcx+sizeof(com_vtbl)]
     412            compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,PTR_SIZE,MOD_BASE_DISP8);
    398413
    399414            // vtblのポインタを取得
Note: See TracChangeset for help on using the changeset viewer.