Changeset 46 in dev for BasicCompiler_Common
- Timestamp:
- Feb 6, 2007, 1:19:17 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/BasicFixed.h
r41 r46 54 54 #define NATURAL_TYPE(t) ((t)&MASK_NATURAL) 55 55 #define MAKE_PTR_TYPE(t,p) ((t)|((p)<<8)) 56 #define PTR_LEVEL_UP(t) MAKE_PTR_TYPE(NATURAL_TYPE(t),PTR_LEVEL(t)+1)57 #define PTR_LEVEL_DOWN(t) MAKE_PTR_TYPE(NATURAL_TYPE(t),PTR_LEVEL(t)-1)56 #define PTR_LEVEL_UP(t) t = MAKE_PTR_TYPE(NATURAL_TYPE(t),PTR_LEVEL(t)+1) 57 #define PTR_LEVEL_DOWN(t) t = MAKE_PTR_TYPE(NATURAL_TYPE(t),PTR_LEVEL(t)-1) 58 58 59 59 #define DEF_PTR_BYTE MAKE_PTR_TYPE(DEF_BYTE,1) -
BasicCompiler_Common/Class.cpp
r40 r46 181 181 182 182 183 CClass::CClass(c har *name){183 CClass::CClass(const char *name){ 184 184 memset(this,0,sizeof(CClass)); 185 185 … … 316 316 iStaticMethodNum++; 317 317 } 318 BOOL CClass::DupliCheckAll(c har *name){318 BOOL CClass::DupliCheckAll(const char *name){ 319 319 //重複チェック 320 320 … … 333 333 return 0; 334 334 } 335 BOOL CClass::DupliCheckMember(c har *name){335 BOOL CClass::DupliCheckMember(const char *name){ 336 336 //重複チェック 337 337 … … 374 374 return ppobj_StaticMethod[i]; 375 375 } 376 bool CClass::IsExistMethod( c har *name ){376 bool CClass::IsExistMethod( const char *name ){ 377 377 for( int i=0; i<iMethodNum; i++ ){ 378 378 if( lstrcmp( ppobj_Method[i]->psi->name, name ) == 0 ) return true; … … 380 380 return false; 381 381 } 382 bool CClass::IsExistStaticMethod( c har *name ){382 bool CClass::IsExistStaticMethod( const char *name ){ 383 383 for( int i=0; i<iStaticMethodNum; i++ ){ 384 384 if( lstrcmp( ppobj_StaticMethod[i]->psi->name, name ) == 0 ) return true; … … 538 538 539 539 540 int CDBClass::hash(c har *name){540 int CDBClass::hash(const char *name){ 541 541 int key; 542 542 … … 584 584 } 585 585 586 CClass *CDBClass::check(c har *name){586 CClass *CDBClass::check(const char *name){ 587 587 int key; 588 588 key=hash(name); … … 604 604 } 605 605 606 CClass *CDBClass::AddClass(c har *name,int NowLine){606 CClass *CDBClass::AddClass(const char *name,int NowLine){ 607 607 ////////////////////////////////////////////////////////////////////////// 608 608 // クラスを追加 … … 849 849 } 850 850 851 void CDBClass::GetClass_recur(c har *lpszInheritsClass){851 void CDBClass::GetClass_recur(const char *lpszInheritsClass){ 852 852 extern char *basbuf; 853 853 int i,i2,i3,sub_address,top_pos; -
BasicCompiler_Common/Class.h
r40 r46 95 95 96 96 public: 97 CClass(c har *name);97 CClass(const char *name); 98 98 ~CClass(); 99 99 … … 106 106 void AddStaticMethod(SUBINFO *psi,DWORD dwAccess); 107 107 108 BOOL DupliCheckAll(c har *name);109 BOOL DupliCheckMember(c har *name);108 BOOL DupliCheckAll(const char *name); 109 BOOL DupliCheckMember(const char *name); 110 110 111 111 //メソッド取得 … … 114 114 115 115 //メソッドの存在を確認 116 bool IsExistMethod( c har *name );117 bool IsExistStaticMethod( c har *name );116 bool IsExistMethod( const char *name ); 117 bool IsExistStaticMethod( const char *name ); 118 118 119 119 … … 162 162 #define MAX_CLASS_HASH 65535 163 163 class CDBClass{ 164 int hash(c har *name);164 int hash(const char *name); 165 165 void DestroyClass(CClass *pobj_c); 166 166 public: … … 170 170 ~CDBClass(); 171 171 172 CClass *check(c har *name);173 174 CClass *AddClass(c har *name,int NowLine);172 CClass *check(const char *name); 173 174 CClass *AddClass(const char *name,int NowLine); 175 175 176 176 void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection); … … 182 182 public: 183 183 void InitNames(void); 184 void GetClass_recur(c har *lpszInheritsClass);184 void GetClass_recur(const char *lpszInheritsClass); 185 185 void GetObjectClassInfo(void); 186 186 -
BasicCompiler_Common/Overload.cpp
r36 r46 46 46 } 47 47 48 SUBINFO *OverloadSolution(c har *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo){48 SUBINFO *OverloadSolution(const char *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo){ 49 49 // オーバーロードの解決 50 50 -
BasicCompiler_Common/Subroutine.cpp
r40 r46 64 64 } 65 65 66 void SplitObjectName(c har *name,char *ObjectName,int *pRefType){66 void SplitObjectName(const char *name,char *ObjectName,int *pRefType){ 67 67 int i4; 68 68 for(i4=lstrlen(name)-1;i4>=0;i4--){ -
BasicCompiler_Common/TypeDef.cpp
r4 r46 5 5 6 6 7 CTypeDef::CTypeDef(c har *name,char *base){7 CTypeDef::CTypeDef(const char *name,char *base){ 8 8 lpszName=(char *)malloc(lstrlen(name)+1); 9 9 lstrcpy(lpszName,name); … … 32 32 iNum=0; 33 33 } 34 void CDBTypeDef::add(c har *name,char *base){34 void CDBTypeDef::add(const char *name,char *base){ 35 35 ppobj_TypeDef=(CTypeDef **)realloc(ppobj_TypeDef,(iNum+1)*sizeof(CTypeDef *)); 36 36 ppobj_TypeDef[iNum]=new CTypeDef(name,base); … … 65 65 } 66 66 } 67 int CDBTypeDef::check(c har *name){67 int CDBTypeDef::check(const char *name){ 68 68 int i; 69 69 for(i=0;i<iNum;i++){ -
BasicCompiler_Common/TypeDef.h
r4 r46 4 4 char *lpszName; 5 5 char *lpszBaseName; 6 CTypeDef(c har *name,char *base);6 CTypeDef(const char *name,char *base); 7 7 ~CTypeDef(); 8 8 }; … … 17 17 void init(); 18 18 19 void add(c har *name,char *base);20 int check(c har *name);19 void add(const char *name,char *base); 20 int check(const char *name); 21 21 }; 22 22 extern CDBTypeDef *pobj_DBTypeDef; -
BasicCompiler_Common/Variable.cpp
r40 r46 160 160 return MAKE_PTR_TYPE(NATURAL_TYPE(type),PTR_LEVEL(type)+1); 161 161 } 162 int GetTypeFixed(c har *TypeName,LONG_PTR *lpNum){162 int GetTypeFixed(const char *TypeName,LONG_PTR *lpNum){ 163 163 int type; 164 164 -
BasicCompiler_Common/Variable.h
r40 r46 13 13 int GetTypeSize(int type,LONG_PTR lpIndex); 14 14 int GetPtrType(int type,LONG_PTR lpIndex); 15 int GetTypeFixed(c har *TypeName,LONG_PTR *lpNum);15 int GetTypeFixed(const char *TypeName,LONG_PTR *lpNum); 16 16 void GetOriginalTypeName(char *buffer); 17 17 BOOL GetTypeName(int type,LONG_PTR lpIndex,char *name); -
BasicCompiler_Common/common.h
r45 r46 415 415 CONSTINFO *GetConstHash(char *name); 416 416 DECLAREINFO *GetDeclareHash(char *name); 417 SUBINFO *GetSubHash(c har *name,BOOL bError=0);417 SUBINFO *GetSubHash(const char *name,BOOL bError=0); 418 418 SUBINFO *GetMethodHash(char *ObjectName,char *MethodName,char *Parameter,BOOL bError=0); 419 419 SUBINFO **GetOverloadObjectSubHash(char *name,CClass *pobj_c, int *pNum); 420 SUBINFO **GetOverloadSubHash(c har *name,int *pNum);420 SUBINFO **GetOverloadSubHash(const char *name,int *pNum); 421 421 422 422 //Object.cpp … … 428 428 //Overload.sbp 429 429 SUBINFO *OverloadSolutionWithStrParam(char *name,SUBINFO **ppsi,int num,char *Parameter,char *ObjectName,TYPEINFO *pReturnTypeInfo); 430 SUBINFO *OverloadSolution(c har *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo);430 SUBINFO *OverloadSolution(const char *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo); 431 431 432 432 //Debug.cpp … … 548 548 int GetCallProcName(char *buffer,char *name); 549 549 int GetProc(char *name,void **ppInfo); 550 void SplitObjectName(c har *name,char *ObjectName,int *pRefType);550 void SplitObjectName(const char *name,char *ObjectName,int *pRefType); 551 551 bool SplitMemberName( const char *desc, char *object, char *member ); 552 552 int GetReturnTypeOfProc(int idProc,void *pInfo,char *name,char *Parameter,LONG_PTR *plpRetIndex); … … 578 578 void SetError(int ErrorNum,const char *KeyWord,int pos); 579 579 void CompileMessage(char *buffer); 580 bool CheckDifferentType( int VarType,LONG_PTR lpVarIndex,int CalcType,LONG_PTR lpCalcIndex,char *pszFuncName,int ParmNum);580 bool CheckDifferentType(const int VarType,const LONG_PTR lpVarIndex,const int CalcType,const LONG_PTR lpCalcIndex,const char *pszFuncName,const int ParmNum); 581 581 582 582 //Compile.cpp -
BasicCompiler_Common/error.cpp
r45 r46 364 364 365 365 #define STRING_SYSTEM_DECLAREHANDLE "*_System_DeclareHandle_" 366 void DifferentTypeError( int VarType,LONG_PTR VarIndex,int CalcType,LONG_PTR CalcIndex,int iWarning,char *pszFuncName,int ParmNum){366 void DifferentTypeError(const int VarType,LONG_PTR VarIndex,const int CalcType,LONG_PTR CalcIndex,const int iWarning,const char *pszFuncName,const int ParmNum){ 367 367 ////////////////////////// 368 368 // キャストに関する警告 … … 396 396 } 397 397 398 bool CheckDifferentType( int VarType,LONG_PTR lpVarIndex,int CalcType,LONG_PTR lpCalcIndex,char *pszFuncName,int ParmNum){398 bool CheckDifferentType(const int VarType,const LONG_PTR lpVarIndex,int CalcType,const LONG_PTR lpCalcIndex,const char *pszFuncName,const int ParmNum){ 399 399 400 400 if(VarType==DEF_OBJECT||CalcType==DEF_OBJECT){ -
BasicCompiler_Common/hash.cpp
r31 r46 77 77 } 78 78 79 SUBINFO **GetOverloadSubHash( char *lpszName,int *pNum){79 SUBINFO **GetOverloadSubHash( const char *lpszName, int *pNum ){ 80 80 extern SUBINFO *pSubInfo; 81 81 extern int SubInfoNum; … … 225 225 226 226 //オーバーロードされていない関数を取得(昔のコンパイラソースコードとの互換性保持) 227 SUBINFO *GetSubHash(c har *lpszName,BOOL bError){227 SUBINFO *GetSubHash(const char *lpszName,BOOL bError){ 228 228 int num; 229 229 SUBINFO **ppsi,*psi;
Note:
See TracChangeset
for help on using the changeset viewer.