Index: trunk/ab5.0/abdev/BasicCompiler_Common/BreakPoint.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/BreakPoint.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/BreakPoint.cpp	(revision 603)
@@ -1,8 +1,3 @@
 #include "stdafx.h"
-
-#include <Source.h>
-#include <Compiler.h>
-
-#include "common.h"
 
 //////////////////////////
Index: trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 603)
@@ -1,9 +1,4 @@
 #include "stdafx.h"
 
-#include <Compiler.h>
-#include <Class.h>
-#include <Variable.h>
-
-#include "../BasicCompiler_Common/common.h"
 #include "../BasicCompiler_Common/DebugSection.h"
 
Index: trunk/ab5.0/abdev/BasicCompiler_Common/DebugSection.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/DebugSection.h	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/DebugSection.h	(revision 603)
@@ -1,6 +1,3 @@
 #pragma once
-
-#include <Source.h>
-#include <Compiler.h>
 
 class CDebugSection{
Index: trunk/ab5.0/abdev/BasicCompiler_Common/Resource.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/Resource.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/Resource.cpp	(revision 603)
@@ -1,7 +1,3 @@
 #include "stdafx.h"
-
-#include <Type.h>
-
-#include "common.h"
 
 void GetResourceData(char *FileName){
Index: trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.cpp	(revision 603)
@@ -1,7 +1,3 @@
 #include "stdafx.h"
-
-#include <Source.h>
-
-#include "../BasicCompiler_Common/common.h"
 
 void KillSpaces(char *str1,char *str2){
@@ -840,98 +836,4 @@
 }
 
-char *calcNames[255] = {
-	"xor",
-};
-void InitCalcNames()
-{
-	if( calcNames[CALC_XOR] )
-	{
-		return;
-	}
-
-	memset( calcNames, 0, 255 * sizeof(char *) );
-	calcNames[CALC_XOR] = "xor";
-	calcNames[CALC_OR] = "or";
-	calcNames[CALC_AND] = "and";
-	calcNames[CALC_NOT] = "Not";
-	calcNames[CALC_PE] = "<=";
-	calcNames[CALC_QE] = ">=";
-	calcNames[CALC_NOTEQUAL] = "<>";
-	calcNames[CALC_EQUAL] = "=(compare)";
-	calcNames[CALC_P] = "<";
-	calcNames[CALC_Q] = ">";
-	calcNames[CALC_SHL] = "<<";
-	calcNames[CALC_SHR] = ">>";
-	calcNames[CALC_ADDITION] = "+";
-	calcNames[CALC_SUBTRACTION] = "-";
-	calcNames[CALC_STRPLUS] = "&";
-	calcNames[CALC_MOD] = "mod";
-	calcNames[CALC_PRODUCT] = "*";
-	calcNames[CALC_QUOTIENT] = "/";
-	calcNames[CALC_INTQUOTIENT] = "\\";
-	calcNames[CALC_AS] = "As";
-	calcNames[CALC_BYVAL] = "ByVal";
-	calcNames[CALC_MINUSMARK] = "-(mark)";
-	calcNames[CALC_POWER] = "^";
-	calcNames[CALC_SUBSITUATION] = "=";
-	calcNames[CALC_ARRAY_GET] = "[]";
-	calcNames[CALC_ARRAY_SET] = "[]=";
-}
-void GetCalcName(int idCalc,char *name){
-	InitCalcNames();
-
-	if( calcNames[idCalc] == NULL )
-	{
-		compiler.errorMessenger.OutputFatalError();
-	}
-	lstrcpy( name, calcNames[idCalc] );
-}
-BYTE ToCalcId( const char *name )
-{
-	InitCalcNames();
-
-	for( int i=0; i<255; i++ )
-	{
-		if( calcNames[i] )
-		{
-			if( lstrcmp( name, calcNames[i] ) == 0 )
-			{
-				return i;
-			}
-		}
-	}
-	compiler.errorMessenger.OutputFatalError();
-	return 0;
-}
-
-std::string Operator_NaturalStringToCalcMarkString( const std::string &name )
-{
-	if( name[0] == 1 && name[1] == ESC_OPERATOR )
-	{
-		BYTE calcId = ToCalcId( name.c_str()+2 );
-		char temporary[255];
-		temporary[0] = name[0];
-		temporary[1] = name[1];
-		temporary[2] = calcId;
-		temporary[3] = 0;
-		return temporary;
-	}
-	return name;
-}
-std::string Operator_CalcMarkStringToNaturalString( const std::string &name )
-{
-	if( name[0] == 1 && name[1] == ESC_OPERATOR )
-	{
-		BYTE calcId = name[2];
-		char temporary[255], calcName[255];
-		GetCalcName( calcId, calcName );
-		temporary[0] = name[0];
-		temporary[1] = name[1];
-		lstrcpy( temporary+2, calcName );
-		return temporary;
-	}
-	return name;
-}
-
 bool IsGenericTypeSourcePart( const char *buffer )
 {
Index: trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.h	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/StrOperation.h	(revision 603)
@@ -27,5 +27,3 @@
 void GetCalcName(int idCalc,char *name);
 BYTE ToCalcId( const char *name );
-std::string Operator_NaturalStringToCalcMarkString( const std::string &name );
-std::string Operator_CalcMarkStringToNaturalString( const std::string &name );
 bool IsGenericTypeSourcePart( const char *buffer );
Index: trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 603)
@@ -1,8 +1,3 @@
 #include "stdafx.h"
-
-#include <Compiler.h>
-#include <Procedure.h>
-
-#include "../BasicCompiler_Common/common.h"
 
 #ifdef _AMD64_
Index: trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 602)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 603)
@@ -1,9 +1,3 @@
 #include "stdafx.h"
