Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp	(revision 759)
@@ -22,4 +22,5 @@
 
 BOOL CDebugThreadInfo::Reflesh(int ThreadNum){
+#if defined _WIN64 || !defined BUILD_X64_COMPILER
 	Free();
 
@@ -102,4 +103,7 @@
 
 	return 1;
+#else
+	return 0;
+#endif
 }
 
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Compile.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Compile.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Compile.cpp	(revision 759)
@@ -7,5 +7,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include "../BasicCompiler_Common/DebugSection.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
@@ -104,4 +104,5 @@
 		// オブジェクトモジュールリストに類似したソースコードリストを作成
 		BasicSources sources;
+		sources.reserve( compiler.staticLibraries.size() );
 		foreach( const ObjectModule *pObjectModule, compiler.staticLibraries )
 		{
@@ -240,4 +241,5 @@
 	int maxLineInfoNum = *(long *)(buffer+i2);
 	i2+=sizeof(long);
+	_oldSourceLines.reserve( maxLineInfoNum );
 	for(i3=0;i3<maxLineInfoNum;i3++){
 		int nativeCodePos = *(long *)(buffer+i2);
@@ -319,5 +321,5 @@
 
 	int pe_size;
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	IMAGE_NT_HEADERS64 pe_hdr;
 	pe_size=sizeof(IMAGE_NT_HEADERS64);
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Diagnose.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Diagnose.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Diagnose.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/MakeExe.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 759)
@@ -192,5 +192,5 @@
 
 			char coreFilePath[MAX_PATH];
-#if defined _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 			sprintf( coreFilePath, "..\\lib\\x64\\%s", coreFileName );
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Object.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Object.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Object.cpp	(revision 759)
@@ -5,5 +5,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/OldStatement.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/OldStatement.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/OldStatement.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include "common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Overload.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Overload.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Overload.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/PESchedule.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/PESchedule.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/PESchedule.cpp	(revision 759)
@@ -5,5 +5,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/ParamImpl.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 759)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/RSrcSection.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/RSrcSection.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/RSrcSection.cpp	(revision 759)
@@ -864,5 +864,5 @@
 
 		//プラットフォームをセット
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 		temporary=PermutationString(temporary,"#PLATFORM#","amd64");
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 759)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 759)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
@@ -74,5 +74,5 @@
 			break;
 	}
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	return IsPtrType(type);
 #else
@@ -93,5 +93,5 @@
 			break;
 	}
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	if(IsPtrType(type)) return DEF_INT64;
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/WatchList.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/WatchList.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/WatchList.cpp	(revision 759)
@@ -5,5 +5,5 @@
 #include "common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/calculation.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/calculation.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/calculation.cpp	(revision 759)
@@ -5,5 +5,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/common.h
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/common.h	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/common.h	(revision 759)
@@ -6,5 +6,5 @@
 #include <option.h>
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/resource.h"
 #include "../compiler_x64/CommandValue.h"
@@ -39,5 +39,5 @@
 
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	#define PLATFORM	64
 #else
@@ -55,5 +55,5 @@
 #endif
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	#ifndef IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
 		#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER    240
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/gc.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/gc.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/gc.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include <Compiler.h>
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/hash.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/hash.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/hash.cpp	(revision 759)
@@ -5,5 +5,5 @@
 #include "../BasicCompiler_Common/common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/CodeGenerator.h
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/CodeGenerator.h	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/CodeGenerator.h	(revision 759)
@@ -3,5 +3,5 @@
 #include <LexicalScope.h>
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/MachineFixed.h"
 #else
@@ -303,5 +303,5 @@
 
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	/////////////////////////////////////////////////////////////////
 	// 64ビット機械語生成
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/ver.h
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/ver.h	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/include/ver.h	(revision 759)
@@ -7,4 +7,6 @@
 #ifdef _AMD64_
 #define VER_INFO		"(x64)"
