Changeset 67 in dev for BasicCompiler_Common
- Timestamp:
- Mar 11, 2007, 3:25:42 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Class.cpp
r64 r67 118 118 pobj_c=pobj_DBClass->Iterator_GetNext(); 119 119 120 int i=0; 120 121 foreach( CMember *member, pobj_c->staticMembers ){ 121 122 char temporary[VN_SIZE]; … … 137 138 OpBuffer=(char *)HeapReAlloc(hHeap,0,OpBuffer,obp_AllocSize); //matea 138 139 } 140 i++; 139 141 } 140 142 } … … 671 673 } 672 674 673 CDBClass::CDBClass(){ 674 memset(this,0,sizeof(CDBClass)); 675 CDBClass::CDBClass(): 676 pStringClass( NULL ), 677 pObjectClass( NULL ), 678 pCompilingClass( NULL ), 679 pCompilingMethod( NULL ), 680 ppobj_IteClass( NULL ), 681 iIteMaxNum( 0 ), 682 iIteNextNum( 0 ) 683 { 684 memset( pobj_ClassHash, 0, MAX_CLASS_HASH * sizeof(CClass *) ); 675 685 } 676 686 CDBClass::~CDBClass(){ … … 731 741 //Stringクラス 732 742 pobj_StringClass=pobj_c; 743 } 744 if( lstrcmp( name, "Object" ) == 0 ){ 745 pObjectClass = pobj_c; 733 746 } 734 747 … … 1421 1434 } 1422 1435 1423 void CDBClass::Get ObjectClassInfo(void){1436 void CDBClass::GetAllClassInfo(void){ 1424 1437 //ループ継承チェック用のクラス 1425 1438 pobj_LoopRefCheck=new CLoopRefCheck(); … … 1430 1443 delete pobj_LoopRefCheck; 1431 1444 pobj_LoopRefCheck=0; 1445 } 1446 1447 CClass *CDBClass::GetStringClass() const 1448 { 1449 if( !pStringClass ){ 1450 SetError(); 1451 return NULL; 1452 } 1453 return pStringClass; 1454 } 1455 CClass *CDBClass::GetObjectClass() const 1456 { 1457 if( !pObjectClass ){ 1458 SetError(); 1459 return NULL; 1460 } 1461 return pObjectClass; 1432 1462 } 1433 1463 -
BasicCompiler_Common/Class.h
r64 r67 229 229 void InitNames(void); 230 230 void GetClass_recur(const char *lpszInheritsClass); 231 void GetObjectClassInfo(void); 231 void GetAllClassInfo(void); 232 233 234 ///////////////////////////// 235 // 特殊クラス 236 ///////////////////////////// 237 CClass *pStringClass; 238 CClass *pObjectClass; 239 CClass *GetStringClass() const; 240 CClass *GetObjectClass() const; 232 241 233 242 -
BasicCompiler_Common/Intermediate_Step1.cpp
r64 r67 872 872 case 'n': 873 873 case 'N': 874 if(lstrcmpi(temporary+i3,"Not")==0){ 874 if(lstrcmpi(temporary+i3,"New")==0){ 875 i2=i3; 876 temporary[i2++]=1; 877 temporary[i2]=ESC_NEW; 878 } 879 else if(lstrcmpi(temporary+i3,"Not")==0){ 875 880 i2=i3; 876 881 temporary[i2++]=1; 877 882 temporary[i2]=ESC_NOT; 878 }879 else if(lstrcmpi(temporary+i3,"New")==0){880 i2=i3;881 temporary[i2++]=1;882 temporary[i2]=ESC_NEW;883 883 } 884 884 break; -
BasicCompiler_Common/NumOpe_GetType.cpp
r64 r67 492 492 493 493 494 // Nothing 495 if( lstrcmp( term, "Nothing" ) == 0 ){ 496 type[sp] = DEF_OBJECT; 497 if( pBaseType && pBaseType->type == DEF_OBJECT ){ 498 index_stack[sp] = pBaseType->u.lpIndex; 499 } 500 else{ 501 index_stack[sp] = (LONG_PTR)pobj_DBClass->GetObjectClass(); 502 } 503 bLiteralCalculation = 0; 504 sp++; 505 break; 506 } 507 508 494 509 i2=GetVarType(term,&index_stack[sp],0); 495 510 if(i2!=-1){ -
BasicCompiler_Common/Variable.cpp
r64 r67 1029 1029 if(pTypeInfo->type==-1){ 1030 1030 SetError(3,temporary,cp); 1031 return 0;1031 pTypeInfo->type=DEF_LONG; 1032 1032 } 1033 1033 -
BasicCompiler_Common/preprocessor.cpp
r55 r67 142 142 CDefine *pobj_define; 143 143 144 int Search_endif(char *buffer,int i ){144 int Search_endif(char *buffer,int i, int *pLine = 0){ 145 145 for(;;i++){ 146 146 if(buffer[i]=='\0') break; 147 147 148 if( buffer[i] == '\n' ){ 149 if( pLine ){ 150 (*pLine)++; 151 } 152 } 153 148 154 if(buffer[i-1]=='\n'){ 149 155 if(_memicmp(buffer+i,"#ifdef",6)==0||_memicmp(buffer+i,"#ifndef",7)==0){ 150 i=Search_endif(buffer,i+6 );156 i=Search_endif(buffer,i+6, pLine); 151 157 if(buffer[i]=='\0') break; 152 158 continue; … … 229 235 if(i2==0||buffer[i2-1]=='\n'){ 230 236 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 231 i2=Search_endif(buffer,i2+6 );237 i2=Search_endif(buffer,i2+6, &i3 ); 232 238 if(buffer[i2]=='\0') break; 233 239 continue; … … 256 262 if(i2==0||buffer[i2-1]=='\n'){ 257 263 if(_memicmp(buffer+i2,"#ifdef",6)==0||_memicmp(buffer+i2,"#ifndef",7)==0){ 258 i2=Search_endif(buffer,i2+6 );264 i2=Search_endif(buffer,i2+6, &i3 ); 259 265 if(buffer[i2]=='\0') break; 260 266 continue;
Note:
See TracChangeset
for help on using the changeset viewer.