- Timestamp:
- Jul 26, 2008, 8:30:56 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
r672 r710 178 178 179 179 // グローバルエリアが置かれる関数名 180 std::string globalAreaProcName;180 const std::string &GetGlobalAreaProcName() const; 181 181 182 182 // 列挙型 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r693 r710 52 52 this->GetObjectModule().StaticLink( *pStaticLibrary, this->IsSll() ); 53 53 } 54 } 55 56 const std::string &Compiler::GetGlobalAreaProcName() const 57 { 58 static std::string globalAreaProcName; 59 60 if( globalAreaProcName.empty() ) 61 { 62 // 初期化 63 _ASSERTE( !this->GetModuleName().empty() ); 64 65 std::string originalName = this->GetModuleName(); 66 67 // モジュール名がシンボル名として使えない場合があるので、16進数文字列に変換する 68 char temporary[VN_SIZE*2] = ""; 69 for( int i=0; i<originalName.size(); i++ ) 70 { 71 sprintf( temporary + strlen(temporary), "%2x", originalName[i] ); 72 } 73 74 globalAreaProcName = (std::string)"_GlobalArea_" + temporary; 75 } 76 77 return globalAreaProcName; 54 78 } 55 79 … … 442 466 return true; 443 467 } 444 return ( pCompilingUserProc->GetName() == this-> globalAreaProcName);468 return ( pCompilingUserProc->GetName() == this->GetGlobalAreaProcName() ); 445 469 } 446 470 bool Compiler::IsLocalAreaCompiling() -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Procedure.cpp
r708 r710 1027 1027 compiler.GetNamespaceSupporter().ClearImportedNamespaces(); 1028 1028 1029 compiler.globalAreaProcName = "_GlobalArea_" + compiler.GetModuleName(); 1030 sprintf(temporary,"%c%c%s()",1,ESC_SUB,compiler.globalAreaProcName.c_str()); 1029 sprintf(temporary,"%c%c%s()",1,ESC_SUB,compiler.GetGlobalAreaProcName().c_str()); 1031 1030 UserProc *pUserProc = ParseUserProc( namespaceScopes, compiler.GetNamespaceSupporter().GetImportedNamespaces(), temporary, 0, false, NULL, false ); 1032 1031 -
trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
r709 r710 205 205 Compile_AddGlobalRootsForGc(); 206 206 } 207 else if( userProc.GetName() == compiler. globalAreaProcName)207 else if( userProc.GetName() == compiler.GetGlobalAreaProcName() ) 208 208 { 209 209 //////////////////////////////////////// -
trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp
r684 r710 243 243 pSub_System_StartupProgram->Using(); 244 244 245 if(pSub_System_GlobalArea=GetSubHash(compiler. globalAreaProcName.c_str(),1))245 if(pSub_System_GlobalArea=GetSubHash(compiler.GetGlobalAreaProcName().c_str(),1)) 246 246 { 247 247 pSub_System_GlobalArea->Using();
Note:
See TracChangeset
for help on using the changeset viewer.