Index: /trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 532)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 533)
@@ -189,4 +189,7 @@
 	// コンパイル中のクラス
 	const CClass *pCompilingClass;
+
+	void StartProcedureCompile( const UserProc *pUserProc );
+	void FinishProcedureCompile();
 };
 
Index: /trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
===================================================================
--- /trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 532)
+++ /trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 533)
@@ -210,2 +210,26 @@
 	return (std::string)"(null)";
 }
+
+void Compiler::StartProcedureCompile( const UserProc *pUserProc )
+{
+	//コンパイル中の関数が属するクラス
+	this->pCompilingClass = pUserProc->GetParentClassPtr();
+
+	//コンパイルスタートをクラス管理クラスに追加
+	this->GetObjectModule().meta.GetClasses().StartCompile( pUserProc );
+
+	//コンパイル中の関数
+	UserProc::CompileStartForUserProc( pUserProc );
+
+	// コンパイル中の関数が属する名前空間
+	this->GetNamespaceSupporter().SetLivingNamespaceScopes( pUserProc->GetNamespaceScopes() );
+
+	// コンパイル中の関数でImportsされている名前空間
+	this->GetNamespaceSupporter().SetImportedNamespaces( pUserProc->GetImportedNamespaces() );
+
+	// コード生成対象を選択
+	this->codeGenerator.Select( (const_cast<UserProc *>(pUserProc))->GetNativeCode() );
+}
+void Compiler::FinishProcedureCompile()
+{
+}
Index: /trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 532)
+++ /trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 533)
@@ -313,21 +313,5 @@
 	}
 
-	//コンパイル中の関数が属するクラス
-	compiler.pCompilingClass = pUserProc->GetParentClassPtr();
-
-	//コンパイルスタートをクラス管理クラスに追加
-	compiler.GetObjectModule().meta.GetClasses().StartCompile( pUserProc );
-
-	//コンパイル中の関数
-	UserProc::CompileStartForUserProc( pUserProc );
-
-	// コンパイル中の関数が属する名前空間
-	compiler.GetNamespaceSupporter().SetLivingNamespaceScopes( pUserProc->GetNamespaceScopes() );
-
-	// コンパイル中の関数でImportsされている名前空間
-	compiler.GetNamespaceSupporter().SetImportedNamespaces( pUserProc->GetImportedNamespaces() );
-
-	// コード生成対象を選択
-	compiler.codeGenerator.Select( (const_cast<UserProc *>(pUserProc))->GetNativeCode() );
+	compiler.StartProcedureCompile( pUserProc );
 
 	if(pUserProc->IsSystem()){
@@ -778,4 +762,6 @@
 	SynonymErrorWords=0;
 
+	compiler.FinishProcedureCompile();
+
 
 	//ローカル変数のネーム情報は後に解放する
