Changeset 641 in dev for trunk/ab5.0/abdev/compiler_x86
- Timestamp:
- Jun 15, 2008, 11:59:46 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/compiler_x86
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
r637 r641 24 24 } 25 25 26 const UserProc *pBackUserProc;27 pBackUserProc = &compiler.GetCompilingUserProc();28 compiler.StartGlobalAreaCompile();29 30 26 int BackCp; 31 27 BackCp=cp; … … 52 48 GetGlobalDataForDll(); 53 49 54 compiler.SetCompilingUserProc( pBackUserProc );55 50 cp=BackCp; 56 51 … … 81 76 compiler.codeGenerator.op_ret(); 82 77 } 83 else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ){ 84 85 const UserProc *pBackUserProc; 86 pBackUserProc = &compiler.GetCompilingUserProc(); 87 compiler.StartGlobalAreaCompile(); 88 78 else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ) 79 { 89 80 compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd(); 90 81 91 82 compiler.SetCompilingUserProc( pBackUserProc ); 92 93 83 94 84 //ret … … 213 203 else if( userProc.GetName() == "RegisterGlobalRoots" 214 204 && userProc.HasParentClass() 215 && userProc.GetParentClass().GetName() == "_System_CGarbageCollection" ){ 216 217 Compile_AddGlobalRootsForGc(); 218 } 219 else if( userProc.GetName() == compiler.globalAreaProcName ){ 205 && userProc.GetParentClass().GetName() == "_System_CGarbageCollection" ) 206 { 207 Compile_AddGlobalRootsForGc(); 208 } 209 else if( userProc.GetName() == compiler.globalAreaProcName ) 210 { 220 211 //////////////////////////////////////// 221 212 // グローバル領域をコンパイル … … 223 214 224 215 UserProc::pGlobalProc = &userProc; 225 226 const UserProc *pBackUserProc = &compiler.GetCompilingUserProc();227 compiler.StartGlobalAreaCompile();228 216 229 217 int BackCp = cp; … … 251 239 } 252 240 253 compiler.SetCompilingUserProc( pBackUserProc );254 241 cp=BackCp; 255 242 } … … 293 280 pUserProc->CompleteCompile(); 294 281 295 extern BOOL bSystemProc;296 if(memcmp(pUserProc->GetName().c_str(),"_System_",8)==0) bSystemProc=1;297 else bSystemProc=0;298 299 282 extern BOOL bDebugSupportProc; 300 283 if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0) … … 316 299 compiler.StartProcedureCompile( pUserProc ); 317 300 318 if(pUserProc->Is System()){301 if(pUserProc->IsAutoGenerationSystem()){ 319 302 //////////////////// 320 303 // 特殊関数 -
trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp
r632 r641 1329 1329 } 1330 1330 } 1331 void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar){ 1331 void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar) 1332 { 1332 1333 if( reg != REG_EAX ){ 1333 1334 compiler.errorMessenger.OutputFatalError(); … … 1337 1338 } 1338 1339 1339 bool Compile_AddGlobalRootsForGc(){ 1340 bool Compile_AddGlobalRootsForGc() 1341 { 1340 1342 const UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" ); 1341 if( !pUserProc_AddGlobalRootPtr ){ 1343 if( !pUserProc_AddGlobalRootPtr ) 1344 { 1342 1345 compiler.errorMessenger.Output(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 ); 1343 1346 return false; -
trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp
r640 r641 260 260 if(pSub_System_GetEip=GetSubHash("_System_GetEip",1)){ 261 261 pSub_System_GetEip->Using(); 262 pSub_System_GetEip->ThisIs SystemProc();262 pSub_System_GetEip->ThisIsAutoGenerationSystemProc(); 263 263 } 264 264 265 265 if(pSub_System_InitDllGlobalVariables=GetSubHash("_System_InitDllGlobalVariables",1)){ 266 266 pSub_System_InitDllGlobalVariables->Using(); 267 pSub_System_InitDllGlobalVariables->ThisIs SystemProc();267 pSub_System_InitDllGlobalVariables->ThisIsAutoGenerationSystemProc(); 268 268 } 269 269 270 270 if(pSub_System_InitStaticLocalVariables=GetSubHash("_System_InitStaticLocalVariables",1)){ 271 271 pSub_System_InitStaticLocalVariables->Using(); 272 pSub_System_InitStaticLocalVariables->ThisIs SystemProc();272 pSub_System_InitStaticLocalVariables->ThisIsAutoGenerationSystemProc(); 273 273 } 274 274 275 275 if(pSub_System_Call_Destructor_of_GlobalObject=GetSubHash("_System_Call_Destructor_of_GlobalObject",1)){ 276 276 pSub_System_Call_Destructor_of_GlobalObject->Using(); 277 pSub_System_Call_Destructor_of_GlobalObject->ThisIs SystemProc();277 pSub_System_Call_Destructor_of_GlobalObject->ThisIsAutoGenerationSystemProc(); 278 278 } 279 279 … … 329 329 pSub_allrem=GetSubHash("_allrem"); 330 330 pSub_allrem->Using(); 331 pSub_allrem->ThisIs SystemProc();331 pSub_allrem->ThisIsAutoGenerationSystemProc(); 332 332 333 333 pSub_aullrem=GetSubHash("_aullrem"); 334 334 pSub_aullrem->Using(); 335 pSub_aullrem->ThisIs SystemProc();335 pSub_aullrem->ThisIsAutoGenerationSystemProc(); 336 336 337 337 pSub_allmul=GetSubHash("_allmul"); 338 338 pSub_allmul->Using(); 339 pSub_allmul->ThisIs SystemProc();339 pSub_allmul->ThisIsAutoGenerationSystemProc(); 340 340 341 341 pSub_alldiv=GetSubHash("_alldiv"); 342 342 pSub_alldiv->Using(); 343 pSub_alldiv->ThisIs SystemProc();343 pSub_alldiv->ThisIsAutoGenerationSystemProc(); 344 344 345 345 pSub_aulldiv=GetSubHash("_aulldiv"); 346 346 pSub_aulldiv->Using(); 347 pSub_aulldiv->ThisIs SystemProc();347 pSub_aulldiv->ThisIsAutoGenerationSystemProc(); 348 348 349 349 pSub_allshl=GetSubHash("_allshl"); 350 350 pSub_allshl->Using(); 351 pSub_allshl->ThisIs SystemProc();351 pSub_allshl->ThisIsAutoGenerationSystemProc(); 352 352 353 353 pSub_allshr=GetSubHash("_allshr"); 354 354 pSub_allshr->Using(); 355 pSub_allshr->ThisIs SystemProc();355 pSub_allshr->ThisIsAutoGenerationSystemProc(); 356 356 357 357 pSub_aullshr=GetSubHash("_aullshr"); 358 358 pSub_aullshr->Using(); 359 pSub_aullshr->ThisIs SystemProc();359 pSub_aullshr->ThisIsAutoGenerationSystemProc(); 360 360 361 361 pSub_esp_error=GetSubHash("_esp_error");
Note:
See TracChangeset
for help on using the changeset viewer.