Changeset 18 in dev for BasicCompiler64/Compile_CallProc.cpp
- Timestamp:
- Dec 24, 2006, 4:46:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_CallProc.cpp
r11 r18 233 233 234 234 BOOL bStatic=0; 235 CClass *pobj_c; 235 CClass *pobj_c = NULL; 236 CMethod *pMethod = NULL; 236 237 if(psi->pobj_ParentClass){ 237 238 //クラスのメンバ関数を呼び出す場合はアクセスチェックを行う … … 264 265 } 265 266 266 DWORD dwAccess; 267 for(i=0;i<pobj_c->iMethodNum;i++){268 if(psi==pobj_c->ppobj_Method[i]->psi) break;269 }270 if(i==pobj_c->iMethodNum){271 for(i=0;i<pobj_c->iStaticMethodNum;i++){272 if(psi==pobj_c->ppobj_StaticMethod[i]->psi) break;273 }274 dwAccess=pobj_c->ppobj_StaticMethod[i]->dwAccess;275 276 bStatic=1;277 }278 else dwAccess=pobj_c->ppobj_Method[i]->dwAccess;267 268 ///////////////////////////////// 269 // メソッド情報を取得 270 ///////////////////////////////// 271 pMethod = pobj_c->GetMethodInfo( psi ); 272 if( !pMethod ){ 273 //動的メソッドが取得できなかったときは静的メソッドを当たる 274 pMethod = pobj_c->GetStaticMethodInfo( psi ); 275 if( !pMethod ){ 276 SetError(300,NULL,cp); 277 return -1; 278 } 279 } 279 280 280 281 … … 282 283 // アクセスエラーチェック 283 284 ////////////////////////////// 285 DWORD dwAccess = pMethod->dwAccess; 284 286 285 287 if(ObjectName[0]){ … … 408 410 else{ 409 411 RELATIVE_VAR RelativeVar; 410 if(!GetVarOffsetReadOnly(ObjectName,&i2,&RelativeVar,0)) return -1; 412 if( pMethod->isConst ){ 413 //Constアクセスが可能なメソッドの場合 414 if( !GetVarOffsetReadOnly( ObjectName, &i2, &RelativeVar, 0 ) ) return -1; 415 } 416 else{ 417 //Constアクセスが不可能なメソッドの場合 418 if( !GetVarOffsetReadWrite( ObjectName, &i2, &RelativeVar, 0 ) ) return -1; 419 } 420 411 421 SetVarPtrToReg(REG_RCX,&RelativeVar); 412 422
Note:
See TracChangeset
for help on using the changeset viewer.