+#elif defined BUILD_X64_COMPILER
+#define VER_INFO        "(x64 on x86)"
 #else
 #define VER_INFO		""
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp	(revision 759)
@@ -3,5 +3,5 @@
 #include <CodeGenerator.h>
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/opcode.h"
 #else
@@ -329,5 +329,5 @@
 void CodeGenerator::op_AddNeedFreeTempStructure( int reg )
 {
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 	//////////////////////////////////////////////////////
 	/////    レジスタ資源のバックアップ
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Exception.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Exception.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Exception.cpp	(revision 759)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/opcode.h"
 #else
@@ -395,5 +395,5 @@
 	}
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 	//mov rax,catchAddress
 	const PertialSchedule *pPertialSchedule = compiler.codeGenerator.op_mov_RV( sizeof(long), REG_RAX, 0, Schedule::DataTable, true );
@@ -408,5 +408,5 @@
 	int dataTableOffset = compiler.GetObjectModule().dataTable.Add( static_cast<LONG_PTR>(0) );
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 	//mov rax,dataTableOffset
 	compiler.codeGenerator.op_mov_RV( sizeof(_int64), REG_RAX, dataTableOffset, Schedule::DataTable);
@@ -426,5 +426,5 @@
 	}
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 	//mov rax,finallyAddress
 	const PertialSchedule *pPertialSchedule = compiler.codeGenerator.op_mov_RV( sizeof(long), REG_RAX, 0, Schedule::CatchAddress, true );
@@ -439,5 +439,5 @@
 	int dataTableOffset = compiler.GetObjectModule().dataTable.Add( static_cast<LONG_PTR>(0) );
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 	//mov rax,dataTableOffset
 	compiler.codeGenerator.op_mov_RV( sizeof(_int64), REG_RAX, dataTableOffset, Schedule::DataTable);
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 759)
@@ -2,5 +2,5 @@
 
 #include "../common.h"
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/opcode.h"
 #else
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalScope.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalScope.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/LexicalScope.cpp	(revision 759)
@@ -6,5 +6,5 @@
 #include "../common.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/opcode.h"
 #else
@@ -125,5 +125,5 @@
 			//メモリを解放する
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 			//x64ビットコード
 
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Linker.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Linker.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/Linker.cpp	(revision 759)
@@ -22,5 +22,5 @@
 		if( schedule.GetType() == Schedule::DataTable )
 		{
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 			dataTable.OverwriteInt64(
 				schedule.GetOffset(),
@@ -62,5 +62,5 @@
 			{
 				// 置き換える値が0の場合を除く
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 				dataTable.OverwriteInt64(
 					schedule.GetOffset(),
@@ -85,5 +85,5 @@
 		if( schedule.GetType() == Schedule::DllProc )
 		{
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 			nativeCode.Overwrite(
 				schedule.GetOffset(),
@@ -192,5 +192,5 @@
 			LONG_PTR vtblOffset = schedule.GetClass().GetComVtblOffset();
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 			dataTable.OverwriteInt64(
 				schedule.GetOffset(),
@@ -209,5 +209,5 @@
 			LONG_PTR vtblMasterListOffset = schedule.GetClass().GetVtblMasterListOffset();
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 			dataTable.OverwriteInt64(
 				schedule.GetOffset(),
@@ -232,5 +232,5 @@
 			LONG_PTR typeInfoDataTableOffset = schedule.GetClass().GetTypeInfoDataTableOffset();
 
-#ifdef _WIN64
+#if defined _WIN64 || defined BUILD_X64_COMPILER
 			dataTable.OverwriteInt64(
 				schedule.GetOffset(),
Index: branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp
===================================================================
--- branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp	(revision 758)
+++ branches/x64_compiler_on_32/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp	(revision 759)
@@ -1,5 +1,5 @@
 #include "stdafx.h"
 
-#ifdef _AMD64_
+#if defined _AMD64_ || defined BUILD_X64_COMPILER
 #include "../../compiler_x64/opcode.h"
 #else
