#include "../BasicCompiler_Common/common.h" #ifdef _AMD64_ #include "../BasicCompiler64/opcode.h" #else #include "../BasicCompiler32/opcode.h" #endif SUBINFO *OverloadSolutionWithStrParam( const char *name, std::vector &subs, const char *Parameter, const char *ObjectName, TYPEINFO *pReturnTypeInfo){ // オーバーロードの解決 //オーバーロードされていないとき if( subs.size() == 1 ) return subs[0]; //////////////////////// // パラメータをセット //////////////////////// CParameter *pobj_parameter=0; char MethodName[VN_SIZE]; if( !SplitMemberName( name, NULL, MethodName ) ) lstrcpy( MethodName, name ); /* //メソッドの場合は静的かどうかを調べる bool isStatic = false; CClass *pClass = subs[0]->pobj_ParentClass; if( pClass ){ isStatic = pClass->IsExistStaticMethod( MethodName ); } */ //パラメータオブジェクトを生成 pobj_parameter=new CParameter(Parameter); if(pReturnTypeInfo) pobj_parameter->SetReturnType(pReturnTypeInfo); SUBINFO *psi; psi=pobj_parameter->OverloadSolution(name,subs); //パラメータオブジェクトを破棄 delete pobj_parameter; pobj_parameter=0; return psi; } SUBINFO *OverloadSolution( const char *name, std::vector &subs, const PARAMETER_INFO *ppi, const int ParmNum, TYPEINFO *pReturnTypeInfo){ // オーバーロードの解決 //オーバーロードされていないとき if( subs.size() == 1 ) return subs[0]; CParameter *pobj_Parameter=new CParameter(ppi,ParmNum); if(pReturnTypeInfo) pobj_Parameter->SetReturnType(pReturnTypeInfo); SUBINFO *psi; psi=pobj_Parameter->OverloadSolution(name,subs); delete pobj_Parameter; return psi; }