Changeset 5 in dev
- Timestamp:
- Dec 5, 2006, 1:42:16 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/BasicCompiler.cpp
r4 r5 2 2 #include "../BasicCompiler64/BasicCompiler.h" 3 3 #else 4 #include "../BasicCompiler /BasicCompiler.h"4 #include "../BasicCompiler32/BasicCompiler.h" 5 5 #endif 6 6 … … 356 356 SIZE size; 357 357 static POINT pos_List,pos_Progress; 358 static height_Progress;358 static int height_Progress; 359 359 360 360 switch(message){ -
BasicCompiler_Common/Class.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 510 510 i+=2; 511 511 //アラインメント修飾子 512 if( memicmp(basbuf+i,"Align(",6)==0){512 if(_memicmp(basbuf+i,"Align(",6)==0){ 513 513 i+=6; 514 514 i=JumpStringInPare(basbuf,i)+1; … … 886 886 //アラインメント修飾子 887 887 int iAlign=0; 888 if( memicmp(basbuf+i,"Align(",6)==0){888 if(_memicmp(basbuf+i,"Align(",6)==0){ 889 889 i+=6; 890 890 i+=GetStringInPare_RemovePare(temporary,basbuf+i)+1; -
BasicCompiler_Common/Compile.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/Const.cpp
r4 r5 20 20 } 21 21 CConst::~CConst(){ 22 } 23 24 CConstMacro::CConstMacro(char *Name, char *Expression):CConstBase(Name) 25 { 26 } 27 CConstMacro::~CConstMacro(){ 22 28 } 23 29 -
BasicCompiler_Common/Const.h
r4 r5 27 27 public: 28 28 29 CConstMacro( );29 CConstMacro(char *Name, char *Expression); 30 30 ~CConstMacro(); 31 31 }; -
BasicCompiler_Common/DebugMiddleFile.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/LexicalScoping.cpp
r4 r5 3 3 #include "../BasicCompiler64/opcode.h" 4 4 #else 5 #include "../BasicCompiler /opcode.h"5 #include "../BasicCompiler32/opcode.h" 6 6 #endif 7 7 -
BasicCompiler_Common/NumOpe_GetType.cpp
r4 r5 56 56 57 57 if(!type){ 58 extern cp;58 extern int cp; 59 59 SetError(300,NULL,cp); 60 60 } -
BasicCompiler_Common/Object.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 111 111 112 112 113 void CallConstractor(char * VarName,int *SubScripts,TYPEINFO &TypeInfo,char *Parameter){113 void CallConstractor(char *ObjectName,int *SubScripts,TYPEINFO &TypeInfo,char *Parameter){ 114 114 if(TypeInfo.type!=DEF_OBJECT) return; 115 115 … … 121 121 pobj_c=(CClass *)TypeInfo.u.lpIndex; 122 122 123 char temporary[VN_SIZE];124 sprintf(temporary,"%s.%s",VarName,pobj_c->name);125 126 123 SUBINFO *psi; 127 psi=Get SubHash(temporary);124 psi=GetMethodHash(ObjectName,pobj_c->name,Parameter); 128 125 if(!psi){ 129 126 if(Parameter[0]) SetError(113,pobj_c->name,cp); 130 127 return; 131 128 } 129 130 131 char temporary[VN_SIZE]; 132 132 133 if(SubScripts[0]!=-1){ 133 134 int ss[MAX_ARRAYDIM]; … … 145 146 } 146 147 if(SubScripts[i3]==-1) break; 147 sprintf(temporary,"%s[%d", VarName,ss[0]);148 sprintf(temporary,"%s[%d",ObjectName,ss[0]); 148 149 for(i3=1;;i3++){ 149 150 if(SubScripts[i3]==-1) break; … … 174 175 else{ 175 176 LONG_PTR lp; 176 sprintf(temporary,"%s.%s", VarName,pobj_c->name);177 sprintf(temporary,"%s.%s",ObjectName,pobj_c->name); 177 178 CallProc(PROC_DEFAULT, 178 179 psi, -
BasicCompiler_Common/Overload.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/PESchedule.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/Subroutine.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 620 620 621 621 //ID 622 static i d_base=0;622 static int id_base=0; 623 623 psi->id=(id_base++); 624 624 -
BasicCompiler_Common/Variable.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 680 680 } 681 681 682 if( memicmp(variable,"This.",5)==0){682 if(_memicmp(variable,"This.",5)==0){ 683 683 //Thisオブジェクトのメンバを参照するとき 684 684 SlideString(variable+5,-5); -
BasicCompiler_Common/calculation.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/common.h
r4 r5 1 #define _CRT_SECURE_NO_DEPRECATE 2 1 3 #include <windows.h> 2 4 #include <stdio.h> … … 14 16 #include "../BasicCompiler64/FunctionValue.h" 15 17 #else 16 #include "../BasicCompiler /resource.h"17 #include "../BasicCompiler /CommandValue.h"18 #include "../BasicCompiler /FunctionValue.h"18 #include "../BasicCompiler32/resource.h" 19 #include "../BasicCompiler32/CommandValue.h" 20 #include "../BasicCompiler32/FunctionValue.h" 19 21 #endif 20 22 … … 403 405 DECLAREINFO *GetDeclareHash(char *name); 404 406 SUBINFO *GetSubHash(char *name,BOOL bError=0); 407 SUBINFO *GetMethodHash(char *ObjectName,char *MethodName,char *Parameter,BOOL bError=0); 405 408 SUBINFO **GetOverloadObjectSubHash(char *name,CClass *pobj_c, int *pNum); 406 409 SUBINFO **GetOverloadSubHash(char *name,int *pNum); -
BasicCompiler_Common/gc.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 -
BasicCompiler_Common/hash.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 264 264 //一つ以上の関数が存在するときは内部エラー(デバッグ用) 265 265 if(num > 1){ 266 SetError(300,NULL,cp);266 if(bError) SetError(300,NULL,cp); 267 267 } 268 268 269 269 psi = ppsi[0]; 270 270 271 free(ppsi);271 HeapDefaultFree(ppsi); 272 272 273 273 return psi; 274 274 } 275 SUBINFO *GetMethodHash(char *ObjectName,char *MethodName,char *Parameter,BOOL bError){ 276 char temporary[VN_SIZE]; 277 sprintf(temporary,"%s.%s",ObjectName,MethodName); 278 279 int num; 280 SUBINFO **ppsi,*psi; 281 ppsi = GetOverloadSubHash(temporary,&num); 282 283 //関数が存在しないとき 284 if(num == 0){ 285 HeapDefaultFree(ppsi); 286 return 0; 287 } 288 289 //オーバーロードを解決 290 psi=OverloadSolutionWithStrParam(temporary,ppsi,num,Parameter,ObjectName,NULL); 291 HeapDefaultFree(ppsi); 292 293 return psi; 294 } -
BasicCompiler_Common/preprocessor.cpp
r4 r5 4 4 #include "../BasicCompiler64/opcode.h" 5 5 #else 6 #include "../BasicCompiler /opcode.h"6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 8 … … 94 94 95 95 if(buffer[i-1]=='\n'){ 96 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){96 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 97 97 i=Search_endif(buffer,i+6); 98 98 if(buffer[i]=='\0') break; 99 99 continue; 100 100 } 101 else if( memicmp(buffer+i,"#endif",6)==0){101 else if(_memicmp(buffer+i,"#endif",6)==0){ 102 102 break; 103 103 } … … 145 145 146 146 if(i==0||buffer[i-1]=='\n'){ 147 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){147 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 148 148 i=Search_endif(buffer,i+6); 149 149 if(buffer[i]=='\0') break; 150 150 continue; 151 151 } 152 else if( memicmp(buffer+i,"#else",5)==0){152 else if(_memicmp(buffer+i,"#else",5)==0){ 153 153 i2=5; 154 154 bElse=1; 155 155 break; 156 156 } 157 else if( memicmp(buffer+i,"#endif",6)==0){157 else if(_memicmp(buffer+i,"#endif",6)==0){ 158 158 i2=6; 159 159 bElse=0; … … 175 175 176 176 if(i2==0||buffer[i2-1]=='\n'){ 177 if( memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){177 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 178 178 i2=Search_endif(buffer,i2+6); 179 179 if(buffer[i2]=='\0') break; 180 180 continue; 181 181 } 182 if( memicmp(buffer+i2,"#endif",6)==0){182 if(_memicmp(buffer+i2,"#endif",6)==0){ 183 183 i2+=6; 184 184 break; … … 202 202 203 203 if(i2==0||buffer[i2-1]=='\n'){ 204 if( memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){204 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 205 205 i2=Search_endif(buffer,i2+6); 206 206 if(buffer[i2]=='\0') break; 207 207 continue; 208 208 } 209 else if( memicmp(buffer+i2,"#else",5)==0){209 else if(_memicmp(buffer+i2,"#else",5)==0){ 210 210 i2+=5; 211 211 bElse=1; 212 212 break; 213 213 } 214 else if( memicmp(buffer+i2,"#endif",6)==0){214 else if(_memicmp(buffer+i2,"#endif",6)==0){ 215 215 i2+=6; 216 216 bElse=0; … … 230 230 231 231 if(i==0||buffer[i-1]=='\n'){ 232 if( memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){232 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 233 233 i=Search_endif(buffer,i+6); 234 234 if(buffer[i]=='\0') break; 235 235 continue; 236 236 } 237 else if( memicmp(buffer+i,"#endif",6)==0){237 else if(_memicmp(buffer+i,"#endif",6)==0){ 238 238 i2=6; 239 239 bElse=0; … … 259 259 if(i==0||buffer[i-1]=='\n'){ 260 260 sw=0; 261 if( memicmp(buffer+i,"#define",7)==0){261 if(_memicmp(buffer+i,"#define",7)==0){ 262 262 i2=i+7; 263 263 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 278 278 SlideString(buffer+i+i2,-i2); 279 279 } 280 if( memicmp(buffer+i,"#undef",6)==0){280 if(_memicmp(buffer+i,"#undef",6)==0){ 281 281 i2=i+7; 282 282 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; … … 297 297 SlideString(buffer+i+i2,-i2); 298 298 } 299 else if( memicmp(buffer+i,"#ifdef",6)==0){299 else if(_memicmp(buffer+i,"#ifdef",6)==0){ 300 300 preprocessor_ifdef(buffer+i,0); 301 301 continue; 302 302 } 303 else if( memicmp(buffer+i,"#ifndef",7)==0){303 else if(_memicmp(buffer+i,"#ifndef",7)==0){ 304 304 preprocessor_ifdef(buffer+i,1); 305 305 continue;
Note:
See TracChangeset
for help on using the changeset viewer.