-
-#include <Compiler.h>
-#include <LexicalScope.h>
-#include <Variable.h>
-
-#include "../BasicCompiler_Common/common.h"
 
 #ifdef _AMD64_
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h	(revision 602)
+++ 	(revision )
@@ -1,510 +1,0 @@
-#pragma once
-
-class UserProc;
-class Delegate;
-
-class ClassPrototype : public Prototype, public DynamicMethodsPrototype
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype );
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );
-	}
-
-public:
-	ClassPrototype( const NamespaceScopes &namespaceScopes, const std::string &name )
-		: Prototype( namespaceScopes, name )
-		, DynamicMethodsPrototype()
-	{
-	}
-	ClassPrototype()
-		: Prototype()
-		, DynamicMethodsPrototype()
-	{
-	}
-};
-
-class CClass: public ClassPrototype, public Jenga::Common::ObjectInHashmap<CClass>
-{
-public:
-	// 型の種類
-	enum ClassType{
-		Class,
-		Interface,
-		ComInterface,
-		Enum,
-		Delegate,
-		Structure,
-	};
-
-private:
-	ClassType classType;
-
-	// importされている名前空間
-	NamespaceScopesCollection importedNamespaces;
-
-	// 型パラメータ
-	GenericTypes formalGenericTypes;
-
-	// 基底クラス
-	const CClass *pSuperClass;
-
-	// 基底クラスの型パラメータ（実パラメータ）
-	Types superClassActualTypeParameters;
-
-	// Blittable型情報
-	Type blittableType;
-
-	// 実装するインターフェイス
-	Interfaces interfaces;
-
-	// 動的メンバ
-	Members dynamicMembers;
-
-	// 静的メンバ
-	Members staticMembers;
-
-	// 動的メソッド
-	int ConstructorMemberSubIndex;
-	int DestructorMemberSubIndex;
-	int vtblNum;					// 仮想関数の数
-
-	// 静的メソッド
-	Methods staticMethods;
-
-	//アラインメント値
-	int fixedAlignment;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - CClass" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( ClassPrototype );
-		ar & BOOST_SERIALIZATION_NVP( classType );
-		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
-		ar & BOOST_SERIALIZATION_NVP( formalGenericTypes );
-		ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
-		ar & BOOST_SERIALIZATION_NVP( superClassActualTypeParameters );
-		ar & BOOST_SERIALIZATION_NVP( blittableType );
-		ar & BOOST_SERIALIZATION_NVP( interfaces );
-		ar & BOOST_SERIALIZATION_NVP( dynamicMembers );
-		ar & BOOST_SERIALIZATION_NVP( staticMembers );
-		ar & BOOST_SERIALIZATION_NVP( ConstructorMemberSubIndex );
-		ar & BOOST_SERIALIZATION_NVP( DestructorMemberSubIndex );
-		ar & BOOST_SERIALIZATION_NVP( vtblNum );
-		ar & BOOST_SERIALIZATION_NVP( staticMethods );
-		ar & BOOST_SERIALIZATION_NVP( fixedAlignment );
-	}
-
-	bool isReady;
-public:
-
-	CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name )
-		: ClassPrototype( namespaceScopes, name )
-		, importedNamespaces( importedNamespaces )
-		, classType( Class )
-		, pSuperClass( NULL )
-		, blittableType( Type() )
-		, isReady( false )
-		, fixedAlignment( 0 )
-		, ConstructorMemberSubIndex( -1 )
-		, DestructorMemberSubIndex( -1 )
-		, vtblNum( 0 )
-		, vtbl_offset( -1 )
-		, comVtblOffset( 0 )
-		, isCompilingConstructor( false )
-		, isCompilingDestructor( false )
-		, cacheSize( 0 )
-	{
-	}
-	CClass()
-		: ClassPrototype()
-		, importedNamespaces()
-		, classType()
-		, pSuperClass( NULL )
-		, blittableType( Type() )
-		, isReady( false )
-		, fixedAlignment( 0 )
-		, ConstructorMemberSubIndex( -1 )
-		, DestructorMemberSubIndex( -1 )
-		, vtblNum( 0 )
-		, vtbl_offset( -1 )
-		, comVtblOffset( 0 )
-		, isCompilingConstructor( false )
-		, isCompilingDestructor( false )
-		, cacheSize( 0 )
-	{
-	}
-	~CClass()
-	{
-		// 動的メンバ
-		BOOST_FOREACH( Member *member, dynamicMembers )
-		{
-			delete member;
-		}
-
-		// 静的メンバ
-		BOOST_FOREACH( Member *member, staticMembers )
-		{
-			delete member;
-		}
-
-		// インターフェイス
-		BOOST_FOREACH( ::Interface *pInterface, interfaces )
-		{
-			delete pInterface;
-		}
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-	virtual bool IsDuplication( const CClass *pClass ) const
-	{
-		if( pClass->IsEqualSymbol( *this ) )
-		{
-			return true;
-		}
-		return false;
-	}
-
-	virtual void Using() const;
-
-	void Readed(){
-		isReady = true;
-	}
-	bool IsReady() const{
-		return isReady;
-	}
-
-	const NamespaceScopesCollection &GetImportedNamespaces() const
-	{
-		return importedNamespaces;
-	}
-
-	// 型パラメータ
-	const GenericTypes &GetFormalGenericTypes() const
-	{
-		return formalGenericTypes;
-	}
-	void AddFormalGenericType( GenericType genericType )
-	{
-		this->formalGenericTypes.push_back( genericType );
-	}
-	int GetFormalGenericTypeParameterIndex( const std::string &name ) const
-	{
-		int i = 0;
-		BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
-		{
-			if( genericType.GetName() == name )
-			{
-				return i;
-			}
-			i++;
-		}
-		return -1;
-	}
-	bool IsExistFormalGenericTypeParameter( const std::string &name ) const
-	{
-		BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
-		{
-			if( genericType.GetName() == name )
-			{
-				return true;
-			}
-		}
-		return false;
-	}
-	bool IsGeneric() const
-	{
-		return ( this->formalGenericTypes.size() != 0 );
-	}
-
-	// 継承元クラス
-	bool HasSuperClass() const
-	{
-		return ( pSuperClass != NULL );
-	}
-	const CClass &GetSuperClass() const
-	{
-		return *pSuperClass;
-	}
-	void SetSuperClass( const CClass *pSuperClass )
-	{
-		this->pSuperClass = pSuperClass;
-	}
-	const Types &GetSuperClassActualTypeParameters() const
-	{
-		return superClassActualTypeParameters;
-	}
-	void SetSuperClassActualTypeParameters( const Types &actualTypeParameters )
-	{
-		this->superClassActualTypeParameters = actualTypeParameters;
-	}
-
-	// Blittable型
-	bool IsBlittableType() const
-	{
-		return !blittableType.IsNull();
-	}
-	const Type &GetBlittableType() const
-	{
-		return blittableType;
-	}
-	void SetBlittableType( const Type &type ){
-		blittableType = type;
-	}
-
-	bool IsClass() const;
-	bool IsInterface() const;
-	bool IsComInterface() const;
-	bool IsEnum() const;
-	bool IsDelegate() const;
-	bool IsStructure() const;
-	void SetClassType( ClassType classType )
-	{
-		this->classType = classType;
-	}
-
-
-	//コンストラクタをコンパイルしているかどうかのチェックフラグ
-private:
-	mutable bool isCompilingConstructor;
-public:
-	void NotifyStartConstructorCompile() const;
-	void NotifyFinishConstructorCompile() const;
-	bool IsCompilingConstructor() const;
-
-	//デストラクタをコンパイルしているかどうかのチェックフラグ
-private:
-	mutable bool isCompilingDestructor;
-public:
-	void NotifyStartDestructorCompile() const;
-	void NotifyFinishDestructorCompile() const;
-	bool IsCompilingDestructor() const;
-
-
-	//自身の派生クラスかどうかを確認
-	bool IsSubClass( const CClass *pClass ) const;
-
-	//自身と等しいまたは派生クラスかどうかを確認
-	bool IsEqualsOrSubClass( const CClass *pClass ) const;
-
-	// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
-	bool IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const;
-
-	// インターフェイス
-	bool HasInterfaces() const
-	{
-		return ( interfaces.size() != 0 );
-	}
-	void AddInterface( ::Interface *pInterface )
-	{
-		interfaces.push_back( pInterface );
-	}
-	const Interfaces &GetInterfaces() const
-	{
-		return interfaces;
-	}
-	bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
-
-	// クラス継承
-	bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine );
-
-	//メンバ、メソッドの追加
-	void AddDynamicMember( Member *pMember );
-	void AddStaticMember( Member *pMember );
-
-	//重複チェック
-	bool DupliCheckAll(const char *name) const;
-	bool DupliCheckMember(const char *name) const;
-
-	const Members &GetDynamicMembers() const
-	{
-		return dynamicMembers;
-	}
-	const Members &GetStaticMembers() const
-	{
-		return staticMembers;
-	}
-	Members &GetDynamicMembers()
-	{
-		return dynamicMembers;
-	}
-	Members &GetStaticMembers()
-	{
-		return staticMembers;
-	}
-	
-	const Member *FindDynamicMember( const char *memberName ) const;
-	bool HasDynamicMember( const char *memberName ) const
-	{
-		return ( FindDynamicMember( memberName ) != NULL );
-	}
-
-	void EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const;
-	const CMethod *GetDynamicMethodOrInterfaceMethod( const UserProc *pUserProc ) const;
-
-	const Methods &GetStaticMethods() const
-	{
-		return staticMethods;
-	}
-	Methods &GetStaticMethods()
-	{
-		return staticMethods;
-	}
-
-	//デフォルト コンストラクタ
-	const CMethod *GetConstructorMethod() const
-	{
-		if( ConstructorMemberSubIndex == -1 ) return NULL;
-		return GetDynamicMethods()[ConstructorMemberSubIndex];
-	}
-	void SetConstructorMemberSubIndex( int constructorMemberSubIndex )
-	{
-		this->ConstructorMemberSubIndex = constructorMemberSubIndex;
-	}
-
-	//デストラクタ メソッドを取得
-	const CMethod *GetDestructorMethod() const
-	{
-		if( DestructorMemberSubIndex == -1 ) return NULL;
-		return GetDynamicMethods()[DestructorMemberSubIndex];
-	}
-	void SetDestructorMemberSubIndex( int destructorMemberSubIndex )
-	{
-		this->DestructorMemberSubIndex = destructorMemberSubIndex;
-	}
-
-	// ユーザ指定のアラインメント固定値
-	int GetFixedAlignment() const
-	{
-		return fixedAlignment;
-	}
-	void SetFixedAlignment( int fixedAlignment )
-	{
-		this->fixedAlignment = fixedAlignment;
-	}
-
-	// メンバの総合サイズを取得
-private:
-	int cacheSize;
-public:
-	int GetSize() const;
-
-	// メンバのオフセットを取得
-	int GetMemberOffset( const char *memberName ) const;
-private:
-	// アラインメント値を取得
-	int GetAlignment() const;
-
-
-	/////////////////////////////////////////////////////////////////
-	// vtbl
-	/////////////////////////////////////////////////////////////////
-public:
-	// vtblに存在する仮想関数の数
-	int GetVtblNum() const
-	{
-		return vtblNum;
-	}
-	void SetVtblNum( int vtblNum )
-	{
-		this->vtblNum = vtblNum;
-	}
-	void AddVtblNum( int vtblNum )
-	{
-		this->vtblNum += vtblNum;
-	}
-	bool IsExistVirtualFunctions() const
-	{
-		// 構造体以外は仮想関数を持つ
-		return !IsStructure();
-	}
-	
-private:
-	int vtbl_offset;
-	int comVtblOffset;
-	int vtblMasterListOffset;
-public:
-	std::vector<long> vtblMasterList;
-	int GetVtblOffset() const
-	{
-		return vtbl_offset;
-	}
-	void SetVtblOffset( int vtblOffset )
-	{
-		this->vtbl_offset = vtblOffset;
-	}
-	int GetComVtblOffset() const
-	{
-		return comVtblOffset;
-	}
-	void SetComVtblOffset( int comVtblOffset )
-	{
-		this->comVtblOffset = comVtblOffset;
-	}
-	void GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const;
-	int GetVtblMasterListIndex( const CClass *pClass ) const;
-	long GetVtblMasterListOffset() const;
-	void SetVtblMasterListOffset( int vtblMasterListOffset )
-	{
-		this->vtblMasterListOffset = vtblMasterListOffset;
-	}
-	bool IsAbstract() const;
-
-
-	// TypeInfo用
-	mutable int typeInfoDataTableOffset;
-	void SetTypeInfoDataTableOffset( int typeInfoDataTableOffset ) const
-	{
-		this->typeInfoDataTableOffset = typeInfoDataTableOffset;
-	}
-	int GetTypeInfoDataTableOffset() const
-	{
-		return typeInfoDataTableOffset;
-	}
-
-	// 動的型データ用のメンバデータを取得
-	std::string GetStaticDefiningStringAsMemberNames() const;
-	std::string GetStaticDefiningStringAsMemberOffsets() const;
-	void GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset = 0 ) const;
-};
-
-class Classes : public Jenga::Common::Hashmap<CClass>
-{
-	// XMLシリアライズ用
-public:
-	Classes()
-		: pStringClass( NULL )
-		, pObjectClass( NULL )
-		, pInterfaceInfo( NULL )
-	{
-	}
-	~Classes()
-	{
-	}
-
-	bool Insert( CClass *pClass, int nowLine );
-	CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
-
-	const CClass *FindEx( const Symbol &symbol ) const;
-
-
-	/////////////////////////////
-	// 特殊クラス
-	/////////////////////////////
-	mutable const CClass *pStringClass;
-	mutable const CClass *pObjectClass;
-	mutable const CClass *pInterfaceInfo;
-	const CClass *GetStringClassPtr() const;
-	const CClass *GetObjectClassPtr() const;
-	const CClass *GetInterfaceInfoClassPtr() const;
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Const.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Const.h	(revision 602)
+++ 	(revision )
@@ -1,146 +1,0 @@
-#pragma once
-
-//定数
-class CConst : public Symbol, public Jenga::Common::ObjectInHashmap<CConst>
-{
-	Type type;
-	_int64 i64data;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - CConst" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
-		ar & BOOST_SERIALIZATION_NVP( type );
-		ar & BOOST_SERIALIZATION_NVP( i64data );
-	}
-
-public:
-	CConst( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &newType, _int64 i64data)
-		: Symbol( namespaceScopes, name )
-		, type( newType )
-		, i64data( i64data )
-	{
-	}
-	CConst( const NamespaceScopes &namespaceScopes, const std::string &name, int value)
-		: Symbol( namespaceScopes, name )
-		, type( Type(DEF_LONG) )
-		, i64data( value )
-	{
-	}
-	CConst()
-	{
-	}
-	~CConst()
-	{
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-
-	Type GetType()
-	{
-		return type;
-	}
-	_int64 GetWholeData()
-	{
-		return i64data;
-	}
-	double GetDoubleData();
-};
-class Consts : public Jenga::Common::Hashmap<CConst>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Consts" );
-
-		ar & boost::serialization::make_nvp("Hashmap_CConst",
-			boost::serialization::base_object<Jenga::Common::Hashmap<CConst>>(*this));
-	}
-
-public:
-
-	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type );
-	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, int value);
-
-private:
-	CConst *GetObjectPtr( const Symbol &symbol );
-public:
-
-	int GetBasicType( const Symbol &symbol );
-	_int64 GetWholeData( const Symbol &symbol );
-	double GetDoubleData( const Symbol &symbol );
-	bool IsStringPtr( const Symbol &symbol, bool isUnicode );
-};
-
-//定数マクロ
-class ConstMacro : public Symbol, public Jenga::Common::ObjectInHashmap<ConstMacro>
-{
-	std::vector<std::string> parameters;
-	std::string expression;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - ConstMacro" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
-		ar & BOOST_SERIALIZATION_NVP( parameters );
-		ar & BOOST_SERIALIZATION_NVP( expression );
-	}
-
-public:
-	ConstMacro( const NamespaceScopes &namespaceScopes, const std::string &name, const std::vector<std::string> &parameters, const std::string &expression )
-		: Symbol( namespaceScopes, name )
-		, parameters( parameters )
-		, expression( expression )
-	{
-	}
-	ConstMacro()
-	{
-	}
-	~ConstMacro()
-	{
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-
-	const std::vector<std::string> &GetParameters() const
-	{
-		return parameters;
-	}
-	const std::string &GetExpression() const
-	{
-		return expression;
-	}
-};
-class ConstMacros : public Jenga::Common::Hashmap<ConstMacro>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - ConstMacros" );
-
-		ar & boost::serialization::make_nvp("Hashmap_ConstMacro",
-			boost::serialization::base_object<Jenga::Common::Hashmap<ConstMacro>>(*this));
-	}
-
-public:
-	bool Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr );
-	ConstMacro *Find( const Symbol &name );
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/DataTable.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/DataTable.h	(revision 602)
+++ 	(revision )
@@ -1,151 +1,0 @@
-#pragma once
-
-//DataTable.cpp
-class DataTable
-{
-	char *buffer;
-	int size;
-
-public:
-	// リンカで解決しなければならないスケジュール
-	Schedules schedules;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	BOOST_SERIALIZATION_SPLIT_MEMBER();
-	template<class Archive> void load(Archive& ar, const unsigned int version)
-	{
-		std::string _buffer;
-		ar & BOOST_SERIALIZATION_NVP( _buffer );
-		ar & BOOST_SERIALIZATION_NVP( size );
-		ar & BOOST_SERIALIZATION_NVP( schedules );
-
-		// 読み込み後の処理
-		Realloc( size );
-		for( int i=0; i<size; i++ )
-		{
-			ULONG_PTR l1 = ( ( _buffer[i*3] >= 'a' ) ? ( _buffer[i*3] - 'a' + 0x0a ) : ( _buffer[i*3] - '0' ) ) * 0x10;
-			ULONG_PTR l2 = ( _buffer[i*3+1] >= 'a' ) ? ( _buffer[i*3+1] - 'a' + 0x0a ) : ( _buffer[i*3+1] - '0' );
-			ULONG_PTR l = l1 + l2;
-			buffer[i] = static_cast<char>(l);
-		}
-	}
-	template<class Archive> void save(Archive& ar, const unsigned int version) const
-	{
-		// 保存準備
-		char *tempCode = (char *)calloc( (size+1) * 3, 1 );
-		for( int i=0; i<size; i++ )
-		{
-			char temp[32];
-			sprintf( temp, "%02x,", (unsigned char)buffer[i] );
-			tempCode[i*3] = temp[0];
-			tempCode[i*3+1] = temp[1];
-			tempCode[i*3+2] = temp[2];
-		}
-
-		std::string _buffer = tempCode;
-		free( tempCode );
-
-		ar & BOOST_SERIALIZATION_NVP( _buffer );
-		ar & BOOST_SERIALIZATION_NVP( size );
-		ar & BOOST_SERIALIZATION_NVP( schedules );
-	}
-
-
-	void Realloc( int size )
-	{
-		this->buffer = (char *)realloc( this->buffer, size + 100 );
-		this->size = size;
-	}
-
-public:
-	DataTable()
-		: buffer( (char *)malloc(100) )
-		, size( 0 )
-	{
-		lstrcpy( buffer, "initialized!!!" );
-	}
-	DataTable( const DataTable &dataTable )
-		: buffer( (char *)malloc(100) )
-		, size( 0 )
-	{
-		lstrcpy( buffer, "initialized!!!" );
-		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
-	}
-	~DataTable()
-	{
-		free( buffer );
-	}
-	void Clear()
-	{
-		size = 0;
-	}
-
-	void operator = ( const DataTable &dataTable )
-	{
-		Clear();
-		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
-	}
-
-	int AddBinary( const void *buffer, int size );
-	int Add( _int64 i64data );
-	int Add( int i32data );
-	int Add( double dbl );
-	int Add( float flt );
-	int AddString( const char *str );
-	int AddString( const std::string &str );
-	int AddWString( const std::wstring &wstr );
-	void Add( const DataTable &dataTable )
-	{
-		long baseOffset = GetSize();
-
-		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
-
-		// スケジュールを追加
-		BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )
-		{
-			this->schedules.push_back(
-				Schedule(
-					schedule.GetType(),
-					baseOffset + schedule.GetOffset(),
-					schedule.GetLongPtrValue()
-				)
-			);
-		}
-	}
-	int AddSpace( int size );
-	void AddAlignment( int size );
-
-	const void *GetPtr() const
-	{
-		return buffer;
-	}
-	int GetSize() const
-	{
-		return size;
-	}
-
-	long GetLong( int pos ) const
-	{
-		return *(long *)( buffer + pos );
-	}
-	_int64 GetInt64( int pos ) const
-	{
-		return *(_int64 *)( buffer + pos );
-	}
-	void Overwrite( int pos, long newLongValue )
-	{
-		*(long *)( buffer + pos ) = newLongValue;
-	}
-	void OverwriteInt64( int pos, _int64 new64Value )
-	{
-		*(_int64 *)( buffer + pos ) = new64Value;
-	}
-	void OverwriteBinary( int pos, const void *ptr, int size )
-	{
-		memcpy( buffer + pos, ptr, size );
-	}
-
-	void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Delegate.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Delegate.h	(revision 602)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#pragma once
-
-class Delegate
-	: public Procedure
-	, public Jenga::Common::ObjectInHashmap<Delegate>
-{
-	// importされている名前空間
-	NamespaceScopesCollection importedNamespaces;
-
-	std::string paramStr;
-	std::string returnTypeName;
-	int sourceIndex;
-
-	Parameters dynamicParams;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Delegate" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
-		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
-		ar & BOOST_SERIALIZATION_NVP( dynamicParams );
-	}
-
-public:
-	Delegate( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Procedure::Kind procKind, const char *paramStr, const std::string &returnTypeName, int sourceIndex )
-		: Procedure( namespaceScopes, name, procKind, false )
-		, importedNamespaces( importedNamespaces )
-		, paramStr( paramStr )
-		, returnTypeName( returnTypeName )
-		, sourceIndex( sourceIndex )
-	{
-	}
-	Delegate()
-	{
-	}
-
-	const NamespaceScopesCollection &GetImportedNamespaces() const
-	{
-		return importedNamespaces;
-	}
-
-	const std::string &GetParamStr() const
-	{
-		return paramStr;
-	}
-	const std::string &GetReturnTypeName() const
-	{
-		return returnTypeName;
-	}
-	void SetReturnType( const Type &returnType )
-	{
-		this->returnType = returnType;
-	}
-
-	int GetSourceIndex() const
-	{
-		return sourceIndex;
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-
-	const Parameters &GetDynamicParams() const
-	{
-		return dynamicParams;
-	}
-	Parameters &GetDynamicParams()
-	{
-		return dynamicParams;
-	}
-
-	/*!
-	@brief	オーバーライド用にデリゲート同士が等しいかどうかをチェックする
-	@param	dgt 照らし合わせるデリゲート
-	*/
-	bool IsSimilar( const Delegate &dgt ) const;
-};
-typedef Jenga::Common::Hashmap<Delegate> Delegates;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Interface.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Interface.h	(revision 602)
+++ 	(revision )
@@ -1,93 +1,0 @@
-#pragma once
-
-class CClass;
-
-class DynamicMethodsPrototype
-{
-	// 動的メソッド
-	Methods dynamicMethods;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		ar & BOOST_SERIALIZATION_NVP( dynamicMethods );
-	}
-
-public:
-	DynamicMethodsPrototype(){}
-	DynamicMethodsPrototype( const DynamicMethodsPrototype &dynamicMethodsPrototype )
-		: dynamicMethods( dynamicMethodsPrototype.dynamicMethods )
-	{
-	}
-	~DynamicMethodsPrototype(){}
-
-	const Methods &GetDynamicMethods() const
-	{
-		return dynamicMethods;
-	}
-	Methods &GetDynamicMethods()
-	{
-		return dynamicMethods;
-	}
-
-	void AddDynamicMethods( CMethod *pMethod )
-	{
-		dynamicMethods.push_back( pMethod );
-	}
-};
-
-class Interface : public DynamicMethodsPrototype
-{
-	const CClass *pInterfaceClass;
-	mutable int vtblOffset;
-
-	// 型パラメータ（実パラメータ）
-	Types actualTypeParameters;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Interface" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );
-		ar & boost::serialization::make_nvp("pInterfaceClass", const_cast<CClass *&>(pInterfaceClass) );
-		ar & BOOST_SERIALIZATION_NVP( vtblOffset );
-		ar & BOOST_SERIALIZATION_NVP( actualTypeParameters );
-	}
-
-public:
-	Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters );
-	Interface( const Interface &objInterface )
-		: DynamicMethodsPrototype( objInterface )
-		, pInterfaceClass( objInterface.pInterfaceClass )
-		, vtblOffset( objInterface.vtblOffset )
-	{
-	}
-	Interface()
-	{
-	}
-
-	const CClass &GetClass() const{
-		return *pInterfaceClass;
-	}
-	int GetVtblOffset() const
-	{
-		return vtblOffset;
-	}
-	void SetVtblOffset( int vtblOffset ) const
-	{
-		this->vtblOffset = vtblOffset;
-	}
-
-	const Types &GetActualTypeParameters() const
-	{
-		return actualTypeParameters;
-	}
-
-	std::string GetFullNameWithActualGenericTypeParameters() const;
-};
-typedef std::vector<Interface *> Interfaces;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Member.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Member.h	(revision 602)
+++ 	(revision )
@@ -1,100 +1,0 @@
-#pragma once
-
-class CClass;
-
-class Member : public MemberPrototype
-{
-	std::string name;
-	Type type;
-	bool isConst;
-	Subscripts subscripts;
-
-	std::string initializeExpression;
-	std::string constructParameter;
-
-	// XMLシリアライズ用
-	// TODO: xml
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Member" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( MemberPrototype );
-		ar & BOOST_SERIALIZATION_NVP( name );
-		ar & BOOST_SERIALIZATION_NVP( type );
-		ar & BOOST_SERIALIZATION_NVP( isConst );
-		ar & BOOST_SERIALIZATION_NVP( subscripts );
-		ar & BOOST_SERIALIZATION_NVP( initializeExpression );
-		ar & BOOST_SERIALIZATION_NVP( constructParameter );
-	}
-
-public:
-
-	int source_code_address;
-
-	const std::string &GetName() const
-	{
-		return name;
-	}
-	void SetName( const std::string &name )
-	{
-		this->name = name;
-	}
-
-	const Type &GetType() const
-	{
-		return type;
-	}
-	void ResetType( const Type &type )
-	{
-		this->type = type;
-	}
-
-	bool IsConst() const
-	{
-		return isConst;
-	}
-
-	const Subscripts &GetSubscripts() const
-	{
-		return subscripts;
-	}
-
-	const std::string &GetInitializeExpression() const
-	{
-		return initializeExpression;
-	}
-	const std::string &GetConstructParameter() const
-	{
-		return constructParameter;
-	}
-
-	Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter )
-		: MemberPrototype( accessibility )
-		, name( name )
-		, type( newType )
-		, isConst( isConst )
-		, subscripts( subscripts )
-		, initializeExpression( initializeExpression )
-		, constructParameter( constructParameter )
-	{
-	}
-	Member::Member(Member &member)
-		: MemberPrototype( member.GetAccessibility() )
-		, name( member.GetName() )
-		, type( member.GetType() )
-		, isConst( member.IsConst() )
-		, subscripts( member.GetSubscripts() )
-	{
-		//ソースコードの位置
-		source_code_address=member.source_code_address;
-	}
-	Member()
-	{
-	}
-	~Member()
-	{
-	}
-};
-typedef std::vector<Member *> Members;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Meta.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Meta.h	(revision 602)
+++ 	(revision )
@@ -1,159 +1,0 @@
-#pragma once
-
-class Meta
-{
-	// 名前空間
-	NamespaceScopesCollection namespaceScopesCollection;
-
-	// 関数・メソッド
-	UserProcs userProcs;
-
-	// DLL関数
-	DllProcs dllProcs;
-
-	// クラス
-	Classes classesImpl;
-
-	// グローバル変数
-	GlobalVars globalVars;
-
-	// グローバル定数
-	Consts globalConsts;
-
-	// グローバル定数マクロ
-	ConstMacros globalConstMacros;
-
-	// blittable型
-	BlittableTypes blittableTypes;
-
-	// TypeDef
-	TypeDefCollection typeDefs;
-
-	// 関数ポインタ
-	ProcPointers procPointers;
-
-	// デリゲート
-	Delegates delegates;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Meta" );
-
-		ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
-		ar & BOOST_SERIALIZATION_NVP( userProcs );
-		ar & BOOST_SERIALIZATION_NVP( dllProcs );
-		ar & BOOST_SERIALIZATION_NVP( classesImpl );
-		ar & BOOST_SERIALIZATION_NVP( globalVars );
-		ar & BOOST_SERIALIZATION_NVP( globalConsts );
-		ar & BOOST_SERIALIZATION_NVP( globalConstMacros );
-		ar & BOOST_SERIALIZATION_NVP( blittableTypes );
-		ar & BOOST_SERIALIZATION_NVP( typeDefs );
-		ar & BOOST_SERIALIZATION_NVP( procPointers );
-		ar & BOOST_SERIALIZATION_NVP( delegates );
-	}
-
-	Classes *pNowClassesForDebugger;
-
-public:
-	Meta()
-		: classesImpl()
-		, pNowClassesForDebugger( &classesImpl )
-	{
-	}
-
-	// 初期化
-	void Clear();
-
-	// 静的リンク
-	void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
-
-	const NamespaceScopesCollection &GetNamespaces() const
-	{
-		return namespaceScopesCollection;
-	}
-	NamespaceScopesCollection &GetNamespaces()
-	{
-		return namespaceScopesCollection;
-	}
-
-	const UserProcs &GetUserProcs() const
-	{
-		return userProcs;
-	}
-	UserProcs &GetUserProcs()
-	{
-		return userProcs;
-	}
-
-	const DllProcs &GetDllProcs() const
-	{
-		return dllProcs;
-	}
-	DllProcs &GetDllProcs()
-	{
-		return dllProcs;
-	}
-
-	Classes &GetClasses()
-	{
-		return *pNowClassesForDebugger;
-	}
-	void SetClasses( Classes *pClasses )
-	{
-		this->pNowClassesForDebugger = pClasses;
-	}
-
-	const GlobalVars &GetGlobalVars() const
-	{
-		return globalVars;
-	}
-	GlobalVars &GetGlobalVars()
-	{
-		return globalVars;
-	}
-
-	const Consts &GetGlobalConsts() const
-	{
-		return globalConsts;
-	}
-	Consts &GetGlobalConsts()
-	{
-		return globalConsts;
-	}
-
-	const ConstMacros &GetGlobalConstMacros() const
-	{
-		return globalConstMacros;
-	}
-	ConstMacros &GetGlobalConstMacros()
-	{
-		return globalConstMacros;
-	}
-
-	BlittableTypes &GetBlittableTypes()
-	{
-		return blittableTypes;
-	}
-
-	TypeDefCollection &GetTypeDefs()
-	{
-		return typeDefs;
-	}
-
-	ProcPointers &GetProcPointers()
-	{
-		return procPointers;
-	}
-
-	Delegates &GetDelegates()
-	{
-		return delegates;
-	}
-
-	const ::Delegate &ToDelegate( const CClass &_class );
-
-	const CClass *FindClassSupportedTypeDef( const Symbol &symbol );
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h	(revision 602)
+++ 	(revision )
@@ -1,275 +1,0 @@
-#pragma once
-
-class UserProc;
-class CClass;
-
-class CMethod : public MemberPrototype
-{
-	const UserProc *pUserProc;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - CMethod" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( MemberPrototype );
-		ar & boost::serialization::make_nvp("pUserProc", const_cast<UserProc *&>(pUserProc));
-	}
-
-public:
-	CMethod( const UserProc *pUserProc, Prototype::Accessibility accessibility )
-		: MemberPrototype( accessibility )
-		, pUserProc( pUserProc )
-	{
-	}
-	CMethod()
-	{
-	}
-
-	const UserProc &GetUserProc() const
-	{
-		return *pUserProc;
-	}
-	void SetUserProcPtr( const UserProc *pUserProc )
-	{
-		this->pUserProc = pUserProc;
-	}
-
-	virtual bool IsAbstract() const = 0;
-	virtual void SetAbstractMark( bool isAbstractMark ) = 0;
-	virtual bool IsVirtual() const = 0;
-	virtual bool IsConst() const = 0;
-	virtual bool IsDynamic() const = 0;
-	virtual bool IsStatic() const = 0;
-	virtual const CClass *GetInheritsClassPtr() const = 0;
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass ) = 0;
-	virtual bool IsNotUse() const = 0;
-	virtual void SetNotUseMark( bool isNotUse ) = 0;
-};
-
-class DynamicMethod : public CMethod
-{
-public:
-	struct OverrideResult
-	{
-		enum EnumType
-		{
-			Successful = 0,				// オーバーライドに成功
-			NotVirtual,					// 非Virtualメソッドに対してオーバーライドを行おうとした
-			NotUseOverrideModifier,		// Override修飾子が無い状況で基底クラスの実体メソッドをオーバーライドしようとした
-			DifferentAccesibility,		// オーバーライド元、先のアクセシビリティに相違がある
-		};
-
-		EnumType enumType;
-		const CMethod *pMethod;
-	};
-
-private:
-	bool isAbstract;
-	bool isVirtual;
-	bool isConst;
-	const CClass *pInheritsClass;
-
-	// 他のインターフェイスへ実装が移った場合（基底クラスメソッドのインターフェイス実装）はこのフラグをオンにする
-	bool isNotUse;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - DynamicMethod" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CMethod );
-		ar & BOOST_SERIALIZATION_NVP( isAbstract );
-		ar & BOOST_SERIALIZATION_NVP( isVirtual );
-		ar & BOOST_SERIALIZATION_NVP( isConst );
-		ar & boost::serialization::make_nvp("pInheritsClass", const_cast<CClass *&>(pInheritsClass));
-		ar & BOOST_SERIALIZATION_NVP( isNotUse );
-	}
-
-public:
-	DynamicMethod( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isAbstract, bool isVirtual, bool isConst, const CClass *pInheritsClass = NULL )
-		: CMethod( pUserProc, accessibility )
-		, isAbstract( isAbstract )
-		, isVirtual( isVirtual )
-		, isConst( isConst )
-		, pInheritsClass( pInheritsClass )
-		, isNotUse( false )
-	{
-	}
-	DynamicMethod( const CMethod &method )
-		: CMethod( &method.GetUserProc(), method.GetAccessibility() )
-		, isAbstract( method.IsAbstract() )
-		, isVirtual( method.IsVirtual() )
-		, isConst( method.IsConst() )
-		, pInheritsClass( method.GetInheritsClassPtr() )
-		, isNotUse( false )
-	{
-	}
-	DynamicMethod()
-	{
-	}
-
-	DynamicMethod::OverrideResult::EnumType Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier );
-
-	virtual bool IsAbstract() const
-	{
-		return isAbstract;
-	}
-	virtual void SetAbstractMark( bool isAbstract )
-	{
-		this->isAbstract = isAbstract;
-	}
-	virtual bool IsVirtual() const
-	{
-		return isVirtual;
-	}
-	virtual bool IsConst() const
-	{
-		return isConst;
-	}
-	virtual bool IsDynamic() const
-	{
-		return true;
-	}
-	virtual bool IsStatic() const
-	{
-		return false;
-	}
-	virtual const CClass *GetInheritsClassPtr() const
-	{
-		return pInheritsClass;
-	}
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
-	{
-		this->pInheritsClass = pInheritsClass;
-	}
-	virtual bool IsNotUse() const
-	{
-		return isNotUse;
-	}
-	virtual void SetNotUseMark( bool isNotUse )
-	{
-		this->isNotUse = isNotUse;
-	}
-};
-BOOST_CLASS_EXPORT( DynamicMethod );
-class StaticMethod : public CMethod
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - StaticMethod" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CMethod );
-	}
-
-public:
-
-	// コンストラクタ
-	StaticMethod( UserProc *pUserProc, Prototype::Accessibility accessibility )
-		: CMethod( pUserProc, accessibility )
-	{
-	}
-
-	// コピーコンストラクタ
-	StaticMethod( const StaticMethod &staticMethod );
-
-	// デストラクタ
-	StaticMethod()
-	{
-	}
-
-	virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier )
-	{
-		throw;
-	}
-
-	virtual bool IsAbstract() const
-	{
-		throw;
-	}
-	virtual void SetAbstractMark( bool isAbstract )
-	{
-		throw;
-	}
-	virtual bool IsVirtual() const{
-		return false;
-	}
-	virtual bool IsConst() const
-	{
-		throw;
-	}
-	virtual bool IsDynamic() const
-	{
-		return false;
-	}
-	virtual bool IsStatic() const
-	{
-		return true;
-	}
-	virtual const CClass *GetInheritsClassPtr() const
-	{
-		throw;
-	}
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
-	{
-		throw;
-	}
-	virtual bool IsNotUse() const
-	{
-		return false;
-	}
-	virtual void SetNotUseMark( bool isNotUse )
-	{
-		throw;
-	}
-};
-BOOST_CLASS_EXPORT( StaticMethod );
-
-class Methods : public std::vector<CMethod *>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Methods" );
-
-		ar & boost::serialization::make_nvp("vector_CMethod", boost::serialization::base_object<vector<CMethod *>>(*this));
-	}
-
-public:
-	// コンストラクタ
-	Methods();
-
-	// コピーコンストラクタ
-	Methods( const Methods &methods );
-
-	// デストラクタ
-	~Methods();
-
-	//メンバ、メソッドの追加
-	void Add( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isConst, bool isAbstract, bool isVirtual );
-	void AddStatic(UserProc *pUserProc,Prototype::Accessibility accessibility);
-
-	/*!
-	@brief	オーバーライドのための検索
-	@param	actualTypeParametersForThisMethods thisオブジェクトで保有するメソッド群を対象とした実型パラメータ
-			pUserProc 照らし合わせる関数
-	*/
-	DynamicMethod *FindForOverride( const Types &actualTypeParametersForThisMethods, const UserProc *pUserProc );
-
-	const CMethod *GetMethodPtr( const UserProc *pUserProc ) const;
-	bool IsExist( const char *name ) const;
-	virtual void Enum( const char *methodName, std::vector<const UserProc *> &subs ) const;
-	virtual void Enum( BYTE idOperatorCalc, std::vector<const UserProc *> &subs ) const;
-
-	// 仮想メソッドの個数を取得
-	int GetVtblNum() const;
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h	(revision 602)
+++ 	(revision )
@@ -1,262 +1,0 @@
-#pragma once
-
-class UserProc;
-class DllProc;
-class CClass;
-
-class Schedule
-{
-public:
-	enum Type
-	{
-		None = 10000,
-		GlobalVar,		// グローバル変数スケジュール
-		DataTable,		// データテーブル スケジュール
-		CatchAddress,	// Catchアドレス スケジュール
-		Relocation,		// リロケーション情報スケジュール
-		UserProc,		// ユーザ定義関数呼び出し側スケジュール
-		AddressOf,		// ユーザ定義関数位置スケジュール
-		DllProc,		// DLL関数位置スケジュール
-		ComVtbl,		// com_vtblスケジュール
-		Vtbl,			// vtblスケジュール
-		TypeInfo,		// TypeInfoスケジュール
-	};
-
-private:
-	Type type;
-	long offset;
-
-	union{
-		LONG_PTR lpValue;
-		const ::UserProc *pUserProc;
-		const ::DllProc *pDllProc;
-		const ::CClass *pClass;
-	};
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Schedule" );
-
-		ar & BOOST_SERIALIZATION_NVP( type );
-		ar & BOOST_SERIALIZATION_NVP( offset );
-
-		switch( type )
-		{
-		case UserProc:
-		case AddressOf:
-		case CatchAddress:
-			ar & boost::serialization::make_nvp("pUserProc", const_cast<::UserProc *&>(pUserProc));
-			break;
-		case DllProc:
-			ar & boost::serialization::make_nvp("pDllProc", const_cast<::DllProc *&>(pDllProc));
-			break;
-		case ComVtbl:
-		case Vtbl:
-		case TypeInfo:
-			ar & boost::serialization::make_nvp("pClass", const_cast<::CClass *&>(pClass));
-			break;
-		default:
-			ar & BOOST_SERIALIZATION_NVP( lpValue );
-			break;
-		}
-	}
-
-public:
-	Schedule()
-	{
-	}
-	Schedule( Type type, long offset, LONG_PTR lpValue = 0 )
-		: type( type )
-		, offset( offset )
-		, lpValue( lpValue )
-	{
-	}
-	Schedule( Schedule::Type type, const ::UserProc *pUserProc, long offset )
-		: type( type )
-		, offset( offset )
-		, pUserProc( pUserProc )
-	{
-	}
-	Schedule( const ::DllProc *pDllProc, long offset )
-		: type( Schedule::DllProc )
-		, offset( offset )
-		, pDllProc( pDllProc )
-	{
-	}
-	Schedule( Type type, const ::CClass *pClass, long offset )
-		: type( type )
-		, pClass( pClass )
-		, offset( offset )
-	{
-		if( !( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ) )
-		{
-			DebugBreak();
-		}
-	}
-	~Schedule()
-	{
-	}
-
-	Type GetType() const
-	{
-		return type;
-	}
-	long GetOffset() const
-	{
-		return offset;
-	}
-	LONG_PTR GetLongPtrValue() const
-	{
-		return lpValue;
-	}
-	const ::DllProc &GetDllProc() const;
-	const ::UserProc &GetUserProc() const;
-	const ::CClass &GetClass() const;
-};
-typedef std::vector<Schedule> Schedules;
-
-#define CODETYPE_SYSTEMPROC		0x0001
-#define CODETYPE_DEBUGPROC		0x0002
-class SourceLine
-{
-	int lineNum;
-	long nativeCodePos;
-	int sourceIndex;
-	long sourceCodePos;
-	DWORD codeType;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - SourceLine" );
-
-		ar & BOOST_SERIALIZATION_NVP( lineNum );
-		ar & BOOST_SERIALIZATION_NVP( nativeCodePos );
-		ar & BOOST_SERIALIZATION_NVP( sourceIndex );
-		ar & BOOST_SERIALIZATION_NVP( sourceCodePos );
-		ar & BOOST_SERIALIZATION_NVP( codeType );
-	}
-
-public:
-	SourceLine( int lineNum, int nativeCodePos, int sourceIndex, int sourceCodePos, DWORD codeType )
-		: lineNum( lineNum )
-		, nativeCodePos( nativeCodePos )
-		, sourceIndex( sourceIndex )
-		, sourceCodePos( sourceCodePos )
-		, codeType( codeType )
-	{
-	}
-	SourceLine()
-	{
-	}
-
-	int GetLineNum() const
-	{
-		return lineNum;
-	}
-	long GetNativeCodePos() const
-	{
-		return nativeCodePos;
-	}
-	int GetSourceIndex() const
-	{
-		return sourceIndex;
-	}
-	void SetSourceIndex( int sourceIndex )
-	{
-		this->sourceIndex = sourceIndex;
-	}
-	long GetSourceCodePos() const
-	{
-		return sourceCodePos;
-	}
-	void SetSourceCodePos( int sourceCodePos )
-	{
-		this->sourceCodePos = sourceCodePos;
-	}
-	DWORD GetCodeType() const
-	{
-		return codeType;
-	}
-	bool IsInSystemProc() const
-	{
-		return ( (codeType&CODETYPE_SYSTEMPROC) != 0 );
-	}
-	bool IsInDebugProc() const
-	{
-		return ( (codeType&CODETYPE_DEBUGPROC) != 0 );
-	}
-};
-typedef std::vector<SourceLine> SourceLines;
-
-class NativeCode : public Jenga::Common::Binary
-{
-	// リンカで解決しなければならないスケジュール
-	Schedules schedules;
-
-	// ソースコード行番号とネイティブコード位置の対応情報
-	SourceLines sourceLines;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing(load) - NativeCode" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Jenga::Common::Binary );
-		ar & BOOST_SERIALIZATION_NVP( schedules );
-		ar & BOOST_SERIALIZATION_NVP( sourceLines );
-	}
-
-public:
-	NativeCode()
-		: Jenga::Common::Binary()
-	{
-	}
-	NativeCode( const NativeCode &nativeCode )
-		: Jenga::Common::Binary()
-	{
-		PutEx( nativeCode );
-	}
-	NativeCode( const char *codeBuffer, int size )
-		: Jenga::Common::Binary( codeBuffer, size )
-	{
-	}
-	~NativeCode()
-	{
-	}
-
-	void operator =( const NativeCode &nativeCode )
-	{
-		Clear();
-		PutEx( nativeCode );
-	}
-
-	const Schedules &GetSchedules() const
-	{
-		return schedules;
-	}
-
-	void PutEx( const NativeCode &nativeCode );
-	void PutEx( long l, Schedule::Type scheduleType );
-	void PutUserProcSchedule( const UserProc *pUserProc, bool isCall );
-	void PutCatchAddressSchedule( const UserProc *pUserProc, long codePos );
-	void PutDllProcSchedule( const DllProc *pDllProc );
-	void PutComVtblSchedule( const CClass *pClass );
-	void PutVtblSchedule( const CClass *pClass );
-
-	const SourceLines &GetSourceLines() const
-	{
-		return sourceLines;
-	}
-	void NextSourceLine( int currentSourceIndex, int nowLine );
-
-	void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
-	void ResetSourceIndexes( long sourceIndexBase );
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/ObjectModule.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/ObjectModule.h	(revision 602)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#pragma once
-
-class ObjectModule
-{
-public:
-	// メタ情報
-	Meta meta;
-
-	// グローバル領域のネイティブコード
-	NativeCode globalNativeCode;
-
-	// データテーブル
-	DataTable dataTable;
-
-private:
-	// ソースコード
-	int currentSourceIndex;
-	BasicSources sources;
-
-	// XMLシリアライズ用
-private:
-	virtual const char *RootTagName() const
-	{
-		return "objectModule";
-	}
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - objectModule" );
-
-		ar & BOOST_SERIALIZATION_NVP( meta );
-		ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
-		ar & BOOST_SERIALIZATION_NVP( dataTable );
-		ar & BOOST_SERIALIZATION_NVP( currentSourceIndex );
-		ar & BOOST_SERIALIZATION_NVP( sources );
-	}
-
-public:
-	void StaticLink( ObjectModule &objectModule );
-
-	int GetCurrentSourceIndex() const
-	{
-		return currentSourceIndex;
-	}
-	const BasicSource &GetCurrentSource() const
-	{
-		return sources[currentSourceIndex];
-	}
-	BasicSource &GetCurrentSource()
-	{
-		return sources[currentSourceIndex];
-	}
-	void SetCurrentSourceIndex( int currentSourceIndex )
-	{
-		this->currentSourceIndex = currentSourceIndex;
-	}
-	const BasicSource &GetSource( int sourceIndex ) const
-	{
-		return sources[sourceIndex];
-	}
-	BasicSources &GetSources()
-	{
-		return sources;
-	}
-
-	bool Read( const std::string &filePath );
-	bool Write( const std::string &filePath ) const;
-	bool ReadString( const std::string &str );
-	bool WriteString( std::string &str ) const;
-};
-typedef std::vector<ObjectModule *> ObjectModules;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Parameter.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Parameter.h	(revision 602)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#pragma once
-
-class Parameter : public Type
-{
-	std::string varName;
-	bool isRef;
-	bool isArray;
-	Subscripts subscripts;
-
-	std::string initValue;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Parameter" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Type );
-		ar & BOOST_SERIALIZATION_NVP( varName );
-		ar & BOOST_SERIALIZATION_NVP( isRef );
-		ar & BOOST_SERIALIZATION_NVP( isArray );
-		ar & BOOST_SERIALIZATION_NVP( subscripts );
-		ar & BOOST_SERIALIZATION_NVP( initValue );
-	}
-
-public:
-	Parameter( const std::string &varName, const Type &type, bool isRef = false, const std::string initValue = "" ):
-		Type( type ),
-		varName( varName ),
-		isRef( isRef ),
-		isArray( false ),
-		initValue( initValue )
-	{
-	}
-	Parameter( const Parameter &param ):
-		Type( param ),
-		varName( param.varName ),
-		isRef( param.isRef ),
-		isArray( param.isArray ),
-		subscripts( param.subscripts ),
-		initValue( param.initValue )
-	{
-	}
-	Parameter()
-	{
-	}
-	~Parameter(){}
-
-	void SetArray( const Subscripts &subscripts ){
-		isArray = true;
-		this->subscripts = subscripts;
-	}
-
-	const std::string &GetVarName() const
-	{
-		return varName;
-	}
-
-	bool IsRef() const
-	{
-		return isRef;
-	}
-	bool IsArray(){
-		return isArray;
-	}
-	const Subscripts &GetSubscripts() const
-	{
-		return subscripts;
-	}
-
-	const std::string &GetInitValue() const
-	{
-		return initValue;
-	}
-
-	bool Equals( const Parameter &param, bool isContravariant ) const;
-	bool Equals( const Types &actualTypeParametersForThisProc, const Parameter &param, bool isContravariant ) const;
-};
-
-class Parameters : public std::vector<Parameter *>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Parameters" );
-
-		ar & boost::serialization::make_nvp("vector_Parameter", boost::serialization::base_object<std::vector<Parameter *>>(*this));
-	}
-
-public:
-
-	bool Equals( const Parameters &params, bool isContravariant = false ) const;
-	bool Equals( const Types &actualTypeParametersForThisProc, const Parameters &params, bool isContravariant = false ) const;
-
-	int GetMemorySize() const
-	{
-		return (int)this->size() * PTR_SIZE;
-	}
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Procedure.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Procedure.h	(revision 602)
+++ 	(revision )
@@ -1,549 +1,0 @@
-#pragma once
-
-class CClass;
-class Interface;
-class CMethod;
-
-class Procedure : public Symbol
-{
-public:
-	// 種類
-	enum Kind{
-		Sub,
-		Function,
-	};
-
-private:
-	Kind kind;
-
-	bool isCdecl;
-	mutable bool isUsing;
-
-	// パラメータ
-	Parameters params;
-
-protected:
-
-	// 戻り値の型
-	Type returnType;
-
-	// ソースコードの位置
-	int codePos;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Procedure" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
-		ar & BOOST_SERIALIZATION_NVP( kind );
-		ar & BOOST_SERIALIZATION_NVP( isCdecl );
-		ar & BOOST_SERIALIZATION_NVP( isUsing );
-		ar & BOOST_SERIALIZATION_NVP( params );
-		ar & BOOST_SERIALIZATION_NVP( returnType );
-		ar & BOOST_SERIALIZATION_NVP( codePos );
-	}
-
-public:
-	Procedure( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl )
-		: Symbol( namespaceScopes, name )
-		, kind( kind )
-		, isCdecl( isCdecl )
-		, isUsing( false )
-		, codePos( -1 )
-	{
-	}
-	Procedure()
-	{
-	}
-	~Procedure(){
-		BOOST_FOREACH( Parameter *pParam, params ){
-			delete pParam;
-		}
-	}
-
-	bool IsSub() const
-	{
-		return ( kind == Sub );
-	}
-	bool IsFunction() const
-	{
-		return ( kind == Function );
-	}
-
-	bool IsCdecl() const
-	{
-		return isCdecl;
-	}
-	void Using() const
-	{
-		isUsing = true;
-	}
-	bool IsUsing() const
-	{
-		return isUsing;
-	}
-
-	int GetCodePos() const
-	{
-		return codePos;
-	}
-	void SetCodePos( int codePos )
-	{
-		this->codePos = codePos;
-	}
-
-	const Parameters &Params() const
-	{
-		return params;
-	}
-	Parameters &GetParameters()
-	{
-		return params;
-	}
-	const Type &ReturnType() const
-	{
-		return returnType;
-	}
-	Type &ReturnType()
-	{
-		return returnType;
-	}
-};
-
-class UserProc : public Procedure, public Jenga::Common::ObjectInHashmap<UserProc>
-{
-public:
-	std::string _paramStr;
-
-private:
-	NamespaceScopesCollection importedNamespaces;
-
-	// 親クラスと対応するメソッド
-	const CClass *pParentClass;
-	const Interface *pInterface;
-	CMethod *pMethod;
-
-	bool isMacro;
-
-	// パラメータの追加情報
-	int secondParmNum;
-	Parameters realParams;
-	int realSecondParmNum;
-
-	// 各種フラグ
-	bool isExport;
-	mutable bool isSystem;
-	mutable bool isAutoGeneration;
-	mutable bool isCompiled;
-
-	mutable DWORD beginOpAddress;
-	mutable DWORD endOpAddress;
-
-	// ローカル変数
-	mutable Variables localVars;
-
-	// 識別ID
-	int id;
-
-	// ネイティブコード
-	NativeCode nativeCode;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - UserProc" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
-		ar & BOOST_SERIALIZATION_NVP( _paramStr );
-		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
-		ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) );
-		ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) );
-		ar & BOOST_SERIALIZATION_NVP( pMethod );
-		ar & BOOST_SERIALIZATION_NVP( isMacro );
-		ar & BOOST_SERIALIZATION_NVP( secondParmNum );
-		ar & BOOST_SERIALIZATION_NVP( realParams );
-		ar & BOOST_SERIALIZATION_NVP( realSecondParmNum );
-		ar & BOOST_SERIALIZATION_NVP( isExport );
-		ar & BOOST_SERIALIZATION_NVP( isSystem );
-		ar & BOOST_SERIALIZATION_NVP( isAutoGeneration );
-		ar & BOOST_SERIALIZATION_NVP( isCompiled );
-		ar & BOOST_SERIALIZATION_NVP( beginOpAddress );
-		ar & BOOST_SERIALIZATION_NVP( endOpAddress );
-		ar & BOOST_SERIALIZATION_NVP( localVars );
-		ar & BOOST_SERIALIZATION_NVP( id );
-		ar & BOOST_SERIALIZATION_NVP( nativeCode );
-	}
-
-public:
-
-	UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport )
-		: Procedure( namespaceScopes, name, kind, isCdecl )
-		, importedNamespaces( importedNamespaces )
-		, pParentClass( NULL )
-		, pInterface( NULL )
-		, pMethod( NULL )
-		, isMacro( isMacro )
-		, secondParmNum( 0 )
-		, realSecondParmNum( 1 )
-		, isExport( isExport )
-		, isSystem( false )
-		, isAutoGeneration( false )
-		, isCompiled( false )
-		, beginOpAddress( 0 )
-		, endOpAddress( 0 )
-	{
-		static int id_base=0;
-		id = ( id_base ++ );
-	}
-	UserProc()
-	{
-	}
-	~UserProc()
-	{
-		BOOST_FOREACH( Parameter *pParam, realParams ){
-			delete pParam;
-		}
-	}
-
-	void SetReturnType( const Type &newReturnType )
-	{
-		returnType = newReturnType;
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-
-	virtual bool IsDuplication( const UserProc *pUserProc ) const
-	{
-		if( this->GetParentClassPtr() == pUserProc->GetParentClassPtr()	// 親クラスが等しい
-			&& this->pInterface == pUserProc->pInterface				// インターフェイスが等しい
-			&& pUserProc->IsEqualSymbol( *this )						// 名前空間及び名前が等しい
-			&& this->Params().Equals( pUserProc->Params() )				// パラメータが等しい
-			&& this->returnType.Equals( pUserProc->returnType ) )		// 戻り値が等しい
-		{
-			return true;
-		}
-		return false;
-	}
-
-	/*!
-	@brief	オーバーライド用に関数同士が等しいかどうかをチェックする
-	@param	actualTypeParametersForThisProc thisオブジェクトで保有するメソッドを対象とした実型パラメータ
-			pUserProc 照らし合わせる関数
-	*/
-	bool IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const;
-
-	bool IsMacro() const
-	{
-		return isMacro;
-	}
-
-	int GetSecondParmNum() const
-	{
-		return secondParmNum;
-	}
-	void SetSecondParmNum( int secondParmNum )
-	{
-		this->secondParmNum = secondParmNum;
-	}
-	const Parameters &RealParams() const
-	{
-		return realParams;
-	}
-	Parameters &RealParams()
-	{
-		return realParams;
-	}
-	void SetRealParams( const Parameters &params )
-	{
-		realParams = params;
-	}
-	int GetRealSecondParmNum() const
-	{
-		return realSecondParmNum;
-	}
-
-	void ExportOff(){
-		isExport = false;
-	}
-	bool IsExport() const
-	{
-		return isExport;
-	}
-	void ThisIsSystemProc() const
-	{
-		isSystem = true;
-	}
-	bool IsSystem() const
-	{
-		return isSystem;
-	}
-	void ThisIsAutoGenerationProc() const
-	{
-		isAutoGeneration = true;
-	}
-	bool IsAutoGeneration() const
-	{
-		return isAutoGeneration;
-	}
-	void CompleteCompile() const
-	{
-		isCompiled = true;
-	}
-	void KillCompileStatus() const
-	{
-		isCompiled = false;
-	}
-	bool IsCompiled() const
-	{
-		return isCompiled;
-	}
-	bool IsDestructor() const
-	{
-		return ( GetName()[0] == '~' );
-	}
-
-	// バイナリコード位置とサイズ
-	DWORD GetBeginOpAddress() const
-	{
-		return beginOpAddress;
-	}
-	void SetBeginOpAddress( DWORD beginOpAddress ) const
-	{
-		this->beginOpAddress = beginOpAddress;
-	}
-	DWORD GetEndOpAddress() const
-	{
-		return endOpAddress;
-	}
-	void SetEndOpAddress( DWORD endOpAddress ) const
-	{
-		this->endOpAddress = endOpAddress;
-	}
-	int GetCodeSize() const
-	{
-		return endOpAddress - beginOpAddress;
-	}
-
-	virtual const NamespaceScopes &GetNamespaceScopes() const;
-	const NamespaceScopesCollection &GetImportedNamespaces() const;
-
-	Variables &GetLocalVars() const
-	{
-		return localVars;
-	}
-
-	int GetId() const
-	{
-		return id;
-	}
-
-	const NativeCode &GetNativeCode() const
-	{
-		return nativeCode;
-	}
-	NativeCode &GetNativeCode()
-	{
-		return nativeCode;
-	}
-
-	std::string GetFullName() const;
-	bool IsCastOperator() const;
-
-	bool IsVirtual() const;
-
-	void SetParentClass( const CClass *pParentClass ){
-		this->pParentClass = pParentClass;
-	}
-	const CClass *GetParentClassPtr() const
-	{
-		return pParentClass;
-	}
-	const CClass &GetParentClass() const
-	{
-		return *pParentClass;
-	}
-	bool HasParentClass() const
-	{
-		return ( pParentClass != NULL );
-	}
-	bool IsGlobalProcedure() const
-	{
-		return ( pParentClass == NULL );
-	}
-	void SetInterface( const Interface *pInterface )
-	{
-		this->pInterface = pInterface;
-	}
-	void SetMethod( CMethod *pMethod ){
-		this->pMethod = pMethod;
-	}
-	const CMethod &GetMethod() const;
-
-
-	static const UserProc *pGlobalProc;
-};
-
-class UserProcs : public Jenga::Common::Hashmap<UserProc>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - UserProcs" );
-
-		ar & boost::serialization::make_nvp("Hashmap_UserProcImpl",
-			boost::serialization::base_object<Jenga::Common::Hashmap<UserProc>>(*this));
-	}
-
-
-public:
-	UserProcs()
-	{
-	}
-	~UserProcs()
-	{
-	}
-
-	void EnumGlobalProcs( const char *simpleName, const Symbol &localSymbol, std::vector<const UserProc *> &subs );
-};
-
-class DllProc : public Procedure, public Jenga::Common::ObjectInHashmap<DllProc>
-{
-	std::string dllFileName;
-	std::string alias;
-	int lookupAddress;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - DllProc" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
-		ar & BOOST_SERIALIZATION_NVP( dllFileName );
-		ar & BOOST_SERIALIZATION_NVP( alias );
-		ar & BOOST_SERIALIZATION_NVP( lookupAddress );
-	}
-
-public:
-	DllProc( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl, const std::string &dllFileName, const std::string &alias )
-		: Procedure( namespaceScopes, name, kind, isCdecl )
-		, dllFileName( dllFileName )
-		, alias( alias )
-		, lookupAddress( 0 )
-	{
-	}
-	DllProc()
-	{
-	}
-	~DllProc()
-	{
-	}
-
-	virtual const std::string &GetKeyName() const
-	{
-		return GetName();
-	}
-
-	virtual bool IsDuplication( const DllProc *pDllProc ) const
-	{
-		if( pDllProc->IsEqualSymbol( *this )
-			&& this->Params().Equals( pDllProc->Params() ) )
-		{
-			return true;
-		}
-		return false;
-	}
-
-	const std::string &GetDllFileName() const
-	{
-		return dllFileName;
-	}
-	const std::string &GetAlias() const
-	{
-		return alias;
-	}
-
-	void SetLookupAddress( int lookupAddress ){
-		this->lookupAddress = lookupAddress;
-	}
-	int GetLookupAddress() const
-	{
-		return lookupAddress;
-	}
-};
-class DllProcs : public Jenga::Common::Hashmap<DllProc>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - DllProcs" );
-
-		ar & boost::serialization::make_nvp("Hashmap_DllProc",
-			boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this));
-	}
-};
-
-class ProcPointer : public Procedure
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - ProcPointer" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
-	}
-
-public:
-	ProcPointer( Kind kind )
-		: Procedure( NamespaceScopes(), std::string(), kind, false )
-	{
-	}
-	ProcPointer()
-	{
-	}
-	~ProcPointer(){}
-};
-
-class ProcPointers : public std::vector<ProcPointer *>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - ProcPointers" );
-
-		ar & boost::serialization::make_nvp("vector_ProcPointer",
-			boost::serialization::base_object<vector<ProcPointer *>>(*this));
-	}
-
-public:
-	ProcPointers()
-	{
-	}
-	~ProcPointers()
-	{
-		Clear();
-	}
-
-	void Clear();
-	void PullOutAll()
-	{
-		clear();
-	}
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Source.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Source.h	(revision 602)
+++ 	(revision )
@@ -1,254 +1,0 @@
-#pragma once
-
-class IncludedFilesRelation
-{
-	std::vector<std::string> filePaths;
-	std::vector<int> lineFileNumbers;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - IncludedFilesRelation" );
-
-		ar & BOOST_SERIALIZATION_NVP( filePaths );
-		ar & BOOST_SERIALIZATION_NVP( lineFileNumbers );
-	}
-
-public:
-	IncludedFilesRelation()
-	{
-	}
-	~IncludedFilesRelation()
-	{
-	}
-
-	const int GetFileNumber( int lineNumber ) const
-	{
-		return lineFileNumbers[lineNumber];
-	}
-	const std::string &GetFilePath( int lineNumber ) const
-	{
-		return filePaths[GetFileNumber( lineNumber )];
-	}
-	const std::string &GetFilePathFromFileNumber( int fileNumber ) const
-	{
-		return filePaths[fileNumber];
-	}
-	int GetFileCounts() const
-	{
-		return (int)filePaths.size();
-	}
-
-	int AddFile( const std::string &filePath )
-	{
-		filePaths.push_back( filePath );
-		return (int)filePaths.size()-1;
-	}
-	void AddLine( int fileNumber )
-	{
-		lineFileNumbers.push_back( fileNumber );
-	}
-
-	int GetLineCounts() const
-	{
-		return (int)lineFileNumbers.size();
-	}
-};
-
-class Text{
-protected:
-	char *buffer;
-	int length;
-
-public:
-
-	Text(){
-		buffer = (char *)calloc( 1, 1 );
-		length = 0;
-	}
-	Text( const Text &text )
-		: length( text.length )
-	{
-		buffer = (char *)malloc( length + 1 );
-		memcpy( buffer, text.buffer, length );
-		buffer[length] = 0;
-	}
-	~Text(){
-		free( buffer );
-	}
-	void Clear()
-	{
-		length = 0;
-	}
-	void Add( const std::string &str )
-	{
-		buffer = (char *)realloc( buffer, length + str.size() + 1 );
-		lstrcpy( buffer + length, str.c_str() );
-		length += (int)str.size();
-	}
-	void Add( const std::vector<char> &str )
-	{
-		buffer = (char *)realloc( buffer, length + str.size() + 1 );
-		lstrcpy( buffer + length, &str[0] );
-		length += (int)str.size();
-	}
-
-	bool ReadFile( const std::string &filePath );
-
-	static void Text::SlideString(char *buffer, int slide){
-		char *temp;
-		temp=(char *)malloc(lstrlen(buffer)+1);
-		lstrcpy(temp,buffer);
-		lstrcpy(buffer+slide,temp);
-		free(temp);
-	}
-};
-
-class BasicSource : public Text
-{
-	static const std::string generateDirectiveName;
-
-	IncludedFilesRelation includedFilesRelation;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	BOOST_SERIALIZATION_SPLIT_MEMBER();
-	template<class Archive> void load(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing(load) - BasicSource" );
-
-		std::string _buffer;
-		ar & BOOST_SERIALIZATION_NVP( _buffer );
-		ar & BOOST_SERIALIZATION_NVP( length );
-		ar & BOOST_SERIALIZATION_NVP( includedFilesRelation );
-
-		// 読み込み後の処理
-		Realloc( length );
-		for( int i=0; i<length; i++ )
-		{
-			ULONG_PTR l1 = ( ( _buffer[i*3] >= 'a' ) ? ( _buffer[i*3] - 'a' + 0x0a ) : ( _buffer[i*3] - '0' ) ) * 0x10;
-			ULONG_PTR l2 = ( _buffer[i*3+1] >= 'a' ) ? ( _buffer[i*3+1] - 'a' + 0x0a ) : ( _buffer[i*3+1] - '0' );
-			ULONG_PTR l = l1 + l2;
-			buffer[i] = static_cast<char>(l);
-		}
-		buffer[length] = 0;
-	}
-	template<class Archive> void save(Archive& ar, const unsigned int version) const
-	{
-		trace_for_serialize( "serializing(save) - BasicSource" );
-
-		// 保存準備
-		char *tempCode = (char *)calloc( (length+1) * 3, 1 );
-		for( int i=0; i<length; i++ )
-		{
-			char temp[32];
-			sprintf( temp, "%02x,", (unsigned char)buffer[i] );
-			tempCode[i*3] = temp[0];
-			tempCode[i*3+1] = temp[1];
-			tempCode[i*3+2] = temp[2];
-		}
-
-		std::string _buffer = tempCode;
-		free( tempCode );
-
-		ar & BOOST_SERIALIZATION_NVP( _buffer );
-		ar & BOOST_SERIALIZATION_NVP( length );
-		ar & BOOST_SERIALIZATION_NVP( includedFilesRelation );
-	}
-
-private:
-	void Realloc( int newLength )
-	{
-		bool isEqualBasbuf = false;
-		extern char *basbuf;
-		if( basbuf == buffer + 2 )
-		{
-			isEqualBasbuf = true;
-		}
-
-		buffer = (char *)realloc( buffer, newLength + 255 );
-
-		length = newLength;
-
-		if( isEqualBasbuf )
-		{
-			basbuf = buffer + 2;
-		}
-	}
-
-	void IncludeFiles();
-
-	void ChangeReturnLineChar();
-
-	void RemoveComments();
-
-	bool ReadFile_InIncludeDirective( const std::string &filePath );
-	void DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath );
-
-	void RemoveReturnLineUnderbar();
-
-	void Initialize( const std::string &source );
-
-public:
-	BasicSource(){}
-	BasicSource( const BasicSource &basicSource )
-		: Text( basicSource )
-		, includedFilesRelation( basicSource.includedFilesRelation )
-	{
-	}
-	BasicSource( const std::string &source )
-	{
-		Initialize( source );
-	}
-	~BasicSource(){}
-
-	char *GetBuffer(){
-		return buffer+2;
-	}
-	const char *GetBuffer() const
-	{
-		return buffer+2;
-	}
-	int GetLength() const
-	{
-		return length-2;
-	}
-	void _ResetLength()
-	{
-		length = lstrlen( buffer );
-	}
-
-	const IncludedFilesRelation &GetIncludedFilesRelation() const
-	{
-		return includedFilesRelation;
-	}
-
-	void SetBuffer( const char *buffer );
-
-	bool ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath );
-
-	void Addition( const char *buffer );
-
-	bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const;
-
-	void operator = ( const BasicSource &source ){
-		Realloc( source.length );
-		lstrcpy( buffer, source.buffer );
-	}
-
-	char operator[]( int index ) const
-	{
-		if( index>GetLength() )
-		{
-			Jenga::Throw( "BasicSource bad access" );
-		}
-		return buffer[2+index];
-	}
-
-	std::string cannotIncludePath;
-	int cannotIncludeSourcePos;
-};
-typedef std::vector<BasicSource> BasicSources;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Type.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Type.h	(revision 602)
+++ 	(revision )
@@ -1,373 +1,0 @@
-#pragma once
-
-class CClass;
-
-class GenericType;
-typedef std::vector<GenericType> GenericTypes;
-
-class Type{
-	int basicType;
-	union{
-		LONG_PTR index;
-		const CClass *pClass;
-	};
-
-	// ジェネリクス クラス インスタンス型の場合に使う
-	GenericTypes actualGenericTypes;
-
-	// 型パラメータで使う
-	std::string formalTypeName;	// 型パラメータの名前
-	int formalTypeIndex;		// 型パラメータの引数番号
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Type" );
-
-		ar & BOOST_SERIALIZATION_NVP( basicType );
-		if( HasMember() )
-		{
-			ar & boost::serialization::make_nvp("pClass", const_cast<CClass *&>(pClass));
-			ar & BOOST_SERIALIZATION_NVP( actualGenericTypes );
-		}
-		else
-		{
-			ar & BOOST_SERIALIZATION_NVP( index );
-		}
-
-		if( IsTypeParameter() )
-		{
-			ar & BOOST_SERIALIZATION_NVP( formalTypeName );
-			ar & BOOST_SERIALIZATION_NVP( formalTypeIndex );
-		}
-	}
-
-public:
-	static int GetBasicSize( int basicType );
-
-	Type():
-	  basicType( DEF_NON ),
-	  index( -1 ){}
-	Type( int basicType ):
-	  basicType( basicType ),
-	  index( -1 ){}
-
-	Type( int basicType, LONG_PTR index )
-		: basicType( basicType )
-		, index( index )
-	{
-	}
-
-	Type( int basicType, const CClass &objClass ):
-	  basicType( basicType ),
-	  index( (LONG_PTR)&objClass ){}
-
-	Type( const Type &type )
-		: basicType( type.basicType )
-		, index( type.index )
-		, actualGenericTypes( type.actualGenericTypes )
-		, formalTypeName( type.formalTypeName )
-		, formalTypeIndex( type.formalTypeIndex )
-	{
-	}
-
-	~Type();
-
-	void operator= ( const Type &type )
-	{
-		basicType = type.basicType;
-		index = type.index;
-		actualGenericTypes = type.actualGenericTypes;
-		formalTypeName = type.formalTypeName;
-		formalTypeIndex = type.formalTypeIndex;
-	}
-
-	__inline int GetBasicType() const
-	{
-		return basicType;
-	}
-	LONG_PTR GetIndex() const
-	{
-		return index;
-	}
-	const CClass &GetClass() const;
-
-	void SetBasicType( int basicType ){
-		this->basicType = basicType;
-	}
-	void SetIndex( LONG_PTR index ){
-		this->index = index;
-	}
-	void SetClassPtr( const CClass *pClass )
-	{
-		int naturalBasicType = NATURAL_TYPE( basicType );
-		if( !HasMember() )
-		{
-			Jenga::Throw( "クラスまたは構造体でない型に対してSetClassPtrを呼び出した" );
-		}
-		this->pClass = pClass;
-	}
-	void SetNull(){
-		SetBasicType( DEF_NON );
-		SetIndex( -1 );
-	}
-	void SetType( int basicType, LONG_PTR index ){
-		SetBasicType( basicType );
-		SetIndex( index );
-	}
-	void SetType( int basicType, const CClass *pClass ){
-		SetBasicType( basicType );
-		this->pClass = pClass;
-	}
-	void SetActualGenericTypes( const GenericTypes &genericTypes )
-	{
-		this->actualGenericTypes = genericTypes;
-	}
-
-	int PtrLevel() const
-	{
-		return PTR_LEVEL( basicType );
-	}
-	void PtrLevelUp(){
-		PTR_LEVEL_UP( basicType );
-	}
-	void PtrLevelDown(){
-		PTR_LEVEL_DOWN( basicType );
-	}
-
-	bool Equals( const Type &type ) const;
-	bool IsCovariant( const Type &type ) const;
-	bool IsContravariant( const Type &type ) const;
-
-	int GetBasicSize() const;
-	int GetSize() const;
-
-	bool IsNull() const;
-
-	bool IsByte() const;
-	bool IsSByte() const;
-	bool IsWord() const;
-	bool IsInteger() const;
-	bool IsDWord() const;
-	bool IsLong() const;
-	bool IsQWord() const;
-	bool IsInt64() const;
-	bool IsSingle() const;
-	bool IsDouble() const;
-	bool IsBoolean() const;
-
-	static bool IsPointer( int basicType );
-	bool IsPointer() const;
-	bool IsSigned() const;
-	bool IsNaturalWhole() const;
-	bool IsWhole() const;
-	bool IsReal() const;
-	bool Is64() const;
-	bool IsProcPtr() const;
-	bool IsStruct() const;
-	bool IsStructPtr() const;
-	bool IsObject() const;
-	bool IsObjectPtr() const;
-	bool IsTypeParameter() const;
-	bool IsObjectClass() const;
-	bool IsStringClass() const;
-	bool IsVoidPtr() const;
-	bool IsAny() const;
-	bool IsDelegate() const;
-	bool IsInterface() const;
-	bool IsComInterface() const;
-
-	// オブジェクトや構造体など、メンバを持つ型かどうかを判別する
-	bool HasMember() const;
-
-	// 型パラメータの名前を取得
-	const std::string &GetFormalTypeName() const
-	{
-		if( !IsTypeParameter() )
-		{
-			Jenga::Throw( "型パラメータでない型に対してGetFormalTypeNameメソッドが呼ばれた" );
-		}
-		return formalTypeName;
-	}
-	void SetFormalTypeName( const std::string &formalTypeName )
-	{
-		if( !IsTypeParameter() )
-		{
-			Jenga::Throw( "型パラメータでない型に対してSetFormalTypeNameメソッドが呼ばれた" );
-		}
-		this->formalTypeName = formalTypeName;
-	}
-	int GetFormalTypeIndex() const
-	{
-		if( !IsTypeParameter() )
-		{
-			Jenga::Throw( "型パラメータでない型に対してGetFormalTypeIndexメソッドが呼ばれた" );
-		}
-		return formalTypeIndex;
-	}
-	void SetFormalTypeIndex( int formalTypeIndex )
-	{
-		if( !IsTypeParameter() )
-		{
-			Jenga::Throw( "型パラメータでない型に対してSetFormalTypeIndexメソッドが呼ばれた" );
-		}
-		this->formalTypeIndex = formalTypeIndex;
-	}
-
-	// 未完成
-	const Type &GetActualGenericType( int index ) const;
-	bool HasActualGenericType() const;
-
-	//型名を取得
-	std::string ToString() const;
-
-
-private:
-	static const int basicTypeList[];
-	static const std::string basicTypeNameList[];
-public:
-	static bool StringToBasicType( const std::string &typeName, int &basicType );
-	static const char *Type::BasicTypeToCharPtr( const Type &type );
-	static int GetBasicTypeFromSimpleName( const char *variable );
-};
-typedef std::vector<Type> Types;
-
-/*!
-@brief	ジェネリックな型を解決する
-@param	typeParameter ジェネリック型を指定する。ここに解決後の型が入る。
-		classType インスタンス化されているオブジェクトの型
-		pUserProc 現在コンパイル中の関数（ただしクラスメソッドのみ）
-*/
-void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc = NULL );
-
-class GenericType
-{
-	std::string name;
-	Type type;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - GenericType" );
-
-		ar & BOOST_SERIALIZATION_NVP( name );
-		ar & BOOST_SERIALIZATION_NVP( type );
-	}
-
-public:
-	GenericType( const std::string &name, const Type &type )
-		: name( name )
-		, type( type )
-	{
-	}
-	GenericType()
-	{
-	}
-	~GenericType()
-	{
-	}
-
-	const std::string &GetName() const
-	{
-		return name;
-	}
-	const Type &GetType() const
-	{
-		return type;
-	}
-};
-
-class BlittableType
-{
-	Type basicType;
-	CClass *pClass;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - BlittableType" );
-
-		ar & BOOST_SERIALIZATION_NVP( basicType );
-		ar & BOOST_SERIALIZATION_NVP( pClass );
-	}
-
-public:
-	bool isTargetObjectModule;
-	BlittableType( const Type &basicType, CClass *pClass )
-		: basicType( basicType )
-		, pClass( pClass )
-		, isTargetObjectModule( true )
-	{
-	}
-	BlittableType()
-		: isTargetObjectModule( true )
-	{
-	}
-	const Type &GetBasicType() const
-	{
-		return basicType;
-	}
-	const CClass *GetClassPtr() const
-	{
-		return pClass;
-	}
-	const std::string GetCreateStaticMethodFullName() const;
-};
-class BlittableTypes : public std::vector<BlittableType>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - BlittableTypes" );
-
-		ar & boost::serialization::make_nvp("vector_BlittableType",
-			boost::serialization::base_object<std::vector<BlittableType>>(*this));
-	}
-
-public:
-	bool IsExist( Type type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return true;
-			}
-		}
-		return false;
-	}
-	const BlittableType &Find( const Type &type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return blittableType;
-			}
-		}
-		Jenga::Throw( "Blittable型ではない" );
-
-		static BlittableType dummy;
-		return dummy;
-	}
-	const CClass *GetClassPtr( const Type &type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return blittableType.GetClassPtr();
-			}
-		}
-		return NULL;
-	}
-	const CClass &GetClass( const Type &type ) const
-	{
-		return *GetClassPtr( type );
-	}
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/TypeDef.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/TypeDef.h	(revision 602)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#pragma once
-
-class TypeDefCollection;
-
-class TypeDef : public Symbol
-{
-	friend TypeDefCollection;
-
-	std::string baseName;
-	Type baseType;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - TypeDef" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
-		ar & BOOST_SERIALIZATION_NVP( baseName );
-		ar & BOOST_SERIALIZATION_NVP( baseType );
-	}
-
-public:
-	TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType );
-	TypeDef()
-	{
-	}
-	~TypeDef()
-	{
-	}
-
-	const std::string &GetBaseName() const
-	{
-		return baseName;
-	}
-	const Type &GetBaseType() const
-	{
-		return baseType;
-	}
-};
-
-class TypeDefCollection : public std::vector<TypeDef>
-{
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - TypeDefCollection" );
-
-		ar & boost::serialization::make_nvp("vector_TypeDef",
-			boost::serialization::base_object<std::vector<TypeDef>>(*this));
-	}
-
-public:
-	TypeDefCollection();
-	~TypeDefCollection();
-
-	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine );
-	int GetIndex( const Symbol &symbol ) const;
-};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h	(revision 602)
+++ 	(revision )
@@ -1,254 +1,0 @@
-#pragma once
-
-class Variable : public Symbol
-{
-	Type type;
-	bool isConst;
-	bool isRef;
-	bool isArray;
-	Subscripts subscripts;
-
-	bool isParameter;
-	bool hasInitData;
-
-	//コンストラクタ用パラメータ
-	std::string paramStrForConstructor;
-
-
-	/* --- オフセット ---
-		※グローバル変数で初期バッファがない場合は最上位ビットに1がセットされ、
-		初期バッファの有無が識別される。
-		（その後、スケジュール実行により、実際の配置に並び替えられる）*/
-	int offset;
-
-
-	//レキシカルスコープ用
-	int scopeStartAddress;
-	int scopeEndAddress;
-	int scopeLevel;
-
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Variable" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
-		ar & BOOST_SERIALIZATION_NVP( type );
-		ar & BOOST_SERIALIZATION_NVP( isConst );
-		ar & BOOST_SERIALIZATION_NVP( isRef );
-		ar & BOOST_SERIALIZATION_NVP( isArray );
-		ar & BOOST_SERIALIZATION_NVP( subscripts );
-		ar & BOOST_SERIALIZATION_NVP( isParameter );
-		ar & BOOST_SERIALIZATION_NVP( hasInitData );
-		ar & BOOST_SERIALIZATION_NVP( paramStrForConstructor );
-		ar & BOOST_SERIALIZATION_NVP( offset );
-		ar & BOOST_SERIALIZATION_NVP( scopeStartAddress );
-		ar & BOOST_SERIALIZATION_NVP( scopeEndAddress );
-		ar & BOOST_SERIALIZATION_NVP( scopeLevel );
-	}
-
-public:
-	Variable( const Symbol &symbol, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData );
-	Variable( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData );
-	Variable( const Variable &var );
-	Variable();
-
-	void SetArray( const Subscripts &subscripts ){
-		isArray = true;
-		this->subscripts = subscripts;
-	}
-
-	const Type &GetType() const
-	{
-		return type;
-	}
-	void ConstOff(){
-		isConst = false;
-	}
-	void ConstOn(){
-		isConst = true;
-	}
-	bool IsConst() const
-	{
-		return isConst;
-	}
-	bool IsRef() const
-	{
-		return isRef;
-	}
-	bool IsArray()const
-	{
-		return isArray;
-	}
-	const Subscripts &GetSubscripts() const
-	{
-		return subscripts;
-	}
-
-	void ThisIsParameter(){
-		isParameter = true;
-	}
-	bool IsParameter() const
-	{
-		return isParameter;
-	}
-	bool HasInitData() const
-	{
-		return hasInitData;
-	}
-
-
-	int GetMemorySize() const
-	{
-		if( isRef || isParameter ){
-			return PTR_SIZE;
-		}
-
-		int size = type.GetSize();
-
-		if( isArray ){
-			int num = 1;
-			for( int i=0; i<(int)subscripts.size(); i++){
-				num *= subscripts[i]+1;
-			}
-			size *= num;
-		}
-
-		if( size % PTR_SIZE ){
-			size += PTR_SIZE-(size%PTR_SIZE);
-		}
-
-		return size;
-	}
-
-	int GetOffsetAddress() const
-	{
-		return offset;
-	}
-	void SetOffsetAddress( int offset )
-	{
-		this->offset = offset;
-	}
-
-	const std::string &GetParamStrForConstructor() const
-	{
-		return paramStrForConstructor;
-	}
-
-	//レキシカルスコープ用
-	int GetScopeStartAddress() const
-	{
-		return scopeStartAddress;
-	}
-	void SetScopeStartAddress( int scopeStartAddress )
-	{
-		this->scopeStartAddress = scopeStartAddress;
-	}
-	int GetScopeEndAddress() const
-	{
-		return scopeEndAddress;
-	}
-	void SetScopeEndAddress( int scopeEndAddress )
-	{
-		this->scopeEndAddress = scopeEndAddress;
-	}
-	int GetScopeLevel() const
-	{
-		return scopeLevel;
-	}
-	void SetScopeLevel( int scopeLevel )
-	{
-		this->scopeLevel = scopeLevel;
-	}
-
-
-	bool isLiving;
-	int source_code_address;
-
-
-	static int GetSubScriptCounts( const Subscripts &subscripts ){
-		// 配列の要素数を取得
-		int i,i2;
-		for(i=0,i2=1;i<(int)subscripts.size();i++){
-			i2 *= subscripts[i]+1;
-		}
-		return i2;
-	}
-};
-
-class Variables : public std::vector<Variable *>
-{
-protected:
-	int allSize;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - Variables" );
-
-		ar & boost::serialization::make_nvp("vector_Variable", boost::serialization::base_object<vector<Variable *>>(*this));
-	}
-
-public:
-	Variables()
-		: allSize( 0 )
-	{
-	}
-	~Variables(){
-		Clear();
-	}
-
-	void Clear(){
-		for( int i=0; i<(int)this->size(); i++ ){
-			delete (*this)[i];
-		}
-
-		allSize = 0;
-		clear();
-	}
-	void PullOutAll()
-	{
-		clear();
-	}
-
-	int GetAllSize() const
-	{
-		return allSize;
-	}
-
-	bool DuplicateCheck( const Symbol &symbol, int nowScopeLevel ) const;
-
-	const Variable *BackSearch( const Symbol &symbol, int nowScopeLevel ) const;
-	const Variable *Find( const Symbol &symbol )const;
-};
-
-class GlobalVars : public Variables
-{
-public:
-	Jenga::Common::Binary initAreaBuffer;
-
-	// XMLシリアライズ用
-private:
-	friend class boost::serialization::access;
-	template<class Archive> void serialize(Archive& ar, const unsigned int version)
-	{
-		trace_for_serialize( "serializing - GlobalVars" );
-
-		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Variables );
-		ar & BOOST_SERIALIZATION_NVP( initAreaBuffer );
-	}
-public:
-	GlobalVars()
-	{
-	}
-	~GlobalVars()
-	{
-	}
-
-	void Add( Variable *pVar, bool isResetOffsetAddress = true );
-};
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 );
-}
Index: trunk/ab5.0/abdev/ab_common/ab_common.vcproj
===================================================================
--- trunk/ab5.0/abdev/ab_common/ab_common.vcproj	(revision 602)
+++ trunk/ab5.0/abdev/ab_common/ab_common.vcproj	(revision 603)
@@ -104,4 +104,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
@@ -228,4 +231,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
@@ -317,4 +323,32 @@
 				>
 				<File
