Changeset 138 in dev
- Timestamp:
- Jun 12, 2007, 1:57:26 AM (17 years ago)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Var.cpp
r137 r138 714 714 } 715 715 716 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,c har *InitBuf){716 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){ 717 717 extern BYTE *initGlobalBuf; 718 718 int i,i2,i3; 719 719 char temporary[VN_SIZE]; 720 char InitBuf[VN_SIZE]; 721 lstrcpy( InitBuf, lpszInitBuf ); 720 722 721 723 if(InitBuf[0]=='['){ … … 851 853 return true; 852 854 } 853 bool InitLocalVar(int offset,const Type &type,const int *SubScripts,c har *InitBuf){855 bool InitLocalVar(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){ 854 856 int i,i2,i3; 855 857 char temporary[VN_SIZE]; 858 char InitBuf[VN_SIZE]; 859 lstrcpy( InitBuf, lpszInitBuf ); 856 860 857 861 if(InitBuf[0]=='['){ … … 1061 1065 } 1062 1066 1063 void dim( char *VarName,int *SubScripts,Type &type,c har *InitBuf,char *ConstractParameter,DWORD dwFlags){1067 void dim( char *VarName,int *SubScripts,Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags){ 1064 1068 if( UserProc::IsGlobalAreaCompiling() ){ 1065 1069 ///////////////////////// -
BasicCompiler32/Opcode.h
r129 r138 202 202 void SetThisPtrToReg(int reg); 203 203 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = 0); 204 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,c har *InitBuf);204 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *InitBuf); 205 205 #define DIMFLAG_INITDEBUGVAR 1 206 206 #define DIMFLAG_NONCALL_CONSTRACTOR 2 207 207 #define DIMFLAG_STATIC 4 208 208 #define DIMFLAG_CONST 8 209 void dim( char *VarName,int *SubScripts,Type &type, char *InitBuf,char *ConstractParameter,DWORD dwFlags);209 void dim( char *VarName,int *SubScripts,Type &type, const char *InitBuf,const char *ConstractParameter,DWORD dwFlags); 210 210 void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar); 211 211 void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar); -
BasicCompiler64/Compile_Var.cpp
r137 r138 736 736 } 737 737 738 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,c har *InitBuf){738 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){ 739 739 extern BYTE *initGlobalBuf; 740 740 int i,i2,i3; 741 741 char temporary[VN_SIZE]; 742 char InitBuf[VN_SIZE]; 743 lstrcpy( InitBuf, lpszInitBuf ); 742 744 743 745 if(InitBuf[0]=='['){ … … 873 875 return true; 874 876 } 875 bool InitLocalVar(int offset,const Type &type,const int *SubScripts,c har *InitBuf){877 bool InitLocalVar(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){ 876 878 int i,i2,i3; 877 879 char temporary[VN_SIZE]; 880 char InitBuf[VN_SIZE]; 881 lstrcpy( InitBuf, lpszInitBuf ); 878 882 879 883 if(InitBuf[0]=='['){ … … 1047 1051 } 1048 1052 1049 void dim( char *VarName,int *SubScripts,Type &type,c har *InitBuf,char *ConstractParameter,DWORD dwFlags){1053 void dim( char *VarName,int *SubScripts,Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags){ 1050 1054 if( UserProc::IsGlobalAreaCompiling() ){ 1051 1055 ///////////////////////// -
BasicCompiler64/Opcode.h
r131 r138 324 324 void SetThisPtrToReg(int reg); 325 325 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = NULL); 326 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,c har *InitBuf);326 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *InitBuf); 327 327 #define DIMFLAG_INITDEBUGVAR 0x01 328 328 #define DIMFLAG_NONCALL_CONSTRACTOR 0x02 329 329 #define DIMFLAG_STATIC 0x04 330 330 #define DIMFLAG_CONST 0x08 331 void dim( char *VarName,int *SubScripts,Type &type, char *InitBuf,char *ConstractParameter,DWORD dwFlags);331 void dim( char *VarName,int *SubScripts,Type &type, const char *InitBuf,const char *ConstractParameter,DWORD dwFlags); 332 332 void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar); 333 333 bool Compile_AddGlobalRootsForGc(); -
BasicCompiler_Common/VariableOpe.cpp
r137 r138 1034 1034 1035 1035 1036 void AddGlobalVariable( const char *name,int *SubScripts, const Type &type,c har *InitBuf,char *ConstractParameter,DWORD dwFlag){1036 void AddGlobalVariable( const char *name,int *SubScripts, const Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlag){ 1037 1037 ///////////////////////// 1038 1038 // グローバル変数を追加 -
BasicCompiler_Common/VariableOpe.h
r106 r138 32 32 char *ConstractParameter ); 33 33 BOOL GetNowStaticVarFullName(char *VarName,char *FullName); 34 void AddGlobalVariable( const char *name,int *SubScripts, const Type &type,c har *InitBuf,char *ConstractParameter,DWORD dwFlag);34 void AddGlobalVariable( const char *name,int *SubScripts, const Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlag); 35 35 void dim(char *Parameter,DWORD dwFlags); 36 36 void OpcodeDim(char *Parameter,DWORD dwFlags); -
BasicCompiler_Common/include/Member.h
r137 r138 15 15 Type type; 16 16 bool isConst; 17 18 string initializeExpression; 19 string constructParameter; 17 20 public: 18 21 int SubScripts[MAX_ARRAYDIM]; 19 20 char *InitBuf;21 char *ConstractParameter;22 22 23 23 int source_code_address; … … 42 42 } 43 43 44 const string &GetInitializeExpression() const 45 { 46 return initializeExpression; 47 } 48 const string &GetConstructParameter() const 49 { 50 return constructParameter; 51 } 52 44 53 CMember( Prototype::Accessibility accessibility, const string &name, const Type &type, bool isConst ) 45 54 : MemberPrototype( accessibility ) -
BasicCompiler_Common/src/Member.cpp
r137 r138 14 14 //構文を解析 15 15 char VarName[VN_SIZE]; 16 char init _buf[VN_SIZE];17 char constract_parameter[VN_SIZE];18 GetDimentionFormat(buffer,VarName,SubScripts,type,init _buf,constract_parameter);16 char initBuffer[VN_SIZE]; 17 char lpszConstructParameter[VN_SIZE]; 18 GetDimentionFormat(buffer,VarName,SubScripts,type,initBuffer,lpszConstructParameter); 19 19 20 20 //重複チェック … … 30 30 31 31 //初期データ 32 InitBuf=(char *)HeapAlloc(hHeap,0,lstrlen(init_buf)+1); 33 lstrcpy(InitBuf,init_buf); 32 initializeExpression = initBuffer; 34 33 35 34 //コンストラクタ用のパラメータ 36 ConstractParameter=(char *)HeapAlloc(hHeap,0,lstrlen(constract_parameter)+1); 37 lstrcpy(ConstractParameter,constract_parameter); 35 constructParameter = lpszConstructParameter; 38 36 39 37 //ソースコードの位置 … … 53 51 } 54 52 CMember::~CMember(){ 55 if(InitBuf) HeapDefaultFree(InitBuf);56 if(ConstractParameter) HeapDefaultFree(ConstractParameter);57 53 } 58 54 … … 80 76 member->SubScripts, 81 77 member->GetType(), 82 member-> InitBuf,83 member-> ConstractParameter,78 member->GetInitializeExpression().c_str(), 79 member->GetConstructParameter().c_str(), 84 80 0); 85 81
Note:
See TracChangeset
for help on using the changeset viewer.