Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp	(revision 603)
@@ -44,7 +44,4 @@
 
 #include <jenga/include/jenga.h>
-#include <abdev/ab_common/include/ab_common.h>
-
-#include "../common.h"
 
 using namespace Jenga::Common;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp	(revision 602)
+++ 	(revision )
@@ -1,770 +1,0 @@
-#include "stdafx.h"
-
-void CClass::Using() const
-{
-	if( this->IsUsing() )
-	{
-		// 既に使用することになっている
-		return;
-	}
-
-	Prototype::Using();
-
-	// 仮想関数になるメソッドに使用チェックをつける
-	const CClass &objThis = *this;
-	BOOST_FOREACH( const CMethod *pMethod, objThis.GetDynamicMethods() )
-	{
-		if( pMethod->IsVirtual() )
-		{
-			pMethod->GetUserProc().Using();
-		}
-	}
-}
-
-bool CClass::IsClass() const
-{
-	return classType == CClass::Class;
-}
-bool CClass::IsInterface() const
-{
-	return classType == CClass::Interface;
-}
-bool CClass::IsComInterface() const
-{
-	return classType == CClass::ComInterface;
-}
-bool CClass::IsEnum() const
-{
-	return classType == CClass::Enum;
-}
-bool CClass::IsDelegate() const
-{
-	return classType == CClass::Delegate;
-}
-bool CClass::IsStructure() const
-{
-	return classType == CClass::Structure;
-}
-
-
-// コンストラクタのコンパイルを開始
-void CClass::NotifyStartConstructorCompile() const
-{
-	isCompilingConstructor = true;
-}
-
-//コンストラクタのコンパイルを終了
-void CClass::NotifyFinishConstructorCompile() const
-{
-	isCompilingConstructor = false;
-}
-
-//コンストラクタをコンパイル中かどうかを判別
-bool CClass::IsCompilingConstructor() const
-{
-	return isCompilingConstructor;
-}
-
-//デストラクタのコンパイルを開始
-void CClass::NotifyStartDestructorCompile() const{
-	isCompilingDestructor = true;
-}
-
-//デストラクタのコンパイルを終了
-void CClass::NotifyFinishDestructorCompile() const{
-	isCompilingDestructor = false;
-}
-
-//デストラクタをコンパイル中かどうかを判別
-bool CClass::IsCompilingDestructor() const
-{
-	return isCompilingDestructor;
-}
-
-//自身の派生クラスかどうかを確認
-bool CClass::IsSubClass( const CClass *pSubClass ) const
-{
-	if( !pSubClass->HasSuperClass() )
-	{
-		return false;
-	}
-
-	const CClass *pTempClass = &pSubClass->GetSuperClass();
-	while( pTempClass ){
-		if( this == pTempClass ) return true;
-		pTempClass = &pTempClass->GetSuperClass();
-	}
-	return false;
-}
-
-//自身と等しいまたは派生クラスかどうかを確認
-bool CClass::IsEqualsOrSubClass( const CClass *pSubClass ) const
-{
-	if( IsEquals( pSubClass ) ) return true;
-	return IsSubClass( pSubClass );
-}
-
-// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
-bool CClass::IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const
-{
-	if( IsEquals( &objClass ) ) return true;
-	if( IsSubClass( &objClass ) ) return true;
-	if( objClass.IsSubClass( this ) ) return true;
-	return false;
-}
-
-bool CClass::IsInheritsInterface( const CClass *pInterfaceClass ) const
-{
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces ){
-		if( pInterfaceClass == &pInterface->GetClass() ){
-			return true;
-		}
-	}
-	return false;
-}
-
-bool CClass::InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine )
-{
-	//メソッドをコピー
-	BOOST_FOREACH( const CMethod *pBaseMethod, inheritsClass.GetDynamicMethods() ){
-		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
-
-		// アクセシビリティ
-		if(pBaseMethod->GetAccessibility() == Prototype::Private){
-			pMethod->SetAccessibility( Prototype::None );
-		}
-		else{
-			pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );
-		}
-
-		//pobj_Inherits
-		// ※継承元のClassIndexをセット（入れ子継承を考慮する）
-		if(pBaseMethod->GetInheritsClassPtr()==0){
-			pMethod->SetInheritsClassPtr( &inheritsClass );
-		}
-		else{
-			pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );
-		}
-
-		GetDynamicMethods().push_back( pMethod );
-	}
-
-	//仮想関数の数
-	AddVtblNum( inheritsClass.GetVtblNum() );
-
-	//継承先のクラスをメンバとして保持する
-	SetSuperClass( &inheritsClass );
-	SetSuperClassActualTypeParameters( actualTypeParameters );
-
-	// インターフェイスを引き継ぐ
-	BOOST_FOREACH( ::Interface *pInterface, inheritsClass.GetInterfaces() )
-	{
-		interfaces.push_back( new ::Interface( *pInterface ) );
-	}
-
-	if( this->IsInterface() && inheritsClass.IsComInterface() )
-	{
-		// COMインターフェイスを継承した場合はCOMインターフェイスにする
-		this->SetClassType( CClass::ComInterface );
-	}
-
-	return true;
-}
-
-void CClass::AddDynamicMember( Member *pMember )
-{
-	dynamicMembers.push_back( pMember );
-}
-void CClass::AddStaticMember( Member *pMember )
-{
-	staticMembers.push_back( pMember );
-}
-
-bool CClass::DupliCheckAll(const char *name) const
-{
-	//重複チェック
-
-	//メンバ
-	if(DupliCheckMember(name)) return 1;
-
-	//メソッド
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
-		if( lstrcmp( name, pMethod->GetUserProc().GetName().c_str() ) == 0 ){
-			return 1;
-		}
-	}
-
-	return 0;
-}
-bool CClass::DupliCheckMember(const char *name) const
-{
-	//重複チェック
-
-	if( this->HasSuperClass() )
-	{
-		if( this->GetSuperClass().DupliCheckMember( name ) )
-		{
-			// 基底クラスで重複が発見された
-			return true;
-		}
-	}
-
-	// 動的メンバ
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
-	{
-		if( GetName() == pMember->GetName() )
-		{
-			return true;
-		}
-	}
-
-	// 静的メンバ
-	BOOST_FOREACH( Member *pMember, staticMembers ){
-		if( GetName() == pMember->GetName() ){
-			return true;
-		}
-	}
-
-	return false;
-}
-
-const Member *CClass::FindDynamicMember( const char *memberName ) const
-{
-	if( this->HasSuperClass() )
-	{
-		// 基底クラスで検索
-		const Member *result = this->GetSuperClass().FindDynamicMember( memberName );
-		if( result )
-		{
-			return result;
-		}
-	}
-
-	BOOST_FOREACH( Member *pMember, GetDynamicMembers() )
-	{
-		if( pMember->GetName() == memberName )
-		{
-			return pMember;
-		}
-	}
-	return NULL;
-}
-
-void CClass::EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const
-{
-	// 動的メソッド
-	GetDynamicMethods().Enum( methodName, subs );
-
-	// インターフェイス メソッド
-	BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
-	{
-		pInterface->GetDynamicMethods().Enum( methodName, subs );
-	}
-}
-const CMethod *CClass::GetDynamicMethodOrInterfaceMethod( const UserProc *pUserProc ) const
-{
-	// 動的メソッド
-	const CMethod *result = GetDynamicMethods().GetMethodPtr( pUserProc );
-
-	if( !result )
-	{
-		// インターフェイス メソッド
-		BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
-		{
-			result = pInterface->GetDynamicMethods().GetMethodPtr( pUserProc );
-			if( result )
-			{
-				return result;
-			}
-		}
-	}
-
-	return result;
-}
-
-//サイズを取得
-int CClass::GetSize() const
-{
-	int resultSize = 0;
-
-	int alignment = 1;
-	if( this->IsStructure() )
-	{
-		// 構造体のとき
-
-		if( this->GetFixedAlignment() )
-		{
-			// アラインメントの固定値が指定されていた場合はそれを取得
-			alignment = this->GetFixedAlignment();
-		}
-	}
-	else
-	{
-		// それ以外
-
-		if( this->HasSuperClass() )
-		{
-			// 基底クラスのサイズを追加
-			resultSize += this->GetSuperClass().GetSize();
-
-			// 基底クラスのアラインメントを取得
-			alignment = this->GetSuperClass().GetAlignment();
-		}
-		else
-		{
-			// 基底クラスが存在しないとき
-
-			// 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
-			resultSize += IsExistVirtualFunctions() ? PTR_SIZE*2 : 0;
-		}
-	}
-
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
-	{
-		// メンバサイズ
-		int tempMemberSize = pMember->GetType().GetSize();
-
-		// 一時アラインメントを算出
-		int tempAlignment = tempMemberSize;
-		if( pMember->GetType().IsStruct() )
-		{
-			// メンバが構造体の場合は、メンバのアラインメントを取得
-			tempAlignment = pMember->GetType().GetClass().GetAlignment();
-		}
-
-		// アラインメントを考慮してパディングを追加
-		if( GetFixedAlignment() && alignment < tempAlignment )
-		{
-			if( resultSize % alignment )
-			{
-				resultSize += alignment - ( resultSize % alignment );
-			}
-		}
-		else
-		{
-			if( alignment < tempAlignment )
-			{
-				// 最大アラインメントを更新
-				alignment = tempAlignment;
-			}
-
-			if( tempMemberSize == 0 )
-			{
-				if( !pMember->GetType().IsStruct() )
-				{
-					throw;
-				}
-
-				//メンバを持たない構造体
-				//※何もしない（オフセットの計算をしない）
-			}
-			else{
-				if( resultSize % tempAlignment )
-				{
-					resultSize += tempAlignment - ( resultSize % tempAlignment );
-				}
-			}
-		}
-
-		// メンバサイズを加算（配列を考慮）
-		resultSize += tempMemberSize * Variable::GetSubScriptCounts( pMember->GetSubscripts() );
-	}
-
-	if( alignment )
-	{
-		// 末尾アラインメントを考慮してパディングを追加
-		if( resultSize % alignment )
-		{
-			resultSize += alignment - ( resultSize % alignment );
-		}
-	}
-
-	return resultSize;
-}
-
-//メンバのオフセットを取得
-int CClass::GetMemberOffset( const char *memberName ) const
-{
-	int resultSize = 0;
-
-	int alignment = 1;
-	if( this->IsStructure() )
-	{
-		// 構造体のとき
-
-		if( this->GetFixedAlignment() )
-		{
-			// アラインメントの固定値が指定されていた場合はそれを取得
-			alignment = this->GetFixedAlignment();
-		}
-	}
-	else
-	{
-		// それ以外
-
-		if( this->HasSuperClass() )
-		{
-			if( this->GetSuperClass().HasDynamicMember( memberName ) )
-			{
-				// 基底クラスのメンバを取得
-				return this->GetSuperClass().GetMemberOffset( memberName );
-			}
-
-			// 基底クラスのサイズを追加
-			resultSize += this->GetSuperClass().GetSize();
-
-			// 基底クラスのアラインメントを取得
-			alignment = this->GetSuperClass().GetAlignment();
-		}
-		else
-		{
-			// 基底クラスが存在しないとき
-
-			// 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
-			resultSize += IsExistVirtualFunctions() ? PTR_SIZE*2 : 0;
-		}
-	}
-
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
-	{
-		// メンバサイズ
-		int tempMemberSize = pMember->GetType().GetSize();
-
-		// 一時アラインメントを算出
-		int tempAlignment = tempMemberSize;
-		if( pMember->GetType().IsStruct() )
-		{
-			// メンバが構造体の場合は、メンバのアラインメントを取得
-			tempAlignment = pMember->GetType().GetClass().GetAlignment();
-		}
-
-		// アラインメントを考慮してパディングを追加
-		if( GetFixedAlignment() && alignment < tempAlignment )
-		{
-			if( resultSize % alignment )
-			{
-				resultSize += alignment - ( resultSize % alignment );
-			}
-		}
-		else
-		{
-			if( alignment < tempAlignment )
-			{
-				// 最大アラインメントを更新
-				alignment = tempAlignment;
-			}
-
-			if( tempMemberSize == 0 )
-			{
-				if( !pMember->GetType().IsStruct() )
-				{
-					throw;
-				}
-
-				//メンバを持たない構造体
-				//※何もしない（オフセットの計算をしない）
-			}
-			else{
-				if( resultSize % tempAlignment )
-				{
-					resultSize += tempAlignment - ( resultSize % tempAlignment );
-				}
-			}
-		}
-
-		if(memberName){
-			//メンバ指定がある場合は、オフセットを返す
-			if( pMember->GetName() == memberName )
-			{
-				return resultSize;
-			}
-		}
-
-		// メンバサイズを加算（配列を考慮）
-		resultSize += tempMemberSize * Variable::GetSubScriptCounts( pMember->GetSubscripts() );
-	}
-
-	if( alignment )
-	{
-		// 末尾アラインメントを考慮してパディングを追加
-		if( resultSize % alignment )
-		{
-			resultSize += alignment - ( resultSize % alignment );
-		}
-	}
-
-	return resultSize;
-}
-int CClass::GetAlignment() const
-{
-	int alignment = 1;
-	if( this->IsStructure() )
-	{
-		// 構造体のとき
-
-		if( this->GetFixedAlignment() )
-		{
-			// アラインメントの固定値が指定されていた場合はそれを取得
-			return this->GetFixedAlignment();
-		}
-	}
-	else
-	{
-		// それ以外
-
-		if( this->HasSuperClass() )
-		{
-			// 基底クラスのアラインメントを取得
-			alignment = this->GetSuperClass().GetAlignment();
-		}
-		else
-		{
-			// 基底クラスが存在しないとき
-
-			// 仮想関数が存在する場合はvtbl及びvtblMasterListへのポインタのサイズを追加
-			alignment = PTR_SIZE;
-		}
-	}
-
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
-	{
-		int tempAlignment = pMember->GetType().GetSize();
-		if( pMember->GetType().IsStruct() )
-		{
-			// メンバが構造体の場合は、メンバのアラインメントを取得
-			tempAlignment = pMember->GetType().GetClass().GetAlignment();
-		}
-
-		if( alignment < tempAlignment )
-		{
-			// 最大アラインメントを更新
-			alignment = tempAlignment;
-		}
-	}
-
-	return alignment;
-}
-
-void CClass::GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const
-{
-	vtblMasterListIndex = 0;
-
-	vtblIndex = 0;
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
-		if( &pMethod->GetUserProc() == pUserProc )
-		{
-			return;
-		}
-
-		if( pMethod->IsVirtual() )
-		{
-			vtblIndex++;
-		}
-	}
-
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
-	{
-		vtblMasterListIndex++;
-
-		vtblIndex = 0;
-		BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
-			if( &pMethod->GetUserProc() == pUserProc )
-			{
-				return;
-			}
-
-			if( pMethod->IsVirtual() )
-			{
-				vtblIndex++;
-			}
-		}
-	}
-
-	throw;
-}
-int CClass::GetVtblMasterListIndex( const CClass *pClass ) const
-{
-	int result = 0;
-
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
-	{
-		result++;
-		
-		if( &pInterface->GetClass() == pClass )
-		{
-			return result;
-		}
-	}
-
-	throw;
-}
-long CClass::GetVtblMasterListOffset() const
-{
-	if( vtblMasterListOffset == -1 )
-	{
-		throw;
-	}
-
-	return vtblMasterListOffset;
-}
-bool CClass::IsAbstract() const
-{
-	// 未実装(abstract)の仮想関数を持つ場合はtrueを返す
-
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
-		if(pMethod->IsVirtual()){
-			if(pMethod->IsAbstract()){
-				return true;
-			}
-		}
-	}
-
-	// インターフェイスのvtbl
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
-	{
-		BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
-			if(pMethod->IsVirtual()){
-				if(pMethod->IsAbstract()){
-					return true;
-				}
-			}
-		}
-	}
-
-	return false;
-}
-
-const CClass *Classes::FindEx( const Symbol &symbol ) const
-{
-	if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "Object" )
-	{
-		return GetObjectClassPtr();
-	}
-	else if( symbol.GetNamespaceScopes().size() == 0 && symbol.GetName() == "String" )
-	{
-		return GetStringClassPtr();
-	}
-
-	std::vector<const CClass *> classes;
-	const CClass *pClass = GetHashArrayElement( symbol.GetName().c_str() );
-	while( pClass )
-	{
-		if( pClass->IsEqualSymbol( symbol.GetNamespaceScopes(), symbol.GetName() ) ){
-			//名前空間とクラス名が一致した
-			classes.push_back( pClass );
-		}
-		pClass = pClass->GetChainNext();
-	}
-	if( classes.size() > 0 )
-	{
-		// 複数の名前空間の中に同一のクラス名が存在する場合があるので、アクセス可能で尚且つ階層が一番深いものをチョイスする
-		pClass = classes.front();
-
-		BOOST_FOREACH( const CClass *pTempClass, classes )
-		{
-			if( pClass->GetNamespaceScopes().size() < pTempClass->GetNamespaceScopes().size() )
-			{
-				pClass = pTempClass;
-			}
-		}
-
-		return pClass;
-	}
-
-	return NULL;
-}
-
-const CClass *Classes::GetStringClassPtr() const
-{
-	if( !pStringClass )
-	{
-		// キャッシュしておく
-		pStringClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "String" ) );
-	}
-	return pStringClass;
-}
-const CClass *Classes::GetObjectClassPtr() const
-{
-	if( !pObjectClass )
-	{
-		// キャッシュしておく
-		pObjectClass = this->FindEx( Symbol( NamespaceScopes( "System" ), "Object" ) );
-	}
-	return pObjectClass;
-}
-const CClass *Classes::GetInterfaceInfoClassPtr() const
-{
-	if( !pInterfaceInfo )
-	{
-		// キャッシュしておく
-		pInterfaceInfo = this->FindEx( Symbol( NamespaceScopes( "ActiveBasic.Core" ), "InterfaceInfo" ) );
-	}
-	return pInterfaceInfo;
-}
-
-std::string CClass::GetStaticDefiningStringAsMemberNames() const
-{
-	std::string result;
-
-	BOOST_FOREACH( const Member *pMember, dynamicMembers )
-	{
-		if( result.size() )
-		{
-			result += ",";
-		}
-
-		result += "\"" + pMember->GetName() + "\"";
-	}
-
-	return result;
-}
-std::string CClass::GetStaticDefiningStringAsMemberOffsets() const
-{
-	std::string result;
-
-	BOOST_FOREACH( const Member *pMember, dynamicMembers )
-	{
-		if( result.size() )
-		{
-			result += ",";
-		}
-
-		int offset = this->GetMemberOffset( pMember->GetName().c_str() );
-
-		char temporary[255];
-		itoa( offset, temporary, 16 );
-
-		result += (std::string)"&H" + temporary;
-	}
-
-	return result;
-}
-
-void CClass::GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset ) const
-{
-	const CClass &thisClass = *this;
-	BOOST_FOREACH( const Member *pMember, thisClass.GetDynamicMembers() )
-	{
-		if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() )
-		{
-			if( referenceOffsetsBuffer.size() )
-			{
-				referenceOffsetsBuffer += ",";
-			}
-
-			char temp[255];
-			sprintf( temp, "%d", baseOffset + thisClass.GetMemberOffset( pMember->GetName().c_str() ) );
-			referenceOffsetsBuffer += temp;
-
-			numOfReference++;
-		}
-		if( pMember->GetType().IsStruct() && !pMember->GetType().IsPointer() )
-		{
-			// 構造体の実体をメンバに持つとき
-			int baseOffset = thisClass.GetMemberOffset( pMember->GetName().c_str() );
-
-			// 構造体メンバでGCによるチェックが必要な参照位置を追加
-			pMember->GetType().GetClass().GetReferenceOffsetsInitializeBuffer( referenceOffsetsBuffer, numOfReference, baseOffset );
-		}
-	}
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp	(revision 603)
@@ -1,6 +1,3 @@
 #include "stdafx.h"
