Changeset 342 in dev for trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
- Timestamp:
- Oct 9, 2007, 1:10:33 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
r339 r342 81 81 } 82 82 83 bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName ){ 84 int i2; 85 83 bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName ) 84 { 86 85 if( pUserProc->IsMacro() ){ 87 86 if( lstrcmpi( pUserProc->GetName().c_str(), "Print" ) == 0 ){ … … 157 156 ///////////////////////////////// 158 157 pMethod = NULL; 159 if( ! isStatic ) pMethod = pobj_c->Get Methods().GetMethodPtr( pUserProc );158 if( ! isStatic ) pMethod = pobj_c->GetDynamicMethods().GetMethodPtr( pUserProc ); 160 159 if( ! pMethod ){ 161 160 //動的メソッドが取得できなかったときは静的メソッドを当たる … … 331 330 // ->func3 332 331 332 // vtblマスターリストのポインタを取得 333 333 //mov edx,dword ptr[ecx] 334 334 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_ECX, 0, MOD_BASE ); 335 336 i2 = pobj_c->GetFuncNumInVtbl( pUserProc ); 335 336 // vtblのポインタを取得 337 //mov edx,dword ptr[edx+vtblMasterListIndex] 338 int vtblMasterListIndex = pobj_c->GetVtblMasterListIndex( pUserProc ); 339 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EDX, REG_EDX, vtblMasterListIndex, MOD_BASE_DISP32 ); 340 341 int vtblIndex = pobj_c->GetFuncNumInVtbl( pUserProc ); 337 342 338 343 //call dword ptr[edx+func_index] 339 if(i2*PTR_SIZE<=0x7F){ 344 if( vtblIndex * PTR_SIZE <= 0x7F ) 345 { 340 346 compiler.codeGenerator.PutOld( 341 347 (char)0xFF, 342 348 (char)0x52, 343 (char)( i2*PTR_SIZE)349 (char)(vtblIndex*PTR_SIZE) 344 350 ); 345 351 } … … 349 355 (char)0x92 350 356 ); 351 compiler.codeGenerator.PutOld( (long)( i2*PTR_SIZE), Schedule::None );357 compiler.codeGenerator.PutOld( (long)(vtblIndex*PTR_SIZE), Schedule::None ); 352 358 } 353 359 }
Note:
See TracChangeset
for help on using the changeset viewer.