Index: trunk/abdev/BasicCompiler_Common/include/Meta.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Meta.h	(revision 279)
+++ trunk/abdev/BasicCompiler_Common/include/Meta.h	(revision 280)
@@ -75,5 +75,5 @@
 
 	// 静的リンク
-	void StaticLink( Meta &meta, long dataSectionBaseOffset );
+	void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );
 
 	const NamespaceScopesCollection &GetNamespaces() const
Index: trunk/abdev/BasicCompiler_Common/include/NativeCode.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/NativeCode.h	(revision 279)
+++ trunk/abdev/BasicCompiler_Common/include/NativeCode.h	(revision 280)
@@ -130,4 +130,5 @@
 	int lineNum;
 	long nativeCodePos;
+	int sourceIndex;
 	long sourceCodePos;
 	DWORD codeType;
@@ -142,4 +143,5 @@
 		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 );
@@ -147,7 +149,8 @@
 
 public:
-	SourceLine( int lineNum, int nativeCodePos, int sourceCodePos, DWORD codeType )
+	SourceLine( int lineNum, int nativeCodePos, int sourceIndex, int sourceCodePos, DWORD codeType )
 		: lineNum( lineNum )
 		, nativeCodePos( nativeCodePos )
+		, sourceIndex( sourceIndex )
 		, sourceCodePos( sourceCodePos )
 		, codeType( codeType )
@@ -165,4 +168,12 @@
 	{
 		return nativeCodePos;
+	}
+	int GetSourceIndex() const
+	{
+		return sourceIndex;
+	}
+	void SetSourceIndex( int sourceIndex )
+	{
+		this->sourceIndex = sourceIndex;
 	}
 	long GetSourceCodePos() const
@@ -366,3 +377,4 @@
 
 	void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
+	void ResetSourceIndexes( long sourceIndexBase );
 };
Index: trunk/abdev/BasicCompiler_Common/include/ObjectModule.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/ObjectModule.h	(revision 279)
+++ trunk/abdev/BasicCompiler_Common/include/ObjectModule.h	(revision 280)
@@ -13,6 +13,8 @@
 	DataTable dataTable;
 
+private:
 	// ソースコード
-	BasicSource source;
+	int currentSourceIndex;
+	BasicSources sources;
 
 	// XMLシリアライズ用
@@ -30,9 +32,35 @@
 		ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
 		ar & BOOST_SERIALIZATION_NVP( dataTable );
-		ar & BOOST_SERIALIZATION_NVP( source );
+		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 );
Index: trunk/abdev/BasicCompiler_Common/include/Source.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Source.h	(revision 279)
+++ trunk/abdev/BasicCompiler_Common/include/Source.h	(revision 280)
@@ -11,12 +11,4 @@
 
 #include <BoostSerializationSupport.h>
-
-using namespace std;
-
-struct INCLUDEFILEINFO{
-	char **ppFileNames;
-	int FilesNum;
-	int LineOfFile[MAX_LEN];
-};
 
 class IncludedFilesRelation
@@ -87,4 +79,11 @@
 		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(){
@@ -195,4 +194,9 @@
 public:
 	BasicSource(){}
+	BasicSource( const BasicSource &basicSource )
+		: Text( basicSource )
+		, includedFilesRelation( basicSource.includedFilesRelation )
+	{
+	}
 	~BasicSource(){}
 
@@ -222,5 +226,5 @@
 	void Addition( const char *buffer );
 
-	bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName );
+	bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const;
 
 	void operator = ( const BasicSource &source ){
@@ -238,2 +242,3 @@
 	}
 };
+typedef std::vector<BasicSource> BasicSources;