+					RelativePath=".\src\Lexical\Class.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Const.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\DataTable.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Delegate.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Interface.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Meta.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Method.cpp"
+					>
+				</File>
+				<File
 					RelativePath=".\src\Lexical\Namespace.cpp"
 					>
@@ -325,5 +359,70 @@
 				</File>
 				<File
+					RelativePath=".\src\Lexical\NativeCode.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\ObjectModule.cpp"
+					>
+					<FileConfiguration
+						Name="Debug(x86)|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release(x86)|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug(x64)|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalOptions="/bigobj"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release(x64)|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Parameter.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Procedure.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Source.cpp"
+					>
+				</File>
+				<File
 					RelativePath=".\src\Lexical\Symbol.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Type.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\TypeDef.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\Lexical\Variable.cpp"
 					>
 				</File>
@@ -355,8 +454,40 @@
 				>
 				<File
+					RelativePath=".\include\Lexical\Class.h"
+					>
+				</File>
+				<File
 					RelativePath=".\include\Lexical\CompilerErrorException.h"
 					>
 				</File>
 				<File
+					RelativePath=".\include\Lexical\Const.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\DataTable.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Delegate.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Interface.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Member.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Meta.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Method.h"
+					>
+				</File>
+				<File
 					RelativePath=".\include\Lexical\Namespace.h"
 					>
