Changeset 140 in dev for BasicCompiler32/Compile_ProcOp.cpp
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_ProcOp.cpp
r135 r140 514 514 } 515 515 516 //新しいオブジェクト領域は0で初期化されているため、Nothingを明示的に代入する必要はない517 /*518 //実体クラスを持つメンバのコンストラクタ(引数有りを除く)を呼び出す519 for(i3=0;i3<pobj_CompilingClass->iMemberNum;i3++){520 CMember *pMember = pobj_CompilingClass->ppobj_Member[i3];521 if(pMember->IsObject()){522 // オブジェクトメンバを発見したとき523 524 sprintf(temporary, "This.%s=Nothing",525 pMember->name );526 OpcodeCalc( temporary );527 }528 }529 */530 531 516 //仮想関数テーブルを初期化 532 517 if(pobj_CompilingClass->vtbl_num&& … … 608 593 } 609 594 } 610 611 //実体クラスを持つメンバのデストラクタ呼び出しはGCに任せる612 /*613 //※コンストラクタと逆順序で呼び出す614 int offset;615 int MemberTypeSize;616 int MemberObjectNum;617 offset=GetTypeSize(DEF_OBJECT,(LONG_PTR)pobj_CompilingClass);618 for(i3=pobj_CompilingClass->iMemberNum-1;i3>=0;i3--){619 CMember *pMember = pobj_CompilingClass->ppobj_Member[i3];620 621 MemberTypeSize=622 GetTypeSize(pMember->TypeInfo.type,623 pMember->TypeInfo.u.lpIndex);624 625 MemberObjectNum=626 JumpSubScripts(pMember->SubScripts);627 628 offset-=MemberTypeSize*MemberObjectNum;629 630 if(pMember->TypeInfo.type==DEF_OBJECT){631 CMethod *method = pMember->TypeInfo.u.pobj_Class->GetDestructorMethod();632 if( method ){633 for(i4=MemberObjectNum-1;i4>=0;i4--){634 //Thisポインタをecxにコピー635 SetThisPtrToReg(REG_ECX);636 637 //add ecx,offset638 OpBuffer[obp++]=(char)0x81;639 OpBuffer[obp++]=(char)0xC1;640 *((long *)(OpBuffer+obp))=offset+i4*MemberTypeSize;641 obp+=sizeof(long);642 643 //push ecx644 op_push(REG_ECX);645 646 //call destructor647 op_call( method->pUserProc );648 }649 }650 }651 }*/652 595 } 653 596 }
Note:
See TracChangeset
for help on using the changeset viewer.