-
-#include <Compiler.h>
-#include <Type.h>
 
 using namespace ActiveBasic::Compiler;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp	(revision 602)
+++ 	(revision )
@@ -1,132 +1,0 @@
-#include "stdafx.h"
-
-double CConst::GetDoubleData(){
-	double dbl;
-	memcpy(&dbl,&i64data,sizeof(_int64));
-	return dbl;
-}
-
-void Consts::Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type )
-{
-	CConst *newconst = new CConst(namespaceScopes, name, type, i64data);
-
-	//ハッシュリストに追加
-	Put( newconst );
-}
-void Consts::Add(const NamespaceScopes &namespaceScopes, const std::string &name, int value){
-	CConst *newconst = new CConst( namespaceScopes, name, value);
-
-	//ハッシュリストに追加
-	Put( newconst );
-}
-
-CConst *Consts::GetObjectPtr( const Symbol &symbol )
-{
-	CConst *pConst = GetHashArrayElement( symbol.GetName().c_str() );
-	while( pConst )
-	{
-		if( pConst->IsEqualSymbol( symbol ) )
-		{
-			break;
-		}
-		pConst = pConst->GetChainNext();
-	}
-
-	return pConst;
-}
-
-
-int Consts::GetBasicType( const Symbol &symbol ){
-	CConst *pConst = GetObjectPtr( symbol );
-
-	if(!pConst) return 0;
-
-	return pConst->GetType().GetBasicType();
-}
-_int64 Consts::GetWholeData( const Symbol &symbol ){
-	CConst *pConst = GetObjectPtr( symbol );
-
-	if(!pConst) return 0;
-
-	return pConst->GetWholeData();
-}
-double Consts::GetDoubleData( const Symbol &symbol ){
-	CConst *pConst = GetObjectPtr( symbol );
-
-	if(!pConst) return 0;
-
-	return pConst->GetDoubleData();
-}
-bool Consts::IsStringPtr( const Symbol &symbol, bool isUnicode ){
-	CConst *pConst = GetObjectPtr( symbol );
-
-	if(!pConst) return false;
-
-	const Type &type = pConst->GetType();
-
-	int charType = isUnicode
-		? MAKE_PTR_TYPE(DEF_WORD,1)
-		: MAKE_PTR_TYPE(DEF_SBYTE,1);
-
-	return ( type.GetBasicType() == charType && type.GetIndex() == LITERAL_STRING );
-}
-
-// マクロ定数を追加するための関数
-bool ConstMacros::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr )
-{
-	std::vector<std::string> parameters;
-
-	int i = 0;
-	if(parameterStr[i]!='(')
-	{
-		return false;
-	}
-
-	char temporary[VN_SIZE];
-	int i2;
-	for(i++,i2=0;;i++,i2++){
-		if(parameterStr[i]=='\0')
-		{
-			return false;
-		}
-		if(parameterStr[i]==','||parameterStr[i]==')'){
-			temporary[i2]=0;
-
-			parameters.push_back( temporary );
-
-			if(parameterStr[i]==')'){
-				i++;
-				if(parameterStr[i]!='=')
-				{
-					return false;
-				}
-				break;
-			}
-
-			i2=-1;
-			continue;
-		}
-		temporary[i2]=parameterStr[i];
-	}
-
-	//データ
-	lstrcpy(temporary,parameterStr+i+1);
-
-	this->Put( new ConstMacro( namespaceScopes, name, parameters, temporary ) );
-
-	return true;
-}
-ConstMacro *ConstMacros::Find( const Symbol &symbol )
-{
-	ConstMacro *pConstMacro = GetHashArrayElement( symbol.GetName().c_str() );
-	while( pConstMacro )
-	{
-		if( pConstMacro->IsEqualSymbol( symbol ) )
-		{
-			break;
-		}
-		pConstMacro = pConstMacro->GetChainNext();
-	}
-
-	return pConstMacro;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTable.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTable.cpp	(revision 602)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#include "stdafx.h"
-
-int DataTable::AddBinary( const void *buffer, int size ){
-	int retSize = this->size;
-
-	Realloc( this->size + size );
-	memcpy( (char *)this->buffer + retSize, buffer, size );
-
-	return retSize;
-}
-int DataTable::Add( _int64 i64data ){
-	int retSize = size;
-	AddBinary( &i64data, sizeof( _int64 ) );
-	return retSize;
-}
-int DataTable::Add( int i32data ){
-	int retSize = size;
-	AddBinary( &i32data, sizeof( int ) );
-	return retSize;
-}
-int DataTable::Add( double dbl ){
-	int retSize = size;
-	AddBinary( &dbl, sizeof( double ) );
-	return retSize;
-}
-int DataTable::Add( float flt ){
-	int retSize = size;
-	AddBinary( &flt, sizeof( float ) );
-	return retSize;
-}
-int DataTable::AddString( const char *str )
-{
-	return AddBinary( str, lstrlen( str ) + sizeof(char) );
-}
-int DataTable::AddString( const std::string &str )
-{
-	return AddBinary( str.c_str(), static_cast<int>(str.size()) + sizeof(char) );
-}
-int DataTable::AddWString( const std::wstring &wstr )
-{
-	return AddBinary( wstr.c_str(), static_cast<int>(wstr.size()) + sizeof(wchar_t) );
-}
-int DataTable::AddSpace( int size )
-{
-	int retSize = this->size;
-	Realloc( this->size + size );
-	return retSize;
-}
-void DataTable::AddAlignment( int size )
-{
-	if( this->size % size == 0 )
-	{
-		// 既に境界のとき
-		return;
-	}
-	Realloc( this->size + ( size - (int)(this->size%size) ) );
-}
-
-void DataTable::ResetDataSectionBaseOffset( long dataSectionBaseOffset )
-{
-	BOOST_FOREACH( const Schedule &schedule, schedules )
-	{
-		if( schedule.GetType() == Schedule::DataTable )
-		{
-#ifdef _WIN64
-			OverwriteInt64(
-				schedule.GetOffset(),
-				GetInt64( schedule.GetOffset() ) + dataSectionBaseOffset
-			);
-#else
-			Overwrite(
-				schedule.GetOffset(),
-				GetLong( schedule.GetOffset() ) + dataSectionBaseOffset
-			);
-#endif
-		}
-	}
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp	(revision 602)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "stdafx.h"
-
-bool Delegate::IsSimilar( const Delegate &dgt ) const
-{
-	if( this->Params().Equals( dgt.Params(), true ) )			// パラメータが等しい、もしくは反変
-	{
-		if( this->returnType.Equals( dgt.returnType ) )
-		{
-			// 戻り値が等しい
-			return true;
-		}
-		else if( this->returnType.IsCovariant( dgt.returnType ) )
-		{
-			// 戻り値が共変
-			return true;
-		}
-	}
-	return false;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Interface.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Interface.cpp	(revision 602)
+++ 	(revision )
@@ -1,53 +1,0 @@
-#include "stdafx.h"
-
-Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters )
-	: DynamicMethodsPrototype()
-	, pInterfaceClass( pInterfaceClass )
-	, vtblOffset( -1 )
-	, actualTypeParameters( actualTypeParameters )
-{
-	//メソッドをコピー
-	BOOST_FOREACH( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() )
-	{
-		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
-
-		// アクセシビリティ
-		if(pBaseMethod->GetAccessibility() == Prototype::Private){
-			pMethod->SetAccessibility( Prototype::None );
-		}
-		else{
-			pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );
-		}
-
-		//pobj_Inherits
-		// ※継承元のClassIndexをセット（入れ子継承を考慮する）
-		if(pBaseMethod->GetInheritsClassPtr()==0){
-			pMethod->SetInheritsClassPtr( pInterfaceClass );
-		}
-		else{
-			pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );
-		}
-
-		AddDynamicMethods( pMethod );
-	}
-}
-
-std::string Interface::GetFullNameWithActualGenericTypeParameters() const
-{
-	std::string interfaceName = this->GetClass().GetFullName();
-	if( actualTypeParameters.size() )
-	{
-		std::string actualGenericTypesName;
-		BOOST_FOREACH( const Type &typeParameter, actualTypeParameters )
-		{
-			if( actualGenericTypesName.size() )
-			{
-				actualGenericTypesName += ",";
-			}
-			actualGenericTypesName += typeParameter.ToString();
-		}
-
-		interfaceName += "<" + actualGenericTypesName + ">";
-	}
-	return interfaceName;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 603)
@@ -1,7 +1,3 @@
 #include "stdafx.h"