@@ -367,13 +498,45 @@
 				</File>
 				<File
+					RelativePath=".\include\Lexical\NativeCode.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\ObjectModule.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Parameter.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Procedure.h"
+					>
+				</File>
+				<File
 					RelativePath=".\include\Lexical\Prototype.h"
 					>
 				</File>
 				<File
+					RelativePath=".\include\Lexical\Source.h"
+					>
+				</File>
+				<File
 					RelativePath=".\include\Lexical\Symbol.h"
 					>
 				</File>
 				<File
+					RelativePath=".\include\Lexical\Type.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\TypeDef.h"
+					>
+				</File>
+				<File
 					RelativePath=".\include\Lexical\TypeMisc.h"
+					>
+				</File>
+				<File
+					RelativePath=".\include\Lexical\Variable.h"
 					>
 				</File>
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h	(revision 603)
@@ -0,0 +1,510 @@
+#pragma once
+
+class UserProc;
+class Delegate;
+
+class ClassPrototype : public Prototype, public DynamicMethodsPrototype
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype );
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );
+	}
+
+public:
+	ClassPrototype( const NamespaceScopes &namespaceScopes, const std::string &name )
+		: Prototype( namespaceScopes, name )
+		, DynamicMethodsPrototype()
+	{
+	}
+	ClassPrototype()
+		: Prototype()
+		, DynamicMethodsPrototype()
+	{
+	}
+};
+
+class CClass: public ClassPrototype, public Jenga::Common::ObjectInHashmap<CClass>
+{
+public:
+	// 型の種類
+	enum ClassType{
+		Class,
+		Interface,
+		ComInterface,
+		Enum,
+		Delegate,
+		Structure,
+	};
+
+private:
+	ClassType classType;
+
+	// importされている名前空間
+	NamespaceScopesCollection importedNamespaces;
+
+	// 型パラメータ
+	GenericTypes formalGenericTypes;
+
+	// 基底クラス
+	const CClass *pSuperClass;
+
+	// 基底クラスの型パラメータ（実パラメータ）
+	Types superClassActualTypeParameters;
+
+	// Blittable型情報
+	Type blittableType;
+
+	// 実装するインターフェイス
+	Interfaces interfaces;
+
+	// 動的メンバ
+	Members dynamicMembers;
+
+	// 静的メンバ
+	Members staticMembers;
+
+	// 動的メソッド
+	int ConstructorMemberSubIndex;
+	int DestructorMemberSubIndex;
+	int vtblNum;					// 仮想関数の数
+
+	// 静的メソッド
+	Methods staticMethods;
+
+	//アラインメント値
+	int fixedAlignment;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - CClass" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( ClassPrototype );
+		ar & BOOST_SERIALIZATION_NVP( classType );
+		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
+		ar & BOOST_SERIALIZATION_NVP( formalGenericTypes );
+		ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
+		ar & BOOST_SERIALIZATION_NVP( superClassActualTypeParameters );
+		ar & BOOST_SERIALIZATION_NVP( blittableType );
+		ar & BOOST_SERIALIZATION_NVP( interfaces );
+		ar & BOOST_SERIALIZATION_NVP( dynamicMembers );
+		ar & BOOST_SERIALIZATION_NVP( staticMembers );
+		ar & BOOST_SERIALIZATION_NVP( ConstructorMemberSubIndex );
+		ar & BOOST_SERIALIZATION_NVP( DestructorMemberSubIndex );
+		ar & BOOST_SERIALIZATION_NVP( vtblNum );
+		ar & BOOST_SERIALIZATION_NVP( staticMethods );
+		ar & BOOST_SERIALIZATION_NVP( fixedAlignment );
+	}
+
+	bool isReady;
+public:
+
+	CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name )
+		: ClassPrototype( namespaceScopes, name )
+		, importedNamespaces( importedNamespaces )
+		, classType( Class )
+		, pSuperClass( NULL )
+		, blittableType( Type() )
+		, isReady( false )
+		, fixedAlignment( 0 )
+		, ConstructorMemberSubIndex( -1 )
+		, DestructorMemberSubIndex( -1 )
+		, vtblNum( 0 )
+		, vtbl_offset( -1 )
+		, comVtblOffset( 0 )
+		, isCompilingConstructor( false )
+		, isCompilingDestructor( false )
+		, cacheSize( 0 )
+	{
+	}
+	CClass()
+		: ClassPrototype()
+		, importedNamespaces()
+		, classType()
+		, pSuperClass( NULL )
+		, blittableType( Type() )
+		, isReady( false )
+		, fixedAlignment( 0 )
+		, ConstructorMemberSubIndex( -1 )
+		, DestructorMemberSubIndex( -1 )
+		, vtblNum( 0 )
+		, vtbl_offset( -1 )
+		, comVtblOffset( 0 )
+		, isCompilingConstructor( false )
+		, isCompilingDestructor( false )
+		, cacheSize( 0 )
+	{
+	}
+	~CClass()
+	{
+		// 動的メンバ
+		BOOST_FOREACH( Member *member, dynamicMembers )
+		{
+			delete member;
+		}
+
+		// 静的メンバ
+		BOOST_FOREACH( Member *member, staticMembers )
+		{
+			delete member;
+		}
+
+		// インターフェイス
+		BOOST_FOREACH( ::Interface *pInterface, interfaces )
+		{
+			delete pInterface;
+		}
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+	virtual bool IsDuplication( const CClass *pClass ) const
+	{
+		if( pClass->IsEqualSymbol( *this ) )
+		{
+			return true;
+		}
+		return false;
+	}
+
+	virtual void Using() const;
+
+	void Readed(){
+		isReady = true;
+	}
+	bool IsReady() const{
+		return isReady;
+	}
+
+	const NamespaceScopesCollection &GetImportedNamespaces() const
+	{
+		return importedNamespaces;
+	}
+
+	// 型パラメータ
+	const GenericTypes &GetFormalGenericTypes() const
+	{
+		return formalGenericTypes;
+	}
+	void AddFormalGenericType( GenericType genericType )
+	{
+		this->formalGenericTypes.push_back( genericType );
+	}
+	int GetFormalGenericTypeParameterIndex( const std::string &name ) const
+	{
+		int i = 0;
+		BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
+		{
+			if( genericType.GetName() == name )
+			{
+				return i;
+			}
+			i++;
+		}
+		return -1;
+	}
+	bool IsExistFormalGenericTypeParameter( const std::string &name ) const
+	{
+		BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
+		{
+			if( genericType.GetName() == name )
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+	bool IsGeneric() const
+	{
+		return ( this->formalGenericTypes.size() != 0 );
+	}
+
+	// 継承元クラス
+	bool HasSuperClass() const
+	{
+		return ( pSuperClass != NULL );
+	}
+	const CClass &GetSuperClass() const
+	{
+		return *pSuperClass;
+	}
+	void SetSuperClass( const CClass *pSuperClass )
+	{
+		this->pSuperClass = pSuperClass;
+	}
+	const Types &GetSuperClassActualTypeParameters() const
+	{
+		return superClassActualTypeParameters;
+	}
+	void SetSuperClassActualTypeParameters( const Types &actualTypeParameters )
+	{
+		this->superClassActualTypeParameters = actualTypeParameters;
+	}
+
+	// Blittable型
+	bool IsBlittableType() const
+	{
+		return !blittableType.IsNull();
+	}
+	const Type &GetBlittableType() const
+	{
+		return blittableType;
+	}
+	void SetBlittableType( const Type &type ){
+		blittableType = type;
+	}
+
+	bool IsClass() const;
+	bool IsInterface() const;
+	bool IsComInterface() const;
+	bool IsEnum() const;
+	bool IsDelegate() const;
+	bool IsStructure() const;
+	void SetClassType( ClassType classType )
+	{
+		this->classType = classType;
+	}
+
+
+	//コンストラクタをコンパイルしているかどうかのチェックフラグ
+private:
+	mutable bool isCompilingConstructor;
+public:
+	void NotifyStartConstructorCompile() const;
+	void NotifyFinishConstructorCompile() const;
+	bool IsCompilingConstructor() const;
+
+	//デストラクタをコンパイルしているかどうかのチェックフラグ
+private:
+	mutable bool isCompilingDestructor;
+public:
+	void NotifyStartDestructorCompile() const;
+	void NotifyFinishDestructorCompile() const;
+	bool IsCompilingDestructor() const;
+
+
+	//自身の派生クラスかどうかを確認
+	bool IsSubClass( const CClass *pClass ) const;
+
+	//自身と等しいまたは派生クラスかどうかを確認
+	bool IsEqualsOrSubClass( const CClass *pClass ) const;
+
+	// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
+	bool IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const;
+
+	// インターフェイス
+	bool HasInterfaces() const
+	{
+		return ( interfaces.size() != 0 );
+	}
+	void AddInterface( ::Interface *pInterface )
+	{
+		interfaces.push_back( pInterface );
+	}
+	const Interfaces &GetInterfaces() const
+	{
+		return interfaces;
+	}
+	bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
+
+	// クラス継承
+	bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine );
+
+	//メンバ、メソッドの追加
+	void AddDynamicMember( Member *pMember );
+	void AddStaticMember( Member *pMember );
+
+	//重複チェック
+	bool DupliCheckAll(const char *name) const;
+	bool DupliCheckMember(const char *name) const;
+
+	const Members &GetDynamicMembers() const
+	{
+		return dynamicMembers;
+	}
+	const Members &GetStaticMembers() const
+	{
+		return staticMembers;
+	}
+	Members &GetDynamicMembers()
+	{
+		return dynamicMembers;
+	}
+	Members &GetStaticMembers()
+	{
+		return staticMembers;
+	}
+	
+	const Member *FindDynamicMember( const char *memberName ) const;
+	bool HasDynamicMember( const char *memberName ) const
+	{
+		return ( FindDynamicMember( memberName ) != NULL );
+	}
+
+	void EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const;
+	const CMethod *GetDynamicMethodOrInterfaceMethod( const UserProc *pUserProc ) const;
+
+	const Methods &GetStaticMethods() const
+	{
+		return staticMethods;
+	}
+	Methods &GetStaticMethods()
+	{
+		return staticMethods;
+	}
+
+	//デフォルト コンストラクタ
+	const CMethod *GetConstructorMethod() const
+	{
+		if( ConstructorMemberSubIndex == -1 ) return NULL;
+		return GetDynamicMethods()[ConstructorMemberSubIndex];
+	}
+	void SetConstructorMemberSubIndex( int constructorMemberSubIndex )
+	{
+		this->ConstructorMemberSubIndex = constructorMemberSubIndex;
+	}
+
+	//デストラクタ メソッドを取得
+	const CMethod *GetDestructorMethod() const
+	{
+		if( DestructorMemberSubIndex == -1 ) return NULL;
+		return GetDynamicMethods()[DestructorMemberSubIndex];
+	}
+	void SetDestructorMemberSubIndex( int destructorMemberSubIndex )
+	{
+		this->DestructorMemberSubIndex = destructorMemberSubIndex;
+	}
+
+	// ユーザ指定のアラインメント固定値
+	int GetFixedAlignment() const
+	{
+		return fixedAlignment;
+	}
+	void SetFixedAlignment( int fixedAlignment )
+	{
+		this->fixedAlignment = fixedAlignment;
+	}
+
+	// メンバの総合サイズを取得
+private:
+	int cacheSize;
+public:
+	int GetSize() const;
+
+	// メンバのオフセットを取得
+	int GetMemberOffset( const char *memberName ) const;
+private:
+	// アラインメント値を取得
+	int GetAlignment() const;
+
+
+	/////////////////////////////////////////////////////////////////
+	// vtbl
+	/////////////////////////////////////////////////////////////////
+public:
+	// vtblに存在する仮想関数の数
+	int GetVtblNum() const
+	{
+		return vtblNum;
+	}
+	void SetVtblNum( int vtblNum )
+	{
+		this->vtblNum = vtblNum;
+	}
+	void AddVtblNum( int vtblNum )
+	{
+		this->vtblNum += vtblNum;
+	}
+	bool IsExistVirtualFunctions() const
+	{
+		// 構造体以外は仮想関数を持つ
+		return !IsStructure();
+	}
+	
+private:
+	int vtbl_offset;
+	int comVtblOffset;
+	int vtblMasterListOffset;
+public:
+	std::vector<long> vtblMasterList;
+	int GetVtblOffset() const
+	{
+		return vtbl_offset;
+	}
+	void SetVtblOffset( int vtblOffset )
+	{
+		this->vtbl_offset = vtblOffset;
+	}
+	int GetComVtblOffset() const
+	{
+		return comVtblOffset;
+	}
+	void SetComVtblOffset( int comVtblOffset )
+	{
+		this->comVtblOffset = comVtblOffset;
+	}
+	void GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const;
+	int GetVtblMasterListIndex( const CClass *pClass ) const;
+	long GetVtblMasterListOffset() const;
+	void SetVtblMasterListOffset( int vtblMasterListOffset )
+	{
+		this->vtblMasterListOffset = vtblMasterListOffset;
+	}
+	bool IsAbstract() const;
+
+
+	// TypeInfo用
+	mutable int typeInfoDataTableOffset;
+	void SetTypeInfoDataTableOffset( int typeInfoDataTableOffset ) const
+	{
+		this->typeInfoDataTableOffset = typeInfoDataTableOffset;
+	}
+	int GetTypeInfoDataTableOffset() const
+	{
+		return typeInfoDataTableOffset;
+	}
+
+	// 動的型データ用のメンバデータを取得
+	std::string GetStaticDefiningStringAsMemberNames() const;
+	std::string GetStaticDefiningStringAsMemberOffsets() const;
+	void GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset = 0 ) const;
+};
+
+class Classes : public Jenga::Common::Hashmap<CClass>
+{
+	// XMLシリアライズ用
+public:
+	Classes()
+		: pStringClass( NULL )
+		, pObjectClass( NULL )
+		, pInterfaceInfo( NULL )
+	{
+	}
+	~Classes()
+	{
+	}
+
+	bool Insert( CClass *pClass, int nowLine );
+	CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
+
+	const CClass *FindEx( const Symbol &symbol ) const;
+
+
+	/////////////////////////////
+	// 特殊クラス
+	/////////////////////////////
+	mutable const CClass *pStringClass;
+	mutable const CClass *pObjectClass;
+	mutable const CClass *pInterfaceInfo;
+	const CClass *GetStringClassPtr() const;
+	const CClass *GetObjectClassPtr() const;
+	const CClass *GetInterfaceInfoClassPtr() const;
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h	(revision 603)
@@ -0,0 +1,146 @@
+#pragma once
+
+//定数
+class CConst : public Symbol, public Jenga::Common::ObjectInHashmap<CConst>
+{
+	Type type;
+	_int64 i64data;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - CConst" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
+		ar & BOOST_SERIALIZATION_NVP( type );
+		ar & BOOST_SERIALIZATION_NVP( i64data );
+	}
+
+public:
+	CConst( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &newType, _int64 i64data)
+		: Symbol( namespaceScopes, name )
+		, type( newType )
+		, i64data( i64data )
+	{
+	}
+	CConst( const NamespaceScopes &namespaceScopes, const std::string &name, int value)
+		: Symbol( namespaceScopes, name )
+		, type( Type(DEF_LONG) )
+		, i64data( value )
+	{
+	}
+	CConst()
+	{
+	}
+	~CConst()
+	{
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+
+	Type GetType()
+	{
+		return type;
+	}
+	_int64 GetWholeData()
+	{
+		return i64data;
+	}
+	double GetDoubleData();
+};
+class Consts : public Jenga::Common::Hashmap<CConst>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Consts" );
+
+		ar & boost::serialization::make_nvp("Hashmap_CConst",
+			boost::serialization::base_object<Jenga::Common::Hashmap<CConst>>(*this));
+	}
+
+public:
+
+	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type );
+	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, int value);
+
+private:
+	CConst *GetObjectPtr( const Symbol &symbol );
+public:
+
+	int GetBasicType( const Symbol &symbol );
+	_int64 GetWholeData( const Symbol &symbol );
+	double GetDoubleData( const Symbol &symbol );
+	bool IsStringPtr( const Symbol &symbol, bool isUnicode );
+};
+
+//定数マクロ
+class ConstMacro : public Symbol, public Jenga::Common::ObjectInHashmap<ConstMacro>
+{
+	std::vector<std::string> parameters;
+	std::string expression;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - ConstMacro" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
+		ar & BOOST_SERIALIZATION_NVP( parameters );
+		ar & BOOST_SERIALIZATION_NVP( expression );
+	}
+
+public:
+	ConstMacro( const NamespaceScopes &namespaceScopes, const std::string &name, const std::vector<std::string> &parameters, const std::string &expression )
+		: Symbol( namespaceScopes, name )
+		, parameters( parameters )
+		, expression( expression )
+	{
+	}
+	ConstMacro()
+	{
+	}
+	~ConstMacro()
+	{
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+
+	const std::vector<std::string> &GetParameters() const
+	{
+		return parameters;
+	}
+	const std::string &GetExpression() const
+	{
+		return expression;
+	}
+};
+class ConstMacros : public Jenga::Common::Hashmap<ConstMacro>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - ConstMacros" );
+
+		ar & boost::serialization::make_nvp("Hashmap_ConstMacro",
+			boost::serialization::base_object<Jenga::Common::Hashmap<ConstMacro>>(*this));
+	}
+
+public:
+	bool Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr );
+	ConstMacro *Find( const Symbol &name );
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/DataTable.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/DataTable.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/DataTable.h	(revision 603)
@@ -0,0 +1,151 @@
+#pragma once
+
+//DataTable.cpp
+class DataTable
+{
+	char *buffer;
+	int size;
+
+public:
+	// リンカで解決しなければならないスケジュール
+	Schedules schedules;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	BOOST_SERIALIZATION_SPLIT_MEMBER();
+	template<class Archive> void load(Archive& ar, const unsigned int version)
+	{
+		std::string _buffer;
+		ar & BOOST_SERIALIZATION_NVP( _buffer );
+		ar & BOOST_SERIALIZATION_NVP( size );
+		ar & BOOST_SERIALIZATION_NVP( schedules );
+
+		// 読み込み後の処理
+		Realloc( size );
+		for( int i=0; i<size; i++ )
+		{
+			ULONG_PTR l1 = ( ( _buffer[i*3] >= 'a' ) ? ( _buffer[i*3] - 'a' + 0x0a ) : ( _buffer[i*3] - '0' ) ) * 0x10;
+			ULONG_PTR l2 = ( _buffer[i*3+1] >= 'a' ) ? ( _buffer[i*3+1] - 'a' + 0x0a ) : ( _buffer[i*3+1] - '0' );
+			ULONG_PTR l = l1 + l2;
+			buffer[i] = static_cast<char>(l);
+		}
+	}
+	template<class Archive> void save(Archive& ar, const unsigned int version) const
+	{
+		// 保存準備
+		char *tempCode = (char *)calloc( (size+1) * 3, 1 );
+		for( int i=0; i<size; i++ )
+		{
+			char temp[32];
+			sprintf( temp, "%02x,", (unsigned char)buffer[i] );
+			tempCode[i*3] = temp[0];
+			tempCode[i*3+1] = temp[1];
+			tempCode[i*3+2] = temp[2];
+		}
+
+		std::string _buffer = tempCode;
+		free( tempCode );
+
+		ar & BOOST_SERIALIZATION_NVP( _buffer );
+		ar & BOOST_SERIALIZATION_NVP( size );
+		ar & BOOST_SERIALIZATION_NVP( schedules );
+	}
+
+
+	void Realloc( int size )
+	{
+		this->buffer = (char *)realloc( this->buffer, size + 100 );
+		this->size = size;
+	}
+
+public:
+	DataTable()
+		: buffer( (char *)malloc(100) )
+		, size( 0 )
+	{
+		lstrcpy( buffer, "initialized!!!" );
+	}
+	DataTable( const DataTable &dataTable )
+		: buffer( (char *)malloc(100) )
+		, size( 0 )
+	{
+		lstrcpy( buffer, "initialized!!!" );
+		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
+	}
+	~DataTable()
+	{
+		free( buffer );
+	}
+	void Clear()
+	{
+		size = 0;
+	}
+
+	void operator = ( const DataTable &dataTable )
+	{
+		Clear();
+		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
+	}
+
+	int AddBinary( const void *buffer, int size );
+	int Add( _int64 i64data );
+	int Add( int i32data );
+	int Add( double dbl );
+	int Add( float flt );
+	int AddString( const char *str );
+	int AddString( const std::string &str );
+	int AddWString( const std::wstring &wstr );
+	void Add( const DataTable &dataTable )
+	{
+		long baseOffset = GetSize();
+
+		AddBinary( dataTable.GetPtr(), dataTable.GetSize() );
+
+		// スケジュールを追加
+		BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )
+		{
+			this->schedules.push_back(
+				Schedule(
+					schedule.GetType(),
+					baseOffset + schedule.GetOffset(),
+					schedule.GetLongPtrValue()
+				)
+			);
+		}
+	}
+	int AddSpace( int size );
+	void AddAlignment( int size );
+
+	const void *GetPtr() const
+	{
+		return buffer;
+	}
+	int GetSize() const
+	{
+		return size;
+	}
+
+	long GetLong( int pos ) const
+	{
+		return *(long *)( buffer + pos );
+	}
+	_int64 GetInt64( int pos ) const
+	{
+		return *(_int64 *)( buffer + pos );
+	}
+	void Overwrite( int pos, long newLongValue )
+	{
+		*(long *)( buffer + pos ) = newLongValue;
+	}
+	void OverwriteInt64( int pos, _int64 new64Value )
+	{
+		*(_int64 *)( buffer + pos ) = new64Value;
+	}
+	void OverwriteBinary( int pos, const void *ptr, int size )
+	{
+		memcpy( buffer + pos, ptr, size );
+	}
+
+	void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h	(revision 603)
@@ -0,0 +1,84 @@
+#pragma once
+
+class Delegate
+	: public Procedure
+	, public Jenga::Common::ObjectInHashmap<Delegate>
+{
+	// importされている名前空間
+	NamespaceScopesCollection importedNamespaces;
+
+	std::string paramStr;
+	std::string returnTypeName;
+	int sourceIndex;
+
+	Parameters dynamicParams;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Delegate" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
+		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
+		ar & BOOST_SERIALIZATION_NVP( dynamicParams );
+	}
+
+public:
+	Delegate( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Procedure::Kind procKind, const char *paramStr, const std::string &returnTypeName, int sourceIndex )
+		: Procedure( namespaceScopes, name, procKind, false )
+		, importedNamespaces( importedNamespaces )
+		, paramStr( paramStr )
+		, returnTypeName( returnTypeName )
+		, sourceIndex( sourceIndex )
+	{
+	}
+	Delegate()
+	{
+	}
+
+	const NamespaceScopesCollection &GetImportedNamespaces() const
+	{
+		return importedNamespaces;
+	}
+
+	const std::string &GetParamStr() const
+	{
+		return paramStr;
+	}
+	const std::string &GetReturnTypeName() const
+	{
+		return returnTypeName;
+	}
+	void SetReturnType( const Type &returnType )
+	{
+		this->returnType = returnType;
+	}
+
+	int GetSourceIndex() const
+	{
+		return sourceIndex;
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+
+	const Parameters &GetDynamicParams() const
+	{
+		return dynamicParams;
+	}
+	Parameters &GetDynamicParams()
+	{
+		return dynamicParams;
+	}
+
+	/*!
+	@brief	オーバーライド用にデリゲート同士が等しいかどうかをチェックする
+	@param	dgt 照らし合わせるデリゲート
+	*/
+	bool IsSimilar( const Delegate &dgt ) const;
+};
+typedef Jenga::Common::Hashmap<Delegate> Delegates;
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h	(revision 603)
@@ -0,0 +1,93 @@
+#pragma once
+
+class CClass;
+
+class DynamicMethodsPrototype
+{
+	// 動的メソッド
+	Methods dynamicMethods;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		ar & BOOST_SERIALIZATION_NVP( dynamicMethods );
+	}
+
+public:
+	DynamicMethodsPrototype(){}
+	DynamicMethodsPrototype( const DynamicMethodsPrototype &dynamicMethodsPrototype )
+		: dynamicMethods( dynamicMethodsPrototype.dynamicMethods )
+	{
+	}
+	~DynamicMethodsPrototype(){}
+
+	const Methods &GetDynamicMethods() const
+	{
+		return dynamicMethods;
+	}
+	Methods &GetDynamicMethods()
+	{
+		return dynamicMethods;
+	}
+
+	void AddDynamicMethods( CMethod *pMethod )
+	{
+		dynamicMethods.push_back( pMethod );
+	}
+};
+
+class Interface : public DynamicMethodsPrototype
+{
+	const CClass *pInterfaceClass;
+	mutable int vtblOffset;
+
+	// 型パラメータ（実パラメータ）
+	Types actualTypeParameters;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Interface" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );
+		ar & boost::serialization::make_nvp("pInterfaceClass", const_cast<CClass *&>(pInterfaceClass) );
+		ar & BOOST_SERIALIZATION_NVP( vtblOffset );
+		ar & BOOST_SERIALIZATION_NVP( actualTypeParameters );
+	}
+
+public:
+	Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters );
+	Interface( const Interface &objInterface )
+		: DynamicMethodsPrototype( objInterface )
+		, pInterfaceClass( objInterface.pInterfaceClass )
+		, vtblOffset( objInterface.vtblOffset )
+	{
+	}
+	Interface()
+	{
+	}
+
+	const CClass &GetClass() const{
+		return *pInterfaceClass;
+	}
+	int GetVtblOffset() const
+	{
+		return vtblOffset;
+	}
+	void SetVtblOffset( int vtblOffset ) const
+	{
+		this->vtblOffset = vtblOffset;
+	}
+
+	const Types &GetActualTypeParameters() const
+	{
+		return actualTypeParameters;
+	}
+
+	std::string GetFullNameWithActualGenericTypeParameters() const;
+};
+typedef std::vector<Interface *> Interfaces;
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h	(revision 603)
@@ -0,0 +1,100 @@
+#pragma once
+
+class CClass;
+
+class Member : public MemberPrototype
+{
+	std::string name;
+	Type type;
+	bool isConst;
+	Subscripts subscripts;
+
+	std::string initializeExpression;
+	std::string constructParameter;
+
+	// XMLシリアライズ用
+	// TODO: xml
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Member" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( MemberPrototype );
+		ar & BOOST_SERIALIZATION_NVP( name );
+		ar & BOOST_SERIALIZATION_NVP( type );
+		ar & BOOST_SERIALIZATION_NVP( isConst );
+		ar & BOOST_SERIALIZATION_NVP( subscripts );
+		ar & BOOST_SERIALIZATION_NVP( initializeExpression );
+		ar & BOOST_SERIALIZATION_NVP( constructParameter );
+	}
+
+public:
+
+	int source_code_address;
+
+	const std::string &GetName() const
+	{
+		return name;
+	}
+	void SetName( const std::string &name )
+	{
+		this->name = name;
+	}
+
+	const Type &GetType() const
+	{
+		return type;
+	}
+	void ResetType( const Type &type )
+	{
+		this->type = type;
+	}
+
+	bool IsConst() const
+	{
+		return isConst;
+	}
+
+	const Subscripts &GetSubscripts() const
+	{
+		return subscripts;
+	}
+
+	const std::string &GetInitializeExpression() const
+	{
+		return initializeExpression;
+	}
+	const std::string &GetConstructParameter() const
+	{
+		return constructParameter;
+	}
+
+	Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter )
+		: MemberPrototype( accessibility )
+		, name( name )
+		, type( newType )
+		, isConst( isConst )
+		, subscripts( subscripts )
+		, initializeExpression( initializeExpression )
+		, constructParameter( constructParameter )
+	{
+	}
+	Member::Member(Member &member)
+		: MemberPrototype( member.GetAccessibility() )
+		, name( member.GetName() )
+		, type( member.GetType() )
+		, isConst( member.IsConst() )
+		, subscripts( member.GetSubscripts() )
+	{
+		//ソースコードの位置
+		source_code_address=member.source_code_address;
+	}
+	Member()
+	{
+	}
+	~Member()
+	{
+	}
+};
+typedef std::vector<Member *> Members;
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h	(revision 603)
@@ -0,0 +1,159 @@
+#pragma once
+
+class Meta
+{
+	// 名前空間
+	NamespaceScopesCollection namespaceScopesCollection;
+
+	// 関数・メソッド
+	UserProcs userProcs;
+
+	// DLL関数
+	DllProcs dllProcs;
+
+	// クラス
+	Classes classesImpl;
+
+	// グローバル変数
+	GlobalVars globalVars;
+
+	// グローバル定数
+	Consts globalConsts;
+
+	// グローバル定数マクロ
+	ConstMacros globalConstMacros;
+
+	// blittable型
+	BlittableTypes blittableTypes;
+
+	// TypeDef
+	TypeDefCollection typeDefs;
+
+	// 関数ポインタ
+	ProcPointers procPointers;
+
+	// デリゲート
+	Delegates delegates;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Meta" );
+
+		ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection );
+		ar & BOOST_SERIALIZATION_NVP( userProcs );
+		ar & BOOST_SERIALIZATION_NVP( dllProcs );
+		ar & BOOST_SERIALIZATION_NVP( classesImpl );
+		ar & BOOST_SERIALIZATION_NVP( globalVars );
+		ar & BOOST_SERIALIZATION_NVP( globalConsts );
+		ar & BOOST_SERIALIZATION_NVP( globalConstMacros );
+		ar & BOOST_SERIALIZATION_NVP( blittableTypes );
+		ar & BOOST_SERIALIZATION_NVP( typeDefs );
+		ar & BOOST_SERIALIZATION_NVP( procPointers );
+		ar & BOOST_SERIALIZATION_NVP( delegates );
+	}
+
+	Classes *pNowClassesForDebugger;
+
+public:
+	Meta()
+		: classesImpl()
+		, pNowClassesForDebugger( &classesImpl )
+	{
+	}
+
+	// 初期化
+	void Clear();
+
+	// 静的リンク
+	void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
+
+	const NamespaceScopesCollection &GetNamespaces() const
+	{
+		return namespaceScopesCollection;
+	}
+	NamespaceScopesCollection &GetNamespaces()
+	{
+		return namespaceScopesCollection;
+	}
+
+	const UserProcs &GetUserProcs() const
+	{
+		return userProcs;
+	}
+	UserProcs &GetUserProcs()
+	{
+		return userProcs;
+	}
+
+	const DllProcs &GetDllProcs() const
+	{
+		return dllProcs;
+	}
+	DllProcs &GetDllProcs()
+	{
+		return dllProcs;
+	}
+
+	Classes &GetClasses()
+	{
+		return *pNowClassesForDebugger;
+	}
+	void SetClasses( Classes *pClasses )
+	{
+		this->pNowClassesForDebugger = pClasses;
+	}
+
+	const GlobalVars &GetGlobalVars() const
+	{
+		return globalVars;
+	}
+	GlobalVars &GetGlobalVars()
+	{
+		return globalVars;
+	}
+
+	const Consts &GetGlobalConsts() const
+	{
+		return globalConsts;
+	}
+	Consts &GetGlobalConsts()
+	{
+		return globalConsts;
+	}
+
+	const ConstMacros &GetGlobalConstMacros() const
+	{
+		return globalConstMacros;
+	}
+	ConstMacros &GetGlobalConstMacros()
+	{
+		return globalConstMacros;
+	}
+
+	BlittableTypes &GetBlittableTypes()
+	{
+		return blittableTypes;
+	}
+
+	TypeDefCollection &GetTypeDefs()
+	{
+		return typeDefs;
+	}
+
+	ProcPointers &GetProcPointers()
+	{
+		return procPointers;
+	}
+
+	Delegates &GetDelegates()
+	{
+		return delegates;
+	}
+
+	const ::Delegate &ToDelegate( const CClass &_class );
+
+	const CClass *FindClassSupportedTypeDef( const Symbol &symbol );
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h	(revision 603)
@@ -0,0 +1,275 @@
+#pragma once
+
+class UserProc;
+class CClass;
+
+class CMethod : public MemberPrototype
+{
+	const UserProc *pUserProc;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - CMethod" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( MemberPrototype );
+		ar & boost::serialization::make_nvp("pUserProc", const_cast<UserProc *&>(pUserProc));
+	}
+
+public:
+	CMethod( const UserProc *pUserProc, Prototype::Accessibility accessibility )
+		: MemberPrototype( accessibility )
+		, pUserProc( pUserProc )
+	{
+	}
+	CMethod()
+	{
+	}
+
+	const UserProc &GetUserProc() const
+	{
+		return *pUserProc;
+	}
+	void SetUserProcPtr( const UserProc *pUserProc )
+	{
+		this->pUserProc = pUserProc;
+	}
+
+	virtual bool IsAbstract() const = 0;
+	virtual void SetAbstractMark( bool isAbstractMark ) = 0;
+	virtual bool IsVirtual() const = 0;
+	virtual bool IsConst() const = 0;
+	virtual bool IsDynamic() const = 0;
+	virtual bool IsStatic() const = 0;
+	virtual const CClass *GetInheritsClassPtr() const = 0;
+	virtual void SetInheritsClassPtr( const CClass *pInheritsClass ) = 0;
+	virtual bool IsNotUse() const = 0;
+	virtual void SetNotUseMark( bool isNotUse ) = 0;
+};
+
+class DynamicMethod : public CMethod
+{
+public:
+	struct OverrideResult
+	{
+		enum EnumType
+		{
+			Successful = 0,				// オーバーライドに成功
+			NotVirtual,					// 非Virtualメソッドに対してオーバーライドを行おうとした
+			NotUseOverrideModifier,		// Override修飾子が無い状況で基底クラスの実体メソッドをオーバーライドしようとした
+			DifferentAccesibility,		// オーバーライド元、先のアクセシビリティに相違がある
+		};
+
+		EnumType enumType;
+		const CMethod *pMethod;
+	};
+
+private:
+	bool isAbstract;
+	bool isVirtual;
+	bool isConst;
+	const CClass *pInheritsClass;
+
+	// 他のインターフェイスへ実装が移った場合（基底クラスメソッドのインターフェイス実装）はこのフラグをオンにする
+	bool isNotUse;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - DynamicMethod" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CMethod );
+		ar & BOOST_SERIALIZATION_NVP( isAbstract );
+		ar & BOOST_SERIALIZATION_NVP( isVirtual );
+		ar & BOOST_SERIALIZATION_NVP( isConst );
+		ar & boost::serialization::make_nvp("pInheritsClass", const_cast<CClass *&>(pInheritsClass));
+		ar & BOOST_SERIALIZATION_NVP( isNotUse );
+	}
+
+public:
+	DynamicMethod( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isAbstract, bool isVirtual, bool isConst, const CClass *pInheritsClass = NULL )
+		: CMethod( pUserProc, accessibility )
+		, isAbstract( isAbstract )
+		, isVirtual( isVirtual )
+		, isConst( isConst )
+		, pInheritsClass( pInheritsClass )
+		, isNotUse( false )
+	{
+	}
+	DynamicMethod( const CMethod &method )
+		: CMethod( &method.GetUserProc(), method.GetAccessibility() )
+		, isAbstract( method.IsAbstract() )
+		, isVirtual( method.IsVirtual() )
+		, isConst( method.IsConst() )
+		, pInheritsClass( method.GetInheritsClassPtr() )
+		, isNotUse( false )
+	{
+	}
+	DynamicMethod()
+	{
+	}
+
+	DynamicMethod::OverrideResult::EnumType Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier );
+
+	virtual bool IsAbstract() const
+	{
+		return isAbstract;
+	}
+	virtual void SetAbstractMark( bool isAbstract )
+	{
+		this->isAbstract = isAbstract;
+	}
+	virtual bool IsVirtual() const
+	{
+		return isVirtual;
+	}
+	virtual bool IsConst() const
+	{
+		return isConst;
+	}
+	virtual bool IsDynamic() const
+	{
+		return true;
+	}
+	virtual bool IsStatic() const
+	{
+		return false;
+	}
+	virtual const CClass *GetInheritsClassPtr() const
+	{
+		return pInheritsClass;
+	}
+	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
+	{
+		this->pInheritsClass = pInheritsClass;
+	}
+	virtual bool IsNotUse() const
+	{
+		return isNotUse;
+	}
+	virtual void SetNotUseMark( bool isNotUse )
+	{
+		this->isNotUse = isNotUse;
+	}
+};
+BOOST_CLASS_EXPORT( DynamicMethod );
+class StaticMethod : public CMethod
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - StaticMethod" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CMethod );
+	}
+
+public:
+
+	// コンストラクタ
+	StaticMethod( UserProc *pUserProc, Prototype::Accessibility accessibility )
+		: CMethod( pUserProc, accessibility )
+	{
+	}
+
+	// コピーコンストラクタ
+	StaticMethod( const StaticMethod &staticMethod );
+
+	// デストラクタ
+	StaticMethod()
+	{
+	}
+
+	virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier )
+	{
+		throw;
+	}
+
+	virtual bool IsAbstract() const
+	{
+		throw;
+	}
+	virtual void SetAbstractMark( bool isAbstract )
+	{
+		throw;
+	}
+	virtual bool IsVirtual() const{
+		return false;
+	}
+	virtual bool IsConst() const
+	{
+		throw;
+	}
+	virtual bool IsDynamic() const
+	{
+		return false;
+	}
+	virtual bool IsStatic() const
+	{
+		return true;
+	}
+	virtual const CClass *GetInheritsClassPtr() const
+	{
+		throw;
+	}
+	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
+	{
+		throw;
+	}
+	virtual bool IsNotUse() const
+	{
+		return false;
+	}
+	virtual void SetNotUseMark( bool isNotUse )
+	{
+		throw;
+	}
+};
+BOOST_CLASS_EXPORT( StaticMethod );
+
+class Methods : public std::vector<CMethod *>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Methods" );
+
+		ar & boost::serialization::make_nvp("vector_CMethod", boost::serialization::base_object<vector<CMethod *>>(*this));
+	}
+
+public:
+	// コンストラクタ
+	Methods();
+
+	// コピーコンストラクタ
+	Methods( const Methods &methods );
+
+	// デストラクタ
+	~Methods();
+
+	//メンバ、メソッドの追加
+	void Add( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isConst, bool isAbstract, bool isVirtual );
+	void AddStatic(UserProc *pUserProc,Prototype::Accessibility accessibility);
+
+	/*!
+	@brief	オーバーライドのための検索
+	@param	actualTypeParametersForThisMethods thisオブジェクトで保有するメソッド群を対象とした実型パラメータ
+			pUserProc 照らし合わせる関数
+	*/
+	DynamicMethod *FindForOverride( const Types &actualTypeParametersForThisMethods, const UserProc *pUserProc );
+
+	const CMethod *GetMethodPtr( const UserProc *pUserProc ) const;
+	bool IsExist( const char *name ) const;
+	virtual void Enum( const char *methodName, std::vector<const UserProc *> &subs ) const;
+	virtual void Enum( BYTE idOperatorCalc, std::vector<const UserProc *> &subs ) const;
+
+	// 仮想メソッドの個数を取得
+	int GetVtblNum() const;
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h	(revision 603)
@@ -0,0 +1,262 @@
+#pragma once
+
+class UserProc;
+class DllProc;
+class CClass;
+
+class Schedule
+{
+public:
+	enum Type
+	{
+		None = 10000,
+		GlobalVar,		// グローバル変数スケジュール
+		DataTable,		// データテーブル スケジュール
+		CatchAddress,	// Catchアドレス スケジュール
+		Relocation,		// リロケーション情報スケジュール
+		UserProc,		// ユーザ定義関数呼び出し側スケジュール
+		AddressOf,		// ユーザ定義関数位置スケジュール
+		DllProc,		// DLL関数位置スケジュール
+		ComVtbl,		// com_vtblスケジュール
+		Vtbl,			// vtblスケジュール
+		TypeInfo,		// TypeInfoスケジュール
+	};
+
+private:
+	Type type;
+	long offset;
+
+	union{
+		LONG_PTR lpValue;
+		const ::UserProc *pUserProc;
+		const ::DllProc *pDllProc;
+		const ::CClass *pClass;
+	};
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Schedule" );
+
+		ar & BOOST_SERIALIZATION_NVP( type );
+		ar & BOOST_SERIALIZATION_NVP( offset );
+
+		switch( type )
+		{
+		case UserProc:
+		case AddressOf:
+		case CatchAddress:
+			ar & boost::serialization::make_nvp("pUserProc", const_cast<::UserProc *&>(pUserProc));
+			break;
+		case DllProc:
+			ar & boost::serialization::make_nvp("pDllProc", const_cast<::DllProc *&>(pDllProc));
+			break;
+		case ComVtbl:
+		case Vtbl:
+		case TypeInfo:
+			ar & boost::serialization::make_nvp("pClass", const_cast<::CClass *&>(pClass));
+			break;
+		default:
+			ar & BOOST_SERIALIZATION_NVP( lpValue );
+			break;
+		}
+	}
+
+public:
+	Schedule()
+	{
+	}
+	Schedule( Type type, long offset, LONG_PTR lpValue = 0 )
+		: type( type )
+		, offset( offset )
+		, lpValue( lpValue )
+	{
+	}
+	Schedule( Schedule::Type type, const ::UserProc *pUserProc, long offset )
+		: type( type )
+		, offset( offset )
+		, pUserProc( pUserProc )
+	{
+	}
+	Schedule( const ::DllProc *pDllProc, long offset )
+		: type( Schedule::DllProc )
+		, offset( offset )
+		, pDllProc( pDllProc )
+	{
+	}
+	Schedule( Type type, const ::CClass *pClass, long offset )
+		: type( type )
+		, pClass( pClass )
+		, offset( offset )
+	{
+		if( !( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ) )
+		{
+			DebugBreak();
+		}
+	}
+	~Schedule()
+	{
+	}
+
+	Type GetType() const
+	{
+		return type;
+	}
+	long GetOffset() const
+	{
+		return offset;
+	}
+	LONG_PTR GetLongPtrValue() const
+	{
+		return lpValue;
+	}
+	const ::DllProc &GetDllProc() const;
+	const ::UserProc &GetUserProc() const;
+	const ::CClass &GetClass() const;
+};
+typedef std::vector<Schedule> Schedules;
+
+#define CODETYPE_SYSTEMPROC		0x0001
+#define CODETYPE_DEBUGPROC		0x0002
+class SourceLine
+{
+	int lineNum;
+	long nativeCodePos;
+	int sourceIndex;
+	long sourceCodePos;
+	DWORD codeType;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - SourceLine" );
+
+		ar & BOOST_SERIALIZATION_NVP( lineNum );
+		ar & BOOST_SERIALIZATION_NVP( nativeCodePos );
+		ar & BOOST_SERIALIZATION_NVP( sourceIndex );
+		ar & BOOST_SERIALIZATION_NVP( sourceCodePos );
+		ar & BOOST_SERIALIZATION_NVP( codeType );
+	}
+
+public:
+	SourceLine( int lineNum, int nativeCodePos, int sourceIndex, int sourceCodePos, DWORD codeType )
+		: lineNum( lineNum )
+		, nativeCodePos( nativeCodePos )
+		, sourceIndex( sourceIndex )
+		, sourceCodePos( sourceCodePos )
+		, codeType( codeType )
+	{
+	}
+	SourceLine()
+	{
+	}
+
+	int GetLineNum() const
+	{
+		return lineNum;
+	}
+	long GetNativeCodePos() const
+	{
+		return nativeCodePos;
+	}
+	int GetSourceIndex() const
+	{
+		return sourceIndex;
+	}
+	void SetSourceIndex( int sourceIndex )
+	{
+		this->sourceIndex = sourceIndex;
+	}
+	long GetSourceCodePos() const
+	{
+		return sourceCodePos;
+	}
+	void SetSourceCodePos( int sourceCodePos )
+	{
+		this->sourceCodePos = sourceCodePos;
+	}
+	DWORD GetCodeType() const
+	{
+		return codeType;
+	}
+	bool IsInSystemProc() const
+	{
+		return ( (codeType&CODETYPE_SYSTEMPROC) != 0 );
+	}
+	bool IsInDebugProc() const
+	{
+		return ( (codeType&CODETYPE_DEBUGPROC) != 0 );
+	}
+};
+typedef std::vector<SourceLine> SourceLines;
+
+class NativeCode : public Jenga::Common::Binary
+{
+	// リンカで解決しなければならないスケジュール
+	Schedules schedules;
+
+	// ソースコード行番号とネイティブコード位置の対応情報
+	SourceLines sourceLines;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing(load) - NativeCode" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Jenga::Common::Binary );
+		ar & BOOST_SERIALIZATION_NVP( schedules );
+		ar & BOOST_SERIALIZATION_NVP( sourceLines );
+	}
+
+public:
+	NativeCode()
+		: Jenga::Common::Binary()
+	{
+	}
+	NativeCode( const NativeCode &nativeCode )
+		: Jenga::Common::Binary()
+	{
+		PutEx( nativeCode );
+	}
+	NativeCode( const char *codeBuffer, int size )
+		: Jenga::Common::Binary( codeBuffer, size )
+	{
+	}
+	~NativeCode()
+	{
+	}
+
+	void operator =( const NativeCode &nativeCode )
+	{
+		Clear();
+		PutEx( nativeCode );
+	}
+
+	const Schedules &GetSchedules() const
+	{
+		return schedules;
+	}
+
+	void PutEx( const NativeCode &nativeCode );
+	void PutEx( long l, Schedule::Type scheduleType );
+	void PutUserProcSchedule( const UserProc *pUserProc, bool isCall );
+	void PutCatchAddressSchedule( const UserProc *pUserProc, long codePos );
+	void PutDllProcSchedule( const DllProc *pDllProc );
+	void PutComVtblSchedule( const CClass *pClass );
+	void PutVtblSchedule( const CClass *pClass );
+
+	const SourceLines &GetSourceLines() const
+	{
+		return sourceLines;
+	}
+	void NextSourceLine( int currentSourceIndex, int nowLine );
+
+	void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
+	void ResetSourceIndexes( long sourceIndexBase );
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h	(revision 603)
@@ -0,0 +1,71 @@
+#pragma once
+
+class ObjectModule
+{
+public:
+	// メタ情報
+	Meta meta;
+
+	// グローバル領域のネイティブコード
+	NativeCode globalNativeCode;
+
+	// データテーブル
+	DataTable dataTable;
+
+private:
+	// ソースコード
+	int currentSourceIndex;
+	BasicSources sources;
+
+	// XMLシリアライズ用
+private:
+	virtual const char *RootTagName() const
+	{
+		return "objectModule";
+	}
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - objectModule" );
+
+		ar & BOOST_SERIALIZATION_NVP( meta );
+		ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
+		ar & BOOST_SERIALIZATION_NVP( dataTable );
+		ar & BOOST_SERIALIZATION_NVP( currentSourceIndex );
+		ar & BOOST_SERIALIZATION_NVP( sources );
+	}
+
+public:
+	void StaticLink( ObjectModule &objectModule );
+
+	int GetCurrentSourceIndex() const
+	{
+		return currentSourceIndex;
+	}
+	const BasicSource &GetCurrentSource() const
+	{
+		return sources[currentSourceIndex];
+	}
+	BasicSource &GetCurrentSource()
+	{
+		return sources[currentSourceIndex];
+	}
+	void SetCurrentSourceIndex( int currentSourceIndex )
+	{
+		this->currentSourceIndex = currentSourceIndex;
+	}
+	const BasicSource &GetSource( int sourceIndex ) const
+	{
+		return sources[sourceIndex];
+	}
+	BasicSources &GetSources()
+	{
+		return sources;
+	}
+
+	bool Read( const std::string &filePath );
+	bool Write( const std::string &filePath ) const;
+	bool ReadString( const std::string &str );
+	bool WriteString( std::string &str ) const;
+};
+typedef std::vector<ObjectModule *> ObjectModules;
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h	(revision 603)
@@ -0,0 +1,102 @@
+#pragma once
+
+class Parameter : public Type
+{
+	std::string varName;
+	bool isRef;
+	bool isArray;
+	Subscripts subscripts;
+
+	std::string initValue;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Parameter" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Type );
+		ar & BOOST_SERIALIZATION_NVP( varName );
+		ar & BOOST_SERIALIZATION_NVP( isRef );
+		ar & BOOST_SERIALIZATION_NVP( isArray );
+		ar & BOOST_SERIALIZATION_NVP( subscripts );
+		ar & BOOST_SERIALIZATION_NVP( initValue );
+	}
+
+public:
+	Parameter( const std::string &varName, const Type &type, bool isRef = false, const std::string initValue = "" ):
+		Type( type ),
+		varName( varName ),
+		isRef( isRef ),
+		isArray( false ),
+		initValue( initValue )
+	{
+	}
+	Parameter( const Parameter &param ):
+		Type( param ),
+		varName( param.varName ),
+		isRef( param.isRef ),
+		isArray( param.isArray ),
+		subscripts( param.subscripts ),
+		initValue( param.initValue )
+	{
+	}
+	Parameter()
+	{
+	}
+	~Parameter(){}
+
+	void SetArray( const Subscripts &subscripts ){
+		isArray = true;
+		this->subscripts = subscripts;
+	}
+
+	const std::string &GetVarName() const
+	{
+		return varName;
+	}
+
+	bool IsRef() const
+	{
+		return isRef;
+	}
+	bool IsArray(){
+		return isArray;
+	}
+	const Subscripts &GetSubscripts() const
+	{
+		return subscripts;
+	}
+
+	const std::string &GetInitValue() const
+	{
+		return initValue;
+	}
+
+	bool Equals( const Parameter &param, bool isContravariant ) const;
+	bool Equals( const Types &actualTypeParametersForThisProc, const Parameter &param, bool isContravariant ) const;
+};
+
+class Parameters : public std::vector<Parameter *>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Parameters" );
+
+		ar & boost::serialization::make_nvp("vector_Parameter", boost::serialization::base_object<std::vector<Parameter *>>(*this));
+	}
+
+public:
+
+	bool Equals( const Parameters &params, bool isContravariant = false ) const;
+	bool Equals( const Types &actualTypeParametersForThisProc, const Parameters &params, bool isContravariant = false ) const;
+
+	int GetMemorySize() const
+	{
+		return (int)this->size() * PTR_SIZE;
+	}
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h	(revision 603)
@@ -0,0 +1,549 @@
+#pragma once
+
+class CClass;
+class Interface;
+class CMethod;
+
+class Procedure : public Symbol
+{
+public:
+	// 種類
+	enum Kind{
+		Sub,
+		Function,
+	};
+
+private:
+	Kind kind;
+
+	bool isCdecl;
+	mutable bool isUsing;
+
+	// パラメータ
+	Parameters params;
+
+protected:
+
+	// 戻り値の型
+	Type returnType;
+
+	// ソースコードの位置
+	int codePos;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Procedure" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
+		ar & BOOST_SERIALIZATION_NVP( kind );
+		ar & BOOST_SERIALIZATION_NVP( isCdecl );
+		ar & BOOST_SERIALIZATION_NVP( isUsing );
+		ar & BOOST_SERIALIZATION_NVP( params );
+		ar & BOOST_SERIALIZATION_NVP( returnType );
+		ar & BOOST_SERIALIZATION_NVP( codePos );
+	}
+
+public:
+	Procedure( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl )
+		: Symbol( namespaceScopes, name )
+		, kind( kind )
+		, isCdecl( isCdecl )
+		, isUsing( false )
+		, codePos( -1 )
+	{
+	}
+	Procedure()
+	{
+	}
+	~Procedure(){
+		BOOST_FOREACH( Parameter *pParam, params ){
+			delete pParam;
+		}
+	}
+
+	bool IsSub() const
+	{
+		return ( kind == Sub );
+	}
+	bool IsFunction() const
+	{
+		return ( kind == Function );
+	}
+
+	bool IsCdecl() const
+	{
+		return isCdecl;
+	}
+	void Using() const
+	{
+		isUsing = true;
+	}
+	bool IsUsing() const
+	{
+		return isUsing;
+	}
+
+	int GetCodePos() const
+	{
+		return codePos;
+	}
+	void SetCodePos( int codePos )
+	{
+		this->codePos = codePos;
+	}
+
+	const Parameters &Params() const
+	{
+		return params;
+	}
+	Parameters &GetParameters()
+	{
+		return params;
+	}
+	const Type &ReturnType() const
+	{
+		return returnType;
+	}
+	Type &ReturnType()
+	{
+		return returnType;
+	}
+};
+
+class UserProc : public Procedure, public Jenga::Common::ObjectInHashmap<UserProc>
+{
+public:
+	std::string _paramStr;
+
+private:
+	NamespaceScopesCollection importedNamespaces;
+
+	// 親クラスと対応するメソッド
+	const CClass *pParentClass;
+	const Interface *pInterface;
+	CMethod *pMethod;
+
+	bool isMacro;
+
+	// パラメータの追加情報
+	int secondParmNum;
+	Parameters realParams;
+	int realSecondParmNum;
+
+	// 各種フラグ
+	bool isExport;
+	mutable bool isSystem;
+	mutable bool isAutoGeneration;
+	mutable bool isCompiled;
+
+	mutable DWORD beginOpAddress;
+	mutable DWORD endOpAddress;
+
+	// ローカル変数
+	mutable Variables localVars;
+
+	// 識別ID
+	int id;
+
+	// ネイティブコード
+	NativeCode nativeCode;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - UserProc" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
+		ar & BOOST_SERIALIZATION_NVP( _paramStr );
+		ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
+		ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) );
+		ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) );
+		ar & BOOST_SERIALIZATION_NVP( pMethod );
+		ar & BOOST_SERIALIZATION_NVP( isMacro );
+		ar & BOOST_SERIALIZATION_NVP( secondParmNum );
+		ar & BOOST_SERIALIZATION_NVP( realParams );
+		ar & BOOST_SERIALIZATION_NVP( realSecondParmNum );
+		ar & BOOST_SERIALIZATION_NVP( isExport );
+		ar & BOOST_SERIALIZATION_NVP( isSystem );
+		ar & BOOST_SERIALIZATION_NVP( isAutoGeneration );
+		ar & BOOST_SERIALIZATION_NVP( isCompiled );
+		ar & BOOST_SERIALIZATION_NVP( beginOpAddress );
+		ar & BOOST_SERIALIZATION_NVP( endOpAddress );
+		ar & BOOST_SERIALIZATION_NVP( localVars );
+		ar & BOOST_SERIALIZATION_NVP( id );
+		ar & BOOST_SERIALIZATION_NVP( nativeCode );
+	}
+
+public:
+
+	UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport )
+		: Procedure( namespaceScopes, name, kind, isCdecl )
+		, importedNamespaces( importedNamespaces )
+		, pParentClass( NULL )
+		, pInterface( NULL )
+		, pMethod( NULL )
+		, isMacro( isMacro )
+		, secondParmNum( 0 )
+		, realSecondParmNum( 1 )
+		, isExport( isExport )
+		, isSystem( false )
+		, isAutoGeneration( false )
+		, isCompiled( false )
+		, beginOpAddress( 0 )
+		, endOpAddress( 0 )
+	{
+		static int id_base=0;
+		id = ( id_base ++ );
+	}
+	UserProc()
+	{
+	}
+	~UserProc()
+	{
+		BOOST_FOREACH( Parameter *pParam, realParams ){
+			delete pParam;
+		}
+	}
+
+	void SetReturnType( const Type &newReturnType )
+	{
+		returnType = newReturnType;
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+
+	virtual bool IsDuplication( const UserProc *pUserProc ) const
+	{
+		if( this->GetParentClassPtr() == pUserProc->GetParentClassPtr()	// 親クラスが等しい
+			&& this->pInterface == pUserProc->pInterface				// インターフェイスが等しい
+			&& pUserProc->IsEqualSymbol( *this )						// 名前空間及び名前が等しい
+			&& this->Params().Equals( pUserProc->Params() )				// パラメータが等しい
+			&& this->returnType.Equals( pUserProc->returnType ) )		// 戻り値が等しい
+		{
+			return true;
+		}
+		return false;
+	}
+
+	/*!
+	@brief	オーバーライド用に関数同士が等しいかどうかをチェックする
+	@param	actualTypeParametersForThisProc thisオブジェクトで保有するメソッドを対象とした実型パラメータ
+			pUserProc 照らし合わせる関数
+	*/
+	bool IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const;
+
+	bool IsMacro() const
+	{
+		return isMacro;
+	}
+
+	int GetSecondParmNum() const
+	{
+		return secondParmNum;
+	}
+	void SetSecondParmNum( int secondParmNum )
+	{
+		this->secondParmNum = secondParmNum;
+	}
+	const Parameters &RealParams() const
+	{
+		return realParams;
+	}
+	Parameters &RealParams()
+	{
+		return realParams;
+	}
+	void SetRealParams( const Parameters &params )
+	{
+		realParams = params;
+	}
+	int GetRealSecondParmNum() const
+	{
+		return realSecondParmNum;
+	}
+
+	void ExportOff(){
+		isExport = false;
+	}
+	bool IsExport() const
+	{
+		return isExport;
+	}
+	void ThisIsSystemProc() const
+	{
+		isSystem = true;
+	}
+	bool IsSystem() const
+	{
+		return isSystem;
+	}
+	void ThisIsAutoGenerationProc() const
+	{
+		isAutoGeneration = true;
+	}
+	bool IsAutoGeneration() const
+	{
+		return isAutoGeneration;
+	}
+	void CompleteCompile() const
+	{
+		isCompiled = true;
+	}
+	void KillCompileStatus() const
+	{
+		isCompiled = false;
+	}
+	bool IsCompiled() const
+	{
+		return isCompiled;
+	}
+	bool IsDestructor() const
+	{
+		return ( GetName()[0] == '~' );
+	}
+
+	// バイナリコード位置とサイズ
+	DWORD GetBeginOpAddress() const
+	{
+		return beginOpAddress;
+	}
+	void SetBeginOpAddress( DWORD beginOpAddress ) const
+	{
+		this->beginOpAddress = beginOpAddress;
+	}
+	DWORD GetEndOpAddress() const
+	{
+		return endOpAddress;
+	}
+	void SetEndOpAddress( DWORD endOpAddress ) const
+	{
+		this->endOpAddress = endOpAddress;
+	}
+	int GetCodeSize() const
+	{
+		return endOpAddress - beginOpAddress;
+	}
+
+	virtual const NamespaceScopes &GetNamespaceScopes() const;
+	const NamespaceScopesCollection &GetImportedNamespaces() const;
+
+	Variables &GetLocalVars() const
+	{
+		return localVars;
+	}
+
+	int GetId() const
+	{
+		return id;
+	}
+
+	const NativeCode &GetNativeCode() const
+	{
+		return nativeCode;
+	}
+	NativeCode &GetNativeCode()
+	{
+		return nativeCode;
+	}
+
+	std::string GetFullName() const;
+	bool IsCastOperator() const;
+
+	bool IsVirtual() const;
+
+	void SetParentClass( const CClass *pParentClass ){
+		this->pParentClass = pParentClass;
+	}
+	const CClass *GetParentClassPtr() const
+	{
+		return pParentClass;
+	}
+	const CClass &GetParentClass() const
+	{
+		return *pParentClass;
+	}
+	bool HasParentClass() const
+	{
+		return ( pParentClass != NULL );
+	}
+	bool IsGlobalProcedure() const
+	{
+		return ( pParentClass == NULL );
+	}
+	void SetInterface( const Interface *pInterface )
+	{
+		this->pInterface = pInterface;
+	}
+	void SetMethod( CMethod *pMethod ){
+		this->pMethod = pMethod;
+	}
+	const CMethod &GetMethod() const;
+
+
+	static const UserProc *pGlobalProc;
+};
+
+class UserProcs : public Jenga::Common::Hashmap<UserProc>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - UserProcs" );
+
+		ar & boost::serialization::make_nvp("Hashmap_UserProcImpl",
+			boost::serialization::base_object<Jenga::Common::Hashmap<UserProc>>(*this));
+	}
+
+
+public:
+	UserProcs()
+	{
+	}
+	~UserProcs()
+	{
+	}
+
+	void EnumGlobalProcs( const char *simpleName, const Symbol &localSymbol, std::vector<const UserProc *> &subs );
+};
+
+class DllProc : public Procedure, public Jenga::Common::ObjectInHashmap<DllProc>
+{
+	std::string dllFileName;
+	std::string alias;
+	int lookupAddress;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - DllProc" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
+		ar & BOOST_SERIALIZATION_NVP( dllFileName );
+		ar & BOOST_SERIALIZATION_NVP( alias );
+		ar & BOOST_SERIALIZATION_NVP( lookupAddress );
+	}
+
+public:
+	DllProc( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl, const std::string &dllFileName, const std::string &alias )
+		: Procedure( namespaceScopes, name, kind, isCdecl )
+		, dllFileName( dllFileName )
+		, alias( alias )
+		, lookupAddress( 0 )
+	{
+	}
+	DllProc()
+	{
+	}
+	~DllProc()
+	{
+	}
+
+	virtual const std::string &GetKeyName() const
+	{
+		return GetName();
+	}
+
+	virtual bool IsDuplication( const DllProc *pDllProc ) const
+	{
+		if( pDllProc->IsEqualSymbol( *this )
+			&& this->Params().Equals( pDllProc->Params() ) )
+		{
+			return true;
+		}
+		return false;
+	}
+
+	const std::string &GetDllFileName() const
+	{
+		return dllFileName;
+	}
+	const std::string &GetAlias() const
+	{
+		return alias;
+	}
+
+	void SetLookupAddress( int lookupAddress ){
+		this->lookupAddress = lookupAddress;
+	}
+	int GetLookupAddress() const
+	{
+		return lookupAddress;
+	}
+};
+class DllProcs : public Jenga::Common::Hashmap<DllProc>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - DllProcs" );
+
+		ar & boost::serialization::make_nvp("Hashmap_DllProc",
+			boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this));
+	}
+};
+
+class ProcPointer : public Procedure
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - ProcPointer" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
+	}
+
+public:
+	ProcPointer( Kind kind )
+		: Procedure( NamespaceScopes(), std::string(), kind, false )
+	{
+	}
+	ProcPointer()
+	{
+	}
+	~ProcPointer(){}
+};
+
+class ProcPointers : public std::vector<ProcPointer *>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - ProcPointers" );
+
+		ar & boost::serialization::make_nvp("vector_ProcPointer",
+			boost::serialization::base_object<vector<ProcPointer *>>(*this));
+	}
+
+public:
+	ProcPointers()
+	{
+	}
+	~ProcPointers()
+	{
+		Clear();
+	}
+
+	void Clear();
+	void PullOutAll()
+	{
+		clear();
+	}
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h	(revision 603)
@@ -0,0 +1,254 @@
+#pragma once
+
+class IncludedFilesRelation
+{
+	std::vector<std::string> filePaths;
+	std::vector<int> lineFileNumbers;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - IncludedFilesRelation" );
+
+		ar & BOOST_SERIALIZATION_NVP( filePaths );
+		ar & BOOST_SERIALIZATION_NVP( lineFileNumbers );
+	}
+
+public:
+	IncludedFilesRelation()
+	{
+	}
+	~IncludedFilesRelation()
+	{
+	}
+
+	const int GetFileNumber( int lineNumber ) const
+	{
+		return lineFileNumbers[lineNumber];
+	}
+	const std::string &GetFilePath( int lineNumber ) const
+	{
+		return filePaths[GetFileNumber( lineNumber )];
+	}
+	const std::string &GetFilePathFromFileNumber( int fileNumber ) const
+	{
+		return filePaths[fileNumber];
+	}
+	int GetFileCounts() const
+	{
+		return (int)filePaths.size();
+	}
+
+	int AddFile( const std::string &filePath )
+	{
+		filePaths.push_back( filePath );
+		return (int)filePaths.size()-1;
+	}
+	void AddLine( int fileNumber )
+	{
+		lineFileNumbers.push_back( fileNumber );
+	}
+
+	int GetLineCounts() const
+	{
+		return (int)lineFileNumbers.size();
+	}
+};
+
+class Text{
+protected:
+	char *buffer;
+	int length;
+
+public:
+
+	Text(){
+		buffer = (char *)calloc( 1, 1 );
+		length = 0;
+	}
+	Text( const Text &text )
+		: length( text.length )
+	{
+		buffer = (char *)malloc( length + 1 );
+		memcpy( buffer, text.buffer, length );
+		buffer[length] = 0;
+	}
+	~Text(){
+		free( buffer );
+	}
+	void Clear()
+	{
+		length = 0;
+	}
+	void Add( const std::string &str )
+	{
+		buffer = (char *)realloc( buffer, length + str.size() + 1 );
+		lstrcpy( buffer + length, str.c_str() );
+		length += (int)str.size();
+	}
+	void Add( const std::vector<char> &str )
+	{
+		buffer = (char *)realloc( buffer, length + str.size() + 1 );
+		lstrcpy( buffer + length, &str[0] );
+		length += (int)str.size();
+	}
+
+	bool ReadFile( const std::string &filePath );
+
+	static void Text::SlideString(char *buffer, int slide){
+		char *temp;
+		temp=(char *)malloc(lstrlen(buffer)+1);
+		lstrcpy(temp,buffer);
+		lstrcpy(buffer+slide,temp);
+		free(temp);
+	}
+};
+
+class BasicSource : public Text
+{
+	static const std::string generateDirectiveName;
+
+	IncludedFilesRelation includedFilesRelation;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	BOOST_SERIALIZATION_SPLIT_MEMBER();
+	template<class Archive> void load(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing(load) - BasicSource" );
+
+		std::string _buffer;
+		ar & BOOST_SERIALIZATION_NVP( _buffer );
+		ar & BOOST_SERIALIZATION_NVP( length );
+		ar & BOOST_SERIALIZATION_NVP( includedFilesRelation );
+
+		// 読み込み後の処理
+		Realloc( length );
+		for( int i=0; i<length; i++ )
+		{
+			ULONG_PTR l1 = ( ( _buffer[i*3] >= 'a' ) ? ( _buffer[i*3] - 'a' + 0x0a ) : ( _buffer[i*3] - '0' ) ) * 0x10;
+			ULONG_PTR l2 = ( _buffer[i*3+1] >= 'a' ) ? ( _buffer[i*3+1] - 'a' + 0x0a ) : ( _buffer[i*3+1] - '0' );
+			ULONG_PTR l = l1 + l2;
+			buffer[i] = static_cast<char>(l);
+		}
+		buffer[length] = 0;
+	}
+	template<class Archive> void save(Archive& ar, const unsigned int version) const
+	{
+		trace_for_serialize( "serializing(save) - BasicSource" );
+
+		// 保存準備
+		char *tempCode = (char *)calloc( (length+1) * 3, 1 );
+		for( int i=0; i<length; i++ )
+		{
+			char temp[32];
+			sprintf( temp, "%02x,", (unsigned char)buffer[i] );
+			tempCode[i*3] = temp[0];
+			tempCode[i*3+1] = temp[1];
+			tempCode[i*3+2] = temp[2];
+		}
+
+		std::string _buffer = tempCode;
+		free( tempCode );
+
+		ar & BOOST_SERIALIZATION_NVP( _buffer );
+		ar & BOOST_SERIALIZATION_NVP( length );
+		ar & BOOST_SERIALIZATION_NVP( includedFilesRelation );
+	}
+
+private:
+	void Realloc( int newLength )
+	{
+		bool isEqualBasbuf = false;
+		extern char *basbuf;
+		if( basbuf == buffer + 2 )
+		{
+			isEqualBasbuf = true;
+		}
+
+		buffer = (char *)realloc( buffer, newLength + 255 );
+
+		length = newLength;
+
+		if( isEqualBasbuf )
+		{
+			basbuf = buffer + 2;
+		}
+	}
+
+	void IncludeFiles();
+
+	void ChangeReturnLineChar();
+
+	void RemoveComments();
+
+	bool ReadFile_InIncludeDirective( const std::string &filePath );
+	void DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath );
+
+	void RemoveReturnLineUnderbar();
+
+	void Initialize( const std::string &source );
+
+public:
+	BasicSource(){}
+	BasicSource( const BasicSource &basicSource )
+		: Text( basicSource )
+		, includedFilesRelation( basicSource.includedFilesRelation )
+	{
+	}
+	BasicSource( const std::string &source )
+	{
+		Initialize( source );
+	}
+	~BasicSource(){}
+
+	char *GetBuffer(){
+		return buffer+2;
+	}
+	const char *GetBuffer() const
+	{
+		return buffer+2;
+	}
+	int GetLength() const
+	{
+		return length-2;
+	}
+	void _ResetLength()
+	{
+		length = lstrlen( buffer );
+	}
+
+	const IncludedFilesRelation &GetIncludedFilesRelation() const
+	{
+		return includedFilesRelation;
+	}
+
+	void SetBuffer( const char *buffer );
+
+	bool ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath );
+
+	void Addition( const char *buffer );
+
+	bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const;
+
+	void operator = ( const BasicSource &source ){
+		Realloc( source.length );
+		lstrcpy( buffer, source.buffer );
+	}
+
+	char operator[]( int index ) const
+	{
+		if( index>GetLength() )
+		{
+			Jenga::Throw( "BasicSource bad access" );
+		}
+		return buffer[2+index];
+	}
+
+	std::string cannotIncludePath;
+	int cannotIncludeSourcePos;
+};
+typedef std::vector<BasicSource> BasicSources;
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Symbol.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Symbol.h	(revision 602)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Symbol.h	(revision 603)
@@ -3,4 +3,6 @@
 namespace ActiveBasic{ namespace Common{ namespace Lexical{
 
+std::string Operator_NaturalStringToCalcMarkString( const std::string &name );
+std::string Operator_CalcMarkStringToNaturalString( const std::string &name );
 
 class Symbol
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h	(revision 603)
@@ -0,0 +1,373 @@
+#pragma once
+
+class CClass;
+
+class GenericType;
+typedef std::vector<GenericType> GenericTypes;
+
+class Type{
+	int basicType;
+	union{
+		LONG_PTR index;
+		const CClass *pClass;
+	};
+
+	// ジェネリクス クラス インスタンス型の場合に使う
+	GenericTypes actualGenericTypes;
+
+	// 型パラメータで使う
+	std::string formalTypeName;	// 型パラメータの名前
+	int formalTypeIndex;		// 型パラメータの引数番号
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Type" );
+
+		ar & BOOST_SERIALIZATION_NVP( basicType );
+		if( HasMember() )
+		{
+			ar & boost::serialization::make_nvp("pClass", const_cast<CClass *&>(pClass));
+			ar & BOOST_SERIALIZATION_NVP( actualGenericTypes );
+		}
+		else
+		{
+			ar & BOOST_SERIALIZATION_NVP( index );
+		}
+
+		if( IsTypeParameter() )
+		{
+			ar & BOOST_SERIALIZATION_NVP( formalTypeName );
+			ar & BOOST_SERIALIZATION_NVP( formalTypeIndex );
+		}
+	}
+
+public:
+	static int GetBasicSize( int basicType );
+
+	Type():
+	  basicType( DEF_NON ),
+	  index( -1 ){}
+	Type( int basicType ):
+	  basicType( basicType ),
+	  index( -1 ){}
+
+	Type( int basicType, LONG_PTR index )
+		: basicType( basicType )
+		, index( index )
+	{
+	}
+
+	Type( int basicType, const CClass &objClass ):
+	  basicType( basicType ),
+	  index( (LONG_PTR)&objClass ){}
+
+	Type( const Type &type )
+		: basicType( type.basicType )
+		, index( type.index )
+		, actualGenericTypes( type.actualGenericTypes )
+		, formalTypeName( type.formalTypeName )
+		, formalTypeIndex( type.formalTypeIndex )
+	{
+	}
+
+	~Type();
+
+	void operator= ( const Type &type )
+	{
+		basicType = type.basicType;
+		index = type.index;
+		actualGenericTypes = type.actualGenericTypes;
+		formalTypeName = type.formalTypeName;
+		formalTypeIndex = type.formalTypeIndex;
+	}
+
+	__inline int GetBasicType() const
+	{
+		return basicType;
+	}
+	LONG_PTR GetIndex() const
+	{
+		return index;
+	}
+	const CClass &GetClass() const;
+
+	void SetBasicType( int basicType ){
+		this->basicType = basicType;
+	}
+	void SetIndex( LONG_PTR index ){
+		this->index = index;
+	}
+	void SetClassPtr( const CClass *pClass )
+	{
+		int naturalBasicType = NATURAL_TYPE( basicType );
+		if( !HasMember() )
+		{
+			Jenga::Throw( "クラスまたは構造体でない型に対してSetClassPtrを呼び出した" );
+		}
+		this->pClass = pClass;
+	}
+	void SetNull(){
+		SetBasicType( DEF_NON );
+		SetIndex( -1 );
+	}
+	void SetType( int basicType, LONG_PTR index ){
+		SetBasicType( basicType );
+		SetIndex( index );
+	}
+	void SetType( int basicType, const CClass *pClass ){
+		SetBasicType( basicType );
+		this->pClass = pClass;
+	}
+	void SetActualGenericTypes( const GenericTypes &genericTypes )
+	{
+		this->actualGenericTypes = genericTypes;
+	}
+
+	int PtrLevel() const
+	{
+		return PTR_LEVEL( basicType );
+	}
+	void PtrLevelUp(){
+		PTR_LEVEL_UP( basicType );
+	}
+	void PtrLevelDown(){
+		PTR_LEVEL_DOWN( basicType );
+	}
+
+	bool Equals( const Type &type ) const;
+	bool IsCovariant( const Type &type ) const;
+	bool IsContravariant( const Type &type ) const;
+
+	int GetBasicSize() const;
+	int GetSize() const;
+
+	bool IsNull() const;
+
+	bool IsByte() const;
+	bool IsSByte() const;
+	bool IsWord() const;
+	bool IsInteger() const;
+	bool IsDWord() const;
+	bool IsLong() const;
+	bool IsQWord() const;
+	bool IsInt64() const;
+	bool IsSingle() const;
+	bool IsDouble() const;
+	bool IsBoolean() const;
+
+	static bool IsPointer( int basicType );
+	bool IsPointer() const;
+	bool IsSigned() const;
+	bool IsNaturalWhole() const;
+	bool IsWhole() const;
+	bool IsReal() const;
+	bool Is64() const;
+	bool IsProcPtr() const;
+	bool IsStruct() const;
+	bool IsStructPtr() const;
+	bool IsObject() const;
+	bool IsObjectPtr() const;
+	bool IsTypeParameter() const;
+	bool IsObjectClass() const;
+	bool IsStringClass() const;
+	bool IsVoidPtr() const;
+	bool IsAny() const;
+	bool IsDelegate() const;
+	bool IsInterface() const;
+	bool IsComInterface() const;
+
+	// オブジェクトや構造体など、メンバを持つ型かどうかを判別する
+	bool HasMember() const;
+
+	// 型パラメータの名前を取得
+	const std::string &GetFormalTypeName() const
+	{
+		if( !IsTypeParameter() )
+		{
+			Jenga::Throw( "型パラメータでない型に対してGetFormalTypeNameメソッドが呼ばれた" );
+		}
+		return formalTypeName;
+	}
+	void SetFormalTypeName( const std::string &formalTypeName )
+	{
+		if( !IsTypeParameter() )
+		{
+			Jenga::Throw( "型パラメータでない型に対してSetFormalTypeNameメソッドが呼ばれた" );
+		}
+		this->formalTypeName = formalTypeName;
+	}
+	int GetFormalTypeIndex() const
+	{
+		if( !IsTypeParameter() )
+		{
+			Jenga::Throw( "型パラメータでない型に対してGetFormalTypeIndexメソッドが呼ばれた" );
+		}
+		return formalTypeIndex;
+	}
+	void SetFormalTypeIndex( int formalTypeIndex )
+	{
+		if( !IsTypeParameter() )
+		{
+			Jenga::Throw( "型パラメータでない型に対してSetFormalTypeIndexメソッドが呼ばれた" );
+		}
+		this->formalTypeIndex = formalTypeIndex;
+	}
+
+	// 未完成
+	const Type &GetActualGenericType( int index ) const;
+	bool HasActualGenericType() const;
+
+	//型名を取得
+	std::string ToString() const;
+
+
+private:
+	static const int basicTypeList[];
+	static const std::string basicTypeNameList[];
+public:
+	static bool StringToBasicType( const std::string &typeName, int &basicType );
+	static const char *Type::BasicTypeToCharPtr( const Type &type );
+	static int GetBasicTypeFromSimpleName( const char *variable );
+};
+typedef std::vector<Type> Types;
+
+/*!
+@brief	ジェネリックな型を解決する
+@param	typeParameter ジェネリック型を指定する。ここに解決後の型が入る。
+		classType インスタンス化されているオブジェクトの型
+		pUserProc 現在コンパイル中の関数（ただしクラスメソッドのみ）
+*/
+void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc = NULL );
+
+class GenericType
+{
+	std::string name;
+	Type type;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - GenericType" );
+
+		ar & BOOST_SERIALIZATION_NVP( name );
+		ar & BOOST_SERIALIZATION_NVP( type );
+	}
+
+public:
+	GenericType( const std::string &name, const Type &type )
+		: name( name )
+		, type( type )
+	{
+	}
+	GenericType()
+	{
+	}
+	~GenericType()
+	{
+	}
+
+	const std::string &GetName() const
+	{
+		return name;
+	}
+	const Type &GetType() const
+	{
+		return type;
+	}
+};
+
+class BlittableType
+{
+	Type basicType;
+	CClass *pClass;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - BlittableType" );
+
+		ar & BOOST_SERIALIZATION_NVP( basicType );
+		ar & BOOST_SERIALIZATION_NVP( pClass );
+	}
+
+public:
+	bool isTargetObjectModule;
+	BlittableType( const Type &basicType, CClass *pClass )
+		: basicType( basicType )
+		, pClass( pClass )
+		, isTargetObjectModule( true )
+	{
+	}
+	BlittableType()
+		: isTargetObjectModule( true )
+	{
+	}
+	const Type &GetBasicType() const
+	{
+		return basicType;
+	}
+	const CClass *GetClassPtr() const
+	{
+		return pClass;
+	}
+	const std::string GetCreateStaticMethodFullName() const;
+};
+class BlittableTypes : public std::vector<BlittableType>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - BlittableTypes" );
+
+		ar & boost::serialization::make_nvp("vector_BlittableType",
+			boost::serialization::base_object<std::vector<BlittableType>>(*this));
+	}
+
+public:
+	bool IsExist( Type type ) const
+	{
+		const BlittableTypes &blittableTypes = *this;
+		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
+			if( blittableType.GetBasicType().Equals( type ) ){
+				return true;
+			}
+		}
+		return false;
+	}
+	const BlittableType &Find( const Type &type ) const
+	{
+		const BlittableTypes &blittableTypes = *this;
+		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
+			if( blittableType.GetBasicType().Equals( type ) ){
+				return blittableType;
+			}
+		}
+		Jenga::Throw( "Blittable型ではない" );
+
+		static BlittableType dummy;
+		return dummy;
+	}
+	const CClass *GetClassPtr( const Type &type ) const
+	{
+		const BlittableTypes &blittableTypes = *this;
+		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
+			if( blittableType.GetBasicType().Equals( type ) ){
+				return blittableType.GetClassPtr();
+			}
+		}
+		return NULL;
+	}
+	const CClass &GetClass( const Type &type ) const
+	{
+		return *GetClassPtr( type );
+	}
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h	(revision 603)
@@ -0,0 +1,62 @@
+#pragma once
+
+class TypeDefCollection;
+
+class TypeDef : public Symbol
+{
+	friend TypeDefCollection;
+
+	std::string baseName;
+	Type baseType;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - TypeDef" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
+		ar & BOOST_SERIALIZATION_NVP( baseName );
+		ar & BOOST_SERIALIZATION_NVP( baseType );
+	}
+
+public:
+	TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType );
+	TypeDef()
+	{
+	}
+	~TypeDef()
+	{
+	}
+
+	const std::string &GetBaseName() const
+	{
+		return baseName;
+	}
+	const Type &GetBaseType() const
+	{
+		return baseType;
+	}
+};
+
+class TypeDefCollection : public std::vector<TypeDef>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - TypeDefCollection" );
+
+		ar & boost::serialization::make_nvp("vector_TypeDef",
+			boost::serialization::base_object<std::vector<TypeDef>>(*this));
+	}
+
+public:
+	TypeDefCollection();
+	~TypeDefCollection();
+
+	void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine );
+	int GetIndex( const Symbol &symbol ) const;
+};
Index: trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h	(revision 603)
@@ -0,0 +1,254 @@
+#pragma once
+
+class Variable : public Symbol
+{
+	Type type;
+	bool isConst;
+	bool isRef;
+	bool isArray;
+	Subscripts subscripts;
+
+	bool isParameter;
+	bool hasInitData;
+
+	//コンストラクタ用パラメータ
+	std::string paramStrForConstructor;
+
+
+	/* --- オフセット ---
+		※グローバル変数で初期バッファがない場合は最上位ビットに1がセットされ、
+		初期バッファの有無が識別される。
+		（その後、スケジュール実行により、実際の配置に並び替えられる）*/
+	int offset;
+
+
+	//レキシカルスコープ用
+	int scopeStartAddress;
+	int scopeEndAddress;
+	int scopeLevel;
+
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Variable" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
+		ar & BOOST_SERIALIZATION_NVP( type );
+		ar & BOOST_SERIALIZATION_NVP( isConst );
+		ar & BOOST_SERIALIZATION_NVP( isRef );
+		ar & BOOST_SERIALIZATION_NVP( isArray );
+		ar & BOOST_SERIALIZATION_NVP( subscripts );
+		ar & BOOST_SERIALIZATION_NVP( isParameter );
+		ar & BOOST_SERIALIZATION_NVP( hasInitData );
+		ar & BOOST_SERIALIZATION_NVP( paramStrForConstructor );
+		ar & BOOST_SERIALIZATION_NVP( offset );
+		ar & BOOST_SERIALIZATION_NVP( scopeStartAddress );
+		ar & BOOST_SERIALIZATION_NVP( scopeEndAddress );
+		ar & BOOST_SERIALIZATION_NVP( scopeLevel );
+	}
+
+public:
+	Variable( const Symbol &symbol, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData );
+	Variable( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData );
+	Variable( const Variable &var );
+	Variable();
+
+	void SetArray( const Subscripts &subscripts ){
+		isArray = true;
+		this->subscripts = subscripts;
+	}
+
+	const Type &GetType() const
+	{
+		return type;
+	}
+	void ConstOff(){
+		isConst = false;
+	}
+	void ConstOn(){
+		isConst = true;
+	}
+	bool IsConst() const
+	{
+		return isConst;
+	}
+	bool IsRef() const
+	{
+		return isRef;
+	}
+	bool IsArray()const
+	{
+		return isArray;
+	}
+	const Subscripts &GetSubscripts() const
+	{
+		return subscripts;
+	}
+
+	void ThisIsParameter(){
+		isParameter = true;
+	}
+	bool IsParameter() const
+	{
+		return isParameter;
+	}
+	bool HasInitData() const
+	{
+		return hasInitData;
+	}
+
+
+	int GetMemorySize() const
+	{
+		if( isRef || isParameter ){
+			return PTR_SIZE;
+		}
+
+		int size = type.GetSize();
+
+		if( isArray ){
+			int num = 1;
+			for( int i=0; i<(int)subscripts.size(); i++){
+				num *= subscripts[i]+1;
+			}
+			size *= num;
+		}
+
+		if( size % PTR_SIZE ){
+			size += PTR_SIZE-(size%PTR_SIZE);
+		}
+
+		return size;
+	}
+
+	int GetOffsetAddress() const
+	{
+		return offset;
+	}
+	void SetOffsetAddress( int offset )
+	{
+		this->offset = offset;
+	}
+
+	const std::string &GetParamStrForConstructor() const
+	{
+		return paramStrForConstructor;
+	}
+
+	//レキシカルスコープ用
+	int GetScopeStartAddress() const
+	{
+		return scopeStartAddress;
+	}
+	void SetScopeStartAddress( int scopeStartAddress )
+	{
+		this->scopeStartAddress = scopeStartAddress;
+	}
+	int GetScopeEndAddress() const
+	{
+		return scopeEndAddress;
+	}
+	void SetScopeEndAddress( int scopeEndAddress )
+	{
+		this->scopeEndAddress = scopeEndAddress;
+	}
+	int GetScopeLevel() const
+	{
+		return scopeLevel;
+	}
+	void SetScopeLevel( int scopeLevel )
+	{
+		this->scopeLevel = scopeLevel;
+	}
+
+
+	bool isLiving;
+	int source_code_address;
+
+
+	static int GetSubScriptCounts( const Subscripts &subscripts ){
+		// 配列の要素数を取得
+		int i,i2;
+		for(i=0,i2=1;i<(int)subscripts.size();i++){
+			i2 *= subscripts[i]+1;
+		}
+		return i2;
+	}
+};
+
+class Variables : public std::vector<Variable *>
+{
+protected:
+	int allSize;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - Variables" );
+
+		ar & boost::serialization::make_nvp("vector_Variable", boost::serialization::base_object<vector<Variable *>>(*this));
+	}
+
+public:
+	Variables()
+		: allSize( 0 )
+	{
+	}
+	~Variables(){
+		Clear();
+	}
+
+	void Clear(){
+		for( int i=0; i<(int)this->size(); i++ ){
+			delete (*this)[i];
+		}
+
+		allSize = 0;
+		clear();
+	}
+	void PullOutAll()
+	{
+		clear();
+	}
+
+	int GetAllSize() const
+	{
+		return allSize;
+	}
+
+	bool DuplicateCheck( const Symbol &symbol, int nowScopeLevel ) const;
+
+	const Variable *BackSearch( const Symbol &symbol, int nowScopeLevel ) const;
+	const Variable *Find( const Symbol &symbol )const;
+};
+
+class GlobalVars : public Variables
+{
+public:
+	Jenga::Common::Binary initAreaBuffer;
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		trace_for_serialize( "serializing - GlobalVars" );
+
+		ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Variables );
+		ar & BOOST_SERIALIZATION_NVP( initAreaBuffer );
+	}
+public:
+	GlobalVars()
+	{
+	}
+	~GlobalVars()
+	{
+	}
+
+	void Add( Variable *pVar, bool isResetOffsetAddress = true );
+};
Index: trunk/ab5.0/abdev/ab_common/include/ab_common.h
===================================================================
--- trunk/ab5.0/abdev/ab_common/include/ab_common.h	(revision 602)
+++ trunk/ab5.0/abdev/ab_common/include/ab_common.h	(revision 603)
@@ -1,3 +1,5 @@
 #pragma once
