Changeset 345 in dev for trunk/abdev/BasicCompiler64/Compile_CallProc.cpp
- Timestamp:
- Oct 10, 2007, 1:52:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_CallProc.cpp
r339 r345 89 89 } 90 90 91 bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName){ 92 int i2; 93 91 bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName) 92 { 94 93 if( pUserProc->IsMacro() ){ 95 94 if( lstrcmpi( pUserProc->GetName().c_str(), "Print" ) == 0 ){ … … 165 164 ///////////////////////////////// 166 165 pMethod = NULL; 167 if( ! isStatic ) pMethod = pobj_c->Get Methods().GetMethodPtr( pUserProc );166 if( ! isStatic ) pMethod = pobj_c->GetDynamicMethods().GetMethodPtr( pUserProc ); 168 167 if( ! pMethod ){ 169 168 //動的メソッドが取得できなかったときは静的メソッドを当たる … … 362 361 // ->func3 363 362 363 // vtblマスターリストのポインタを取得 364 364 //mov r11,qword ptr[rcx] 365 365 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE); 366 366 367 i2 = pobj_c->GetFuncNumInVtbl( pUserProc ); 367 // vtblのポインタを取得 368 //mov r11,dword ptr[r11+vtblMasterListIndex] 369 int vtblMasterListIndex = pobj_c->GetVtblMasterListIndex( pUserProc ); 370 compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_R11, REG_R11, vtblMasterListIndex, MOD_BASE_DISP32 ); 371 372 int vtblIndex = pobj_c->GetFuncNumInVtbl( pUserProc ); 368 373 369 374 //call qword ptr[r11+func_index] 370 if( i2*PTR_SIZE<=0x7F){375 if( vtblIndex * PTR_SIZE <= 0x7F ){ 371 376 compiler.codeGenerator.PutOld( 372 377 (char)0x41, 373 378 (char)0xFF, 374 379 (char)0x53, 375 (char)( i2*PTR_SIZE)380 (char)(vtblIndex*PTR_SIZE) 376 381 ); 377 382 } … … 381 386 (char)0xFF, 382 387 (char)0x93, 383 (long)( i2*PTR_SIZE)388 (long)(vtblIndex*PTR_SIZE) 384 389 ); 385 390 }
Note:
See TracChangeset
for help on using the changeset viewer.