Index: BasicCompiler64/CParameter.cpp
===================================================================
--- BasicCompiler64/CParameter.cpp	(revision 50)
+++ BasicCompiler64/CParameter.cpp	(revision 51)
@@ -96,7 +96,7 @@
 
 			//call destructor
-			int i5 = types[i2].u.pobj_Class->DestructorMemberSubIndex;
-			if( i5 != -1 ){
-				op_call( types[i2].u.pobj_Class->ppobj_Method[i5]->psi );
+			CMethod *method = types[i2].u.pobj_Class->GetDestructorMethod();
+			if( method ){
+				op_call( method->psi );
 			}
 
@@ -138,6 +138,6 @@
 		CalcType.type=NumOpe_GetType(Parameter,&BaseType,&CalcType.u.lpIndex);
 
-		if(pobj_Class->CopyConstructorMemberSubIndex!=-1&&
-			CalcType.type==DEF_OBJECT&&CalcType.u.pobj_Class==pobj_Class){
+		if( pobj_Class->GetCopyConstructorMethod()
+			&& CalcType.type==DEF_OBJECT&&CalcType.u.pobj_Class==pobj_Class){
 			////////////////////////////////////
 			// コピーコンストラクタを呼び出す
@@ -160,5 +160,5 @@
 
 			//call constructor
-			op_call(pobj_Class->ppobj_Method[pobj_Class->CopyConstructorMemberSubIndex]->psi);
+			op_call(pobj_Class->GetCopyConstructorMethod()->psi);
 
 
@@ -168,5 +168,5 @@
 		}
 		else{
-			if(pobj_Class->ConstructorMemberSubIndex!=-1){
+			if( pobj_Class->GetConstructorMethod() ){
 				////////////////////////////////
 				// コンストラクタを呼び出す
@@ -177,5 +177,5 @@
 
 				//call constructor
-				op_call(pobj_Class->ppobj_Method[pobj_Class->ConstructorMemberSubIndex]->psi);
+				op_call(pobj_Class->GetConstructorMethod()->psi);
 			}
 
Index: BasicCompiler64/Compile_CallProc.cpp
===================================================================
--- BasicCompiler64/Compile_CallProc.cpp	(revision 50)
+++ BasicCompiler64/Compile_CallProc.cpp	(revision 51)
@@ -97,5 +97,5 @@
 
 void Opcode_CallProc(char *Parameter,SUBINFO *psi,DWORD dwFlags,char *ObjectName,int RefType){
-	int i,i2;
+	int i2;
 
 	if(psi->dwType==SUBTYPE_MACRO){
@@ -348,8 +348,5 @@
 		op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);
 
-		for(i=0,i2=0;i<pobj_c->iMethodNum;i++){
-			if(pobj_c->ppobj_Method[i]->psi==psi) break;
-			if(pobj_c->ppobj_Method[i]->psi->bVirtual) i2++;
-		}
+		i2 = pobj_c->GetFuncNumInVtbl( psi );
 
 		//call qword ptr[r11+func_index]
Index: BasicCompiler64/Compile_Func.cpp
===================================================================
--- BasicCompiler64/Compile_Func.cpp	(revision 50)
+++ BasicCompiler64/Compile_Func.cpp	(revision 51)
@@ -172,9 +172,5 @@
 		op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);
 
-		int i,i2;
-		for(i=0,i2=0;i<pobj_c->iMethodNum;i++){
-			if(pobj_c->ppobj_Method[i]->psi==psi) break;
-			if(pobj_c->ppobj_Method[i]->psi->bVirtual) i2++;
-		}
+		int i2 = pobj_c->GetFuncNumInVtbl( psi );
 
 		//mov rax,qword ptr[r11+func_index]
Index: BasicCompiler64/Compile_Object.cpp
===================================================================
--- BasicCompiler64/Compile_Object.cpp	(revision 50)
+++ BasicCompiler64/Compile_Object.cpp	(revision 51)
@@ -198,12 +198,12 @@
 
 
-	i2=pobj_c->DestructorMemberSubIndex;
-	if(i2==-1) return 0;
+	CMethod *method = pobj_c->GetDestructorMethod();
+	if( method == NULL ) return 0;
 
 	//mov rcx,DestructorProcAddr
 	op_mov_RV(sizeof(_int64),REG_RCX,0);
 	obp-=sizeof(long);
-	pobj_SubAddrSchedule->add(pobj_c->ppobj_Method[i2]->psi,0);
-	pobj_c->ppobj_Method[i2]->psi->bUse=1;
+	pobj_SubAddrSchedule->add(method->psi,0);
+	method->psi->bUse=1;
 	obp+=sizeof(long);
 
Index: BasicCompiler64/Compile_ProcOp.cpp
===================================================================
--- BasicCompiler64/Compile_ProcOp.cpp	(revision 50)
+++ BasicCompiler64/Compile_ProcOp.cpp	(revision 51)
@@ -209,5 +209,5 @@
 	extern SUBINFO **ppSubHash;
 	extern BOOL bDebugCompile;
-	int i3,i4,i5,VarSize,BufferSize;
+	int i3,i4,VarSize,BufferSize;
 	char temporary[VN_SIZE];
 
@@ -466,5 +466,5 @@
 		if(psi->ReturnType==DEF_OBJECT && psi->isReturnRef == false){
 			//戻り値用オブジェクトのコンストラクタを呼び出す
-			if(psi->u.Return_pobj_c->ConstructorMemberSubIndex!=-1){
+			if( psi->u.Return_pobj_c->GetConstructorMethod() ){
 				sprintf(temporary,"%s.%s()",temp,psi->u.Return_pobj_c->name);
 				OpcodeOthers(temporary);
@@ -517,5 +517,5 @@
 			BOOL bThisIsSuperClass;
 			if(pobj_CompilingClass->pobj_InheritsClass==0) bThisIsSuperClass=1;
-			else if(pobj_CompilingClass->pobj_InheritsClass->ConstructorMemberSubIndex==-1){
+			else if( pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod() == NULL ){
 				//インターフェイスを継承したときはコンストラクタを持たない
 				bThisIsSuperClass=1;
@@ -552,7 +552,6 @@
 					RemoveStringPare(temporary);
 
-					i3=pobj_CompilingClass->pobj_InheritsClass->ConstructorMemberSubIndex;
 					Opcode_CallProc(temporary,
-						pobj_CompilingClass->ppobj_Method[i3]->psi,
+						pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod()->psi,
 						0,
 						"",
@@ -561,7 +560,6 @@
 				else{
 					//基底クラスのコンストラクタを暗黙的に呼び出す
-					i3=pobj_CompilingClass->pobj_InheritsClass->ConstructorMemberSubIndex;
 					Opcode_CallProc("",
-						pobj_CompilingClass->ppobj_Method[i3]->psi,
+						pobj_CompilingClass->pobj_InheritsClass->GetConstructorMethod()->psi,
 						0,
 						"",
@@ -588,7 +586,7 @@
 
 				if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){
-					if(pMember->TypeInfo.u.pobj_Class->ConstructorMemberSubIndex!=-1){
-						i5=pMember->TypeInfo.u.pobj_Class->ConstructorMemberSubIndex;
-						if(pMember->TypeInfo.u.pobj_Class->ppobj_Method[i5]->psi->RealParmNum==1){	//Thisポインタを第一引数に持ち合わせるため、引数なしの場合はこの値が1になる
+					CMethod *method = pMember->TypeInfo.u.pobj_Class->GetConstructorMethod();
+					if( method ){
+						if( method->psi->RealParmNum == 1 ){	//Thisポインタを第一引数に持ち合わせるため、引数なしの場合はこの値が1になる
 							for(i4=0;i4<MemberObjectNum;i4++){
 								//Thisポインタをrcxにコピー
@@ -599,5 +597,5 @@
 
 								//call constructor
-								op_call(pMember->TypeInfo.u.pobj_Class->ppobj_Method[i5]->psi);
+								op_call( method->psi );
 							}
 						}
@@ -662,8 +660,8 @@
 					基底クラスのデストラクタを呼び出す */
 
-				i3=pobj_CompilingClass->pobj_InheritsClass->DestructorMemberSubIndex;
-				if(i3!=-1){
+				CMethod *method = pobj_CompilingClass->pobj_InheritsClass->GetDestructorMethod();
+				if( method ){
 					Opcode_CallProc("",
-						pobj_CompilingClass->ppobj_Method[i3]->psi,
+						method->psi,
 						0,
 						"",
@@ -689,5 +687,6 @@
 
 				if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){
-					if(pMember->TypeInfo.u.pobj_Class->DestructorMemberSubIndex!=-1){
+					CMethod *method = pMember->TypeInfo.u.pobj_Class->GetDestructorMethod();
+					if( method ){
 						for(i4=MemberObjectNum-1;i4>=0;i4--){
 							//Thisポインタをrcxにコピー
@@ -698,6 +697,5 @@
 
 							//call destructor
-							i5=pMember->TypeInfo.u.pobj_Class->DestructorMemberSubIndex;
-							op_call(pMember->TypeInfo.u.pobj_Class->ppobj_Method[i5]->psi);
+							op_call(method->psi);
 						}
 					}
Index: BasicCompiler64/MakePeHdr.cpp
===================================================================
--- BasicCompiler64/MakePeHdr.cpp	(revision 50)
+++ BasicCompiler64/MakePeHdr.cpp	(revision 51)
@@ -1059,4 +1059,9 @@
 	// プロシージャポインタスケジュール
 	for(i=0;i<pobj_SubAddrSchedule->num;i++){
+		if(pobj_SubAddrSchedule->ppsi[i]->CompileAddress==0
+			&&pobj_SubAddrSchedule->ppsi[i]->EndOpAddr==0){
+			SetError(300,NULL,-1);
+		}
+
 		if(pobj_SubAddrSchedule->pbCall[i]){
 			*((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))=
Index: BasicCompiler64/NumOpe.cpp
===================================================================
--- BasicCompiler64/NumOpe.cpp	(revision 50)
+++ BasicCompiler64/NumOpe.cpp	(revision 51)
@@ -35,5 +35,5 @@
 
 		//call constructor
-		op_call(pobj_StringClass->ppobj_Method[pobj_StringClass->ConstructorMemberSubIndex]->psi);
+		op_call(pobj_StringClass->GetConstructorMethod()->psi);
 
 		int i2;
Index: BasicCompiler64/OperatorProc.cpp
===================================================================
--- BasicCompiler64/OperatorProc.cpp	(revision 50)
+++ BasicCompiler64/OperatorProc.cpp	(revision 51)
@@ -10,10 +10,11 @@
 	////////////////////////////////////////////////
 
-	if(pobj_c->DestructorMemberSubIndex!=-1){
+	CMethod *method = pobj_c->GetDestructorMethod();
+	if( method ){
 		//mov rcx,reg
 		op_mov_RR(REG_RCX,reg);
 
 		//call DestructorProcAddr
-		op_call(pobj_c->ppobj_Method[pobj_c->DestructorMemberSubIndex]->psi);
+		op_call( method->psi );
 	}
 
@@ -294,106 +295,6 @@
 
 		if(bCalcUseHeap){
-			/*
-			//未解放のインスタンスが存在する場合
-			//※専用のローカル変数を用意し、メモリリークを回避
-			char temporary[VN_SIZE],temp2[VN_SIZE];
-
-
-			////////////////////////////////
-			// 一時オブジェクト変数を用意
-			////////////////////////////////
-			char szTempVarName[255];
-			GetTypeName(CalcType,lpCalcIndex,temp2);
-			sprintf(szTempVarName,"_System_strDummy%d",obp);
-			wsprintf(temporary,"%s%c%c%s",szTempVarName,1,ESC_AS,temp2);
-			InsertDimStatement_ToProcHead(temporary);
-
-			RELATIVE_VAR VarRelativeVar;
-			int VarType;
-			LONG_PTR lpVarIndex;
-			if(!GetVarOffsetReadOnly(
-				szTempVarName,
-				&VarType,
-				&VarRelativeVar,
-				&lpVarIndex)) return;
-
-
-			CClass *pobj_c;
-			pobj_c=(CClass *)lpCalcIndex;
-			if(pobj_c->DestructorMemberSubIndex!=-1){
-
-				//////////////////////////////////////////////////////
-				/////    レジスタ資源のバックアップ
-				{	BACKUP_REGISTER_RESOURCE
-				//////////////////////////////////////////////////////
-
-					//ループの場合、古い一時オブジェクトのデストラクタを呼ぶ
-
-					//rcxに変数アドレスをコピー
-					SetVarPtrToReg(REG_RCX,&VarRelativeVar);
-
-					//call destructor
-					OpBuffer[obp++]=(char)0xE8;
-					pobj_SubAddrSchedule->add(pobj_c->ppobj_Method[pobj_c->DestructorMemberSubIndex]->psi,1);
-					obp+=sizeof(long);
-
-				/////////////////////////////////////////////
-				//////   レジスタ資源を復元
-					RESTORE_REGISTER_RESOURCE
-				}////////////////////////////////////////////
-			}
-
-			//mov r15,reg
-			op_mov_RR(REG_R15,reg);
-
-
-			int object_size;
-			object_size=GetSizeOfClass((CClass *)lpVarIndex);
-
-			//mov rcx,object_size
-			op_mov_RV(sizeof(_int64),REG_RCX,object_size);
-
-			//rdiに変数アドレスをコピー
-			SetVarPtrToReg(REG_RDI,&VarRelativeVar);
-
-			//mov rsi,reg
-			op_mov_RR(REG_RSI,reg);
-
-			//mov r14,rdi
-			op_mov_RR(REG_R14,REG_RDI);
-			pobj_BlockReg->lock(REG_R14);
-
-			//rep movs byte ptr[rdi],byte ptr[rsi]
-			op_rep_movs(sizeof(BYTE));
-
-			//////////////////////////////////////////////////////
-			/////    レジスタ資源のバックアップ
-			{	BACKUP_REGISTER_RESOURCE
-			//////////////////////////////////////////////////////
-
-				//mov rcx,r15
-				op_mov_RR(REG_RCX,REG_R15);
-
-				//call free
-				extern SUBINFO *pSub_free;
-				OpBuffer[obp++]=(char)0xE8;
-				pobj_SubAddrSchedule->add(pSub_free,1);
-				obp+=sizeof(long);
-
-			/////////////////////////////////////////////
-			//////   レジスタ資源を復元
-				RESTORE_REGISTER_RESOURCE
-			}////////////////////////////////////////////
-
-
-			//mov reg,r14
-			op_mov_RR(reg,REG_R14);
-
-			pobj_BlockReg->unlock(REG_R14);
-			*/
-
 			//未解放のインスタンスが存在する旨を示す警告
 			SetError(-105,NULL,cp);
-
 		}
 