+
+#define trace_for_serialize( msg )
 
 #include "BasicFixed.h"
@@ -8,2 +10,21 @@
 #include "Lexical/Prototype.h"
 #include "Lexical/TypeMisc.h"
+
+using namespace ActiveBasic::Common::Lexical;
+
+#include "Lexical/NativeCode.h"
+#include "Lexical/Source.h"
+#include "Lexical/Type.h"
+#include "Lexical/Method.h"
+#include "Lexical/Interface.h"
+#include "Lexical/Member.h"
+#include "Lexical/Class.h"
+#include "Lexical/Parameter.h"
+#include "Lexical/Variable.h"
+#include "Lexical/Procedure.h"
+#include "Lexical/TypeDef.h"
+#include "Lexical/Const.h"
+#include "Lexical/Delegate.h"
+#include "Lexical/Meta.h"
+#include "Lexical/DataTable.h"
+#include "Lexical/ObjectModule.h"
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 603)
@@ -0,0 +1,770 @@
+#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/ab_common/src/Lexical/Const.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Const.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Const.cpp	(revision 603)
@@ -0,0 +1,132 @@
+#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/ab_common/src/Lexical/DataTable.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp	(revision 603)
@@ -0,0 +1,78 @@
+#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/ab_common/src/Lexical/Delegate.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp	(revision 603)
@@ -0,0 +1,19 @@
+#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/ab_common/src/Lexical/Interface.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp	(revision 603)
@@ -0,0 +1,53 @@
+#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/ab_common/src/Lexical/Meta.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 603)
@@ -0,0 +1,197 @@
+#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/ab_common/src/Lexical/Method.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp	(revision 603)
@@ -0,0 +1,142 @@
+#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/ab_common/src/Lexical/NativeCode.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp	(revision 603)
@@ -0,0 +1,160 @@
+#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/ab_common/src/Lexical/ObjectModule.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp	(revision 603)
@@ -0,0 +1,218 @@
+#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>
+
+
+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/ab_common/src/Lexical/Parameter.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp	(revision 603)
@@ -0,0 +1,87 @@
+#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/ab_common/src/Lexical/Procedure.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 603)
@@ -0,0 +1,114 @@
+#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/ab_common/src/Lexical/Source.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Source.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Source.cpp	(revision 603)
@@ -0,0 +1,960 @@
+#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/ab_common/src/Lexical/Symbol.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp	(revision 602)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp	(revision 603)
@@ -4,4 +4,101 @@
 
 const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
