Changeset 415 in dev for trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
- Timestamp:
- Mar 6, 2008, 11:19:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_CallProc.cpp
r370 r415 120 120 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 121 121 Type varType; 122 GetVarType( ObjectName, varType, false ); 123 if( NATURAL_TYPE( varType.GetBasicType() ) == DEF_OBJECT ) 122 if( GetTermType( ObjectName, varType ) ) 124 123 { 125 pobj_c = &varType.GetClass(); 126 leftType = varType; 124 if( varType.IsObject() ) 125 { 126 pobj_c = &varType.GetClass(); 127 leftType = varType; 128 } 127 129 } 128 else 130 131 if( !pobj_c ) 129 132 { 130 133 pobj_c=compiler.GetObjectModule().meta.GetClasses().Find(ObjectName); … … 286 289 if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember; 287 290 else{ 288 RELATIVE_VAR RelativeVar; 289 if( pMethod->IsConst() ){ 290 //Constアクセスが可能なメソッドの場合 291 if( !GetVarOffsetReadOnly( ObjectName, &RelativeVar, Type() ) ){ 292 return false; 293 } 291 bool isLiteral; 292 if( !TermOpe( ObjectName, Type(), Type(), isLiteral, NULL, NULL, false, !pMethod->IsConst() ) ) 293 { 294 return false; 294 295 } 295 else{ 296 //Constアクセスが不可能なメソッドの場合 297 if( !GetVarOffsetReadWrite( ObjectName, &RelativeVar, Type() ) ){ 298 return false; 299 } 300 } 301 302 SetVarPtrToEax(&RelativeVar); 303 304 // 参照を実体ポインタにする 305 compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE ); 296 297 // 実態ポインタをeaxにコピー 298 compiler.codeGenerator.op_mov_RR( REG_ECX, REG_EAX ); 306 299 } 307 300 }
Note:
See TracChangeset
for help on using the changeset viewer.