Changeset 331 in dev for trunk/abdev/BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Sep 27, 2007, 1:47:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Func.cpp
r325 r331 221 221 compiler.codeGenerator.op_mov_RV( REG_EAX, typeSize ); 222 222 } 223 void Opcode_Func_AddressOf( const char *name ){223 void Opcode_Func_AddressOf( const char *name, const Type &baseType ){ 224 224 extern int cp; 225 225 const UserProc *pUserProc; 226 226 227 extern LONG_PTR ProcPtr_BaseIndex;228 if(ProcPtr_BaseIndex!=-1){227 if( baseType.IsProcPtr() ) 228 { 229 229 //左辺の型にのっとり、オーバーロードを解決 230 230 … … 237 237 238 238 //オーバーロードを解決 239 pUserProc=OverloadSolution(name,subs,compiler.GetObjectModule().meta.GetProcPointers()[ ProcPtr_BaseIndex]->Params(), Type() );239 pUserProc=OverloadSolution(name,subs,compiler.GetObjectModule().meta.GetProcPointers()[baseType.GetIndex()]->Params(), Type() ); 240 240 241 241 if(!pUserProc){ … … 477 477 } 478 478 479 bool Opcode_CallFunc( const char *Parameter, const int FuncNum, Type &resultType, bool isCallOn ){ 479 bool Opcode_CallFunc( const char *Parameter, const int FuncNum, const Type &baseType, Type &resultType, bool isCallOn ) 480 { 480 481 switch(FuncNum){ 481 482 case FUNC_FIX: … … 492 493 break; 493 494 case FUNC_ADDRESSOF: 494 if( isCallOn ) Opcode_Func_AddressOf( Parameter);495 if( isCallOn ) Opcode_Func_AddressOf( Parameter, baseType ); 495 496 resultType.SetBasicType( DEF_PTR_VOID ); 496 497 break;
Note:
See TracChangeset
for help on using the changeset viewer.