+
+char *calcNames[255] = {
+	"xor",
+};
+void InitCalcNames()
+{
+	if( calcNames[CALC_XOR] )
+	{
+		return;
+	}
+
+	memset( calcNames, 0, 255 * sizeof(char *) );
+	calcNames[CALC_XOR] = "xor";
+	calcNames[CALC_OR] = "or";
+	calcNames[CALC_AND] = "and";
+	calcNames[CALC_NOT] = "Not";
+	calcNames[CALC_PE] = "<=";
+	calcNames[CALC_QE] = ">=";
+	calcNames[CALC_NOTEQUAL] = "<>";
+	calcNames[CALC_EQUAL] = "=(compare)";
+	calcNames[CALC_P] = "<";
+	calcNames[CALC_Q] = ">";
+	calcNames[CALC_SHL] = "<<";
+	calcNames[CALC_SHR] = ">>";
+	calcNames[CALC_ADDITION] = "+";
+	calcNames[CALC_SUBTRACTION] = "-";
+	calcNames[CALC_STRPLUS] = "&";
+	calcNames[CALC_MOD] = "mod";
+	calcNames[CALC_PRODUCT] = "*";
+	calcNames[CALC_QUOTIENT] = "/";
+	calcNames[CALC_INTQUOTIENT] = "\\";
+	calcNames[CALC_AS] = "As";
+	calcNames[CALC_BYVAL] = "ByVal";
+	calcNames[CALC_MINUSMARK] = "-(mark)";
+	calcNames[CALC_POWER] = "^";
+	calcNames[CALC_SUBSITUATION] = "=";
+	calcNames[CALC_ARRAY_GET] = "[]";
+	calcNames[CALC_ARRAY_SET] = "[]=";
+}
+void GetCalcName(int idCalc,char *name){
+	InitCalcNames();
+
+	if( calcNames[idCalc] == NULL )
+	{
+		throw;
+	}
+
+	lstrcpy( name, calcNames[idCalc] );
+}
+
+std::string ActiveBasic::Common::Lexical::Operator_CalcMarkStringToNaturalString( const std::string &name )
+{
+	if( name[0] == 1 && name[1] == ESC_OPERATOR )
+	{
+		BYTE calcId = name[2];
+		char temporary[255], calcName[255];
+		GetCalcName( calcId, calcName );
+		temporary[0] = name[0];
+		temporary[1] = name[1];
+		lstrcpy( temporary+2, calcName );
+		return temporary;
+	}
+	return name;
+}
+
+BYTE ToCalcId( const char *name )
+{
+	InitCalcNames();
+
+	for( int i=0; i<255; i++ )
+	{
+		if( calcNames[i] )
+		{
+			if( lstrcmp( name, calcNames[i] ) == 0 )
+			{
+				return i;
+			}
+		}
+	}
+
+	throw;
+}
+
+std::string ActiveBasic::Common::Lexical::Operator_NaturalStringToCalcMarkString( const std::string &name )
+{
+	if( name[0] == 1 && name[1] == ESC_OPERATOR )
+	{
+		BYTE calcId = ToCalcId( name.c_str()+2 );
+		char temporary[255];
+		temporary[0] = name[0];
+		temporary[1] = name[1];
+		temporary[2] = calcId;
+		temporary[3] = 0;
+		return temporary;
+	}
+	return name;
+}
 
 std::string Symbol::GetFullName() const
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 603)
@@ -0,0 +1,614 @@
+#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/ab_common/src/Lexical/TypeDef.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 603)
@@ -0,0 +1,27 @@
+#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/ab_common/src/Lexical/Variable.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp	(revision 603)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp	(revision 603)
@@ -0,0 +1,124 @@
+#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 );
+}
Index: trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp	(revision 603)
@@ -1,6 +1,3 @@
 #include "stdafx.h"
