Changeset 87 in dev
- Timestamp:
- Apr 1, 2007, 2:28:03 AM (18 years ago)
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/BasicCompiler.vcproj
r79 r87 1848 1848 </Filter> 1849 1849 <Filter 1850 Name="Common Classes"1850 Name="Common Classes" 1851 1851 > 1852 1852 <File … … 1854 1854 > 1855 1855 </File> 1856 <File 1857 RelativePath="..\BasicCompiler_Common\Procedure.cpp" 1858 > 1859 </File> 1860 <File 1861 RelativePath="..\BasicCompiler_Common\Type.cpp" 1862 > 1863 </File> 1864 <File 1865 RelativePath="..\BasicCompiler_Common\TypeDef.cpp" 1866 > 1867 <FileConfiguration 1868 Name="Debug|Win32" 1869 > 1870 <Tool 1871 Name="VCCLCompilerTool" 1872 PreprocessorDefinitions="" 1873 /> 1874 </FileConfiguration> 1875 <FileConfiguration 1876 Name="Release|Win32" 1877 > 1878 <Tool 1879 Name="VCCLCompilerTool" 1880 PreprocessorDefinitions="" 1881 /> 1882 </FileConfiguration> 1883 <FileConfiguration 1884 Name="English_Rel|Win32" 1885 > 1886 <Tool 1887 Name="VCCLCompilerTool" 1888 PreprocessorDefinitions="" 1889 /> 1890 </FileConfiguration> 1891 </File> 1892 <File 1893 RelativePath="..\BasicCompiler_Common\Variable.cpp" 1894 > 1895 </File> 1856 <Filter 1857 Name="Meta Parts" 1858 > 1859 <File 1860 RelativePath="..\BasicCompiler_Common\Procedure.cpp" 1861 > 1862 </File> 1863 <File 1864 RelativePath="..\BasicCompiler_Common\Type.cpp" 1865 > 1866 </File> 1867 <File 1868 RelativePath="..\BasicCompiler_Common\TypeDef.cpp" 1869 > 1870 <FileConfiguration 1871 Name="Debug|Win32" 1872 > 1873 <Tool 1874 Name="VCCLCompilerTool" 1875 PreprocessorDefinitions="" 1876 /> 1877 </FileConfiguration> 1878 <FileConfiguration 1879 Name="Release|Win32" 1880 > 1881 <Tool 1882 Name="VCCLCompilerTool" 1883 PreprocessorDefinitions="" 1884 /> 1885 </FileConfiguration> 1886 <FileConfiguration 1887 Name="English_Rel|Win32" 1888 > 1889 <Tool 1890 Name="VCCLCompilerTool" 1891 PreprocessorDefinitions="" 1892 /> 1893 </FileConfiguration> 1894 </File> 1895 <File 1896 RelativePath="..\BasicCompiler_Common\Variable.cpp" 1897 > 1898 </File> 1899 </Filter> 1900 <Filter 1901 Name="Lexical Parts" 1902 > 1903 <File 1904 RelativePath="..\BasicCompiler_Common\src\Source.cpp" 1905 > 1906 </File> 1907 </Filter> 1896 1908 </Filter> 1897 1909 </Filter> … … 1941 1953 </Filter> 1942 1954 <Filter 1943 Name="Common Classes"1955 Name="Common Classes" 1944 1956 > 1945 1957 <File … … 1947 1959 > 1948 1960 </File> 1949 <File 1950 RelativePath="..\BasicCompiler_Common\Parameter.h" 1951 > 1952 </File> 1953 <File 1954 RelativePath="..\BasicCompiler_Common\Procedure.h" 1955 > 1956 </File> 1957 <File 1958 RelativePath="..\BasicCompiler_Common\Type.h" 1959 > 1960 </File> 1961 <File 1962 RelativePath="..\BasicCompiler_Common\TypeDef.h" 1963 > 1964 </File> 1961 <Filter 1962 Name="Meta Parts" 1963 > 1964 <File 1965 RelativePath="..\BasicCompiler_Common\Parameter.h" 1966 > 1967 </File> 1968 <File 1969 RelativePath="..\BasicCompiler_Common\Procedure.h" 1970 > 1971 </File> 1972 <File 1973 RelativePath="..\BasicCompiler_Common\Type.h" 1974 > 1975 </File> 1976 <File 1977 RelativePath="..\BasicCompiler_Common\TypeDef.h" 1978 > 1979 </File> 1980 <File 1981 RelativePath="..\BasicCompiler_Common\Variable.h" 1982 > 1983 </File> 1984 </Filter> 1985 <Filter 1986 Name="Lexical Parts" 1987 > 1988 <File 1989 RelativePath="..\BasicCompiler_Common\include\Source.h" 1990 > 1991 </File> 1992 </Filter> 1965 1993 </Filter> 1966 1994 </Filter> -
BasicCompiler32/Compile_Func.cpp
r79 r87 254 254 255 255 //オーバーロードを解決 256 pUserProc=OverloadSolution(name,subs,House:: procPointers[ProcPtr_BaseIndex]->Params(), Type() );256 pUserProc=OverloadSolution(name,subs,House::Meta::procPointers[ProcPtr_BaseIndex]->Params(), Type() ); 257 257 258 258 if(!pUserProc){ -
BasicCompiler32/MakePeHdr.cpp
r86 r87 152 152 153 153 //関数ポインタ情報を初期化 154 House:: procPointers.clear();154 House::Meta::procPointers.clear(); 155 155 156 156 //クラス名を取得(詳細情報はGetAllClassInfoで取得) … … 161 161 162 162 //TypeDef情報を初期化 163 House:: typeDefs.Init();163 House::Meta::typeDefs.Init(); 164 164 165 165 //定数情報を取得 -
BasicCompiler64/BasicCompiler.vcproj
r84 r87 472 472 > 473 473 </File> 474 <File 475 RelativePath="..\BasicCompiler_Common\Parameter.h" 476 > 477 </File> 478 <File 479 RelativePath="..\BasicCompiler_Common\Procedure.h" 480 > 481 </File> 482 <File 483 RelativePath="..\BasicCompiler_Common\Type.h" 484 > 485 </File> 486 <File 487 RelativePath="..\BasicCompiler_Common\TypeDef.h" 488 > 489 </File> 490 <File 491 RelativePath="..\BasicCompiler_Common\Variable.h" 492 > 493 </File> 474 <Filter 475 Name="Meta Parts" 476 > 477 <File 478 RelativePath="..\BasicCompiler_Common\Parameter.h" 479 > 480 </File> 481 <File 482 RelativePath="..\BasicCompiler_Common\Procedure.h" 483 > 484 </File> 485 <File 486 RelativePath="..\BasicCompiler_Common\Type.h" 487 > 488 </File> 489 <File 490 RelativePath="..\BasicCompiler_Common\TypeDef.h" 491 > 492 </File> 493 <File 494 RelativePath="..\BasicCompiler_Common\Variable.h" 495 > 496 </File> 497 </Filter> 498 <Filter 499 Name="Lexical Parts" 500 > 501 <File 502 RelativePath="..\BasicCompiler_Common\include\Source.h" 503 > 504 </File> 505 </Filter> 494 506 </Filter> 495 507 </Filter> … … 1526 1538 </Filter> 1527 1539 <Filter 1528 Name="Common Classes"1540 Name="Common Classes" 1529 1541 > 1530 1542 <File … … 1532 1544 > 1533 1545 </File> 1534 <File 1535 RelativePath="..\BasicCompiler_Common\Procedure.cpp" 1536 > 1537 </File> 1538 <File 1539 RelativePath="..\BasicCompiler_Common\Type.cpp" 1540 > 1541 </File> 1542 <File 1543 RelativePath="..\BasicCompiler_Common\TypeDef.cpp" 1544 > 1545 </File> 1546 <File 1547 RelativePath="..\BasicCompiler_Common\Variable.cpp" 1548 > 1549 </File> 1546 <Filter 1547 Name="Meta Parts" 1548 > 1549 <File 1550 RelativePath="..\BasicCompiler_Common\Procedure.cpp" 1551 > 1552 </File> 1553 <File 1554 RelativePath="..\BasicCompiler_Common\Type.cpp" 1555 > 1556 </File> 1557 <File 1558 RelativePath="..\BasicCompiler_Common\TypeDef.cpp" 1559 > 1560 </File> 1561 <File 1562 RelativePath="..\BasicCompiler_Common\Variable.cpp" 1563 > 1564 </File> 1565 </Filter> 1566 <Filter 1567 Name="Lexical Parts" 1568 > 1569 <File 1570 RelativePath="..\BasicCompiler_Common\src\Source.cpp" 1571 > 1572 </File> 1573 </Filter> 1550 1574 </Filter> 1551 1575 </Filter> -
BasicCompiler64/Compile_Func.cpp
r79 r87 102 102 103 103 //オーバーロードを解決 104 pUserProc=OverloadSolution(name,subs,House:: procPointers[ProcPtr_BaseIndex]->Params(), Type() );104 pUserProc=OverloadSolution(name,subs,House::Meta::procPointers[ProcPtr_BaseIndex]->Params(), Type() ); 105 105 106 106 if(!pUserProc){ -
BasicCompiler64/MakePeHdr.cpp
r86 r87 137 137 138 138 //関数ポインタ情報を初期化 139 House:: procPointers.clear();139 House::Meta::procPointers.clear(); 140 140 141 141 //クラス名を取得(詳細情報はGetAllClassInfoで取得) … … 146 146 147 147 //TypeDef情報を初期化 148 House:: typeDefs.Init();148 House::Meta::typeDefs.Init(); 149 149 150 150 //定数情報を取得 … … 157 157 //クラス情報を取得(※注 - GetSubInfoの後に呼び出す) 158 158 pobj_DBClass->GetAllClassInfo(); 159 160 // 実行時型情報の確定コード(InitializeUserTypesメソッドの実装コード)を生成 161 pobj_DBClass->GenerateRuntimeTypeInfo(); 159 162 160 163 //コードと行番号の関係 -
BasicCompiler_Common/Class.cpp
r85 r87 1424 1424 } 1425 1425 1426 void CDBClass::GenerateRuntimeTypeInfo(){ 1427 } 1428 1429 1430 1426 1431 CClass *CDBClass::GetStringClass() const 1427 1432 { -
BasicCompiler_Common/Class.h
r78 r87 217 217 void GetClass_recur(const char *lpszInheritsClass); 218 218 void GetAllClassInfo(void); 219 void GenerateRuntimeTypeInfo(); 219 220 220 221 -
BasicCompiler_Common/DebugMiddleFile.cpp
r79 r87 138 138 // TypeDef情報 139 139 ////////////////// 140 *(long *)(buffer+i2)=(int)House:: typeDefs.size();141 i2+=sizeof(long); 142 for(i3=0;i3<(int)House:: typeDefs.size();i3++){143 lstrcpy(buffer+i2,House:: typeDefs[i3].GetNewName().c_str() );144 i2+=lstrlen(buffer+i2)+1; 145 146 lstrcpy(buffer+i2,House:: typeDefs[i3].GetBaseName().c_str() );140 *(long *)(buffer+i2)=(int)House::Meta::typeDefs.size(); 141 i2+=sizeof(long); 142 for(i3=0;i3<(int)House::Meta::typeDefs.size();i3++){ 143 lstrcpy(buffer+i2,House::Meta::typeDefs[i3].GetNewName().c_str() ); 144 i2+=lstrlen(buffer+i2)+1; 145 146 lstrcpy(buffer+i2,House::Meta::typeDefs[i3].GetBaseName().c_str() ); 147 147 i2+=lstrlen(buffer+i2)+1; 148 148 … … 505 505 506 506 //初期化 507 House:: typeDefs.clear();507 House::Meta::typeDefs.clear(); 508 508 509 509 //個数を取得 … … 514 514 i2+=lstrlen(buffer+i2)+1; 515 515 516 House:: typeDefs.push_back( TypeDef( temp5, buffer+i2 ) );516 House::Meta::typeDefs.push_back( TypeDef( temp5, buffer+i2 ) ); 517 517 518 518 i2+=lstrlen(buffer+i2)+1; -
BasicCompiler_Common/Subroutine.cpp
r79 r87 180 180 GetVarType(fullCallName,type,false); 181 181 182 ProcPointer *pProcPtr = House:: procPointers[type.GetIndex()];182 ProcPointer *pProcPtr = House::Meta::procPointers[type.GetIndex()]; 183 183 resultType = pProcPtr->ReturnType(); 184 184 … … 781 781 pProcPointer->SetParamsAndReturnType( paramStr.c_str(), nowLine ); 782 782 783 House:: procPointers.push_back( pProcPointer );784 785 return (int)House:: procPointers.size()-1;783 House::Meta::procPointers.push_back( pProcPointer ); 784 785 return (int)House::Meta::procPointers.size()-1; 786 786 } 787 787 void DeleteProcPtrInfo(void){ 788 BOOST_FOREACH( ProcPointer *pProcPointer, House:: procPointers ){788 BOOST_FOREACH( ProcPointer *pProcPointer, House::Meta::procPointers ){ 789 789 delete pProcPointer; 790 790 } 791 791 792 House:: procPointers.clear();793 } 792 House::Meta::procPointers.clear(); 793 } -
BasicCompiler_Common/Type.cpp
r78 r87 89 89 // TypeDefされた型 90 90 //////////////////// 91 int i=House:: typeDefs.GetIndex( typeName.c_str() );91 int i=House::Meta::typeDefs.GetIndex( typeName.c_str() ); 92 92 if(i!=-1){ 93 type = House:: typeDefs[i].GetBaseType();93 type = House::Meta::typeDefs[i].GetBaseType(); 94 94 return true; 95 95 } … … 463 463 } 464 464 else{ 465 if( House:: procPointers[index]->ReturnType().IsNull() ){465 if( House::Meta::procPointers[index]->ReturnType().IsNull() ){ 466 466 return "*Sub"; 467 467 } -
BasicCompiler_Common/TypeDef.cpp
r79 r87 126 126 cp = nowLine; 127 127 128 House:: typeDefs.Add(temporary,pTemp);128 House::Meta::typeDefs.Add(temporary,pTemp); 129 129 } 130 130 … … 164 164 if(basbuf[i]=='\0') break; 165 165 } 166 House:: typeDefs.Add(temporary,"Long");166 House::Meta::typeDefs.Add(temporary,"Long"); 167 167 } 168 168 } -
BasicCompiler_Common/VariableOpe.cpp
r79 r87 220 220 if(lpIndex==-1) lstrcpy(name,"VoidPtr"); 221 221 else{ 222 if( House:: procPointers[lpIndex]->ReturnType().IsNull() )222 if( House::Meta::procPointers[lpIndex]->ReturnType().IsNull() ) 223 223 lstrcpy(name,"*Sub"); 224 224 else lstrcpy(name,"*Function"); -
BasicCompiler_Common/include/House.h
r78 r87 1 1 #pragma once 2 2 3 #include "Source.h" 3 4 #include "../TypeDef.h" 4 5 5 6 class House{ 6 7 public: 7 // TypeDef 8 static TypeDefCollection typeDefs; 9 static vector<ProcPointer *> procPointers; 8 9 class Lexical{ 10 public: 11 static BasicSource source; 12 }; 13 14 class Meta{ 15 public: 16 // TypeDef 17 static TypeDefCollection typeDefs; 18 static vector<ProcPointer *> procPointers; 19 }; 10 20 }; -
BasicCompiler_Common/src/House.cpp
r78 r87 1 1 #include <..\common.h> 2 2 3 TypeDefCollection House:: typeDefs;4 vector<ProcPointer *> House:: procPointers;3 TypeDefCollection House::Meta::typeDefs; 4 vector<ProcPointer *> House::Meta::procPointers;
Note:
See TracChangeset
for help on using the changeset viewer.