Changeset 95 in dev for BasicCompiler64
- Timestamp:
- Apr 15, 2007, 1:34:02 AM (18 years ago)
- Location:
- BasicCompiler64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_ProcOp.cpp
r94 r95 205 205 206 206 pobj_DBClass->Compile_System_InitializeUserTypes(); 207 } 208 else if( userProc.GetName() == "RegisterGlobalRoots" 209 && userProc.HasParentClass() 210 && (string)userProc.GetParentClass().name == "_System_CGarbageCollection" ){ 211 212 Compile_AddGlobalRootsForGc(); 207 213 } 208 214 else{ -
BasicCompiler64/Compile_Var.cpp
r89 r95 1314 1314 } 1315 1315 } 1316 1317 bool Compile_AddGlobalRootsForGc(){ 1318 UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" ); 1319 if( !pUserProc_AddGlobalRootPtr ){ 1320 SetError(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 ); 1321 return false; 1322 } 1323 1324 BOOST_FOREACH( const Variable *pVar, globalVars ){ 1325 if( pVar->IsObject() || pVar->IsPointer() || pVar->IsStruct() ){ 1326 // オブジェクトまたはポインタだったとき 1327 // ※構造体も含む(暫定対応) 1328 1329 // 変数領域に要するLONG_PTR単位の個数を引き渡す 1330 //mov r8,count 1331 op_mov_RV(sizeof(_int64), REG_R8,pVar->GetMemorySize()/PTR_SIZE); 1332 1333 // ルートポインタを引き渡す 1334 //mov rdx,offset 1335 op_mov_RV(sizeof(_int64), REG_RDX,(int)pVar->offset); 1336 obp-=sizeof(long); 1337 pobj_GlobalVarSchedule->add(); 1338 obp+=sizeof(long); 1339 1340 // Thisポインタを引き渡す 1341 SetThisPtrToReg(REG_RCX); 1342 1343 // call AddGlobalRootPtr 1344 op_call( pUserProc_AddGlobalRootPtr ); 1345 1346 ReallocNativeCodeBuffer(); 1347 } 1348 } 1349 1350 return true; 1351 } -
BasicCompiler64/MakePeHdr.cpp
r91 r95 6 6 // 特殊関数の構造体ポインタ 7 7 //////////////////////////// 8 9 // グローバル関数、静的メソッド 8 10 UserProc 9 11 *pSub_System_StartupProgram, … … 24 26 *pSub_System_GC_free_for_SweepingDelete, 25 27 *pSubStaticMethod_System_TypeBase_InitializeUserTypes; 28 29 // 動的メソッド 30 UserProc 31 *pUserProc_System_CGarbageCollection_RegisterGlobalRoots; 26 32 27 33 … … 231 237 pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using(); 232 238 pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsAutoGenerationProc(); 239 } 240 241 if( pUserProc_System_CGarbageCollection_RegisterGlobalRoots = GetClassMethod( "_System_CGarbageCollection", "RegisterGlobalRoots" ) ){ 242 pUserProc_System_CGarbageCollection_RegisterGlobalRoots->Using(); 243 pUserProc_System_CGarbageCollection_RegisterGlobalRoots->ThisIsAutoGenerationProc(); 233 244 } 234 245 -
BasicCompiler64/Opcode.h
r79 r95 325 325 void dim( char *VarName,int *SubScripts,Type &type,char *InitBuf,char *ConstractParameter,DWORD dwFlags); 326 326 void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar); 327 bool Compile_AddGlobalRootsForGc(); 327 328 328 329 //ParamImpl.cpp
Note:
See TracChangeset
for help on using the changeset viewer.