-
-#include <Procedure.h>
-#include <CodeGenerator.h>
 
 
Index: trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp	(revision 603)
@@ -1,9 +1,4 @@
 #include "stdafx.h"
 
-#include <Program.h>
-#include <Compiler.h>
-#include <Class.h>
-
-#include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
 
Index: trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp	(revision 603)
@@ -1,9 +1,4 @@
 #include "stdafx.h"
 
-#include <CodeGenerator.h>
-#include <Compiler.h>
-#include <Variable.h>
-
-#include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
 
Index: trunk/ab5.0/abdev/compiler_x64/Opcode.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/Opcode.h	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/Opcode.h	(revision 603)
@@ -1,6 +1,4 @@
 #pragma once
 
-#include <Type.h>
-#include <Procedure.h>
 #include "MachineFixed.h"
 
Index: trunk/ab5.0/abdev/compiler_x64/compiler_x64.vcproj
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/compiler_x64.vcproj	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/compiler_x64.vcproj	(revision 603)
@@ -349,20 +349,4 @@
 					>
 					<File
-						RelativePath="..\BasicCompiler_Common\include\Class.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Const.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\DataTable.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Delegate.h"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\include\Enum.h"
 						>
@@ -373,53 +357,5 @@
 					</File>
 					<File
-						RelativePath="..\BasicCompiler_Common\include\Interface.h"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\include\LexicalScope.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Member.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Meta.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Method.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\NativeCode.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\ObjectModule.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Parameter.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Procedure.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Source.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Type.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\TypeDef.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Variable.h"
 						>
 					</File>
