Changeset 308 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Aug 29, 2007, 9:05:22 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp
r302 r308 1 1 #include "stdafx.h" 2 3 #include <jenga/include/common/Path.h> 2 4 3 5 #include <jenga/include/smoothie/Smoothie.h> … … 800 802 // 出力ファイル名を絶対パスに変換 801 803 GetFullPath(OutputFileName,baseDirPath.c_str()); 804 805 // モジュール名をセット 806 compiler.SetModuleName( Jenga::Common::Path( OutputFileName ).GetFileName() ); 802 807 } 803 808 -
trunk/abdev/BasicCompiler_Common/MakeExe.cpp
r304 r308 58 58 //プログラムをファイルから読み込む 59 59 extern char SourceFileName[MAX_PATH]; 60 compiler.GetObjectModule().SetCurrentSourceIndex( compiler.GetObjectModule().GetSources().size() );60 compiler.GetObjectModule().SetCurrentSourceIndex( (int)compiler.GetObjectModule().GetSources().size() ); 61 61 compiler.GetObjectModule().GetSources().push_back( BasicSource() ); 62 62 if( !compiler.GetObjectModule().GetCurrentSource().ReadFile( SourceFileName ) ){ … … 151 151 152 152 char coreFilePath[MAX_PATH]; 153 #ifdef _AMD64_ 154 sprintf( coreFilePath, "..\\lib\\x64\\%s", coreFileName ); 155 #else 153 156 sprintf( coreFilePath, "..\\lib\\%s", coreFileName ); 157 #endif 154 158 GetFullPath( coreFilePath, szIncludeDir ); 155 159 -
trunk/abdev/BasicCompiler_Common/Subroutine.cpp
r299 r308 424 424 if(source[i]=='\0') break; 425 425 } 426 427 //////////// 428 // 特殊関数 429 //////////// 430 namespaceScopes.clear(); 431 importedNamespaces.clear(); 432 433 compiler.globalAreaProcName = "_System_GlobalArea_" + compiler.GetModuleName(); 434 sprintf(temporary,"%c%c%s()",1,ESC_SUB,compiler.globalAreaProcName.c_str()); 435 userProcs.Add( namespaceScopes, importedNamespaces, temporary,0,false,NULL,false); 426 436 } 427 437 -
trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
r301 r308 1156 1156 } 1157 1157 } 1158 1159 void DebugVariable(void) 1160 { 1161 char temporary[255]; 1162 if( compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( "_DebugSys_dwThreadID" ) ) == NULL ) 1163 { 1164 // 未定義の場合は定義する 1165 sprintf(temporary,"_DebugSys_dwThreadID[255]%c%cDWord",1,ESC_AS); 1166 OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR); 1167 sprintf(temporary,"_DebugSys_ProcNum[255]%c%cDWord",1,ESC_AS); 1168 OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR); 1169 sprintf(temporary,"_DebugSys_lplpObp[255]%c%c*ULONG_PTR",1,ESC_AS); 1170 OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR); 1171 sprintf(temporary,"_DebugSys_lplpSpBase[255]%c%c*ULONG_PTR",1,ESC_AS); 1172 OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR); 1173 } 1174 } -
trunk/abdev/BasicCompiler_Common/VariableOpe.h
r290 r308 36 36 void dim(char *Parameter,DWORD dwFlags); 37 37 void OpcodeDim(char *Parameter,DWORD dwFlags); 38 void DebugVariable(void); -
trunk/abdev/BasicCompiler_Common/common.h
r299 r308 369 369 void SetError(); 370 370 void CompileMessage(const char *buffer); 371 bool CheckDifferentType(const int VarType,const LONG_PTR lpVarIndex,const int CalcType,const LONG_PTR lpCalcIndex,const char *pszFuncName,const int ParmNum);372 371 bool CheckDifferentType( const Type &varType,const Type &calcType,const char *pszFuncName,const int ParmNum); 373 372 … … 377 376 void SplitGenericClassInstance( const char *fullName, char *className, Jenga::Common::Strings &typeParameters ); 378 377 int JumpStatement(const char *source, int &pos); 379 void DebugVariable(void);380 378 void Compile(void); 381 379 -
trunk/abdev/BasicCompiler_Common/include/Compiler.h
r299 r308 11 11 class Compiler 12 12 { 13 // モジュール名 14 std::string moduleName; 15 13 16 // 名前空間サポート 14 17 NamespaceSupporter namespaceSupporter; … … 43 46 void StaticLink( ObjectModules &staticLibraries ); 44 47 48 // モジュール名 49 void SetModuleName( const std::string &moduleName ) 50 { 51 this->moduleName = moduleName; 52 } 53 const std::string &GetModuleName() const 54 { 55 return moduleName; 56 } 57 58 // 名前空間サポート 45 59 NamespaceSupporter &GetNamespaceSupporter() 46 60 { … … 122 136 } 123 137 138 // グローバルエリアが置かれる関数名 139 std::string globalAreaProcName; 140 124 141 125 142 bool StringToType( const std::string &typeName, Type &type ); -
trunk/abdev/BasicCompiler_Common/include/Source.h
r304 r308 50 50 int GetFileCounts() const 51 51 { 52 return filePaths.size();52 return (int)filePaths.size(); 53 53 } 54 54 … … 56 56 { 57 57 filePaths.push_back( filePath ); 58 return filePaths.size()-1;58 return (int)filePaths.size()-1; 59 59 } 60 60 void AddLine( int fileNumber ) … … 65 65 int GetLineCounts() const 66 66 { 67 return lineFileNumbers.size();67 return (int)lineFileNumbers.size(); 68 68 } 69 69 }; -
trunk/abdev/BasicCompiler_Common/src/ObjectModule.cpp
r287 r308 15 15 { 16 16 long dataSectionBaseOffset = dataTable.GetSize(); 17 int sourceIndexBase = sources.size();17 int sourceIndexBase = (int)sources.size(); 18 18 19 19 // メタ情報を結合
Note:
See TracChangeset
for help on using the changeset viewer.