Changeset 56 in dev for BasicCompiler32
- Timestamp:
- Feb 15, 2007, 3:39:40 AM (18 years ago)
- Location:
- BasicCompiler32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/BasicCompiler.vcproj
r50 r56 147 147 Optimization="2" 148 148 InlineFunctionExpansion="1" 149 AdditionalIncludeDirectories="..\cpplibs\boost" 149 150 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN" 150 151 StringPooling="true" … … 244 245 Optimization="2" 245 246 InlineFunctionExpansion="1" 247 AdditionalIncludeDirectories="..\cpplibs\boost" 246 248 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;ENG" 247 249 StringPooling="true" … … 828 830 Name="Parts" 829 831 > 832 <File 833 RelativePath="..\BasicCompiler_Common\DataTable.cpp" 834 > 835 </File> 830 836 <File 831 837 RelativePath="..\BasicCompiler_Common\LoopRefCheck.cpp" -
BasicCompiler32/Compile_Var.cpp
r55 r56 853 853 char *temp; 854 854 temp=(char *)i64data; 855 i2= AddDataTable(temp,lstrlen(temp));855 i2=dataTable.AddString(temp,lstrlen(temp)); 856 856 HeapDefaultFree(temp); 857 857 … … 1043 1043 char *temp; 1044 1044 temp=(char *)i64data; 1045 i2= AddDataTable(temp,lstrlen(temp));1045 i2=dataTable.AddString(temp,lstrlen(temp)); 1046 1046 HeapDefaultFree(temp); 1047 1047 -
BasicCompiler32/MakePeHdr.cpp
r51 r56 77 77 78 78 79 int AddDataTable(char *buffer,int length){80 extern HANDLE hHeap;81 extern char *DataTable;82 extern int DataTableSize;83 int RetNum;84 85 DataTable=(char *)HeapReAlloc(hHeap,0,DataTable,DataTableSize+length+1);86 memcpy(DataTable+DataTableSize,buffer,length);87 DataTable[DataTableSize+length]=0;88 89 RetNum=DataTableSize; //ImageBase+MemPos_DataSectionが後に足される90 91 DataTableSize+=length+1;92 93 return RetNum;94 }95 96 79 void DebugVariable(void){ 97 80 char temporary[255]; … … 136 119 ////////////////// 137 120 // データテーブル 138 extern char *DataTable; 139 extern int DataTableSize; 121 dataTable.Init(); 140 122 if(bDebugCompile){ 141 DataTable=(char *)HeapAlloc(hHeap,0,2); 142 DataTable[0]=2; 143 DataTable[1]=0; 144 DataTableSize=2; 145 } 146 else{ 147 DataTable=(char *)HeapAlloc(hHeap,0,1); 148 DataTableSize=0; 123 dataTable.Add( (long)0x00000002 ); 149 124 } 150 125 … … 828 803 829 804 //データセクションのファイル上のサイズ 830 if( DataTableSize%FILE_ALIGNMENT) FileSize_DataSection=DataTableSize+(FILE_ALIGNMENT-DataTableSize%FILE_ALIGNMENT);831 else FileSize_DataSection= DataTableSize;805 if(dataTable.GetSize()%FILE_ALIGNMENT) FileSize_DataSection=dataTable.GetSize()+(FILE_ALIGNMENT-dataTable.GetSize()%FILE_ALIGNMENT); 806 else FileSize_DataSection=dataTable.GetSize(); 832 807 if(FileSize_DataSection) bUse_DataSection=1; 833 808 else bUse_DataSection=0; … … 1556 1531 if(bUse_DataSection){ 1557 1532 //データ テーブル 1558 WriteFile(hFile, DataTable,DataTableSize,(DWORD *)&i2,NULL);1533 WriteFile(hFile,dataTable.GetPtr(),dataTable.GetSize(),(DWORD *)&i2,NULL); 1559 1534 i+=i2; 1560 1535 } … … 1648 1623 HeapDefaultFree(pHintTable); 1649 1624 1650 //データテーブルに関する情報を解放1651 HeapDefaultFree(DataTable);1652 1653 1625 //グローバル変数の初期バッファを解放 1654 1626 HeapDefaultFree(initGlobalBuf); -
BasicCompiler32/NumOpe.cpp
r55 r56 99 99 } 100 100 101 int i2;102 i 2=AddDataTable(lpszText,lstrlen(lpszText));101 // TODO: Ex表記による文字列長に対応する 102 int i2 = dataTable.AddString( lpszText ); 103 103 104 104 //push lpszPtr … … 244 244 bLiteralCalculation=0; 245 245 246 i2= AddDataTable(term,i3);246 i2=dataTable.AddString(term,i3); 247 247 248 248 //push DataSize -
BasicCompiler32/Opcode.h
r50 r56 78 78 }; 79 79 80 81 //MakePeHdr.cpp82 int AddDataTable(char *buffer,int length);83 80 84 81 //RSrcSection.cpp
Note:
See TracChangeset
for help on using the changeset viewer.