Changeset 95 in dev for BasicCompiler64/Compile_Var.cpp
- Timestamp:
- Apr 15, 2007, 1:34:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.