-
-#include <Source.h>
-#include <Class.h>
-#include <Compiler.h>
 
 #include "../common.h"
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Meta.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Meta.cpp	(revision 602)
+++ 	(revision )
@@ -1,197 +1,0 @@
-#include "stdafx.h"
-
-void Meta::Clear()
-{
-	// 名前空間
-	namespaceScopesCollection.clear();
-
-	// 関数・メソッド
-	userProcs.Clear();
-
-	// DLL関数
-	dllProcs.Clear();
-
-	// クラス
-	classesImpl.Clear();
-
-	// グローバル変数
-	globalVars.Clear();
-
-	// グローバル定数
-	globalConsts.Clear();
-
-	// グローバル定数マクロ
-	globalConstMacros.Clear();
-
-	// blittable型
-	blittableTypes.clear();
-
-	// TypeDef
-	typeDefs.clear();
-
-	// 関数ポインタ
-	procPointers.Clear();
-}
-
-void Meta::StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase )
-{
-	// 名前空間
-	BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection )
-	{
-		if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) )
-		{
-			this->namespaceScopesCollection.push_back( namespaceScopes );
-		}
-	}
-
-	// 関数・メソッド
-	meta.GetUserProcs().Iterator_Reset();
-	while( meta.GetUserProcs().Iterator_HasNext() )
-	{
-		UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext();
-		pUserProc->isTargetObjectModule = false;
-
-		pUserProc->GetNativeCode().ResetDataSectionBaseOffset( dataSectionBaseOffset );
-		pUserProc->GetNativeCode().ResetSourceIndexes( sourceIndexBase );
-
-		this->userProcs.Put( pUserProc );
-	}
-	meta.GetUserProcs().PullOutAll();
-
-	// DLL関数
-	meta.GetDllProcs().Iterator_Reset();
-	while( meta.GetDllProcs().Iterator_HasNext() )
-	{
-		DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext();
-		pDllProc->isTargetObjectModule = false;
-		this->dllProcs.Put( pDllProc );
-	}
-	meta.GetDllProcs().PullOutAll();
-
-	// クラス
-	meta.GetClasses().Iterator_Reset();
-	while( meta.GetClasses().Iterator_HasNext() )
-	{
-		CClass *pClass = meta.GetClasses().Iterator_GetNext();
-		pClass->isTargetObjectModule = false;
-		this->GetClasses().Put( pClass );
-	}
-	meta.GetClasses().PullOutAll();
-
-	// グローバル変数
-	long initAreaBaseOffset = this->globalVars.initAreaBuffer.GetSize();
-	BOOST_FOREACH( Variable *pVar, meta.globalVars )
-	{
-		// 基底スコープレベルのグローバル変数の生存値をオンにする
-		if( pVar->GetScopeLevel() == 0 )
-		{
-			pVar->isLiving = true;
-		}
-
-		bool isResetOffsetAddress = true;
-		if( pVar->HasInitData() )
-		{
-			// 初期バッファがあるときはデータテーブルオフセットを適用する
-			pVar->SetOffsetAddress( pVar->GetOffsetAddress() + initAreaBaseOffset );
-
-			isResetOffsetAddress = false;
-		}
-
-		pVar->isTargetObjectModule = false;
-		this->globalVars.Add( pVar, isResetOffsetAddress );
-	}
-	meta.globalVars.PullOutAll();
-	this->globalVars.initAreaBuffer.Put(
-		meta.globalVars.initAreaBuffer.GetBuffer(),
-		meta.globalVars.initAreaBuffer.GetSize()
-	);
-
-	// グローバル定数
-	meta.GetGlobalConsts().Iterator_Reset();
-	while( meta.GetGlobalConsts().Iterator_HasNext() )
-	{
-		CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext();
-		pConst->isTargetObjectModule = false;
-		this->GetGlobalConsts().Put( pConst );
-	}
-	meta.GetGlobalConsts().PullOutAll();
-
-	// グローバル定数マクロ
-	meta.GetGlobalConstMacros().Iterator_Reset();
-	while( meta.GetGlobalConstMacros().Iterator_HasNext() )
-	{
-		ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext();
-		pConstMacro->isTargetObjectModule = false;
-		this->GetGlobalConstMacros().Put( pConstMacro );
-	}
-	meta.GetGlobalConstMacros().PullOutAll();
-
-	// blittable型
-	BOOST_FOREACH( BlittableType &blittableType, meta.blittableTypes )
-	{
-		blittableType.isTargetObjectModule = false;
-		this->blittableTypes.push_back( blittableType );
-	}
-	meta.blittableTypes.clear();
-
-	// TypeDef
-	BOOST_FOREACH( TypeDef &typeDef, meta.typeDefs )
-	{
-		typeDef.isTargetObjectModule = false;
-		this->typeDefs.push_back( typeDef );
-	}
-	meta.typeDefs.clear();
-
-	// 関数ポインタ
-	BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers )
-	{
-		pProcPointer->isTargetObjectModule = false;
-		this->procPointers.push_back( pProcPointer );
-	}
-	meta.procPointers.PullOutAll();
-
-	// デリゲート
-	meta.GetDelegates().Iterator_Reset();
-	while( meta.GetDelegates().Iterator_HasNext() )
-	{
-		Delegate *pDelegate = meta.GetDelegates().Iterator_GetNext();
-		pDelegate->isTargetObjectModule = false;
-		this->GetDelegates().Put( pDelegate );
-	}
-	meta.GetDelegates().PullOutAll();
-}
-
-const ::Delegate &Meta::ToDelegate( const CClass &_class )
-{
-	const ::Delegate *dg = this->GetDelegates().GetHashArrayElement( _class.GetName().c_str() );
-	while( dg )
-	{
-		if( dg->IsEqualSymbol( _class.GetNamespaceScopes(), _class.GetName() ) ){
-			//名前空間とクラス名が一致した
-			return *dg;
-		}
-		dg = dg->GetChainNext();
-	}
-
-	throw;
-}
-
-const CClass *Meta::FindClassSupportedTypeDef( const Symbol &symbol )
-{
-	const CClass *pClass = this->GetClasses().FindEx( symbol );
-	if( pClass )
-	{
-		return pClass;
-	}
-
-	// TypeDefも見る
-	int index = this->GetTypeDefs().GetIndex( symbol );
-	if( index != -1 ){
-		Type type = this->GetTypeDefs()[index].GetBaseType();
-		if( type.IsObject() ){
-			return &type.GetClass();
-		}
-	}
-
-	return NULL;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Method.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Method.cpp	(revision 602)
+++ 	(revision )
@@ -1,142 +1,0 @@
-#include "stdafx.h"
-
-DynamicMethod::OverrideResult::EnumType DynamicMethod::Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier )
-{
-	bool isAbstractBefore = this->IsAbstract();
-
-	//メンバ関数を上書き
-	this->SetUserProcPtr( pUserProc );
-	this->SetAbstractMark( false );
-
-	if( this->IsVirtual() )
-	{
-		if( !isAbstractBefore && isOverrideModifier == false )
-		{
-			return OverrideResult::NotUseOverrideModifier;
-		}
-	}
-	else
-	{
-		return OverrideResult::NotVirtual;
-	}
-
-	if( this->GetAccessibility() != accessibility )
-	{
-		return OverrideResult::DifferentAccesibility;
-	}
-
-	return OverrideResult::Successful;
-}
-
-
-StaticMethod::StaticMethod( const StaticMethod &staticMethod )
-{
-	// 静的メソッドがコピーコンストラトされることは想定しない
-	throw;
-}
-
-Methods::Methods()
-{
-}
-
-// コピーコンストラクタ
-Methods::Methods( const Methods &methods )
-{
-	BOOST_FOREACH( CMethod *pMethod, methods )
-	{
-		this->push_back( new DynamicMethod( dynamic_cast<DynamicMethod &>(*pMethod) ) );
-	}
-}
-
-Methods::~Methods()
-{
-	Methods &methods = *this;
-	BOOST_FOREACH( CMethod *pMethod, methods )
-	{
-		delete pMethod;
-	}
-}
-
-void Methods::Add( UserProc *pUserProc,Prototype::Accessibility accessibility, bool isConst, bool isAbstract, bool isVirtual ){
-	CMethod *pMethod = new DynamicMethod( pUserProc, accessibility, isAbstract, isVirtual, isConst );
-	this->push_back( pMethod );
-	pUserProc->SetMethod( pMethod );
-}
-void Methods::AddStatic(UserProc *pUserProc, Prototype::Accessibility accessibility ){
-	CMethod *pMethod = new StaticMethod( pUserProc, accessibility );
-	this->push_back( pMethod );
-	pUserProc->SetMethod( pMethod );
-}
-
-DynamicMethod *Methods::FindForOverride( const Types &actualTypeParametersForThisMethods, const UserProc *pUserProc )
-{
-	//メソッドのオーバーライド
-	Methods &methods = *this;
-	BOOST_FOREACH( CMethod *pMethod, methods )
-	{
-		if( !pMethod->IsNotUse() && pMethod->GetUserProc().IsEqualForOverride( actualTypeParametersForThisMethods, pUserProc ) )
-		{
-			return dynamic_cast<DynamicMethod *>(pMethod);
-		}
-	}
-	return NULL;
-}
-
-const CMethod *Methods::GetMethodPtr( const UserProc *pUserProc ) const
-{
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		if( pUserProc == &methods[i]->GetUserProc() ){
-			return methods[i];
-		}
-	}
-	return NULL;
-}
-bool Methods::IsExist( const char *name ) const
-{
-	const Methods &methods = *this;
-	BOOST_FOREACH( const CMethod *pMethod, methods ){
-		if( pMethod->GetUserProc().GetName() == name ) return true;
-	}
-	return false;
-}
-void Methods::Enum( const char *methodName, std::vector<const UserProc *> &subs ) const
-{
-	//オブジェクトのメンバ関数の場合
-	//※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		if( methods[i]->GetUserProc().GetName() == methodName && methods[i]->IsNotUse() == false ){
-			subs.push_back( &methods[i]->GetUserProc() );
-		}
-	}
-}
-void Methods::Enum( BYTE idOperatorCalc, std::vector<const UserProc *> &subs ) const
-{
-	//オブジェクトのメンバ関数の場合
-	//※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		const UserProc &userProc = methods[i]->GetUserProc();
-		const char *temp = userProc.GetName().c_str();
-		if(temp[0]==1&&temp[1]==ESC_OPERATOR){
-			if((BYTE)temp[2]==idOperatorCalc){
-				subs.push_back( &userProc );
-			}
-		}
-	}
-}
-
-int Methods::GetVtblNum() const
-{
-	int count = 0;
-	const Methods &methods = *this;
-	BOOST_FOREACH( const CMethod *pMethod, methods )
-	{
-		if( pMethod->IsVirtual() )
-		{
-			count++;
-		}
-	}
-	return count;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/NativeCode.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/NativeCode.cpp	(revision 602)
+++ 	(revision )
@@ -1,160 +1,0 @@
-#include "stdafx.h"
-
-#define BREAK_EIP(checkEip)  (obp+0x00401000>=checkEip)
-
-const ::DllProc &Schedule::GetDllProc() const
-{
-	_ASSERT( type == Schedule::DllProc );
-	return *pDllProc;
-}
-const ::UserProc &Schedule::GetUserProc() const
-{
-	_ASSERT( type == Schedule::UserProc || type == Schedule::AddressOf || type == Schedule::CatchAddress );
-	return *pUserProc;
-}
-const ::CClass &Schedule::GetClass() const
-{
-	_ASSERT( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo );
-	return *pClass;
-}
-
-void NativeCode::PutEx( const NativeCode &nativeCode )
-{
-	long baseOffset = GetSize();
-
-	// コードバッファを追加
-	Put( nativeCode.GetBuffer(), nativeCode.GetSize() );
-
-	// スケジュールを追加
-	BOOST_FOREACH( const Schedule &schedule, nativeCode.schedules )
-	{
-		this->schedules.push_back(
-			Schedule(
-				schedule.GetType(),
-				baseOffset + schedule.GetOffset(),
-				schedule.GetLongPtrValue()
-			)
-		);
-	}
-
-	// ソースコード行番号とネイティブコード位置の対応情報を追加
-	BOOST_FOREACH( const SourceLine &sourceLine, nativeCode.sourceLines )
-	{
-		this->sourceLines.push_back(
-			SourceLine(
-				sourceLine.GetLineNum(),
-				baseOffset + sourceLine.GetNativeCodePos(),
-				sourceLine.GetSourceIndex(),
-				sourceLine.GetSourceCodePos(),
-				sourceLine.GetCodeType()
-			)
-		);
-	}
-}
-
-void NativeCode::PutEx( long l, Schedule::Type scheduleType )
-{
-	if( scheduleType != Schedule::None )
-	{
-		schedules.push_back( Schedule( scheduleType, GetSize() ) );
-	}
-
-	Put( l );
-}
-
-void NativeCode::PutUserProcSchedule( const UserProc *pUserProc, bool isCall )
-{
-	pUserProc->Using();
-
-	Schedule::Type type = isCall ? Schedule::UserProc : Schedule::AddressOf;
-
-	schedules.push_back( Schedule( type, pUserProc, GetSize() ) );
-
-	Put( (long)0 );
-}
-
-void NativeCode::PutCatchAddressSchedule( const UserProc *pUserProc, long codePos )
-{
-	pUserProc->Using();
-
-	schedules.push_back( Schedule( Schedule::CatchAddress, pUserProc, GetSize() ) );
-
-	Put( codePos );
-}
-
-void NativeCode::PutDllProcSchedule( const DllProc *pDllProc )
-{
-	pDllProc->Using();
-
-	schedules.push_back( Schedule( pDllProc, GetSize() ) );
-
-	Put( (long)0 );
-}
-
-void NativeCode::PutComVtblSchedule( const CClass *pClass )
-{
-	schedules.push_back( Schedule( Schedule::ComVtbl, pClass, GetSize() ) );
-
-	Put( (long)0 );
-}
-
-void NativeCode::PutVtblSchedule( const CClass *pClass )
-{
-	schedules.push_back( Schedule( Schedule::Vtbl, pClass, GetSize() ) );
-
-	Put( (long)0 );
-}
-
-void NativeCode::NextSourceLine( int currentSourceIndex, int nowLine )
-{
-	if( sourceLines.size() )
-	{
-		if( sourceLines.back().GetNativeCodePos() == GetSize() )
-		{
-			sourceLines.back().SetSourceCodePos( nowLine );
-			return;
-		}
-	}
-
-	extern BOOL bDebugSupportProc;
-	extern BOOL bSystemProc;
-	DWORD sourceLineType = 0;
-	if( bDebugSupportProc )
-	{
-		sourceLineType |= CODETYPE_DEBUGPROC;
-	}
-	if( bSystemProc )
-	{
-		sourceLineType |= CODETYPE_SYSTEMPROC;
-	}
-	sourceLines.push_back(
-		SourceLine(
-			(long)sourceLines.size(),
-			GetSize(),
-			currentSourceIndex,
-			nowLine,
-			sourceLineType
-		)
-	);
-}
-
-void NativeCode::ResetDataSectionBaseOffset( long dataSectionBaseOffset )
-{
-	BOOST_FOREACH( const Schedule &schedule, schedules )
-	{
-		if( schedule.GetType() == Schedule::DataTable )
-		{
-			Overwrite(
-				schedule.GetOffset(),
-				GetLong( schedule.GetOffset() ) + dataSectionBaseOffset
-			);
-		}
-	}
-}
-void NativeCode::ResetSourceIndexes( long sourceIndexBase )
-{
-	BOOST_FOREACH( SourceLine &sourceLine, sourceLines )
-	{
-		sourceLine.SetSourceIndex( sourceLine.GetSourceIndex() + sourceIndexBase );
-	}
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp	(revision 602)
+++ 	(revision )
@@ -1,242 +1,0 @@
-#pragma warning(disable : 4996)
-
-#include <map>
-#include <string>
-#include <vector>
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <ios>
-#include <streambuf>
-#include <sstream>
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <commctrl.h>
-#include <time.h>
-#include <limits.h>
-#include <shlobj.h>
-#include <process.h>
-#include <fcntl.h>
-#include <io.h>
-#include <shlwapi.h>
-#include <tchar.h>
-#include <stdarg.h>
-
-//boost libraries
-#include <boost/foreach.hpp>
-
-
-// ObjectModuleの内容をXmlで生成する場合はこの行を有効にする
-//#define OBJECT_MODULE_IS_NOT_BINARY
-
-
-#ifdef OBJECT_MODULE_IS_NOT_BINARY
-#include <boost/archive/xml_oarchive.hpp>
-#include <boost/archive/xml_iarchive.hpp>
-#else
-#include <boost/archive/binary_oarchive.hpp>
-#include <boost/archive/binary_iarchive.hpp>
-#endif
-#include <boost/serialization/string.hpp>
-#include <boost/serialization/access.hpp>
-#include <boost/serialization/level.hpp>
-#include <boost/serialization/vector.hpp>
-#include <boost/serialization/map.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/serialization/is_abstract.hpp>
-#include <boost/serialization/serialization.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/export.hpp>
-
-#include <jenga/include/jenga.h>
-#include <abdev/ab_common/include/ab_common.h>
-
-#include "../common.h"
-
-#include <option.h>
-
-using namespace ActiveBasic::Common::Lexical;
-
-#include <NativeCode.h>
-#include <Source.h>
-#include <Type.h>
-#include <Method.h>
-#include <Interface.h>
-#include <Member.h>
-#include <Class.h>
-#include <Parameter.h>
-#include <Variable.h>
-#include <Procedure.h>
-#include <TypeDef.h>
-#include <Const.h>
-#include <Delegate.h>
-#include <Enum.h>
-#include <Meta.h>
-#include <DataTable.h>
-#include <ObjectModule.h>
-
-
-void ObjectModule::StaticLink( ObjectModule &objectModule )
-{
-	long dataSectionBaseOffset = dataTable.GetSize();
-	int sourceIndexBase = (int)sources.size();
-
-	// メタ情報を結合
-	meta.StaticLink( objectModule.meta, dataSectionBaseOffset, sourceIndexBase );
-
-	// グローバル ネイティブコードを結合
-	objectModule.globalNativeCode.ResetDataSectionBaseOffset( dataSectionBaseOffset );
-	objectModule.globalNativeCode.ResetSourceIndexes( sourceIndexBase );
-	globalNativeCode.PutEx( objectModule.globalNativeCode );
-
-	// データテーブルを結合
-	objectModule.dataTable.ResetDataSectionBaseOffset( dataSectionBaseOffset );
-	dataTable.Add( objectModule.dataTable );
-
-	// ソースコードを結合
-	BOOST_FOREACH( const BasicSource &source, objectModule.sources )
-	{
-		this->sources.push_back( source );
-	}
-
-	// TODO: basbufがいらなくなったら消す
-	extern char *basbuf;
-	basbuf = this->sources[0].GetBuffer();
-}
-
-bool ObjectModule::Read( const std::string &filePath )
-{
-	// XMLとして読み込む
-	bool isSuccessful = false;
-
-	try{
-#ifdef OBJECT_MODULE_IS_NOT_BINARY
-		std::ifstream ifs( filePath.c_str() );
-		boost::archive::xml_iarchive ia(ifs);
-#else
-		std::ifstream ifs( filePath.c_str(), std::ios::in | std::ios::binary );
-		boost::archive::binary_iarchive ia(ifs);
-#endif
-
-		// ファイルから読込
-		ia >> boost::serialization::make_nvp( RootTagName(), *this );
-
-		isSuccessful = true;
-	}
-	catch( boost::archive::archive_exception e )
-	{
-		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
-	}
-	catch(...){
-		MessageBox( NULL, "archive_exception以外の不明な例外", "XMLシリアライズの例外", MB_OK );
-	}
-
-	if( !isSuccessful )
-	{
-		return false;
-	}
-
-	return true;
-}
-bool ObjectModule::Write( const std::string &filePath ) const
-{
-	bool isSuccessful = false;
-
-	try{
-#ifdef OBJECT_MODULE_IS_NOT_BINARY
-		std::ofstream ofs( filePath.c_str() );
-		boost::archive::xml_oarchive oa(ofs);
-#else
-		std::ofstream ofs( filePath.c_str(), std::ios::out | std::ios::binary );
-		boost::archive::binary_oarchive oa(ofs);
-#endif
-
-		// ファイルに書き出し
-		oa << boost::serialization::make_nvp( RootTagName(), *this );
-
-		isSuccessful = true;
-	}
-	catch( boost::archive::archive_exception e )
-	{
-		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
-	}
-	catch(...){
-		MessageBox( NULL, "archive_exception以外の不明な例外", "XMLシリアライズの例外", MB_OK );
-	}
-
-	if( !isSuccessful )
-	{
-		return false;
-	}
-
-	return true;
-}
-bool ObjectModule::ReadString( const std::string &str )
-{
-	bool isSuccessful = false;
-
-	// 入力アーカイブの作成
-
-	try{
-#ifdef OBJECT_MODULE_IS_NOT_BINARY
-		std::istringstream iss( str );
-		boost::archive::xml_iarchive ia(iss);
-#else
-		std::istringstream iss( str, std::ios::in | std::ios::binary );
-		boost::archive::binary_iarchive ia(iss);
-#endif
-
-		// 文字列ストリームから読込
-		ia >> boost::serialization::make_nvp( RootTagName(), *this );
-
-		isSuccessful = true;
-	}
-	catch( boost::archive::archive_exception e )
-	{
-		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
-	}
-	catch(...){
-		MessageBox( NULL, "archive_exception以外の不明な例外", "XMLシリアライズの例外", MB_OK );
-	}
-
-	if( !isSuccessful )
-	{
-		return false;
-	}
-
-	return true;
-}
-bool ObjectModule::WriteString( std::string &str ) const
-{
-	// 出力アーカイブの作成
-
-	bool isSuccessful = false;
-	try{
-#ifdef OBJECT_MODULE_IS_NOT_BINARY
-		std::ostringstream oss;
-		boost::archive::xml_oarchive oa(oss);
-#else
-		std::ostringstream oss( "", std::ios::out | std::ios::binary );
-		boost::archive::binary_oarchive oa(oss);
-#endif
-
-		// 文字列ストリームに書き出し
-		oa << boost::serialization::make_nvp( RootTagName(), *this );
-
-		str = oss.str();
-
-		isSuccessful = true;
-	}
-	catch( boost::archive::archive_exception e )
-	{
-		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
-	}
-	catch(...){
-		MessageBox( NULL, "archive_exception以外の不明な例外", "XMLシリアライズの例外", MB_OK );
-	}
-
-	return isSuccessful;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Parameter.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Parameter.cpp	(revision 602)
+++ 	(revision )
@@ -1,87 +1,0 @@
-#include "stdafx.h"
-
-bool Parameter::Equals( const Parameter &param, bool isContravariant ) const
-{
-	if( Type::Equals( param ) )
-	{
-		return true;
-	}
-	else
-	{
-		if( this->isRef && this->GetBasicType() == DEF_ANY &&
-			param.isRef == false && param.IsPointer()
-			||
-			this->isRef == false && this->IsPointer() &&
-			param.isRef && param.GetBasicType() == DEF_ANY )
-		{
-			/* ByRef var As Any
-					と
-				var As VoidPtr
-				は同等
-			*/
-			return true;
-		}
-	}
-
-	if( isContravariant )
-	{
-		// 反変引数を許可する
-		if( this->IsContravariant( param ) )
-		{
-			// 反変引数だったとき
-			return true;
-		}
-	}
-
-	return false;
-}
-bool Parameter::Equals( const Types &actualTypeParametersForThisProc, const Parameter &param, bool isContravariant ) const
-{
-	if( Equals( param, isContravariant ) )
-	{
-		return true;
-	}
-	
-	if( this->IsTypeParameter() )
-	{
-		// 型パラメータだったとき
-		if( actualTypeParametersForThisProc[this->GetFormalTypeIndex()].Equals( param ) )
-		{
-			// 戻り値が等しい
-			return true;
-		}
-	}
-
-	return false;
-}
-
-bool Parameters::Equals( const Parameters &params, bool isContravariant ) const
-{
-	if( this->size() != params.size() ){
-		return false;
-	}
-
-	int max = (int)this->size();
-	for( int i=0; i<max; i++ ){
-		if( !(*this)[i]->Equals( *params[i], isContravariant ) ){
-			return false;
-		}
-	}
-
-	return true;
-}
-bool Parameters::Equals( const Types &actualTypeParametersForThisProc, const Parameters &params, bool isContravariant ) const
-{
-	if( this->size() != params.size() ){
-		return false;
-	}
-
-	int max = (int)this->size();
-	for( int i=0; i<max; i++ ){
-		if( !(*this)[i]->Equals( actualTypeParametersForThisProc, *params[i], isContravariant ) ){
-			return false;
-		}
-	}
-
-	return true;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Procedure.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Procedure.cpp	(revision 602)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#include "stdafx.h"
-
-bool UserProc::IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const
-{
-	if( this->GetName() == pUserProc->GetName()						// 名前空間及び名前が等しい
-		&& this->Params().Equals( actualTypeParametersForThisProc, pUserProc->Params() ) )			// パラメータが等しい
-	{
-		if( this->returnType.Equals( pUserProc->returnType ) )
-		{
-			// 戻り値が等しい
-			return true;
-		}
-		else if( this->returnType.IsCovariant( pUserProc->returnType ) )
-		{
-			// 戻り値が共変
-			return true;
-		}
-		else if( this->returnType.IsTypeParameter() )
-		{
-			// 型パラメータだったとき
-
-			if( actualTypeParametersForThisProc[this->returnType.GetFormalTypeIndex()].Equals( pUserProc->returnType ) )
-			{
-				// 戻り値が等しい
-				return true;
-			}
-			else if( actualTypeParametersForThisProc[this->returnType.GetFormalTypeIndex()].IsCovariant( pUserProc->returnType ) )
-			{
-				// 戻り値が共変
-				return true;
-			}
-		}
-	}
-	return false;
-}
-	
-
-std::string UserProc::GetFullName() const
-{
-	if( HasParentClass() ){
-		return GetParentClass().GetName() + "." + GetName();
-	}
-
-	return GetName();
-}
-bool UserProc::IsCastOperator() const
-{
-	if( GetName()[0] == 1 && GetName()[1] == ESC_OPERATOR && GetName()[2] == CALC_AS )
-	{
-		return true;
-	}
-	return false;
-}
-const NamespaceScopes &UserProc::GetNamespaceScopes() const
-{
-	if( HasParentClass() ){
-		return GetParentClassPtr()->GetNamespaceScopes();
-	}
-	return Symbol::GetNamespaceScopes();
-}
-const NamespaceScopesCollection &UserProc::GetImportedNamespaces() const
-{
-	if( pParentClass )
-	{
-		return pParentClass->GetImportedNamespaces();
-	}
-	return importedNamespaces;
-}
-bool UserProc::IsVirtual() const
-{
-	if( pMethod == NULL ){
-		return false;
-	}
-	return ( pMethod->IsVirtual() != 0 );
-}
-const CMethod &UserProc::GetMethod() const
-{
-	if( !HasParentClass() )
-	{
-		Jenga::Throw( "グローバル関数に対してUserProc::GetMethodメソッドが呼ばれた" );
-	}
-	return *pMethod;
-}
-
-const UserProc *UserProc::pGlobalProc = NULL;
-
-
-void UserProcs::EnumGlobalProcs( const char *simpleName, const Symbol &localSymbol, std::vector<const UserProc *> &subs )
-{
-	///////////////////////////
-	// グローバル関数を検索
-	///////////////////////////
-
-	// ハッシュ値を取得
-	UserProc *pUserProc = GetHashArrayElement( simpleName );
-	while(pUserProc){
-		if( pUserProc->IsGlobalProcedure() ){
-			if( pUserProc->IsEqualSymbol( localSymbol ) ){
-				subs.push_back( pUserProc );
-			}
-		}
-
-		pUserProc=pUserProc->GetChainNext();
-	}
-}
-
-void ProcPointers::Clear()
-{
-	ProcPointers &procPointers = *this;
-	BOOST_FOREACH( ProcPointer *pProcPointer, procPointers ){
-		delete pProcPointer;
-	}
-	this->clear();
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp	(revision 602)
+++ 	(revision )
@@ -1,960 +1,0 @@
-#include "stdafx.h"
-
-const std::string BasicSource::generateDirectiveName = "#generate";
-
-
-class CDefine{
-	std::vector<std::string> names;
-public:
-	void Free();
-	void Init( bool isDebug, bool isDll, bool isUnicode, int majorVer );
-
-	BOOL add(char *name);
-	BOOL undef(char *name);
-	BOOL check(char *name);
-	void preprocessor_ifdef(char *buffer,bool isNot);
-	void DirectiveIfdef(char *buffer);
-};
-CDefine objDefine;
-
-
-//////////////////////////////////////
-// #requireの管理
-//////////////////////////////////////
-class CRequireFiles{
-	char **ppFilePath;
-	int count;
-public:
-	CRequireFiles(){
-		ppFilePath = (char **)malloc( 1 );
-		count = 0;
-	}
-	~CRequireFiles(){
-		for( int i = 0; i < count; i++ ){
-			free( ppFilePath[i] );
-		}
-		free( ppFilePath );
-	}
-	void clear(){
-		for( int i = 0; i < count; i++ ){
-			free( ppFilePath[i] );
-		}
-		free( ppFilePath );
-
-		ppFilePath = (char **)malloc( 1 );
-		count = 0;
-	}
-	bool IsIncluded( const char *includeFilePath ){
-		// '/' → '\\'
-		char tempPath[MAX_PATH];
-		lstrcpy( tempPath, includeFilePath );
-		for( int i=0; tempPath[i]; i++ ){
-			if( tempPath[i] == '/' ){
-				tempPath[i] = '\\';
-			}
-		}
-
-		for( int i=0; i<count; i++ ){
-			if( lstrcmpi( ppFilePath[i], tempPath ) == 0 ){
-				return true;
-			}
-		}
-		return false;
-	}
-	void Add( const char *includeFilePath ){
-		// '/' → '\\'
-		char tempPath[MAX_PATH];
-		lstrcpy( tempPath, includeFilePath );
-		for( int i=0; tempPath[i]; i++ ){
-			if( tempPath[i] == '/' ){
-				tempPath[i] = '\\';
-			}
-		}
-
-		//既に読み込まれているとき
-		if( IsIncluded( tempPath ) ) return;
-
-		//追加
-		ppFilePath = (char **)realloc(ppFilePath, ( count + 1 ) * sizeof(char *) );
-		ppFilePath[count] = (char *)malloc( lstrlen(tempPath) + 1 );
-		lstrcpy( ppFilePath[count], tempPath );
-		count++;
-	}
-};
-CRequireFiles requireFiles;
-
-
-//////////////////////////////////////
-// #define間するクラス
-//////////////////////////////////////
-
-void CDefine::Init( bool isDebug, bool isDll, bool isUnicode, int majorVer )
-{
-	names.clear();
-
-	if( isDebug )
-	{
-		add("_DEBUG");
-	}
-
-#ifdef _AMD64_
-	add("_WIN64");
-#endif
-
-	if( isDll )
-	{
-		add("_DLL");
-	}
-
-	if( isUnicode )
-	{
-		add( "UNICODE" );
-	}
-
-	char temporary[255];
-	sprintf(temporary,"_AB_VER%d",majorVer);
-	add(temporary);
-}
-BOOL CDefine::add(char *name){
-	extern HANDLE hHeap;
-
-	//重複チェック
-	if(check(name)) return 0;
-
-	//追加
-	names.push_back( name );
-
-	return 1;
-}
-BOOL CDefine::undef(char *name){
-	std::vector<std::string>::iterator i = names.begin();
-	BOOST_FOREACH( const std::string &temp, names ){
-		if( temp == name ){
-			names.erase( i );
-			return 1;
-		}
-		i++;
-	}
-
-	return 0;
-}
-BOOL CDefine::check(char *name){
-
-	//重複チェック
-	BOOST_FOREACH( const std::string &temp, names ){
-		if( temp == name ){
-			return 1;
-		}
-	}
-	return 0;
-}
-
-int Search_endif(char *buffer,int i, int *pLine = 0){
-	for(;;i++){
-		if(buffer[i]=='\0') break;
-
-		if( buffer[i] == '\n' ){
-			if( pLine ){
-				(*pLine)++;
-			}
-		}
-
-		if(buffer[i-1]=='\n'){
-			if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-				i=Search_endif(buffer,i+6, pLine);
-				if(buffer[i]=='\0') break;
-				continue;
-			}
-			else if(memicmp(buffer+i,"#endif",6)==0){
-				break;
-			}
-		}
-	}
-	return i;
-}
-
-void CDefine::preprocessor_ifdef(char *buffer,bool isNot){
-	int i,i2,i3;
-	char temporary[VN_SIZE];
-
-	if(isNot) i=lstrlen("#ifndef");
-	else i=lstrlen("#ifdef");
-	while(buffer[i]==' '||buffer[i]=='\t') i++;
-
-	for(i2=0;;i++,i2++){
-		if(buffer[i]=='\n'||buffer[i]=='\0'){
-			temporary[i2]=0;
-			break;
-		}
-		temporary[i2]=buffer[i];
-	}
-
-	int sw=0;
-	if(check(temporary)) sw=1;
-
-	if(isNot){
-		//#ifndefのとき（反対にする）
-		if(sw) sw=0;
-		else sw=1;
-	}
-
-	//#ifdefの行を消去
-	Text::SlideString(buffer+i,-i);
-	i=0;
-
-	BOOL bElse=0;
-	if(sw){
-		//TRUEのとき
-
-		//#else、#endifを探索
-		for(;;i++){
-			if(buffer[i]=='\0') break;
-
-			if(i==0||buffer[i-1]=='\n'){
-				if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-					i=Search_endif(buffer,i+6);
-					if(buffer[i]=='\0') break;
-					continue;
-				}
-				else if(memicmp(buffer+i,"#else",5)==0){
-					i2=5;
-					bElse=1;
-					break;
-				}
-				else if(memicmp(buffer+i,"#endif",6)==0){
-					i2=6;
-					bElse=0;
-					break;
-				}
-			}
-		}
-
-		//行を消去
-		Text::SlideString(buffer+i+i2,-i2);
-
-		if(bElse){
-			//#elseがある場合はその区間を消去
-
-			for(i2=i,i3=0;;i2++){
-				if(buffer[i2]=='\0') break;
-
-				if(buffer[i2]=='\n') i3++;
-
-				if(i2==0||buffer[i2-1]=='\n'){
-					if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){
-						i2=Search_endif(buffer,i2+6, &i3 );
-						if(buffer[i2]=='\0') break;
-						continue;
-					}
-					if(memicmp(buffer+i2,"#endif",6)==0){
-						i2+=6;
-						break;
-					}
-				}
-			}
-
-			//ソースコード区間を消去し、改行コードを挿入
-			Text::SlideString(buffer+i2,i-i2+i3);
-			memset(buffer+i,'\n',i3);
-		}
-	}
-	else{
-		//FALSEのとき
-
-		//#else、#endifを探索
-		for(i2=i,i3=0;;i2++){
-			if(buffer[i2]=='\0') break;
-
-			if(buffer[i2]=='\n') i3++;
-
-			if(i2==0||buffer[i2-1]=='\n'){
-				if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){
-					i2=Search_endif(buffer,i2+6, &i3 );
-					if(buffer[i2]=='\0') break;
-					continue;
-				}
-				else if(memicmp(buffer+i2,"#else",5)==0){
-					i2+=5;
-					bElse=1;
-					break;
-				}
-				else if(memicmp(buffer+i2,"#endif",6)==0){
-					i2+=6;
-					bElse=0;
-					break;
-				}
-			}
-		}
-
-		//ソースコード区間を消去し、改行コードを挿入
-		Text::SlideString(buffer+i2,i-i2+i3);
-		memset(buffer+i,'\n',i3);
-
-		if(bElse){
-			//#endifを探索
-			for(;;i++){
-				if(buffer[i]=='\0') break;
-
-				if(i==0||buffer[i-1]=='\n'){
-					if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-						i=Search_endif(buffer,i+6);
-						if(buffer[i]=='\0') break;
-						continue;
-					}
-					else if(memicmp(buffer+i,"#endif",6)==0){
-						i2=6;
-						bElse=0;
-						break;
-					}
-				}
-			}
-
-			//行を消去
-			Text::SlideString(buffer+i+i2,-i2);
-		}
-	}
-}
-
-
-void CDefine::DirectiveIfdef(char *buffer){
-	int i,i2,i3,sw;
-	char temporary[VN_SIZE];
-
-	for(i=0;;i++){
-		if(buffer[i]=='\0') break;
-
-		if(i==0||(i>=1&&buffer[i-1]=='\n')){
-			sw=0;
-			if(memicmp(buffer+i,"#define",7)==0){
-				i2=i+7;
-				while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-				for(i3=0;;i2++,i3++){
-					if(buffer[i2]=='\n'||buffer[i2]=='\0'){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=buffer[i2];
-				}
-
-				add(temporary);
-
-				i2-=i;
-
-				//ディレクティブを消去
-				Text::SlideString(buffer+i+i2,-i2);
-			}
-			if(memicmp(buffer+i,"#undef",6)==0){
-				i2=i+7;
-				while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-				for(i3=0;;i2++,i3++){
-					if(buffer[i2]=='\n'||buffer[i2]=='\0'){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=buffer[i2];
-				}
-
-				undef(temporary);
-
-				i2-=i;
-
-				//ディレクティブを消去
-				Text::SlideString(buffer+i+i2,-i2);
-			}
-			else if(memicmp(buffer+i,"#ifdef",6)==0){
-				preprocessor_ifdef(buffer+i,false);
-				continue;
-			}
-			else if(memicmp(buffer+i,"#ifndef",7)==0){
-				preprocessor_ifdef(buffer+i,true);
-				continue;
-			}
-			else continue;
-		}
-	}
-}
-
-
-
-
-bool Text::ReadFile( const std::string &filePath ){
-	//ファイルオープン
-	HANDLE hFile=CreateFile(filePath.c_str(),GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
-	if(hFile==INVALID_HANDLE_VALUE){
-		return false;
-	}
-
-	length = GetFileSize( hFile, NULL );
-
-	buffer = (char *)realloc( buffer, length + 1 );
-
-	//読み込み
-	DWORD dwAccBytes;
-	::ReadFile(hFile,buffer,length,&dwAccBytes,0);
-	buffer[dwAccBytes]=0;
-
-	//ファイルクローズ
-	CloseHandle(hFile);
-
-	return true;
-}
-
-void BasicSource::ChangeReturnLineChar(){
-	int i,i2;
-
-	bool isMustChange = false;
-	for( i=0; ; i++ ){
-		if( buffer[i] == '\0' ){
-			break;
-		}
-		if( buffer[i]=='\n' )
-		{
-			if( i>0 )
-			{
-				if( buffer[i-1] == '\r' )
-				{
-					isMustChange = true;
-				}
-			}
-		}
-	}
-
-	if( !isMustChange )
-	{
-		// 改行コードの変換は必要ない
-		return;
-	}
-
-#ifdef _DEBUG
-	//改行コードの整合性チェック
-	for( i=0; ; i++ ){
-		if( buffer[i] == '\0' ){
-			break;
-		}
-		if( buffer[i]!='\r' && buffer[i+1]=='\n'
-			||  buffer[i]=='\r' && buffer[i+1]!='\n' ){
-				char temporary[255];
-				strncpy( temporary, buffer + i-100, 130 );
-				temporary[130] = 0;
-				for(int i2=0; ;i2++){
-					if(temporary[i2]=='\r') temporary[i2]='A';
-					if(temporary[i2]=='\n') temporary[i2]='B';
-					if(temporary[i2]=='\0') break;
-				}
-
-				extern HWND hOwnerEditor;
-				MessageBox( hOwnerEditor, temporary, "改行コードの整合性チェック", MB_OK | MB_ICONEXCLAMATION );
-		}
-	}
-#endif
-
-	//改行コードのCRLFをLFに変換
-	for(i=0,i2=0;;i++,i2++){
-		if(buffer[i]=='\r'&&buffer[i+1]=='\n') i++;
-		buffer[i2]=buffer[i];
-		if(buffer[i]=='\0') break;
-	}
-
-	length = i;
-}
-
-void BasicSource::RemoveComments(){
-	int i,i2,i3,IsStr;
-	char *temporary;
-	temporary=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(buffer)+1);
-	for(i=0,i2=0,i3=0,IsStr=0;;i++,i2++){
-		if(buffer[i]=='\"') IsStr^=1;
-		if(buffer[i]=='\n'||buffer[i]=='\0'){
-			i2--;
-			while(temporary[i2]==' '||temporary[i2]=='\t') i2--;
-			i2++;
-
-			if(i3){
-				//複数行に渡る注釈文の中に改行が存在するとき
-				memset(temporary+i2,'\n',i3);
-				i2+=i3;
-				i3=0;
-			}
-		}
-		if(buffer[i]=='\''&&IsStr==0){
-			//注釈文
-			i2--;
-			while(temporary[i2]==' '||temporary[i2]=='\t') i2--;
-			i2++;
-			while(buffer[i]!='\n'&&buffer[i]!='\0') i++;
-		}
-		if(buffer[i]=='/'&&buffer[i+1]=='*'&&IsStr==0){
-			//注釈文（複数行）
-			i+=2;
-			i3=0;
-			while(!(buffer[i]=='*'&&buffer[i+1]=='/')){
-				if(buffer[i]=='\n') i3++;
-				if(buffer[i]=='\0') break;
-				i++;
-			}
-			if(buffer[i]){
-				i+=2;
-			}
-			i--;
-			i2--;
-			continue;
-		}
-		temporary[i2]=buffer[i];
-		if(buffer[i]=='\0') break;
-	}
-	lstrcpy(buffer,temporary);
-	GlobalFree(temporary);
-}
-
-bool BasicSource::ReadFile_InIncludeDirective( const std::string &filePath ){
-	if( !Text::ReadFile( filePath ) ){
-		return false;
-	}
-
-	// 改行コードをCRLFからLFに変換
-	ChangeReturnLineChar();
-
-	// コメントを削除
-	RemoveComments();
-
-	// #ifdefディレクティブを処理
-	objDefine.DirectiveIfdef( buffer );
-
-	// アンダーバーによる改行を正規表現に戻す
-	RemoveReturnLineUnderbar();
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	Text::SlideString( buffer, 2 );
-	buffer[0] = '\n';
-	buffer[1] = '\n';
-
-	return true;
-}
-
-void BasicSource::DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath ){
-	extern HANDLE hHeap;
-	extern char BasicCurDir[MAX_PATH];
-	int i,i2,i3,sw1,LineNum,FileLayer[255],layer,LastFileByte[255];
-	char temporary[MAX_PATH],temp2[MAX_PATH+255],*LayerDir[255];
-
-	layer=0;
-	FileLayer[layer]=0;
-	LastFileByte[layer]=GetLength();
-	LineNum=0;
-
-	if( includedFilesRelation.GetLineCounts() != 0 )
-	{
-		Jenga::Throw( "インクルードファイル構造の初期値が不正" );
-	}
-
-	// メインソースコード
-	FileLayer[layer] = includedFilesRelation.AddFile( mainSourceFilePath );
-
-	//参照ディレクトリ
-	LayerDir[0]=(char *)malloc(lstrlen(BasicCurDir)+1);
-	lstrcpy(LayerDir[0],BasicCurDir);
-
-	for(i=0;;i++){
-		if(buffer[i]=='\0'){
-			break;
-		}
-		if(buffer[i]=='\n'){
-			includedFilesRelation.AddLine( FileLayer[layer] );
-		}
-		if(i>LastFileByte[layer]){
-			free(LayerDir[layer]);
-			LayerDir[layer]=0;
-			layer--;
-		}
-		if((buffer[i-1]=='\n'||i==0)&&buffer[i]=='#'){
-			bool isRequire = false;
-			if(memcmp( buffer + i + 1, "include", 7 ) == 0
-				|| memcmp( buffer + i + 1, "require", 7 ) == 0){
-
-					//#requireの場合
-					if( buffer[i + 1] == 'r' ) isRequire = true;
-
-					i2=i+8;
-					while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-					if(buffer[i2]=='\"') sw1=0;
-					else if(buffer[i2]=='<') sw1=1;
-					i2++;
-
-					for(i3=0;;i2++,i3++){
-						if((buffer[i2]=='\"'&&sw1==0)||(buffer[i2]=='>'&&sw1==1)||buffer[i2]=='\n'||buffer[i2]=='\0'){
-							temporary[i3]=0;
-							break;
-						}
-						temporary[i3]=buffer[i2];
-					}
-					while(buffer[i2]!='\n'&&buffer[i2]!='\0') i2++;
-
-					if(sw1){
-						sprintf(temp2,"%s\\%s", includeDirPath.c_str(), temporary );
-						lstrcpy(temporary,temp2);
-					}
-					else{
-						Jenga::Common::Directory dir( LayerDir[layer] );
-						lstrcpy( temporary, dir.GetFullPath( temporary ).c_str() );
-					}
-			}
-			else if(memcmp(buffer+i+1,"prompt",6)==0){
-				i2=i+7;
-				sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() );
-			}
-			else if(memcmp(buffer+i+1,"N88BASIC",8)==0){
-				i2=i+9;
-				sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() );
-			}
-			else if(memcmp(buffer+i+1,"console",7)==0){
-				//サブシステム タイプをCUIに変更
-				extern unsigned short TypeOfSubSystem;
-				TypeOfSubSystem=IMAGE_SUBSYSTEM_WINDOWS_CUI;
-
-				i2=i+8;
-				sprintf(temporary,"%s\\basic\\dos_console.sbp", includeDirPath.c_str() );
-			}
-			else continue;
-
-			if( !Jenga::Common::Path( temporary ).IsExistFile() )
-			{
-				this->cannotIncludePath = temporary;
-				this->cannotIncludeSourcePos = i;
-				includedFilesRelation.AddLine( FileLayer[layer] );
-				break;
-			}
-
-			if( i == 0 && Jenga::Common::Path(temporary).GetFileName() == "basic" )
-			{
-			}
-			else
-			{
-				//ディレクティブが消えるため、一行減ってしまうのを防ぐ（basic.sbpを除く）
-				Text::SlideString(buffer+i2,1);
-				buffer[i2]='\n';
-				for(i3=0;i3<=layer;i3++) LastFileByte[i3]++;
-			}
-
-			layer++;
-			FileLayer[layer] = includedFilesRelation.AddFile( temporary );
-
-			//#requireの場合では、既に読み込まれているファイルは読み込まないようにする
-			bool isFake = false;
-			if( isRequire ){
-				if( requireFiles.IsIncluded( temporary ) ){
-					//既に読み込まれているとき
-					isFake = true;
-				}
-			}
-
-			BasicSource source;
-
-			if( isFake ){
-				//既に読み込まれているときは空データ
-				source.SetBuffer( "" );
-			}
-			else{
-				//取り込まれたファイルを収集する
-				requireFiles.Add( temporary );
-
-				//インクルードファイルを読み込む
-				if( !source.ReadFile_InIncludeDirective( temporary ) )
-				{
-					throw;
-				}
-			}
-
-			i3=lstrlen(buffer)+source.GetLength();
-			Realloc( i3 );
-			Text::SlideString(buffer+i2,source.GetLength()+(i-i2));
-			memcpy(buffer+i,source.GetBuffer(),source.GetLength());
-
-			//新しい参照ディレクトリをセット
-			char temp4[MAX_PATH];
-			_splitpath(temporary,temp2,temp4,0,0);
-			lstrcat(temp2,temp4);
-			LayerDir[layer]=(char *)malloc(lstrlen(temp2)+1);
-			lstrcpy(LayerDir[layer],temp2);
-
-			//ファイル範囲をスライド
-			LastFileByte[layer]=i+source.GetLength()-1;
-			for(i3=0;i3<layer;i3++) LastFileByte[i3]+=source.GetLength()+(i-i2);
-
-			i--;
-		}
-	}
-
-	free(LayerDir[0]);
-
-	length = lstrlen(buffer);
-}
-
-int KillReturnCode_InParameter(char *buffer,int *pRnum,char cBeginPare,char cEndPare){
-	int i,i2,i3,IsStr;
-
-	//カッコ'('直下の改行
-	while(buffer[0]=='\n'){
-		Text::SlideString(buffer+1,-1);
-		(*pRnum)++;
-	}
-
-	for(i=0,IsStr=0;;i++){
-		if(IsDBCSLeadByte(buffer[i])&&buffer[i+1]){
-			i++;
-			continue;
-		}
-
-		if(buffer[i]=='\"') IsStr^=1;
-
-		if(buffer[i]=='\0') break;	//エラー
-		if(buffer[i]=='\n'){
-			i2=0;
-			i3=0;
-			while(buffer[i+i2]=='\n'){
-				i2++;
-				i3++;
-				while(buffer[i+i2]==' '||buffer[i+i2]=='\t') i2++;
-			}
-			while(buffer[i+i2]==' '||buffer[i+i2]=='\t') i2++;
-
-			if(buffer[i+i2]==cEndPare){
-				Text::SlideString(buffer+i+i2,-i2);
-				(*pRnum)+=i3;
-				break;
-			}
-
-			//エラー
-			break;
-		}
-
-		if(buffer[i]=='('&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,pRnum,'(',')');
-			i+=i2;
-			if(buffer[i]!=')') break;
-			continue;
-		}
-		if(buffer[i]=='['&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,pRnum,'[',']');
-			i+=i2;
-			if(buffer[i]!=']') break;
-			continue;
-		}
-		if(buffer[i]==cEndPare&&IsStr==0) break;
-
-		if(buffer[i]==','&&buffer[i+1]=='\n'&&IsStr==0){
-			i++;
-			while(buffer[i]=='\n'){
-				Text::SlideString(buffer+i+1,-1);
-				(*pRnum)++;
-			}
-			i--;
-		}
-	}
-	return i;
-}
-void BasicSource::RemoveReturnLineUnderbar(){
-	int i,i2;
-
-	//アンダーバーによる改行
-	for(i=0;;i++){
-		i2=0;
-		while(buffer[i]=='_'&&buffer[i+1]=='\n'){
-			i2++;
-			Text::SlideString(buffer+i+2,-2);
-			while(buffer[i]=='\n'){
-				Text::SlideString(buffer+i+1,-1);
-				i2++;
-			}
-			for(;;i++){
-				if(buffer[i]=='_'&&buffer[i+1]=='\n') break;
-				if(buffer[i]=='\n'||buffer[i]=='\0'){
-					Text::SlideString(buffer+i,i2);
-					memset(buffer+i,'\n',i2);
-					break;
-				}
-			}
-		}
-		if(buffer[i]=='\0') break;
-	}
-
-	//カッコ内パラメータの改行
-	int IsStr,rnum;
-	for(i=0,IsStr=0,rnum=0;;i++){
-		if(IsDBCSLeadByte(buffer[i])&&buffer[i+1]){
-			i++;
-			continue;
-		}
-		if(buffer[i]=='\0') break;
-		if(buffer[i]=='\n'){
-			if(rnum){
-				Text::SlideString(buffer+i+1,rnum);
-				memset(buffer+i+1,'\n',rnum);
-				rnum=0;
-			}
-		}
-		if(buffer[i]=='\"') IsStr^=1;
-		if(buffer[i]=='('&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,&rnum,'(',')');
-			i+=i2;
-			if(buffer[i]!=')') break;
-		}
-		if(buffer[i]=='['&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,&rnum,'[',']');
-			i+=i2;
-			if(buffer[i]!=']') break;
-		}
-	}
-
-	length = lstrlen(buffer);
-}
-
-void BasicSource::Initialize( const std::string &source )
-{
-	Clear();
-	Add( source );
-
-	// 改行コードをCRLFからLFに変換
-	ChangeReturnLineChar();
-
-	// コメントを削除
-	RemoveComments();
-
-	//最終行には文字を含ませないようにする
-	if( lstrlen(buffer)>0 && buffer[lstrlen(buffer)-1] != '\n' )
-	{
-		Realloc( length + 1 );
-		lstrcat( buffer, "\n" );
-	}
-
-	// アンダーバーによる改行を正規表現に戻す
-	RemoveReturnLineUnderbar();
-}
-
-void BasicSource::SetBuffer( const char *buffer ){
-	this->buffer = (char *)calloc( lstrlen(buffer) + 1, 1 );
-	lstrcpy( this->buffer, buffer );
-	length = lstrlen(buffer);
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	Text::SlideString( this->buffer, 2 );
-	this->buffer[0] = '\n';
-	this->buffer[1] = '\n';
-}
-
-bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath )
-{
-	if( !Text::ReadFile( filePath ) ){
-		return false;
-	}
-
-	// 改行コードをCRLFからLFに変換
-	ChangeReturnLineChar();
-
-	// basic.sbpをインクルード
-	//const char *headCode = "#include <basic.sbp>\n";
-	const char *headCode = "";
-	Realloc( length + lstrlen(headCode) );
-	Text::SlideString( buffer, lstrlen(headCode) );
-	memcpy( buffer, headCode, lstrlen(headCode) );
-
-	// #defineと#requireを初期化
-	// TODO: バージョン番号の識別子defineが未完成
-	objDefine.Init( isDebug, isDll, isUnicode, majorVer );
-	requireFiles.clear();
-
-	// コメントを削除
-	RemoveComments();
-
-	// #ifdefディレクティブを処理
-	objDefine.DirectiveIfdef( buffer );
-
-	//最終行には文字を含ませないようにする
-	Realloc( length + 1 );
-	lstrcat( buffer, "\n" );
-
-	// #include / #require ディレクティブを処理
-	DirectiveIncludeOrRequire( mainSourceFilePath, includeDirPath );
-
-	// アンダーバーによる改行を正規表現に戻す
-	RemoveReturnLineUnderbar();
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	Text::SlideString( buffer, 2 );
-	buffer[0] = '\n';
-	buffer[1] = '\n';
-
-	extern char *basbuf;
-	basbuf = GetBuffer();
-
-	return true;
-}
-
-void BasicSource::Addition( const char *buffer ){
-	Realloc( length + lstrlen(buffer) );
-	lstrcat( this->buffer, buffer );
-}
-
-bool BasicSource::GetLineInfo( int sourceCodePos, int &line, std::string &filePath ) const
-{
-	int i2,i3,i4,i5;
-
-	const char *buffer = GetBuffer();
-	int i = sourceCodePos;
-
-	if(buffer[i]=='\n') i--;
-	for(i3=0,i2=0;i3<i;i3++){
-		if(buffer[i3]=='\n') i2++;
-		if(buffer[i3]=='\0') return 0;
-	}
-
-	if( includedFilesRelation.GetLineCounts() < i2 )
-	{
-		//Jenga::Throw( "BasicSource::GetLineInfoメソッドで不正な行の情報を取得しようとした" );
-
-		//ファイル・行番号を特定できなかった場合
-		line = -1;
-		filePath = "";
-		return false;
-	}
-
-	i4=0;
-	while( includedFilesRelation.GetFileNumber( i2 ) != includedFilesRelation.GetFileNumber( i4 ) )
-	{
-		i4++;
-	}
-	for(i3=0,i5=0;i5<i4;i3++){
-		if(buffer[i3]=='\n') i5++;
-		if(buffer[i3]=='\0') return 0;
-	}
-	for(i5=0;i4<i2;i3++){
-		if(buffer[i3]=='\n'){
-			i4++;
-			i5++;
-			if( includedFilesRelation.GetFileNumber( i2 ) < includedFilesRelation.GetFileNumber( i4 ) )
-			{
-				for( ;includedFilesRelation.GetFileNumber( i2 ) != includedFilesRelation.GetFileNumber( i4 ); i3++ ){
-					if(buffer[i3]=='\n') i4++;
-				}
-			}
-		}
-		if(buffer[i3]=='\0') return 0;
-	}
-
-	//行番号をセット
-	line = i5;
-
-	//ファイル名をセット
-	filePath = includedFilesRelation.GetFilePath( i2 );
-
-	return 1;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Type.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Type.cpp	(revision 602)
+++ 	(revision )
@@ -1,614 +1,0 @@
-#include "stdafx.h"
-
-const int Type::basicTypeList[] = {
-	DEF_BYTE,
-	DEF_SBYTE,
-	DEF_WORD,
-	DEF_INTEGER,
-	DEF_DWORD,
-	DEF_LONG,
-	DEF_QWORD,
-	DEF_INT64,
-
-	DEF_SINGLE,
-	DEF_DOUBLE,
-
-	DEF_BOOLEAN,
-
-	DEF_PTR_VOID,
-
-	DEF_ANY,
-
-	DEF_NON
-};
-
-const std::string Type::basicTypeNameList[] = {
-	"Byte",
-	"SByte",
-	"Word",
-	"Integer",
-	"DWord",
-	"Long",
-	"QWord",
-	"Int64",
-
-	"Single",
-	"Double",
-
-	"Boolean",
-
-	"VoidPtr",
-
-	"Any",
-
-	""
-};
-
-Type::~Type()
-{
-}
-
-bool Type::StringToBasicType( const std::string &typeName, int &basicType ){
-	for( int i=0; ; i++ ){
-		if( basicTypeList[i] == DEF_NON ){
-			break;
-		}
-		if( basicTypeNameList[i] == typeName ){
-			basicType = basicTypeList[i];
-			return true;
-		}
-	}
-	return false;
-}
-const char *Type::BasicTypeToCharPtr( const Type &type )
-{
-	for( int i=0; ; i++ ){
-		if( basicTypeList[i] == DEF_NON ){
-			break;
-		}
-		if( basicTypeList[i] == type.GetBasicType() ){
-			return basicTypeNameList[i].c_str();
-		}
-	}
-	return NULL;
-}
-
-int Type::GetBasicSize( int basicType )
-{
-
-	// 基本型
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_BOOLEAN:
-			return sizeof(BYTE);
-
-		case DEF_INTEGER:
-		case DEF_WORD:
-			return sizeof(WORD);
-
-		case DEF_LONG:
-		case DEF_DWORD:
-			return sizeof(DWORD);
-
-		case DEF_INT64:
-		case DEF_QWORD:
-			return sizeof(_int64);
-
-		case DEF_DOUBLE:
-			return sizeof(double);
-		case DEF_SINGLE:
-			return sizeof(float);
-	}
-
-	// ポインタ
-	if(IsPointer( basicType )){
-		return PTR_SIZE;
-	}
-
-	// オブジェクト
-	if(basicType==DEF_OBJECT){
-		return PTR_SIZE;
-	}
-
-	throw;
-
-	return 0;
-}
-
-const CClass &Type::GetClass() const
-{
-	if( !HasMember() )
-	{
-		Jenga::Throw( "クラスまたは構造体でない型に対してGetClassを呼び出した" );
-	}
-
-	return *pClass;
-}
-
-bool Type::Equals( const Type &type ) const
-{
-	if( basicType == type.basicType ){
-		if( NATURAL_TYPE( basicType ) == DEF_OBJECT
-			|| NATURAL_TYPE( basicType ) == DEF_STRUCT ){
-
-				if( index == type.index ){
-					return true;
-				}
-
-		}
-		else{
-			return true;
-		}
-	}
-	return false;
-}
-
-bool Type::IsCovariant( const Type &type ) const
-{
-	if( !this->IsObject() || !type.IsObject() )
-	{
-		// 共変性の判別はクラス型のみ
-		return false;
-	}
-
-	return this->GetClass().IsSubClass( &type.GetClass() );
-}
-bool Type::IsContravariant( const Type &type ) const
-{
-	if( !this->IsObject() || !type.IsObject() )
-	{
-		// 反変性の判別はクラス型のみ
-		return false;
-	}
-
-	return type.GetClass().IsSubClass( &this->GetClass() );
-}
-
-int Type::GetBasicSize() const
-{
-	return GetBasicSize( basicType );
-}
-int Type::GetSize() const
-{
-
-	// 基本型
-	switch( basicType ){
-		case DEF_LONG:
-			if(index==LITERAL_NULL||index==LITERAL_M128_0||index==LITERAL_0_255){
-				return sizeof(BYTE);
-			}
-			else if(index==LITERAL_M32768_0||index==LITERAL_0_65535){
-				return sizeof(WORD);
-			}
-			return sizeof(DWORD);
-
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_BOOLEAN:
-			return sizeof(BYTE);
-
-		case DEF_INTEGER:
-		case DEF_WORD:
-			return sizeof(WORD);
-
-		case DEF_DWORD:
-			return sizeof(DWORD);
-
-		case DEF_INT64:
-		case DEF_QWORD:
-			return sizeof(_int64);
-
-		case DEF_DOUBLE:
-			return sizeof(double);
-		case DEF_SINGLE:
-			return sizeof(float);
-	}
-
-	// ポインタ
-	if(IsPointer()){
-		return PTR_SIZE;
-	}
-
-	// 構造体
-	if( IsStruct() )
-	{
-		if( !pClass ){
-			throw;
-		}
-
-		return pClass->GetSize();
-	}
-
-	// オブジェクト
-	if( IsObject() )
-	{
-		return PTR_SIZE;
-	}
-
-	throw;
-}
-
-bool Type::IsNull() const{
-  if( basicType == DEF_NON ){
-	  return true;
-  }
-  return false;
-}
-
-bool Type::IsByte() const{
-  if( basicType == DEF_BYTE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsSByte() const{
-  if( basicType == DEF_SBYTE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsWord() const{
-  if( basicType == DEF_WORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsInteger() const{
-  if( basicType == DEF_INTEGER ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsDWord() const{
-  if( basicType == DEF_DWORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsLong() const{
-  if( basicType == DEF_LONG ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsQWord() const{
-  if( basicType == DEF_QWORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsInt64() const{
-  if( basicType == DEF_INT64 ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsSingle() const{
-  if( basicType == DEF_SINGLE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsDouble() const{
-  if( basicType == DEF_DOUBLE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsBoolean() const{
-  if( basicType == DEF_BOOLEAN ){
-	  return true;
-  }
-  return false;
-}
-
-bool Type::IsPointer( int basicType )
-{
-	if( basicType == DEF_NON )
-	{
-		return false;
-	}
-
-	if(PTR_LEVEL( basicType )|| basicType == DEF_PTR_VOID || basicType == DEF_PTR_PROC
-		|| ( basicType & FLAG_PTR ) ){
-			return true;
-	}
-
-	return false;
-}
-bool Type::IsPointer() const
-{
-	return IsPointer( basicType );
-}
-bool Type::IsSigned() const
-{
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_INTEGER:
-		case DEF_LONG:
-		case DEF_INT64:
-		case DEF_SINGLE:
-		case DEF_DOUBLE:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsNaturalWhole() const
-{
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_INTEGER:
-		case DEF_WORD:
-		case DEF_LONG:
-		case DEF_DWORD:
-		case DEF_INT64:
-		case DEF_QWORD:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsWhole() const
-{
-	return (
-		IsNaturalWhole()
-		|| IsPointer( basicType )
-		|| basicType == DEF_BOOLEAN
-		);
-}
-bool Type::IsReal() const
-{
-	switch( basicType ){
-		case DEF_SINGLE:
-		case DEF_DOUBLE:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::Is64() const
-{
-	switch( basicType ){
-		case DEF_QWORD:
-		case DEF_INT64:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsProcPtr() const
-{
-	if( basicType == DEF_PTR_PROC ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsStruct() const
-{
-	if( basicType == DEF_STRUCT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsStructPtr() const
-{
-	if( basicType == DEF_PTR_STRUCT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsObject() const
-{
-	return (
-		basicType == DEF_OBJECT
-		|| basicType == DEF_TYPE_PARAMETER
-	);
-}
-bool Type::IsObjectPtr() const
-{
-	if( basicType == DEF_PTR_OBJECT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsTypeParameter() const
-{
-	return ( NATURAL_TYPE(basicType) == DEF_TYPE_PARAMETER );
-}
-bool Type::IsObjectClass() const
-{
-	if( basicType == DEF_OBJECT ){
-		if( pClass->GetName() == "Object" ){
-			return true;
-		}
-	}
-	return false;
-}
-bool Type::IsStringClass() const
-{
-	if( basicType == DEF_OBJECT ){
-		if( pClass->GetName() == "String" ){
-			return true;
-		}
-	}
-	return false;
-}
-bool Type::IsVoidPtr() const
-{
-	if( basicType == DEF_PTR_VOID ){
-		return true;
-	}
-	return false;
-}
-
-bool Type::IsAny() const
-{
-	if( basicType == DEF_ANY ){
-		return true;
-	}
-	return false;
-}
-
-bool Type::IsDelegate() const
-{
-	return ( IsObject() && GetClass().IsDelegate() );
-}
-bool Type::IsInterface() const
-{
-	return ( IsObject() && GetClass().IsInterface() );
-}
-bool Type::IsComInterface() const
-{
-	return ( IsObject() && GetClass().IsComInterface() );
-}
-
-
-bool Type::HasMember() const
-{
-	if( NATURAL_TYPE( basicType ) == DEF_OBJECT
-		|| NATURAL_TYPE( basicType ) == DEF_STRUCT
-		|| NATURAL_TYPE( basicType ) == DEF_TYPE_PARAMETER
-	){
-		return true;
-	}
-	return false;
-}
-
-const Type &Type::GetActualGenericType( int index ) const
-{
-	return actualGenericTypes[index].GetType();
-}
-bool Type::HasActualGenericType() const
-{
-	return ( actualGenericTypes.size() > 0 );
-}
-
-std::string Type::ToString() const
-{
-	const char *basicTypeName = BasicTypeToCharPtr( *this );
-	if( basicTypeName )
-	{
-		return basicTypeName;
-	}
-
-	if( IsTypeParameter() )
-	{
-		return GetFormalTypeName();
-	}
-
-	std::string typeName = GetClass().GetFullName();
-	if( HasActualGenericType() )
-	{
-		std::string actualGenericTypesName;
-		BOOST_FOREACH( const GenericType &actualGenericType, actualGenericTypes )
-		{
-			if( actualGenericTypesName.size() )
-			{
-				actualGenericTypesName += ",";
-			}
-			actualGenericTypesName += actualGenericType.GetName();
-		}
-
-		typeName += "<" + actualGenericTypesName + ">";
-	}
-	return typeName;
-}
-
-int Type::GetBasicTypeFromSimpleName( const char *variable ){
-	extern char DefIntVari[26],DefSngVari[26],DefStrVari[26],divNum,dsvNum,dStrvNum;
-	int i;
-	char name[VN_SIZE];
-
-	//構造体メンバの場合を考慮
-	for(i=lstrlen(variable);i>0;i--){
-		if(variable[i]=='.'){
-			i++;
-			break;
-		}
-	}
-
-	for(;;i++){
-		if(variable[i]=='('||variable[i]=='\0'){
-			name[i]=0;
-			break;
-		}
-		name[i]=variable[i];
-	}
-	//変数名から選択
-	i--;
-	if(name[i]=='#') return DEF_DOUBLE;
-	if(name[i]=='!') return DEF_SINGLE;
-	if(name[i]=='%') return DEF_INTEGER;
-	return DEF_DOUBLE;
-}
-
-
-void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc )
-{
-	if( !typeParameter.IsTypeParameter() )
-	{
-		// ジェネリックな型ではなかったとき
-		return;
-	}
-
-	/////////////////////////////////////////////////////////
-	// ☆★☆ ジェネリクスサポート ☆★☆
-
-	// ポインタレベルを抽出
-	int ptrLevel = PTR_LEVEL( typeParameter.GetBasicType() );
-
-	if( pUserProc )
-	{
-		if( classType.IsObject() )
-		{
-			// 基底クラスでの自己解決
-			const CClass *pClass = &classType.GetClass();
-			while( pClass->HasSuperClass() )
-			{
-				if( pUserProc->GetParentClassPtr() == &pClass->GetSuperClass() )
-				{
-					if( pClass->GetSuperClassActualTypeParameters().size() )
-					{
-						// TODO: 適切な形に実装し直す（暫定的にトップの型を持ってきている）
-						typeParameter = pClass->GetSuperClassActualTypeParameters()[0];
-					}
-				}
-				pClass = &pClass->GetSuperClass();
-			}
-		}
-	}
-
-	if( typeParameter.IsTypeParameter() )
-	{
-		if( classType.HasActualGenericType() )
-		{
-			typeParameter = classType.GetActualGenericType( typeParameter.GetFormalTypeIndex() );
-		}
-		else
-		{
-			// 制約クラス（指定されていないときはObjectクラス）にセットする
-			typeParameter.SetBasicType( DEF_OBJECT );
-		}
-	}
-
-	for( int i=0; i<ptrLevel; i++ )
-	{
-		typeParameter.PtrLevelUp();
-	}
-
-	//
-	/////////////////////////////////////////////////////////
-}
-
-
-const std::string BlittableType::GetCreateStaticMethodFullName() const
-{
-	return pClass->GetNamespaceScopes().ToString() + "." + pClass->GetName() + "._Create";
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/TypeDef.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/TypeDef.cpp	(revision 602)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#include "stdafx.h"
-
-TypeDef::TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType )
-	: Symbol( namespaceScopes, name )
-	, baseName( baseName )
-	, baseType( baseType )
-{
-}
-
-TypeDefCollection::TypeDefCollection(){
-}
-TypeDefCollection::~TypeDefCollection(){
-}
-void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ){
-	TypeDef typeDef( namespaceScopes, name, baseName, nowLine );
-	this->push_back( typeDef );
-}
-
-int TypeDefCollection::GetIndex( const Symbol &symbol ) const{
-	int max = (int)(*this).size();
-	for( int i=0; i<max; i++ ){
-		if( (*this)[i].IsEqualSymbol( symbol ) ){
-			return i;
-		}
-	}
-	return -1;
-}
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Variable.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Variable.cpp	(revision 602)
+++ 	(revision )
@@ -1,124 +1,0 @@
-#include "stdafx.h"
-
-Variable::Variable( const Symbol &symbol, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData )
-	: Symbol( symbol )
-	, type( type )
-	, isConst( isConst )
-	, isRef( isRef )
-	, isArray( false )
-	, isParameter( false)
-	, paramStrForConstructor( paramStrForConstructor )
-	, hasInitData( hasInitData )
-{
-}
-Variable::Variable( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData )
-	: Symbol( namespaceScopes, name )
-	, type( type )
-	, isConst( isConst )
-	, isRef( isRef )
-	, isArray( false )
-	, isParameter( false)
-	, paramStrForConstructor( paramStrForConstructor )
-	, hasInitData( hasInitData )
-{
-}
-Variable::Variable( const Variable &var )
-	: Symbol( var )
-	, type( var.type )
-	, isConst( var.isConst )
-	, isRef( var.isRef )
-	, isArray( var.isArray )
-	, subscripts( var.subscripts )
-	, isParameter( false )
-	, paramStrForConstructor( var.paramStrForConstructor )
-	, hasInitData( var.hasInitData )
-{
-}
-Variable::Variable()
-{
-}
-
-
-bool Variables::DuplicateCheck( const Symbol &symbol, int nowScopeLevel ) const
-{
-	//レキシカルスコープを考慮して重複判定
-	for( int i=(int)this->size()-1; i>=0 ; i-- ){
-		const Variable *pVar = (*this)[i];
-		if( pVar->isLiving									//現在のスコープで有効なもの
-			&& pVar->GetScopeLevel() == nowScopeLevel		//現在のスコープと同一レベル
-			)
-		{
-			if( pVar->IsEqualSymbol( symbol ) ){
-				return true;
-			}
-		}
-	}
-	return false;
-}
-
-const Variable *Variables::BackSearch( const Symbol &symbol, int nowScopeLevel ) const
-{
-	//レキシカルスコープを考慮してバックサーチ
-	for( int i=(int)this->size()-1; i>=0 ; i-- ){
-		const Variable *pVar = (*this)[i];
-		if( pVar->isLiving									//現在のスコープで有効なもの
-			&& pVar->GetScopeLevel() <= nowScopeLevel		//現在のスコープレベルを超さないもの（Returnによる解放処理中を考慮）
-			){
-				if( pVar->IsEqualSymbol( symbol ) ){
-					return pVar;
-				}
-		}
-	}
-	return NULL;
-}
-
-const Variable *Variables::Find( const Symbol &symbol )const
-{
-	int max = (int)this->size();
-	for( int i=0; i<max; i++ ){
-		Variable *pVar = (*this)[i];
-		if( pVar->IsEqualSymbol( symbol ) ){
-			return pVar;
-		}
-	}
-	return NULL;
-}
-
-void GlobalVars::Add( Variable *pVar, bool isResetOffsetAddress )
-{
-	int alignment = 0;
-	if( pVar->GetType().IsStruct() ){
-		alignment = pVar->GetType().GetClass().GetFixedAlignment();
-	}
-
-	if( pVar->HasInitData() ){
-		//初期バッファがあるとき
-
-		if( isResetOffsetAddress )
-		{
-			if( alignment ){
-				if( initAreaBuffer.GetSize() % alignment ){
-					initAreaBuffer.Resize( initAreaBuffer.GetSize() + ( alignment - (initAreaBuffer.GetSize() % alignment) ) );
-				}
-			}
-
-			pVar->SetOffsetAddress( initAreaBuffer.GetSize() );
-
-			initAreaBuffer.Resize( initAreaBuffer.GetSize() + pVar->GetMemorySize() );
-		}
-	}
-	else{
-		//初期バッファがないとき
-
-		if( alignment ){
-			if( allSize % alignment ){
-				allSize += alignment - (allSize % alignment);
-			}
-		}
-
-		pVar->SetOffsetAddress( allSize | 0x80000000 );
-		allSize += pVar->GetMemorySize();
-	}
-
-	push_back( pVar );
-}