@@ -1275,85 +1211,9 @@
 					>
 					<File
-						RelativePath="..\BasicCompiler_Common\src\Class.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Const.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\DataTable.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Delegate.cpp"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\src\Exception.cpp"
 						>
 					</File>
 					<File
-						RelativePath="..\BasicCompiler_Common\src\Interface.cpp"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\src\LexicalScope.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Meta.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Method.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\NativeCode.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\ObjectModule.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								UsePrecompiledHeader="0"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								UsePrecompiledHeader="0"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Parameter.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Procedure.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Source.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Type.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\TypeDef.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Variable.cpp"
 						>
 					</File>
@@ -1374,4 +1234,12 @@
 					RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp"
 					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
 					<FileConfiguration
 						Name="Release|Win32"
Index: trunk/ab5.0/abdev/compiler_x64/stdafx.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x64/stdafx.h	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x64/stdafx.h	(revision 603)
@@ -42,21 +42,4 @@
 #include "../BasicCompiler_Common/common.h"
 
-#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 <Meta.h>
-#include <DataTable.h>
-#include <ObjectModule.h>
-
 #include <Exception.h>
 #include <Enum.h>
Index: trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 603)
@@ -1,11 +1,4 @@
 #include "stdafx.h"
 
-#include <Program.h>
-#include <Compiler.h>
-#include <LexicalScope.h>
-#include <Class.h>
-#include <Variable.h>
-
-#include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
 
Index: trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp	(revision 603)
@@ -1,10 +1,4 @@
 #include "stdafx.h"
 
-#include <LexicalScope.h>
-#include <CodeGenerator.h>
-#include <Compiler.h>
-#include <Variable.h>
-
-#include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
 
Index: trunk/ab5.0/abdev/compiler_x86/Opcode.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 603)
@@ -1,6 +1,4 @@
 #pragma once
 
-#include <Type.h>
-#include <Procedure.h>
 #include "MachineFixed.h"
 
Index: trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj	(revision 603)
@@ -1304,85 +1304,9 @@
 					>
 					<File
-						RelativePath="..\BasicCompiler_Common\src\Class.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Const.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\DataTable.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Delegate.cpp"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\src\Exception.cpp"
 						>
 					</File>
 					<File
-						RelativePath="..\BasicCompiler_Common\src\Interface.cpp"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\src\LexicalScope.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Meta.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Method.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\NativeCode.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\ObjectModule.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								UsePrecompiledHeader="0"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								UsePrecompiledHeader="0"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Parameter.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Procedure.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Source.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Type.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\TypeDef.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Variable.cpp"
 						>
 					</File>
@@ -1501,20 +1425,4 @@
 					>
 					<File
-						RelativePath="..\BasicCompiler_Common\include\Class.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Const.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\DataTable.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Delegate.h"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\include\Enum.h"
 						>
@@ -1525,53 +1433,5 @@
 					</File>
 					<File
-						RelativePath="..\BasicCompiler_Common\include\Interface.h"
-						>
-					</File>
-					<File
 						RelativePath="..\BasicCompiler_Common\include\LexicalScope.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Member.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Meta.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Method.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\NativeCode.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\ObjectModule.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Parameter.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Procedure.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Source.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Type.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\TypeDef.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Variable.h"
 						>
 					</File>
Index: trunk/ab5.0/abdev/compiler_x86/stdafx.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/stdafx.h	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/stdafx.h	(revision 603)
@@ -42,21 +42,4 @@
 #include "../BasicCompiler_Common/common.h"
 
-#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 <Meta.h>
-#include <DataTable.h>
-#include <ObjectModule.h>
-
 #include <Exception.h>
 #include <Enum.h>
Index: trunk/ab5.0/abdev/compiler_x86/x86CodeGenerator.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/x86CodeGenerator.cpp	(revision 602)
+++ trunk/ab5.0/abdev/compiler_x86/x86CodeGenerator.cpp	(revision 603)
@@ -1,6 +1,3 @@
 #include "stdafx.h"
-
-#include <Procedure.h>
-#include <CodeGenerator.h>
 
 
