Index: /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.rc
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.rc	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.rc	(revision 482)
@@ -0,0 +1,412 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// 日本語 resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+#ifdef _WIN32
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(JPN) DIALOG DISCARDABLE  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG DISCARDABLE  0, 0, 205, 229
+#endif
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler(64bit)"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "コンパイル",IDOK,148,208,50,14
+    LTEXT           "出力先:",IDC_STATIC,7,10,23,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,
+                    179,14
+    GROUPBOX        "進行状況",IDC_STATIC,7,31,191,45
+    LTEXT           "準備中...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "メッセージ リスト",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "エラー",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,13,97,35,10
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | 
+                    WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version",IDC_STATIC_VERSION,7,214,140,8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(JPN) DIALOG DISCARDABLE  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG DISCARDABLE  0, 0, 215, 199
+#endif
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "ブレーク ポイント"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "閉じる",IDCANCEL,165,6,50,14
+    LTEXT           "対象領域:",IDC_STATIC,2,9,30,8
+    LTEXT           "対象スレッド:",IDC_STATIC,2,26,38,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | 
+                    TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+                    0,88,215,111
+    CONTROL         "グローバル",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,43,6,47,14
+    CONTROL         "ローカル",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,92,6,47,14
+    LTEXT           "プロシージャ:",IDC_STATIC,2,43,39,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "システム変数を表示しない",IDC_HIDESYSVAR,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,117,44,93,10
+    PUSHBUTTON      "ステップ(IN)",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "ステップ(OVER)",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(JPN) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "コンパイル",IDOK,0,0,37,13
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | 
+                    NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,14,129,74,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "ビルド",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,20,37,12
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,34,37,12
+    EDITTEXT        IDC_DEBUGLIST,38,15,179,73,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH,
+                    38,1,293,12
+    LTEXT           "準備中...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,
+                    WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(ENG) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "Compile",IDOK,0,0,37,11
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | 
+                    NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,13,129,75,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,17,37,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,0,28,37,10
+    EDITTEXT        IDC_DEBUGLIST,38,14,179,74,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH,
+                    38,0,293,12
+    LTEXT           "Waiting...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,
+                    WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,13,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(ENG) DIALOG DISCARDABLE  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG DISCARDABLE  0, 0, 205, 229
+#endif
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler&Debugger"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "Compile",IDOK,148,208,50,14
+    LTEXT           "Output:",IDC_STATIC,7,10,22,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,
+                    179,14
+    GROUPBOX        "Advance situation",IDC_STATIC,7,31,191,45
+    LTEXT           "ready...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "Message list",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | 
+                    WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,13,97,30,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | 
+                    WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version 4.00 Global Edition beta1",IDC_STATIC,7,214,98,
+                    8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(ENG) DIALOG DISCARDABLE  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG DISCARDABLE  0, 0, 215, 199
+#endif
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Breakpoint"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "Close",IDCANCEL,165,6,50,14
+    LTEXT           "Level:",IDC_STATIC,2,9,18,8
+    LTEXT           "Thread:",IDC_STATIC,2,26,22,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | 
+                    TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
+                    0,88,215,111
+    CONTROL         "Global",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,43,6,47,14
+    CONTROL         "Local",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | 
+                    BS_PUSHLIKE,92,6,47,14
+    LTEXT           "Procedure:",IDC_STATIC,2,43,31,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "Hide system variables",IDC_HIDESYSVAR,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,117,44,81,10
+    PUSHBUTTON      "Step In",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "Step Over",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(JPN) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "対象スレッド:",IDC_STATIC,5,21,38,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    LTEXT           "プロシージャ:",IDC_STATIC,5,49,39,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,
+                    WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | 
+                    LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,
+                    WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+IDD_DEBUGGER_TOOLBARBASE DIALOG DISCARDABLE  0, 0, 62, 15
+STYLE WS_CHILD | WS_VISIBLE
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+END
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(ENG) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "Thread:",IDC_STATIC,5,21,22,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | 
+                    WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Procedure:",IDC_STATIC,5,49,31,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,
+                    WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | 
+                    LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,
+                    WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    "IDD_MAIN$(JPN)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(JPN)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    "IDD_MAIN$(ENG)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(ENG)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    IDD_DEBUGGER_TOOLBARBASE, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 55
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 8
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MAIN                ICON    DISCARDABLE     "icon1.ico"
+IDI_VARSTRUCT           ICON    DISCARDABLE     "VarStruct.ico"
+IDI_VARDATA             ICON    DISCARDABLE     "VarData.ico"
+IDI_VARSTR              ICON    DISCARDABLE     "VarStr.ico"
+IDI_VARARRAY            ICON    DISCARDABLE     "VarArray.ico"
+IDI_VARPTRSTRUCT        ICON    DISCARDABLE     "VarPtrStruct.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Toolbar
+//
+
+IDR_DEBUGGERTOOLBAR TOOLBAR DISCARDABLE  16, 15
+BEGIN
+    BUTTON      IDC_DEBUG_START
+    BUTTON      IDC_DEBUG_STEPOVER
+    BUTTON      IDC_DEBUG_STEPIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDR_DEBUGGERTOOLBAR     BITMAP  DISCARDABLE     "toolbar_debugger.bmp"
+IDR_DEBUGGERTOOLBAR_DISABLED BITMAP  DISCARDABLE     "toolbar_debugger_disable.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_DEBUGGER_VARLIST_MENU MENU DISCARDABLE 
+BEGIN
+    POPUP "dummy"
+    BEGIN
+        MENUITEM "一般システム変数を表示する",  IDM_SHOW_DEFAULTSYSTEM_VAR
+        MENUITEM "RADシステム変数を表示する",   IDM_SHOW_RAD_VAR
+        MENUITEM "GUID変数を表示する",          IDM_SHOW_GUID_VAR
+    END
+END
+
+#endif    // 日本語 resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Index: /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.vcproj
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.vcproj	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/BasicCompiler.vcproj	(revision 482)
@@ -0,0 +1,1400 @@
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BasicCompiler"
+	ProjectGUID="{864B921B-423B-4F9E-9E6B-31B15968EDF9}"
+	RootNamespace="BasicCompiler"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\build\$(ConfigurationName)\bin\x64"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/GR"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/BasicCompiler.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CallingConvention="0"
+				DisableSpecificWarnings="4103"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:AMD64"
+				AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib imagehlp.lib shlwapi.lib"
+				OutputFile="$(OutDir)\abc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="..\..\jenga\lib\amd64;..\lib\amd64"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Debug/BasicCompiler64.pdb"
+				SubSystem="1"
+				StackReserveSize="4194304"
+				TargetMachine="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="$(ProjectDir)\manifest.xml"
+				EmbedManifest="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="$(OutDir)/$(ProjectName).bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\build\$(ConfigurationName)\bin\x64"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/GR"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				WholeProgramOptimization="false"
+				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
+				MinimalRebuild="false"
+				ExceptionHandling="1"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CallingConvention="0"
+				DisableSpecificWarnings="4103"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:AMD64"
+				AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib imagehlp.lib shlwapi.lib"
+				OutputFile="$(OutDir)\abc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="..\..\jenga\lib\amd64;..\lib\amd64"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="false"
+				ProgramDatabaseFile=".\Release/BasicCompiler64.pdb"
+				SubSystem="1"
+				TargetMachine="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="$(ProjectDir)\manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="$(OutDir)/$(ProjectName).bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+		<ProjectReference
+			ReferencedProjectIdentifier="{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}"
+			RelativePathToProject="..\jenga\projects\jenga\jenga.vcproj"
+		/>
+		<ProjectReference
+			ReferencedProjectIdentifier="{87835C33-64C9-4BA5-9B39-608BA5394387}"
+			RelativePathToProject=".\ab_common\ab_common.vcproj"
+		/>
+	</References>
+	<Files>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicCompiler.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicFixed.h"
+				>
+			</File>
+			<File
+				RelativePath="CommandValue.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\common.h"
+				>
+			</File>
+			<File
+				RelativePath=".\MachineFixed.h"
+				>
+			</File>
+			<File
+				RelativePath="Opcode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\include\option.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\include\ver.h"
+				>
+			</File>
+			<Filter
+				Name="言語対応文字列"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_eng.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_jpn.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Parts_h"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\NonVolatile.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\BoostSerializationSupport.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Hashmap.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\logger.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Compiler Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\CodeGenerator.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Compiler.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Linker.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Messenger.h"
+					>
+				</File>
+				<Filter
+					Name="Language Classes"
+					>
+					<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"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Exception.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\Namespace.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\NamespaceSupporter.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\Prototype.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Source.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Symbol.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>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Debugger Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Debugger.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Application Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Configuration.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Program.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="icon1.ico"
+				>
+			</File>
+			<File
+				RelativePath="toolbar_debugger.bmp"
+				>
+			</File>
+			<File
+				RelativePath="VarArray.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarData.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarPtrStruct.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStr.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStruct.ico"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="BasicCompiler.rc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions="_DEBUG;JPN;$(NoInherit)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions="_DEBUG;JPN;$(NoInherit)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="x64Compile"
+				>
+				<File
+					RelativePath="Compile_Statement.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="Compile_Var.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="MakePeHdr.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="Register.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="2"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<Filter
+					Name="Calculation"
+					>
+					<File
+						RelativePath="Compile_Calc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Calc_PushVar.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Set_Var.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\increment.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Arithmetic.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Logical.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Relation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_TypeOperation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Object"
+					>
+					<File
+						RelativePath=".\Compile_Object.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Opcode"
+					>
+					<File
+						RelativePath="amd64_main.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\CodeGenerator.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\stack_frame.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath=".\CLockParameter.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\Compile_CallProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Func.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_ProcOp.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\CParameter.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\OperatorProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								UsePrecompiledHeader="2"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="32及び64共通"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\BasicCompiler.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\calculation.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Compile.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Diagnose.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\error.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\gc.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\hash.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\MakeExe.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\NumOpe_GetType.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Object.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\OldStatement.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Overload.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\RSrcSection.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\StrOperation.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\StrOperation.h"
+					>
+				</File>
+				<Filter
+					Name="Intermediate"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\CommandFormat.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step1.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step2.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Resource.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\NonVolatile.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Debug（共通）"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\CDebugThreadInfo.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Debug.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\debug.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugMiddleFile.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugSection.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VarList.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\WatchList.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Schedule"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Variable"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\ParamImpl.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Subroutine.cpp"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalOptions="/bigobj"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalOptions="/bigobj"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Compiler Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\CodeGenerator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Compiler.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Linker.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Messenger.cpp"
+					>
+				</File>
+				<Filter
+					Name="Language Classes"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Class.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Class_Collect.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\CommonCodeGenerator.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\Enum.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Exception.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\Namespace.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\NamespaceSupporter.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\Symbol.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>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Application Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Program.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /trunk/ab5.0/abdev/compiler_x64/CLockParameter.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/CLockParameter.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/CLockParameter.cpp	(revision 482)
@@ -0,0 +1,17 @@
+#include "stdafx.h"
+
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+CDBLockParms::CDBLockParms(){
+}
+CDBLockParms::~CDBLockParms(){
+}
+void CDBLockParms::lock(int level){
+	array_LevelCount[level]++;
+}
+void CDBLockParms::unlock(int level){
+	array_LevelCount[level]--;
+}
+
+CDBLockParms obj_DBLockParms;
Index: /trunk/ab5.0/abdev/compiler_x64/CParameter.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/CParameter.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/CParameter.cpp	(revision 482)
@@ -0,0 +1,513 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+int ParamImpl::NewTempParameters( const string &procName, const Parameters &params, int SecondParmNum ){
+	if( SecondParmNum == -1 ) SecondParmNum = (int)params.size();
+
+	///////////////////////////////////////////////////////
+	// 一時オブジェクトをあらかじめスタックに積んでおく
+	///////////////////////////////////////////////////////
+
+	int stackItemNum = 0;
+
+	useTempObject = false;
+
+	BOOL bEllipse;
+	if(params.size()){
+		if(params[params.size()-1]->GetBasicType()==DEF_ELLIPSE) bEllipse=1;
+		else bEllipse=0;
+	}
+	else bEllipse=0;
+
+	for(int i2=ParmsNum-1;i2>=0;i2--){
+		useTempParameters[i2] = false;
+
+		if(bEllipse&&i2<=(int)params.size()-2) bEllipse=0;
+
+		if(i2==0){
+			if( params[i2]->GetVarName() == "_System_LocalThis" ){
+				//オブジェクトメンバの第一パラメータのThisポインタ
+				continue;
+			}
+		}
+		if( i2==0||i2==1 ){
+			if( params[i2]->GetVarName() == procName ){
+				//オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト
+				continue;
+			}
+		}
+
+		Type dummyType;
+		BOOL bByVal;
+		if(bEllipse){
+			NumOpe_GetType( Parms[i2], Type(), dummyType );
+			bByVal=1;
+		}
+		else{
+			dummyType = *params[i2];
+			bByVal = ( params[i2]->IsRef() == false ) ? TRUE:FALSE;
+		}
+
+
+		if( !bByVal ){
+			//ポインタ参照
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				//ポインタ指定
+				continue;
+			}
+
+			if( !GetVarType( Parms[i2], Type(), FALSE ) ){
+				//変数ではないとき
+				int reg = REG_RAX;
+				Type calcType;
+				bool isNeedHeapFreeStructure;
+				NumOpe( &reg, Parms[i2], dummyType, calcType, &isNeedHeapFreeStructure );
+
+				if( !calcType.IsStruct() ){
+					//一時参照を作成
+					pobj_sf->push( reg );
+					pobj_sf->mov_sp( reg );
+
+					stackItemNum++;
+				}
+
+				//スタックフレームへコピー
+				StackOffsetOfTempObject[i2] = pobj_sf->push(reg);
+
+				stackItemNum++;
+
+				bool result = CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i2);
+
+				if( result )
+				{
+					useTempParameters[i2] = true;
+					isNeedFreeStructures[i2] = isNeedHeapFreeStructure;
+					useTempObject = true;
+
+					types[i2] = calcType;
+				}
+			}
+		}
+	}
+
+	return stackItemNum * PTR_SIZE;
+}
+void ParamImpl::DeleteTempParameters(){
+	///////////////////////////////////////////////////////
+	// 一時オブジェクトを破棄
+	///////////////////////////////////////////////////////
+	if( !useTempObject ) return;
+
+	for(int i2=ParmsNum-1;i2>=0;i2--){
+		if( useTempParameters[i2] ){
+			if( types[i2].IsStruct() ){
+				// 構造体の一時メモリ
+
+				if( isNeedFreeStructures[i2] )
+				{
+					//メモリを解放する
+
+					pobj_sf->pop( REG_RCX );
+
+					//call free
+					extern const UserProc *pSub_free;
+					compiler.codeGenerator.op_call(pSub_free);
+				}
+				else
+				{
+					pobj_sf->pop();
+				}
+			}
+			else
+			{
+				pobj_sf->pop();
+				pobj_sf->pop();
+			}
+		}
+	}
+}
+
+void ParamImpl::SetStructParameter( int reg, const Type &baseType, const char *expression ){
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+		int object_size = baseType.GetClass().GetSize();
+
+		//mov rcx,object_size
+		compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RCX,object_size);
+
+		//call calloc
+		extern const UserProc *pSub_calloc;
+		compiler.codeGenerator.op_call(pSub_calloc);
+
+		//mov r11,rax
+		compiler.codeGenerator.op_mov_RR(REG_R11,REG_RAX);
+
+		//mov qword ptr[rsp+offset],r11     ※スタックフレームを利用
+		pobj_sf->push(REG_R11);
+
+
+		Type calcType;
+		bool isNeedHeapFreeStructure;
+		int temp_reg=REG_RAX;
+		NumOpe( &temp_reg,
+			expression,
+			baseType,
+			calcType,
+			&isNeedHeapFreeStructure );
+
+
+		//mov r11,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->ref(REG_R11);
+
+
+		RELATIVE_VAR RelativeVar;
+		RelativeVar.bOffsetOffset=0;
+		RelativeVar.offset=0;
+		RelativeVar.dwKind=VAR_DIRECTMEM;
+
+		SetStructVariableFromRax(
+			baseType,
+			calcType,
+			&RelativeVar,isNeedHeapFreeStructure);
+
+
+		//mov r11,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R11);
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+
+	//mov reg,r11
+	compiler.codeGenerator.op_mov_RR(reg,REG_R11);
+}
+
+
+void ParamImpl::SetParameter( const string &procName, const Parameters &params, int SecondParmNum, const UserProc *pUserProc ){
+	if( SecondParmNum == -1 ) SecondParmNum = (int)params.size();
+
+	///////////////////////////////////////////////////////////
+	// パラメータをレジスタ及びスタックフレームにセット
+	///////////////////////////////////////////////////////////
+	int i2,i3;
+
+	BOOL bEllipse;
+	if( params.size() ){
+		if(params[params.size()-1]->GetBasicType()==DEF_ELLIPSE) bEllipse=1;
+		else bEllipse=0;
+	}
+	else bEllipse=0;
+
+	BOOL bHas_System_LocalThis=0;
+	if(ParmsNum>=1){
+		if( params[0]->GetVarName() == "_System_LocalThis" ){
+			bHas_System_LocalThis=1;
+		}
+	}
+
+	//戻り値用の変数名を取得
+	const char *lpszVarNameToReturn = (procName[0]==1&&procName[1]==ESC_OPERATOR)?"_System_ReturnValue":procName.c_str();
+
+	//パラメータをレジスタとスタックに格納
+	int ParmSize=0;
+	int reg,temp_reg;
+	RELATIVE_VAR RelativeVar;
+	for(i2=ParmsNum-1;i2>=0;i2--){
+		if(bEllipse&&i2<=(int)params.size()-2) bEllipse=0;
+
+		if(i2==0){
+			if( params[i2]->GetVarName() == "_System_LocalThis" ){
+				//オブジェクトメンバの第一パラメータのThisポインタ
+				continue;
+			}
+		}
+		if(i2==0||i2==1){
+			if( params[i2]->GetVarName() == lpszVarNameToReturn ){
+				//オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト
+				continue;
+			}
+		}
+
+		Type dummyType;
+		BOOL bByVal;
+		if(bEllipse){
+			NumOpe_GetType( Parms[i2], Type(), dummyType );
+			bByVal=1;
+		}
+		else{
+			dummyType = *params[i2];
+			bByVal = ( params[i2]->IsRef() == false ) ? TRUE:FALSE;
+
+			// 型パラメータを解決
+			ResolveFormalGenericTypeParameter( dummyType, leftType, pUserProc );
+		}
+
+		int xmm_temp_sw=0;
+		if(dummyType.IsReal()&&bByVal){
+			//実数型
+			if(i2==0) reg=REG_XMM0;
+			else if(i2==1) reg=REG_XMM1;
+			else if(i2==2) reg=REG_XMM2;
+			else if(i2==3) reg=REG_XMM3;
+			else{
+				reg=REG_XMM0;
+				xmm_temp_sw=1;
+			}
+		}
+		else{
+			//整数型
+			if(i2==0) reg=REG_RCX;
+			else if(i2==1) reg=REG_RDX;
+			else if(i2==2) reg=REG_R8;
+			else if(i2==3) reg=REG_R9;
+			else reg=REG_RAX;
+		}
+
+		if(bByVal==1){
+			//値参照
+
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				char temp2[255];
+				sprintf(temp2,"%s関数の第%dパラメータ",procName,i2+1);
+				compiler.errorMessenger.Output(19,temp2,cp);
+				continue;
+			}
+
+			if( dummyType.IsStruct() ){
+				SetStructParameter( reg, dummyType, Parms[i2] );
+				goto next;
+			}
+
+			temp_reg=reg;
+
+			Type calcType;
+			bool isNeedHeapFreeStructure;
+			if( !NumOpe( &temp_reg, Parms[i2], dummyType, calcType, &isNeedHeapFreeStructure ) ){
+				break;
+			}
+
+			if( calcType.IsObject() ){
+				if( !dummyType.IsObject()
+					||
+					dummyType.IsObject() &&
+					!dummyType.GetClass().IsEqualsOrSubClass( &calcType.GetClass() ) ){
+						//キャスト演算子のオーバーロードに対応する
+						CallCastOperatorProc( reg, calcType, isNeedHeapFreeStructure,dummyType );
+				}
+			}
+
+
+			if(bEllipse){
+				if( calcType.IsReal() ){
+					//整数レジスタへコピー
+					//※cdeclの拡張パラメータは実数の場合も汎用レジスタで引渡し
+
+					if(0<=i2&&i2<=3){
+						if(i2==0) reg=REG_RCX;
+						else if(i2==1) reg=REG_RDX;
+						else if(i2==2) reg=REG_R8;
+						else if(i2==3) reg=REG_R9;
+
+						//movd reg,temp_reg
+						compiler.codeGenerator.op_movd_RX(reg,temp_reg);
+					}
+				}
+				else if( calcType.IsWhole() ){
+					//整数型の場合は、64ビットへ拡張する
+					ExtendTypeTo64( calcType.GetBasicType(), temp_reg );
+				}
+			}
+			else{
+				//型チェック
+				// TODO: _System_ReturnValueが考慮されていない？
+				if(bHas_System_LocalThis) i3=i2-1;
+				else i3=i2;
+				CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i3);
+
+				if( dummyType.IsDouble() ){
+					//Double型へ変換
+					ChangeTypeToXmm_Double(calcType.GetBasicType(),reg,temp_reg);
+				}
+				else if( dummyType.IsSingle() ){
+					//Single型へ変換
+					ChangeTypeToXmm_Single(calcType.GetBasicType(),reg,temp_reg);
+				}
+				else if( dummyType.IsWhole() ){
+					//実数型 → 整数型
+					ChangeTypeToWhole(calcType,dummyType,reg,temp_reg);
+				}
+			}
+		}
+		else{
+			//ポインタ参照
+			if(Parms[i2][0]==1&&Parms[i2][1]==ESC_BYVAL){
+				//ポインタ指定
+
+				temp_reg=reg;
+				Type calcType;
+				if( !NumOpe(&temp_reg, Parms[i2]+2, dummyType, calcType) ){
+					break;
+				}
+
+				dummyType.PtrLevelUp();
+
+				//型チェック
+				if(bHas_System_LocalThis) i3=i2-1;
+				else i3=i2;
+				CheckDifferentType(
+					dummyType,
+					calcType,
+					procName.c_str(),
+					i3);
+
+				if( calcType.IsReal() ){
+					//実数型 → 整数型
+					ChangeTypeToWhole( calcType, Type(DEF_QWORD), reg, temp_reg );
+				}
+			}
+			else{
+				if( useTempParameters[i2] ){
+					//一時オブジェクトをコピー
+
+					//mov reg, qword ptr[rsp+offset]
+					pobj_sf->ref_offset_data( reg, StackOffsetOfTempObject[i2] );
+				}
+				else{
+					//変数のアドレスを取得
+					Type varType;
+					if(GetVarOffset(
+						false,
+						false,
+						Parms[i2],
+						&RelativeVar,
+						varType)){
+
+							if( !dummyType.IsAny() ){
+								//型チェックを行う
+								if( dummyType.GetBasicType() == varType.GetBasicType() ){
+									if( dummyType.IsObject() ){
+										if( !dummyType.GetClass().IsEqualsOrSubClass( &varType.GetClass() ) ){
+											compiler.errorMessenger.Output(11,Parms[i2],cp);
+										}
+									}
+									else if( dummyType.IsStruct() ){
+										if( !dummyType.GetClass().IsEquals( &varType.GetClass() ) ){
+											compiler.errorMessenger.Output(11,Parms[i2],cp);
+										}
+									}
+								}
+								else if( (varType.GetBasicType()&FLAG_PTR)
+									&&((varType.GetBasicType()^FLAG_PTR)==dummyType.GetBasicType())){
+									//仮引数がポインタ参照で、実引数が配列の先頭ポインタのとき
+								}
+								else{
+									compiler.errorMessenger.Output(11,Parms[i2],cp);
+								}
+							}
+
+							//変数アドレスをレジスタにセット
+							SetVarPtrToReg(reg,&RelativeVar);
+
+					}
+				}
+			}
+		}
+
+next:
+
+		if(reg==REG_RAX){
+			//スタックフレームへコピー
+			//mov qword ptr[rsp+offset],rax
+			compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,REG_RSP,i2*sizeof(_int64),MOD_BASE_DISP32);
+		}
+		else if(xmm_temp_sw){
+			//スタックフレームへコピー
+
+			//movlpd qword ptr[rsp+offset],xmm0
+			compiler.codeGenerator.op_movlpd_MR(REG_XMM0,REG_RSP,i2*sizeof(_int64),MOD_BASE_DISP32);
+		}
+
+
+		/////////////////////
+		// レジスタをロック
+		/////////////////////
+
+		if(0<=i2&&i2<=3){
+			//	※rcx, rdx, r8, r9の場合のみ
+			pobj_BlockReg->lock(reg);
+		}
+	}
+
+	//パラメータが収まるだけのスタックフレームを確保
+	pobj_sf->parameter_allocate((int)params.size()*sizeof(_int64)+   sizeof(_int64)/*ret用*/  );
+}
+void ParamImpl::BackupParameter(int pi_num){
+	///////////////////////////////////////////////////////////
+	// スタックフレームに存在する既存のパラメータをバックアップ
+	///////////////////////////////////////////////////////////
+	int i2;
+
+	for(i2=0;i2<ParmsNum;i2++){
+		/////////////////////
+		// バックアップ
+		/////////////////////
+
+		extern CDBLockParms obj_DBLockParms;
+		if(obj_DBLockParms.array_LevelCount[i2]){
+			//mov r14,qword ptr[rsp+offset]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R14,REG_RSP,i2*sizeof(_int64),MOD_BASE_DISP32);
+
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+
+		if(3<i2){
+			//スタックフレームをロック
+			extern CDBLockParms obj_DBLockParms;
+			obj_DBLockParms.lock(i2);
+		}
+	}
+}
+void ParamImpl::RestoreParameter(int pi_num){
+	///////////////////////////////////////////////////////////
+	// スタックフレームに存在する既存のパラメータを復元
+	///////////////////////////////////////////////////////////
+	int i2;
+
+	for(i2=ParmsNum-1;i2>=0;i2--){
+		/////////////////////
+		// 復元
+		/////////////////////
+
+		if(3<i2){
+			//スタックフレームをアンロック
+			extern CDBLockParms obj_DBLockParms;
+			obj_DBLockParms.unlock(i2);
+		}
+
+		extern CDBLockParms obj_DBLockParms;
+		if(obj_DBLockParms.array_LevelCount[i2]){
+			//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(REG_R14);
+
+			//mov qword ptr[rsp+offset],r14
+			compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_R14,REG_RSP,i2*sizeof(_int64),MOD_BASE_DISP32);
+		}
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/CodeGenerator.cpp	(revision 482)
@@ -0,0 +1,1754 @@
+#include "stdafx.h"
+
+#include <Procedure.h>
+#include <CodeGenerator.h>
+
+
+//////////////////////
+// rexプリフィックス
+//////////////////////
+void CodeGenerator::set_rex(int op_size,int reg,int index_reg,int base_reg){
+	char RexByte;
+
+	if(reg==REG_NON&&index_reg==REG_NON){
+		/////////////////////////////////////
+		// レジスタをr/mのみに指定するとき
+		/////////////////////////////////////
+
+		if((base_reg&0x08)==0){
+			if(op_size==sizeof(char)&&(base_reg&0x04)){
+				// r/m に spl,bpl,sil,dilを指定するとき
+				RexByte=0x40;
+			}
+			else RexByte=0;
+		}
+		else RexByte=(char)0x41;
+	}
+	else{
+		/////////////////
+		// 通常
+		/////////////////
+
+		if((reg&0x08)==0){
+			//reg … rax～rdi
+
+			if((index_reg&0x08)==0){
+				if((base_reg&0x08)==0) RexByte=0;
+				else RexByte=(char)0x41;
+			}
+			else{
+				if((base_reg&0x08)==0) RexByte=(char)0x42;
+				else RexByte=(char)0x43;
+			}
+		}
+		else{
+			//reg … r8～r15
+
+			if((index_reg&0x08)==0){
+				if((base_reg&0x08)==0) RexByte=(char)0x44;
+				else RexByte=(char)0x45;
+			}
+			else{
+				if((base_reg&0x08)==0) RexByte=(char)0x46;
+				else RexByte=(char)0x47;
+			}
+		}
+	}
+
+	if(op_size==sizeof(_int64)){
+		//64ビットオペランド
+		RexByte|=0x48;
+	}
+
+	if(RexByte) pNativeCode->Put( RexByte );
+}
+
+
+
+/////////////////////////////////////////////////
+// ModR/Mバイト、SIBバイト、ディスプレースメント
+/////////////////////////////////////////////////
+
+//スケール
+#define SCALE_NON	(char)0x00
+#define SCALE_2		(char)0x40
+#define SCALE_4		(char)0x80
+#define SCALE_8		(char)0xC0
+
+//インデックスなし
+#define INDEX_NON	0x04
+
+const PertialSchedule *CodeGenerator::set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,long disp, Schedule::Type scheduleType, bool isPertialSchedule )
+{
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	if(mod==MOD_DISP32){
+		//ModR/Mバイト
+		pNativeCode->Put( (char)(      REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(0x04)) );
+
+		base_reg=0x05;
+		index_reg=INDEX_NON;
+	}
+	else{
+		//ModR/Mバイト
+		pNativeCode->Put( (char)(mod | REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(base_reg)) );
+	}
+
+
+	//レジスタモードの場合は、ここで終了
+	if(mod==MOD_REG) return pPertialSchedule;
+
+
+	if(REGISTER_OPERAND(base_reg)==0x04||mod==MOD_DISP32){
+		//////////////////////
+		// SIBバイトを使う
+		//////////////////////
+
+		pNativeCode->Put( (char)(scale| REGISTER_OPERAND(index_reg)<<3 | REGISTER_OPERAND(base_reg)) );
+	}
+
+	//ディスプレースメントを必要としない場合は、ここで終了
+	if(mod==MOD_BASE) return pPertialSchedule;
+
+
+	//////////////////////////
+	// ディスプレースメント
+	//////////////////////////
+
+	if(mod==MOD_BASE_DISP8)
+	{
+		pNativeCode->Put( (char)disp );
+	}
+	else
+	{
+		if( isPertialSchedule )
+		{
+			pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+			pPertialSchedule = pertialSchedules.back();
+		}
+
+		pNativeCode->PutEx( disp, scheduleType );
+	}
+
+	return pPertialSchedule;
+}
+
+
+
+const PertialSchedule *CodeGenerator::__op_format(int op_size,char op_prefix,char opcode1,char opcode2,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//命令プリフィックス
+	if(op_prefix) pNativeCode->Put( op_prefix );
+
+	//rexプリフィックス
+	set_rex(op_size,reg,0,base_reg);
+
+	//オペコード
+	pNativeCode->Put( opcode1 );
+	if(opcode2) pNativeCode->Put( opcode2 );
+
+	//ModR/M, SIB, disp
+	return set_mod_rm_sib_disp(mod,reg,SCALE_NON,INDEX_NON,base_reg,offset, scheduleType, isPertialSchedule );
+}
+
+
+
+///////////////////
+// mov関連
+///////////////////
+
+const PertialSchedule *CodeGenerator::op_mov_RV(int op_size,int reg,long i32data, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//mov reg,i32data
+
+	//rexプリフィックス
+	set_rex(op_size,REG_NON,REG_NON,reg);
+
+	if(op_size==sizeof(_int64)){
+		//オペコード
+		pNativeCode->Put( (char)0xC7 );
+
+		//レジスタ
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg) ) );
+	}
+	else{
+		//レジスタ
+		pNativeCode->Put( (char)(0xB8| REGISTER_OPERAND(reg) ) );
+	}
+
+	//即値
+	const PertialSchedule *pPertialSchedule = NULL;
+	if( isPertialSchedule )
+	{
+		pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+		pPertialSchedule = pertialSchedules.back();
+	}
+	pNativeCode->PutEx( i32data, scheduleType );
+
+	return pPertialSchedule;
+}
+const PertialSchedule *CodeGenerator::op_mov_RV64( int reg, _int64 i64data, bool isPertialSchedule )
+{
+	//mov reg,i64data
+
+	//rexプリフィックス
+	set_rex(sizeof(_int64),REG_NON,REG_NON,reg);
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xB8| REGISTER_OPERAND(reg) ) );
+
+	//即値
+	const PertialSchedule *pPertialSchedule = NULL;
+	if( isPertialSchedule )
+	{
+		pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(_int64) ) );
+		pPertialSchedule = pertialSchedules.back();
+	}
+	pNativeCode->Put( i64data );
+
+	return pPertialSchedule;
+}
+const PertialSchedule *CodeGenerator::op_mov_RM(int op_size,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//mov reg64,qword ptr[base_reg+offset]
+	//mov reg32,dword ptr[base_reg+offset]
+	//mov reg16,word ptr[base_reg+offset]
+	//mov reg8,byte ptr[base_reg+offset]
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x8A;
+	else opcode=(char)0x8B;
+
+	return __op_format(op_size,op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+const PertialSchedule *CodeGenerator::op_mov_RM_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//mov reg64,qword ptr[base_reg1+base_reg2+offset]
+	//mov reg32,dword ptr[base_reg1+base_reg2+offset]
+	//mov reg16,word ptr[base_reg1+base_reg2+offset]
+	//mov reg8,byte ptr[base_reg1+base_reg2+offset]
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	if(base_reg1==REG_RSP){
+		//SIBバイトのindex部にrspは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_RSP;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	set_rex(op_size,reg,base_reg1,base_reg2);
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0x8A );
+	else pNativeCode->Put( (char)0x8B );
+
+	if(bUseOffset){
+		///////////////////////////
+		// オフセット値を使う
+		///////////////////////////
+
+		//レジスタ
+		pNativeCode->Put( (char)(0x84| REGISTER_OPERAND(reg)<<3) );
+
+		//ベースレジスタ
+		pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) );
+
+		//オフセット値
+		if( isPertialSchedule )
+		{
+			pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+			pPertialSchedule = pertialSchedules.back();
+		}
+		pNativeCode->PutEx( offset, scheduleType );
+	}
+	else{
+		///////////////////////////
+		// オフセット値を使わない
+		///////////////////////////
+
+		//レジスタ
+		pNativeCode->Put( (char)(0x04| REGISTER_OPERAND(reg)<<3) );
+
+		//ベースレジスタ
+		pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) );
+	}
+
+	return pPertialSchedule;
+}
+const PertialSchedule *CodeGenerator::op_mov_MR(int op_size,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//mov qword ptr[base_reg+offset],reg64
+	//mov dword ptr[base_reg+offset],reg32
+	//mov word ptr[base_reg+offset],reg16
+	//mov byte ptr[base_reg+offset],reg8
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x88;
+	else opcode=(char)0x89;
+
+	return __op_format(op_size,op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+const PertialSchedule *CodeGenerator::op_mov_MR_ex(int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//mov qword ptr[base_reg1+base_reg2+offset],reg64
+	//mov dword ptr[base_reg1+base_reg2+offset],reg32
+	//mov word ptr[base_reg1+base_reg2+offset],reg16
+	//mov byte ptr[base_reg1+base_reg2+offset],reg8
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	if(base_reg1==REG_RSP){
+		//SIBバイトのindex部にrspは指定できない
+		base_reg1=base_reg2;
+		base_reg2=REG_RSP;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	set_rex(op_size,reg,base_reg1,base_reg2);
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0x88 );
+	else pNativeCode->Put( (char)0x89 );
+
+	if(bUseOffset==USE_OFFSET){
+		//////////////////////////
+		//オフセット値を使う
+		//////////////////////////
+
+		//レジスタ
+		pNativeCode->Put( (char)(0x84| REGISTER_OPERAND(reg)<<3) );
+
+		//ベースレジスタ
+		pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) );
+
+		//オフセット値
+		if( isPertialSchedule )
+		{
+			pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+			pPertialSchedule = pertialSchedules.back();
+		}
+		pNativeCode->PutEx( offset, scheduleType );
+	}
+	else{
+		//////////////////////////
+		//オフセット値を使わない
+		//////////////////////////
+
+		//レジスタ
+		pNativeCode->Put( (char)(0x04| REGISTER_OPERAND(reg)<<3) );
+
+		//ベースレジスタ
+		pNativeCode->Put( (char)(REGISTER_OPERAND(base_reg1)<<3 | REGISTER_OPERAND(base_reg2)) );
+	}
+
+	return pPertialSchedule;
+}
+
+const PertialSchedule *CodeGenerator::op_mov_MV(int op_size,int base_reg,int offset, Schedule::Type offsetScheduleType, bool isPertialSchedule, BOOL bUseOffset,long i32data){
+	//mov ptr[base_reg+offset],i32data
+	//mov ptr[base_reg       ],i32data
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	set_rex(op_size,0,0,base_reg);
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0xC6 );
+	else pNativeCode->Put( (char)0xC7 );
+
+	if(bUseOffset==USE_OFFSET){
+		//////////////////////////
+		//オフセット値を使う
+		//////////////////////////
+
+		//ModR/M, SIB, disp
+		pPertialSchedule = set_mod_rm_sib_disp(MOD_BASE_DISP32,0,SCALE_NON,INDEX_NON,base_reg,offset, offsetScheduleType, isPertialSchedule );
+	}
+	else{
+		//ModR/M, SIB, disp
+		set_mod_rm_sib_disp(MOD_BASE,0,SCALE_NON,INDEX_NON,base_reg,0);
+	}
+
+	//即値
+	if(op_size==sizeof(_int64)||op_size==sizeof(long)){
+		//32/64ビット
+		pNativeCode->Put( i32data );
+	}
+	else if(op_size==sizeof(short)){
+		//16ビット
+		pNativeCode->Put( (short)i32data );
+	}
+	else if(op_size==sizeof(char)){
+		//16ビット
+		pNativeCode->Put( (char)i32data );
+	}
+
+	return pPertialSchedule;
+}
+
+void CodeGenerator::op_mov_RR(int reg1,int reg2){
+	//mov reg1,reg2
+	char RexByte=-1;
+
+	if(reg1==reg2) return;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	// [8bit rex] 1000 1011 11xx xbbb
+	pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x8B );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+void CodeGenerator::op_movsxd(int reg64,int reg32){
+	//movsxd reg64,reg32
+	char RexByte=-1;
+
+	if(REG_RAX<=reg64&&reg64<=REG_RDI){
+		if(REG_RAX<=reg32&&reg32<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg32&&reg32<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg64&&reg64<=REG_R15){
+		if(REG_RAX<=reg32&&reg32<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg32&&reg32<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0110 0011 11rr rbbb
+	pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x63 );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg64)<<3 | REGISTER_OPERAND(reg32)) );
+}
+void CodeGenerator::op_movsx64_FromReg16(int reg64,int reg16){
+	//movsx reg64,reg16
+	char RexByte=-1;
+
+	if(REG_RAX<=reg64&&reg64<=REG_RDI){
+		if(REG_RAX<=reg16&&reg16<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg16&&reg16<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg64&&reg64<=REG_R15){
+		if(REG_RAX<=reg16&&reg16<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg16&&reg16<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 1111 1011 1111 11rr rbbb
+	pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xBF );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg64)<<3 | REGISTER_OPERAND(reg16)) );
+}
+void CodeGenerator::op_movsx64_FromReg8(int reg64,int reg8){
+	//movsx reg64,reg8
+	char RexByte=-1;
+
+	if(REG_RAX<=reg64&&reg64<=REG_RDI){
+		if(REG_RAX<=reg8&&reg8<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg64&&reg64<=REG_R15){
+		if(REG_RAX<=reg8&&reg8<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 1111 1011 1110 11rr rbbb
+	pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xBE );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg64)<<3 | REGISTER_OPERAND(reg8)) );
+}
+
+
+
+//////////////////
+// mov32関連
+//////////////////
+
+void CodeGenerator::op_movsx32_FromReg16(int reg32,int reg16){
+	//movsx reg32,reg16
+	char RexByte=-1;
+
+	if(REG_RAX<=reg32&&reg32<=REG_RDI){
+		if(REG_RAX<=reg16&&reg16<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg16&&reg16<=REG_R15) RexByte=(char)0x41;
+	}
+	if(REG_R8<=reg32&&reg32<=REG_R15){
+		if(REG_RAX<=reg16&&reg16<=REG_RDI) RexByte=(char)0x44;
+		if(REG_R8<=reg16&&reg16<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 1111 1011 1111 11rr rbbb
+	if(RexByte) pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xBF );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg32)<<3 | REGISTER_OPERAND(reg16)) );
+}
+void CodeGenerator::op_movsx32_FromReg8(int reg32,int reg8){
+	//movsx reg32,reg8
+	char RexByte=-1;
+
+	if(REG_RAX<=reg32&&reg32<=REG_RDI){
+		if(REG_RAX<=reg8&&reg8<=REG_RBX) RexByte=0;
+		if(REG_RSP<=reg8&&reg8<=REG_RDI) RexByte=(char)0x40;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x41;
+	}
+	if(REG_R8<=reg32&&reg32<=REG_R15){
+		if(REG_RAX<=reg8&&reg8<=REG_RDI) RexByte=(char)0x44;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 1111 1011 1110 11rr rbbb
+	if(RexByte) pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xBE );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg32)<<3 | REGISTER_OPERAND(reg8)) );
+}
+
+
+
+/////////////////////
+// mov16関連
+/////////////////////
+
+void CodeGenerator::op_movsx16_FromReg8(int reg32,int reg8){
+	//movsx reg16,reg8
+	char RexByte=-1;
+
+	if(REG_RAX<=reg32&&reg32<=REG_RDI){
+		if(REG_RAX<=reg8&&reg8<=REG_RBX) RexByte=0;
+		if(REG_RSP<=reg8&&reg8<=REG_RDI) RexByte=(char)0x40;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x41;
+	}
+	if(REG_R8<=reg32&&reg32<=REG_R15){
+		if(REG_RAX<=reg8&&reg8<=REG_RDI) RexByte=(char)0x44;
+		if(REG_R8<=reg8&&reg8<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//0110 0110 [8bit rex] 0000 1111 1011 1110 11rr rbbb
+	pNativeCode->Put( (char)0x66 );
+	if(RexByte) pNativeCode->Put( RexByte );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xBE );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg32)<<3 | REGISTER_OPERAND(reg8)) );
+}
+
+
+
+//////////////////////////////////
+// ビット拡張
+//////////////////////////////////
+
+void CodeGenerator::op_cqo()
+{
+	pNativeCode->Put( (char)0x48 );
+	pNativeCode->Put( (char)0x99 );
+}
+
+
+
+//////////////////////////////////
+// インクリメント・デクリメント
+//////////////////////////////////
+
+void CodeGenerator::op_inc(int reg){
+	//inc reg
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+
+	//オペコード
+	char opcode=(char)0xFF;
+
+	__op_format(sizeof(_int64),op_prefix,opcode,0,0,reg,0,MOD_REG);
+}
+void CodeGenerator::op_dec(int reg){
+	//dec reg
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+
+	//オペコード
+	char opcode=(char)0xFF;
+
+	__op_format(sizeof(_int64),op_prefix,opcode,0,0x01,reg,0,MOD_REG);
+}
+
+
+
+/////////////////////
+// add関連
+/////////////////////
+
+const PertialSchedule *CodeGenerator::op_add_RM(int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//add reg64,qword ptr[base_reg+offset]
+	//add reg32,dword ptr[base_reg+offset]
+	//add reg16,word ptr[base_reg+offset]
+	//add reg8,byte ptr[base_reg+offset]
+
+	//16ビット演算の命令プリフィックス
+	char op_prefix=0;
+	if(op_size==sizeof(short)) op_prefix=(char)0x66;
+
+	//オペコード
+	char opcode;
+	if(op_size==sizeof(char)) opcode=(char)0x02;
+	else opcode=(char)0x03;
+
+	return __op_format(op_size,op_prefix,opcode,0,reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+
+const PertialSchedule *CodeGenerator::op_add_RV(int reg,long offset, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//add reg,offset
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	char RexByte=-1;
+
+	if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0x48;
+	if(REG_R8<=reg&&reg<=REG_R15) RexByte=0x49;
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	if(reg==REG_RAX){
+		//raxのみ特殊
+
+		// [8bit rex] 0000 0101 [32bit offset]
+		pNativeCode->Put( (char)RexByte );
+		pNativeCode->Put( (char)0x05 );
+	}
+	else{
+		//rax以外
+
+		//[8bit rex] 1000 0001 1100 0xxx [32bit offset]
+		pNativeCode->Put( (char)RexByte );
+		pNativeCode->Put( (char)0x81 );
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)) );
+	}
+
+	if( isPertialSchedule )
+	{
+		pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+		pPertialSchedule = pertialSchedules.back();
+	}
+	pNativeCode->PutEx( offset, scheduleType );
+
+	return pPertialSchedule;
+}
+void CodeGenerator::op_add_RR(int reg1,int reg2){
+	//add reg1,reg2
+	char RexByte=-1;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 0011 11rr rbbb
+	pNativeCode->Put( (char)RexByte );
+	pNativeCode->Put( (char)0x03 );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_add32_reg(int reg1,int reg2){
+	//add reg1,reg2
+	char RexByte=-1;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0000 0011 11rr rbbb
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+	pNativeCode->Put( (char)0x03 );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+
+
+////////////////////////
+// sub関連
+////////////////////////
+
+void CodeGenerator::op_sub_RV(int op_size,int reg,long i32data){
+	//sub reg,i32data
+
+	//rexプリフィックス
+	set_rex(op_size,REG_NON,REG_NON,reg);
+
+	if(reg==REG_RAX){
+		//raxのみ特殊
+		pNativeCode->Put( (char)0x2D );
+	}
+	else{
+		//オペコード
+		pNativeCode->Put( (char)0x81 );
+
+		//レジスタ
+		pNativeCode->Put( (char)(0xE8| REGISTER_OPERAND(reg) ) );
+	}
+
+	//即値
+	pNativeCode->Put( i32data );
+}
+void CodeGenerator::op_sub64_reg(int reg1,int reg2){
+	//sub reg1,reg2
+	char RexByte=-1;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0010 1011 11rr rbbb
+	pNativeCode->Put( (char)RexByte );
+	pNativeCode->Put( (char)0x2B );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_sub32_reg(int reg1,int reg2){
+	//sub reg1,reg2
+	char RexByte=-1;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 0010 1011 11rr rbbb
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+	pNativeCode->Put( (char)0x2B );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_sbb_RR( int op_size, int reg1, int reg2 ){
+	//sbb reg1,reg2
+
+	//rexプリフィックス
+	set_rex(0,reg1,0,reg2);
+
+	//オペコード
+	pNativeCode->Put( (char)0x1B );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+
+
+////////////////////////
+// imul関連
+////////////////////////
+
+void CodeGenerator::op_imul_RR(int op_size,int reg1,int reg2){
+	//imul reg1,reg2
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0xAF );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_imul_RV(int op_size,int reg,long i32data){
+	//imul reg,i32data
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x4D;
+	}
+	else{
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x45;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	if(-128<=i32data&&i32data<=127){
+		//オペコード
+		pNativeCode->Put( (char)0x6B );
+
+		//レジスタ
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg)) );
+
+		//値
+		pNativeCode->Put( (char)i32data );
+	}
+	else{
+		//オペコード
+		pNativeCode->Put( (char)0x69 );
+
+		//レジスタ
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg)) );
+
+		//値
+		pNativeCode->Put( i32data );
+	}
+}
+
+
+
+////////////////////////
+// div、idiv関連
+////////////////////////
+
+void CodeGenerator::op_div64_reg(int reg){
+	//div reg
+	char RexByte=-1;
+
+	if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+	if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//rexプリフィックス
+	pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0xF7 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xF0| REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_idiv64_reg(int reg){
+	//idiv reg
+	char RexByte=-1;
+
+	if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+	if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//rexプリフィックス
+	pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0xF7 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xF8| REGISTER_OPERAND(reg)) );
+}
+
+
+
+////////////////////
+// ビットシフト関連
+////////////////////
+
+void CodeGenerator::op_shl_reg(int op_size,int reg){
+	//shl reg,cl
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+	}
+	else if(op_size==sizeof(char)){
+		if(REG_RAX<=reg&&reg<=REG_RBX) RexByte=0;
+		if(REG_RSP<=reg&&reg<=REG_RDI) RexByte=(char)0x40;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+	else{
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0xD2 );
+	else pNativeCode->Put( (char)0xD3 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xE0| REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_sar_reg(int op_size,int reg){
+	//sar reg,cl
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+	}
+	else if(op_size==sizeof(char)){
+		if(REG_RAX<=reg&&reg<=REG_RBX) RexByte=0;
+		if(REG_RSP<=reg&&reg<=REG_RDI) RexByte=(char)0x40;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+	else{
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0xD2 );
+	else pNativeCode->Put( (char)0xD3 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xF8| REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_shr_reg(int op_size,int reg){
+	//shr reg,cl
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+	}
+	else if(op_size==sizeof(char)){
+		if(REG_RAX<=reg&&reg<=REG_RBX) RexByte=0;
+		if(REG_RSP<=reg&&reg<=REG_RDI) RexByte=(char)0x40;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+	else{
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0xD2 );
+	else pNativeCode->Put( (char)0xD3 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xE8| REGISTER_OPERAND(reg)) );
+}
+
+
+
+////////////////////
+// and 関連
+////////////////////
+
+void CodeGenerator::op_and_reg(int op_size,int reg1,int reg2){
+	//and reg1,reg2
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x23 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_and64_value(int reg,long offset){
+	//and reg,offset
+	char RexByte=-1;
+
+	if(REG_RAX<=reg&&reg<=REG_RDI) (char)RexByte=0x48;
+	if(REG_R8<=reg&&reg<=REG_R15) (char)RexByte=0x49;
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	if(reg==REG_RAX){
+		//raxのみ特殊
+
+		// [8bit rex] 0010 0101 [32bit offset]
+		pNativeCode->Put( (char)RexByte );
+		pNativeCode->Put( (char)0x25 );
+		pNativeCode->Put( offset );
+	}
+	else{
+		//rax以外
+
+		//[8bit rex] 1000 0001 1100 0xxx [32bit offset]
+		pNativeCode->Put( (char)RexByte );
+		pNativeCode->Put( (char)0x81 );
+		pNativeCode->Put( (char)(0xE0| REGISTER_OPERAND(reg)) );
+		pNativeCode->Put( offset );
+	}
+}
+void CodeGenerator::op_and32_value(int reg,long offset){
+	//and reg,offset
+	char RexByte=-1;
+
+	if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+	if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	if(reg==REG_RAX){
+		//eaxのみ特殊
+
+		// [8bit rex] 0010 0101 [32bit offset]
+		pNativeCode->Put( (char)0x25 );
+		pNativeCode->Put( offset );
+	}
+	else{
+		//eax以外
+
+		//[8bit rex] 1000 0001 1100 0xxx [32bit offset]
+		if(RexByte) pNativeCode->Put( (char)RexByte );
+		pNativeCode->Put( (char)0x81 );
+		pNativeCode->Put( (char)(0xE0| REGISTER_OPERAND(reg)) );
+		pNativeCode->Put( offset );
+	}
+}
+
+
+
+////////////////////////
+// or 関連
+////////////////////////
+
+void CodeGenerator::op_or_reg(int op_size,int reg1,int reg2){
+	//or reg1,reg2
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x0B );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+
+
+////////////////////////
+// xor 関連
+////////////////////////
+
+void CodeGenerator::op_xor_reg(int op_size,int reg1,int reg2){
+	//xor reg1,reg2
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x33 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+
+
+///////////////////////
+// not 関連
+///////////////////////
+
+void CodeGenerator::op_not_reg(int op_size,int reg){
+	//not reg
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+	}
+	else{
+		if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+		if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0xF7 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xD0| REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_neg( int reg ){
+	//neg reg
+
+	//オペコード
+	pNativeCode->Put( (char)0xF7 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xD8| REGISTER_OPERAND(reg)) );
+}
+
+
+
+////////////////////
+// test関連
+////////////////////
+
+void CodeGenerator::op_test(int reg1,int reg2){
+	//test reg1,reg2
+	char RexByte=-1;
+
+	if(REG_RAX<=reg1&&reg1<=REG_RDI){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+	}
+	if(REG_R8<=reg1&&reg1<=REG_R15){
+		if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+		if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+	//[8bit rex] 1000 0101 11rr rbbb
+	pNativeCode->Put( (char)RexByte );
+	pNativeCode->Put( (char)0x85 );
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+
+
+
+/////////////////////
+// cmp 関連
+/////////////////////
+
+void CodeGenerator::op_cmp_reg(int op_size,int reg1,int reg2){
+	//cmp reg1,reg2
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_RAX<=reg1&&reg1<=REG_RDI){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_R8<=reg1&&reg1<=REG_R15){
+			if(REG_RAX<=reg2&&reg2<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg2&&reg2<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x3B );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)) );
+}
+void CodeGenerator::op_cmp_value(int op_size,int reg,char byte_data){
+	//cmp reg,byte_data
+
+	if(op_size==sizeof(char)&&reg==REG_RAX){
+		//alレジスタの場合は特殊
+		pNativeCode->Put( (char)0x3C );
+
+		//8ビット値
+		pNativeCode->Put( byte_data );
+
+		return;
+	}
+
+	//16ビット演算のプリフィックス
+	if(op_size==sizeof(short)) pNativeCode->Put( (char)0x66 );
+
+	//rexプリフィックス
+	set_rex(op_size,REG_NON,REG_NON,reg);
+
+	//オペコード
+	if(op_size==sizeof(char)) pNativeCode->Put( (char)0x80 );
+	else pNativeCode->Put( (char)0x83 );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xF8| REGISTER_OPERAND(reg)) );
+
+	//8ビット値
+	pNativeCode->Put( byte_data );
+}
+void CodeGenerator::op_setne( int reg ){
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x95 );
+
+	//レジスタ
+	pNativeCode->Put( (char)( 0xC0 | REGISTER_OPERAND(reg) ) );
+}
+
+
+////////////////////
+// SSE2関連
+////////////////////
+
+const PertialSchedule *CodeGenerator::op_movlpd_MR(int xmm_reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//movlpd qword ptr[base_reg+offset],xmm_reg
+	return __op_format(0,(char)0x66,(char)0x0F,(char)0x13,xmm_reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+const PertialSchedule *CodeGenerator::op_movlpd_RM(int xmm_reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//movlpd xmm_reg,qword ptr[base_reg+offset]
+	return __op_format(0,(char)0x66,(char)0x0F,(char)0x12,xmm_reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+void CodeGenerator::op_movsd_RR(int xmm_reg1,int xmm_reg2){
+	if(xmm_reg1==xmm_reg2) return;
+
+	//movsd xmm_reg1,xmm_reg2
+	__op_format(0,(char)0xF2,(char)0x0F,(char)0x10,xmm_reg1,xmm_reg2,0,MOD_REG);
+}
+const PertialSchedule *CodeGenerator::op_movsd_MR(int xmm_reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//movsd qword ptr[reg+offset],xmm_reg
+	//movsd qword ptr[reg],xmm_reg
+	return __op_format(0,(char)0xF2,(char)0x0F,(char)0x11,xmm_reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+void CodeGenerator::op_movss_RR(int xmm_reg1,int xmm_reg2){
+	if(xmm_reg1==xmm_reg2) return;
+
+	//movss xmm_reg1,xmm_reg2
+	__op_format(0,(char)0xF3,(char)0x0F,(char)0x10,xmm_reg1,xmm_reg2,0,MOD_REG);
+}
+const PertialSchedule *CodeGenerator::op_movss_RM(int xmm_reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//movss xmm_reg,dword ptr[base_reg+offset]
+	return __op_format(0,(char)0xF3,(char)0x0F,(char)0x10,xmm_reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+const PertialSchedule *CodeGenerator::op_movss_MR(int xmm_reg,int base_reg,int offset,char mod, Schedule::Type scheduleType, bool isPertialSchedule ){
+	//movss dword ptr[reg+offset],xmm_reg
+	//movss dword ptr[reg],xmm_reg
+	return __op_format(0,(char)0xF3,(char)0x0F,(char)0x11,xmm_reg,base_reg,offset,mod, scheduleType, isPertialSchedule );
+}
+
+void CodeGenerator::op_movd_RX(int reg,int xmm_reg){
+	__op_format(sizeof(_int64),(char)0x66,(char)0x0F,(char)0x7E,xmm_reg,reg,0,MOD_REG);
+}
+
+void CodeGenerator::op_cvtsd2ss(int xmm_reg1,int xmm_reg2){
+	//cvtsd2ss xmm_reg1,xmm_reg2
+
+	//オペコード
+	pNativeCode->Put( (char)0xF2 );
+
+	//rexプリフィックス
+	set_rex(sizeof(long),xmm_reg1,0,xmm_reg2);
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x5A );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2)) );
+}
+void CodeGenerator::op_cvtss2sd(int xmm_reg1,int xmm_reg2){
+	//cvtss2sd xmm_reg1,xmm_reg2
+
+	//オペコード
+	pNativeCode->Put( (char)0xF3 );
+
+	//rexプリフィックス
+	set_rex(0,xmm_reg1,0,xmm_reg2);
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x5A );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2)) );
+}
+void CodeGenerator::op_cvttsd2si_xmm(int op_size,int reg,int xmm_reg){
+	//cvttsd2si reg,xmm_reg
+
+	//オペコード
+	pNativeCode->Put( (char)0xF2 );
+
+	//rexプリフィックス
+	set_rex(op_size,reg,0,xmm_reg);
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2C );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(xmm_reg)) );
+}
+void CodeGenerator::op_cvttss2si_xmm(int op_size,int reg,int xmm_reg){
+	//cvttss2si reg,xmm_reg
+
+	//オペコード
+	pNativeCode->Put( (char)0xF3 );
+
+	//rexプリフィックス
+	set_rex(op_size,reg,0,xmm_reg);
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2C );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(xmm_reg)) );
+}
+void CodeGenerator::op_cvtsi2sd_reg(int op_size,int xmm_reg,int reg){
+	//cvtsi2sd xmm_reg,reg
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_XMM0<=xmm_reg&&xmm_reg<=REG_XMM7){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_XMM8<=xmm_reg&&xmm_reg<=REG_XMM15){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_XMM0<=xmm_reg&&xmm_reg<=REG_XMM7){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_XMM8<=xmm_reg&&xmm_reg<=REG_XMM15){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//オペコード
+	pNativeCode->Put( (char)0xF2 );
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2A );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg)<<3 | REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_cvtsi2ss_reg(int op_size,int xmm_reg,int reg){
+	//cvtsi2ss xmm_reg,reg
+	char RexByte=-1;
+
+	if(op_size==sizeof(_int64)){
+		if(REG_XMM0<=xmm_reg&&xmm_reg<=REG_XMM7){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x48;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
+		}
+		if(REG_XMM8<=xmm_reg&&xmm_reg<=REG_XMM15){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x4C;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x4D;
+		}
+	}
+	else{
+		if(REG_XMM0<=xmm_reg&&xmm_reg<=REG_XMM7){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=0;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
+		}
+		if(REG_XMM8<=xmm_reg&&xmm_reg<=REG_XMM15){
+			if(REG_RAX<=reg&&reg<=REG_RDI) RexByte=(char)0x44;
+			if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x45;
+		}
+	}
+
+	if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
+
+
+	//オペコード
+	pNativeCode->Put( (char)0xF3 );
+
+	//rexプリフィックス
+	if(RexByte) pNativeCode->Put( (char)RexByte );
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2A );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg)<<3 | REGISTER_OPERAND(reg)) );
+}
+void CodeGenerator::op_comisd(int xmm_reg1,int xmm_reg2){
+	//comisd xmm_reg1,xmm_reg2
+
+	//オペコード
+	pNativeCode->Put( (char)0x66 );
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2F );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2)) );
+}
+void CodeGenerator::op_comiss(int xmm_reg1,int xmm_reg2){
+	//comiss xmm_reg1,xmm_reg2
+
+	//オペコード
+	pNativeCode->Put( (char)0x0F );
+	pNativeCode->Put( (char)0x2F );
+
+	//レジスタ
+	pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2)) );
+}
+
+
+
+/////////////////////
+// ストリング関係
+/////////////////////
+
+void CodeGenerator::op_rep_movs(int op_size){
+	if(op_size==sizeof(BYTE)){
+		//rep movs byte ptr[edi],byte ptr[esi]
+		pNativeCode->Put( (char)0xF3 );
+		pNativeCode->Put( (char)0xA4 );
+	}
+	else if(op_size==sizeof(short)){
+		//rep movs word ptr[edi],word ptr[esi]
+		pNativeCode->Put( (char)0xF3 );
+		pNativeCode->Put( (char)0x66 );
+		pNativeCode->Put( (char)0xA5 );
+	}
+	else if(op_size==sizeof(long)){
+		//rep movs dword ptr[edi],dword ptr[esi]
+		pNativeCode->Put( (char)0xF3 );
+		pNativeCode->Put( (char)0xA5 );
+	}
+}
+
+
+
+
+void CodeGenerator::op_add_rsp(long num){
+	//スタックポインタの加算（pop方向）
+
+	//add rsp,num
+	if(0xFFFFFF80&num){
+		pNativeCode->Put( (char)0x48 );
+		pNativeCode->Put( (char)0x81 );
+		pNativeCode->Put( (char)0xC4 );
+		pNativeCode->Put( num );
+	}
+	else{
+		//「-128 < num < 127」の場合
+		pNativeCode->Put( (char)0x48 );
+		pNativeCode->Put( (char)0x83 );
+		pNativeCode->Put( (char)0xC4 );
+		pNativeCode->Put( (char)num );
+	}
+}
+const PertialSchedule *CodeGenerator::op_sub_rsp( long num, bool isPertialSchedule )
+{
+	//スタックポインタの減算（push方向）
+	const PertialSchedule *pPertialSchedule = NULL;
+
+	//sub rsp,num
+	if( (0xFFFFFF80&num) != 0 || isPertialSchedule ){
+		pNativeCode->Put( (char)0x48 );
+		pNativeCode->Put( (char)0x81 );
+		pNativeCode->Put( (char)0xEC );
+
+		if( isPertialSchedule )
+		{
+			pertialSchedules.push_back( new PertialSchedule( pNativeCode->GetSize(), sizeof(long) ) );
+			pPertialSchedule = pertialSchedules.back();
+		}
+		pNativeCode->Put( num );
+	}
+	else{
+		//「-128 < num < 127」の場合
+		pNativeCode->Put( (char)0x48 );
+		pNativeCode->Put( (char)0x83 );
+		pNativeCode->Put( (char)0xEC );
+		pNativeCode->Put( (char)num );
+	}
+
+	return pPertialSchedule;
+}
+
+
+
+//////////////////////////////
+// 浮動小数点関連
+//////////////////////////////
+
+void CodeGenerator::op_fld_ptr_esp(int type){
+	//スタックポインタが示すバッファのデータを浮動小数点レジスタへロード
+
+	if(type==DEF_DOUBLE){
+		//fld qword ptr[esp]
+		pNativeCode->Put( (char)0xDD );
+		pNativeCode->Put( (char)0x04 );
+		pNativeCode->Put( (char)0x24 );
+	}
+	else if(type==DEF_SINGLE){
+		//fld dword ptr[esp]
+		pNativeCode->Put( (char)0xD9 );
+		pNativeCode->Put( (char)0x04 );
+		pNativeCode->Put( (char)0x24 );
+	}
+	else if(type==DEF_INT64){
+		//fild qword ptr[esp]
+		pNativeCode->Put( (char)0xDF );
+		pNativeCode->Put( (char)0x2C );
+		pNativeCode->Put( (char)0x24 );
+	}
+	else if(type==DEF_LONG){
+		//fild dword ptr[esp]
+		pNativeCode->Put( (char)0xDB );
+		pNativeCode->Put( (char)0x04 );
+		pNativeCode->Put( (char)0x24 );
+	}
+}
+
+
+
+//////////////////////////////
+// レジスタ関連
+//////////////////////////////
+
+void CodeGenerator::op_zero_reg(int reg){
+	//レジスタに0をセット
+
+	if(REG_RAX<=reg&&reg<=REG_RDI){
+		/*	rax～rdi
+			0100 1000 0011 0011 11 xxx xxx	*/
+		pNativeCode->Put( (char)0x48 );
+		pNativeCode->Put( (char)0x33 );
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg)) );
+	}
+	if(REG_R8<=reg&&reg<=REG_R15){
+		/*	r8～r15
+			0100 1101 0011 0011 11 xxx xxx	*/
+		pNativeCode->Put( (char)0x4D );
+		pNativeCode->Put( (char)0x33 );
+		pNativeCode->Put( (char)(0xC0| REGISTER_OPERAND(reg)<<3 | REGISTER_OPERAND(reg)) );
+	}
+}
+
+
+
+/////////////////////////////
+// 関数呼び出し
+/////////////////////////////
+
+void CodeGenerator::op_call( const UserProc *pUserProc ){
+	pNativeCode->Put( (char)0xE8 );
+	pNativeCode->PutUserProcSchedule( pUserProc, true );
+}
+void CodeGenerator::op_call( const DllProc *pDllProc ){
+	pNativeCode->Put( (char)0xFF );
+	pNativeCode->Put( (char)0x15 );
+	pNativeCode->PutDllProcSchedule( pDllProc );
+}
+void CodeGenerator::op_ret(){
+	pNativeCode->Put( (char)0xC3 );
+}
+void CodeGenerator::op_addressof( int reg, const UserProc *pUserProc )
+{
+	//mov reg,userProcAddress
+
+	//オペコード、レジスタ
+	pNativeCode->Put( (char)(0xB8|REGISTER_OPERAND(reg)) );
+
+	//DISP32
+	pNativeCode->PutUserProcSchedule( pUserProc, false );
+}
+void CodeGenerator::op_mov_RV_com_vtbl( int reg, const CClass *pClass )
+{
+	// mov reg,com_vtblAddress
+
+	//オペコード、レジスタ
+	pNativeCode->Put( (char)(0xB8|REGISTER_OPERAND(reg)) );
+
+	//DISP32
+	pNativeCode->PutComVtblSchedule( pClass );
+}
+void CodeGenerator::op_mov_RV_vtbl( int reg, const CClass *pClass )
+{
+	// mov reg,vtblAddress
+
+	//オペコード、レジスタ
+	pNativeCode->Put( (char)(0xB8|REGISTER_OPERAND(reg)) );
+
+	//DISP32
+	pNativeCode->PutVtblSchedule( pClass );
+}
Index: /trunk/ab5.0/abdev/compiler_x64/CommandValue.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/CommandValue.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/CommandValue.h	(revision 482)
@@ -0,0 +1,97 @@
+/* 命令語定数 */
+
+//条件、分岐、繰り返し
+#define COM_DO		0x1021
+/* 0x22は「"」なので使用不可 */
+#define COM_GOTO	0x1023
+#define COM_GOSUB	0x1024
+#define COM_LOOP	0x1026
+#define COM_RETURN	0x1027
+/* 0x28は「(」なので使用不可 */
+/* 0x29は「)」なので使用不可 */
+#define COM_FOR		0x1031
+#define COM_NEXT	0x1032
+#define COM_WHILE	0x1036
+#define COM_WEND	0x1037
+#define COM_FOREACH	0x1038
+
+//データ操作
+#define COM_DIM		0x1062
+#define COM_LET		0x1066
+#define COM_DELETE	0x1068
+#define COM_SWEEPINGDELETE	0x1069
+
+//その他
+#define COM_DEBUG		0x1073
+
+//ポインタ
+#define COM_SETDOUBLE		0x10C1
+#define COM_SETSINGLE		0x10C2
+#define COM_SETQWORD		0x10C3
+#define COM_SETDWORD		0x10C4
+#define COM_SETWORD			0x10C5
+#define COM_SETBYTE			0x10C6
+
+
+
+///////////////////////////////////
+// 以下はProjectEditorで使用される
+
+//入出力コマンド
+#define COM_PRINT		0x1150
+#define COM_INPUT		0x1151
+#define COM_OPEN		0x1152
+#define COM_CLOSE		0x1153
+#define COM_FIELD		0x1154
+#define COM_WRITE		0x1155
+
+//条件、分岐、繰り返し
+#define COM_IF			0x1160
+#define COM_SELECT		0x1161
+
+//ファイル操作
+#define COM_CHDIR		0x1170
+#define COM_KILL		0x1171
+#define COM_MKDIR		0x1172
+#define COM_GET			0x1173
+#define COM_PUT			0x1174
+
+//グラフィックス
+#define COM_CIRCLE		0x1180
+#define COM_LINE		0x1181
+#define COM_PAINT		0x1182
+#define COM_PSET		0x1183
+
+//データ操作
+#define COM_CONST		0x1190
+#define COM_TYPEDEF		0x1191
+
+//クラス関連
+#define COM_CLASS		0x1195
+#define COM_PRIVATE		0x1196
+#define COM_PUBLIC		0x1197
+#define COM_INHERITS	0x1198
+#define COM_PROTECTED	0x1199
+
+//その他
+#define COM_BEEP		0x11A0
+#define COM_CLS			0x11A1
+#define COM_COLOR		0x11A2
+#define COM_DECLARE		0x11A4
+#define COM_DEF			0x11A5
+#define COM_END			0x11A6
+#define COM_FUNCTION	0x11A7
+#define COM_LOCATE		0x11A8
+#define COM_RANDOMIZE	0x11A9
+#define COM_REM			0x11AA
+#define COM_SLEEP		0x11AB
+#define COM_SUB			0x11AC
+#define COM_TYPE		0x11AD
+#define COM_VIRTUAL		0x11AE
+#define COM_WITH		0x11AF
+#define COM_ENUM		0x11B0
+
+//ウィンドウ制御
+#define COM_DELWND		0x11C0
+#define COM_MSGBOX		0x11C1
+#define COM_WINDOW		0x11C2
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Calc.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Calc.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Calc.cpp	(revision 482)
@@ -0,0 +1,274 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void SetVariableFromRax( const Type &varType, int CalcType,RELATIVE_VAR *pRelativeVar){
+	/////////////////////////////////////////////////
+	// raxの内容を変数にコピーするコードを抽出
+	/////////////////////////////////////////////////
+
+	if( varType.IsBoolean() )
+	{
+		//bool
+		SetBooleanVariable(CalcType,pRelativeVar);
+	}
+	else if( varType.IsReal() )
+	{
+		// Double/Single型変数へレジスタの値を代入
+		SetRealVariable(varType.GetBasicType(), CalcType, pRelativeVar);
+	}
+	else if( varType.IsWhole() || varType.IsObject() )
+	{
+		//整数変数へraxの値を格納する
+		SetWholeVariable( varType.GetSize(), CalcType, pRelativeVar );
+	}
+	else{
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+}
+void OpcodeCalc(const char *Command){
+	int i,i2,i3;
+	char variable[VN_SIZE];
+
+
+	//////////////////////////////////////
+	// インクリメント・デクリメント
+	//////////////////////////////////////
+
+	for(i=0;;i++){
+		if(Command[i]=='\"'){
+			//ダブルクォートは不正なのでエラー扱い
+			variable[i]=0;
+			compiler.errorMessenger.Output(3,variable,cp);
+			return;
+		}
+
+		if(Command[i]=='('){
+			i2=GetStringInPare(variable+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='['){
+			i2=GetStringInBracket(variable+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='\0'){
+
+			///////////////////////////////////
+			// インクリメント・デクリメント
+			///////////////////////////////////
+
+			if(i>2){
+				if(Command[i-2]=='+'&&Command[i-1]=='+'){
+					//インクリメント
+					variable[i-2]=0;
+					IncDec(CALC_ADDITION,variable,"1");
+					return;
+				}
+				else if(Command[i-2]=='-'&&Command[i-1]=='-'){
+					//デクリメント
+					variable[i-2]=0;
+					IncDec(CALC_SUBTRACTION,variable,"1");
+					return;
+				}
+			}
+
+
+			//先端部分の識別子をエラーキーワードにする
+			for(i=0;;i++){
+				if(!IsVariableChar(Command[i])){
+					variable[i]=0;
+					break;
+				}
+				variable[i]=Command[i];
+			}
+
+			if(GetVarType(variable,Type(),0)){
+				//変数リストに該当したとき
+				compiler.errorMessenger.Output(1,NULL,cp);
+			}
+			else{
+				if( compiler.GetObjectModule().meta.GetGlobalConsts().IsExist(variable)
+					|| compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExist(variable) )
+				{
+					//定数リストに該当したとき
+					compiler.errorMessenger.Output(1,NULL,cp);
+				}
+				else{
+					//変数リスト、定数リストに該当しないとき
+					compiler.errorMessenger.Output(3,variable,cp);
+				}
+			}
+			return;
+		}
+
+		i2=GetCalcId(Command+i,&i3);
+		if(i2){
+			variable[i]=0;
+
+			if(Command[i]=='=') break;
+
+			if(Command[i+1+i3]=='='){
+				IncDec(i2,variable,Command+i+1+i3+1);
+				return;
+			}
+		}
+
+		variable[i]=Command[i];
+	}
+
+	if(Command[i+1]=='\0'){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return;
+	}
+
+
+
+	///////////////////////////////////////////////////////////////
+	// インデクサのsetアクセサ（[]=演算子のオーバーロードに対応）
+	///////////////////////////////////////////////////////////////
+
+	char ObjName[VN_SIZE],array_element[VN_SIZE];
+	GetArrayElement(variable,ObjName,array_element);
+	if(array_element[0]){
+		Type varType;
+		if( GetVarType(ObjName,varType,0) && varType.IsObject() ){
+			char temporary[VN_SIZE];
+			sprintf(temporary,"%s.%c%c%c",ObjName,1,ESC_OPERATOR,CALC_ARRAY_SET);
+
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s,%s",array_element,Command+i+1);
+
+			int idProc;
+			void *pProc;
+			idProc=GetProc(temporary,(void **)&pProc);
+			if( idProc )
+			{
+				CallProc(
+					idProc,
+					pProc,
+					temporary,
+					temp2,
+					Type(),			// ベースタイプはなし
+					Type()
+				);
+				return;
+			}
+		}
+	}
+
+
+	if( lstrcmpi( variable, "This" ) == 0 ){
+		compiler.errorMessenger.Output(133,NULL,cp);
+		return;
+	}
+
+
+	////////////////////////////////////////
+	// 変数のタイプ型を識別して、演算を行う
+	////////////////////////////////////////
+
+	Type varType;
+
+	//型を識別
+	if( !GetTermTypeOnlyVariable(variable,varType) ){
+
+		// プロパティ用のメソッドを呼び出す
+		if(!CallPropertyMethod( variable, Command+i+1, Type() )){
+			//エラーを表示
+			GetVarType(variable,varType,true);
+		}
+
+		return;
+	}
+
+	//NumOpe...（rax、またはxmm0に答えが格納される）
+	int reg=REG_RAX;
+	Type calcType;
+	bool isNeedHeapFreeStructure;
+	if( !NumOpe(&reg,Command+i+1,varType,calcType,&isNeedHeapFreeStructure) ){
+		return;
+	}
+
+	if(reg!=REG_RAX&&calcType.IsWhole()||
+		varType.IsNull()||calcType.IsNull()){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+
+	//結果を格納しているレジスタをブロッキング
+	pobj_BlockReg->lock(reg);
+
+	//変数アドレスを取得
+	RELATIVE_VAR VarRelativeVar;
+	if( !TermOpeOnlyVariable( variable, varType, VarRelativeVar, true ) )
+	{
+		compiler.errorMessenger.OutputFatalError();
+		return;
+	}
+
+	//レジスタのブロッキングを解除
+	pobj_BlockReg->clear();
+
+	if(varType.GetBasicType()&FLAG_PTR){
+		compiler.errorMessenger.Output(14,variable,cp);
+		return;
+	}
+
+	if( varType.IsStruct() ){
+		//構造体インスタンスへの代入
+		SetStructVariableFromRax(varType,calcType,&VarRelativeVar,isNeedHeapFreeStructure);
+		return;
+	}
+
+	if( calcType.IsObject() && !calcType.Equals( varType ) ){
+		bool isUpCast = false;
+		if( varType.IsObject() ){
+			if( varType.GetClass().IsEqualsOrSubClass( &calcType.GetClass() ) ){
+				isUpCast = true;
+			}
+		}
+		if( !isUpCast ){
+			//キャスト演算子のオーバーロードに対応する
+			CallCastOperatorProc(REG_RAX,calcType,isNeedHeapFreeStructure,varType);
+		}
+	}
+
+	if( varType.IsObject() && compiler.GetObjectModule().meta.GetBlittableTypes().IsExist( calcType ) ){
+		// Blittable型をオブジェクトとして扱う
+		vector<const UserProc *> userProcs;
+		compiler.GetObjectModule().meta.GetBlittableTypes().GetClass( calcType ).GetStaticMethods().Enum( "_Create", userProcs );
+		if( userProcs.size() != 1 ){
+			compiler.errorMessenger.OutputFatalError();
+			return;
+		}
+		const UserProc *pUserProc = userProcs[0];
+
+		// mov rcx, rax
+		compiler.codeGenerator.op_mov_RR( REG_RCX, REG_RAX );
+
+		// call System.[TypeClass]._Create
+		compiler.codeGenerator.op_call( pUserProc );
+
+		calcType = pUserProc->ReturnType();
+	}
+
+	/////////////////////////////////
+	// 右辺、左辺の型チェックを行う
+	/////////////////////////////////
+
+	CheckDifferentType(varType,calcType,0,0);
+
+
+	/////////////////////////////////////////////////
+	// rax（実数はxmm0）の内容を変数にコピー
+	/////////////////////////////////////////////////
+	SetVariableFromRax(varType,calcType.GetBasicType(),&VarRelativeVar);
+
+
+	// コード生成過程で発生した構造体の一時メモリを破棄する
+	compiler.codeGenerator.op_FreeTempStructure();
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Calc_PushVar.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Calc_PushVar.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Calc_PushVar.cpp	(revision 482)
@@ -0,0 +1,188 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+void SetXmmReg_DoubleVariable(RELATIVE_VAR *pRelativeVar,int xmm_reg){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movlpd xmm_reg,qword ptr[r11+offset]
+			compiler.codeGenerator.op_movlpd_RM( xmm_reg, REG_R11, (long)pRelativeVar->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//movlpd xmm_reg,qword ptr[offset]
+			compiler.codeGenerator.op_movlpd_RM( xmm_reg, 0, (long)pRelativeVar->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movlpd xmm_reg,qword ptr[rsp+r11+offset]
+			compiler.codeGenerator.PutOld(
+				(char)0x66,
+				(char)0x42,
+				(char)0x0F,
+				(char)0x12,
+				(char)(0x84 | REGISTER_OPERAND(xmm_reg)<<3),
+				(char)0x1C
+			);
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.PutOld( (long)pRelativeVar->offset, true )
+			);
+		}
+		else{
+			//movlpd xmm_reg,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_movlpd_RM( xmm_reg, REG_RSP, (long)pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFLOCAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//movlpd xmm_reg,qword ptr[r11]
+		compiler.codeGenerator.op_movlpd_RM( xmm_reg, REG_R11, 0, MOD_BASE);
+	}
+}
+void SetXmmReg_SingleVariable(RELATIVE_VAR *pRelativeVar,int xmm_reg){
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movss xmm_reg,dword ptr[r11+offset]
+			compiler.codeGenerator.op_movss_RM( xmm_reg, REG_R11, (long)pRelativeVar->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//movss xmm_reg,dword ptr[offset]
+			compiler.codeGenerator.op_movss_RM( xmm_reg, 0, (long)pRelativeVar->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//movss xmm_reg,dword ptr[rsp+r11+offset]
+			compiler.codeGenerator.PutOld(
+				(char)0xF3,
+				(char)0x42,
+				(char)0x0F,
+				(char)0x10,
+				(char)(0x84 | REGISTER_OPERAND(xmm_reg)<<3),
+				(char)0x1C
+			);
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.PutOld( (long)pRelativeVar->offset, true )
+			);
+		}
+		else{
+			//movss xmm_reg,dword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_movss_RM( xmm_reg, REG_RSP, (long)pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFLOCAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//movss xmm_reg,dword ptr[r11]
+		compiler.codeGenerator.op_movss_RM( xmm_reg, REG_R11, 0, MOD_BASE);
+	}
+}
+
+
+void SetReg_WholeVariable( const Type &type, RELATIVE_VAR *pRelativeVar,int reg)
+{
+	int varSize = type.GetSize();
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov reg, ptr[r11+offset]
+			compiler.codeGenerator.op_mov_RM(varSize,reg,REG_R11,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//mov reg, ptr[offset]
+			compiler.codeGenerator.op_mov_RM(varSize,reg,0,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[offset]
+			compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//mov r11,qword ptr[offset]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//mov reg, ptr[rsp+r11+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM_ex(varSize,reg,REG_RSP,REG_R11,(int)pRelativeVar->offset,USE_OFFSET, Schedule::None, true )
+			);
+		}
+		else{
+			//mov reg, ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(varSize,reg,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFLOCAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//mov reg, ptr[r11]
+		compiler.codeGenerator.op_mov_RM(varSize,reg,REG_R11,0,MOD_BASE);
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_CallProc.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_CallProc.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_CallProc.cpp	(revision 482)
@@ -0,0 +1,619 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void Call_DebugSys_SaveContext(){
+	//call _System_GetEip
+	extern const UserProc *pSub_System_GetEip;
+	compiler.codeGenerator.op_call(pSub_System_GetEip);
+
+	//mov rdx,rax
+	compiler.codeGenerator.op_mov_RR(REG_RDX,REG_RAX);
+
+	//mov rcx,rsp
+	compiler.codeGenerator.op_mov_RR(REG_RCX,REG_RSP);
+
+	//call _DebugSys_SaveContext
+	extern const UserProc *pSub_DebugSys_SaveContext;
+	compiler.codeGenerator.op_call(pSub_DebugSys_SaveContext);
+}
+
+bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer)
+{
+	extern BOOL bDebugSupportProc;
+	if( compiler.IsDebug() && bDebugSupportProc == 0 )
+	{
+		Call_DebugSys_SaveContext();
+	}
+
+
+	////////////////////////
+	// パラメータのセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(lpszParms);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pProcPointer->Params() );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck(variable,pProcPointer->Params() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	//スタックフレームに存在する既存のパラメータをバックアップ
+	pobj_parameter->BackupParameter( (int)pProcPointer->Params().size() );
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( variable,pProcPointer->Params() );
+
+	//レジスタ、スタックフレームにセット
+	pobj_parameter->SetParameter(variable,pProcPointer->Params() );
+
+
+
+	RELATIVE_VAR RelativeVar;
+	GetVarOffsetReadOnly(variable,&RelativeVar,Type());
+	SetVarPtrToReg(REG_RAX,&RelativeVar);
+
+	//mov rax,qword ptr[rax]
+	compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RAX,REG_RAX,0,MOD_BASE);
+
+	//call rax
+	compiler.codeGenerator.PutOld(
+		(char)0xFF,
+		(char)0xD0
+	);
+
+
+	//レジスタのブロッキングを解除		※パラメータセット時にロックされたレジスタ
+	pobj_BlockReg->clear();
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//スタックフレームに存在する既存のパラメータを復元
+	pobj_parameter->RestoreParameter( (int)pProcPointer->Params().size() );
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
+
+bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName)
+{
+	if( pUserProc->IsMacro() ){
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Print" ) == 0 ){
+			Opcode_Print(Parameter,0);
+			return true;
+		}
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Input" ) == 0 ){
+			Opcode_Input(Parameter);
+			return true;
+		}
+		if( lstrcmpi( pUserProc->GetName().c_str(), "Write" ) == 0 ){
+			Opcode_Print(Parameter,1);
+			return true;
+		}
+	}
+
+	pUserProc->Using();
+
+	bool isStatic = false;
+	const CClass *pobj_c = NULL;
+	const CMethod *pMethod = NULL;
+	Type leftType;
+	bool isFixedClass = false;
+	if( pUserProc->GetParentClassPtr() ){
+		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0)
+		{
+			if(lstrcmpi(ObjectName,"Super")==0)
+			{
+				//クラスメンバ関数内から基底クラスの呼び出し
+				pobj_c=&compiler.pCompilingClass->GetSuperClass();
+
+				isFixedClass = true;
+			}
+			else
+			{
+				//"->"によってオブジェクトを指定する通常のメンバ関数呼び出し
+				Type varType;
+				if( GetTermType( ObjectName, varType ) )
+				{
+					if( varType.IsObject() )
+					{
+						pobj_c = &varType.GetClass();
+						leftType = varType;
+					}
+				}
+
+				if( !pobj_c )
+				{
+					pobj_c=compiler.GetObjectModule().meta.GetClasses().Find(ObjectName);
+					if( pobj_c ){
+						isStatic = true;
+					}
+					else{
+						compiler.errorMessenger.Output(300,NULL,cp);
+					}
+				}
+			}
+		}
+		else{
+			if(dwFlags&PROCFLAG_NEW){
+				GetVarType( ObjectName, leftType, false );
+
+				//New演算子によるコンストラクタ呼び出し
+				pobj_c=pUserProc->GetParentClassPtr();
+			}
+			else{
+				//クラスメンバ関数内から同一クラスのメンバ関数の呼び出し
+				pobj_c=compiler.pCompilingClass;
+			}
+		}
+
+
+		/////////////////////////////////
+		// メソッド情報を取得
+		/////////////////////////////////
+		pMethod = NULL;
+		if( ! isStatic ) pMethod = pobj_c->GetDynamicMethodOrInterfaceMethod( pUserProc );
+		if( ! pMethod ){
+			//動的メソッドが取得できなかったときは静的メソッドを当たる
+			pMethod = pobj_c->GetStaticMethods().GetMethodPtr( pUserProc );
+			if( !pMethod ){
+				compiler.errorMessenger.Output(300,NULL,cp);
+				return false;
+			}
+
+			//静的メンバ
+			isStatic = true;
+		}
+
+
+		//////////////////////////////
+		// アクセスエラーチェック
+		//////////////////////////////
+
+		if(ObjectName[0]){
+			//外部からの呼び出し
+			if(pobj_c==compiler.pCompilingClass){
+				//同一クラスオブジェクトの場合はプライベートアクセスを容認する
+				if( pMethod->IsNoneAccess() ){
+					compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
+					return false;
+				}
+			}
+			else{
+				if( pMethod->IsPrivate()
+					|| pMethod->IsNoneAccess() ){
+					compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
+					return false;
+				}
+				if( !pMethod->GetUserProc().GetParentClass().IsEqualsOrSubClass( pobj_c ) && pMethod->IsProtected() ){
+					compiler.errorMessenger.Output(110,pUserProc->GetName(),cp);
+					return false;
+				}
+			}
+		}
+		else{
+			//クラス内部からの呼び出し（継承によるACCESS_NONのみをエラーとする）
+			if( pMethod->IsNoneAccess() ){
+				compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
+				return false;
+			}
+		}
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	// _System_LocalThisのダミーをセット
+	///////////////////////////////////////////////////////////////
+
+	char temporary[VN_SIZE]={0};
+	if( pUserProc->GetParentClassPtr() && isStatic == false ){
+		//_System_LocalThis（第一パラメータ）のダミーを作成
+		lstrcpy(temporary,"0,");
+	}
+	if( pUserProc->ReturnType().IsStruct() ){
+		// ※ByRef _System_ReturnValue パラメータのダミーをセット
+		lstrcat(temporary,"0,");
+	}
+
+	if(Parameter[0]=='\0'&&temporary[0])
+		temporary[lstrlen(temporary)-1]=0;
+	else lstrcat(temporary,Parameter);
+
+
+	//パラメータセット前のspオフセットを取得（Newの場合はここにThisポインタが格納されている）
+	int this_sp_offset = pobj_sf->GetNowSp();
+
+
+	////////////////////////
+	// パラメータをセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(temporary);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pUserProc->RealParams() );
+
+	// 型パラメータを適用
+	pobj_parameter->SetLeftType( leftType );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetSecondParmNum() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	if(pUserProc->IsMacro()){
+		//マクロ関数の場合は、パラメータ省略を考慮する
+		pobj_parameter->MacroParameterSupport( pUserProc->RealParams() );
+	}
+
+	//スタックフレームに存在する既存のパラメータをバックアップ
+	pobj_parameter->BackupParameter( (int)pUserProc->RealParams().size() );
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum() );
+
+	//レジスタ、スタックフレームにセット
+	pobj_parameter->SetParameter(pUserProc->GetName(),pUserProc->RealParams(),pUserProc->GetRealSecondParmNum(), pUserProc );
+
+	if( pUserProc->ReturnType().IsStruct() ){
+		//////////////////////////////////////////////////////
+		// 戻り値に構造体インスタンスを持つ場合
+		// ※ByRef _System_ReturnValue パラメータをセット
+		//////////////////////////////////////////////////////
+
+
+		//////////////////////////////////////////////////////
+		/////    レジスタ資源のバックアップ
+		{	BACKUP_REGISTER_RESOURCE
+		//////////////////////////////////////////////////////
+
+			int object_size = pUserProc->ReturnType().GetClass().GetSize();
+
+			//mov rcx,object_size
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RCX,object_size);
+
+			//call calloc
+			extern const UserProc *pSub_calloc;
+			compiler.codeGenerator.op_call(pSub_calloc);
+
+			//mov r13,rax
+			compiler.codeGenerator.op_mov_RR(REG_R13,REG_RAX);
+
+		/////////////////////////////////////////////
+		//////   レジスタ資源を復元
+			RESTORE_REGISTER_RESOURCE
+		}////////////////////////////////////////////
+
+		if( pUserProc->GetParentClassPtr() && isStatic == false ){
+			//mov rdx,r13
+			compiler.codeGenerator.op_mov_RR(REG_RDX,REG_R13);
+		}
+		else{
+			//mov rcx,r13
+			compiler.codeGenerator.op_mov_RR(REG_RCX,REG_R13);
+		}
+	}
+
+
+	if( pUserProc->GetParentClassPtr() && isStatic == false ){
+		///////////////////////////////
+		// メンバ関数の場合
+		// thisポインタをrcxで受け渡す
+		///////////////////////////////
+
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
+			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
+			else{
+				bool isLiteral, isNeedHeapFreeStructure = false;
+				Type baseType( DEF_OBJECT, *pUserProc->GetParentClassPtr() ) , resultType;
+				if( !TermOpe( ObjectName, baseType, resultType, isLiteral, isNeedHeapFreeStructure, NULL, false, !pMethod->IsConst() ) )
+				{
+					return false;
+				}
+				if( !resultType.IsObject() )
+				{
+					compiler.errorMessenger.OutputFatalError();
+				}
+
+				// 実態ポインタをraxにコピー
+				compiler.codeGenerator.op_mov_RR( REG_RCX, REG_RAX );
+			}
+		}
+		else{
+InClassMember:
+			if(dwFlags&PROCFLAG_NEW){
+				//New演算子によるコンストラクタ呼び出しの場合
+
+				//mov rcx,qword ptr[rsp+offset]     ※スタックフレームを利用
+				pobj_sf->ref_offset_data(REG_RCX, this_sp_offset);
+			}
+			else{
+				//自身のオブジェクトのThisポインタをrcxにコピー
+				SetThisPtrToReg(REG_RCX);
+			}
+		}
+	}
+
+	if( pUserProc->IsVirtual() && !isFixedClass ){
+		int vtblIndex;
+		if( pobj_c->IsInterface() )
+		{
+			// インターフェイス メソッド呼び出し
+
+			int offset_vtbl = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__vtbl" );
+
+			// vtblのポインタを取得
+			//mov r11,qword ptr[rcx+offset_vtbl]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,offset_vtbl,MOD_BASE_DISP8);
+
+			int offset_this = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__this" );
+
+			// インターフェイスの場合は更に__thisを取得する
+			//mov rcx,qword ptr[rcx+offset_this]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RCX,REG_RCX,offset_this,MOD_BASE_DISP8);
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( pUserProc, vtblMasterListIndex, vtblIndex );
+			if( vtblMasterListIndex != 0 )
+			{
+				compiler.errorMessenger.OutputFatalError();
+			}
+		}
+		else if( pobj_c->IsComInterface() )
+		{
+			// COMインターフェイス メソッド呼び出し
+
+			//仮想関数（オブジェクトメソッド）呼び出し
+			// pObj -> vtbl1 -> func1
+			//               -> func2
+			//               -> func3
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( pUserProc, vtblMasterListIndex, vtblIndex );
+
+			// vtblのポインタを取得
+			//mov r11,qword ptr[rcx]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);		}
+		else
+		{
+			//仮想関数（オブジェクトメソッド）呼び出し
+			// pObj -> vtbl_master_list -> vtbl1 -> func1
+			//                                   -> func2
+			//                                   -> func3
+			//                          -> vtbl2 -> func1
+			//                                   -> func2
+			//                                   -> func3
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( pUserProc, vtblMasterListIndex, vtblIndex );
+
+			// vtblマスターリストのポインタを取得
+			//mov r11,qword ptr[rcx+sizeof(com_vtbl)]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,PTR_SIZE,MOD_BASE_DISP8);
+
+			// vtblのポインタを取得
+			//mov r11,dword ptr[r11+vtblMasterListIndex]
+			compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_R11, REG_R11, vtblMasterListIndex*PTR_SIZE, MOD_BASE_DISP32 );
+		}
+
+		//call qword ptr[r11+func_index]
+		if( vtblIndex * PTR_SIZE <= 0x7F ){
+			compiler.codeGenerator.PutOld(
+				(char)0x41,
+				(char)0xFF,
+				(char)0x53,
+				(char)(vtblIndex*PTR_SIZE)
+			);
+		}
+		else{
+			compiler.codeGenerator.PutOld(
+				(char)0x41,
+				(char)0xFF,
+				(char)0x93,
+				(long)(vtblIndex*PTR_SIZE)
+			);
+		}
+	}
+	else{
+		//通常呼び出し
+
+		//call ProcAddr
+		compiler.codeGenerator.op_call(pUserProc);
+	}
+
+	/* 64コンパイラでは不要
+	if(pDllProc->bCdecl){
+		//add esp,ParmSize
+	}*/
+
+
+	//レジスタのブロッキングを解除		※パラメータセット時にロックされたレジスタ
+	pobj_BlockReg->clear();
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//スタックフレームに存在する既存のパラメータを復元
+	pobj_parameter->RestoreParameter( (int)pUserProc->RealParams().size() );
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
+
+bool Opcode_CallDllProc( const char *lpszParms, DllProc *pDllProc ){
+
+	extern BOOL bDebugSupportProc;
+	if( compiler.IsDebug() && bDebugSupportProc == 0 && pDllProc->GetName() != "DebugBreak" )
+	{
+		Call_DebugSys_SaveContext();
+	}
+
+
+	////////////////////////
+	// パラメータのセット
+	////////////////////////
+
+	//パラメータオブジェクトを生成
+	ParamImpl *pobj_parameter=0;
+	pobj_parameter=new ParamImpl(lpszParms);
+
+	// デフォルト引数を適用
+	pobj_parameter->ApplyDefaultParameters( pDllProc->Params() );
+
+	//エラーチェック
+	if( !pobj_parameter->ErrorCheck( pDllProc->GetName(), pDllProc->Params() ) ){
+		//パラメータにエラーがあるときは処理を終える
+		return false;
+	}
+
+	//スタックフレームに存在する既存のパラメータをバックアップ
+	pobj_parameter->BackupParameter( (int)pDllProc->Params().size() );
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( pDllProc->GetName(), pDllProc->Params() );
+
+	//レジスタ、スタックフレームにセット
+	pobj_parameter->SetParameter(pDllProc->GetName(), pDllProc->Params() );
+
+
+	//レジスタのブロッキングを解除		※パラメータセット時にロックされたレジスタ
+	pobj_BlockReg->clear();
+
+
+	//動的リンクされたプロシージャの呼び出し
+
+	//call dword ptr[ImportTable]
+	compiler.codeGenerator.op_call( pDllProc );
+
+	/* 64コンパイラでは不要
+	if(pDllProc->bCdecl){
+		//add esp,ParmSize
+	}*/
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//スタックフレームに存在する既存のパラメータを復元
+	pobj_parameter->RestoreParameter( (int)pDllProc->Params().size() );
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+
+	return true;
+}
+
+void Opcode_CallDelegate( const Delegate &dg, const char *methodPtrValueStr, const char *objPtrValueStr, const char *params )
+{
+	extern BOOL bDebugSupportProc;
+	if( compiler.IsDebug() && bDebugSupportProc == 0 )
+	{
+		Call_DebugSys_SaveContext();
+	}
+
+
+	///////////////////////////////////////////////////////////////
+	// _System_LocalThisのダミーをセット
+	///////////////////////////////////////////////////////////////
+
+	char temporary[VN_SIZE]={0};
+	bool isDynamicCall = false;
+	if( objPtrValueStr && objPtrValueStr[0] ){
+		//_System_LocalThis（第一パラメータ）のダミーを作成
+		lstrcpy(temporary,"0,");
+
+		isDynamicCall = true;
+	}
+	if( dg.ReturnType().IsStruct() ){
+		// ※ByRef _System_ReturnValue パラメータのダミーをセット
+		lstrcat(temporary,"0,");
+	}
+
+	if(params[0]=='\0'&&temporary[0])
+		temporary[lstrlen(temporary)-1]=0;
+	else lstrcat(temporary,params);
+
+	const Parameters *pParams = &dg.Params();
+	if( isDynamicCall )
+	{
+		pParams = &dg.GetDynamicParams();
+	}
+
+
+	ParamImpl *pobj_parameter = new ParamImpl( temporary );
+
+	//スタックフレームに存在する既存のパラメータをバックアップ
+	pobj_parameter->BackupParameter( (int)pParams->size() );
+
+	//一時オブジェクトを生成
+	pobj_parameter->NewTempParameters( dg.GetName(), *pParams );
+
+	//レジスタ、スタックフレームにセット
+	pobj_parameter->SetParameter( dg.GetName(), *pParams );
+
+
+	if( objPtrValueStr && objPtrValueStr[0] )
+	{
+		RELATIVE_VAR RelativeVar;
+		//Constアクセスが不可能なメソッドの場合
+		if( !GetVarOffsetReadWrite( objPtrValueStr, &RelativeVar, Type() ) ){
+			Jenga::Throw( "Opcode_CallDelegate関数内で呼ばれるGetVarOffsetReadWrite関数に失敗" );
+			return;
+		}
+
+		SetVarPtrToReg(REG_RCX,&RelativeVar);
+
+		// 参照を実体ポインタにする
+		//mov rcx,qword ptr[rcx]
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RCX,REG_RCX,0,MOD_BASE);
+	}
+
+
+	{
+		////////////////////////
+		// call
+		////////////////////////
+		RELATIVE_VAR RelativeVar;
+		GetVarOffsetReadOnly( methodPtrValueStr, &RelativeVar, Type() );
+		SetVarPtrToReg(REG_RAX,&RelativeVar);
+
+		//mov rax,qword ptr[rax]
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RAX,REG_RAX,0,MOD_BASE);
+
+		//call rax
+		compiler.codeGenerator.PutOld(
+			(char)0xFF,
+			(char)0xD0
+		);
+	}
+
+
+	//レジスタのブロッキングを解除		※パラメータセット時にロックされたレジスタ
+	pobj_BlockReg->clear();
+
+	//一時オブジェクトを破棄
+	pobj_parameter->DeleteTempParameters();
+
+	//スタックフレームに存在する既存のパラメータを復元
+	pobj_parameter->RestoreParameter( (int)pParams->size() );
+
+	//パラメータオブジェクトを破棄
+	delete pobj_parameter;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Func.cpp	(revision 482)
@@ -0,0 +1,652 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+#ifdef _AMD64_
+#include "../BasicCompiler64/FunctionValue.h"
+#else
+#include "../BasicCompiler32/FunctionValue.h"
+#endif
+
+int GetFunctionFromName(char *FuncName){
+	if( lstrcmpi( FuncName, "Len" ) == 0 )				return FUNC_LEN;
+	if( lstrcmpi( FuncName, "AddressOf" ) == 0 )		return FUNC_ADDRESSOF;
+	if( lstrcmpi( FuncName, "SizeOf" ) == 0 )			return FUNC_SIZEOF;
+	if( lstrcmpi( FuncName, "VarPtr" ) == 0 )			return FUNC_VARPTR;
+	if( lstrcmpi( FuncName, "ObjPtr" ) == 0 )			return FUNC_OBJPTR;
+	if( lstrcmpi( FuncName, "__delegate_dynamicmethod_call" ) == 0 )	return FUNC_DELEGATE_DYNAMICMETHOD_CALL;
+	if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 )		return FUNC_DELEGATE_STATICMETHOD_CALL;
+	if( lstrcmpi( FuncName, "_System_GetNowScopeCatchAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS;
+	if( lstrcmpi( FuncName, "_System_GetNowScopeFinallyAddresses" ) == 0 )return FUNC_SYSTEM_GET_NOW_SCOPE_FINALLY_ADDRESS;
+	if( lstrcmpi( FuncName, "_System_GetBp" ) == 0 )	return FUNC_SYSTEM_GET_BP;
+	if( lstrcmpi( FuncName, "_System_GetSp" ) == 0 )	return FUNC_SYSTEM_GET_SP;
+	if( lstrcmp( FuncName, "_System_GetComVtbl" ) == 0 )		return FUNC_SYSTEM_GET_COM_VTBL;
+	if( lstrcmp( FuncName, "_System_GetVtblList" ) == 0 )		return FUNC_SYSTEM_GET_VTBL_LIST;
+	if( lstrcmp( FuncName, "_System_GetDefaultConstructor" ) == 0 )	return FUNC_SYSTEM_GET_DEFAULT_CONSTRUCTOR;
+	if( lstrcmp( FuncName, "_System_GetDestructor" ) == 0 )			return FUNC_SYSTEM_GET_DESTRUCTOR;
+	if( lstrcmpi( FuncName, "GetDouble" ) == 0 )		return FUNC_GETDOUBLE;
+	if( lstrcmpi( FuncName, "GetSingle" ) == 0 )		return FUNC_GETSINGLE;
+	if( lstrcmpi( FuncName, "GetQWord" ) == 0 )			return FUNC_GETQWORD;
+	if( lstrcmpi( FuncName, "GetDWord" ) == 0 )			return FUNC_GETDWORD;
+	if( lstrcmpi( FuncName, "GetWord" ) == 0 )			return FUNC_GETWORD;
+	if( lstrcmpi( FuncName, "GetByte" ) == 0 )			return FUNC_GETBYTE;
+	return 0;
+}
+void Opcode_Func_Len( const char *Parameter ){
+	BOOL bArrayHead;
+
+	const char *tempParm=Parameter;
+	char temporary[VN_SIZE];
+	char temp2[32];
+	Type type;
+	if( !GetVarType(Parameter,type,0) ){
+		sprintf(temporary,"_System_DummyStr2=%s",Parameter);
+		OpcodeCalc(temporary);
+
+		lstrcpy(temp2,"_System_DummyStr2");
+		tempParm=temp2;
+
+		type.SetType( DEF_OBJECT, compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr() );
+	}
+
+	if( type.IsStringClass() ){
+		//Stringオブジェクトの場合
+		sprintf(temporary,"%s.Length",tempParm);
+
+		int reg=REG_RAX;
+		NumOpe(&reg,temporary,Type(),Type());
+		return;
+	}
+
+	Subscripts subscripts;
+	RELATIVE_VAR RelativeVar;
+	if(!GetVarOffsetReadOnly(tempParm,&RelativeVar,type,&subscripts)) return;
+
+	if(type.GetBasicType()&FLAG_PTR){
+		type.SetBasicType( type.GetBasicType() & ( ~FLAG_PTR ) );
+
+		bArrayHead=1;
+	}
+	else bArrayHead=0;
+
+	int typeSize = type.GetSize();
+
+	if(bArrayHead) typeSize*=JumpSubScripts(subscripts);
+
+	//mov rax,TypeSize
+	compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RAX,typeSize);
+
+	return;
+}
+
+void _Opcode_Func_AddressOf( const char *methodInstanceName, const UserProc &userProc )
+{
+	if( userProc.IsVirtual() )
+	{
+		///////////////////////////////
+		// 仮想関数の場合
+		// thisポインタをrcxにコピー
+		///////////////////////////////
+
+		const CClass *pobj_c;
+
+		char ObjectName[VN_SIZE];
+		ReferenceKind referenceKind;
+		SplitObjectName(methodInstanceName,ObjectName, referenceKind );
+
+		if(ObjectName[0]){
+			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
+			else{
+				RELATIVE_VAR RelativeVar;
+				Type type;
+				if(!GetVarOffsetReadOnly(ObjectName,&RelativeVar,type)) return;
+				SetVarPtrToReg(REG_RCX,&RelativeVar);
+
+				//参照タイプが整合しているかをチェック
+				if( !( type.IsObject() && referenceKind == RefDot
+					|| type.IsObjectPtr() && referenceKind == RefPointer ) )
+				{
+					compiler.errorMessenger.Output(104,ObjectName,cp);
+				}
+
+				if(type.IsObjectPtr()){
+					//mov rcx,qword ptr[rcx]
+					compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RCX,REG_RCX,0,MOD_BASE);
+				}
+			}
+		}
+		else{
+InClassMember:
+			//自身のオブジェクトのThisポインタをrcxにコピー
+			SetThisPtrToReg(REG_RCX);
+
+			pobj_c=compiler.pCompilingClass;
+		}
+
+
+		int vtblIndex;
+		if( pobj_c->IsInterface() )
+		{
+			// インターフェイスメソッド
+
+			int offset_vtbl = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__vtbl" );
+
+			// vtblのポインタを取得
+			//mov r11,qword ptr[rcx+offset_vtbl]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,offset_vtbl,MOD_BASE_DISP8);
+
+			int offset_this = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr()->GetMemberOffset( "__this" );
+
+			// インターフェイスの場合は更に__thisを取得する
+			//mov rcx,qword ptr[rcx+offset_this]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RCX,REG_RCX,offset_this,MOD_BASE_DISP8);
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( &userProc, vtblMasterListIndex, vtblIndex );
+			if( vtblMasterListIndex != 0 )
+			{
+				compiler.errorMessenger.OutputFatalError();
+			}
+		}
+		else if( pobj_c->IsComInterface() )
+		{
+			//仮想関数（オブジェクトメソッド）
+			// pObj -> vtbl1 -> func1
+			//               -> func2
+			//               -> func3
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( &userProc, vtblMasterListIndex, vtblIndex );
+
+			// vtblのポインタを取得
+			//mov r11,qword ptr[rcx]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,0,MOD_BASE);
+		}
+		else
+		{
+			//仮想関数（オブジェクトメソッド）
+			// pObj -> vtbl_master_list -> vtbl1 -> func1
+			//                                   -> func2
+			//                                   -> func3
+			//                          -> vtbl2 -> func1
+			//                                   -> func2
+			//                                   -> func3
+
+			int vtblMasterListIndex;
+			pobj_c->GetVtblMasterListIndexAndVtblIndex( &userProc, vtblMasterListIndex, vtblIndex );
+
+			// vtblマスターリストのポインタを取得
+			//mov r11,qword ptr[rcx+sizeof(com_vtbl)]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RCX,PTR_SIZE,MOD_BASE_DISP8);
+
+			// vtblのポインタを取得
+			//mov r11,dword ptr[r11+vtblMasterListIndex]
+			compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_R11, REG_R11, vtblMasterListIndex, MOD_BASE_DISP32 );
+		}
+
+		//mov rax,qword ptr[r11+func_index]
+		if( vtblIndex * PTR_SIZE <= 0x7F )
+		{
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RAX,REG_R11,vtblIndex*PTR_SIZE,MOD_BASE_DISP8);
+		}
+		else
+		{
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RAX,REG_R11,vtblIndex*PTR_SIZE,MOD_BASE_DISP32);
+		}
+	}
+	else{
+		//一般の関数
+
+		//mov rax,ProcAddr
+		compiler.codeGenerator.op_addressof( REG_RAX, &userProc );
+	}
+
+	userProc.Using();
+}
+void Opcode_CreateDelegate( const CClass &dgClass, const char *methodInstanceName, const UserProc &userProc )
+{
+	/////////////////////////////////////////////////////////////////
+	// 関数ポインタをpush
+	/////////////////////////////////////////////////////////////////
+
+	//mov rax,AddressOf
+	_Opcode_Func_AddressOf( methodInstanceName, userProc );
+
+
+	if( userProc.GetMethod().IsDynamic() )
+	{
+		//mov rdx,rax
+		compiler.codeGenerator.op_mov_RR( REG_RDX, REG_RAX );
+
+		pobj_BlockReg->lock( REG_RDX );
+
+
+		/////////////////////////////////////////////////////////////////
+		// オブジェクト ポインタをpush
+		/////////////////////////////////////////////////////////////////
+
+		// オブジェクト名を取得
+		char objectName[VN_SIZE];
+		char memberName[VN_SIZE];
+		char *thisPtrName = "This";
+		Type type;
+		if( SplitMemberName( methodInstanceName, objectName, memberName ) )
+		{
+			if( GetVarType( objectName, type, false ) )
+			{
+				thisPtrName = objectName;
+			}
+		}
+
+		// オブジェクト ポインタを取得
+		RELATIVE_VAR relativeVar;
+		GetVarOffsetReadOnly( thisPtrName, &relativeVar, type );
+		if( !type.IsObject() )
+		{
+			extern int cp;
+			compiler.errorMessenger.Output(1,NULL,cp);
+			return;
+		}
+
+		SetVarPtrToReg( REG_RAX, &relativeVar );
+
+		//mov rcx,dword ptr[rax]
+		compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RCX, REG_RAX, 0, MOD_BASE );
+
+		pobj_BlockReg->unlock( REG_RDX );
+	}
+	else
+	{
+		//mov rcx,rax
+		compiler.codeGenerator.op_mov_RR( REG_RCX, REG_RAX );
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// call _CreateDynamicDelegate/_CreateStaticDelegate
+	/////////////////////////////////////////////////////////////////
+
+	std::vector<const UserProc *> subs;
+	if( userProc.GetMethod().IsDynamic() )
+	{
+		dgClass.GetStaticMethods().Enum( "_CreateDynamicDelegate", subs );
+	}
+	else
+	{
+		dgClass.GetStaticMethods().Enum( "_CreateStaticDelegate", subs );
+	}
+
+	// call _CreateDynamicDelegate
+	compiler.codeGenerator.op_call( subs[0] );
+}
+void Opcode_Func_AddressOf( const char *name, const Type &baseType, bool isCallOn, Type &resultType )
+{
+	extern int cp;
+
+	const Parameters *pBaseParams = NULL;
+	const Type *pBaseReturnType = NULL;
+	if( baseType.IsProcPtr() )
+	{
+		// 左辺で関数ポインタを要求されているとき
+		const ProcPointer *pTempProcPointer = compiler.GetObjectModule().meta.GetProcPointers()[baseType.GetIndex()];
+		pBaseParams = &pTempProcPointer->Params();
+		pBaseReturnType = &pTempProcPointer->ReturnType();
+	}
+	else if( baseType.IsDelegate() )
+	{
+		// 左辺でデリゲートを要求されているとき
+		const Delegate *pTempDelegate = &baseType.GetClass().GetDelegate();
+		pBaseParams = &pTempDelegate->Params();
+		pBaseReturnType = &pTempDelegate->ReturnType();
+	}
+
+	const UserProc *pUserProc;
+	if( pBaseParams && pBaseReturnType )
+	{
+		//左辺の型にのっとり、オーバーロードを解決
+
+		std::vector<const UserProc *> subs;
+		GetOverloadSubHash( name, subs );
+		if( subs.size() == 0 ){
+			compiler.errorMessenger.Output(27,name,cp);
+			return;
+		}
+
+		//オーバーロードを解決
+		pUserProc=OverloadSolution( name, subs, *pBaseParams, Type(), Type() );
+
+		if( isCallOn )
+		{
+			// コード生成を伴う場合はエラーチェックを行う
+
+			if( baseType.IsDelegate() )
+			{
+				// デリゲート
+				// 共変戻り値、反変引数をサポート
+				if( !(
+					pBaseParams->Equals( pUserProc->Params(), true )
+					&& ( pBaseReturnType->Equals( pUserProc->ReturnType() ) || pBaseReturnType->IsCovariant( pUserProc->ReturnType() ) )
+					) )
+				{
+					compiler.errorMessenger.Output(67, name, cp );
+				}
+			}
+			else
+			{
+				// 関数ポインタ
+				if( !(
+					pBaseParams->Equals( pUserProc->Params() )
+					&& pBaseReturnType->Equals( pUserProc->ReturnType() )
+					) )
+				{
+					compiler.errorMessenger.Output(66, name, cp );
+				}
+			}
+		}
+
+		if(!pUserProc){
+			compiler.errorMessenger.Output(27,name,cp);
+			return;
+		}
+	}
+	else{
+		pUserProc=GetSubHash(name);
+		if(!pUserProc){
+			compiler.errorMessenger.Output(27,name,cp);
+			return;
+		}
+	}
+
+	if( baseType.IsDelegate() )
+	{
+		if( isCallOn )
+		{
+			// デリゲートのとき
+			Opcode_CreateDelegate( baseType.GetClass(), name, *pUserProc );
+		}
+		resultType = baseType;
+	}
+	else
+	{
+		if( isCallOn )
+		{
+			// 関数ポインタのとき
+			_Opcode_Func_AddressOf( name, *pUserProc );
+		}
+		resultType.SetBasicType( DEF_PTR_VOID );
+	}
+}
+void Opcode_Func_SizeOf( const string &typeName ){
+	Type tempType;
+	if( !compiler.StringToType( typeName, tempType ) ){
+		compiler.errorMessenger.Output(3,typeName,cp);
+		return;
+	}
+
+	int typeSize = ( tempType.IsObject() ) ?
+		tempType.GetClass().GetSize() : tempType.GetSize();
+
+	//mov rax,size
+	compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RAX,typeSize);
+}
+void Opcode_Func_VarPtr( const char *Parameter, Type &resultType, bool isCallOn ){
+	if( isCallOn == false ){
+		// 戻り値の型を取得するだけ
+
+		//変数のアドレスを取得
+		if(!GetVarType( Parameter, resultType, true )) return;
+
+		resultType.PtrLevelUp();
+
+		return;
+	}
+
+	RELATIVE_VAR RelativeVar;
+
+	//変数のアドレスを取得
+	if(!GetVarOffsetReadOnly( Parameter, &RelativeVar, resultType )) return;
+
+	int beforeType = resultType.GetBasicType();
+
+	resultType.PtrLevelUp();
+
+	SetVarPtrToReg(REG_RAX,&RelativeVar);
+
+	// TODO: 取り除く（この動きはObjPtrに託す）
+	/*
+	if( beforeType == DEF_OBJECT && lstrcmpi( Parameter, "This" ) != 0 ){
+		//参照をオブジェクトポインタに変更
+
+		//mov rax,qword ptr[rax]
+		compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RAX, REG_RAX, 0, MOD_BASE );
+
+		compiler.errorMessenger.Output(-120,NULL,cp);
+	}*/
+}
+void Opcode_Func_ObjPtr( const char *Parameter, Type &resultType, bool isCallOn ){
+	if( isCallOn == false ){
+		// 戻り値の型を取得するだけ
+
+		//変数のアドレスを取得
+		if(!GetVarType( Parameter, resultType, true )) return;
+
+		resultType.PtrLevelUp();
+
+		return;
+	}
+
+	RELATIVE_VAR RelativeVar;
+
+	//変数のアドレスを取得
+	if(!GetVarOffsetReadOnly( Parameter, &RelativeVar, resultType )) return;
+
+	int beforeType = resultType.GetBasicType();
+
+	resultType.PtrLevelUp();
+
+	SetVarPtrToReg(REG_RAX,&RelativeVar);
+
+	if( lstrcmpi( Parameter, "This" )==0 ){
+		// Thisの場合は特別にオブジェクトポインタが返ってくるので、何もせずに抜ける
+	}
+	else if( beforeType == DEF_OBJECT ){
+		//参照をオブジェクトポインタに変更
+
+		//mov rax,qword ptr[rax]
+		compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RAX, REG_RAX, 0, MOD_BASE );
+	}
+	else{
+		compiler.errorMessenger.Output(134,NULL,cp );
+	}
+}
+
+void Opcode_Func_delegate_call( const char *paramsStr, Type &resultType, bool isDynamicCall, bool isCallOn )
+{
+	if( isCallOn )
+	{
+		int i = 0;
+		char methodPtrParamStr[VN_SIZE];
+		i = GetOneParameter( paramsStr, i, methodPtrParamStr );
+
+		char objPtrValueStr[VN_SIZE] = "";
+		if( isDynamicCall )
+		{
+			i = GetOneParameter( paramsStr, i, objPtrValueStr );
+		}
+
+		Opcode_CallDelegate( compiler.pCompilingClass->GetDelegate(), methodPtrParamStr, objPtrValueStr, paramsStr + i );
+	}
+
+	resultType = UserProc::CompilingUserProc().ReturnType();
+}
+
+void Opcode_Func_System_Get_Bp()
+{
+	//mov rax,rbp
+	compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RBP);
+}
+void Opcode_Func_System_Get_Sp()
+{
+	//mov rax,rsp
+	compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RSP);
+}
+
+void Opcode_Func_System_GetComVtbl( const char *parameter )
+{
+	Type classType;
+	compiler.StringToType( parameter, classType );
+
+	// mov rax,com_vtbl
+	compiler.codeGenerator.op_mov_RV_com_vtbl( REG_RAX, &classType.GetClass() );
+}
+void Opcode_Func_System_GetVtblList( const char *parameter )
+{
+	Type classType;
+	compiler.StringToType( parameter, classType );
+
+	// mov rax,com_vtbl
+	compiler.codeGenerator.op_mov_RV_vtbl( REG_RAX, &classType.GetClass() );
+}
+void Opcode_Func_System_GetDefaultConstructor( const char *parameter )
+{
+	Type classType;
+	compiler.StringToType( parameter, classType );
+
+	if( classType.GetClass().GetConstructorMethod() )
+	{
+		//mov rax,ProcAddr
+		compiler.codeGenerator.op_addressof( REG_RAX, &classType.GetClass().GetConstructorMethod()->GetUserProc() );
+	}
+	else
+	{
+		// デフォルトコンストラクタを持たない
+
+		//xor rax,rax
+		compiler.codeGenerator.op_zero_reg( REG_RAX );
+	}
+}
+void Opcode_Func_System_GetDestructor( const char *parameter )
+{
+	Type classType;
+	compiler.StringToType( parameter, classType );
+
+	//mov rax,ProcAddr
+	compiler.codeGenerator.op_addressof( REG_RAX, &classType.GetClass().GetDestructorMethod()->GetUserProc() );
+}
+
+void Opcode_Func_GetPtrData( const char *Parameter, const int type ){
+	int reg=REG_RAX;
+	Type tempType;
+	if( !NumOpe(&reg,Parameter,Type(),tempType) ){
+		return;
+	}
+	if(!tempType.IsWhole()){
+		compiler.errorMessenger.Output(11,Parameter,cp);
+		return;
+	}
+
+	if(type==DEF_DOUBLE){
+		//movlpd xmm0,qword ptr[rax]
+		compiler.codeGenerator.op_movlpd_RM(REG_XMM0,REG_RAX,0,MOD_BASE);
+	}
+	else if(type==DEF_SINGLE){
+		//movss xmm0,dword ptr[rax]
+		compiler.codeGenerator.op_movss_RM(REG_XMM0,REG_RAX,0,MOD_BASE);
+	}
+	else{
+		//mov rax,ptr[rax]
+		compiler.codeGenerator.op_mov_RM(Type(type).GetSize(),REG_RAX,REG_RAX,0,MOD_BASE);
+	}
+}
+
+bool Opcode_CallFunc( const char *Parameter, const int FuncNum, const Type &baseType, Type &resultType, bool isCallOn )
+{
+	switch(FuncNum){
+		case FUNC_LEN:
+			if( isCallOn ) Opcode_Func_Len(Parameter);
+			resultType.SetBasicType( DEF_LONG );
+			break;
+		case FUNC_ADDRESSOF:
+			Opcode_Func_AddressOf( Parameter, baseType, isCallOn, resultType );
+			break;
+		case FUNC_SIZEOF:
+			if( isCallOn ) Opcode_Func_SizeOf(Parameter);
+			resultType.SetBasicType( DEF_LONG );
+			break;
+		case FUNC_VARPTR:
+			Opcode_Func_VarPtr( Parameter, resultType, isCallOn );
+			break;
+		case FUNC_OBJPTR:
+			Opcode_Func_ObjPtr( Parameter, resultType, isCallOn );
+			break;
+		case FUNC_DELEGATE_DYNAMICMETHOD_CALL:
+			Opcode_Func_delegate_call( Parameter, resultType, true, isCallOn );
+			break;
+		case FUNC_DELEGATE_STATICMETHOD_CALL:
+			Opcode_Func_delegate_call( Parameter, resultType, false, isCallOn );
+			break;
+		case FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS:
+			if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeCatchAddress();
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SYSTEM_GET_NOW_SCOPE_FINALLY_ADDRESS:
+			if( isCallOn ) Exception::Opcode_Func_System_GetNowScopeFinallyAddress();
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SYSTEM_GET_BP:
+			if( isCallOn ) Opcode_Func_System_Get_Bp();
+			resultType.SetBasicType( DEF_INT64 );
+			break;
+		case FUNC_SYSTEM_GET_SP:
+			if( isCallOn ) Opcode_Func_System_Get_Sp();
+			resultType.SetBasicType( DEF_INT64 );
+			break;
+		case FUNC_SYSTEM_GET_COM_VTBL:
+			if( isCallOn ) Opcode_Func_System_GetComVtbl( Parameter );
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SYSTEM_GET_VTBL_LIST:
+			if( isCallOn ) Opcode_Func_System_GetVtblList( Parameter );
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SYSTEM_GET_DEFAULT_CONSTRUCTOR:
+			if( isCallOn ) Opcode_Func_System_GetDefaultConstructor( Parameter );
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+		case FUNC_SYSTEM_GET_DESTRUCTOR:
+			if( isCallOn ) Opcode_Func_System_GetDestructor( Parameter );
+			resultType.SetBasicType( DEF_PTR_VOID );
+			break;
+
+		case FUNC_GETDOUBLE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_DOUBLE);
+			resultType.SetBasicType( DEF_DOUBLE );
+			break;
+		case FUNC_GETSINGLE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_SINGLE);
+			resultType.SetBasicType( DEF_SINGLE );
+			break;
+		case FUNC_GETQWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_QWORD);
+			resultType.SetBasicType( DEF_QWORD );
+			break;
+		case FUNC_GETDWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_DWORD);
+			resultType.SetBasicType( DEF_DWORD );
+			break;
+		case FUNC_GETWORD:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_WORD);
+			resultType.SetBasicType( DEF_WORD );
+			break;
+		case FUNC_GETBYTE:
+			if( isCallOn ) Opcode_Func_GetPtrData(Parameter,DEF_BYTE);
+			resultType.SetBasicType( DEF_BYTE );
+			break;
+		default:
+			return false;
+	}
+	return true;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Object.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Object.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Object.cpp	(revision 482)
@@ -0,0 +1,347 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+void _call_constructor( const CClass *pobj_c,const char *CreateParameter,int ObjectSize,BOOL bSomeObjects){
+	////////////////////////////
+	// コンストラクタの呼び出し
+	////////////////////////////
+	
+	//この関数を使用する場合は、
+	//・ebxにオブジェクトの個数（複数個の場合のみ）
+	//・スタックフレームの先頭参照位置に先頭Thisポインタ
+	//をセットしておかなければならない
+
+
+	//jnzの番地
+	/*extern int obp;
+	int jnz_back = obp;*/
+
+	if(bSomeObjects){
+		compiler.errorMessenger.OutputFatalError();
+		//mov qword ptr[rsp+offset],rbx     ※スタックフレームを利用
+		//pobj_sf->push(REG_RBX);
+
+		// ※ここでプッシュされた値はコンストラクタのthisポインタとなる
+		//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+		//pobj_sf->push(REG_RAX);
+	}
+
+
+	////////////////////////
+	// オーバーロードを解決
+	////////////////////////
+
+	std::vector<const UserProc *> subs;
+	pobj_c->GetDynamicMethods().Enum( pobj_c->GetName().c_str(), subs );
+
+	const UserProc *pUserProc;
+	if( subs.size() > 0 ){
+		//オーバーロードを解決
+		pUserProc=OverloadSolutionWithStrParam(pobj_c->GetName().c_str(),
+			subs,CreateParameter,"");
+
+		if(!pUserProc) return;
+	}
+
+	{
+		// 動的型情報をセットする
+		// obj._System_SetType( _System_TypeBase_Search( fullName ) )
+		subs.clear();
+		pobj_c->GetDynamicMethods().Enum( "_System_SetType", subs );
+		if( subs.size() == 1 ){
+			char temporary[VN_SIZE];
+			sprintf( temporary, "_System_TypeBase_Search(\"%s\"))", pobj_c->GetFullName().c_str() );
+
+			Opcode_CallProc(temporary,
+				subs[0],
+				PROCFLAG_NEW,"");
+		}
+		else{
+			compiler.errorMessenger.OutputFatalError();
+		}
+	}
+
+	//コンストラクタを呼び出す
+	Opcode_CallProc(CreateParameter,
+		pUserProc,
+		PROCFLAG_NEW,"");
+
+	if(bSomeObjects){
+		/*
+		//mov rax,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RAX);
+
+		//mov rbx,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RBX);
+
+		//add rax,TypeSize
+		compiler.codeGenerator.op_add_RV( REG_RAX, ObjectSize );
+
+		//sub rbx,1
+		compiler.codeGenerator.op_sub_RV( sizeof(_int64), REG_RBX, 1 );
+
+		//jnz ↑
+		compiler.codeGenerator.op_jne( jnz_back-obp, sizeof(long), false, true );
+		*/
+	}
+}
+void Operator_New( const CClass &objClass, const char *objectSizeStr, const char *parameter, const Type &baseType )
+{
+	const CClass *pClass = &objClass;
+
+	if( pClass->IsInterface() )
+	{
+		pClass = compiler.GetObjectModule().meta.GetClasses().GetInterfaceInfoClassPtr();
+	}
+
+	int typeSize = pClass->GetSize();
+
+	if( pClass->IsAbstract() ){
+		//抽象クラスだったとき
+		compiler.errorMessenger.Output(125,pClass->GetName().c_str(),cp);
+	}
+
+	BOOL bSomeObjects=0;
+	if(objectSizeStr[0]){
+		bSomeObjects=1;
+
+		int reg=REG_RAX;
+		Type tempType;
+		NumOpe(&reg,objectSizeStr,Type(),tempType);
+		if( !tempType.IsWhole() ) compiler.errorMessenger.Output(49,NULL,cp);
+
+		//※添え字上限値であることを考慮
+		//add rax,1
+		compiler.codeGenerator.op_add_RV(REG_RAX,1);
+
+		//オブジェクトの個数をrbxに一時保持
+		//※rbxは関数が呼ばれても不変
+		//mov rbx,rax
+		compiler.codeGenerator.op_mov_RR(REG_RBX,REG_RAX);
+
+		//imul rax,size
+		compiler.codeGenerator.op_imul_RV(sizeof(_int64),REG_RAX,typeSize);
+
+		//add rax,OBJECT_HEAD_SIZE
+		compiler.codeGenerator.op_add_RV(REG_RAX,OBJECT_HEAD_SIZE);
+
+		//mov rcx,rax
+		compiler.codeGenerator.op_mov_RR(REG_RCX,REG_RAX);
+	}
+	else{
+		//オブジェクトの個数をrbxに一時保持
+		//※rbxは関数が呼ばれても不変
+		//mov rbx,1
+		compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RBX,1);
+
+		//mov rcx,typeSize+OBJECT_HEAD_SIZE
+		compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RCX,typeSize+OBJECT_HEAD_SIZE);
+	}
+
+	if( baseType.IsObject() ){
+		// オブジェクト インスタンス
+		// ※DeleteはGCで処理
+
+		//call _System_GC_malloc_ForObject
+		extern const UserProc *pSub_System_GC_malloc_ForObject;
+		compiler.codeGenerator.op_call(pSub_System_GC_malloc_ForObject);
+	}
+	else{
+		// オブジェクトポインタ
+		// ※明示的なDeleteが必要
+
+		//call _System_GC_malloc_ForObjectPtr
+		extern const UserProc *pSub_System_GC_malloc_ForObjectPtr;
+		compiler.codeGenerator.op_call(pSub_System_GC_malloc_ForObjectPtr);
+	}
+
+
+	/*
+	確保されたヒープ領域のポインタ（callocの戻り値eax）をpPtrとすると、
+	pPtr-=OBJECT_HEAD_SIZE ... ( sizeof(DWORD)*4 )
+	pPtr[0]=オブジェクトの個数
+	pPtr[1]=オブジェクトのサイズ
+	pPtr[2]=デストラクタの関数ポインタ
+	pPtr[3]=reserve
+	*/
+
+
+	//mov qword ptr[rax],rbx（オブジェクトの個数）
+	compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RBX,REG_RAX,0,MOD_BASE);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	//mov qword ptr[rax],typeSize（オブジェクトのサイズ）
+	compiler.codeGenerator.op_mov_MV(sizeof(_int64),REG_RAX,0, Schedule::None, false, NON_OFFSET,typeSize);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	const CMethod *method = pClass->GetDestructorMethod();
+	if( method == NULL ) return;
+
+	//mov rcx,DestructorProcAddr（デストラクタの関数ポインタ）
+	compiler.codeGenerator.op_addressof( REG_RCX, &method->GetUserProc() );
+
+	//mov qword ptr[rax],rcx
+	compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RCX,REG_RAX,0,MOD_BASE);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	// リザーブ領域
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	// ※ここでプッシュされた値はNew演算子の戻り値となる
+	//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+	pobj_sf->push(REG_RAX);
+
+
+	//仮想関数テーブルを初期化
+	if( pClass->IsExistVirtualFunctions()
+		&& !pClass->IsAbstract() )
+	{
+		// mov rcx,com_vtbl
+		compiler.codeGenerator.op_mov_RV_com_vtbl( REG_RCX, pClass );
+
+		//mov qword ptr[rax],rcx
+		compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RCX,REG_RAX,0,MOD_BASE);
+
+		// mov rcx,vtblAddress
+		compiler.codeGenerator.op_mov_RV_vtbl( REG_RCX, pClass );
+
+		//mov qword ptr[rax+sizeof(com_vtbl)],rcx
+		compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RCX,REG_RAX,PTR_SIZE,MOD_BASE_DISP8);
+
+
+		// 仮想関数になるメソッドに使用チェックをつける
+		BOOST_FOREACH( const CMethod *pMethod, pClass->GetDynamicMethods() )
+		{
+			if( pMethod->IsVirtual() )
+			{
+				pMethod->GetUserProc().Using();
+			}
+		}
+		BOOST_FOREACH( const ::Interface *pInterface, pClass->GetInterfaces() )
+		{
+			BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() )
+			{
+				if( pMethod->IsVirtual() )
+				{
+					pMethod->GetUserProc().Using();
+				}
+			}
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////////
+
+	////////////////////////////
+	// コンストラクタの呼び出し
+	////////////////////////////
+
+	_call_constructor(pClass,parameter,typeSize,bSomeObjects);
+
+
+	//mov rax,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_RAX);
+}
+void OpcodeDelete(const char *Parameter, bool isSweeping){
+	int reg=REG_RAX;
+	Type tempType;
+	if( !NumOpe(&reg,Parameter,Type(),tempType) ){
+		return;
+	}
+	if(!( tempType.IsObjectPtr() || tempType.IsVoidPtr() )) compiler.errorMessenger.Output(122,NULL,cp);
+
+	//sub rax,OBJECT_HEAD_SIZE
+	compiler.codeGenerator.op_sub_RV(sizeof(_int64),REG_RAX,OBJECT_HEAD_SIZE);
+
+	//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+	pobj_sf->push(REG_RAX);
+
+
+	//mov rbx,qword ptr[rax]（オブジェクトの個数）
+	compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RBX,REG_RAX,0,MOD_BASE);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	//mov rsi,qword ptr[rax]（オブジェクトのサイズ）
+	compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RSI,REG_RAX,0,MOD_BASE);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	//mov rdi,qword ptr[rax]（デストラクタの関数ポインタ）
+	compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RDI,REG_RAX,0,MOD_BASE);
+
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	// リザーブ領域
+	//add rax,PTR_SIZE
+	compiler.codeGenerator.op_add_RV(REG_RAX,PTR_SIZE);
+
+
+	//mov rcx,rax
+	compiler.codeGenerator.op_mov_RR(REG_RCX,REG_RAX);
+
+
+	//jnzの番地
+	//int jnz_back=obp;
+
+	//mov qword ptr[rsp+offset],rcx     ※スタックフレームを利用
+	pobj_sf->push(REG_RCX);
+
+	//call rdi
+	compiler.codeGenerator.PutOld(
+		(char)0xFF,
+		(char)0xD7
+	);
+
+	//mov rcx,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_RCX);
+
+	//add rcx,rsi
+	compiler.codeGenerator.op_add_RR(REG_RCX,REG_RSI);
+
+	//sub rbx,1
+	compiler.codeGenerator.op_sub_RV(sizeof(_int64),REG_RBX,1);
+
+	//jnz ↑
+	//compiler.codeGenerator.op_jne( jnz_back-obp, sizeof(long), false, true );
+
+
+	//////////////////////////////////////////
+	// オブジェクトメンバ変数用のメモリを解放
+	//////////////////////////////////////////
+
+	//mov rcx,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_RCX);
+
+	if( isSweeping ){
+		//call _System_GC_free_for_SweepingDelete
+		extern const UserProc *pSub_System_GC_free_for_SweepingDelete;
+		compiler.codeGenerator.op_call(pSub_System_GC_free_for_SweepingDelete);
+	}
+	else{
+		//call free
+		extern const UserProc *pSub_free;
+		compiler.codeGenerator.op_call(pSub_free);
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_ProcOp.cpp	(revision 482)
@@ -0,0 +1,710 @@
+#include "stdafx.h"
+
+#include <Program.h>
+#include <Compiler.h>
+#include <Class.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void SystemProc( const UserProc &userProc ){
+	if( userProc.GetName() == "_System_GetEip" ){
+		//mov rax,qword ptr[rsp]
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RAX,REG_RSP,0,MOD_BASE);
+
+		//ret
+		compiler.codeGenerator.op_ret();
+	}
+	else if( userProc.GetName() == "_System_InitDllGlobalVariables" ){
+		////////////////////////////////////////
+		// DLLのグローバル領域をコンパイル
+		////////////////////////////////////////
+		if(!compiler.IsDll()){
+			//ret
+			compiler.codeGenerator.op_ret();
+
+			return;
+		}
+
+		const UserProc *pBackUserProc = &UserProc::CompilingUserProc();
+		UserProc::CompileStartForGlobalArea();
+
+		int BackCp;
+		BackCp=cp;
+		cp=-1;
+
+		//sub rsp,スタックフレームサイズ
+		const PertialSchedule *pStackFramePertialSchedule = compiler.codeGenerator.op_sub_rsp( 0, true );
+
+		if( compiler.IsDebug() )
+		{
+			//デバッグ用の変数を定義
+			DebugVariable();
+		}
+
+		//GC用の変数を定義
+		InitGCVariables();
+
+		//_System_StartupProgramの呼び出し
+		extern const UserProc *pSub_System_StartupProgram;
+		compiler.codeGenerator.op_call(pSub_System_StartupProgram);
+
+		//クラスに属する静的メンバを定義
+		compiler.GetObjectModule().meta.GetClasses().InitStaticMember();
+
+		GetGlobalDataForDll();
+
+		//add rsp,スタックフレームサイズ
+		compiler.codeGenerator.op_add_RV(REG_RSP,pobj_sf->GetFrameSize(0));
+
+		//スタックフレームスケジュール（subコマンドに渡す値）
+		compiler.codeGenerator.opfix( pStackFramePertialSchedule, pobj_sf->GetFrameSize(0) );
+
+		UserProc::CompileStartForUserProc( pBackUserProc );
+		cp=BackCp;
+
+		//ret
+		compiler.codeGenerator.op_ret();
+	}
+	else if( userProc.GetName() == "_System_InitStaticLocalVariables" ){
+		//静的ローカルオブジェクトのコンストラクタ呼び出し
+
+		//sub rsp,スタックフレームサイズ
+		const PertialSchedule *pStackFramePertialSchedule = compiler.codeGenerator.op_sub_rsp( 0, true );
+
+		BOOST_FOREACH( Variable *pVar, compiler.GetObjectModule().meta.GetGlobalVars() ){
+			if(memicmp(pVar->GetName().c_str(),"Static%",7)==0){
+				//コンストラクタ呼び出し
+				if( pVar->GetType().IsObject() ){
+
+					//エラー用
+					cp=pVar->source_code_address;
+
+					CallConstructor(
+						pVar->GetName().c_str(),
+						pVar->GetSubscripts(),
+						pVar->GetType(),
+						pVar->GetParamStrForConstructor().c_str());
+				}
+			}
+		}
+
+		//add rsp,スタックフレームサイズ
+		compiler.codeGenerator.op_add_RV(REG_RSP,pobj_sf->GetFrameSize(0));
+
+		//スタックフレームスケジュール（subコマンドに渡す値）
+		compiler.codeGenerator.opfix( pStackFramePertialSchedule, pobj_sf->GetFrameSize(0) );
+
+		//ret
+		compiler.codeGenerator.op_ret();
+	}
+	else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ){
+		//sub rsp,8（※RSPを16バイト境界にあわせるため）
+		compiler.codeGenerator.op_sub_rsp(0x8);
+
+
+		const UserProc *pBackUserProc = &UserProc::CompilingUserProc();
+		UserProc::CompileStartForGlobalArea();
+
+		compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+		UserProc::CompileStartForUserProc( pBackUserProc );
+
+
+		//add rsp,8
+		compiler.codeGenerator.op_add_RV(REG_RSP,0x8);
+
+		//ret
+		compiler.codeGenerator.op_ret();
+	}
+	else{
+		compiler.errorMessenger.OutputFatalError();
+	}
+}
+void AutoGeneration(const UserProc &userProc){
+	if( userProc.GetName() == "InitializeUserTypes"
+		&& userProc.HasParentClass()
+		&& userProc.GetParentClass().GetName() == "_System_TypeBase" )
+	{
+		compiler.GetObjectModule().meta.GetClasses().Compile_System_InitializeUserTypes();
+	}
+	else if( userProc.GetName() == "InitializeUserTypesForBaseType"
+		&& userProc.HasParentClass()
+		&& userProc.GetParentClass().GetName() == "_System_TypeBase" )
+	{
+		compiler.GetObjectModule().meta.GetClasses().Compile_System_InitializeUserTypesForBaseType();
+	}
+	else if( userProc.GetName() == "RegisterGlobalRoots"
+		&& userProc.HasParentClass()
+		&& userProc.GetParentClass().GetName() == "_System_CGarbageCollection" )
+	{
+		Compile_AddGlobalRootsForGc();
+	}
+	else if( userProc.GetName() == compiler.globalAreaProcName ){
+		////////////////////////////////////////
+		// グローバル領域をコンパイル
+		////////////////////////////////////////
+
+		UserProc::pGlobalProc = &userProc;
+
+		const UserProc *pBackUserProc = &UserProc::CompilingUserProc();
+		UserProc::CompileStartForGlobalArea();
+
+		int BackCp = cp;
+		cp=-1;
+
+		//クラスに属する静的メンバを定義
+		compiler.GetObjectModule().meta.GetClasses().InitStaticMember();
+
+		//グローバル実行領域をコンパイル開始
+		CompileBuffer(0,0);
+
+		//Goto未知ラベルスケジュールが存在したらエラーにする
+		BOOST_FOREACH( const GotoLabelSchedule *pGotoLabelSchedule, compiler.codeGenerator.gotoLabelSchedules )
+		{
+			if(pGotoLabelSchedule->GetName().size()>0){
+				compiler.errorMessenger.Output(6,pGotoLabelSchedule->GetName(),pGotoLabelSchedule->GetSourceCodePos());
+			}
+			else{
+				char temporary[255];
+				sprintf(temporary,"%d",pGotoLabelSchedule->GetLineNum());
+				compiler.errorMessenger.Output(6,temporary,pGotoLabelSchedule->GetSourceCodePos());
+			}
+		}
+
+		UserProc::CompileStartForUserProc( pBackUserProc );
+		cp=BackCp;
+	}
+	else if( userProc.HasParentClass()
+		&& userProc.IsCastOperator()
+		&& userProc.ReturnType().IsInterface() )
+	{
+		// インターフェイス型にキャストするためのメソッド
+
+		int vtblMasterListIndex = userProc.GetParentClass().GetVtblMasterListIndex( &userProc.ReturnType().GetClass() );
+
+		char temporary[1024];
+		sprintf( temporary,
+			"Return New %s(ObjPtr( This ),Get_LONG_PTR( (Get_LONG_PTR( ObjPtr(This)+SizeOf(VoidPtr) ) + SizeOf(LONG_PTR)*%d) As VoidPtr ) As VoidPtr )",
+			userProc.ReturnType().GetClass().GetName().c_str(),
+			vtblMasterListIndex
+		);
+		MakeMiddleCode( temporary );
+
+		ChangeOpcode( temporary );
+	}
+	else{
+		compiler.errorMessenger.OutputFatalError();
+	}
+}
+void _compile_proc(const UserProc *pUserProc){
+	extern char *basbuf;
+	extern HANDLE hHeap;
+	int i3,i4;
+	char temporary[VN_SIZE];
+
+	if( pUserProc->GetLocalVars().size() ){
+		compiler.errorMessenger.OutputFatalError();
+		return;
+	}
+
+	trace_for_sourcecodestep( "★★★ " << pUserProc->GetFullName() << "のコンパイルを開始" );
+
+	pUserProc->CompleteCompile();
+
+	extern BOOL bSystemProc;
+	if(memcmp(pUserProc->GetName().c_str(),"_System_",8)==0) bSystemProc=1;
+	else bSystemProc=0;
+
+	extern BOOL bDebugSupportProc;
+	if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0){
+		if( !compiler.IsDebug() )
+		{
+			return;
+		}
+		bDebugSupportProc=1;
+	}
+	else bDebugSupportProc=0;
+
+	//コンパイル中の関数が属するクラス
+	compiler.pCompilingClass=pUserProc->GetParentClassPtr();
+
+	//コンパイルスタートをクラス管理クラスに追加
+	compiler.GetObjectModule().meta.GetClasses().StartCompile( pUserProc );
+
+	//コンパイル中の関数
+	UserProc::CompileStartForUserProc( pUserProc );
+
+	// コンパイル中の関数が属する名前空間
+	compiler.GetNamespaceSupporter().SetLivingNamespaceScopes( pUserProc->GetNamespaceScopes() );
+
+	// コンパイル中の関数でImportsされている名前空間
+	compiler.GetNamespaceSupporter().SetImportedNamespaces( pUserProc->GetImportedNamespaces() );
+
+	// コード生成対象を選択
+	compiler.codeGenerator.Select( (const_cast<UserProc *>(pUserProc))->GetNativeCode() );
+
+	if(pUserProc->IsSystem()){
+		////////////////////
+		// 特殊関数
+		////////////////////
+
+		extern int AllLocalVarSize;
+		AllLocalVarSize=0;
+
+		//スタックフレーム管理用オブジェクトを初期化
+		extern StackFrame *pobj_sf;
+		pobj_sf=new StackFrame();
+
+		SystemProc(*pUserProc);
+
+		//スタックフレーム管理用オブジェクトを破棄
+		delete pobj_sf;
+		pobj_sf=0;
+
+		return;
+	}
+
+	if( !pUserProc->IsAutoGeneration() )
+	{
+		cp=pUserProc->GetCodePos();
+		for(;;cp++){
+			if(IsCommandDelimitation(basbuf[cp])) break;
+		}
+		cp--;
+	}
+
+	//プロシージャ抜け出しスケジュール（Exit Sub/Function）
+	compiler.codeGenerator.exitSubCodePositions.clear();
+
+	//ラベル用のメモリを確保
+	compiler.codeGenerator.gotoLabels.clear();
+
+	//Gotoラベルスケジュール
+	compiler.codeGenerator.gotoLabelSchedules.clear();
+
+	//With情報のメモリを確保
+	extern WITHINFO WithInfo;
+	WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
+	WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
+	WithInfo.num=0;
+
+	//重複エラー情報管理のメモリを確保
+	extern char **SynonymErrorWords;
+	extern int SynonymErrorNum;
+	SynonymErrorNum=0;
+	SynonymErrorWords=(char **)HeapAlloc(hHeap,0,1);
+
+	//Continueアドレスを初期化
+	compiler.codeGenerator.ClearContinueArea();
+
+	//ローカル変数に関する情報
+	extern int AllLocalVarSize;
+	AllLocalVarSize=0;
+
+	//レキシカルスコープ情報を初期化
+	compiler.codeGenerator.lexicalScopes.Init( compiler.codeGenerator.GetNativeCodeSize() );
+
+
+	/////////////////////////////////////
+	// パラメータ用の変数データを考慮
+	/////////////////////////////////////
+
+	//パラメータ用の変数データを考慮
+	for(i3=(int)pUserProc->RealParams().size()-1;i3>=0;i3--){
+		Parameter &param = *pUserProc->RealParams()[i3];
+
+		Variable *pVar = new Variable( param.GetVarName(), param, false, param.IsRef(), "", false );
+
+		if( param.IsArray() ){
+			pVar->SetArray( param.GetSubscripts() );
+		}
+
+		int varSize;
+		if( param.IsRef() == false && param.IsStruct() ){
+			//構造体のByValパラメータ
+			pVar->ThisIsParameter();
+			varSize=PTR_SIZE;
+		}
+		else{
+			if( param.IsArray() == false ){
+				varSize = pVar->GetMemorySize();
+			}
+			else{
+				varSize=PTR_SIZE;
+			}
+		}
+		AllLocalVarSize+=varSize;
+		pVar->SetOffsetAddress( AllLocalVarSize );
+
+		//レキシカルスコープ情報
+		pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() );
+		pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() );
+		pVar->isLiving = true;
+
+		pUserProc->GetLocalVars().push_back( pVar );
+	}
+
+	//Thisポインタを示すローカルオフセット値をセット
+	extern int LocalVar_ThisPtrOffset;
+	LocalVar_ThisPtrOffset=AllLocalVarSize;
+
+	//スタックフレーム管理用クラスを初期化
+	extern StackFrame *pobj_sf;
+	pobj_sf=new StackFrame();
+
+
+	///////////////////////
+	// ここからコード生成
+
+	for(i3=(int)pUserProc->RealParams().size()-1;i3>=0;i3--){
+		Parameter &param = *pUserProc->RealParams()[i3];
+		if(i3==3){
+			if(param.IsReal()&&param.IsRef() == false){
+				//movsd qword ptr[rsp+0x20],xmm3
+				compiler.codeGenerator.op_movsd_MR(REG_XMM3,REG_RSP,0x20,MOD_BASE_DISP32);
+			}
+			else{
+				//mov qword ptr[rsp+0x20],r9
+				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_R9,REG_RSP,0x20,MOD_BASE_DISP32);
+			}
+		}
+		if(i3==2){
+			if(param.IsReal()&&param.IsRef() == false){
+				//movsd qword ptr[rsp+0x18],xmm2
+				compiler.codeGenerator.op_movsd_MR(REG_XMM2,REG_RSP,0x18,MOD_BASE_DISP32);
+			}
+			else{
+				//mov qword ptr[rsp+0x18],r8
+				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_R8,REG_RSP,0x18,MOD_BASE_DISP32);
+			}
+		}
+		if(i3==1){
+			if(param.IsReal()&&param.IsRef() == false){
+				//movsd qword ptr[rsp+0x10],xmm1
+				compiler.codeGenerator.op_movsd_MR(REG_XMM1,REG_RSP,0x10,MOD_BASE_DISP32);
+			}
+			else{
+				//mov qword ptr[rsp+0x10],rdx
+				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RDX,REG_RSP,0x10,MOD_BASE_DISP32);
+			}
+		}
+		if(i3==0){
+			if(param.IsReal()&&param.IsRef() == false){
+				//movsd qword ptr[rsp+0x8],xmm0
+				compiler.codeGenerator.op_movsd_MR(REG_XMM0,REG_RSP,0x8,MOD_BASE_DISP32);
+			}
+			else{
+				//mov qword ptr[rsp+0x8],rcx
+				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RCX,REG_RSP,0x8,MOD_BASE_DISP32);
+			}
+		}
+	}
+
+	//ret用のアドレスを考慮
+	AllLocalVarSize+=sizeof(_int64);
+
+	//sub rsp,スタックフレームサイズ
+	const PertialSchedule *pStackFramePertialSchedule = compiler.codeGenerator.op_sub_rsp( 0, true );
+
+	//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+	pobj_sf->push(REG_RBX);
+	pobj_sf->push(REG_RSI);
+	pobj_sf->push(REG_RDI);
+	pobj_sf->push(REG_R12);
+	pobj_sf->push(REG_R13);
+	pobj_sf->push(REG_R14);
+	pobj_sf->push(REG_R15);
+
+	//ローカル変数のベース値
+	int BaseLocalVar;
+	BaseLocalVar=AllLocalVarSize;
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//戻り値が存在するとき
+
+		const char *temp = pUserProc->GetName().c_str();
+		if( temp[0]==1&&temp[1]==ESC_OPERATOR ){
+			temp = "_System_ReturnValue";
+		}
+
+		if( pUserProc->ReturnType().IsStruct() ){
+			//戻り値用の構造体（値型）はパラメータで引き渡される
+		}
+		else{
+			if( pUserProc->ReturnType().IsObject() ){
+				sprintf(temporary,"%s=Nothing%c%c%s",temp,1,ESC_AS, compiler.TypeToString( pUserProc->ReturnType() ).c_str() );
+			}
+			else{
+				//戻り値用の変数の定義
+				sprintf(temporary,"%s%c%c%s",temp,1,ESC_AS, compiler.TypeToString( pUserProc->ReturnType() ).c_str() );
+			}
+
+			OpcodeDim(temporary,0);
+		}
+	}
+
+	const PertialSchedule *pRspOffsetPertialSchedule1 = NULL;
+	const PertialSchedule *pRspOffsetPertialSchedule2 = NULL;
+	if( compiler.IsDebug() && bDebugSupportProc == 0 )
+	{
+		//mov rdx, qword ptr[rsp+スタックフレームサイズ]
+		pRspOffsetPertialSchedule1 = compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_RDX,REG_RSP,0,MOD_BASE_DISP32, Schedule::None, true );
+
+		//mov rcx,rsp
+		compiler.codeGenerator.op_mov_RR(REG_RCX,REG_RSP);
+
+		//add rcx,スタックフレームサイズ+sizeof(_int64) ※ret用のサイズを考慮
+		pRspOffsetPertialSchedule2 = compiler.codeGenerator.op_add_RV(REG_RCX,0, Schedule::None, true );
+
+		//call _DebugSys_StartProc
+		extern const UserProc *pSub_DebugSys_StartProc;
+		compiler.codeGenerator.op_call(pSub_DebugSys_StartProc);
+	}
+
+	if(compiler.pCompilingClass){
+		if( pUserProc->GetName() == compiler.pCompilingClass->GetName() ){
+			////////////////////////////////////
+			// コンストラクタをコンパイルするとき
+			////////////////////////////////////
+
+			//コンストラクタのコンパイル開始を通知
+			compiler.pCompilingClass->NotifyStartConstructorCompile();
+
+			//基底クラスかどうかの識別
+			//（継承元がインターフェイスの場合も基底クラスと見なす）
+			BOOL bThisIsSuperClass;
+			if( !compiler.pCompilingClass->HasSuperClass() ) bThisIsSuperClass=1;
+			else if( compiler.pCompilingClass->GetSuperClass().GetConstructorMethod() == NULL ){
+				//インターフェイスを継承したときはコンストラクタを持たない
+				bThisIsSuperClass=1;
+			}
+			else bThisIsSuperClass=0;
+
+			if(!bThisIsSuperClass){
+				/* サブクラスコンストラクタをコンパイルしているときは、
+					基底クラスのコンストラクタを呼び出す */
+
+				i3=cp+1;
+				while(IsCommandDelimitation(basbuf[i3])) i3++;
+				for(i4=0;;i3++,i4++){
+					if(!IsVariableChar(basbuf[i3])){
+						temporary[i4]=0;
+						break;
+					}
+					temporary[i4]=basbuf[i3];
+				}
+				if( compiler.pCompilingClass->GetSuperClass().GetName() == temporary ){
+					//基底クラスのコンストラクタを呼び出す
+					cp=i3;
+					for(i4=0;;cp++,i4++){
+						if(IsCommandDelimitation(basbuf[cp])){
+							temporary[i4]=0;
+							break;
+						}
+						temporary[i4]=basbuf[cp];
+					}
+					if(!(temporary[0]=='('&&temporary[lstrlen(temporary)-1]==')')){
+						compiler.errorMessenger.Output(1,NULL,cp);
+					}
+					RemoveStringPare(temporary);
+
+					Type dummyType;
+					CallProc( PROC_DEFAULT
+						, &compiler.pCompilingClass->GetSuperClass().GetConstructorMethod()->GetUserProc()
+						, compiler.pCompilingClass->GetSuperClass().GetConstructorMethod()->GetUserProc().GetName().c_str()
+						, temporary
+						, Type()		// baseTypeはなし
+						, dummyType
+					);
+				}
+				else{
+					//基底クラスのコンストラクタを暗黙的に呼び出す
+					Opcode_CallProc("",
+						&compiler.pCompilingClass->GetSuperClass().GetConstructorMethod()->GetUserProc(),
+						0,
+						"");
+				}
+			}
+		}
+		else if( pUserProc->IsDestructor() ){
+			//デストラクタをコンパイルしたとき
+
+			//デストラクタのコンパイル開始を通知
+			compiler.pCompilingClass->NotifyStartDestructorCompile();
+		}
+	}
+
+	//////////////////////////////////////////
+	//////////////////////////////////////////
+	////// プロシージャ内をコンパイル ////////
+	if( pUserProc->IsAutoGeneration() ){
+		AutoGeneration( *pUserProc );
+	}
+	else{
+		if(pUserProc->IsMacro()){
+			CompileBuffer(ESC_ENDMACRO,0);
+		}
+		else{
+			if(pUserProc->IsSub()){
+				CompileBuffer(ESC_ENDSUB,0);
+			}
+			else if(pUserProc->IsFunction()){
+				CompileBuffer(ESC_ENDFUNCTION,0);
+			}
+		}
+	}
+	//////////////////////////////////////////
+	//////////////////////////////////////////
+
+	if( compiler.pCompilingClass ){
+
+		if( compiler.pCompilingClass->IsCompilingConstructor() ){
+			// コンストラクタをコンパイルしていたとき
+
+			// コンストラクタのコンパイルが完了したことを通知
+			compiler.pCompilingClass->NotifyFinishConstructorCompile();
+		}
+		else if( pUserProc->IsDestructor() ){
+			////////////////////////////////////
+			//デストラクタをコンパイルしたとき
+			////////////////////////////////////
+
+			// デストラクタのコンパイルが完了したことを通知
+			compiler.pCompilingClass->NotifyFinishDestructorCompile();
+
+			if( compiler.pCompilingClass->HasSuperClass() ){
+				/* サブクラスのデストラクタをコンパイルしているときは、
+					基底クラスのデストラクタを呼び出す */
+
+				const CMethod *method = compiler.pCompilingClass->GetSuperClass().GetDestructorMethod();
+				if( method ){
+					Opcode_CallProc("",
+						&method->GetUserProc(),
+						0,
+						"");
+				}
+			}
+		}
+	}
+
+	// Tryスコープの検証
+	Exception::InspectTryScope();
+
+	//With情報のメモリを解放
+	for(i3=0;i3<WithInfo.num;i3++){
+		compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i3]);
+		HeapDefaultFree(WithInfo.ppName[i3]);
+	}
+	HeapDefaultFree(WithInfo.ppName);
+	HeapDefaultFree(WithInfo.pWithCp);
+
+	//ローカルオブジェクト（レキシカルスコープレベル=0）の解放処理
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+	//プロシージャ抜け出しスケジュール（Exit Sub/Function）
+	compiler.codeGenerator.ResolveExitSubSchedule();
+
+	if( compiler.IsDebug() && bDebugSupportProc == 0 )
+	{
+		//call _DebugSys_EndProc
+		extern const UserProc *pSub_DebugSys_EndProc;
+		compiler.codeGenerator.op_call(pSub_DebugSys_EndProc);
+	}
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//////////////////////////////////
+		// 戻り値をraxまたはxmm0に設定
+		//////////////////////////////////
+
+		RELATIVE_VAR RelativeVar;
+
+		const char *temp = pUserProc->GetName().c_str();
+		if( temp[0]==1 && temp[1]==ESC_OPERATOR ){
+			temp="_System_ReturnValue";
+		}
+		GetVarOffsetReadWrite(temp,&RelativeVar,Type());
+
+		const Type &returnType = pUserProc->ReturnType();
+		if( returnType.IsObject() || returnType.IsStruct() )
+		{
+			SetVarPtrToReg(REG_RAX,&RelativeVar);
+			if( returnType.IsObject() )
+			{
+				//mov rax,qword ptr[rax]
+				compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RAX, REG_RAX, 0, MOD_BASE );
+			}
+		}
+		else if( returnType.IsDouble() )
+		{
+			//64ビット実数型
+			SetXmmReg_DoubleVariable(&RelativeVar,REG_XMM0);
+		}
+		else if( returnType.IsSingle() )
+		{
+			//32ビット実数型
+			SetXmmReg_SingleVariable(&RelativeVar,REG_XMM0);
+		}
+		else if( returnType.IsWhole() )
+		{
+			//整数型
+			SetReg_WholeVariable(returnType,&RelativeVar,REG_RAX);
+		}
+		else compiler.errorMessenger.Output(300,NULL,cp);
+	}
+
+	//ローカル変数領域のサイズをスタックフレームに通知
+	int localParmSize = AllLocalVarSize - BaseLocalVar;
+	int stackFrameSize = pobj_sf->GetFrameSize( localParmSize );
+
+	//ローカル変数アドレススケジュール
+	BOOST_FOREACH( const PertialSchedule *pPertialSchedule, compiler.codeGenerator.localVarPertialSchedules )
+	{
+		compiler.codeGenerator.opfix_offset( pPertialSchedule, AllLocalVarSize + stackFrameSize );
+	}
+	compiler.codeGenerator.localVarPertialSchedules.clear();
+	BOOST_FOREACH( Variable *pVar, pUserProc->GetLocalVars() ){
+		//後にデバッグで利用する
+		pVar->SetOffsetAddress(
+			AllLocalVarSize + stackFrameSize - pVar->GetOffsetAddress()
+		);
+	}
+
+	//mov reg,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_R15);
+	pobj_sf->pop(REG_R14);
+	pobj_sf->pop(REG_R13);
+	pobj_sf->pop(REG_R12);
+	pobj_sf->pop(REG_RDI);
+	pobj_sf->pop(REG_RSI);
+	pobj_sf->pop(REG_RBX);
+
+	int stackFrameAndLocalParamSize = localParmSize + stackFrameSize;
+
+	//add rsp,スタックフレームサイズ
+	compiler.codeGenerator.op_add_rsp(stackFrameAndLocalParamSize);
+
+	//ret
+	compiler.codeGenerator.op_ret();
+
+
+	//デバッグ用
+	if( pRspOffsetPertialSchedule1 ){
+		compiler.codeGenerator.opfix( pRspOffsetPertialSchedule1, stackFrameAndLocalParamSize );
+		compiler.codeGenerator.opfix( pRspOffsetPertialSchedule2, stackFrameAndLocalParamSize + sizeof(_int64) );
+	}
+
+
+	//スタックフレームスケジュール（subコマンド）
+	compiler.codeGenerator.opfix( pStackFramePertialSchedule, stackFrameAndLocalParamSize );
+
+	//スタックフレームスケジュールを実行
+	pobj_sf->RunningSchedule( stackFrameSize );
+	delete pobj_sf;
+	pobj_sf=0;
+
+
+	//重複エラー情報管理のメモリを解放
+	for(i3=0;i3<SynonymErrorNum;i3++) HeapDefaultFree(SynonymErrorWords[i3]);
+	HeapDefaultFree(SynonymErrorWords);
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Set_Var.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Set_Var.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Set_Var.cpp	(revision 482)
@@ -0,0 +1,347 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL IsUse_r11(RELATIVE_VAR *pRelativeVar){
+	if(pRelativeVar->bOffsetOffset||pRelativeVar->dwKind==VAR_DIRECTMEM) return 1;
+	return 0;
+}
+
+void SetStructVariableFromRax( const Type &varType, const Type &calcType, RELATIVE_VAR *pRelativeVar,BOOL bUseHeap){
+	int RightTermReg;
+	pobj_reg=new CRegister(REG_RCX);
+
+	//VarRegにオブジェクトポインタをコピー
+	int VarReg;
+	VarReg=pobj_reg->LockReg();
+	SetVarPtrToReg(VarReg,pRelativeVar);
+
+	//右辺
+	if( calcType.IsReal() ){
+		RightTermReg=pobj_reg->LockXmmReg();
+
+		if( calcType.IsDouble() ){
+			//movlsd RightTermReg,xmm0
+			compiler.codeGenerator.op_movsd_RR(RightTermReg,REG_XMM0);
+		}
+		else if( calcType.IsSingle() ){
+			//movlss RightTermReg,xmm0
+			compiler.codeGenerator.op_movss_RR(RightTermReg,REG_XMM0);
+		}
+	}
+	else{
+		RightTermReg=pobj_reg->LockReg();
+
+		//mov RightTermReg,rax
+		compiler.codeGenerator.op_mov_RR(RightTermReg,REG_RAX);
+	}
+
+	//右辺用レジスタを解除
+	if( calcType.IsReal() ) pobj_reg->UnlockXmmReg();
+	else pobj_reg->UnlockReg();
+
+	//左辺用レジスタを解除
+	pobj_reg->UnlockReg();
+
+	//レジスタ管理オブジェクトを破棄
+	delete pobj_reg;
+	pobj_reg=0;
+
+
+	if( calcType.IsStruct() ){
+		if( varType.GetClass().IsEquals( &calcType.GetClass() ) ){			//等しい
+
+				//双方のオブジェクト型が一致、または派生・継承関係にあるとき
+				//※コピーを行う
+
+				//mov rsi,RightTermReg
+				compiler.codeGenerator.op_mov_RR(REG_RSI,RightTermReg);
+
+				//mov rdi,VarReg
+				compiler.codeGenerator.op_mov_RR(REG_RDI,VarReg);
+
+				int object_size = varType.GetClass().GetSize();
+
+				//mov rcx,object_size
+				compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RCX,object_size);
+
+				if(bUseHeap){
+					//mov rax,rsi
+					compiler.codeGenerator.op_mov_RR(REG_RAX,REG_RSI);
+				}
+
+				//rep movs byte ptr[rdi],byte ptr[rsi]
+				compiler.codeGenerator.op_rep_movs(sizeof(BYTE));
+
+				if(bUseHeap){
+					//mov rcx,rax
+					compiler.codeGenerator.op_mov_RR(REG_RCX,REG_RAX);
+
+					//call free
+					extern const UserProc *pSub_free;
+					compiler.codeGenerator.op_call(pSub_free);
+				}
+
+				return;
+		}
+	}
+
+	compiler.errorMessenger.Output(1,NULL,cp);
+}
+
+
+void SetDoubleVariable(int type,RELATIVE_VAR *pRelative){
+	//////////////////////////
+	// Double型変数に書き込む
+	//////////////////////////
+
+	//xmm0に型変換
+	ChangeTypeToXmm_Double(type,REG_XMM0,REG_RAX);
+
+	if(pRelative->dwKind==VAR_GLOBAL){
+		if(pRelative->bOffsetOffset){
+			//movsd qword ptr[r11+offset],xmm0
+			compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//movsd qword ptr[offset],xmm0
+			compiler.codeGenerator.op_movsd_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if(pRelative->dwKind==VAR_REFGLOBAL){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+	else if(pRelative->dwKind==VAR_LOCAL){
+		if(pRelative->bOffsetOffset){
+			//movsd qword ptr[rsp+r11+offset],xmm0
+			compiler.codeGenerator.PutOld(
+				(char)0xF2,
+				(char)0x42,
+				(char)0x0F,
+				(char)0x11,
+				(char)0x84,
+				(char)0x1C
+			);
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.PutOld( (long)pRelative->offset, true )
+			);
+		}
+		else{
+			//movsd qword ptr[rsp+offset],xmm0
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelative->dwKind == VAR_REFLOCAL ){
+		if(pRelative->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_DIRECTMEM){
+directmem:
+		//movsd qword ptr[r11],xmm0
+		compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_R11, 0, MOD_BASE );
+	}
+}
+void SetSingleVariable(int type,RELATIVE_VAR *pRelative){
+	//////////////////////////
+	// Single型変数に書き込む
+	//////////////////////////
+
+	//xmm0に型変換
+	ChangeTypeToXmm_Single(type,REG_XMM0,REG_RAX);
+
+	if(pRelative->dwKind==VAR_GLOBAL){
+		if(pRelative->bOffsetOffset){
+			//movss dword ptr[r11+offset],xmm0
+			compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//movss dword ptr[offset],xmm0
+			compiler.codeGenerator.op_movss_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if(pRelative->dwKind==VAR_REFGLOBAL){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+	else if(pRelative->dwKind==VAR_LOCAL){
+		if(pRelative->bOffsetOffset){
+			//movss dword ptr[rsp+r11+offset],xmm0
+			compiler.codeGenerator.PutOld(
+				(char)0xF3,
+				(char)0x42,
+				(char)0x0F,
+				(char)0x11,
+				(char)0x84,
+				(char)0x1C
+			);
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.PutOld( (long)pRelative->offset, true )
+			);
+		}
+		else{
+			//movss dword ptr[rsp+offset],xmm0
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelative->dwKind == VAR_REFLOCAL ){
+		if(pRelative->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_DIRECTMEM){
+directmem:
+		//movss dword ptr[r11],xmm0
+		compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_R11, 0, MOD_BASE );
+	}
+}
+void SetRealVariable(int VarType, int CalcType, RELATIVE_VAR *pRelativeVar){
+	if(VarType==DEF_DOUBLE){
+		//Double型変数へスタックの内容を格納する
+		SetDoubleVariable(CalcType,pRelativeVar);
+	}
+	else if(VarType==DEF_SINGLE){
+		//Single型変数へスタックの内容を格納する
+		SetSingleVariable(CalcType,pRelativeVar);
+	}
+}
+void SetBooleanVariable(int type,RELATIVE_VAR *pRelative){
+	if(type==DEF_DOUBLE){
+		//Double型
+
+		//cvttsd2si rax,xmm0
+		compiler.codeGenerator.op_cvttsd2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
+	}
+	else if(type==DEF_SINGLE){
+		//Single型
+
+		//cvttss2si rax,xmm0
+		compiler.codeGenerator.op_cvttss2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
+	}
+
+	//cmp rax,0
+	compiler.codeGenerator.op_cmp_value(Type(type).GetSize(),REG_RAX,0);
+
+	//setne al
+	compiler.codeGenerator.op_setne( REG_RAX );
+
+	SetWholeVariable( sizeof(char), DEF_BYTE, pRelative);
+}
+void SetWholeVariable(int varSize,int type,RELATIVE_VAR *pRelative){
+	if(type==DEF_DOUBLE){
+		//Double型
+
+		//cvttsd2si rax,xmm0
+		compiler.codeGenerator.op_cvttsd2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
+	}
+	else if(type==DEF_SINGLE){
+		//Single型
+
+		//cvttss2si rax,xmm0
+		compiler.codeGenerator.op_cvttss2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0);
+	}
+	else{
+		//その他の整数
+
+		if(varSize==sizeof(_int64)){
+			//レジスタの値を64ビット（rax）に拡張する
+			ExtendTypeTo64(type,REG_RAX);
+		}
+		else if(varSize==sizeof(long)){
+			//レジスタの値を32ビット（eax）に拡張する
+			ExtendTypeTo32(type,REG_RAX);
+		}
+		else if(varSize==sizeof(short)){
+			//レジスタの値を16ビット（ax）に拡張する
+			ExtendTypeTo16(type,REG_RAX);
+		}
+		//8ビットは拡張なし
+	}
+
+	if(pRelative->dwKind==VAR_GLOBAL){
+		if(pRelative->bOffsetOffset){
+			//mov ptr[r11+offset],rax/eax/ax/al
+			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//mov ptr[offset],rax/eax/ax/al
+			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,0,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+	}
+	else if( pRelative->dwKind == VAR_REFGLOBAL ){
+		if(pRelative->bOffsetOffset){
+			//add r11,qword ptr[offset]
+			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//mov r11,qword ptr[offset]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_LOCAL){
+		if(pRelative->bOffsetOffset){
+			//mov ptr[rsp+r11+offset],rax/eax/ax/al
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_MR_ex(varSize,REG_RAX,REG_RSP,REG_R11,(int)pRelative->offset,USE_OFFSET, Schedule::None, true )
+			);
+		}
+		else{
+			//mov ptr[rsp+offset],rax/eax/ax/al
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelative->dwKind == VAR_REFLOCAL ){
+		if(pRelative->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (int)pRelative->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelative->dwKind==VAR_DIRECTMEM){
+directmem:
+
+		//mov ptr[r11],rax/eax/ax/al
+		compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,0,MOD_BASE);
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Statement.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Statement.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Statement.cpp	(revision 482)
@@ -0,0 +1,1018 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void OpcodeOthers(const char *Command){
+	int i,i2;
+
+	char leftTerm[8192];
+	int lastParePos = 0;
+	for(i=0;;i++){
+		if(Command[i]=='\"'){
+			//ダブルクォートは不正なのでエラー扱い
+			leftTerm[i]=0;
+			compiler.errorMessenger.Output(3,leftTerm,cp);
+			return;
+		}
+
+		if(Command[i]=='('){
+			lastParePos = i;
+			i2=GetStringInPare(leftTerm+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='['){
+			i2=GetStringInBracket(leftTerm+i,Command+i);
+			i+=i2-1;
+			continue;
+		}
+		if(Command[i]=='\0'){
+			leftTerm[i] = 0;
+			break;
+		}
+
+		if( IsNumCalcMark( Command, i ) ){
+			leftTerm[i] = 0;
+			break;
+		}
+
+		leftTerm[i]=Command[i];
+	}
+	if(!(
+		IsVariableTopChar(leftTerm[0])||
+		leftTerm[0]=='.'||
+		(leftTerm[0]==1&&leftTerm[1]==ESC_PSMEM)
+		)){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return;
+	}
+
+
+	if(Command[i]=='\0' && lastParePos == 0){
+		//////////////////////////////
+		// パラメータ無しのマクロ検索
+		//////////////////////////////
+
+		const UserProc *pUserProc=GetSubHash(Command);
+
+		//GetSubHash内でエラー提示が行われた場合
+		if(pUserProc==(UserProc *)-1) return;
+
+		if(pUserProc==0){
+			char temporary[VN_SIZE];
+			lstrcpy(temporary,Command);
+
+			CharUpper(temporary);
+			pUserProc=GetSubHash(temporary);
+
+			//GetSubHash内でエラー提示が行われた場合
+			if(pUserProc==(UserProc *)-1) return;
+		}
+
+		if(pUserProc){
+			if( !pUserProc->IsMacro() ){
+				compiler.errorMessenger.Output(10,Command,cp);
+			}
+
+			Opcode_CallProc("",pUserProc,0,"");
+
+			return;
+		}
+	}
+	else if(IsNumCalcMark(Command,i)){
+		//代入演算
+		OpcodeCalc(Command);
+		return;
+	}
+
+	if( pobj_reg ){
+		compiler.errorMessenger.OutputFatalError();
+	}
+	pobj_reg=new CRegister(REG_RAX);
+
+	Type resultType;
+	bool isLiteral, isNeedHeapFreeStructure = false;
+	bool result = TermOpe( leftTerm, Type(), resultType, isLiteral, isNeedHeapFreeStructure, NULL, true );
+
+	delete pobj_reg;
+	pobj_reg = NULL;
+
+	if( result ){
+
+		/////////////////////
+		// 戻り値の処理
+		/////////////////////
+
+		if( resultType.IsStruct() ){
+			//mov r14,rax
+			compiler.codeGenerator.op_mov_RR(REG_R14,REG_RAX);
+
+			FreeTempObject(REG_R14,&resultType.GetClass());
+		}
+
+		return;
+	}
+
+	// どこにも当てはまらなかったため、失敗
+	compiler.errorMessenger.Output(1,NULL,cp);
+}
+
+void Judgment(char *buffer){
+	int reg=REG_RAX;
+	Type resultType;
+	if( !NumOpe(&reg,buffer,Type(DEF_BOOLEAN),resultType) ){
+		return;
+	}
+
+	int offset;
+
+	if(resultType.IsDouble()){
+		double dbl=0;
+		offset=compiler.GetObjectModule().dataTable.Add( dbl );
+
+		//comisd xmm0,qword ptr[data table offset]
+		compiler.codeGenerator.PutOld(
+			(char)0x66,
+			(char)0x0F,
+			(char)0x2F,
+			(char)0x04,
+			(char)0x25
+		);
+		compiler.codeGenerator.PutOld(
+			(long)offset,
+			Schedule::DataTable
+		);
+	}
+	else if(resultType.IsSingle()){
+		float flt=0;
+		offset=compiler.GetObjectModule().dataTable.Add( flt );
+
+		//comiss xmm0,dword ptr[data table offset]
+		compiler.codeGenerator.PutOld(
+			(char)0x0F,
+			(char)0x2F,
+			(char)0x04,
+			(char)0x25
+		);
+		compiler.codeGenerator.PutOld(
+			(long)offset,
+			Schedule::DataTable
+		);
+	}
+	else{
+		//整数型
+
+		//cmp rax,0
+		compiler.codeGenerator.op_cmp_value(resultType.GetSize(),REG_RAX,0);
+	}
+}
+
+void OpcodeIf(char *Parameter){
+	for(int i=0;;i++){
+		if(Parameter[i]=='\0'){
+			compiler.errorMessenger.Output(21,NULL,cp);
+			return;
+		}
+		if(Parameter[i]==1&&Parameter[i+1]==ESC_THEN){
+			Parameter[i]=0;
+			break;
+		}
+	}
+
+	//条件式を実行してフラグをセット
+	Judgment(Parameter);
+
+	//je (endif、または else まで条件ジャンプ)
+	const PertialSchedule *pIfPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
+
+
+	/////////////////////////
+	// If内をコード化
+	/////////////////////////
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start(
+		compiler.codeGenerator.GetNativeCodeSize(),
+		LexicalScope::SCOPE_TYPE_IF
+	);
+
+	int i2=CompileBuffer(ESC_ENDIF,0);
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+
+	if(i2==ESC_ELSE){
+		//jmp (endifまで)
+		const PertialSchedule *pTempPertialSchedule = compiler.codeGenerator.op_jmp( 0, sizeof(long), true );
+
+		compiler.codeGenerator.opfix_JmpPertialSchedule( pIfPertialSchedule );
+
+
+
+		/////////////////////////
+		// Else内をコード化
+		/////////////////////////
+
+		//レキシカルスコープをレベルアップ
+		compiler.codeGenerator.lexicalScopes.Start(
+			compiler.codeGenerator.GetNativeCodeSize(),
+			LexicalScope::SCOPE_TYPE_IF
+		);
+
+		CompileBuffer(ESC_ENDIF,0);
+
+		//レキシカルスコープをレベルダウン
+		compiler.codeGenerator.lexicalScopes.End();
+
+
+		compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+	}
+	else{
+		compiler.codeGenerator.opfix_JmpPertialSchedule( pIfPertialSchedule );
+	}
+}
+
+int GetLabelAddress(char *LabelName,int LineNum){
+	if(LabelName){
+		BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels )
+		{
+			if( label.name.size() > 0 )
+			{
+				if( label.name == LabelName )
+				{
+					return label.address;
+				}
+			}
+		}
+	}
+	else{
+		BOOST_FOREACH( const GotoLabel &label, compiler.codeGenerator.gotoLabels )
+		{
+			if( label.name.size() == 0 )
+			{
+				if( label.line == LineNum )
+				{
+					return label.address;
+				}
+			}
+		}
+	}
+	return -1;
+}
+void OpcodeGoto(char *Parameter){
+	extern HANDLE hHeap;
+	int i,LineNum;
+
+	if(Parameter[0]=='*'){
+		i=GetLabelAddress(Parameter+1,0);
+
+		if( i == -1 )
+		{
+			//jmp ...(schedule)
+			compiler.codeGenerator.op_jmp_goto_schedule( (const std::string)(Parameter + 1), 0, cp );
+		}
+		else
+		{
+			//jmp ...
+			compiler.codeGenerator.op_jmp(
+				i-compiler.codeGenerator.GetNativeCodeSize(),
+				sizeof(long),
+				false,
+				true
+			);
+		}
+	}
+	else{
+		LineNum=atoi(Parameter);
+		i=GetLabelAddress(0,LineNum);
+
+		if( i == -1 )
+		{
+			//jmp ...(schedule)
+			compiler.codeGenerator.op_jmp_goto_schedule( "", LineNum, cp );
+		}
+		else
+		{
+			//jmp ...
+			compiler.codeGenerator.op_jmp(
+				i-compiler.codeGenerator.GetNativeCodeSize(),
+				sizeof(long),
+				false,
+				true
+			);
+		}
+	}
+}
+void OpcodeWhile(char *Parameter){
+	extern HANDLE hHeap;
+
+	//Continueアドレスのバックアップとセット
+	compiler.codeGenerator.ContinueAreaBegin();
+
+	if(!Parameter[0]) compiler.errorMessenger.Output(10,"While",cp);
+
+	//条件式を実行してフラグをセット
+	Judgment(Parameter);
+
+	//je (Wend まで)
+	const PertialSchedule *pWhilePertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_WHILE );
+
+	//While内をコンパイル
+	CompileBuffer(0,COM_WEND);
+
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+	//jmp ...
+	compiler.codeGenerator.op_jmp_continue();
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pWhilePertialSchedule );
+
+	//Continueアドレスを復元
+	compiler.codeGenerator.ContinueAreaEnd();
+}
+
+char szNextVariable[VN_SIZE];
+void OpcodeFor(char *Parameter){
+	extern HANDLE hHeap;
+	Type resultType;
+	int i,i2;
+	char temporary[VN_SIZE],variable[VN_SIZE],JudgeNum[VN_SIZE],StepNum[VN_SIZE];
+	bool isError = false;
+
+	//第１パラメータを取得
+	i=GetOneParameter(Parameter,0,temporary);
+	if(!Parameter[i]){
+		compiler.errorMessenger.Output(12,"For",cp);
+		isError = true;
+		goto ErrorStep;
+	}
+
+	for(i2=0;;i2++){
+		if(temporary[i2]=='='){
+			variable[i2]=0;
+
+			//カウンタ初期化
+			OpcodeCalc(temporary);
+			break;
+		}
+		if(temporary[i2]=='\0'){
+			compiler.errorMessenger.Output(12,"For",cp);
+			isError = true;
+			goto ErrorStep;
+		}
+		variable[i2]=temporary[i2];
+	}
+
+	//jmp ...
+	const PertialSchedule *pTempPertialSchedule = compiler.codeGenerator.op_jmp( 0, sizeof(long), true );
+
+	//Continueアドレスのバックアップとセット
+	compiler.codeGenerator.ContinueAreaBegin();
+
+	//第２パラメータを取得（to～）
+	i=GetOneParameter(Parameter,i,JudgeNum);
+
+	//第３パラメータを取得（step～）
+	if(Parameter[i]){
+		i=GetOneParameter(Parameter,i,StepNum);
+		if(Parameter[i]) compiler.errorMessenger.Output(12,"For",cp);
+	}
+	else lstrcpy(StepNum,"1");
+
+	//カウンタを増加させる
+	sprintf(temporary,"%s=(%s)+(%s)",variable,variable,StepNum);
+	OpcodeCalc(temporary);
+
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+
+	//増加か減少かを区別する
+	sprintf(temporary,"(%s)>=0",StepNum);
+
+	int reg;
+	reg=REG_RAX;
+	if( !NumOpe(&reg,temporary,Type(),resultType) ){
+		return;
+	}
+
+	//cmp rax,0
+	compiler.codeGenerator.op_cmp_value(resultType.GetSize(),REG_RAX,0);
+
+	//je [カウンタ減少の場合の判定]
+	pTempPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
+
+	//判定（カウンタ増加の場合）
+	sprintf(temporary,"%s<=(%s)",variable,JudgeNum);
+
+	reg=REG_RAX;
+	NumOpe(&reg,temporary,Type(),Type());
+
+	//jmp [カウンタ減少の場合の判定を飛び越す]
+	const PertialSchedule *pTempPertialSchedule2 = compiler.codeGenerator.op_jmp( 0, sizeof(long), true );
+
+	//jeジャンプ先のオフセット値
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+
+	//判定（カウンタ減少の場合）
+	sprintf(temporary,"%s>=(%s)",variable,JudgeNum);
+
+	reg=REG_RAX;
+	NumOpe(&reg,temporary,Type(),resultType);
+
+	//jmpジャンプ先のオフセット値
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule2 );
+
+	//cmp rax,0
+	compiler.codeGenerator.op_cmp_value(resultType.GetSize(),REG_RAX,0);
+
+ErrorStep:
+
+	//je ...
+	pTempPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
+
+	//For内をコンパイル
+	CompileBuffer(0,COM_NEXT);
+
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+	if(szNextVariable[0]){
+		if(lstrcmp(szNextVariable,variable)!=0){
+			compiler.errorMessenger.Output(55,szNextVariable,cp);
+		}
+	}
+
+	//jmp ...
+	compiler.codeGenerator.op_jmp_continue();
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+	//jeジャンプ先のオフセット値
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+
+	//Continueアドレスを復元
+	compiler.codeGenerator.ContinueAreaEnd();
+}
+
+void OpcodeForeach( const char *Parameter )
+{
+	Type resultType;
+	char temporary[VN_SIZE],variable[VN_SIZE],collectionVar[VN_SIZE];
+	bool isError = false;
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
+
+	//第１パラメータを取得
+	int i = 0;
+	GetCustomToken( variable, Parameter, i, ESC_IN, true );
+	if(!Parameter[i]){
+		compiler.errorMessenger.Output(12,"Foreach",cp);
+		isError = true;
+		goto ErrorStep;
+	}
+	i++;
+
+	//第２パラメータを取得（in～）
+	lstrcpy( collectionVar, Parameter + i );
+
+	if( !GetVarType( variable, resultType, false ) )
+	{
+		Type collectionType;
+		if( !NumOpe_GetType( collectionVar, Type(), collectionType ) )
+		{
+			isError = true;
+			goto ErrorStep;
+		}
+
+		// 未定義の場合は自動的に定義する
+		sprintf(temporary,"%s=Nothing%c%c%s", variable, 1, ESC_AS, collectionType.GetActualGenericType(0).GetClass().GetFullName().c_str() );
+		OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
+	}
+
+	// Resetメソッドを呼び出す
+	sprintf( temporary, "%s.Reset()", collectionVar );
+	Compile( temporary );
+
+	//Continueアドレスのバックアップとセット
+	compiler.codeGenerator.ContinueAreaBegin();
+
+	// MoveNextメソッドを呼び出す
+	sprintf( temporary, "%s.MoveNext()", collectionVar );
+	int reg = REG_RAX;
+	NumOpe(&reg,temporary,Type(),resultType);
+
+	//cmp rax,0
+	compiler.codeGenerator.op_cmp_value(resultType.GetSize(),REG_RAX,0);
+
+ErrorStep:
+
+	//je ...
+	const PertialSchedule *pTempPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
+
+	if( !isError )
+	{
+		// Currentプロパティから現在の値を取得
+		sprintf( temporary, "%s=%s.Current", variable, collectionVar );
+		Compile( temporary );
+	}
+
+	//For内をコンパイル
+	CompileBuffer(0,COM_NEXT);
+
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+	if(szNextVariable[0]){
+		if(lstrcmp(szNextVariable,variable)!=0){
+			compiler.errorMessenger.Output(55,szNextVariable,cp);
+		}
+	}
+
+	if( !isError )
+	{
+		//jmp ...
+		compiler.codeGenerator.op_jmp_continue();
+	}
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+	//jeジャンプ先のオフセット値
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+
+	//Continueアドレスを復元
+	compiler.codeGenerator.ContinueAreaEnd();
+}
+
+void OpcodeDo(char *Parameter){
+	extern HANDLE hHeap;
+	int i,i2,i3;
+
+	if(Parameter[0]) compiler.errorMessenger.Output(10,"Do",cp);
+
+	//Continueアドレスのバックアップとセット
+	compiler.codeGenerator.ContinueAreaBegin();
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_DO );
+
+	//Do内をコンパイル
+	CompileBuffer(0,COM_LOOP);
+
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
+
+	const PertialSchedule *pDoPertialSchedule = NULL;
+
+	extern char *basbuf;
+	char temporary[VN_SIZE];
+	for(i=cp-1;;i--){
+		if(IsCommandDelimitation(basbuf[i])){
+			i+=3;
+			if(!(basbuf[i]=='0'||basbuf[i]=='1')){
+				//無条件ループ
+				break;
+			}
+			i3=i;
+
+			for(i+=2,i2=0;;i++,i2++){
+				if(IsCommandDelimitation(basbuf[i])){
+					temporary[i2]=0;
+					break;
+				}
+				temporary[i2]=basbuf[i];
+			}
+
+			//条件式を実行してフラグをセット
+			Judgment(temporary);
+
+			if(basbuf[i3]=='0'){
+				//While
+
+				//je 5（ループ終了）
+				pDoPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(char), true );
+			}
+			else if(basbuf[i3]=='1'){
+				//Until
+
+				//jne 5（ループ終了）
+				pDoPertialSchedule = compiler.codeGenerator.op_jne( 0, sizeof(char), true );
+			}
+			break;
+		}
+	}
+
+	//jmp ...
+	compiler.codeGenerator.op_jmp_continue();
+
+	if( pDoPertialSchedule )
+	{
+		compiler.codeGenerator.opfix_JmpPertialSchedule( pDoPertialSchedule );
+	}
+
+	//jmp ...
+	const PertialSchedule *pTempPertialSchedule = compiler.codeGenerator.op_jmp( 0, sizeof(long), true );
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+	//jmpジャンプ先のオフセット値
+	compiler.codeGenerator.opfix_JmpPertialSchedule( pTempPertialSchedule );
+
+	//Continueアドレスを復元
+	compiler.codeGenerator.ContinueAreaEnd();
+}
+void OpcodeContinue(void){
+	//jmp ...(Continue addr)
+	compiler.codeGenerator.op_jmp_continue();
+}
+
+void OpcodeExitSub(void){
+	if( UserProc::IsGlobalAreaCompiling() ){
+		compiler.errorMessenger.Output(12,"Exit Sub/Function",cp);
+		return;
+	}
+
+	//未解放のローカルオブジェクトのデストラクタを呼び出す
+	compiler.codeGenerator.lexicalScopes.CallDestructorsOfReturn();
+
+	//jmp ...(End Sub/Function)
+	compiler.codeGenerator.op_jmp_exitsub();
+}
+
+//Caseスケジュール
+class SelectSchedule
+{
+public:
+	SelectSchedule( int typeSize )
+		: typeSize( typeSize )
+		, nowCaseSchedule( 0 )
+	{
+	}
+
+	PertialSchedules casePertialSchedules;
+	int typeSize;
+	int nowCaseSchedule;
+};
+std::vector<SelectSchedule> selectSchedules;
+
+void OpcodeSelect( const char *lpszParms )
+{
+	extern HANDLE hHeap;
+	extern char *basbuf;
+	int i,i2,i3,NowCaseCp;
+	char temporary[VN_SIZE];
+	
+	int reg1=REG_RAX;
+	Type type1;
+	bool result = NumOpe(&reg1,lpszParms,Type(), type1 );
+
+	selectSchedules.push_back( SelectSchedule( type1.GetSize() ) );
+
+	if( result )
+	{
+		if( selectSchedules.back().typeSize < sizeof(long) ){
+			selectSchedules.back().typeSize = sizeof(long);
+		}
+
+		if(type1.IsDouble()){
+			//movsd qword ptr[rsp+offset],xmm_reg		※スタックフレームを利用
+			pobj_sf->push(reg1,sizeof(double));
+		}
+		else if(type1.IsSingle()){
+			//movss dword ptr[rsp+offset],xmm_reg		※スタックフレームを利用
+			pobj_sf->push(reg1,sizeof(float));
+		}
+		else{
+			ExtendTypeTo64(type1.GetBasicType(),reg1);
+
+			//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+			pobj_sf->push(reg1);
+		}
+
+		for(i=cp;;i++){
+			if(basbuf[i]=='\0'){
+				selectSchedules.pop_back();
+				compiler.errorMessenger.Output(22,"Select",cp);
+				return;
+			}
+			if(basbuf[i]==1&&basbuf[i+1]==ESC_SELECTCASE){
+				for(i2=0;;i++){
+					if(basbuf[i]==1&&basbuf[i+1]==ESC_SELECTCASE) i2++;
+					if(basbuf[i]==1&&basbuf[i+1]==ESC_ENDSELECT){
+						i2--;
+						if(i2==0) break;
+					}
+				}
+				continue;
+			}
+			if(basbuf[i]==1&&basbuf[i+1]==ESC_ENDSELECT) break;
+
+			if(basbuf[i]==1&&basbuf[i+1]==ESC_CASE){
+				NowCaseCp=i;
+
+				i++;
+				while(1){
+					for(i++,i2=0;;i++,i2++){
+						if(basbuf[i]=='\"'){
+							i3=GetStringInQuotation(temporary+i2,basbuf+i);
+							i+=i3-1;
+							i2+=i3-1;
+							continue;
+						}
+						if(basbuf[i]=='('){
+							i3=GetStringInPare(temporary+i2,basbuf+i);
+							i+=i3-1;
+							i2+=i3-1;
+							continue;
+						}
+						if(basbuf[i]=='['){
+							i3=GetStringInBracket(temporary+i2,basbuf+i);
+							i+=i3-1;
+							i2+=i3-1;
+							continue;
+						}
+
+						if(IsCommandDelimitation(basbuf[i])){
+							temporary[i2]=0;
+							break;
+						}
+						if(basbuf[i]==','){
+							temporary[i2]=0;
+							break;
+						}
+
+						temporary[i2]=basbuf[i];
+					}
+
+					//エラー用
+					i2=cp;
+					cp=NowCaseCp;
+
+					int reg2=REG_RDX;
+					Type type2;
+					if( !NumOpe(&reg2,temporary,type1,type2) ){
+						return;
+					}
+
+					cp=i2;
+
+					if(type1.IsObject()){
+						std::vector<const UserProc *> subs;
+						type1.GetClass().GetDynamicMethods().Enum( CALC_EQUAL, subs );
+						if( subs.size() == 0 ){
+							return;
+						}
+
+						Parameters params;
+						params.push_back( new Parameter( "", Type( type2 ) ) );
+
+						//オーバーロードを解決
+						const UserProc *pUserProc = OverloadSolution( "==", subs, params, Type( DEF_BOOLEAN ), type1 );
+
+						delete params[0];
+
+						if(!pUserProc){
+							//エラー
+							return;
+						}
+
+
+						//実体オブジェクト
+						if(reg2!=REG_RDX){
+							//mov rdx,reg2
+							compiler.codeGenerator.op_mov_RR(REG_RDX,reg2);
+						}
+
+						//mov rcx,qword ptr[rsp+offset]		※スタックフレームから参照
+						pobj_sf->ref(REG_RCX);
+
+						//call operator_proc	※ ==演算子
+						compiler.codeGenerator.op_call(pUserProc);
+
+						//test rax,rax
+						compiler.codeGenerator.op_test(REG_RAX,REG_RAX);
+
+						//jne ...
+						selectSchedules.back().casePertialSchedules.push_back(
+							compiler.codeGenerator.op_jne( 0, sizeof(long), true )
+						);
+					}
+					else{
+						if(type1.IsDouble()){
+							int xmm_reg;
+							if(IsXmmReg(reg2)) xmm_reg=reg2;
+							else xmm_reg=REG_XMM5;
+							ChangeTypeToXmm_Double(type2.GetBasicType(),xmm_reg,reg2);
+
+							//movsd xmm4,qword ptr[rsp+offset]	※スタックフレームから参照
+							pobj_sf->ref(REG_XMM4,sizeof(double));
+
+							//comiss xmm_reg1,xmm_reg2
+							compiler.codeGenerator.op_comisd(xmm_reg,REG_XMM4);
+						}
+						else if(type1.IsSingle()){
+							int xmm_reg;
+							if(IsXmmReg(reg2)) xmm_reg=reg2;
+							else xmm_reg=REG_XMM5;
+							ChangeTypeToXmm_Single(type2.GetBasicType(),xmm_reg,reg2);
+
+							//movss xmm4,dword ptr[rsp+offset]	※スタックフレームから参照
+							pobj_sf->ref(REG_XMM4,sizeof(float));
+
+							//comiss xmm_reg1,xmm_reg2
+							compiler.codeGenerator.op_comiss(xmm_reg,REG_XMM4);
+						}
+						else{
+							//その他整数型
+
+							i2=NeutralizationType(type1.GetBasicType(),-1,type2.GetBasicType(),-1);
+
+							//mov r14,qword ptr[rsp+offset]		※スタックフレームから参照
+							pobj_sf->ref(REG_R14);
+
+							//cmp reg2,r14
+							compiler.codeGenerator.op_cmp_reg(Type(i2).GetSize(),reg2,REG_R14);
+						}
+
+						//je ...
+						selectSchedules.back().casePertialSchedules.push_back(
+							compiler.codeGenerator.op_je( 0, sizeof(long), true )
+						);
+					}
+
+					if(basbuf[i]!=',') break;
+				}
+			}
+			if(basbuf[i]==1&&basbuf[i+1]==ESC_CASEELSE){
+				//jmp ...
+				selectSchedules.back().casePertialSchedules.push_back(
+					compiler.codeGenerator.op_jmp( 0, sizeof(long), true )
+				);
+			}
+		}
+
+		//スタックフレームを1スペースだけ解除
+		pobj_sf->pop(REG_NON);
+	}
+
+	//レキシカルスコープをレベルアップ
+	compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_SELECT );
+
+	//Select Case内をコンパイル
+	CompileBuffer(ESC_ENDSELECT,0);
+
+	//jmp EndSelect
+	selectSchedules.back().casePertialSchedules.push_back(
+		compiler.codeGenerator.op_jmp( 0, sizeof(long), true )
+	);
+
+	//最終スケジュール
+	for(i=selectSchedules.back().nowCaseSchedule;i<(int)selectSchedules.back().casePertialSchedules.size();i++){
+		compiler.codeGenerator.opfix_JmpPertialSchedule( selectSchedules.back().casePertialSchedules[i] );
+	}
+
+	//レキシカルスコープをレベルダウン
+	compiler.codeGenerator.lexicalScopes.End();
+
+	selectSchedules.pop_back();
+}
+void OpcodeCase(char *Parameter){
+	int i;
+
+	if(selectSchedules.back().typeSize==-1){
+		compiler.errorMessenger.Output(30,"Case",cp);
+		return;
+	}
+
+	//jmp EndSelect
+	selectSchedules.back().casePertialSchedules.push_back(
+		compiler.codeGenerator.op_jmp( 0, sizeof(long), true )
+	);
+
+	i=0;
+	while(1){
+		//Caseスケジュール
+		compiler.codeGenerator.opfix_JmpPertialSchedule( selectSchedules.back().casePertialSchedules[selectSchedules.back().nowCaseSchedule] );
+		selectSchedules.back().nowCaseSchedule++;
+
+		i=JumpOneParameter(Parameter,i);
+		if(Parameter[i]=='\0') break;
+	}
+}
+
+void OpcodeGosub(char *Parameter){
+	compiler.errorMessenger.Output(-1,"Gosub ～ Returnステートメントは64ビットコンパイラで利用することはできません。",cp);
+}
+void OpcodeReturn(char *Parameter){
+	if( UserProc::IsGlobalAreaCompiling() ){
+		compiler.errorMessenger.Output(62,NULL,cp);
+	}
+	else{
+		//戻り値をセット
+		if(Parameter[0]){
+			const UserProc &proc = UserProc::CompilingUserProc();
+
+			const char *temp = "_System_ReturnValue";
+			if(proc.GetName()[0]==1&&proc.GetName()[1]==ESC_OPERATOR)
+			{
+			}
+			else{
+				temp=proc.GetName().c_str();
+			}
+
+			char temporary[VN_SIZE];
+			sprintf(temporary,"%s=%s",temp,Parameter);
+			OpcodeCalc(temporary);
+		}
+
+		//プロシージャを抜け出す（C言語のreturnと同様の処理を行う）
+		OpcodeExitSub();
+	}
+}
+
+
+////////////
+// ポインタ
+////////////
+
+void OpcodeSetPtrData(char *Parameter,int type){
+	int i;
+	char temporary[VN_SIZE];
+
+	if(Parameter[0]=='('){
+		i=JumpStringInPare(Parameter,1);
+		if(Parameter[i+1]=='\0'){
+			for(i=0;;i++){
+				Parameter[i]=Parameter[i+1];
+				if(Parameter[i]=='\0') break;
+			}
+			Parameter[i-1]=0;
+		}
+	}
+
+	//第１パラメータを取得
+	i=GetOneParameter(Parameter,0,temporary);
+	if(!Parameter[i]){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return;
+	}
+
+	int reg_ptr=REG_RAX;
+	Type resultType;
+	if( !NumOpe(&reg_ptr,temporary,Type(),resultType) ){
+		return;
+	}
+	if(!resultType.IsWhole()){
+		compiler.errorMessenger.Output(11,Parameter,cp);
+		return;
+	}
+
+	//結果を格納しているレジスタをブロッキング
+	pobj_BlockReg->lock(reg_ptr);
+
+	//第２パラメータを取得
+	i=GetOneParameter(Parameter,i,temporary);
+	if(Parameter[i]){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return;
+	}
+
+	int temp_reg=REG_NON;
+	if( !NumOpe(&temp_reg,temporary,Type(),resultType) ){
+		return;
+	}
+
+	//レジスタのブロッキングを解除
+	pobj_BlockReg->clear();
+
+	if(type==DEF_DOUBLE){
+		ChangeTypeToXmm_Double(resultType.GetBasicType(),REG_XMM0,temp_reg);
+
+		//movsd qword ptr[reg_ptr],xmm0
+		compiler.codeGenerator.op_movsd_MR(REG_XMM0,reg_ptr,0,MOD_BASE);
+	}
+	else if(type==DEF_SINGLE){
+		ChangeTypeToXmm_Single(resultType.GetBasicType(),REG_XMM0,temp_reg);
+
+		//movss dword ptr[reg_ptr],xmm0
+		compiler.codeGenerator.op_movss_MR(REG_XMM0,reg_ptr,0,MOD_BASE);
+	}
+	else{
+		ChangeTypeToWhole(resultType,Type(type),REG_RCX,temp_reg);
+
+		//mov ptr[reg_ptr],rcx
+		compiler.codeGenerator.op_mov_MR(Type(type).GetSize(),REG_RCX,reg_ptr,0,MOD_BASE);
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp	(revision 482)
@@ -0,0 +1,1347 @@
+#include "stdafx.h"
+
+#include <CodeGenerator.h>
+#include <Compiler.h>
+#include <Variable.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+//変数
+// TODO: xml未完成
+int AllLocalVarSize;
+
+
+void SetRelativeOffset( Type &resultType, RELATIVE_VAR *pRelativeVar,const char *lpPtrOffset){
+	/////////////////////////////////////////////
+	// 先頭ポインタをr12に取得してメモリへ退避
+	/////////////////////////////////////////////
+
+	SetReg_WholeVariable(Type(DEF_INT64),pRelativeVar,REG_R11);
+
+	//mov qword ptr[rsp+offset],r11     ※スタックフレームを利用
+	pobj_sf->push(REG_R11);
+
+
+	////////////////////////////////
+	// 添え字を計算する
+	////////////////////////////////
+
+	int reg=REG_NON;
+	Type type;
+	NumOpe( &reg, lpPtrOffset, Type(), type );
+	if( !type.IsWhole() ){
+		compiler.errorMessenger.Output(46,NULL,cp);
+	}
+	ExtendTypeTo64(type.GetBasicType(),reg);
+
+	if(reg==REG_R14){
+		//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R14);
+	}
+
+	if( resultType.PtrLevel() ){
+		resultType.PtrLevelDown();
+
+		int typeSize = resultType.GetSize();
+		if(typeSize>=2){
+			//imul reg,i2
+			compiler.codeGenerator.op_imul_RV(sizeof(_int64),reg,typeSize);
+		}
+	}
+	else{
+		//エラー
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return;
+	}
+
+
+	//////////////////////////////
+	// 先頭ポインタに添え字を加算
+	//////////////////////////////
+
+	//mov r11,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_R11);
+
+	//add r11,reg
+	compiler.codeGenerator.op_add_RR(REG_R11,reg);
+}
+void SetRelativeOffset( RELATIVE_VAR &relativeVar ){
+	if(relativeVar.dwKind==VAR_DIRECTMEM){
+		//mov r11,qword ptr[r11]
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_R11,0,MOD_BASE);
+	}
+	else{
+		//直接参照に切り替え
+		SetVarPtrToReg(REG_R12,&relativeVar);
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		//mov r11,qword ptr[r12]
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_R12,0,MOD_BASE);
+	}
+}
+bool GetArrayOffset(const Subscripts &subscripts,char *array, const Type &type){
+	extern HANDLE hHeap;
+	int i,i2,i3,i4;
+	char temporary[VN_SIZE],*pParm[MAX_PARMS];
+
+	for(i=0,i2=0,i3=0;;i++,i2++){
+		if(array[i]=='('){
+			i4=GetStringInPare(temporary+i2,array+i);
+			i+=i4-1;
+			i2+=i4-1;
+			continue;
+		}
+		if(array[i]=='['){
+			i4=GetStringInBracket(temporary+i2,array+i);
+			i+=i4-1;
+			i2+=i4-1;
+			continue;
+		}
+		if(array[i]==','||array[i]=='\0'){
+			if( i3 >= (int)subscripts.size() )
+			{
+				for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
+				return false;
+			}
+
+			temporary[i2]=0;
+
+			pParm[i3]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
+			lstrcpy(pParm[i3],temporary);
+
+			i3++;
+
+			if(array[i]=='\0'){
+				if( i3 < (int)subscripts.size() )
+				{
+					for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
+					return false;
+				}
+				break;
+			}
+
+			i2=-1;
+			continue;
+		}
+		temporary[i2]=array[i];
+	}
+
+	//mov qword ptr[rsp+offset],r11     ※スタックフレームを利用
+	pobj_sf->push(REG_R11);
+
+	//xor r12,r12
+	compiler.codeGenerator.op_zero_reg(REG_R12);
+
+	for(i=i3-1;i>=0;i--){
+		//mov qword ptr[rsp+offset],r12     ※スタックフレームを利用
+		pobj_sf->push(REG_R12);
+
+		int reg=REG_NON;
+		Type type;
+		bool isNeedHeapFreeStructure;
+		NumOpe( &reg, pParm[i], Type( DEF_LONG ), type, &isNeedHeapFreeStructure );
+		if( type.IsObject() )
+		{
+			//キャスト演算子のオーバーロードに対応する
+			CallCastOperatorProc(reg,
+				type,
+				isNeedHeapFreeStructure, Type(DEF_LONG) );
+			type.SetBasicType( DEF_LONG );
+		}
+
+		if( !type.IsWhole() )
+		{
+			compiler.errorMessenger.Output(46,NULL,cp);
+		}
+		ExtendTypeTo64( type.GetBasicType(), reg );
+
+		if(reg==REG_R14){
+			//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(REG_R14);
+		}
+
+		//mov r12,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R12);
+
+		for(i2=i+1,i4=1;i2<i3;i2++) i4*=subscripts[i2]+1;
+
+		//imul reg,i4
+		compiler.codeGenerator.op_imul_RV(sizeof(_int64),reg,i4);
+
+		//add r12,reg
+		compiler.codeGenerator.op_add_RR(REG_R12,reg);
+
+		HeapDefaultFree(pParm[i]);
+	}
+
+	//imul r12,TypeSize
+	compiler.codeGenerator.op_imul_RV( sizeof(_int64), REG_R12, type.GetSize() );
+
+	//mov r11,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pobj_sf->pop(REG_R11);
+
+	//add r11,r12
+	compiler.codeGenerator.op_add_RR( REG_R11, REG_R12 );
+
+	return true;
+}
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const Type &classType, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess)
+{
+	const CClass &objClass = classType.GetClass();
+
+	//////////////////////////////////////
+	// クラス、配列の構成要素を解析する
+	//////////////////////////////////////
+
+	char VarName[VN_SIZE];		//変数名
+	char array[VN_SIZE];		//第1次配列
+	char lpPtrOffset[VN_SIZE];	//第2次配列
+	char NestMember[VN_SIZE];	//入れ子メンバ
+	ReferenceKind refType;
+	lstrcpy(VarName,member);
+	if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember,refType)) return false;
+
+
+	////////////////////////////
+	// メンバオフセットを取得
+	////////////////////////////
+
+	const CMember *pMember = objClass.FindDynamicMember( VarName );
+	if( !pMember )
+	{
+		if(isErrorEnabled) compiler.errorMessenger.Output(103,VarName,cp);
+		return false;
+	}
+
+	int offset = objClass.GetMemberOffset( VarName );
+
+
+	//アクセシビリティをチェック
+	if(&objClass==compiler.pCompilingClass){
+		//同一クラスオブジェクトの場合はプライベートアクセスを容認する
+		if(pMember->IsNoneAccess()){
+			if(isErrorEnabled) compiler.errorMessenger.Output(107,VarName,cp);
+			return false;
+		}
+	}
+	else{
+		if((bPrivateAccess==0&&pMember->IsPrivate())||
+			pMember->IsNoneAccess()){
+			if(isErrorEnabled) compiler.errorMessenger.Output(107,VarName,cp);
+			return false;
+		}
+		else if(bPrivateAccess==0&&pMember->IsProtected()){
+			if(isErrorEnabled) compiler.errorMessenger.Output(108,VarName,cp);
+			return false;
+		}
+	}
+
+	//Const定義の場合は書き込みアクセスを制限する
+	//※コンストラクタをコンパイル中の場合は例外的に許可する
+	if( pMember->IsConst() &&		//定数メンバである
+		isWriteAccess &&							//書き込みアクセスを要求されている
+		objClass.IsCompilingConstructor() == false	//コンストラクタ コンパイル中を除く
+		){
+			//Const定義の変数に書き込みアクセスをしようとした場合
+			compiler.errorMessenger.Output(61,VarName,cp);
+	}
+
+	resultType = pMember->GetType();
+
+	// 型パラメータを解決
+	ResolveFormalGenericTypeParameter( resultType, classType );
+
+	//ポインタ変数の場合
+	if( resultType.IsPointer() ){
+		if( pMember->GetSubscripts().size() == 0 ){
+			lstrcpy(lpPtrOffset,array);
+			array[0]=0;
+		}
+	}
+	else{
+		if(lpPtrOffset[0]){
+			if(isErrorEnabled) compiler.errorMessenger.Output(16,member,cp);
+			return false;
+		}
+	}
+
+	if(offset){
+		//add r11,offset
+		compiler.codeGenerator.op_add_RV( REG_R11, offset );
+	}
+
+	if(array[0]){
+		//配列オフセット
+		if(!GetArrayOffset(pMember->GetSubscripts(),array,pMember->GetType())){
+			if(isErrorEnabled) compiler.errorMessenger.Output(14,member,cp);
+			return false;
+		}
+	}
+	else if( pMember->GetSubscripts().size() > 0 ){
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
+	}
+
+	if(NestMember[0]){
+		//入れ子構造の場合
+
+		if( resultType.IsObject() || resultType.IsStruct() ){
+			if( refType != RefDot ){
+				if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
+				return false;
+			}
+
+			if( resultType.IsObject() ){
+				// 参照内容へのポインタを抽出
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
+			//構造体ポインタ型メンバ変数
+
+			if(lpPtrOffset[0]){
+				//pObj[n].member
+				if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != RefDot ){
+						if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
+						return false;
+				}
+
+				//直接参照に切り替え
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				lpPtrOffset[0]=0;
+			}
+			else{
+				//pObj->member
+				if( (resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != RefPointer ){
+						if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
+						return false;
+				}
+
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_OBJECT,2)
+			|| resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_STRUCT,2)){
+			//構造体ポインタのポインタ型メンバ変数
+
+			if(lpPtrOffset[0]){
+				//ppObj[n]->member
+				if( refType != RefPointer ){
+					if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
+					return false;
+				}
+
+				//直接参照に切り替え
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				lpPtrOffset[0]=0;
+
+				//mov r11,qword ptr[r11]
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_R11,0,MOD_BASE);
+			}
+			else{
+				if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
+				return false;
+			}
+		}
+
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			pMember->GetType(),
+			NestMember,
+			pRelativeVar,
+			resultType,
+			0)) return false;
+	}
+
+	if(lpPtrOffset[0]){
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+	}
+
+	return true;
+}
+
+int LocalVar_ThisPtrOffset;
+void SetThisPtrToReg(int reg){
+	//自身のオブジェクトのThisポインタをregにコピー
+
+	RELATIVE_VAR RelativeVar;
+	RelativeVar.dwKind=VAR_LOCAL;
+	RelativeVar.bOffsetOffset=0;
+	RelativeVar.offset=-LocalVar_ThisPtrOffset;
+
+	SetReg_WholeVariable(Type(DEF_PTR_VOID),&RelativeVar,reg);
+}
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts ){
+	char variable[VN_SIZE];
+
+	if(NameBuffer[0]=='.'){
+		GetWithName(variable);
+		lstrcat(variable,NameBuffer);
+	}
+	else lstrcpy(variable,NameBuffer);
+
+	// 名前空間を分離
+	char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE];
+	compiler.GetObjectModule().meta.GetNamespaces().SplitNamespace( variable, namespaceStr, simpleName );
+
+	// 先頭オブジェクトまたはクラス名と入れ子メンバに分割
+	ReferenceKind refType;
+	char member[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];
+	GetVarFormatString(simpleName,array,lpPtrOffset,member,refType);
+
+	// 名前空間を分離していた場合は結合
+	char VarName[VN_SIZE];
+	if( namespaceStr[0] ){
+		sprintf( VarName, "%s.%s", namespaceStr, simpleName );
+	}
+	else{
+		lstrcpy( VarName, simpleName );
+	}
+
+	const Subscripts *pSubscripts;
+	bool bConst = false;
+
+
+	if( UserProc::IsLocalAreaCompiling() ){
+		//////////////////
+		// ローカル変数
+		//////////////////
+
+		const Variable *pVar = UserProc::CompilingUserProc().GetLocalVars().BackSearch( Symbol( VarName ) );
+		if( pVar ){
+			//ポインタ変数の場合
+			if( pVar->GetType().IsPointer() ){
+				if( !pVar->IsArray() ){
+					lstrcpy(lpPtrOffset,array);
+					array[0]=0;
+				}
+			}
+			else{
+				if(lpPtrOffset[0]){
+					compiler.errorMessenger.Output(16,variable,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+			}
+
+			pRelativeVar->offset=-pVar->GetOffsetAddress();
+			pRelativeVar->bOffsetOffset=0;
+			if( pVar->IsRef() ){
+				// 参照型
+				pRelativeVar->dwKind = VAR_REFLOCAL;
+			}
+			else pRelativeVar->dwKind=VAR_LOCAL;
+			resultType = pVar->GetType();
+			pSubscripts = &pVar->GetSubscripts();
+			bConst = pVar->IsConst();
+
+			/////////////////////////////////////////////////////////
+			// ☆★☆ ジェネリクスサポート ☆★☆
+
+			if( resultType.IsTypeParameter() )
+			{
+				// 型パラメータだったとき
+
+				int ptrLevel = PTR_LEVEL( resultType.GetBasicType() );
+
+				// 制約クラス（指定されていないときはObjectクラス）にセットする
+				resultType.SetBasicType( DEF_OBJECT );
+
+				for( int i=0; i<ptrLevel; i++ )
+				{
+					resultType.PtrLevelUp();
+				}
+			}
+
+			//
+			/////////////////////////////////////////////////////////
+
+			goto ok;
+		}
+	}
+
+
+	if(compiler.pCompilingClass){
+		//////////////////////
+		// クラスメンバの参照
+		//////////////////////
+
+		if(lstrcmpi(variable,"This")==0){
+			//自身のオブジェクトのThisポインタをr11にコピー
+			SetThisPtrToReg(REG_R11);
+
+			pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+			resultType.SetType( DEF_OBJECT, compiler.pCompilingClass );
+			return true;
+		}
+
+		if(memicmp(variable,"This.",5)==0){
+			//Thisオブジェクトのメンバを参照するとき
+			SlideString(variable+5,-5);
+			lstrcpy(VarName,variable);
+		}
+		else{
+			//クラス内の動的メンバを参照するとき（通常）
+
+			if( !compiler.pCompilingClass->HasDynamicMember( VarName ) )
+			{
+				goto NonClassMember;
+			}
+		}
+
+		//Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
+		//（コンストラクタ、デストラクタ内を除く）
+		const CMethod *pMethod = compiler.GetObjectModule().meta.GetClasses().GetNowCompilingMethodInfo();
+		if( isWriteAccess &&
+			pMethod->IsConst() &&
+			compiler.pCompilingClass->IsCompilingConstructor() == false &&
+			compiler.pCompilingClass->IsCompilingDestructor() == false
+			){
+				compiler.errorMessenger.Output(131, NULL, cp );
+		}
+
+		//自身のオブジェクトのThisポインタをr11にコピー
+		SetThisPtrToReg(REG_R11);
+
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			Type( DEF_OBJECT, *compiler.pCompilingClass ),
+			variable,
+			pRelativeVar,
+			resultType,1)) return false;
+		return true;
+	}
+
+NonClassMember:
+
+	{
+		const Variable *pVar;
+
+		//////////////////////////
+		// 静的ローカル変数
+		// ※"Static.Object.Method.Variable"
+		//////////////////////////
+
+		char temporary[VN_SIZE];
+		if( UserProc::IsLocalAreaCompiling() ){
+			GetNowStaticVarFullName(VarName,temporary);
+
+			pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temporary ) );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+
+		//////////////////////////
+		// クラスの静的メンバ
+		//////////////////////////
+
+		if(member[0]){
+			lstrcpy(temporary,member);
+
+			// TODO: 名前空間を考慮したコードになっていない
+
+			char tempMember[VN_SIZE];
+			char tempArray[VN_SIZE];
+			{
+				ReferenceKind refType;
+				GetVarFormatString(temporary,tempArray,lpPtrOffset,tempMember, refType );
+			}
+
+			int typeDefIndex = compiler.GetObjectModule().meta.GetTypeDefs().GetIndex( VarName );
+			if( typeDefIndex != -1 ){
+				// TypeDef後の型名だったとき
+				lstrcpy( VarName, compiler.GetObjectModule().meta.GetTypeDefs()[typeDefIndex].GetBaseName().c_str() );
+			}
+
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",VarName,temporary);
+			pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temp2 ) );
+			if( pVar ){
+				lstrcpy(member,tempMember);
+				lstrcpy(array,tempArray);
+				goto GlobalOk;
+			}
+		}
+
+		if(compiler.pCompilingClass){
+			//自身のクラスから静的メンバを参照する場合
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",compiler.pCompilingClass->GetName().c_str(),VarName);
+			pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( Symbol( temp2 ) );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+		/////////////////////
+		// グローバル変数
+		/////////////////////
+
+		pVar = compiler.GetObjectModule().meta.GetGlobalVars().BackSearch( Symbol( VarName ) );
+		if( pVar ){
+			goto GlobalOk;
+		}
+
+		if(isErrorEnabled) compiler.errorMessenger.Output(3,variable,cp);
+		pRelativeVar->dwKind=NON_VAR;
+		return false;
+
+
+
+GlobalOk:
+		//ポインタ変数の場合
+		if( pVar->GetType().IsPointer() ){
+			if( !pVar->IsArray() ){
+				lstrcpy(lpPtrOffset,array);
+				array[0]=0;
+			}
+		}
+		else{
+			if(lpPtrOffset[0]){
+				compiler.errorMessenger.Output(16,variable,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+		}
+
+		pRelativeVar->offset=pVar->GetOffsetAddress();
+		pRelativeVar->bOffsetOffset=0;
+		if( pVar->IsRef() ){
+			// 参照型
+			pRelativeVar->dwKind = VAR_REFGLOBAL;
+		}
+		else pRelativeVar->dwKind=VAR_GLOBAL;
+		resultType = pVar->GetType();
+		pSubscripts=&pVar->GetSubscripts();
+		bConst = pVar->IsConst();
+	}
+
+
+
+ok:
+
+	if( bConst && isWriteAccess ){
+		//Const定義の変数に書き込みアクセスをしようとした場合
+		if( resultType.IsObject() ){
+			//オブジェクト定数
+			compiler.errorMessenger.Output(130, VarName, cp );
+		}
+		else{
+			//一般のConst変数
+			compiler.errorMessenger.Output(61,VarName,cp);
+		}
+	}
+
+	if( array[0] == 0 && pSubscripts->size() > 0 ){
+		//配列の先頭ポインタを示す場合
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
+
+		if( pResultSubscripts )
+		{
+			(*pResultSubscripts) = *pSubscripts;
+		}
+		return true;
+	}
+
+	if( array[0] || member[0] ){
+		//xor r11,r11（r11を0に初期化する）
+		//※r11は変数ベースアドレスからの相対オフセットを示す
+		compiler.codeGenerator.op_zero_reg(REG_R11);
+
+		pRelativeVar->bOffsetOffset=1;
+	}
+	if(array[0]){
+		if(!GetArrayOffset(*pSubscripts,array,resultType)){
+			compiler.errorMessenger.Output(14,variable,cp);
+			pRelativeVar->dwKind=NON_VAR;
+			return false;
+		}
+	}
+	if(member[0]){
+		if( resultType.IsObject() || resultType.IsStruct() ){
+			//実態オブジェクトのメンバを参照（obj.member）
+			if( refType != RefDot ){
+				compiler.errorMessenger.Output(104,VarName,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+
+			if( resultType.IsObject() ){
+				// 参照内容へのポインタを抽出
+				SetRelativeOffset( *pRelativeVar );
+			}
+		}
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
+			//ポインタオブジェクトが示すメンバを参照
+			if(lpPtrOffset[0]){
+				//pObj[n].member
+				if( refType != RefDot ){
+					compiler.errorMessenger.Output(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+			}
+			else{
+				//pObj->member
+				if( refType != RefPointer ){
+					compiler.errorMessenger.Output(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+
+				SetVarPtrToReg(REG_R12,pRelativeVar);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+				//mov r11,qword ptr[r12]
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_R12,0,MOD_BASE);
+			}
+		}
+		else if( resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_OBJECT,2) || resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_STRUCT,2)){
+			//ポインタオブジェクトが示すメンバを参照
+			if(lpPtrOffset[0]){
+				//ppObj[n]->member
+				if( refType != RefPointer ){
+					compiler.errorMessenger.Output(104,VarName,cp);
+					pRelativeVar->dwKind=NON_VAR;
+					return false;
+				}
+
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+				pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+
+				SetVarPtrToReg(REG_R12,pRelativeVar);
+
+				//mov r11,qword ptr[r12]
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_R12,0,MOD_BASE);
+			}
+			else{
+				compiler.errorMessenger.Output(104,VarName,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+		}
+		else{
+			compiler.errorMessenger.Output(102,VarName,cp);
+			pRelativeVar->dwKind=NON_VAR;
+			return false;
+		}
+
+		if(!_member_offset(
+			isErrorEnabled,
+			isWriteAccess,
+			resultType,
+			member,pRelativeVar,resultType,0)) return false;
+
+		return true;
+	}
+
+	if(lpPtrOffset[0]){
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
+		pRelativeVar->dwKind=VAR_DIRECTMEM;
+	}
+
+	return true;
+}
+
+bool SetInitGlobalData(int offset,const Type &type,const Subscripts &subscripts,const char *lpszInitBuf){
+	int i2,i3;
+	char temporary[VN_SIZE];
+	char InitBuf[VN_SIZE];
+	lstrcpy( InitBuf, lpszInitBuf );
+
+	if(InitBuf[0]=='['){
+		SlideString(InitBuf+1,-1);
+		InitBuf[lstrlen(InitBuf)-1]=0;
+
+		int typeSize = type.GetSize();
+
+		if( subscripts.size() > 0 ){
+			Subscripts nestSubscripts;
+			for( int i=1; i<(int)subscripts.size(); i++ )
+			{
+				nestSubscripts.push_back( subscripts[i] );
+			}
+
+			typeSize*=JumpSubScripts( nestSubscripts );
+			{
+				int i=0;
+				i2=0;
+				while(1){
+					if( subscripts[0] < i2 ){
+						compiler.errorMessenger.Output(41,0,cp);
+						return 0;
+					}
+					i=GetOneParameter(InitBuf,i,temporary);
+					if(!SetInitGlobalData(
+						offset+i2*typeSize,
+						type,
+						nestSubscripts,
+						temporary)) return false;
+					i2++;
+					if(InitBuf[i]=='\0') break;
+				}
+			}
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					compiler.errorMessenger.Output(41,0,cp);
+					return false;
+				}
+
+				i=GetOneParameter(InitBuf,i,temporary);
+
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str() );
+
+				if(!SetInitGlobalData(offset+i3,
+					pMember->GetType(),
+					pMember->GetSubscripts(),
+					temporary)) return false;
+			}
+			return true;
+		}
+
+		compiler.errorMessenger.Output(41,0,cp);
+		return false;
+	}
+
+
+	///////////////////////////////////////
+	// 単発式（[]で囲まれていない）
+	///////////////////////////////////////
+
+	if( subscripts.size() > 0 ){
+		compiler.errorMessenger.Output(41,0,cp);
+		return false;
+	}
+
+	double dbl;
+	_int64 i64data;
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
+		//動的データだった場合
+		return false;
+	}
+	if( calcType.IsReal() ){
+		memcpy(&dbl,&i64data,sizeof(double));
+		i64data=(_int64)dbl;
+	}
+	else dbl=(double)i64data;
+
+	//型チェック
+	CheckDifferentType(
+		type,
+		calcType,
+		0,0);
+
+	if( type.IsDouble() ){
+		compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+			offset,
+			(const char *)&dbl,
+			sizeof(double)
+		);
+	}
+	else if( type.IsSingle() ){
+		float flt = (float)dbl;
+		compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+			offset,
+			(const char *)&flt,
+			sizeof(float)
+		);
+	}
+	else if( type.Is64() || type.IsPointer() ){
+		if( type.GetBasicType() == typeOfPtrChar && type.GetIndex() == LITERAL_STRING ){
+			//文字列定数のとき
+
+			char *temp;
+			temp=(char *)i64data;
+			i2=compiler.GetObjectModule().dataTable.AddString( temp );
+			HeapDefaultFree(temp);
+
+			//mov rax,DataPos
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RAX,i2, Schedule::DataTable );
+
+			//mov qword ptr[offset],rax
+			compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,0,offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+				offset,
+				(const char *)&i64data,
+				sizeof(_int64)
+			);
+		}
+	}
+	else if( type.IsDWord() || type.IsLong() ){
+		long l = (long)i64data;
+		compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+			offset,
+			(const char *)&l,
+			sizeof(long)
+		);
+	}
+	else if( type.IsWord() || type.IsInteger() ){
+		short s = (short)i64data;
+		compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+			offset,
+			(const char *)&s,
+			sizeof(short)
+		);
+	}
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
+		char c = (char)i64data;
+		compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.Overwrite(
+			offset,
+			(const char *)&c,
+			sizeof(char)
+		);
+	}
+
+	return true;
+}
+bool InitLocalVar(int offset,const Type &type,const Subscripts &subscripts,const char *lpszInitBuf){
+	int i2,i3;
+	char temporary[VN_SIZE];
+	char InitBuf[VN_SIZE];
+	lstrcpy( InitBuf, lpszInitBuf );
+
+	if(InitBuf[0]=='['){
+		SlideString(InitBuf+1,-1);
+		InitBuf[lstrlen(InitBuf)-1]=0;
+
+		int typeSize = type.GetSize();
+
+		if( subscripts.size() > 0 ){
+			Subscripts nestSubscripts;
+			for( int i=1; i<(int)subscripts.size(); i++ )
+			{
+				nestSubscripts.push_back( subscripts[i] );
+			}
+
+			typeSize*=JumpSubScripts( nestSubscripts );
+			{
+				int i=0;
+				i2=0;
+				while(1){
+					if( subscripts[0] < i2 ){
+						compiler.errorMessenger.Output(41,0,cp);
+						return 0;
+					}
+					i=GetOneParameter(InitBuf,i,temporary);
+					if(!InitLocalVar(
+						offset+i2*typeSize,
+						type,
+						nestSubscripts,
+						temporary)) return false;
+					i2++;
+					if(InitBuf[i]=='\0') break;
+				}
+			}
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					compiler.errorMessenger.Output(41,0,cp);
+					return false;
+				}
+
+				i=GetOneParameter(InitBuf,i,temporary);
+
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str() );
+
+				if(!InitLocalVar(offset+i3,
+					pMember->GetType(),
+					pMember->GetSubscripts(),
+					temporary)) return false;
+
+				if(InitBuf[i]=='\0') break;
+			}
+			return true;
+		}
+
+		compiler.errorMessenger.Output(41,0,cp);
+		return false;
+	}
+
+
+	///////////////////////////////////////
+	// 単発式（[]で囲まれていない）
+	///////////////////////////////////////
+
+	if( subscripts.size() > 0 ){
+		compiler.errorMessenger.Output(41,0,cp);
+		return false;
+	}
+
+	double dbl;
+	_int64 i64data;
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
+		//動的データだった場合
+		return false;
+	}
+	if( calcType.IsReal() ){
+		memcpy(&dbl,&i64data,sizeof(double));
+		i64data=(_int64)dbl;
+	}
+	else dbl=(double)i64data;
+
+	//型チェック
+	CheckDifferentType(
+		type,
+		calcType,
+		0,0);
+
+	if( type.IsDouble() ){
+		memcpy(&i64data,&dbl,sizeof(double));
+
+		//mov rax,i64data
+		compiler.codeGenerator.op_mov_RV64(REG_RAX,i64data);
+
+		//mov qword ptr[rsp+offset],rax
+		compiler.codeGenerator.localVarPertialSchedules.push_back(
+			compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,REG_RSP,offset,MOD_BASE_DISP32, Schedule::None, true )
+		);
+	}
+	else if( type.IsSingle() ){
+		float flt;
+		flt=(float)dbl;
+
+		//mov dword ptr[rsp+offset],value
+		compiler.codeGenerator.localVarPertialSchedules.push_back(
+			compiler.codeGenerator.op_mov_MV(sizeof(long),REG_RSP,offset, Schedule::None, true, USE_OFFSET,*(int *)&flt)
+		);
+	}
+	else if( type.Is64() || type.IsPointer() ){
+		if( type.GetBasicType() == typeOfPtrChar && type.GetIndex() == LITERAL_STRING ){
+			//文字列定数のとき
+
+			char *temp;
+			temp=(char *)i64data;
+			i2=compiler.GetObjectModule().dataTable.AddString( temp );
+			HeapDefaultFree(temp);
+
+			//mov rax,i2
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RAX,i2, Schedule::DataTable );
+
+			//mov qword ptr[rsp+offset],rax
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,REG_RSP,offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			if(i64data&0xFFFFFFFF00000000){
+				//mov rax,i64data
+				compiler.codeGenerator.op_mov_RV64(REG_RAX,i64data);
+
+				//mov qword ptr[rsp+offset],rax
+				compiler.codeGenerator.localVarPertialSchedules.push_back(
+					compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,REG_RSP,offset,MOD_BASE_DISP32, Schedule::None, true )
+				);
+			}
+			else{
+				//mov qword ptr[rsp+offset],value
+				compiler.codeGenerator.localVarPertialSchedules.push_back(
+					compiler.codeGenerator.op_mov_MV(sizeof(_int64),REG_RSP,offset, Schedule::None, true, USE_OFFSET,(int)i64data)
+				);
+			}
+		}
+	}
+	else if( type.IsDWord() || type.IsLong() ){
+		//mov dword ptr[rsp+offset],value
+		compiler.codeGenerator.localVarPertialSchedules.push_back(
+			compiler.codeGenerator.op_mov_MV(sizeof(long),REG_RSP,offset, Schedule::None, true, USE_OFFSET,(int)i64data)
+		);
+	}
+	else if( type.IsWord() || type.IsInteger() ){
+		//mov word ptr[rsp+offset],value
+		compiler.codeGenerator.localVarPertialSchedules.push_back(
+			compiler.codeGenerator.op_mov_MV(sizeof(short),REG_RSP,offset, Schedule::None, true, USE_OFFSET,(int)i64data)
+		);
+	}
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
+		//mov byte ptr[rsp+offset],value
+		compiler.codeGenerator.localVarPertialSchedules.push_back(
+			compiler.codeGenerator.op_mov_MV(sizeof(char),REG_RSP,offset, Schedule::None, true, USE_OFFSET,(int)i64data)
+		);
+	}
+	return true;
+}
+
+void dim( char *VarName, const Subscripts &subscripts, const Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags)
+{
+	if( UserProc::IsGlobalAreaCompiling() ){
+		/////////////////////////
+		// グローバル変数
+		/////////////////////////
+
+		AddGlobalVariable(VarName,subscripts,type,InitBuf,ConstractParameter,dwFlags);
+	}
+	else{
+		/////////////////
+		// ローカル変数
+		/////////////////
+
+		if( UserProc::CompilingUserProc().GetLocalVars().DuplicateCheck( VarName ) ){
+			//２重定義のエラー
+			compiler.errorMessenger.Output(15,VarName,cp);
+			return;
+		}
+
+		bool isConst = ( dwFlags & DIMFLAG_CONST ) ? true:false;
+
+		Variable *pVar = new Variable( VarName, type, isConst, false, ConstractParameter, false );
+
+		if( subscripts.size() > 0 ){
+			//配列あり
+			pVar->SetArray( subscripts );
+		}
+
+		//レキシカルスコープ
+		pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() );
+		pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() );
+		pVar->isLiving = true;
+
+		//エラー用
+		pVar->source_code_address=cp;
+
+		// 変数を追加
+		UserProc::CompilingUserProc().GetLocalVars().push_back( pVar );
+
+		//アラインメントを考慮
+		if( pVar->GetType().IsStruct() ){
+			int alignment = pVar->GetType().GetClass().GetFixedAlignment();
+
+			if( alignment ){
+				if( AllLocalVarSize % alignment ){
+					AllLocalVarSize += alignment - (AllLocalVarSize % alignment);
+				}
+			}
+
+			if( alignment == PTR_SIZE*2 ){
+				// ポインタに要するサイズよりも一回り大きなアラインメントが指定されているとき
+				// （例:CONTEXT構造体など）
+				// 呼び出し側のオフセットズレを考慮する
+
+				if( 0 == ( UserProc::CompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE/*ret分*/ ) % alignment ){
+					AllLocalVarSize += PTR_SIZE;
+				}
+			}
+		}
+
+		AllLocalVarSize += pVar->GetMemorySize();
+		pVar->SetOffsetAddress( AllLocalVarSize );
+
+		//レキシカルスコープ
+		pVar->SetScopeLevel( compiler.codeGenerator.lexicalScopes.GetNowLevel() );
+		pVar->SetScopeStartAddress( compiler.codeGenerator.lexicalScopes.GetStartAddress() );
+		pVar->isLiving = true;
+
+		if(InitBuf[0]){
+			//初期代入時のみ、書き込みアクセスを許可する
+			if( isConst ){
+				pVar->ConstOff();
+			}
+
+			int result = 0;
+			if( !pVar->GetType().IsObject() ){
+				result = InitLocalVar(-pVar->GetOffsetAddress(),
+					pVar->GetType(),
+					pVar->GetSubscripts(),
+					InitBuf);
+			}
+
+			if(!result){
+				//動的な式だった場合は代入演算を行う
+				char temporary[8192];
+				sprintf(temporary,"%s=%s",VarName,InitBuf);
+				OpcodeCalc(temporary);
+			}
+
+			if( isConst ){
+				pVar->ConstOn();
+			}
+		}
+		else{
+			//0初期化
+
+			//mov r8, 0
+			compiler.codeGenerator.op_zero_reg( REG_R8 );
+
+			//mov rdx, VarSize
+			compiler.codeGenerator.op_mov_RV( sizeof(_int64), REG_RDX, pVar->GetMemorySize() );
+
+			//mov rcx, rsp
+			compiler.codeGenerator.op_mov_RR( REG_RCX, REG_RSP );
+
+			//add rcx, offset
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RV( REG_RCX, -pVar->GetOffsetAddress(), Schedule::None, true )
+			);
+
+			//call FillMemory
+			DllProc *pDllProc;
+			pDllProc=GetDeclareHash("FillMemory");
+			compiler.codeGenerator.op_call( pDllProc );
+		}
+	}
+
+	//New呼び出し
+	if( type.IsObject()
+		&& !type.IsInterface() &&  !type.IsComInterface()
+		&&(dwFlags&DIMFLAG_NONCALL_CONSTRACTOR)==0
+		&&InitBuf[0]=='\0')
+	{
+		char objectSize[255];
+		if( subscripts.size() == 0 ){
+			objectSize[0] = 0;
+		}
+		else{
+			if( subscripts.size() > 1 ){
+				compiler.errorMessenger.Output(300,NULL,cp);
+			}
+			sprintf( objectSize, "%d", subscripts[0] );
+		}
+		Operator_New( type.GetClass(), objectSize, ConstractParameter, type );
+
+		Type tempType;
+		RELATIVE_VAR RelativeVar;
+		GetVarOffset( true, false, VarName, &RelativeVar, tempType );
+		if( RelativeVar.dwKind == VAR_DIRECTMEM ){
+			compiler.errorMessenger.OutputFatalError();
+		}
+		SetVariableFromRax( Type( DEF_OBJECT, *compiler.GetObjectModule().meta.GetClasses().GetObjectClassPtr() ), DEF_OBJECT, &RelativeVar );
+	}
+}
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar){
+	if(!IsGeneralReg(reg)) compiler.errorMessenger.Output(300,NULL,cp);
+
+	if(pRelativeVar->dwKind==VAR_GLOBAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,offset
+			compiler.codeGenerator.op_add_RV( REG_R11, (long)pRelativeVar->offset, Schedule::GlobalVar );
+
+			//mov reg,r11
+			compiler.codeGenerator.op_mov_RR(reg,REG_R11);
+		}
+		else{
+			//mov reg,offset
+			compiler.codeGenerator.op_mov_RV( sizeof(_int64), reg, (long)pRelativeVar->offset, Schedule::GlobalVar );
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[offset]
+			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelativeVar->offset, MOD_DISP32, Schedule::GlobalVar );
+		}
+		else{
+			//mov r11,qword ptr[offset]
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_LOCAL){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,offset
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RV( REG_R11, (long)pRelativeVar->offset, Schedule::None, true )
+			);
+
+			//add r11,rsp
+			compiler.codeGenerator.op_add_RR(REG_R11,REG_RSP);
+
+			//mov reg,r11
+			compiler.codeGenerator.op_mov_RR(reg,REG_R11);
+		}
+		else{
+			//mov reg,rsp
+			compiler.codeGenerator.op_mov_RR(reg,REG_RSP);
+
+			//add reg,offset
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RV(reg,(long)pRelativeVar->offset, Schedule::None, true )
+			);
+		}
+	}
+	else if( pRelativeVar->dwKind == VAR_REFLOCAL ){
+		if(pRelativeVar->bOffsetOffset){
+			//add r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (long)pRelativeVar->offset, MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+		else{
+			//mov r11,qword ptr[rsp+offset]
+			compiler.codeGenerator.localVarPertialSchedules.push_back(
+				compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::None, true )
+			);
+		}
+
+		goto directmem;
+	}
+	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
+directmem:
+		//mov reg,r11
+		compiler.codeGenerator.op_mov_RR(reg,REG_R11);
+	}
+}
+
+bool Compile_AddGlobalRootsForGc(){
+	const UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" );
+	if( !pUserProc_AddGlobalRootPtr ){
+		compiler.errorMessenger.Output(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 );
+		return false;
+	}
+
+	BOOST_FOREACH( const Variable *pVar, compiler.GetObjectModule().meta.GetGlobalVars() ){
+		if( pVar->GetType().IsObject() || pVar->GetType().IsPointer() || pVar->GetType().IsStruct() ){
+			// オブジェクトまたはポインタだったとき
+			// ※構造体も含む（暫定対応）
+
+			// 変数領域に要するLONG_PTR単位の個数を引き渡す
+			//mov r8,count
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64), REG_R8,pVar->GetMemorySize()/PTR_SIZE);
+
+			// ルートポインタを引き渡す
+			//mov rdx,offset
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64), REG_RDX,(int)pVar->GetOffsetAddress(), Schedule::GlobalVar );
+
+			// Thisポインタを引き渡す
+			SetThisPtrToReg(REG_RCX);
+
+			// call AddGlobalRootPtr
+			compiler.codeGenerator.op_call( pUserProc_AddGlobalRootPtr );
+		}
+	}
+
+	return true;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Debug.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Debug.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Debug.cpp	(revision 482)
@@ -0,0 +1,677 @@
+#include "../BasicCompiler_Common/common.h"
+#include "opcode.h"
+
+ULONG_PTR rva_to_real(DWORD p){
+	extern DWORD ImageBase;
+	extern int MemPos_CodeSection;
+	return p+ImageBase+MemPos_CodeSection;
+}
+
+void ShowVarList(DEBUG_EVENT *pde,BOOL bExit){
+	extern DWORD ImageBase;
+	extern DWORD _DebugSys_dwThreadID[256];
+	extern HANDLE hDebugProcess;
+	extern int MemPos_RWSection;
+	SIZE_T stAccBytes;
+	ReadProcessMemory(hDebugProcess,
+		(void *)(LONG_PTR)(ImageBase+MemPos_RWSection),
+		_DebugSys_dwThreadID,sizeof(DWORD)*256,&stAccBytes);
+
+	//デバッグダイアログを表示
+	extern HINSTANCE hInst;
+	extern HWND hMainDlg;
+	extern HWND hDebugWnd;
+	extern DWORD dwStepRun;
+	dwStepRun=0;
+	if(!hDebugWnd) SendMessage(hMainDlg,WM_SHOWVARLIST,0,pde->dwThreadId);
+	else InitVarList(pde->dwThreadId);
+
+	if(bExit){
+		//"中断"
+		SetDlgItemText(hMainDlg,IDOK,STRING_CLOSE);
+
+		extern HWND hDebuggerToolbar;
+		SendMessage(hDebuggerToolbar,TB_SETSTATE,IDC_DEBUG_START,TBSTATE_INDETERMINATE);
+		SendMessage(hDebuggerToolbar,TB_SETSTATE,IDC_DEBUG_STEPOVER,TBSTATE_INDETERMINATE);
+		SendMessage(hDebuggerToolbar,TB_SETSTATE,IDC_DEBUG_STEPIN,TBSTATE_INDETERMINATE);
+	}
+	else{
+		//"継続"
+		SetDlgItemText(hDebugWnd,IDCANCEL,STRING_CONTINUE);
+	}
+	while(hDebugWnd&&dwStepRun==0) Sleep(1);
+}
+void DebugMessage(char *buffer){
+	extern HWND hMainDlg;
+	int pos;
+
+	if(!IsWindowEnabled(GetDlgItem(hMainDlg,IDC_DEBUGLIST))){
+		SetDlgItemText(hMainDlg,IDC_DEBUGLIST,"");
+		EnableWindow(GetDlgItem(hMainDlg,IDC_DEBUGLIST),1);
+	}
+
+	pos=GetWindowTextLength(GetDlgItem(hMainDlg,IDC_DEBUGLIST));
+	SendDlgItemMessage(hMainDlg,IDC_DEBUGLIST,EM_SETSEL,pos,pos);
+	SendDlgItemMessage(hMainDlg,IDC_DEBUGLIST,EM_REPLACESEL,0,(LPARAM)buffer);
+}
+SUBINFO *GetSubFromObp(ULONG_PTR pos){
+	extern SUBINFO **ppSubHash;
+	SUBINFO *psi;
+	int i2;
+
+	for(i2=0;i2<MAX_HASH;i2++){
+		psi=ppSubHash[i2];
+		while(psi){
+			if(rva_to_real(psi->CompileAddress) <= pos  &&
+				pos < rva_to_real(psi->EndOpAddr))
+				return psi;
+
+			psi=psi->pNextData;
+		}
+	}
+	return 0;
+}
+void ReleaseSingleStep(HANDLE hThread,CONTEXT *pContext){
+	//以前にシングルステップ実行をした場合
+	extern HANDLE hDebugProcess;
+	extern DWORD *lpdwDebugThreadID;
+	extern HANDLE *lphDebugThread;
+	extern int DebugThreadNum;
+	extern DWORD ImageBase;
+	extern int MemPos_CodeSection;
+	extern int FileSize_CodeSection;
+	extern char *OpBuffer;
+	int i2;
+	SIZE_T stAccBytes;
+
+	//シングルステップOFF
+	WriteProcessMemory(hDebugProcess,
+		(void *)(LONG_PTR)(ImageBase+MemPos_CodeSection),
+		OpBuffer,FileSize_CodeSection,&stAccBytes);
+
+	if(ImageBase+MemPos_CodeSection <= pContext->Rip &&
+		pContext->Rip < ImageBase+MemPos_CodeSection+FileSize_CodeSection){
+		//オリジナルコード内のみ、シングルステップ用の"int 3"を考慮
+		pContext->Rip--;
+		SetThreadContext(hThread,pContext);
+	}
+
+	//他のスレッドのサスペンドを解除
+	for(i2=0;i2<DebugThreadNum;i2++){
+		if(hThread!=lphDebugThread[i2])
+			ResumeThread(lphDebugThread[i2]);
+	}
+}
+void SetThreadId_ToProcessMemory(DWORD dwThreadId,BOOL bReset){
+	extern DWORD ImageBase;
+	extern int MemPos_RWSection;
+	extern HANDLE hDebugProcess;
+
+	DWORD array_dwData[256];
+	SIZE_T stAccBytes;
+
+	ReadProcessMemory(hDebugProcess,
+		(void *)(LONG_PTR)(ImageBase+MemPos_RWSection),
+		array_dwData,sizeof(DWORD)*256,&stAccBytes);
+
+	int i2;
+	for(i2=0;i2<256;i2++){
+		if(bReset==0){
+			if(array_dwData[i2]==0){
+				array_dwData[i2]=dwThreadId;
+				break;
+			}
+		}
+		else{
+			if(array_dwData[i2]==dwThreadId){
+				array_dwData[i2]=0;
+				break;
+			}
+		}
+	}
+
+	WriteProcessMemory(hDebugProcess,
+		(void *)(LONG_PTR)(ImageBase+MemPos_RWSection),
+		array_dwData,sizeof(DWORD)*256,&stAccBytes);
+}
+void AddThread(DWORD dwThreadId, HANDLE hThread){
+	extern HANDLE hDebugProcess;
+	extern DWORD ImageBase;
+	extern int MemPos_RWSection;
+
+	//プロセスIDをターゲットアプリのメモリに書き込む
+	SetThreadId_ToProcessMemory(dwThreadId,0);
+
+	extern int DebugThreadNum;
+
+	//デバッグID
+	extern DWORD *lpdwDebugThreadID;
+	lpdwDebugThreadID=(DWORD *)HeapReAlloc(hHeap,0,lpdwDebugThreadID,(DebugThreadNum+1)*sizeof(DWORD));
+	lpdwDebugThreadID[DebugThreadNum]=dwThreadId;
+
+	//デバッグハンドル
+	extern HANDLE *lphDebugThread;
+	lphDebugThread=(HANDLE *)HeapReAlloc(hHeap,0,lphDebugThread,(DebugThreadNum+1)*sizeof(HANDLE));
+	lphDebugThread[DebugThreadNum]=hThread;
+
+	//カウンタ
+	DebugThreadNum++;
+}
+void ReadOpBuffer(){
+	extern int FileSize_CodeSection;
+
+	extern char *OpBuffer;
+	if(OpBuffer) HeapDefaultFree(OpBuffer);
+	OpBuffer=(char *)HeapAlloc(hHeap,0,FileSize_CodeSection);
+
+	extern HANDLE hDebugProcess;
+	extern DWORD ImageBase;
+	extern int MemPos_CodeSection;
+	SIZE_T stAccByte;
+	ReadProcessMemory(hDebugProcess,(void *)(LONG_PTR)(ImageBase+MemPos_CodeSection),OpBuffer,FileSize_CodeSection,&stAccByte);
+}
+char *MakeSingleStepCode(){
+	extern DWORD ImageBase;
+	extern int MemPos_CodeSection;
+
+	extern int FileSize_CodeSection;
+	char *buffer;
+	buffer=(char *)HeapAlloc(hHeap,0,FileSize_CodeSection);
+
+	extern char *OpBuffer;
+	memcpy(buffer,OpBuffer,FileSize_CodeSection);
+
+	extern int MaxLineInfoNum;
+	extern LINEINFO *pLineInfo;
+	int i2;
+	for(i2=0;i2<MaxLineInfoNum;i2++){
+		if(!(
+			pLineInfo[i2].dwCodeType&CODETYPE_SYSTEMPROC||
+			pLineInfo[i2].dwCodeType&CODETYPE_DEBUGPROC
+			)){
+			//int 3
+			buffer[pLineInfo[i2].TopObp]=(char)0xCC;
+		}
+	}
+
+	return buffer;
+}
+void DeleteDebugInfo(void);
+void DebugProgram(void){
+	extern HWND hMainDlg;
+	extern char OutputFileName[MAX_PATH];
+	extern DWORD ImageBase;
+	extern int MemPos_CodeSection;
+	extern int MemPos_RWSection;
+	extern int FileSize_CodeSection;
+	extern char *OpBuffer;
+	int i2,i3,i4;
+	char temporary[VN_SIZE];
+	DWORD dwData[256];
+	SIZE_T stAccBytes;
+
+	extern BOOL bDll;
+	char ExeFilePathForDll[MAX_PATH];
+	if(bDll){
+		//DLLをデバッグする場合
+		extern char szDebugExeForDll[1024];
+		if(szDebugExeForDll[0]){
+			//指定済み
+			lstrcpy(ExeFilePathForDll,szDebugExeForDll);
+		}
+		else{
+			//ユーザーに実行ファイルを選択させる
+			extern HWND hOwnerEditor;
+			extern LPSTR ExeFileFilter;
+			if(!GetFilePathDialog(hOwnerEditor,ExeFilePathForDll,ExeFileFilter,"デバッグ用の実行可能ファイルを指定してください。",1)) return;
+		}
+	}
+
+	//"中断"
+	SetDlgItemText(hMainDlg,IDOK,STRING_STOP);
+
+	//スレッド情報
+	extern DWORD *lpdwDebugThreadID;
+	extern HANDLE *lphDebugThread;
+	extern int DebugThreadNum;
+	lpdwDebugThreadID=(DWORD *)HeapAlloc(hHeap,0,1);
+	lphDebugThread=(HANDLE *)HeapAlloc(hHeap,0,1);
+	DebugThreadNum=0;
+
+	//カレントディレクトリを設定
+	extern char BasicCurDir[MAX_PATH];
+	SetCurrentDirectory(BasicCurDir);
+
+	SendDlgItemMessage(hMainDlg,IDC_SHOWERROR,BM_SETCHECK,BST_UNCHECKED,0);
+	SendDlgItemMessage(hMainDlg,IDC_SHOWDEBUG,BM_SETCHECK,BST_CHECKED,0);
+	SendMessage(hMainDlg,WM_COMMAND,IDC_SHOWDEBUG,0);
+
+
+
+	extern BOOL bAttach;
+	if(bAttach){
+		extern DWORD dwAttachProcessId;
+
+		//プロセスIDを元にハンドルを取得
+		HANDLE hProcess;
+		hProcess=OpenProcess(PROCESS_ALL_ACCESS,0,dwAttachProcessId);
+		if(!hProcess) goto AttachError;
+
+		//そのプロセスにおける実行モジュールのインスタンスハンドルを取得
+		HINSTANCE hModule;
+		DWORD cbReturned;
+		if(!EnumProcessModules( hProcess, &hModule, sizeof(HINSTANCE), &cbReturned )) goto AttachError;
+
+		//実行ファイル名を取得
+		GetModuleFileNameEx(hProcess,hModule,OutputFileName,MAX_PATH);
+
+		CloseHandle(hProcess);
+
+
+		//デバッグ用の拡張情報を取得
+		ReadDebugFile();
+
+		if(!DebugActiveProcess(dwAttachProcessId)){
+AttachError:
+			DebugMessage("アタッチに失敗しました。");
+			return;
+		}
+	}
+	else{
+		if(!ReadDebugFile()){
+			extern BOOL bDebugCompile;
+			bDebugCompile=1;
+			OutputExe();
+			ReadDebugFile();
+		}
+
+		//スレッドを生成
+		STARTUPINFO si;
+		PROCESS_INFORMATION pi;
+		memset(&si,0,sizeof(STARTUPINFO));
+		si.cb=sizeof(STARTUPINFO);
+		if(!bDll){
+			//EXEファイルをデバッグ
+			CreateProcess(OutputFileName,"",NULL,NULL,0,NORMAL_PRIORITY_CLASS|DEBUG_ONLY_THIS_PROCESS,NULL,NULL,&si,&pi);
+		}
+		else{
+			//DLLファイルをデバッグ
+			CreateProcess(ExeFilePathForDll,"",NULL,NULL,0,NORMAL_PRIORITY_CLASS|DEBUG_ONLY_THIS_PROCESS,NULL,NULL,&si,&pi);
+		}
+
+		CloseHandle(pi.hProcess);
+		CloseHandle(pi.hThread);
+	}
+
+
+
+	extern BOOL bClipCompileView;
+	//"プログラムを実行しています（デバッグ中）"
+	MakeMessageText(temporary,STRING_DEBUGGING,0);
+	SetDlgItemText(hMainDlg,IDC_MESSAGE,temporary);
+	if(bClipCompileView) InvalidateRect(GetDlgItem(hMainDlg,IDC_PROGRESS),NULL,1);
+
+	char *SingleStepCodeBuffer;
+	SingleStepCodeBuffer=0;
+
+	SUBINFO *psi;
+
+	extern DWORD dwStepRun;
+	BOOL bFirstBreak=1;
+	CONTEXT Context;
+	HANDLE hMainThread;
+	extern HANDLE hDebugProcess;
+
+	DEBUG_EVENT de;
+	memset(&de,0,sizeof(DEBUG_EVENT));
+
+	while(WaitForDebugEvent(&de,INFINITE)){
+		if(de.dwDebugEventCode==LOAD_DLL_DEBUG_EVENT){
+			WCHAR wcBuf[MAX_PATH];
+			LONG_PTR lpData;
+
+			wcBuf[0]=0;
+			temporary[0]=0;
+
+			if(de.u.LoadDll.lpImageName){
+				if(!ReadProcessMemory(hDebugProcess,de.u.LoadDll.lpImageName,&lpData,sizeof(LONG_PTR),&stAccBytes)){
+					sprintf(temporary,"ロードされたDLLの名前取得（アドレス:&H%08x）に失敗しました。\r\n",(DWORD)(LONG_PTR)de.u.LoadDll.lpImageName);
+					DebugMessage(temporary);
+					goto NextContinue;
+				}
+				if(!ReadProcessMemory(hDebugProcess,(void *)lpData,wcBuf,sizeof(WCHAR)*MAX_PATH,&stAccBytes)){
+					sprintf(temporary,"ロードされたDLLの名前取得（アドレス:&H%08x）に失敗しました。\r\n",lpData);
+					DebugMessage(temporary);
+					goto NextContinue;
+				}
+
+				if(de.dwThreadId,de.u.LoadDll.fUnicode)
+					WideCharToMultiByte(CP_ACP,0,wcBuf,-1,temporary,255,NULL,NULL);
+				else lstrcpy(temporary,(char *)wcBuf);
+			}
+			else{
+				//アタッチした場合
+				GetModuleFileNameEx(hDebugProcess,(HINSTANCE)de.u.LoadDll.lpBaseOfDll,temporary,MAX_PATH);
+			}
+
+			char temp2[1024];
+			sprintf(temp2,"\"%s\" をロードしました。\r\n",temporary);
+			DebugMessage(temp2);
+
+			if(lstrcmpi(temporary, OutputFileName)==0){
+				ImageBase=(DWORD)(LONG_PTR)de.u.LoadDll.lpBaseOfDll;
+				AddThread(de.dwThreadId,hMainThread);
+
+				//実行用コードバッファを読み取る
+				ReadOpBuffer();
+
+				//シングルステップ用のコードバッファを作成
+				SingleStepCodeBuffer=MakeSingleStepCode();
+			}
+		}
+
+		else if(de.dwDebugEventCode==CREATE_PROCESS_DEBUG_EVENT){
+			hDebugProcess=de.u.CreateProcessInfo.hProcess;
+			hMainThread=de.u.CreateProcessInfo.hThread;
+			if(bDll) goto NextContinue;
+
+			//実行用コードバッファを読み取る
+			ReadOpBuffer();
+
+			//シングルステップ用のコードバッファを作成
+			SingleStepCodeBuffer=MakeSingleStepCode();
+
+			AddThread(de.dwThreadId,de.u.CreateProcessInfo.hThread);
+		}
+		else if(de.dwDebugEventCode==CREATE_THREAD_DEBUG_EVENT){
+			AddThread(de.dwThreadId,de.u.CreateThread.hThread);
+		}
+		else if(de.dwDebugEventCode==EXIT_PROCESS_DEBUG_EVENT){
+			//プロセスIDをターゲットアプリのメモリから消去
+			SetThreadId_ToProcessMemory(de.dwThreadId,1);
+
+			//"スレッド(&H%X)はコード &H%X で終了しました。\r\n"
+			sprintf(temporary,STRING_DEBUG_THREADFINISH,de.dwThreadId,de.u.ExitProcess.dwExitCode);
+			DebugMessage(temporary);
+
+			//"デバッグは正常に終了しました。"
+			MakeMessageText(temporary,STRING_DEBUG_FINISH,0);
+			SetDlgItemText(hMainDlg,IDC_MESSAGE,temporary);
+			if(bClipCompileView) InvalidateRect(GetDlgItem(hMainDlg,IDC_PROGRESS),NULL,1);
+
+			//"プログラムはコード &H%X で終了しました。\r\n"
+			sprintf(temporary,STRING_DEBUG_PROCESSFINISH,de.u.ExitProcess.dwExitCode);
+			DebugMessage(temporary);
+			break;
+		}
+		else if(de.dwDebugEventCode==EXIT_THREAD_DEBUG_EVENT){
+			//プロセスIDをターゲットアプリのメモリから消去
+			SetThreadId_ToProcessMemory(de.dwThreadId,1);
+
+			//"スレッド(&H%X)はコード &H%X で終了しました。\r\n"
+			sprintf(temporary,STRING_DEBUG_THREADFINISH,de.dwThreadId,de.u.ExitThread.dwExitCode);
+			DebugMessage(temporary);
+
+			//以前にシングルステップ実行をした場合
+			//ステップ実行を解除
+			if(dwStepRun){
+				extern HWND hDebugWnd;
+				if(hDebugWnd) SendMessage(hDebugWnd,WM_VARLIST_CLOSE,0,0);
+
+				for(i4=0;i4<DebugThreadNum;i4++){
+					if(de.dwThreadId==lpdwDebugThreadID[i4]) break;
+				}
+				Context.ContextFlags=CONTEXT_CONTROL;
+				GetThreadContext(lphDebugThread[i4],&Context);
+
+				ReleaseSingleStep(lphDebugThread[i4],&Context);
+			}
+
+			for(i2=0;i2<DebugThreadNum;i2++){
+				if(lpdwDebugThreadID[i2]==de.dwThreadId){
+					DebugThreadNum--;
+					for(;i2<DebugThreadNum;i2++){
+						lpdwDebugThreadID[i2]=lpdwDebugThreadID[i2+1];
+						lphDebugThread[i2]=lphDebugThread[i2+1];
+					}
+					break;
+				}
+			}
+		}
+		else if(de.dwDebugEventCode==OUTPUT_DEBUG_STRING_EVENT){
+			ReadProcessMemory(hDebugProcess,(void *)de.u.DebugString.lpDebugStringData,temporary,de.u.DebugString.nDebugStringLength,&stAccBytes);
+			DebugMessage(temporary);
+		}
+		else if(de.dwDebugEventCode==EXCEPTION_DEBUG_EVENT){
+
+			//初回例外は無視
+			if(bFirstBreak){
+				bFirstBreak=0;
+				goto NextContinue;
+			}
+
+			if(de.u.Exception.ExceptionRecord.ExceptionCode==STATUS_INVALID_HANDLE){
+
+				//"スレッド(&H%X)でハンドル違反がありました(EPI=&H%08X)。\r\n"
+				sprintf(temporary,STRING_DEBUG_THREAD_INVALID_HANDLE,de.dwThreadId,(LONG_PTR)de.u.Exception.ExceptionRecord.ExceptionAddress);
+				DebugMessage(temporary);
+
+				MessageBeep(MB_ICONEXCLAMATION);
+				ShowVarList(&de,1);
+				break;
+			}
+			if(de.u.Exception.ExceptionRecord.ExceptionCode==EXCEPTION_ACCESS_VIOLATION){
+
+				//"スレッド(&H%X)でアクセス違反がありました(EPI=&H%08X)。\r\n"
+				sprintf(temporary,STRING_DEBUG_THREAD_ACCESSVIOLATION,de.dwThreadId,(LONG_PTR)de.u.Exception.ExceptionRecord.ExceptionAddress);
+				DebugMessage(temporary);
+
+				MessageBeep(MB_ICONEXCLAMATION);
+				ShowVarList(&de,1);
+				break;
+			}
+			else if(de.u.Exception.ExceptionRecord.ExceptionCode==EXCEPTION_BREAKPOINT){
+				i3=dwStepRun;
+
+				for(i4=0;i4<DebugThreadNum;i4++){
+					if(de.dwThreadId==lpdwDebugThreadID[i4]) break;
+				}
+				Context.ContextFlags=CONTEXT_CONTROL;
+				GetThreadContext(lphDebugThread[i4],&Context);
+
+				if(i3==0||
+					i3&&(!(ImageBase+MemPos_CodeSection<=Context.Rip&&Context.Rip<ImageBase+MemPos_CodeSection+FileSize_CodeSection))
+					){
+					//"スレッド(&H%X)のブレーク ポイント(EPI=&H%08X)。\r\n"
+					sprintf(temporary,STRING_DEBUG_BREAKPOINT,de.dwThreadId,(LONG_PTR)de.u.Exception.ExceptionRecord.ExceptionAddress);
+					DebugMessage(temporary);
+				}
+
+				ShowVarList(&de,0);
+
+				//以前にシングルステップ実行をした場合
+				//ステップ実行を解除
+				if(i3) ReleaseSingleStep(lphDebugThread[i4],&Context);
+
+				if(dwStepRun){
+					//新たにシングルステップを行う場合
+
+					if(ImageBase+MemPos_CodeSection <= Context.Rip &&
+						Context.Rip < ImageBase+MemPos_CodeSection+FileSize_CodeSection){
+						//Debug命令語が続く場合はシングルステップは不要になるので、無効にする
+						//（オリジナルコード内のみ）
+						if(OpBuffer[Context.Rip-ImageBase-MemPos_CodeSection]==(char)0xCC)
+							dwStepRun=0;
+					}
+					if(dwStepRun==1){
+						//ステップイン
+StepIn:
+						//シングルステップON
+						WriteProcessMemory(hDebugProcess,
+							(void *)(LONG_PTR)(ImageBase+MemPos_CodeSection),
+							SingleStepCodeBuffer,FileSize_CodeSection,&stAccBytes);
+
+						//次の命令語のブレーク命令は解除しておく（シングルステップ実行後のみ）
+						//（オリジナルコード内のみ）
+						if(i3&&ImageBase+MemPos_CodeSection<=Context.Rip&&Context.Rip<ImageBase+MemPos_CodeSection+FileSize_CodeSection)
+							WriteProcessMemory(hDebugProcess,(void *)Context.Rip,&OpBuffer[Context.Rip-ImageBase-MemPos_CodeSection],1,&stAccBytes);
+
+						//他のスレッドを一時中断
+						for(i4=0;i4<DebugThreadNum;i4++){
+							if(de.dwThreadId!=lpdwDebugThreadID[i4])
+								SuspendThread(lphDebugThread[i4]);
+						}
+					}
+					else if(dwStepRun==2){
+						//ステップオーバー
+
+						BOOL bRet;
+						bRet=ReadProcessMemory(hDebugProcess,
+							(void *)Context.Rip,
+							temporary,
+							5,
+							&stAccBytes);
+						if(!bRet) MessageBox(hMainDlg,"プロセスメモリーの読み込みに失敗","error",MB_OK);
+
+						extern SUBINFO *pSub_DebugSys_EndProc;
+						if((BYTE)temporary[0]==0xE8&&
+							*((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc->CompileAddress)-(long)Context.Rip){
+							//プロシージャの終端位置の場合はステップインを行う
+							goto StepIn;
+						}
+
+						//スレッドのプロシージャ実行状況を取得
+						bRet=ReadProcessMemory(hDebugProcess,
+							(void *)(LONG_PTR)(ImageBase+MemPos_RWSection),
+							dwData,sizeof(DWORD)*256,&stAccBytes);
+						if(!bRet) MessageBox(hMainDlg,"プロセスメモリーの読み込みに失敗","error",MB_OK);
+						for(i2=0;;i2++){
+							if(dwData[i2]==de.dwThreadId) break;
+						}
+						GetDebugThreadInfo(i2);
+
+						extern int GlobalOpBufferSize;
+						extern DEBUG_PROCINFO dpi;
+						if(ImageBase+MemPos_CodeSection<=dpi.lpqwObp[dpi.num]&&
+							dpi.lpqwObp[dpi.num]<ImageBase+MemPos_CodeSection+GlobalOpBufferSize){
+							//シングルステップON
+							WriteProcessMemory(hDebugProcess,
+								(void *)(LONG_PTR)(ImageBase+MemPos_CodeSection),
+								SingleStepCodeBuffer,
+								GlobalOpBufferSize,
+								&stAccBytes);
+						}
+						else{
+							//プロシージャを識別
+							psi=GetSubFromObp(dpi.lpqwObp[dpi.num]);
+
+							//シングルステップON
+							WriteProcessMemory(hDebugProcess,
+								(void *)(LONG_PTR)rva_to_real(psi->CompileAddress),
+								SingleStepCodeBuffer+psi->CompileAddress,
+								psi->EndOpAddr-psi->CompileAddress,
+								&stAccBytes);
+						}
+						DeleteDebugThreadInfo();
+
+						//次の命令語のブレーク命令は解除しておく（シングルステップ実行後のみ）
+						//（オリジナルコード内のみ）
+						if(i3&&ImageBase+MemPos_CodeSection<=Context.Rip&&Context.Rip<ImageBase+MemPos_CodeSection+FileSize_CodeSection)
+							WriteProcessMemory(hDebugProcess,(void *)Context.Rip,&OpBuffer[Context.Rip-ImageBase-MemPos_CodeSection],1,&stAccBytes);
+
+						//他のスレッドを一時中断
+						for(i4=0;i4<DebugThreadNum;i4++){
+							if(de.dwThreadId!=lpdwDebugThreadID[i4])
+								SuspendThread(lphDebugThread[i4]);
+						}
+					}
+				}
+			}
+			else if(de.u.Exception.ExceptionRecord.ExceptionCode==STATUS_INTEGER_DIVIDE_BY_ZERO){
+				//"0による除算が行われました。スレッド(&H%X) ブレーク ポイント(EPI=&H%08X)。\r\n"
+				sprintf(temporary,STRING_DEBUG_DIVIDE_BY_ZERO,de.dwThreadId,(LONG_PTR)de.u.Exception.ExceptionRecord.ExceptionAddress);
+				DebugMessage(temporary);
+
+				ShowVarList(&de,1);
+				break;
+			}
+			else{
+				//"例外処理\ncode:%X"
+				sprintf(temporary,STRING_DEBUG_ERROR,de.u.Exception.ExceptionRecord.ExceptionCode);
+				MessageBox(0,temporary,"ActiveBasic Debug",0);
+			}
+		}
+NextContinue:
+		ContinueDebugEvent(de.dwProcessId,de.dwThreadId,DBG_CONTINUE);
+	}
+
+	//シングルステップ用のコードバッファを解放
+	if(SingleStepCodeBuffer) HeapDefaultFree(SingleStepCodeBuffer);
+
+	extern HWND hDebugWnd;
+	if(hDebugWnd) SendMessage(hDebugWnd,WM_COMMAND,IDCANCEL,0);
+
+	//スレッド情報を解放
+	HeapDefaultFree(lpdwDebugThreadID);
+	HeapDefaultFree(lphDebugThread);
+
+	//デバッグに利用した情報を解放（ReadDebugで確保した情報）
+	DeleteDebugInfo();
+
+	//"閉じる"
+	SetDlgItemText(hMainDlg,IDOK,STRING_CLOSE);
+}
+void DeleteDebugInfo(void){
+	int i2;
+
+	//インクルード情報を解放
+	extern INCLUDEFILEINFO IncludeFileInfo;
+	for(i2=0;i2<IncludeFileInfo.FilesNum;i2++)
+		HeapDefaultFree(IncludeFileInfo.ppFileNames[i2]);
+	HeapDefaultFree(IncludeFileInfo.ppFileNames);
+
+	//グローバル変数に関する情報を解放
+	extern VARIABLE *GlobalVar;
+	HeapDefaultFree(GlobalVar);
+
+	//ローカル変数に関する情報を解放
+	extern SUBINFO **ppSubHash;
+	SUBINFO *psi;
+	for(i2=0;i2<MAX_HASH;i2++){
+		psi=ppSubHash[i2];
+		while(psi){
+			if(psi->bCompile)
+				HeapDefaultFree(psi->pVar);
+
+			psi=psi->pNextData;
+		}
+	}
+
+	//列挙型に関するメモリを解放
+	DeleteEnumInfo();
+
+	//クラスに関するメモリを解放
+	delete pobj_DBClass;
+	pobj_DBClass=0;
+
+	//サブルーチン情報のメモリ解放
+	DeleteSubInfo();
+
+	//定数に関する情報を解放
+	DeleteConstInfo();
+
+	//ソースコードを解放
+	extern char *pBaseBuffer;
+	HeapDefaultFree(pBaseBuffer);
+
+	//コードと行番号の関係を解放
+	extern LINEINFO *pLineInfo;
+	HeapDefaultFree(pLineInfo);
+
+	//コードバッファを解放
+	extern char *OpBuffer;
+	if(OpBuffer){
+		HeapDefaultFree(OpBuffer);
+		OpBuffer=0;
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/FunctionValue.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/FunctionValue.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/FunctionValue.h	(revision 482)
@@ -0,0 +1,33 @@
+/* 関数定数 */
+
+//データ型変換
+#define FUNC_CUDBL	0x0210
+
+//文字列
+#define FUNC_LEN	0x031D
+
+//メモリ操作
+#define FUNC_VARPTR		0x0591
+#define FUNC_OBJPTR		0x0592
+
+//その他
+#define FUNC_ADDRESSOF		0x0619
+#define FUNC_SIZEOF			0x0620
+#define FUNC_DELEGATE_DYNAMICMETHOD_CALL	0x0621
+#define FUNC_DELEGATE_STATICMETHOD_CALL		0x0622
+#define FUNC_SYSTEM_GET_NOW_SCOPE_CATCH_ADDRESS		0x0623
+#define FUNC_SYSTEM_GET_NOW_SCOPE_FINALLY_ADDRESS	0x0624
+#define FUNC_SYSTEM_GET_BP	0x0625
+#define FUNC_SYSTEM_GET_SP	0x0626
+#define FUNC_SYSTEM_GET_COM_VTBL	0x0627
+#define FUNC_SYSTEM_GET_VTBL_LIST	0x0628
+#define FUNC_SYSTEM_GET_DEFAULT_CONSTRUCTOR		0x0629
+#define FUNC_SYSTEM_GET_DESTRUCTOR				0x062A
+
+//ポインタ
+#define FUNC_GETDOUBLE		0x0630
+#define FUNC_GETSINGLE		0x0631
+#define FUNC_GETQWORD		0x0632
+#define FUNC_GETDWORD		0x0634
+#define FUNC_GETWORD		0x0635
+#define FUNC_GETBYTE		0x0636
Index: /trunk/ab5.0/abdev/compiler_x64/MachineFixed.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/MachineFixed.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/MachineFixed.h	(revision 482)
@@ -0,0 +1,57 @@
+//レジスタを示す定数
+#define REG_EAX 1
+#define REG_EBX 2
+#define REG_ECX 3
+#define REG_EDX 4
+#define REG_ESP 5
+#define REG_EBP 6
+
+#define REGISTER_OPERAND(reg) (reg&0x07)
+
+#define REG_NON		-1
+#define REG_RAX		0x00	//reg:000
+#define REG_RCX		0x01	//reg:001
+#define REG_RDX		0x02	//reg:010
+#define REG_RBX		0x03	//reg:011
+#define REG_RSP		0x04	//reg:100
+#define REG_RBP		0x05	//reg:101
+#define REG_RSI		0x06	//reg:110
+#define REG_RDI		0x07	//reg:111
+#define REG_R8		0x08	//reg:000（REXプリフィックス）
+#define REG_R9		0x09	//reg:001（REXプリフィックス）
+#define REG_R10		0x0A	//reg:010（REXプリフィックス）
+#define REG_R11		0x0B	//reg:011（REXプリフィックス）
+#define REG_R12		0x0C	//reg:100（REXプリフィックス）
+#define REG_R13		0x0D	//reg:101（REXプリフィックス）
+#define REG_R14		0x0E	//reg:110（REXプリフィックス）
+#define REG_R15		0x0F	//reg:111（REXプリフィックス）
+
+#define REG_XMM0	0x10	//reg:000
+#define REG_XMM1	0x11	//reg:001
+#define REG_XMM2	0x12	//reg:010
+#define REG_XMM3	0x13	//reg:011
+#define REG_XMM4	0x14	//reg:100
+#define REG_XMM5	0x15	//reg:101
+#define REG_XMM6	0x16	//reg:110
+#define REG_XMM7	0x17	//reg:111
+#define REG_XMM8	0x18	//reg:000
+#define REG_XMM9	0x19	//reg:001
+#define REG_XMM10	0x1A	//reg:010
+#define REG_XMM11	0x1B	//reg:011
+#define REG_XMM12	0x1C	//reg:100
+#define REG_XMM13	0x1D	//reg:101
+#define REG_XMM14	0x1E	//reg:110
+#define REG_XMM15	0x1F	//reg:111
+
+#define IS_XMM_REG(reg) (reg&0x10)
+
+
+//Mod（モード）
+#define MOD_BASE		(char)0x00
+#define MOD_DISP32		(char)0xFF
+#define MOD_BASE_DISP8	(char)0x40
+#define MOD_BASE_DISP32	(char)0x80
+#define MOD_REG				(char)0xC0
+
+#define USE_OFFSET 1
+#define NON_OFFSET 0
Index: /trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp	(revision 482)
@@ -0,0 +1,1670 @@
+#include "stdafx.h"
+
+#include <jenga/include/common/Environment.h>
+#include <jenga/include/common/Path.h>
+#include <jenga/include/common/Directory.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "../BasicCompiler_Common/DebugSection.h"
+#include "Opcode.h"
+
+
+////////////////////////////
+// 特殊関数の構造体ポインタ
+////////////////////////////
+
+// グローバル関数、静的メソッド
+const UserProc
+	*pSub_System_StartupProgram,
+	*pSub_System_GlobalArea,
+	*pSub_DebugSys_StartProc,
+	*pSub_DebugSys_EndProc,
+	*pSub_DebugSys_SaveContext,
+	*pSub_System_GetEip,
+	*pSub_System_InitDllGlobalVariables,
+	*pSub_System_InitStaticLocalVariables,
+	*pSub_System_Call_Destructor_of_GlobalObject,
+	*pSub_System_End,
+	*pSub_pow,
+	*pSub_calloc,
+	*pSub_realloc,
+	*pSub_free,
+	*pSub_System_GC_malloc_ForObject,
+	*pSub_System_GC_malloc_ForObjectPtr,
+	*pSub_System_GC_free_for_SweepingDelete,
+	*pSub_System_AddNeedFreeTempStructure,
+	*pSub_System_FreeTempStructure,
+	*pSubStaticMethod_System_TypeBase_InitializeUserTypes,
+	*pSubStaticMethod_System_TypeBase_InitializeUserTypesForBaseType;
+
+// 動的メソッド
+const UserProc
+	*pUserProc_System_CGarbageCollection_RegisterGlobalRoots;
+
+
+//////////////////////////////
+// 各セクションの位置とサイズ
+int FileSize_CodeSection,
+	FileSize_ExportSection,
+	FileSize_ImportSection,
+	FileSize_DataSection,
+	FileSize_RWSection,
+	FileSize_RSrcSection,
+	FileSize_RelocSection,
+	FileSize_DebugSection;
+int FilePos_CodeSection,
+	FilePos_ExportSection,
+	FilePos_ImportSection,
+	FilePos_DataSection,
+	FilePos_RWSection,
+	FilePos_RSrcSection,
+	FilePos_RelocSection,
+	FilePos_DebugSection;
+int MemSize_CodeSection,
+	MemSize_ExportSection,
+	MemSize_ImportSection,
+	MemSize_DataSection,
+	MemSize_RWSection,
+	MemSize_RSrcSection,
+	MemSize_RelocSection,
+	MemSize_DebugSection;
+int MemPos_CodeSection,
+	MemPos_ExportSection,
+	MemPos_ImportSection,
+	MemPos_DataSection,
+	MemPos_RWSection,
+	MemPos_RSrcSection,
+	MemPos_RelocSection,
+	MemPos_DebugSection;
+int bUse_CodeSection,
+	bUse_ExportSection,
+	bUse_ImportSection,
+	bUse_DataSection,
+	bUse_RWSection,
+	bUse_RSrcSection,
+	bUse_RelocSection,
+	bUse_DebugSection;
+
+
+void Compile(void){
+	extern HWND hMainDlg;
+	extern HWND hOwnerEditor;
+	extern HANDLE hHeap;
+	extern DWORD ImageBase;
+	extern int obp_AllocSize;
+	extern char *basbuf;
+	int i,i2,i3,i4,i5;
+	char temporary[MAX_PATH],*temp2;
+	HANDLE hFile;
+
+
+	//コードセクションのメモリ上の位置
+	MemPos_CodeSection=		0x1000;
+
+	//データセクションのメモリ上の位置（仮定）
+	MemPos_DataSection=		0x10000000;
+
+
+	//エクスポート セクションを利用するかどうか
+	if( compiler.IsDll() ) bUse_ExportSection=1;
+	else bUse_ExportSection=0;
+
+
+	// 静的リンク
+	compiler.StaticLink( compiler.staticLibraries );
+
+
+	//////////////////
+	// データテーブル
+	if( compiler.IsDebug() )
+	{
+		compiler.GetObjectModule().dataTable.Add( (long)0x00000002 );
+	}
+
+
+	//////////////////////
+	// コード生成前の準備
+	//////////////////////
+
+	//重複エラー情報管理のメモリを確保（グローバル領域コンパイル用）
+	extern char **SynonymErrorWords;
+	extern int SynonymErrorNum;
+	SynonymErrorNum=0;
+	SynonymErrorWords=(char **)HeapAlloc(hHeap,0,1);
+
+	//列挙体に関する情報を収集
+	compiler.enumInfoCollection.InitEnum();
+
+	//列挙体からクラスコードを生成
+	char *temp;
+	temp = compiler.enumInfoCollection.GenerateSourceCode();
+	AddSourceCode(temp);
+	HeapDefaultFree(temp);
+
+	// 名前空間情報を取得
+	NamespaceSupporter::CollectNamespaces(
+		compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
+		compiler.GetObjectModule().meta.GetNamespaces()
+	);
+
+	// デリゲートに関する情報を収集
+	{
+		compiler.GetObjectModule().meta.GetDelegates().Collect(
+			compiler.GetObjectModule().GetCurrentSource()
+		);
+		compiler.GetObjectModule().meta.GetDelegates().Iterator_Init();
+
+		// デリゲートからクラスコードを生成
+		std::string tempSource;
+		compiler.GetObjectModule().meta.GetDelegates().GenerateSourceCode( tempSource );
+		AddSourceCode( tempSource.c_str() );
+	}
+
+	//クラス名を取得（詳細情報はGetAllClassInfoで取得）
+	//   CollectProcedures関数の中で参照されるオブジェクト名を事前に取得する。
+	//     ※オブジェクトの内容までは取得しない
+	compiler.GetObjectModule().meta.GetClasses().CollectClassesForNameOnly( compiler.GetObjectModule().GetCurrentSource() );
+
+	//TypeDef情報を初期化
+	compiler.GetObjectModule().meta.GetTypeDefs().CollectTypeDefs();
+
+	/*
+	デリゲートのパラメータを再取得
+	クラス/TypeDefなどの型名前情報がすべて揃ってからでないと
+	型情報に依存するパラメータ情報を取得できないため、ここでの再取得が必要
+	*/
+	compiler.GetObjectModule().meta.GetDelegates().RefleshParameterAndReturnType();
+
+	//定数情報を取得
+	GetConstInfo();
+
+	//サブルーチン（ユーザー定義、DLL関数）の識別子、アドレスを取得
+	compiler.pCompilingClass = NULL;
+	CollectProcedures(
+		compiler.GetObjectModule().GetCurrentSource(),
+		compiler.GetObjectModule().meta.GetUserProcs(),
+		compiler.GetObjectModule().meta.GetDllProcs()
+	);
+
+	// クラス情報を取得（※注 - CollectProceduresの後に呼び出す）
+	compiler.GetObjectModule().meta.GetClasses().GetAllClassInfo();
+
+	// サブルーチン（ユーザー定義、DLL関数）のイテレータの準備
+	compiler.GetObjectModule().meta.GetUserProcs().Iterator_Init();
+	compiler.GetObjectModule().meta.GetDllProcs().Iterator_Init();
+
+
+	//コードと行番号の関係
+	extern SourceLines oldSourceLines;
+	oldSourceLines.clear();
+
+
+	///////////////////////////
+	// 最低限必要な関数を取得
+	///////////////////////////
+	cp=-1;
+
+	if(pSub_System_StartupProgram=GetSubHash("_System_StartupProgram",1))
+		pSub_System_StartupProgram->Using();
+
+	if(pSub_System_GlobalArea=GetSubHash(compiler.globalAreaProcName.c_str(),1))
+	{
+		pSub_System_GlobalArea->Using();
+		pSub_System_GlobalArea->ThisIsAutoGenerationProc();
+	}
+
+	if(pSub_DebugSys_StartProc=GetSubHash("_DebugSys_StartProc",1))
+		pSub_DebugSys_StartProc->Using();
+
+	if(pSub_DebugSys_EndProc=GetSubHash("_DebugSys_EndProc",1))
+		pSub_DebugSys_EndProc->Using();
+
+	if(pSub_DebugSys_SaveContext=GetSubHash("_DebugSys_SaveContext",1))
+		pSub_DebugSys_SaveContext->Using();
+
+	if(pSub_System_GetEip=GetSubHash("_System_GetEip",1)){
+		pSub_System_GetEip->Using();
+		pSub_System_GetEip->ThisIsSystemProc();
+	}
+
+	if(pSub_System_InitDllGlobalVariables=GetSubHash("_System_InitDllGlobalVariables",1)){
+		pSub_System_InitDllGlobalVariables->Using();
+		pSub_System_InitDllGlobalVariables->ThisIsSystemProc();
+	}
+
+	if(pSub_System_InitStaticLocalVariables=GetSubHash("_System_InitStaticLocalVariables",1)){
+		pSub_System_InitStaticLocalVariables->Using();
+		pSub_System_InitStaticLocalVariables->ThisIsSystemProc();
+	}
+
+	if(pSub_System_Call_Destructor_of_GlobalObject=GetSubHash("_System_Call_Destructor_of_GlobalObject",1)){
+		pSub_System_Call_Destructor_of_GlobalObject->Using();
+		pSub_System_Call_Destructor_of_GlobalObject->ThisIsSystemProc();
+	}
+
+	if(pSub_System_End=GetSubHash("_System_End",1)){
+		pSub_System_End->Using();
+	}
+
+	if(pSub_pow=GetSubHash("pow",1))
+		pSub_pow->Using();
+
+	if(pSub_calloc=GetSubHash("calloc",1))
+		pSub_calloc->Using();
+
+	if(pSub_realloc=GetSubHash("realloc",1))
+		pSub_realloc->Using();
+
+	if(pSub_free=GetSubHash("free",1))
+		pSub_free->Using();
+
+	if( pSub_System_GC_malloc_ForObject = GetSubHash( "_System_GC_malloc_ForObject",1 ) )
+		pSub_System_GC_malloc_ForObject->Using();
+
+	if( pSub_System_GC_malloc_ForObjectPtr = GetSubHash( "_System_GC_malloc_ForObjectPtr",1 ) )
+		pSub_System_GC_malloc_ForObjectPtr->Using();
+
+	if( pSub_System_GC_free_for_SweepingDelete = GetSubHash( "_System_GC_free_for_SweepingDelete",1 ) )
+		pSub_System_GC_free_for_SweepingDelete->Using();
+
+	if( pSub_System_AddNeedFreeTempStructure = GetSubHash( "_System_AddNeedFreeTempStructure",1 ) )
+	{
+		pSub_System_AddNeedFreeTempStructure->Using();
+	}
+	if( pSub_System_FreeTempStructure = GetSubHash( "_System_FreeTempStructure",1 ) )
+	{
+		pSub_System_FreeTempStructure->Using();
+	}
+
+	if( pSubStaticMethod_System_TypeBase_InitializeUserTypes = GetSubHash( "ActiveBasic.Core._System_TypeBase.InitializeUserTypes",1 ) ){
+		pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using();
+		pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsAutoGenerationProc();
+	}
+
+	if( pSubStaticMethod_System_TypeBase_InitializeUserTypesForBaseType = GetSubHash( "ActiveBasic.Core._System_TypeBase.InitializeUserTypesForBaseType",1 ) ){
+		pSubStaticMethod_System_TypeBase_InitializeUserTypesForBaseType->Using();
+		pSubStaticMethod_System_TypeBase_InitializeUserTypesForBaseType->ThisIsAutoGenerationProc();
+	}
+
+	if( pUserProc_System_CGarbageCollection_RegisterGlobalRoots = GetClassMethod( "_System_CGarbageCollection", "RegisterGlobalRoots" ) ){
+		pUserProc_System_CGarbageCollection_RegisterGlobalRoots->Using();
+		pUserProc_System_CGarbageCollection_RegisterGlobalRoots->ThisIsAutoGenerationProc();
+	}
+
+	//リロケーション情報
+	pobj_Reloc=new CReloc();
+
+	//レジスタのブロッキングを管理するためのオブジェクトを生成
+	pobj_BlockReg=new CBlockReg;
+
+	//レキシカルスコープ情報を初期化
+	compiler.codeGenerator.lexicalScopes.Init(0);
+
+
+	/////////////////////////////////////////////////////////////////
+	// デバッグコンパイル用のログを生成する
+	/////////////////////////////////////////////////////////////////
+#ifdef _DEBUG
+	{
+		ofstream ofs("middle_code.txt");
+		ofs << basbuf << endl;
+		ofs.close();
+	}
+#endif
+
+
+	//////////////////////
+	// グローバル実行領域
+	//////////////////////
+
+	cp=-1;
+	UserProc::CompileStartForGlobalArea();
+
+	if( !compiler.IsDll() ){
+		// 名前空間が初期化されているかをチェック
+		if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
+			compiler.errorMessenger.OutputFatalError();
+		}
+
+		//ラベル管理オブジェクトを初期化
+		compiler.codeGenerator.gotoLabels.clear();
+
+		//Gotoラベルスケジュール
+		compiler.codeGenerator.gotoLabelSchedules.clear();
+
+		//With情報のメモリを確保
+		extern WITHINFO WithInfo;
+		WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
+		WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
+		WithInfo.num=0;
+
+		//Continueアドレスを初期化
+		compiler.codeGenerator.ClearContinueArea();
+
+		//スタックフレーム管理用クラスを選択
+		pobj_sf=new StackFrame();
+
+		// コード生成対象を選択
+		compiler.codeGenerator.Select( compiler.GetObjectModule().globalNativeCode );
+
+		trace_for_sourcecodestep( "★★★ グローバル領域のコンパイルを開始" );
+
+
+		//未完成
+		//breakpoint;
+
+		if( compiler.IsCore() )
+		{
+			//sub rsp,スタックフレームサイズ
+			compiler.codeGenerator.op_sub_RV( sizeof(_int64), REG_RSP, 0x108 );
+
+			if( compiler.IsDebug() )
+			{
+				//デバッグ用の変数を定義
+				DebugVariable();
+			}
+
+			//GC用の変数を定義
+			InitGCVariables();
+
+			//_System_StartupProgramの呼び出し
+			compiler.codeGenerator.op_call(pSub_System_StartupProgram);
+		}
+
+		// _System_GlobalArea の呼び出し
+		compiler.codeGenerator.op_call( pSub_System_GlobalArea );
+
+
+		if( !compiler.IsStaticLibrary() )
+		{
+			///////////////////////////////////////
+			// グローバル文字列変数の解放処理
+			///////////////////////////////////////
+
+			//call _System_End
+			extern const UserProc *pSub_System_End;
+			compiler.codeGenerator.op_call(pSub_System_End);
+
+
+			//add rsp,スタックフレームサイズ
+			compiler.codeGenerator.op_add_RV( REG_RSP, 0x108 );
+
+			//xor rax,rax（raxを0に初期化する）
+			compiler.codeGenerator.op_zero_reg(REG_RAX);
+
+			//ret
+			compiler.codeGenerator.op_ret();
+		}
+
+		//スタックフレームスケジュールを実行
+		pobj_sf->RunningSchedule( 0x100 );
+		delete pobj_sf;
+		pobj_sf=0;
+
+		//グローバル実行領域のコードサイズ
+		extern int GlobalOpBufferSize;
+		GlobalOpBufferSize = compiler.linker.GetNativeCode().GetSize();
+
+		//With情報のメモリを解放
+		for(i=0;i<WithInfo.num;i++){
+			compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i]);
+			HeapDefaultFree(WithInfo.ppName[i]);
+		}
+		HeapDefaultFree(WithInfo.ppName);
+		HeapDefaultFree(WithInfo.pWithCp);
+
+		// 名前空間が正しく閉じられているかをチェック
+		if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
+			compiler.errorMessenger.Output(63,NULL,-1);
+		}
+
+	}
+	else{
+		////////////////
+		// DLLの場合
+		////////////////
+
+
+	}
+
+	//重複エラー情報管理のメモリを解放（グローバル領域用）
+	for(i=0;i<SynonymErrorNum;i++) HeapDefaultFree(SynonymErrorWords[i]);
+	HeapDefaultFree(SynonymErrorWords);
+
+
+	StepCompileProgress();
+
+
+	/////////////////////
+	// ローカル実行領域
+	/////////////////////
+
+	//プロシージャをコンパイル開始
+	cp=0;
+	CompileLocal();
+
+	// 終了
+	///////////////////////
+
+	StepCompileProgress();
+
+
+	//レジスタのブロッキングを管理するためのオブジェクトを破棄
+	delete pobj_BlockReg;
+
+	//ネイティブコード生成はここまで
+	//////////////////////////////////////////////////////////
+
+
+
+	trace( "コード生成が終了しました。" );
+
+
+	if( compiler.IsStaticLibrary() )
+	{
+		// 静的リンクライブラリ
+
+		// 格納先ディレクトリを作る
+		Jenga::Common::Path path( program.GetOutputFilePath() );
+		Jenga::Common::Directory dir( path.GetDriveName() + path.GetDirName(), true );
+
+		// 書き込む
+		if( !compiler.GetObjectModule().Write( program.GetOutputFilePath() ) )
+		{
+			MessageBox(0,"XML書き込みに失敗","test",0);
+		}
+		return;
+	}
+
+	if( !compiler.errorMessenger.HasError() )
+	{
+		compiler.messenger.Output( "リンク中..." );
+	}
+
+
+	compiler.linker.Link( compiler.GetObjectModule() );
+
+	extern SourceLines oldSourceLines;
+	oldSourceLines = compiler.linker.GetNativeCode().GetSourceLines();
+
+
+	/////////////////////////////////////////////////////////////////
+	// vtblの構築
+	/////////////////////////////////////////////////////////////////
+
+	compiler.GetObjectModule().meta.GetClasses().GenerateVTables();
+
+
+
+	////////////////////////////////
+	// ここで一旦ログを取る
+	////////////////////////////////
+	Diagnose();
+
+
+
+	////////////////////////////////
+	// 使用するDLL関数のチェック
+	////////////////////////////////
+	compiler.GetObjectModule().meta.GetDllProcs().Iterator_Reset();
+	while( compiler.GetObjectModule().meta.GetDllProcs().Iterator_HasNext() )
+	{
+		const DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().Iterator_GetNext();
+
+		if( !pDllProc->IsUsing() ){
+			continue;
+		}
+/*
+		//エラーチェック
+		HINSTANCE hLib;
+		hLib=LoadLibrary( pDllProc->GetDllFileName().c_str() );
+		if(!hLib){
+			char temp2[MAX_PATH],temp3[MAX_PATH];
+			_splitpath(program.GetOutputFilePath().c_str(),temp2,temp3,NULL,NULL);
+			lstrcat(temp2,temp3);
+			lstrcpy(temp3,pDllProc->GetDllFileName().c_str());
+			GetFullPath(temp3,temp2);
+			hLib=LoadLibrary(temp3);
+
+			if(!hLib){
+				compiler.errorMessenger.Output(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
+			}
+		}
+
+		if(hLib){
+			if(!GetProcAddress(hLib,pDllProc->GetAlias().c_str())){
+				FreeLibrary(hLib);
+				compiler.errorMessenger.Output(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
+			}
+			FreeLibrary(hLib);
+		}
+*/
+	}
+
+
+
+	/////////////////////////////
+	// リソースデータを読み込む
+	/////////////////////////////
+	extern char ResourceFileName[MAX_PATH];
+	GetResourceData(ResourceFileName);
+
+
+	//////////////////////////////
+	// エクスポート情報（DLLのみ）
+	//////////////////////////////
+	IMAGE_EXPORT_DIRECTORY ImageExportDirectory;
+	DWORD *lpdwExportAddressTable;
+	DWORD *lpdwExportNamePointerTable;
+	WORD *lpwExportOrdinalTable;
+	char lpExportNames[8192];
+	int ExportNamesLength;
+	int ExportNum;
+	int DllMain_EntryPoint;
+
+	DllMain_EntryPoint=-1;
+	ExportNum=0;
+	ExportNamesLength=0;
+	lpdwExportAddressTable=(DWORD *)HeapAlloc(hHeap,0,1);
+	lpdwExportNamePointerTable=(DWORD *)HeapAlloc(hHeap,0,1);
+	lpwExportOrdinalTable=(WORD *)HeapAlloc(hHeap,0,1);
+
+	if(bUse_ExportSection){
+		_splitpath(program.GetOutputFilePath().c_str(),NULL,NULL,lpExportNames,temporary);
+		lstrcat(lpExportNames,temporary);
+		ExportNamesLength=lstrlen(lpExportNames)+1;
+
+		while(1)
+		{
+			UserProc *pUserProc = NULL;
+
+			//辞書順にサーチ
+			temporary[0]=0;
+			compiler.GetObjectModule().meta.GetUserProcs().Iterator_Reset();
+			while( compiler.GetObjectModule().meta.GetUserProcs().Iterator_HasNext() )
+			{
+				UserProc *pTempUserProc = compiler.GetObjectModule().meta.GetUserProcs().Iterator_GetNext();
+				if(pTempUserProc->IsExport()){
+					if(temporary[0]=='\0'){
+						lstrcpy(temporary,pTempUserProc->GetName().c_str());
+						pUserProc = pTempUserProc;
+					}
+					else{
+						i3=lstrlen(temporary);
+						i4=(int)pTempUserProc->GetName().size();
+						if(i3<i4) i3=i4;
+						if(memcmp(temporary,pTempUserProc->GetName().c_str(),i3)>0){
+							lstrcpy(temporary,pTempUserProc->GetName().c_str());
+							pUserProc = pTempUserProc;
+						}
+					}
+				}
+			}
+			if( pUserProc == NULL )
+			{
+				break;
+			}
+
+			pUserProc->ExportOff();
+
+			if( pUserProc->GetName() == "DllMain" ){
+				DllMain_EntryPoint = pUserProc->GetBeginOpAddress();
+			}
+
+			lpdwExportAddressTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportAddressTable,(ExportNum+1)*sizeof(DWORD));
+			lpdwExportAddressTable[ExportNum] = pUserProc->GetBeginOpAddress();
+
+			lpdwExportNamePointerTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportNamePointerTable,(ExportNum+1)*sizeof(DWORD));
+			lpdwExportNamePointerTable[ExportNum]=ExportNamesLength;
+
+			lpwExportOrdinalTable=(WORD *)HeapReAlloc(hHeap,0,lpwExportOrdinalTable,(ExportNum+1)*sizeof(WORD));
+			lpwExportOrdinalTable[ExportNum]=ExportNum;
+
+			lstrcpy(lpExportNames+ExportNamesLength,pUserProc->GetName().c_str());
+			ExportNamesLength+=lstrlen(lpExportNames+ExportNamesLength)+1;
+
+			ExportNum++;
+		}
+		for(i=0;i<ExportNum;i++){
+			lpdwExportNamePointerTable[i]+=
+				sizeof(IMAGE_EXPORT_DIRECTORY)+	//エクスポートディレクトリテーブルを飛び越す
+				ExportNum*sizeof(DWORD)+		//エクスポート アドレス テーブルを飛び越す
+				ExportNum*sizeof(DWORD)+		//エクスポート名ポインタ テーブルを飛び越す
+				ExportNum*sizeof(WORD);			//エクスポート序数テーブルを飛び越す
+		}
+
+		ImageExportDirectory.Characteristics=0;
+		ImageExportDirectory.TimeDateStamp=(DWORD)time(NULL);
+		ImageExportDirectory.MajorVersion=0;
+		ImageExportDirectory.MinorVersion=0;
+		ImageExportDirectory.Name=sizeof(IMAGE_EXPORT_DIRECTORY)+
+			ExportNum*sizeof(DWORD)+	//エクスポート アドレス テーブルを飛び越す
+			ExportNum*sizeof(DWORD)+	//エクスポート名ポインタ テーブルを飛び越す
+			ExportNum*sizeof(WORD);		//エクスポート序数テーブルを飛び越す
+		ImageExportDirectory.Base=1;
+		ImageExportDirectory.NumberOfFunctions=ExportNum;
+		ImageExportDirectory.NumberOfNames=ExportNum;
+		ImageExportDirectory.AddressOfFunctions=sizeof(IMAGE_EXPORT_DIRECTORY);
+		ImageExportDirectory.AddressOfNames=ImageExportDirectory.AddressOfFunctions+ExportNum*sizeof(DWORD);
+		ImageExportDirectory.AddressOfNameOrdinals=ImageExportDirectory.AddressOfNames+ExportNum*sizeof(DWORD);
+	}
+
+
+	/////////////////////
+	//インポートDLL情報
+	/////////////////////
+
+	/*
+	インポート アドレス テーブル（ルックアップと同じ内容だが、プログラム実行時に実行アドレスに書き換えられる）
+	ルックアップ テーブル（ヒントを示すRVA）
+	IMAGE_IMPORT_DESCRIPTOR1[size=0x14]	インポートヘッダ
+	IMAGE_IMPORT_DESCRIPTOR2[size=0x14]
+	IMAGE_IMPORT_DESCRIPTOR3[size=0x14]
+	...
+	Dll名1[size=0x10]
+	Dll名2[size=0x10]
+	Dll名3[size=0x10]
+	...
+	ヒントテーブル（関数名を羅列したもの）
+	*/
+
+	/*
+	IMAGE_IMPORT_DESCRIPTOR1[size=0x14]	インポートヘッダ
+	IMAGE_IMPORT_DESCRIPTOR2[size=0x14]
+	IMAGE_IMPORT_DESCRIPTOR3[size=0x14]
+	...
+	Dll名1[size=0x10]
+	Dll名2[size=0x10]
+	Dll名3[size=0x10]
+	...
+	ルックアップ テーブル（ヒントを示すRVA）
+	ヒントテーブル
+	インポート アドレス テーブル（ルックアップと同じ内容だが、プログラム実行時に実行アドレスに書き換えられる）
+	*/
+
+	char **ppDllNames=(char **)HeapAlloc(hHeap,0,1);
+
+	int ImportDllNum=0;
+
+	compiler.GetObjectModule().meta.GetDllProcs().Iterator_Reset();
+	while( compiler.GetObjectModule().meta.GetDllProcs().Iterator_HasNext() )
+	{
+		const DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().Iterator_GetNext();
+
+		if( !pDllProc->IsUsing() ){
+			continue;
+		}
+
+		if( pDllProc->GetDllFileName().size() > 16 ){
+			compiler.errorMessenger.Output(7,NULL,cp);
+			break;
+		}
+		for(i2=0;i2<ImportDllNum;i2++){
+			if( pDllProc->GetDllFileName() == ppDllNames[i2] ){
+				break;
+			}
+		}
+		if(i2==ImportDllNum){
+			ppDllNames=(char **)HeapReAlloc(hHeap,0,ppDllNames,(ImportDllNum+1)*sizeof(char **));
+			ppDllNames[ImportDllNum]=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,16);
+			lstrcpy(ppDllNames[ImportDllNum],pDllProc->GetDllFileName().c_str());
+			ImportDllNum++;
+		}
+	}
+
+	//IMAGE_IMPORT_DESCRIPTOR、及びルックアップ テーブル サイズの計算
+	IMAGE_IMPORT_DESCRIPTOR *pImportDescriptor;
+	int LookupSize;
+	LookupSize=0;
+	pImportDescriptor=(IMAGE_IMPORT_DESCRIPTOR *)HeapAlloc(hHeap,0,(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR));
+	for(i=0;i<ImportDllNum;i++){
+		//IMAGE_IMPORT_DESCRIPTOR
+		pImportDescriptor[i].OriginalFirstThunk=LookupSize;	//※すぐ下で再計算
+		pImportDescriptor[i].TimeDateStamp=0;
+		pImportDescriptor[i].ForwarderChain=0;
+		pImportDescriptor[i].Name=i*0x10;	//※すぐ下で再計算
+
+		compiler.GetObjectModule().meta.GetDllProcs().Iterator_Reset();
+		while( compiler.GetObjectModule().meta.GetDllProcs().Iterator_HasNext() )
+		{
+			const DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().Iterator_GetNext();
+
+			if( !pDllProc->IsUsing() ){
+				continue;
+			}
+
+			if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+				//ルックアップデータのサイズを追加
+				LookupSize+=sizeof(_int64);
+			}
+		}
+		LookupSize+=sizeof(_int64);	//NULL用
+	}
+	memset(&pImportDescriptor[i],0,sizeof(IMAGE_IMPORT_DESCRIPTOR));
+	for(i=0;i<ImportDllNum;i++){
+		//インポートアドレステーブル分の差分を追加
+		pImportDescriptor[i].OriginalFirstThunk+=LookupSize;
+
+		//DLL名への差分を追加
+		pImportDescriptor[i].Name+=
+			LookupSize+			//インポート アドレス テーブル
+			LookupSize+			//ルックアップテーブル
+			(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR);	//IMAGE_IMPORT_DESCRIPTOR
+	}
+
+	//ルックアップ テーブル、ヒント テーブル
+	unsigned _int64 *pLookupTable;
+	pLookupTable=(unsigned _int64 *)HeapAlloc(hHeap,0,LookupSize*sizeof(_int64)+1);
+	char *pHintTable;
+	int HintSize,HintAllocSize;
+	HintSize=0;
+	HintAllocSize=128*2;
+	pHintTable=(char *)HeapAlloc(hHeap,0,HintAllocSize);
+	for(i=0,i5=0;i<ImportDllNum;i++){
+		compiler.GetObjectModule().meta.GetDllProcs().Iterator_Reset();
+		while( compiler.GetObjectModule().meta.GetDllProcs().Iterator_HasNext() )
+		{
+			DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().Iterator_GetNext();
+
+			if( !pDllProc->IsUsing() ){
+				continue;
+			}
+
+			if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+				//ルックアップの位置をセット（後にインポート アドレス テーブルにセットしなおされる）
+				pDllProc->SetLookupAddress( i5*sizeof(_int64) );
+
+				//ルックアップ テーブルの値をセット
+				pLookupTable[i5++]=
+					LookupSize+			//インポート アドレス テーブル
+					LookupSize+			//ルックアップテーブル
+					(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR)+	//IMAGE_IMPORT_DESCRIPTOR
+					ImportDllNum*0x10+	//DLL名の羅列
+					HintSize;			//ヒント名へのオフセット
+
+				//ヒント テーブル
+				pHintTable[HintSize++]=0;
+				pHintTable[HintSize++]=0;
+				lstrcpy(pHintTable+HintSize,pDllProc->GetAlias().c_str());
+				i4=(int)pDllProc->GetAlias().size();
+				HintSize+=i4+1;
+				if(i4%2==0) pHintTable[HintSize++]=0;
+
+				if(HintAllocSize<HintSize+128){
+					HintAllocSize+=128;
+					pHintTable=(char *)HeapReAlloc(hHeap,0,pHintTable,HintAllocSize);
+				}
+			}
+		}
+		pLookupTable[i5++]=0;
+	}
+
+
+	if( compiler.IsDll() ){
+		//DLLの場合はリロケーション情報を仮生成
+		//※正式な生成は各セクションのメモリ上のサイズが決定してから再度行う。
+		pobj_Reloc->ResetRelocBuffer();
+	}
+
+
+
+	//グローバル変数情報を扱う構造体も初期バッファの有無による配置を行う
+	//（デバッグ情報で利用される）
+	BOOST_FOREACH( Variable *pVar, compiler.GetObjectModule().meta.GetGlobalVars() ){
+		if(pVar->GetOffsetAddress()&0x80000000){
+			pVar->SetOffsetAddress(
+				(pVar->GetOffsetAddress()&0x7FFFFFFF)
+				+ compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()
+			);
+		}
+	}
+
+
+
+	////////////////////////////////////
+	// デバッグセクションを生成
+	////////////////////////////////////
+
+	//デバッグセクションを生成
+	CDebugSection *pobj_DebugSection;
+	pobj_DebugSection=new CDebugSection();
+	if( compiler.IsDebug() && !compiler.errorMessenger.HasError() )
+	{
+		compiler.messenger.Output( "デバッグ情報を生成しています。" );
+
+		pobj_DebugSection->make();
+
+		compiler.messenger.Output( "デバッグ情報の生成が完了しました。" );
+	}
+
+
+
+	/////////////////////////////////////
+	// 各セクションの位置とサイズを計算
+	/////////////////////////////////////
+
+	//コードセッションのファイル上のサイズ
+	if(compiler.linker.GetNativeCode().GetSize()%FILE_ALIGNMENT)
+	{
+		FileSize_CodeSection =
+			compiler.linker.GetNativeCode().GetSize()
+			+ (FILE_ALIGNMENT-compiler.linker.GetNativeCode().GetSize()%FILE_ALIGNMENT);
+	}
+	else
+	{
+		FileSize_CodeSection = compiler.linker.GetNativeCode().GetSize();
+	}
+	if(FileSize_CodeSection) bUse_CodeSection=1;
+	else bUse_CodeSection=0;
+
+	//エクスポートセクションのファイル上のサイズ
+	i=	sizeof(IMAGE_EXPORT_DIRECTORY)+	//エクスポートディレクトリテーブルを飛び越す
+		ExportNum*sizeof(DWORD)+		//エクスポート アドレス テーブルを飛び越す
+		ExportNum*sizeof(DWORD)+		//エクスポート名ポインタ テーブルを飛び越す
+		ExportNum*sizeof(WORD)+			//エクスポート序数テーブルを飛び越す
+		ExportNamesLength;				//シンボル名バッファ
+	if(bUse_ExportSection){
+		if(i%FILE_ALIGNMENT) FileSize_ExportSection=i+(FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		else FileSize_ExportSection=i;
+	}
+	else FileSize_ExportSection=0;
+
+	//インポートセクションのファイル上のサイズ
+	i=
+		LookupSize+			//インポート アドレス テーブル
+		LookupSize+			//ルックアップテーブル
+		(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR)+	//IMAGE_IMPORT_DESCRIPTOR
+		ImportDllNum*0x10+	//DLL名の羅列
+		HintSize;			//ヒント名
+	if(i%FILE_ALIGNMENT) FileSize_ImportSection=i+(FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+	else FileSize_ImportSection=i;
+	bUse_ImportSection=1;	//インポートセクションは必ず存在する
+
+	//データセクションのファイル上のサイズ
+	if(compiler.GetObjectModule().dataTable.GetSize()%FILE_ALIGNMENT) FileSize_DataSection=compiler.GetObjectModule().dataTable.GetSize()+(FILE_ALIGNMENT-compiler.GetObjectModule().dataTable.GetSize()%FILE_ALIGNMENT);
+	else FileSize_DataSection=compiler.GetObjectModule().dataTable.GetSize();
+	if(FileSize_DataSection) bUse_DataSection=1;
+	else bUse_DataSection=0;
+
+	//リライタブルセクションのファイル上のサイズ（グローバル変数の初期情報のみを格納）
+	if( compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize() % FILE_ALIGNMENT )
+	{
+		FileSize_RWSection =
+			compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()
+			+ (FILE_ALIGNMENT-compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()%FILE_ALIGNMENT);
+	}
+	else{
+		if( compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize() )
+		{
+			FileSize_RWSection = compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize();
+		}
+		else FileSize_RWSection=FILE_ALIGNMENT;
+	}
+	bUse_RWSection=1;
+
+	//リソースセクションのファイル上のサイズ
+	char *RSrcSectionBuffer;
+	int RSrcSectionSize;
+	RSrcSectionBuffer=GetRSrcSectionBuffer(&RSrcSectionSize);
+	if(RSrcSectionSize%FILE_ALIGNMENT) FileSize_RSrcSection=RSrcSectionSize+(FILE_ALIGNMENT-RSrcSectionSize%FILE_ALIGNMENT);
+	else FileSize_RSrcSection=RSrcSectionSize;
+	if(FileSize_RSrcSection) bUse_RSrcSection=1;
+	else bUse_RSrcSection=0;
+
+	//リロケーションセクションのファイル上のサイズ
+	if(pobj_Reloc->length%FILE_ALIGNMENT) FileSize_RelocSection=pobj_Reloc->length+(FILE_ALIGNMENT-pobj_Reloc->length%FILE_ALIGNMENT);
+	else FileSize_RelocSection=pobj_Reloc->length;
+	if(FileSize_RelocSection) bUse_RelocSection=1;
+	else bUse_RelocSection=0;
+
+	//デバッグセクションのファイル上のサイズ
+	if(pobj_DebugSection->length%FILE_ALIGNMENT) FileSize_DebugSection=pobj_DebugSection->length+(FILE_ALIGNMENT-pobj_DebugSection->length%FILE_ALIGNMENT);
+	else FileSize_DebugSection=pobj_DebugSection->length;
+	if(FileSize_DebugSection) bUse_DebugSection=1;
+	else bUse_DebugSection=0;
+
+
+	//各セッションのファイル上の位置
+	FilePos_CodeSection=	EXE_HEADER_SIZE;
+	FilePos_ExportSection=	FilePos_CodeSection+
+							FileSize_CodeSection;
+	FilePos_ImportSection=	FilePos_ExportSection+
+							FileSize_ExportSection;
+	FilePos_DataSection=	FilePos_ImportSection+
+							FileSize_ImportSection;
+	FilePos_RWSection=		FilePos_DataSection+
+							FileSize_DataSection;
+	FilePos_RSrcSection=	FilePos_RWSection+
+							FileSize_RWSection;
+	FilePos_RelocSection=	FilePos_RSrcSection+
+							FileSize_RSrcSection;
+	FilePos_DebugSection=	FilePos_RelocSection+
+							FileSize_RelocSection;
+
+	//コードセッションのメモリ上のサイズ
+	if(FileSize_CodeSection%MEM_ALIGNMENT) MemSize_CodeSection=FileSize_CodeSection+(MEM_ALIGNMENT-FileSize_CodeSection%MEM_ALIGNMENT);
+	else MemSize_CodeSection=FileSize_CodeSection;
+
+	//エクスポートセクションのメモリ上のサイズ
+	if(FileSize_ExportSection%MEM_ALIGNMENT) MemSize_ExportSection=FileSize_ExportSection+(MEM_ALIGNMENT-FileSize_ExportSection%MEM_ALIGNMENT);
+	else MemSize_ExportSection=FileSize_ExportSection;
+
+	//インポートセクションのメモリ上のサイズ
+	if(FileSize_ImportSection%MEM_ALIGNMENT) MemSize_ImportSection=FileSize_ImportSection+(MEM_ALIGNMENT-FileSize_ImportSection%MEM_ALIGNMENT);
+	else MemSize_ImportSection=FileSize_ImportSection;
+
+	//データセクションのメモリ上のサイズ
+	if(FileSize_DataSection%MEM_ALIGNMENT) MemSize_DataSection=FileSize_DataSection+(MEM_ALIGNMENT-FileSize_DataSection%MEM_ALIGNMENT);
+	else MemSize_DataSection=FileSize_DataSection;
+
+	//リライタブルセクションのメモリ上のサイズ
+	i = compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()
+		+ compiler.GetObjectModule().meta.GetGlobalVars().GetAllSize();
+	if(i%MEM_ALIGNMENT) MemSize_RWSection=i+(MEM_ALIGNMENT-i%MEM_ALIGNMENT);
+	else MemSize_RWSection=i;
+
+	//リソースセクションのメモリ上のサイズ
+	if(FileSize_RSrcSection%MEM_ALIGNMENT) MemSize_RSrcSection=FileSize_RSrcSection+(MEM_ALIGNMENT-FileSize_RSrcSection%MEM_ALIGNMENT);
+	else MemSize_RSrcSection=FileSize_RSrcSection;
+
+	//リロケーションセクションのメモリ上のサイズ
+	if(FileSize_RelocSection%MEM_ALIGNMENT) MemSize_RelocSection=FileSize_RelocSection+(MEM_ALIGNMENT-FileSize_RelocSection%MEM_ALIGNMENT);
+	else MemSize_RelocSection=FileSize_RelocSection;
+
+	//デバッグセクションのメモリ上のサイズ
+	if(FileSize_DebugSection%MEM_ALIGNMENT) MemSize_DebugSection=FileSize_DebugSection+(MEM_ALIGNMENT-FileSize_DebugSection%MEM_ALIGNMENT);
+	else MemSize_DebugSection=FileSize_DebugSection;
+
+
+	//各セッションのメモリ上の位置
+	if(bUse_ExportSection)	MemPos_ExportSection=	0x1000+
+													MemSize_CodeSection;
+	else					MemPos_ExportSection=0;
+	if(bUse_ImportSection)	MemPos_ImportSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection;
+	else					MemPos_ImportSection=0;
+	if(bUse_DataSection)	MemPos_DataSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection;
+	else					MemPos_DataSection=0;
+	if(bUse_RWSection)		MemPos_RWSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection;
+	else					MemPos_RWSection=0;
+	if(bUse_RSrcSection)	MemPos_RSrcSection=		0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection;
+	else					MemPos_RSrcSection=0;
+	if(bUse_RelocSection)	MemPos_RelocSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection;
+	else					MemPos_RelocSection=0;
+	if(bUse_DebugSection)	MemPos_DebugSection=	0x1000+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection+
+													MemSize_RelocSection;
+	else					MemPos_DebugSection=0;
+
+
+
+	////////////////////////////
+	// エクスポート情報の再配置
+	////////////////////////////
+	if(bUse_ExportSection){
+		for(i=0;i<ExportNum;i++){
+			lpdwExportAddressTable[i]+=MemPos_CodeSection;
+			lpdwExportNamePointerTable[i]+=MemPos_ExportSection;
+		}
+
+		ImageExportDirectory.Name+=						MemPos_ExportSection;
+		ImageExportDirectory.AddressOfFunctions+=		MemPos_ExportSection;
+		ImageExportDirectory.AddressOfNames+=			MemPos_ExportSection;
+		ImageExportDirectory.AddressOfNameOrdinals+=	MemPos_ExportSection;
+	}
+
+
+	////////////////////////////
+	// インポート情報の再配置
+	////////////////////////////
+	for(i=0,i5=0;i<ImportDllNum;i++){
+		//IMAGE_IMPORT_DESCRIPTOR
+		pImportDescriptor[i].OriginalFirstThunk+=MemPos_ImportSection;
+		pImportDescriptor[i].Name+=MemPos_ImportSection;
+
+		//インポート アドレス テーブル（ルックアップ テーブルを差し引く）
+		pImportDescriptor[i].FirstThunk=pImportDescriptor[i].OriginalFirstThunk-
+			LookupSize;			//ルックアップテーブル
+
+		compiler.GetObjectModule().meta.GetDllProcs().Iterator_Reset();
+		while( compiler.GetObjectModule().meta.GetDllProcs().Iterator_HasNext() )
+		{
+			const DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().Iterator_GetNext();
+
+			if( !pDllProc->IsUsing() ){
+				continue;
+			}
+
+			if( pDllProc->GetDllFileName() == ppDllNames[i] ){
+				//ルックアップ テーブル
+				pLookupTable[i5++]+=MemPos_ImportSection;
+			}
+		}
+		i5++;
+	}
+
+
+	////////////////////////////////////////
+	//仮想関数データテーブルスケジュール
+	compiler.GetObjectModule().meta.GetClasses().ActionVtblSchedule( ImageBase, MemPos_CodeSection, MemPos_DataSection );
+
+
+	if( compiler.IsDll() ){
+		//DLLの場合はリロケーション情報を生成
+		pobj_Reloc->ResetRelocBuffer();
+	}
+
+	compiler.linker.SetDataTable( compiler.GetObjectModule().dataTable );
+
+	compiler.linker.SetImageBase( ImageBase );
+	compiler.linker.ResolveDataTableSchedules( MemPos_DataSection );
+	compiler.linker.ResolveCatchAddressSchedules( MemPos_CodeSection );
+	compiler.linker.ResolveDllProcSchedules( MemPos_CodeSection, MemPos_ImportSection, LookupSize, HintSize );
+	compiler.linker.ResolveUserProcSchedules( MemPos_CodeSection );
+	compiler.linker.ResolveGlobalVarSchedules( MemPos_RWSection );
+	compiler.linker.ResolveVtblSchedule( MemPos_DataSection );
+	compiler.linker.ResolveTypeInfoSchedule( MemPos_DataSection );
+
+
+	////////////////////////////////
+	// リソースアドレススケジュール
+	extern DWORD *lpdwRSrcAddrSchedule;
+	extern int RSrcAddrScheduleNum;
+	for(i=0;i<RSrcAddrScheduleNum;i++){
+		*(DWORD *)(RSrcSectionBuffer+lpdwRSrcAddrSchedule[i])+=MemPos_RSrcSection;
+	}
+	HeapDefaultFree(lpdwRSrcAddrSchedule);
+
+
+	//Dosスタブ
+	char *DosStubBuffer;
+	int DosStubSize;
+	hFile=CreateFile(
+		( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\dosstub.pgm" ).c_str(),
+		GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+	if(hFile==INVALID_HANDLE_VALUE){
+		MessageBox(hOwnerEditor,"dosstub.pgmの読み込みに失敗","error",MB_OK);
+		goto EndWriteOpcode;
+	}
+	DosStubSize=GetFileSize(hFile,NULL);
+	DosStubBuffer=(char *)HeapAlloc(hHeap,0,DosStubSize);
+	ReadFile(hFile,DosStubBuffer,DosStubSize,(DWORD *)&i2,NULL);
+	CloseHandle(hFile);
+
+
+	if( compiler.errorMessenger.HasError() )
+	{
+		goto EndWriteOpcode;
+	}
+
+
+	////////////////////////////
+	// EXEファイルのヘッダ情報
+	////////////////////////////
+
+	IMAGE_DOS_HEADER ImageDosHeader;
+	ImageDosHeader.e_magic=	0x5A4D;
+	ImageDosHeader.e_cblp=	0x0090;
+	ImageDosHeader.e_cp=	0x0003;
+	ImageDosHeader.e_crlc=	0;
+	ImageDosHeader.e_cparhdr=4;
+	ImageDosHeader.e_minalloc=0x0000;
+	ImageDosHeader.e_maxalloc=0xFFFF;
+	ImageDosHeader.e_ss=	0x0000;
+	ImageDosHeader.e_sp=	0x00B8;
+	ImageDosHeader.e_csum=	0x0000;
+	ImageDosHeader.e_ip=	0x0000;
+	ImageDosHeader.e_cs=	0x0000;
+	ImageDosHeader.e_lfarlc=0x0040;
+	ImageDosHeader.e_ovno=	0x0000;
+	ImageDosHeader.e_res[0]=0;
+	ImageDosHeader.e_res[1]=0;
+	ImageDosHeader.e_res[2]=0;
+	ImageDosHeader.e_res[3]=0;
+	ImageDosHeader.e_oemid=	0x0000;
+	ImageDosHeader.e_oeminfo=0x0000;
+	ImageDosHeader.e_res2[0]=0;
+	ImageDosHeader.e_res2[1]=0;
+	ImageDosHeader.e_res2[2]=0;
+	ImageDosHeader.e_res2[3]=0;
+	ImageDosHeader.e_res2[4]=0;
+	ImageDosHeader.e_res2[5]=0;
+	ImageDosHeader.e_res2[6]=0;
+	ImageDosHeader.e_res2[7]=0;
+	ImageDosHeader.e_res2[8]=0;
+	ImageDosHeader.e_res2[9]=0;
+	ImageDosHeader.e_lfanew=0x0100;	//PEヘッダの位置
+
+
+	/////////////////////////////////////////////
+	// PEヘッダ
+	/////////////////////////////////////////////
+
+	IMAGE_NT_HEADERS64 ImagePeHdr;
+	ImagePeHdr.Signature=IMAGE_NT_SIGNATURE;
+
+	//マシンタイプ
+	ImagePeHdr.FileHeader.Machine=				IMAGE_FILE_MACHINE_AMD64;
+
+	ImagePeHdr.FileHeader.NumberOfSections=		bUse_CodeSection+
+												bUse_ExportSection+
+												bUse_ImportSection+
+												bUse_DataSection+
+												bUse_RWSection+
+												bUse_RSrcSection+
+												bUse_RelocSection+
+												bUse_DebugSection;	//セクション数
+	ImagePeHdr.FileHeader.TimeDateStamp=		(DWORD)time(NULL);
+	ImagePeHdr.FileHeader.PointerToSymbolTable=	0x00000000;
+	ImagePeHdr.FileHeader.NumberOfSymbols=		0x00000000;
+	ImagePeHdr.FileHeader.SizeOfOptionalHeader=	IMAGE_SIZEOF_NT_OPTIONAL64_HEADER;
+	if( compiler.IsDll() ){
+		ImagePeHdr.FileHeader.Characteristics=	IMAGE_FILE_EXECUTABLE_IMAGE|
+												IMAGE_FILE_DLL|
+												IMAGE_FILE_LARGE_ADDRESS_AWARE;
+	}
+	else{
+		ImagePeHdr.FileHeader.Characteristics=	IMAGE_FILE_RELOCS_STRIPPED|
+												IMAGE_FILE_EXECUTABLE_IMAGE|
+												IMAGE_FILE_LARGE_ADDRESS_AWARE;
+	}
+
+	ImagePeHdr.OptionalHeader.Magic=				IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+	ImagePeHdr.OptionalHeader.MajorLinkerVersion=	5;
+	ImagePeHdr.OptionalHeader.MinorLinkerVersion=	0;
+	ImagePeHdr.OptionalHeader.SizeOfCode=			FileSize_CodeSection;	//コードサイズ（.textのセッションサイズ）
+	ImagePeHdr.OptionalHeader.SizeOfInitializedData=FileSize_DataSection;	//データサイズ（.dataのセッションサイズ）
+	ImagePeHdr.OptionalHeader.SizeOfUninitializedData=0;					//未初期化データのサイズ（なし）
+	if( compiler.IsDll() ){
+		if(DllMain_EntryPoint==-1)
+			ImagePeHdr.OptionalHeader.AddressOfEntryPoint=0;
+		else
+			ImagePeHdr.OptionalHeader.AddressOfEntryPoint=MemPos_CodeSection+DllMain_EntryPoint;
+	}
+	else ImagePeHdr.OptionalHeader.AddressOfEntryPoint=	MemPos_CodeSection;
+	ImagePeHdr.OptionalHeader.BaseOfCode=			MemPos_CodeSection;	//.textのアドレス
+
+	ImagePeHdr.OptionalHeader.ImageBase=			ImageBase;		//イメージベース
+	ImagePeHdr.OptionalHeader.SectionAlignment=		MEM_ALIGNMENT;		//セクションアラインメント
+	ImagePeHdr.OptionalHeader.FileAlignment=		FILE_ALIGNMENT;
+	ImagePeHdr.OptionalHeader.MajorOperatingSystemVersion=4;
+	ImagePeHdr.OptionalHeader.MinorOperatingSystemVersion=0;
+	ImagePeHdr.OptionalHeader.MajorImageVersion=	0;
+	ImagePeHdr.OptionalHeader.MinorImageVersion=	0;
+	ImagePeHdr.OptionalHeader.MajorSubsystemVersion=4;
+	ImagePeHdr.OptionalHeader.MinorSubsystemVersion=0;
+	ImagePeHdr.OptionalHeader.Win32VersionValue=	0;
+	ImagePeHdr.OptionalHeader.SizeOfImage=			EXE_HEADER_SIZE+
+													MemSize_CodeSection+
+													MemSize_ExportSection+
+													MemSize_ImportSection+
+													MemSize_DataSection+
+													MemSize_RWSection+
+													MemSize_RSrcSection+
+													MemSize_RelocSection+
+													MemSize_DebugSection;//すべてのイメージサイズ
+	ImagePeHdr.OptionalHeader.SizeOfHeaders=		EXE_HEADER_SIZE;//ヘッダサイズ
+	ImagePeHdr.OptionalHeader.CheckSum=				0;
+	extern unsigned short TypeOfSubSystem;
+	ImagePeHdr.OptionalHeader.Subsystem=			TypeOfSubSystem;
+	ImagePeHdr.OptionalHeader.DllCharacteristics=	0;
+	ImagePeHdr.OptionalHeader.SizeOfStackReserve=	0x00100000;
+	ImagePeHdr.OptionalHeader.SizeOfStackCommit=	0x00001000;
+	ImagePeHdr.OptionalHeader.SizeOfHeapReserve=	0x00100000;
+	ImagePeHdr.OptionalHeader.SizeOfHeapCommit=		0x00001000;
+	ImagePeHdr.OptionalHeader.LoaderFlags=			0;
+	ImagePeHdr.OptionalHeader.NumberOfRvaAndSizes=	IMAGE_NUMBEROF_DIRECTORY_ENTRIES;
+
+	//データ ディクショナリ
+	ImagePeHdr.OptionalHeader.DataDirectory[0].VirtualAddress=MemPos_ExportSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[0].Size=FileSize_ExportSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[1].VirtualAddress=	//IMAGE_IMPORT_DESCRIPTORを指す
+		MemPos_ImportSection+
+		LookupSize+	//インポート アドレス テーブル
+		LookupSize;	//ルックアップ テーブル
+	ImagePeHdr.OptionalHeader.DataDirectory[1].Size=(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR);
+	ImagePeHdr.OptionalHeader.DataDirectory[2].VirtualAddress=MemPos_RSrcSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[2].Size=RSrcSectionSize;
+	ImagePeHdr.OptionalHeader.DataDirectory[3].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[3].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[4].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[4].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[5].VirtualAddress=MemPos_RelocSection;
+	ImagePeHdr.OptionalHeader.DataDirectory[5].Size=pobj_Reloc->length;
+	ImagePeHdr.OptionalHeader.DataDirectory[6].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[6].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[7].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[7].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[8].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[8].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[9].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[9].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[10].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[10].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[11].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[11].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[12].VirtualAddress=MemPos_ImportSection;//インポート アドレス テーブル
+	ImagePeHdr.OptionalHeader.DataDirectory[12].Size=LookupSize;
+	ImagePeHdr.OptionalHeader.DataDirectory[13].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[13].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[14].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[14].Size=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[15].VirtualAddress=0;
+	ImagePeHdr.OptionalHeader.DataDirectory[15].Size=0;
+
+
+	//コードセクションヘッダ
+	IMAGE_SECTION_HEADER CodeSectionHeader;
+	memset((char *)CodeSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)CodeSectionHeader.Name,".text");
+	CodeSectionHeader.Misc.VirtualSize=			MemSize_CodeSection;
+	CodeSectionHeader.VirtualAddress=			MemPos_CodeSection;	//開始アドレス
+	CodeSectionHeader.SizeOfRawData=			FileSize_CodeSection;
+	CodeSectionHeader.PointerToRawData=			FilePos_CodeSection;	//ファイル上の開始アドレス
+	CodeSectionHeader.PointerToRelocations=		0;
+	CodeSectionHeader.PointerToLinenumbers=		0;
+	CodeSectionHeader.NumberOfRelocations=		0;
+	CodeSectionHeader.NumberOfLinenumbers=		0;
+	CodeSectionHeader.Characteristics=			IMAGE_SCN_MEM_EXECUTE|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_CNT_CODE;
+
+	//エクスポートセクションヘッダ
+	IMAGE_SECTION_HEADER ExportSectionHeader;
+	memset((char *)ExportSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)ExportSectionHeader.Name,".edata");
+	ExportSectionHeader.Misc.VirtualSize=		MemSize_ExportSection;
+	ExportSectionHeader.VirtualAddress=			MemPos_ExportSection;	//開始アドレス
+	ExportSectionHeader.SizeOfRawData=			FileSize_ExportSection;	//サイズ
+	ExportSectionHeader.PointerToRawData=		FilePos_ExportSection;	//ファイル上の開始アドレス
+	ExportSectionHeader.PointerToRelocations=	0;
+	ExportSectionHeader.PointerToLinenumbers=	0;
+	ExportSectionHeader.NumberOfRelocations=	0;
+	ExportSectionHeader.NumberOfLinenumbers=	0;
+	ExportSectionHeader.Characteristics=		IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//インポートセクションヘッダ
+	IMAGE_SECTION_HEADER ImportSectionHeader;
+	memset((char *)ImportSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)ImportSectionHeader.Name,".idata");
+	ImportSectionHeader.Misc.VirtualSize=
+		LookupSize+			//インポートアドレステーブル
+		LookupSize+			//ルックアップテーブル
+		(ImportDllNum+1)*sizeof(IMAGE_IMPORT_DESCRIPTOR)+
+		16*ImportDllNum+	//DLL名
+		HintSize;			//ヒント名（関数名）テーブル
+	ImportSectionHeader.VirtualAddress=			MemPos_ImportSection;	//開始アドレス
+	ImportSectionHeader.SizeOfRawData=			FileSize_ImportSection;	//サイズ
+	ImportSectionHeader.PointerToRawData=		FilePos_ImportSection;	//ファイル上の開始アドレス
+	ImportSectionHeader.PointerToRelocations=	0;
+	ImportSectionHeader.PointerToLinenumbers=	0;
+	ImportSectionHeader.NumberOfRelocations=	0;
+	ImportSectionHeader.NumberOfLinenumbers=	0;
+	ImportSectionHeader.Characteristics=		IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//データセクションヘッダ
+	IMAGE_SECTION_HEADER DataSectionHeader;
+	memset((char *)DataSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)DataSectionHeader.Name,".sdata");
+	DataSectionHeader.Misc.VirtualSize=			MemSize_DataSection;
+	DataSectionHeader.VirtualAddress=			MemPos_DataSection;
+	DataSectionHeader.SizeOfRawData=			FileSize_DataSection;
+	DataSectionHeader.PointerToRawData=			FilePos_DataSection;
+	DataSectionHeader.PointerToRelocations=		0;
+	DataSectionHeader.PointerToLinenumbers=		0;
+	DataSectionHeader.NumberOfRelocations=		0;
+	DataSectionHeader.NumberOfLinenumbers=		0;
+	DataSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_MEM_WRITE;
+
+	//リライタブルセクションヘッダ
+	IMAGE_SECTION_HEADER RWSectionHeader;
+	memset((char *)RWSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RWSectionHeader.Name,".data");
+	RWSectionHeader.Misc.VirtualSize=			compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()
+												+ compiler.GetObjectModule().meta.GetGlobalVars().GetAllSize();
+	RWSectionHeader.VirtualAddress=				MemPos_RWSection;
+	RWSectionHeader.SizeOfRawData=				FileSize_RWSection;
+	RWSectionHeader.PointerToRawData=			FilePos_RWSection;
+	RWSectionHeader.PointerToRelocations=		0;
+	RWSectionHeader.PointerToLinenumbers=		0;
+	RWSectionHeader.NumberOfRelocations=		0;
+	RWSectionHeader.NumberOfLinenumbers=		0;
+	RWSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ|
+												IMAGE_SCN_MEM_WRITE;
+
+	//リソースセクションヘッダ
+	IMAGE_SECTION_HEADER RSrcSectionHeader;
+	memset((char *)RSrcSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RSrcSectionHeader.Name,".rsrc");
+	RSrcSectionHeader.Misc.VirtualSize=			RSrcSectionSize;
+	RSrcSectionHeader.VirtualAddress=			MemPos_RSrcSection;
+	RSrcSectionHeader.SizeOfRawData=			FileSize_RSrcSection;
+	RSrcSectionHeader.PointerToRawData=			FilePos_RSrcSection;
+	RSrcSectionHeader.PointerToRelocations=		0;
+	RSrcSectionHeader.PointerToLinenumbers=		0;
+	RSrcSectionHeader.NumberOfRelocations=		0;
+	RSrcSectionHeader.NumberOfLinenumbers=		0;
+	RSrcSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_READ;
+
+	//リロケーションセクションヘッダ
+	IMAGE_SECTION_HEADER RelocSectionHeader;
+	memset((char *)RelocSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)RelocSectionHeader.Name,".reloc");
+	RelocSectionHeader.Misc.VirtualSize=		pobj_Reloc->length;
+	RelocSectionHeader.VirtualAddress=			MemPos_RelocSection;	//開始アドレス
+	RelocSectionHeader.SizeOfRawData=			FileSize_RelocSection;	//サイズ
+	RelocSectionHeader.PointerToRawData=		FilePos_RelocSection;	//ファイル上の開始アドレス
+	RelocSectionHeader.PointerToRelocations=	0;
+	RelocSectionHeader.PointerToLinenumbers=	0;
+	RelocSectionHeader.NumberOfRelocations=		0;
+	RelocSectionHeader.NumberOfLinenumbers=		0;
+	RelocSectionHeader.Characteristics=			IMAGE_SCN_CNT_INITIALIZED_DATA|
+												IMAGE_SCN_MEM_DISCARDABLE|
+												IMAGE_SCN_MEM_READ;
+
+	//デバッグセクションヘッダ
+	IMAGE_SECTION_HEADER DebugSectionHeader;
+	memset((char *)DebugSectionHeader.Name,0,IMAGE_SIZEOF_SHORT_NAME);
+	lstrcpy((char *)DebugSectionHeader.Name,".debug");
+	DebugSectionHeader.Misc.VirtualSize=		pobj_DebugSection->length;
+	DebugSectionHeader.VirtualAddress=			MemPos_DebugSection;	//開始アドレス
+	DebugSectionHeader.SizeOfRawData=			FileSize_DebugSection;	//サイズ
+	DebugSectionHeader.PointerToRawData=		FilePos_DebugSection;	//ファイル上の開始アドレス
+	DebugSectionHeader.PointerToRelocations=	0;
+	DebugSectionHeader.PointerToLinenumbers=	0;
+	DebugSectionHeader.NumberOfRelocations=		0;
+	DebugSectionHeader.NumberOfLinenumbers=		0;
+	DebugSectionHeader.Characteristics=			IMAGE_SCN_MEM_DISCARDABLE|
+												IMAGE_SCN_MEM_READ;
+
+
+	hFile=CreateFile(program.GetOutputFilePath().c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
+	if(hFile==INVALID_HANDLE_VALUE){
+		compiler.errorMessenger.Output(53,program.GetOutputFilePath().c_str(),-1);
+		goto EndWriteOpcode;
+	}
+
+	//ヘッダ
+	WriteFile(hFile,(void *)&ImageDosHeader,sizeof(IMAGE_DOS_HEADER),(DWORD *)&i2,NULL);
+	i=i2;
+
+	//Dosスタブ
+	WriteFile(hFile,DosStubBuffer,DosStubSize,(DWORD *)&i2,NULL);
+	i+=i2;
+
+	//0x0100までNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,0x0100-i);
+	WriteFile(hFile,temp2,0x0100-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	//PEヘッダ
+	WriteFile(hFile,&ImagePeHdr,sizeof(IMAGE_NT_HEADERS64),(DWORD *)&i2,NULL);
+	i+=i2;
+
+	//コード セクション ヘッダ
+	WriteFile(hFile,&CodeSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+	i+=i2;
+
+	if(bUse_ExportSection){
+		//エクスポート セクション ヘッダ
+		WriteFile(hFile,&ExportSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_ImportSection){
+		//インポート セクション ヘッダ
+		WriteFile(hFile,&ImportSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_DataSection){
+		//データ セクション ヘッダ
+		WriteFile(hFile,&DataSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RWSection){
+		//リライタブルセクションヘッダ
+		WriteFile(hFile,&RWSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RSrcSection){
+		//リソースセクションヘッダ
+		WriteFile(hFile,&RSrcSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_RelocSection){
+		//リロケーションセクションヘッダ
+		WriteFile(hFile,&RelocSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+	if(bUse_DebugSection){
+		//デバッグセクションヘッダ
+		WriteFile(hFile,&DebugSectionHeader,sizeof(IMAGE_SECTION_HEADER),(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//EXE_HEADER_SIZEまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,EXE_HEADER_SIZE-i);
+	WriteFile(hFile,temp2,EXE_HEADER_SIZE-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	//コード
+	WriteFile(
+		hFile,
+		compiler.linker.GetNativeCode().GetBuffer(),
+		compiler.linker.GetNativeCode().GetSize(),
+		(DWORD *)&i2,
+		NULL
+	);
+	i+=i2;
+
+	//FilePos_ExportSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_ExportSection-i);
+	WriteFile(hFile,temp2,FilePos_ExportSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_ExportSection){
+		//エクスポート ディレクトリ テーブル
+		WriteFile(hFile,&ImageExportDirectory,sizeof(IMAGE_EXPORT_DIRECTORY),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート アドレス テーブル
+		WriteFile(hFile,lpdwExportAddressTable,ExportNum*sizeof(DWORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート名ポインタ テーブル
+		WriteFile(hFile,lpdwExportNamePointerTable,ExportNum*sizeof(DWORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//エクスポート序数テーブル
+		WriteFile(hFile,lpwExportOrdinalTable,ExportNum*sizeof(WORD),(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//シンボル名
+		WriteFile(hFile,lpExportNames,ExportNamesLength,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_ImportSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_ImportSection-i);
+	WriteFile(hFile,temp2,FilePos_ImportSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_ImportSection){
+		//インポート アドレス テーブル
+		WriteFile(hFile,pLookupTable,LookupSize,(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//ルックアップ テーブル
+		WriteFile(hFile,pLookupTable,LookupSize,(DWORD *)&i2,NULL);
+		i+=i2;
+
+		//インポート ディレクトリ テーブル（Nullディレクトリ テーブルを含む）
+		for(i3=0;i3<(ImportDllNum+1);i3++){
+			WriteFile(hFile,&pImportDescriptor[i3],sizeof(IMAGE_IMPORT_DESCRIPTOR),(DWORD *)&i2,NULL);
+			i+=i2;
+		}
+
+		//DLL名
+		for(i3=0;i3<ImportDllNum;i3++){
+			WriteFile(hFile,ppDllNames[i3],16,(DWORD *)&i2,NULL);
+			i+=i2;
+		}
+
+		//ヒント テーブル
+		WriteFile(hFile,pHintTable,HintSize,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_DataSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_DataSection-i);
+	WriteFile(hFile,temp2,FilePos_DataSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_DataSection){
+		//データ テーブル
+		WriteFile(
+			hFile,
+			compiler.linker.GetDataTable().GetPtr(),
+			compiler.linker.GetDataTable().GetSize(),
+			(DWORD *)&i2,
+			NULL
+		);
+		i+=i2;
+	}
+
+	//FilePos_RWSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RWSection-i);
+	WriteFile(hFile,temp2,FilePos_RWSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RWSection){
+		//リライタブル データ テーブル（グローバル変数の初期バッファ）
+		char *temp = (char *)calloc( FileSize_RWSection, 1 );
+		memcpy(
+			temp,
+			compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetBuffer(),
+			compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize()
+		);
+
+		WriteFile(hFile,temp,FileSize_RWSection,(DWORD *)&i2,NULL);
+		i+=i2;
+
+		free( temp );
+	}
+
+	//FilePos_RSrcSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RSrcSection-i);
+	WriteFile(hFile,temp2,FilePos_RSrcSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RSrcSection){
+		//リソースバッファ
+		WriteFile(hFile,RSrcSectionBuffer,RSrcSectionSize,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//FilePos_RelocSectionまでNULLを並べる
+	temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FilePos_RelocSection-i);
+	WriteFile(hFile,temp2,FilePos_RelocSection-i,(DWORD *)&i2,NULL);
+	HeapDefaultFree(temp2);
+	i+=i2;
+
+	if(bUse_RelocSection){
+		//リロケーション情報
+		WriteFile(hFile,pobj_Reloc->buffer,pobj_Reloc->length,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//ファイルアラインメントを考慮
+	if(i%FILE_ALIGNMENT){
+		temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		WriteFile(hFile,temp2,FILE_ALIGNMENT-i%FILE_ALIGNMENT,(DWORD *)&i2,NULL);
+		HeapDefaultFree(temp2);
+		i+=i2;
+	}
+
+	if(bUse_DebugSection){
+		//デバッグセクション
+		WriteFile(hFile,pobj_DebugSection->buffer,pobj_DebugSection->length,(DWORD *)&i2,NULL);
+		i+=i2;
+	}
+
+	//ファイルアラインメントを考慮
+	if(i%FILE_ALIGNMENT){
+		temp2=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,FILE_ALIGNMENT-i%FILE_ALIGNMENT);
+		WriteFile(hFile,temp2,FILE_ALIGNMENT-i%FILE_ALIGNMENT,(DWORD *)&i2,NULL);
+		HeapDefaultFree(temp2);
+		i+=i2;
+	}
+
+	//書き込み終了
+	CloseHandle(hFile);
+
+
+EndWriteOpcode:
+
+	//Dosスタブ用のメモリを解放
+	HeapDefaultFree(DosStubBuffer);
+
+	//エクスポート テーブル情報を解放
+	HeapDefaultFree(lpdwExportAddressTable);
+	HeapDefaultFree(lpdwExportNamePointerTable);
+	HeapDefaultFree(lpwExportOrdinalTable);
+
+	//インポートDLL情報を解放
+	HeapDefaultFree(pImportDescriptor);
+	for(i=0;i<ImportDllNum;i++)
+		HeapDefaultFree(ppDllNames[i]);
+	HeapDefaultFree(ppDllNames);
+
+	//ルックアップテーブルに関する情報を解放
+	HeapDefaultFree(pLookupTable);
+
+	//ヒントテーブルに関する情報を解放
+	HeapDefaultFree(pHintTable);
+
+	//リソースセクションバッファを解放
+	HeapDefaultFree(RSrcSectionBuffer);
+
+	//デバッグセクションを開放
+	delete pobj_DebugSection;
+
+	//リロケーション情報を解放
+	delete pobj_Reloc;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/NumOpe.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/NumOpe.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/NumOpe.cpp	(revision 482)
@@ -0,0 +1,1445 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void NewStringObject(int reg, const char *str){
+	///////////////////////////////////////////////////////
+	// lpszTextを元にStringオブジェクトを生成し、
+	// オブジェクトポインタをregに格納する
+	///////////////////////////////////////////////////////
+
+
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+		char *parameter = (char *)malloc( lstrlen( str ) + 32 );
+		sprintf( parameter, "%s%c%c*Char", str, 1, ESC_AS );
+
+		Operator_New( *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr(), "", parameter, Type( DEF_OBJECT, *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr() ) );
+
+		free( parameter );
+
+		//mov reg,rax
+		compiler.codeGenerator.op_mov_RR( reg, REG_RAX );
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+}
+
+void SetUseRegFromRax(int type,int UseReg,int XmmReg){
+	if(IsRealNumberType(type)){
+		//実数型
+		if(XmmReg==REG_XMM4){
+			if(type==DEF_DOUBLE){
+				//movsd qword ptr[rsp+offset],xmm0	※スタックフレームを利用
+				pobj_sf->push(REG_XMM0,sizeof(double));
+			}
+			if(type==DEF_SINGLE){
+				//movss dword ptr[rsp+offset],xmm0	※スタックフレームを利用
+				pobj_sf->push(REG_XMM0,sizeof(float));
+			}
+		}
+		else{
+			if(type==DEF_DOUBLE){
+				//movsd xmm_reg,xmm0
+				compiler.codeGenerator.op_movsd_RR(XmmReg,REG_XMM0);
+			}
+			else if(type==DEF_SINGLE){
+				//movss xmm_reg,xmm0
+				compiler.codeGenerator.op_movss_RR(XmmReg,REG_XMM0);
+			}
+		}
+	}
+	else{
+		//整数型
+		if(UseReg==REG_R14){
+			//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+			pobj_sf->push(REG_RAX);
+		}
+		else{
+			//mov reg,rax
+			compiler.codeGenerator.op_mov_RR(UseReg,REG_RAX);
+		}
+	}
+}
+
+void ExtendRegToBigType( int reg, int bigBasicType, int baseBasicType ){
+	switch( Type::GetBasicSize( bigBasicType ) ){
+		case sizeof(_int64):
+			ExtendTypeTo64(baseBasicType,reg);
+			break;
+		case sizeof(long):
+			ExtendTypeTo32(baseBasicType,reg);
+			break;
+		case sizeof(short):
+			ExtendTypeTo16(baseBasicType,reg);
+			break;
+	}
+}
+
+
+bool VarToReg( RELATIVE_VAR &relativeVar, const Type &baseType, Type &resultType ){
+	int UseReg=pobj_reg->GetNextReg();
+	int XmmReg=pobj_reg->GetNextXmmReg();
+
+	//大きな型への暗黙の変換
+	int bigType = AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
+
+	if(resultType.GetBasicType()&FLAG_PTR){
+		//配列ポインタ
+		resultType.SetBasicType( GetPtrType(resultType.GetBasicType()^FLAG_PTR) );
+
+		SetVarPtrToReg(UseReg,&relativeVar);
+	}
+	else if(resultType.IsReal()){
+		//実数型
+		if( resultType.IsDouble() )
+			SetXmmReg_DoubleVariable(&relativeVar,XmmReg);
+		if( resultType.IsSingle() )
+			SetXmmReg_SingleVariable(&relativeVar,XmmReg);
+	}
+	else if( resultType.IsWhole() || resultType.IsObject()){
+		//整数型
+		SetReg_WholeVariable(resultType,&relativeVar,UseReg);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをUseRegへ格納（構造体は値型）
+		SetVarPtrToReg(UseReg,&relativeVar);
+	}
+	else{
+		return false;
+	}
+
+	if( resultType.GetBasicType() != bigType ){
+		// 大きな型へ変換された場合
+		// ※レジスタの値をキャストする
+		ExtendRegToBigType( UseReg, bigType, resultType.GetBasicType() );
+
+		resultType.SetBasicType( bigType );
+	}
+
+	return true;
+}
+bool TermMemberOpe( const Type &leftType, bool &isNeedHeapFreeStructure, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member, bool &isVariable, RELATIVE_VAR &relativeVar )
+{
+	const CClass &objClass = leftType.GetClass();
+
+	const int useReg=pobj_reg->GetNextReg();
+	const int xmmReg=pobj_reg->GetNextXmmReg();
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(member,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		Type classType;
+		if( VarName[0] == '\0' )
+		{
+			classType = leftType;
+
+			if( classType.IsObject() )
+			{
+				// 既にuseRegにオブジェクトポインタが格納されており、それに対するインデクサを呼び出す場合
+				// ※「プロパティ値として返ってきたオブジェクトインスタンスのインデクサを呼び出す」場合にここにくる
+
+				// オブジェクトメンバのポインタは既にraxに入っている
+			}
+		}
+		else
+		{
+			GetMemberType( leftType, VarName, classType, 0, false );
+
+			if( classType.IsObject() )
+			{
+				//オブジェクトポインタをr11にコピー
+				compiler.codeGenerator.op_mov_RR( REG_R11, useReg );
+
+				RELATIVE_VAR tempRelativeVar;
+				tempRelativeVar.dwKind=VAR_DIRECTMEM;
+
+				if( !_member_offset(
+					true,	//エラー表示あり
+					false,	//読み込み専用
+					leftType,
+					VarName,&tempRelativeVar,classType,0)){
+						return false;
+				}
+
+				// オブジェクトメンバのポインタをraxにコピー
+				if( !VarToReg( tempRelativeVar, baseType, resultType ) ){
+					compiler.errorMessenger.Output(11,termFull,cp);
+				}
+			}
+		}
+
+		if( classType.IsObject() )
+		{
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+				//オブジェクトポインタをスタックに入れておく
+				//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+				pobj_sf->push( useReg );
+
+				char objectFullName[VN_SIZE], dummyArrayElements[VN_SIZE];
+				GetArrayElement(termFull,objectFullName,dummyArrayElements);
+
+				CallIndexerGetterProc(useReg,classType,objectFullName, ArrayElements,resultType, PROCFLAG_NEW );
+
+				pobj_sf->pop();
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+
+			return true;
+		}
+	}
+
+
+	///////////////////////////////////////////////////////////////////
+	// メンバを検索
+	///////////////////////////////////////////////////////////////////
+	if( GetMemberType( leftType, member, resultType, 0, false ) ){
+		// メンバが見つかったとき
+
+		if( isNeedHeapFreeStructure )
+		{
+			if( !leftType.IsStruct() )
+			{
+				compiler.errorMessenger.OutputFatalError();
+			}
+
+			pobj_reg->LockReg();
+
+			// 親となる構造体が一時メモリに存在していた場合、後ほど解放する必要がある
+			compiler.codeGenerator.op_AddNeedFreeTempStructure( useReg );
+			isNeedHeapFreeStructure = false;
+
+			pobj_reg->UnlockReg();
+		}
+
+		//オブジェクトポインタをr11にコピー
+		compiler.codeGenerator.op_mov_RR( REG_R11, useReg );
+
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		if( !_member_offset(
+			true,	//エラー表示あり
+			false,	//読み込み専用
+			leftType,
+			member,&relativeVar,resultType,0)){
+				return false;
+		}
+
+		// 変数として扱う
+		isVariable = true;
+
+		return true;
+	}
+
+
+	///////////////////////////////////////////////////////////////////
+	// 動的メソッドを検索
+	///////////////////////////////////////////////////////////////////
+	vector<const UserProc *> userProcs;
+
+	char methodName[VN_SIZE], lpPtrOffset[VN_SIZE], parameter[VN_SIZE], dummy[1];
+	ReferenceKind refType;
+	PareOrBracket pareOrBracket = None;
+	lstrcpy( methodName, member );
+	GetVarFormatString( methodName, parameter, lpPtrOffset, dummy, refType, &pareOrBracket );
+
+	objClass.EnumDynamicMethodsOrInterfaceMethods( methodName, userProcs );
+	if(userProcs.size()){
+		//オーバーロードを解決
+		const UserProc *pUserProc = OverloadSolutionWithStrParam(termFull,userProcs,parameter,termLeft);
+
+		if( pUserProc )
+		{
+			if(
+				pUserProc->Params().size() == 0				// 仮引数の個数は0
+				&& parameter[0]								// 実引数は1つ以上
+				&& pUserProc->ReturnType().IsObject()		// 戻り値がクラス型の場合
+				&& pareOrBracket == Bracket )				// 実引数は[]で囲まれている
+			{
+				// プロパティ値として返ってきたオブジェクトインスタンスのインデクサを呼び出す
+
+				// まずはプロパティ値を取得
+				bool dummyIsVariable;
+				RELATIVE_VAR dummyRelativeVar;
+				TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull, termLeft, methodName, dummyIsVariable, dummyRelativeVar );
+
+				// 戻り値のオブジェクトインスタンスのインデクサを呼び出す
+				char temporary[VN_SIZE], temp2[VN_SIZE];
+				sprintf( temporary, "[%s]", parameter );
+				sprintf( temp2, "%s.%s", termLeft, methodName );
+				Type classType = resultType;
+				return TermMemberOpe( classType, isNeedHeapFreeStructure, baseType, resultType, termFull, temp2, temporary, isVariable, relativeVar );
+			}
+
+			resultType = pUserProc->ReturnType();
+
+
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+				//オブジェクトポインタをスタックに入れておく
+				//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+				pobj_sf->push( useReg );
+
+				if( !Opcode_CallProc(parameter,pUserProc,PROCFLAG_NEW,termLeft ) ){
+					//レジスタ資源を復元
+					RESTORE_REGISTER_RESOURCE
+
+					return false;
+				}
+
+				pobj_sf->pop();
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				SetUseRegFromRax(resultType.GetBasicType(),useReg,xmmReg);
+
+				// 型パラメータを解決
+				ResolveFormalGenericTypeParameter( resultType, leftType, pUserProc );
+
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+			
+			return true;
+		}
+	}
+	else if( pareOrBracket == Pare )
+	{
+		// 関数ポインタ
+		compiler.errorMessenger.OutputFatalError();
+
+		///////////////////////////////////////////////////////////////////
+		// メンバを検索
+		///////////////////////////////////////////////////////////////////
+		if( GetMemberType( leftType, methodName, resultType, 0, false ) ){
+			// メンバが見つかったとき
+		}
+	}
+
+	compiler.errorMessenger.OutputFatalError();
+
+	return false;
+}
+bool _TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool &isNeedHeapFreeStructure, bool *pIsClassName, bool isProcedureCallOnly, bool &isVariable, RELATIVE_VAR &relativeVar, bool isWriteAccess )
+{
+	char parameter[VN_SIZE];
+
+	// Withを解決
+	char termFull[VN_SIZE];
+	if(term[0]=='.'){
+		GetWithName(termFull);
+		lstrcat(termFull,term);
+	}
+	else lstrcpy(termFull,term);
+
+	char termLeft[VN_SIZE];
+	lstrcpy(termLeft,termFull);
+
+	// パース
+	char member[VN_SIZE];
+	ReferenceKind refType;
+	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+		///////////////////////////////////////////////////////////////////
+		// オブジェクトとメンバに分解できるとき
+		// termLeft.member
+		///////////////////////////////////////////////////////////////////
+
+		isLiteral = false;
+
+		// オブジェクト側の型を取得
+		bool isClassName = false;
+		Type leftType;
+		if( GetTermType( termLeft, Type(), leftType, isLiteral, &isClassName ) ){
+			if( isClassName == false && compiler.GetObjectModule().meta.GetBlittableTypes().IsExist( leftType ) ){
+				// 左側のオブジェクト部分がBlittable型のとき
+
+				char temporary[VN_SIZE];
+				lstrcpy( temporary, termLeft );
+				sprintf( termLeft, "%s(%s)",
+					compiler.GetObjectModule().meta.GetBlittableTypes().Find( leftType ).GetCreateStaticMethodFullName().c_str(),
+					temporary );
+			}
+		}
+
+		if( !TermOpe( termLeft, baseType, leftType, isLiteral, isNeedHeapFreeStructure, &isClassName ) ){
+			goto globalArea;
+		}
+
+		if( isClassName ){
+			// 静的メンバ/メソッドの場合
+			goto globalArea;
+		}
+
+		if( !leftType.HasMember() ){
+			// メンバを持たない型の場合
+			if( isProcedureCallOnly )
+			{
+				compiler.errorMessenger.Output(1,NULL,cp);
+			}
+			return false;
+		}
+
+		return TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull, termLeft, member, isVariable, relativeVar );
+	}
+globalArea:
+
+	//////////////////////////////////////////////
+	// クラス名かどうかをチェック（静的メンバ用）
+	//////////////////////////////////////////////
+
+	if( pIsClassName ){
+		if( compiler.GetObjectModule().meta.GetClasses().Find( termFull ) ){
+			*pIsClassName = true;
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// グローバル属性エリア
+	/////////////////////////////////////////////////////////////////
+
+	int UseReg=pobj_reg->GetNextReg();
+	int XmmReg=pobj_reg->GetNextXmmReg();
+
+
+	if(lstrcmpi(termFull,"This")==0 && isProcedureCallOnly == false ){
+		if( compiler.pCompilingClass == NULL )
+		{
+			compiler.errorMessenger.Output(142,NULL,cp);
+			return false;
+		}
+
+		//Thisオブジェクト
+		resultType.SetType( DEF_OBJECT, compiler.pCompilingClass );
+
+		SetThisPtrToReg( UseReg );
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	//////////////////////////////////////
+	// 関数（DLL、ユーザー定義、組み込み）
+	//////////////////////////////////////
+	char procName[VN_SIZE];
+	char temporary[8192];
+
+	int i2=GetCallProcName(termFull,procName);
+	if(termFull[i2]=='('){
+		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+
+		void *pInfo;
+		int idProc=GetProc(procName,(void **)&pInfo);
+
+		if(idProc){
+			//閉じカッコ")"に続く文字がNULLでないとき
+			if(termFull[i2+1+i4+1]!='\0'){
+				compiler.errorMessenger.Output(42,NULL,cp);
+			}
+
+
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+
+				////////////////
+				// 呼び出し
+				////////////////
+
+				CallProc(idProc,pInfo,procName,parameter, baseType,resultType);
+
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+
+			if(resultType.IsStruct())
+			{
+				//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+				//※後にfreeする必要あり
+				// TODO: 解放はGCに任せる
+				isNeedHeapFreeStructure = true;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+
+		ConstMacro *pConstMacro = compiler.GetObjectModule().meta.GetGlobalConstMacros().Find( procName );
+		if( pConstMacro )
+		{
+			if( pConstMacro->GetCalcBuffer( parameter, temporary ) )
+			{
+				/////////////////////////
+				// マクロ関数
+				/////////////////////////
+
+				//閉じカッコ")"に続く文字がNULLでないときはエラーにする
+				if(termFull[i2+1+i4+1]!='\0') compiler.errorMessenger.Output(42,NULL,cp);
+
+				//マクロ関数の場合
+				NumOpe(&UseReg, temporary,Type(),resultType);
+
+				if(!IS_LITERAL(resultType.GetIndex())){
+					//リテラル値ではなかったとき
+					isLiteral = false;
+				}
+
+				return true;
+			}
+		}
+	}
+	else if( isProcedureCallOnly ){
+		// 関数呼び出し以外は受け付けない
+		return false;
+	}
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(termFull,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		Type classType;
+		GetVarType(VarName,classType,false);
+		if( classType.IsObject() )
+		{
+			CallIndexerGetterProc(UseReg,classType,VarName,ArrayElements,resultType);
+
+			isLiteral = false;
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// 変数
+	////////////////////////////////
+
+	if(GetVarOffset(
+		false,	//エラー表示なし
+		isWriteAccess,
+		termFull,
+		&relativeVar,resultType)){
+		//////////
+		// 変数
+		//////////
+
+		// 変数として扱う
+		isVariable = true;
+
+		isLiteral = false;
+
+		return true;
+	}
+
+/*
+	////////////////////////////////
+	// 型名
+	////////////////////////////////
+
+	if( compiler.StringToType( termFull, resultType ) ){
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+		return true;
+	}*/
+
+
+	/////////////////////////////////
+	// プロパティ用のメソッド
+	/////////////////////////////////
+
+	//配列要素を排除
+	GetArrayElement(termFull,VarName,ArrayElements);
+
+	if(GetSubHash(VarName,0)){
+
+		//////////////////////////////////////////////////////
+		/////    レジスタ資源のバックアップ
+		{	BACKUP_REGISTER_RESOURCE
+		//////////////////////////////////////////////////////
+
+			CallPropertyMethod(termFull,NULL,resultType);
+
+			//大きな型への暗黙の変換
+			int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+			if( resultType.GetBasicType() != bigType ){
+				// 大きな型へ変換された場合
+				// ※レジスタの値をキャストする
+				ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+				resultType.SetBasicType( bigType );
+			}
+
+			SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+
+		/////////////////////////////////////////////
+		//////   レジスタ資源を復元
+			RESTORE_REGISTER_RESOURCE
+		}////////////////////////////////////////////
+
+		if(resultType.IsStruct())
+		{
+			//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+			//※後にfreeする必要あり
+			// TODO: 解放はGCに任せる
+			isNeedHeapFreeStructure = true;
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+	if( isProcedureCallOnly )
+	{
+		compiler.errorMessenger.Output(3, termLeft, cp );
+	}
+
+	return false;
+}
+
+bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool &isNeedHeapFreeStructure, bool *pIsClassName, bool isProcedureCallOnly, bool isWriteAccess )
+{
+	bool isInitRegSwitch = false;
+	if( !pobj_reg )
+	{
+		isInitRegSwitch = true;
+
+		//作業用レジスタを取得
+		pobj_reg = new CRegister( REG_RAX );
+	}
+
+	//エラー時の復旧用
+	CRegister objReg_Backup = *pobj_reg;
+
+
+	RELATIVE_VAR relativeVar;
+	bool isVariable = false;
+	bool result = _TermOpe( term, baseType, resultType, isLiteral, isNeedHeapFreeStructure, pIsClassName, isProcedureCallOnly, isVariable, relativeVar, isWriteAccess );
+
+	if( isVariable )
+	{
+		// 変数の場合はeaxに変数ポインタを格納する
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			compiler.errorMessenger.Output(11,term,cp);
+		}
+	}
+
+
+	if( !result )
+	{
+		*pobj_reg = objReg_Backup;
+	}
+
+	if( isInitRegSwitch ){
+		//整合性をチェック（バグ回避）
+		if( result )
+		{
+			pobj_reg->bug_check();
+		}
+
+		//作業レジスタを解放
+		delete pobj_reg;
+		pobj_reg = NULL;
+	}
+
+	return result;
+}
+bool TermOpeOnlyVariable( const char *term, Type &resultType, RELATIVE_VAR &relativeVar, bool isWriteAccess )
+{
+	if( pobj_reg )
+	{
+		compiler.errorMessenger.OutputFatalError();
+	}
+
+	//作業用レジスタを取得
+	pobj_reg = new CRegister( REG_NON );
+
+	bool isLiteral, isVariable = false, isNeedHeapFreeStructure = false;
+	bool result = _TermOpe( term, Type(), resultType, isLiteral, isNeedHeapFreeStructure, NULL, false, isVariable, relativeVar, isWriteAccess );
+
+	if( !isVariable )
+	{
+		compiler.errorMessenger.OutputFatalError();
+	}
+
+	//整合性をチェック（バグ回避）
+	if( result )
+	{
+		pobj_reg->bug_check();
+	}
+
+	//作業レジスタを解放
+	delete pobj_reg;
+	pobj_reg=0;
+
+	return result;
+}
+
+
+bool _numope( int *pReg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			bool *pbIsNeedHeapFreeStructure )
+{
+	int i,i2,i3;
+	char temporary[1024],temp2[1024];
+
+	if(expression[0]=='\0'){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		return false;
+	}
+
+	if( !baseType.IsNull() && expression[0] == '[' ){
+		// リテラル配列の場合
+
+		int dataTableOffset;
+		if( !compiler.GetObjectModule().dataTable.MakeLiteralArrayBuffer( expression, baseType, dataTableOffset ) )
+		{
+			return false;
+		}
+
+		//mov reg,i2
+		compiler.codeGenerator.op_mov_RV( sizeof(_int64), *pReg, dataTableOffset, Schedule::DataTable );
+
+		resultType = baseType;
+
+		return true;
+	}
+
+	bool isLiteralCalculation;
+	if( NumOpe_GetType( expression, baseType, resultType, &isLiteralCalculation ) )
+	{
+		if( isLiteralCalculation )
+		{
+			//右辺値が数値の定数式の場合
+			_int64 i64data;
+			StaticCalculation(true, expression,baseType.GetBasicType(),&i64data,resultType);
+
+			if(resultType.IsReal()){
+				if(baseType.IsReal()) resultType=baseType;
+
+				int xmmReg = pobj_reg->GetNextXmmReg();
+				*pReg = xmmReg;
+
+				if(resultType.IsDouble()){
+					i3 = compiler.GetObjectModule().dataTable.Add( i64data );
+
+					//movlpd xmm_reg,qword ptr[data table offset]
+					compiler.codeGenerator.op_movlpd_RM( xmmReg, 0, i3, MOD_DISP32, Schedule::DataTable );
+				}
+				if(resultType.IsSingle()){
+					double dbl;
+					memcpy(&dbl,&i64data,sizeof(_int64));
+
+					float flt;
+					int i32data;
+					flt=(float)dbl;
+					memcpy(&i32data,&flt,sizeof(long));
+
+					i3 = compiler.GetObjectModule().dataTable.Add( i32data );
+
+					//movss xmm_reg,dword ptr[data table offset]
+					compiler.codeGenerator.op_movss_RM( xmmReg, 0, i3, MOD_DISP32, Schedule::DataTable );
+				}
+			}
+			else{
+				if(!resultType.Is64()){
+					//整数（符号有り/無し）
+
+					i3=(long)i64data;
+
+					if(resultType.GetBasicSize()==sizeof(char)) i3=i3&0x000000FF;
+					if(resultType.GetBasicSize()==sizeof(short)) i3=i3&0x0000FFFF;
+
+					i64data=(_int64)i3;
+				}
+
+				//mov reg,i64data
+				compiler.codeGenerator.op_mov_RV64(*pReg,i64data);
+			}
+			return true;
+		}
+	}
+
+	if( expression[0] == 1 )
+	{
+		if( expression[1]==ESC_NEW )
+		{
+			//New演算子（オブジェクト生成）
+
+			if( pobj_BlockReg->check(REG_RAX) ){
+				compiler.errorMessenger.OutputFatalError();
+			}
+
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+				if( !Operator_New( expression+2, baseType, resultType ) ){
+					return false;
+				}
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+
+			//mov reg,rax
+			compiler.codeGenerator.op_mov_RR( *pReg, REG_RAX );
+
+			return true;
+		}
+		else if( expression[1] == ESC_SYSTEM_STATIC_NEW )
+		{
+			// 静的領域にオブジェクトを作る
+
+			// 静的領域にオブジェクトを生成
+			int dataTableOffset;
+			if( !compiler.GetObjectModule().dataTable.MakeConstObjectToProcessStaticBuffer( expression + 2, resultType, dataTableOffset ) )
+			{
+				return false;
+			}
+
+			//mov reg,i2
+			compiler.codeGenerator.op_mov_RV( sizeof(_int64), *pReg, dataTableOffset, Schedule::DataTable);
+
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////
+	// 式要素を逆ポーランド式で取得
+	/////////////////////////////////
+
+	char *values[255];
+	long calc[255];
+	long stack[255];
+	int pnum;
+	if(!GetNumOpeElements(expression,&pnum,values,calc,stack)){
+		for(i=0;i<pnum;i++){
+			if(values[i]) HeapDefaultFree(values[i]);
+		}
+		return 0;
+	}
+
+
+	////////////////////////////////
+	// 演算部分のコード生成を開始
+	////////////////////////////////
+
+	BOOL bError;
+	bError=0;
+
+	//リテラル値のみの計算かどうかを判別するためのフラグ
+	BOOL bLiteralCalculation=1;
+
+	double dbl;
+	int sp;
+	int type_stack[255];
+	LONG_PTR index_stack[255];
+	bool isNothing_stack[255];
+	bool isNeedHeapFreeStructureStack[255];
+	_int64 i64data;
+	int UseReg,XmmReg;
+	BOOL bXmm;
+	for(i=0,sp=0;i<pnum;i++){
+		int idCalc;
+		idCalc=calc[i]%100;
+
+		if(idCalc){
+			if(type_stack[sp-2]==DEF_OBJECT){
+				if( idCalc == CALC_AS
+					&& type_stack[sp-1] == ( DEF_OBJECT | FLAG_CAST )
+					&& index_stack[sp-1] == index_stack[sp-2]
+					|| isNothing_stack[sp-2] ){
+						// 同一の型、またはNothingに対するAsはAs演算子を呼び出さない
+				}
+				else if( idCalc == CALC_AS
+					&& type_stack[sp-1] == ( DEF_OBJECT | FLAG_CAST )
+					&& ( ((CClass *)index_stack[sp-1])->IsEqualsOrSubClass( (CClass *)index_stack[sp-2] ) || ((CClass *)index_stack[sp-2])->IsEqualsOrSubClass( (CClass *)index_stack[sp-1] )
+					)){
+						// ダウンキャストを許可する
+				}
+				else{
+					//オーバーロードされたオペレータを呼び出す
+					i2=CallOperatorProc(idCalc,baseType,type_stack,index_stack,isNeedHeapFreeStructureStack,sp);
+					if(i2==0){
+						if(idCalc==CALC_EQUAL) lstrcpy(temp2,"==");
+						else GetCalcName(idCalc,temp2);
+						sprintf(temporary,"Operator %s",temp2);
+						compiler.errorMessenger.Output(27,temporary,cp);
+						goto error;
+					}
+					else if(i2==-1) goto error;
+
+					continue;
+				}
+			}
+
+			if(!CheckCalcType(idCalc,type_stack,sp)) goto error;
+		}
+
+		switch(idCalc){
+			//数値
+			case 0:
+				index_stack[sp]=-1;
+				isNothing_stack[sp] = false;
+				isNeedHeapFreeStructureStack[sp] = false;
+
+				UseReg=pobj_reg->GetNextReg();
+				XmmReg=pobj_reg->GetNextXmmReg();
+
+				bXmm=0;
+
+				char *term;
+				term=values[i];
+
+				if( calc[i+1]%100 == CALC_AS ){
+					// As演算子の右辺値
+					//型名
+					if( compiler.StringToType( term, resultType ) ){
+						resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+					}
+					else{
+						compiler.errorMessenger.Output(3, term, cp );
+						goto error;
+					}
+
+					type_stack[sp] = resultType.GetBasicType();
+					index_stack[sp] = resultType.GetIndex();
+					sp++;
+
+					break;
+				}
+
+				if( (term[0]=='e'||term[0]=='E')
+					&& (term[1]=='x'||term[1]=='X')
+					&& term[2]=='\"'
+					|| term[0] == '\"' )
+				{
+					bool isEx = true;
+					if( term[0] == '\"' )
+					{
+						isEx = false;
+					}
+
+					if( isEx )
+					{
+						// 拡張版リテラル文字列（エスケープシーケンス可能）
+						if(!RemoveStringQuotes(term+2)){
+							compiler.errorMessenger.Output(43,NULL,cp);
+							goto error;
+						}
+						i3=FormatString_EscapeSequence(term+2);
+						term+=2;
+					}
+					else
+					{
+						// 通常文字列
+						if(!RemoveStringQuotes(term)){
+							compiler.errorMessenger.Output(43,NULL,cp);
+							goto error;
+						}
+						i3=lstrlen(term);
+					}
+
+					if( !baseType.IsPointer() )
+					{
+						//要求タイプがオブジェクト、または未定のとき
+
+						//String型オブジェクトを生成
+						i2 = compiler.GetObjectModule().dataTable.MakeConstStringObjectToProcessStaticBuffer( term );
+
+						//mov reg,i2
+						compiler.codeGenerator.op_mov_RV(sizeof(_int64),UseReg,i2, Schedule::DataTable);
+
+						type_stack[sp]=DEF_OBJECT;
+						index_stack[sp]=(LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr();
+						bLiteralCalculation=0;
+
+						if(bXmm) pobj_reg->LockXmmReg();
+						else pobj_reg->LockReg();
+
+						sp++;
+						break;
+					}
+
+StrLiteral:
+
+					type_stack[sp]=typeOfPtrChar;
+					bLiteralCalculation=0;
+
+					i2 = compiler.GetObjectModule().dataTable.AddString( term, i3 );
+
+					//mov reg,i2
+					compiler.codeGenerator.op_mov_RV(sizeof(_int64),UseReg,i2, Schedule::DataTable);
+
+					if(UseReg==REG_R14){
+						//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+						pobj_sf->push(REG_R14);
+					}
+				}
+				else if(IsVariableTopChar(term[0])||
+					term[0]=='*'||
+					(term[0]=='.'&&IsVariableTopChar(term[1])))
+				{
+					//////////////////
+					// 何らかの識別子
+
+					bool isLiteral;
+					if( TermOpe( term, baseType, resultType, isLiteral, isNeedHeapFreeStructureStack[sp] ) ){
+						if(resultType.IsNull()){
+							//戻り値が存在しないとき
+							for(i2=0;;i2++){
+								if(term[i2]=='('||term[i2]=='\0'){
+									term[i2]=0;
+									break;
+								}
+							}
+							compiler.errorMessenger.Output(38,term,cp);
+
+							goto error;
+						}
+
+						type_stack[sp] = resultType.GetBasicType();
+						index_stack[sp] = resultType.GetIndex();
+
+						if( !isLiteral ){
+							bLiteralCalculation=0;
+						}
+
+						if( resultType.GetBasicType() & FLAG_CAST ){
+							// 型名のみ
+							compiler.errorMessenger.OutputFatalError();
+						}
+						else{
+							if( resultType.IsReal() == false && UseReg==REG_R14 ){
+								//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+								pobj_sf->push(REG_R14);
+							}
+							if( resultType.IsReal() && XmmReg==REG_XMM4 ){
+								if(resultType.IsDouble()){
+									//movsd qword ptr[rsp+offset],xmm4	※スタックフレームを利用
+									pobj_sf->push(REG_XMM4,sizeof(double));
+								}
+								if(resultType.IsSingle()){
+									//movss dword ptr[rsp+offset],xmm4	※スタックフレームを利用
+									pobj_sf->push(REG_XMM4,sizeof(float));
+								}
+							}
+
+							if( resultType.IsReal() ){
+								pobj_reg->LockXmmReg();
+							}
+							else{
+								pobj_reg->LockReg();
+							}
+						}
+
+						sp++;
+						break;
+					}
+
+
+					// Nothing
+					if( lstrcmp( term, "Nothing" ) == 0 ){
+						isNothing_stack[sp] = true;
+
+						type_stack[sp] = DEF_OBJECT;
+						if( baseType.IsObject() ){
+							index_stack[sp] = baseType.GetIndex();
+						}
+						else{
+							index_stack[sp] = (LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetObjectClassPtr();
+						}
+
+						bLiteralCalculation = 0;
+
+						//xor reg,reg
+						compiler.codeGenerator.op_zero_reg( UseReg );
+
+						if(UseReg==REG_R14){
+							//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+							pobj_sf->push(REG_R14);
+						}
+
+						pobj_reg->LockReg();
+						sp++;
+						break;
+					}
+
+
+					//////////////
+					// 定数の場合
+					//////////////
+
+					i3 = compiler.GetObjectModule().meta.GetGlobalConsts().GetBasicType(term);
+					if(i3){
+						if( compiler.GetObjectModule().meta.GetGlobalConsts().IsStringPtr( term ) ){
+							//リテラル文字列
+
+							if( baseType.IsObject() || baseType.IsNull() )
+							{
+								//要求タイプがオブジェクト、または未定のとき
+
+								//String型オブジェクトを生成
+								NewStringObject(UseReg,term);
+
+								type_stack[sp]=DEF_OBJECT;
+								index_stack[sp]=(LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr();
+								bLiteralCalculation=0;
+
+								if(bXmm) pobj_reg->LockXmmReg();
+								else pobj_reg->LockReg();
+
+								sp++;
+								break;
+							}
+
+							double dbl = compiler.GetObjectModule().meta.GetGlobalConsts().GetDoubleData(term);
+							memcpy(&i64data,&dbl,sizeof(double));
+
+							//バイト数
+							i3=lstrlen((char *)i64data);
+
+							memcpy(term,(char *)i64data,i3);
+							term[i3]=0;
+							goto StrLiteral;
+						}
+
+						type_stack[sp] = i3;
+						if(IsRealNumberType(i3)){
+							//実数
+							double dbl = compiler.GetObjectModule().meta.GetGlobalConsts().GetDoubleData(term);
+							memcpy(&i64data,&dbl,sizeof(double));
+							goto Literal;
+						}
+						else if(IsWholeNumberType(i3)){
+							//整数
+							i64data = compiler.GetObjectModule().meta.GetGlobalConsts().GetWholeData(term);
+							goto Literal;
+						}
+						else{
+							compiler.errorMessenger.Output(1,NULL,0);
+							goto error;
+						}
+					}
+
+
+					//該当する識別子が見当たらないときはエラー扱いにする
+					bError=1;
+					compiler.errorMessenger.Output(3,term,cp);
+					type_stack[sp]=DEF_DOUBLE;
+				}
+				else{
+					//リテラル値
+					type_stack[sp]=GetLiteralValue(term,&i64data,baseType.GetBasicType());
+Literal:
+					if(type_stack[sp]==DEF_DOUBLE){
+						//64ビット浮動小数型
+						bXmm=1;
+
+						if(XmmReg==REG_XMM4){
+							//mov r14,i64data
+							compiler.codeGenerator.op_mov_RV64(REG_R14,i64data);
+
+
+							//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+							pobj_sf->push(REG_R14);
+						}
+						else{
+							i3 = compiler.GetObjectModule().dataTable.Add( i64data );
+
+							//movlpd xmm_reg,qword ptr[data table offset]
+							compiler.codeGenerator.op_movlpd_RM( XmmReg, 0, i3, MOD_DISP32, Schedule::DataTable );
+						}
+					}
+					else if(type_stack[sp]==DEF_SINGLE){
+						//32ビット浮動小数型
+						bXmm=1;
+
+						float flt;
+						int i32data;
+						memcpy(&dbl,&i64data,sizeof(double));
+						flt=(float)dbl;
+						memcpy(&i32data,&flt,sizeof(long));
+
+						if(XmmReg==REG_XMM4){
+							compiler.errorMessenger.OutputFatalError();		// TODO: 未実装
+							//push term
+							//compiler.codeGenerator.op_push_value(i32data);
+						}
+						else{
+							i3=compiler.GetObjectModule().dataTable.Add( i32data );
+
+							//movss xmm_reg,dword ptr[data table offset]
+							compiler.codeGenerator.op_movss_RM( XmmReg, 0, i3, MOD_DISP32, Schedule::DataTable );
+						}
+					}
+					else{
+						//整数
+
+						index_stack[sp]=GetLiteralIndex(i64data);
+
+						//mov reg,i64data
+						compiler.codeGenerator.op_mov_RV64(UseReg,i64data);
+
+						if(UseReg==REG_R14){
+							//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+							pobj_sf->push(REG_R14);
+						}
+					}
+				}
+
+				if(bXmm) pobj_reg->LockXmmReg();
+				else pobj_reg->LockReg();
+
+				sp++;
+				break;
+
+			//論理演算子
+			case CALC_XOR:
+			case CALC_OR:
+			case CALC_AND:
+				if(!CalcTwoTerm_Logical(idCalc,type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_NOT:
+				//value[sp-1]=Not value[sp-1]
+				//NOT演算子
+				if(!Calc_Not(type_stack,sp)) goto error;
+				break;
+
+			//比較演算子
+			case CALC_PE:		//value[sp-2] <= value[sp-1]
+			case CALC_QE:		//value[sp-2] >= value[sp-1]
+			case CALC_P:		//value[sp-2] <  value[sp-1]
+			case CALC_Q:		//value[sp-2] >  value[sp-1]
+			case CALC_NOTEQUAL:	//value[sp-2] <> value[sp-1]
+			case CALC_EQUAL:	//value[sp-2] =  value[sp-1]				
+				if(!CalcTwoTerm_Relational(idCalc,type_stack,index_stack,&sp)) goto error;
+				break;
+
+			//ビットシフト
+			case CALC_SHL:	//value[sp-2] << value[sp-1]
+			case CALC_SHR:	//value[sp-2] >> value[sp-1]
+				if(!Calc_Shift(idCalc,type_stack,&sp)) goto error;
+				break;
+
+			//算術演算
+			case CALC_ADDITION:
+			case CALC_SUBTRACTION:
+			case CALC_PRODUCT:
+				if(!CalcTwoTerm_Arithmetic(idCalc,type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_MOD:
+				//value[sp-2]%=value[sp-1]
+				//剰余演算
+				if(!Calc_Mod(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_QUOTIENT:
+				//value[sp-2]/=value[sp-1];
+				//除算
+				if(!Calc_Divide(type_stack,&sp,baseType.GetBasicType())) goto error;
+				break;
+			case CALC_INTQUOTIENT:
+				//value[sp-2]/=value[sp-1]
+				//整数除算
+				if(!Calc_IntDivide(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_MINUSMARK:
+				//value[sp-1]=-value[sp-1]
+				//符号反転
+				if(!Calc_MinusMark(type_stack,sp)) goto error;
+				break;
+			case CALC_POWER:
+				//べき乗演算（浮動小数点演算のみ）
+				if(!Calc_Power(type_stack,&sp)) goto error;
+				break;
+			case CALC_AS:
+				//キャスト
+				if(!Calc_Cast(type_stack,index_stack,&sp)) goto error;
+				break;
+			case CALC_BYVAL:
+				//ポインタ型→参照型
+				if( PTR_LEVEL( type_stack[sp-1] ) <= 0 ){
+					//ポインタ型ではないとき
+					compiler.errorMessenger.Output( 3, NULL, cp );
+					goto error;
+				}
+
+				type_stack[sp-1] = PTR_LEVEL_DOWN( type_stack[sp-1] );
+
+				break;
+
+			default:
+				compiler.errorMessenger.Output(300,NULL,cp);
+				goto error;
+		}
+	}
+
+	if(bError) goto error;
+
+	if(sp!=1){
+		compiler.errorMessenger.Output(1,NULL,cp);
+		goto error;
+	}
+
+	if(bLiteralCalculation){
+		compiler.errorMessenger.OutputFatalError();
+	}
+	else{
+		//右辺値が数値の定数式ではないとき
+		if(IS_LITERAL(index_stack[0])) index_stack[0]=-1;
+	}
+
+	if( pbIsNeedHeapFreeStructure )
+	{
+		*pbIsNeedHeapFreeStructure = isNeedHeapFreeStructureStack[0];
+	}
+
+	if(IsRealNumberType(type_stack[0]))
+		*pReg=pobj_reg->UnlockXmmReg();
+	else
+		*pReg=pobj_reg->UnlockReg();
+
+
+	resultType.SetType( type_stack[0], index_stack[0] );
+
+	bool isSuccessful = true;
+	goto finish;
+
+
+
+	//////////////////
+	// エラー処理
+	//////////////////
+
+error:
+
+	isSuccessful = false;
+	goto finish;
+
+
+
+
+finish:
+
+	for(i=0;i<pnum;i++){
+		if(values[i]) HeapDefaultFree(values[i]);
+	}
+
+	return isSuccessful;
+}
+
+bool NumOpe( int *pReg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			bool *pbIsNeedHeapFreeStructure )
+{
+	bool isInitRegSwitch = false;
+	if( !pobj_reg )
+	{
+		isInitRegSwitch = true;
+
+		//作業用レジスタを取得
+		pobj_reg = new CRegister( *pReg );
+	}
+
+	//エラー時の復旧用
+	CRegister objReg_Backup = *pobj_reg;
+
+	*pReg = pobj_reg->GetNextReg();
+
+
+	bool result = _numope( pReg, expression, baseType, resultType, pbIsNeedHeapFreeStructure );
+
+
+	if( !result )
+	{
+		*pobj_reg = objReg_Backup;
+	}
+
+	if( isInitRegSwitch ){
+		//整合性をチェック（バグ回避）
+		if( result )
+		{
+			pobj_reg->bug_check();
+		}
+
+		//作業レジスタを解放
+		delete pobj_reg;
+		pobj_reg = NULL;
+	}
+
+	return result;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/NumOpe_Arithmetic.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/NumOpe_Arithmetic.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/NumOpe_Arithmetic.cpp	(revision 482)
@@ -0,0 +1,704 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL CalcTwoTerm_Arithmetic(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer){
+	/*	value[sp-2] = value[sp-2] + value[sp-1]
+		value[sp-2] = value[sp-2] - value[sp-1]
+		value[sp-2] = value[sp-2] * value[sp-1]		*/
+
+	int reg1,reg2;
+
+	int sp;
+	sp=*pStackPointer;
+
+	int AnswerType;
+	AnswerType=NeutralizationType(type[sp-2],index_stack[sp-2],type[sp-1],index_stack[sp-1]);
+
+	if(type[sp-2]==DEF_DOUBLE||type[sp-2]==DEF_SINGLE||
+		type[sp-1]==DEF_DOUBLE||type[sp-1]==DEF_SINGLE){
+		/////////////
+		// 実数演算
+		/////////////
+
+		int xmm_reg1,xmm_reg2;
+
+		//2つの項を適切なレジスタにセット
+		SetTowTermToReg_RealCalc(AnswerType,type,sp,&xmm_reg1,&xmm_reg2);
+
+		if(AnswerType==DEF_DOUBLE){
+			///////////////////////
+			// Double演算
+			///////////////////////
+
+			if(idCalc==CALC_ADDITION){
+				//addsd xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF2,
+					(char)0x0F,
+					(char)0x58,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+			else if(idCalc==CALC_SUBTRACTION){
+				//subsd xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF2,
+					(char)0x0F,
+					(char)0x5C,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+			else if(idCalc==CALC_PRODUCT){
+				//mulsd xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF2,
+					(char)0x0F,
+					(char)0x59,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+
+			if(xmm_reg1==REG_XMM4){
+				//movsd qword ptr[rsp+offset],xmm4		※スタックフレームを利用
+				pobj_sf->push(REG_XMM4,sizeof(double));
+			}
+		}
+		if(AnswerType==DEF_SINGLE){
+			///////////////////////
+			// Single演算
+			///////////////////////
+
+			if(idCalc==CALC_ADDITION){
+				//addss xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF3,
+					(char)0x0F,
+					(char)0x58,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+			else if(idCalc==CALC_SUBTRACTION){
+				//subss xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF3,
+					(char)0x0F,
+					(char)0x5C,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+			else if(idCalc==CALC_PRODUCT){
+				//mulss xmm_reg1,xmm_reg2
+				compiler.codeGenerator.PutOld(
+					(char)0xF3,
+					(char)0x0F,
+					(char)0x59,
+					(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+				);
+			}
+
+			if(xmm_reg1==REG_XMM4){
+				//movss dword ptr[rsp+offset],xmm4		※スタックフレームを利用
+				pobj_sf->push(REG_XMM4,sizeof(float));
+			}
+		}
+	}
+	else if(Is64Type(type[sp-2])||Is64Type(type[sp-1])){
+		//////////////////////
+		// 64ビット整数演算
+		//////////////////////
+
+		SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+		if(idCalc==CALC_ADDITION){
+			//add reg1,reg2
+			compiler.codeGenerator.op_add_RR(reg1,reg2);
+		}
+		else if(idCalc==CALC_SUBTRACTION){
+			//sub reg1,reg2
+			compiler.codeGenerator.op_sub64_reg(reg1,reg2);
+		}
+		else if(idCalc==CALC_PRODUCT){
+			//mul reg1,reg2
+			compiler.codeGenerator.op_imul_RR(sizeof(_int64),reg1,reg2);
+		}
+
+		if(reg1==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+	}
+	else{
+		//32ビット以下の整数演算
+
+		SetTowTermToReg_Whole32Calc(type,sp,&reg1,&reg2);
+
+		if(idCalc==CALC_ADDITION){
+			//add reg1,reg2
+			compiler.codeGenerator.op_add32_reg(reg1,reg2);
+		}
+		else if(idCalc==CALC_SUBTRACTION){
+			//sub reg1,reg2
+			compiler.codeGenerator.op_sub32_reg(reg1,reg2);
+		}
+		else if(idCalc==CALC_PRODUCT){
+			//mul reg1,reg2
+			compiler.codeGenerator.op_imul_RR(sizeof(long),reg1,reg2);
+		}
+
+		if(reg1==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+	}
+
+	sp--;
+	type[sp-1]=AnswerType;
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+
+
+BOOL Calc_Mod(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]%=value[sp-1]
+	//剰余演算
+
+	int reg1,reg2;
+	int AnswerType;
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//実数演算は行えないため、エラー扱い
+		compiler.errorMessenger.Output(45,"mod",cp);
+		return 0;
+	}
+
+	/////////////////////////
+	// 64ビット整数演算のみ
+	/////////////////////////
+
+	AnswerType=NeutralizationType(type[sp-2],index_stack[sp-2],type[sp-1],index_stack[sp-1]);
+
+	//2つの項を適切なレジスタにセット
+	SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+	if(reg2==REG_RAX||reg2==REG_RDX){
+		//mov r15,reg2
+		compiler.codeGenerator.op_mov_RR(REG_R15,reg2);
+
+		reg2=REG_R15;
+	}
+
+	//raxまたはrdxが使用中かどうかを調べる( true/使用中, false/未使用 )
+	bool isUsingRax = pobj_reg->IsUsing( REG_RAX );
+	bool isUsingRdx = pobj_reg->IsUsing( REG_RDX );
+
+	if(reg1!=REG_RDX && isUsingRdx){
+		//結果レジスタがrdxでない場合（使用されている可能性があるとき）
+
+		//mov qword ptr[rsp+offset],rdx     ※スタックフレームを利用
+		pobj_sf->push(REG_RDX);
+	}
+
+	if(reg1!=REG_RAX && isUsingRax){
+		//結果レジスタがraxでない場合（使用されている可能性があるとき）
+
+		//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+		pobj_sf->push(REG_RAX);
+	}
+
+	{
+
+		//mov rax,reg1
+		compiler.codeGenerator.op_mov_RR(REG_RAX,reg1);
+
+		if(IsSignedType(type[sp-2])){
+			//符号拡張
+			//rdx:rax ← rax
+
+			//cqo
+			compiler.codeGenerator.op_cqo();
+		}
+		else{
+			//ビット拡張
+			//rdx:rax ← rax
+
+			//xor rdx,rdx
+			compiler.codeGenerator.op_zero_reg(REG_RDX);
+		}
+
+		if(IsSignedType(AnswerType)){
+			//idiv reg2
+			compiler.codeGenerator.op_idiv64_reg(reg2);
+		}
+		else{
+			//div reg2
+			compiler.codeGenerator.op_div64_reg(reg2);
+		}
+
+		//mov reg1,rdx
+		compiler.codeGenerator.op_mov_RR(reg1,REG_RDX);
+
+	}
+
+	if(reg1!=REG_RAX && isUsingRax){
+		//結果レジスタがraxでない場合（使用されている可能性があるとき）
+
+		//mov rax,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RAX);
+	}
+
+	if(reg1!=REG_RDX && isUsingRdx){
+		//結果レジスタがrdxでない場合（使用されている可能性があるとき）
+
+		//mov rdx,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RDX);
+	}
+
+
+	if(reg1==REG_R14){
+		//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+		pobj_sf->push(REG_R14);
+	}
+
+	sp--;
+	type[sp-1]=AnswerType;
+
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_Divide(int *type,int *pStackPointer,int BaseType){
+	//value[sp-2]/=value[sp-1];
+	//除算
+
+	int sp;
+	sp=*pStackPointer;
+
+	///////////////////////
+	// 実数演算のみ
+	///////////////////////
+
+	int AnswerType;
+	if(type[sp-2]==DEF_SINGLE&&type[sp-1]==DEF_SINGLE&&BaseType==DEF_SINGLE) AnswerType=DEF_SINGLE;
+	else AnswerType=DEF_DOUBLE;
+
+	int xmm_reg1,xmm_reg2;
+
+	//2つの項を適切なレジスタにセット
+	SetTowTermToReg_RealCalc(AnswerType,type,sp,&xmm_reg1,&xmm_reg2);
+
+	if(AnswerType==DEF_DOUBLE){
+		///////////////////////
+		// Double演算
+		///////////////////////
+
+		//divsd xmm_reg1,xmm_reg2
+		compiler.codeGenerator.PutOld(
+			(char)0xF2,
+			(char)0x0F,
+			(char)0x5E,
+			(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+		);
+
+		if(xmm_reg1==REG_XMM4){
+			//movsd qword ptr[rsp+offset],xmm4		※スタックフレームを利用
+			pobj_sf->push(REG_XMM4,sizeof(double));
+		}
+	}
+	if(AnswerType==DEF_SINGLE){
+		///////////////////////
+		// Single演算
+		///////////////////////
+
+		//divss xmm_reg1,xmm_reg2
+		compiler.codeGenerator.PutOld(
+			(char)0xF3,
+			(char)0x0F,
+			(char)0x5E,
+			(char)(0xC0 | REGISTER_OPERAND(xmm_reg1)<<3 | REGISTER_OPERAND(xmm_reg2))
+		);
+
+		if(xmm_reg1==REG_XMM4){
+			//movss dword ptr[rsp+offset],xmm4		※スタックフレームを利用
+			pobj_sf->push(REG_XMM4,sizeof(float));
+		}
+	}
+
+	sp--;
+	type[sp-1]=AnswerType;
+
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_IntDivide(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2]/=value[sp-1]
+	//除算（整数）
+
+	int reg1,reg2;
+	int AnswerType;
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//実数演算は行えないため、エラー扱い
+		compiler.errorMessenger.Output(45,"mod",cp);
+		return 0;
+	}
+
+	/////////////////////////
+	// 64ビット整数演算のみ
+	/////////////////////////
+
+	AnswerType=NeutralizationType(type[sp-2],index_stack[sp-2],type[sp-1],index_stack[sp-1]);
+
+	//2つの項を適切なレジスタにセット
+	SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+	if(reg2==REG_RAX||reg2==REG_RDX){
+		//mov r15,reg2
+		compiler.codeGenerator.op_mov_RR(REG_R15,reg2);
+
+		reg2=REG_R15;
+	}
+
+	//raxまたはrdxが使用中かどうかを調べる( true/使用中, false/未使用 )
+	bool isUsingRax = pobj_reg->IsUsing( REG_RAX );
+	bool isUsingRdx = pobj_reg->IsUsing( REG_RDX );
+
+	if(reg1!=REG_RDX && isUsingRdx){
+		//結果レジスタがrdxでない場合（使用されている可能性があるとき）
+
+		//mov qword ptr[rsp+offset],rdx     ※スタックフレームを利用
+		pobj_sf->push(REG_RDX);
+	}
+
+	if(reg1!=REG_RAX && isUsingRax){
+		//結果レジスタがraxでない場合（使用されている可能性があるとき）
+
+		//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+		pobj_sf->push(REG_RAX);
+	}
+
+	{
+
+		//mov rax,reg1
+		compiler.codeGenerator.op_mov_RR(REG_RAX,reg1);
+
+		if(IsSignedType(type[sp-2])){
+			//符号拡張
+			//rdx:rax ← rax
+
+			//cqo
+			compiler.codeGenerator.op_cqo();
+		}
+		else{
+			//ビット拡張
+			//rdx:rax ← rax
+
+			//xor rdx,rdx
+			compiler.codeGenerator.op_zero_reg(REG_RDX);
+		}
+
+		if(IsSignedType(AnswerType)){
+			//idiv reg2
+			compiler.codeGenerator.op_idiv64_reg(reg2);
+		}
+		else{
+			//div reg2
+			compiler.codeGenerator.op_div64_reg(reg2);
+		}
+
+		//mov reg1,rax
+		compiler.codeGenerator.op_mov_RR(reg1,REG_RAX);
+
+	}
+
+	if(reg1!=REG_RAX && isUsingRax){
+		//結果レジスタがraxでない場合（使用されている可能性があるとき）
+
+		//mov rax,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RAX);
+	}
+
+	if(reg1!=REG_RDX && isUsingRdx){
+		//結果レジスタがrdxでない場合（使用されている可能性があるとき）
+
+		//mov rdx,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RDX);
+	}
+
+
+	if(reg1==REG_R14){
+		//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+		pobj_sf->push(REG_R14);
+	}
+
+	sp--;
+	type[sp-1]=AnswerType;
+
+	*pStackPointer=sp;
+
+	return 1;
+}
+
+BOOL Calc_MinusMark(int *type,int sp){
+	//value[sp-1]=-value[sp-1]
+	//符号反転
+
+	int xmm_reg;
+	int reg;
+	int i32data;
+
+	if(type[sp-1]==DEF_DOUBLE){
+		SetOneTermToReg_RealCalc(type[sp-1],&xmm_reg);
+
+		double dbl;
+		dbl=-1;
+		i32data = compiler.GetObjectModule().dataTable.Add( dbl );
+
+		//mulsd xmm_reg,qword ptr[data table offset]   ※data = -1
+		compiler.codeGenerator.PutOld(
+			(char)0xF2,
+			(char)0x0F,
+			(char)0x59,
+			(char)(0x04 | REGISTER_OPERAND(xmm_reg)<<3),
+			(char)0x25
+		);
+		compiler.codeGenerator.PutOld(
+			(long)i32data,
+			Schedule::DataTable
+		);
+
+		if(xmm_reg==REG_XMM4){
+			//movsd qword ptr[rsp+offset],xmm4		※スタックフレームを利用
+			pobj_sf->push(REG_XMM4,sizeof(double));
+		}
+	}
+	else if(type[sp-1]==DEF_SINGLE){
+		SetOneTermToReg_RealCalc(type[sp-1],&xmm_reg);
+
+		float flt;
+		flt=-1;
+		i32data = compiler.GetObjectModule().dataTable.Add( flt );
+
+		//mulss xmm_reg,dword ptr[data table offset]   ※data = -1
+		compiler.codeGenerator.PutOld(
+			(char)0xF3,
+			(char)0x0F,
+			(char)0x59,
+			(char)(0x04 | REGISTER_OPERAND(xmm_reg)<<3),
+			(char)0x25
+		);
+		compiler.codeGenerator.PutOld(
+			(long)i32data,
+			Schedule::DataTable
+		);
+
+		if(xmm_reg==REG_XMM4){
+			//movss dword ptr[rsp+offset],xmm4		※スタックフレームを利用
+			pobj_sf->push(REG_XMM4,sizeof(float));
+		}
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		SetOneTermToReg_Whole64Calc(type[sp-1],&reg);
+
+		//imul reg,-1
+		compiler.codeGenerator.op_imul_RV(sizeof(_int64),reg,-1);
+
+		if(reg==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+
+		type[sp-1]=DEF_INT64;	//QWordはInt64へ
+	}
+	else if(IsWholeNumberType(type[sp-1])){
+		SetOneTermToReg_Whole32Calc(type[sp-1],&reg);
+
+		//imul reg,-1
+		compiler.codeGenerator.op_imul_RV(sizeof(long),reg,-1);
+
+		if(reg==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+
+		type[sp-1]=GetSignedType(type[sp-1]);
+	}
+
+	return 1;
+}
+
+BOOL Calc_Power(int *type,int *pStackPointer){
+	//べき乗（実数演算のみ）
+
+	int sp;
+	sp=*pStackPointer;
+
+
+	//2つの項を適切なレジスタにセット
+	int xmm_reg1,xmm_reg2;
+	SetTowTermToReg_RealCalc(DEF_DOUBLE,type,sp,&xmm_reg1,&xmm_reg2);
+
+
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+
+		////////////////
+		// 呼び出し
+		////////////////
+
+		if(xmm_reg1==REG_XMM1){
+			//movsd xmm0,xmm_reg1
+			compiler.codeGenerator.op_movsd_RR(REG_XMM0,xmm_reg1);
+
+			//movsd xmm1,xmm_reg2
+			compiler.codeGenerator.op_movsd_RR(REG_XMM1,xmm_reg2);
+		}
+		else{
+			//movsd xmm1,xmm_reg2
+			compiler.codeGenerator.op_movsd_RR(REG_XMM1,xmm_reg2);
+
+			//movsd xmm0,xmm_reg1
+			compiler.codeGenerator.op_movsd_RR(REG_XMM0,xmm_reg1);
+		}
+
+		//call pow
+		extern const UserProc *pSub_pow;
+		compiler.codeGenerator.op_call(pSub_pow);
+
+		//movsd xmm4,xmm0
+		compiler.codeGenerator.op_movsd_RR(REG_XMM4,REG_XMM0);
+
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+
+
+	//////////////////////////////////
+	// 戻り値を所定のレジスタへ格納
+	//////////////////////////////////
+
+	if(xmm_reg1==REG_XMM4){
+		//movsd qword ptr[rsp+offset],xmm4		※スタックフレームを利用
+		pobj_sf->push(REG_XMM0,sizeof(double));
+	}
+	else{
+		//movsd xmm_reg1,xmm4
+		compiler.codeGenerator.op_movsd_RR(xmm_reg1,REG_XMM4);
+	}
+
+
+	sp--;
+	type[sp-1]=DEF_DOUBLE;
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Shift(int idCalc,int *type,int *pStackPointer){
+	//ビットシフト
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//いずれかの項が実数のとき
+		compiler.errorMessenger.Output(45,"<<",cp);
+		return 0;
+	}
+
+
+	/////////////////////////
+	// 64ビット整数演算のみ
+	/////////////////////////
+	int reg1,reg2;
+
+	//2つの項を適切なレジスタにセット
+	SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+	int sw=0;
+	if(reg1==REG_RCX){
+		//mov r15,rcx
+		compiler.codeGenerator.op_mov_RR(REG_R15,REG_RCX);
+
+		reg1=REG_R15;
+	}
+	else if(reg2!=REG_RCX){
+		sw=1;
+
+		//mov qword ptr[rsp+offset],rcx     ※スタックフレームを利用
+		pobj_sf->push(REG_RCX);
+	}
+
+	//mov rcx,reg2
+	compiler.codeGenerator.op_mov_RR(REG_RCX,reg2);
+
+	if(idCalc==CALC_SHL){
+		//左シフトは符号あり、なしは同様の動きをする
+
+		//32ビット型にする
+		if(!Is64Type(type[sp-2])){
+			ExtendTypeTo32(type[sp-2],reg1);
+
+			if(IsSignedType(type[sp-2])) type[sp-2]=DEF_LONG;
+			else type[sp-2]=DEF_DWORD;
+		}
+
+		//shl reg1,cl
+		compiler.codeGenerator.op_shl_reg(Type(type[sp-2]).GetSize(),reg1);
+	}
+	else if(idCalc==CALC_SHR){
+		if(IsSignedType(type[sp-2])){
+			//符号あり
+
+			//sar
+			compiler.codeGenerator.op_sar_reg(Type(type[sp-2]).GetSize(),reg1);
+		}
+		else{
+			//符号なし
+
+			//shr
+			compiler.codeGenerator.op_shr_reg(Type(type[sp-2]).GetSize(),reg1);
+		}
+	}
+
+	if(sw==0){
+		//mov rcx,r15
+		compiler.codeGenerator.op_mov_RR(REG_RCX,REG_R15);
+	}
+	else{
+		//mov rcx,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_RCX);
+	}
+
+	if(reg1==REG_R14){
+		//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+		pobj_sf->push(REG_R14);
+	}
+
+	sp--;
+
+	*pStackPointer=sp;
+	return 1;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/NumOpe_Logical.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/NumOpe_Logical.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/NumOpe_Logical.cpp	(revision 482)
@@ -0,0 +1,167 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL CalcTwoTerm_Logical(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//value[sp-2] xor= value[sp-1]
+	//xor演算
+
+	int sp;
+	sp=*pStackPointer;
+
+	if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
+		//いずれかの項が実数のとき
+		compiler.errorMessenger.Output(45,"xor",cp);
+		return 0;
+	}
+
+	int reg1,reg2;
+
+	if(Is64Type(type[sp-2])||Is64Type(type[sp-1])){
+		//////////////////////
+		// 64ビット整数演算
+		//////////////////////
+
+		SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+		if(idCalc==CALC_XOR){
+			//xor reg1,reg2
+			compiler.codeGenerator.op_xor_reg(sizeof(_int64),reg1,reg2);
+		}
+		else if(idCalc==CALC_OR){
+			//or reg1,reg2
+			compiler.codeGenerator.op_or_reg(sizeof(_int64),reg1,reg2);
+		}
+		else if(idCalc==CALC_AND){
+			//and reg1,reg2
+			compiler.codeGenerator.op_and_reg(sizeof(_int64),reg1,reg2);
+		}
+		else
+		{
+			throw;
+		}
+
+		if(reg1==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+
+		sp--;
+		type[sp-1]=NeutralizationType(type[sp-1],index_stack[sp-1],type[sp],index_stack[sp]);
+	}
+	else{
+		//32ビット以下の整数演算
+
+		SetTowTermToReg_Whole32Calc(type,sp,&reg1,&reg2);
+
+		if(idCalc==CALC_XOR){
+			//xor reg1,reg2
+			compiler.codeGenerator.op_xor_reg(sizeof(long),reg1,reg2);
+		}
+		else if(idCalc==CALC_OR){
+			//or reg1,reg2
+			compiler.codeGenerator.op_or_reg(sizeof(long),reg1,reg2);
+		}
+		else if(idCalc==CALC_AND){
+			//and reg1,reg2
+			compiler.codeGenerator.op_and_reg(sizeof(long),reg1,reg2);
+		}
+		else
+		{
+			throw;
+		}
+
+		if(reg1==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+
+		sp--;
+		type[sp-1]=NeutralizationType(type[sp-1],index_stack[sp-1],type[sp],index_stack[sp]);
+	}
+
+	*pStackPointer=sp;
+	return 1;
+}
+
+BOOL Calc_Not(int *type,int sp){
+	//value[sp-1]=Not value[sp-1]
+	//NOT演算子
+
+	if(IsRealNumberType(type[sp-1])){
+		//実数のとき
+		compiler.errorMessenger.Output(45,"Not",cp);
+		return 0;
+	}
+
+	int reg;
+
+	if( type[sp - 1] == DEF_BOOLEAN ){
+		SetOneTermToReg_Whole32Calc(type[sp-1],&reg);
+
+		if( reg != REG_RAX ){
+			// raxを演算レジスタとして利用するため、一時的に退避しておく
+
+			//mov qword ptr[rsp+offset],rax     ※スタックフレームを利用
+			pobj_sf->push(REG_RAX);
+		}
+
+		//cmp reg,0
+		compiler.codeGenerator.op_cmp_value(Type(type[sp-1]).GetSize(),reg,0);
+
+		//setne al
+		compiler.codeGenerator.op_setne( REG_RAX );
+
+		//and rax,000000FFh
+		compiler.codeGenerator.op_and64_value(REG_RAX,(int)0xFF);
+
+		//neg
+		compiler.codeGenerator.op_neg( REG_RAX );
+
+		//sbb rax, rax
+		compiler.codeGenerator.op_sbb_RR( sizeof(_int64), REG_RAX, REG_RAX );
+
+		//add rax, 1
+		compiler.codeGenerator.op_add_RV( REG_RAX, 1 );
+
+		if( reg != REG_RAX ){
+			//mov reg,rax
+			compiler.codeGenerator.op_mov_RR( reg, REG_RAX );
+
+			//mov rax,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(REG_RAX);
+		}
+
+		if(reg==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+	}
+	else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){
+		SetOneTermToReg_Whole64Calc(type[sp-1],&reg);
+
+		//not reg
+		compiler.codeGenerator.op_not_reg(sizeof(_int64),reg);
+
+		if(reg==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+	}
+	else if(IsWholeNumberType(type[sp-1])){
+		SetOneTermToReg_Whole32Calc(type[sp-1],&reg);
+
+		//not reg
+		compiler.codeGenerator.op_not_reg(sizeof(long),reg);
+
+		if(reg==REG_R14){
+			//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+			pobj_sf->push(REG_R14);
+		}
+	}
+
+	return 1;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/NumOpe_Relation.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/NumOpe_Relation.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/NumOpe_Relation.cpp	(revision 482)
@@ -0,0 +1,168 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+BOOL CalcTwoTerm_Relational(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer){
+	int reg1,reg2;
+	int AnswerType;
+
+	int sp;
+	sp=*pStackPointer;
+
+	AnswerType=NeutralizationType(type[sp-2],index_stack[sp-2],type[sp-1],index_stack[sp-1]);
+
+	if(IsRealNumberType(AnswerType)){
+		////////////////
+		// 実数演算
+		////////////////
+		int xmm_reg1,xmm_reg2;
+
+		//2つの項を適切なレジスタにセット
+		SetTowTermToReg_RealCalc(AnswerType,type,sp,&xmm_reg1,&xmm_reg2);
+
+		if(AnswerType==DEF_DOUBLE){
+			//comisd xmm_reg1,xmm_reg2
+			compiler.codeGenerator.op_comisd(xmm_reg1,xmm_reg2);
+		}
+		else if(AnswerType==DEF_SINGLE){
+			//comiss xmm_reg1,xmm_reg2
+			compiler.codeGenerator.op_comiss(xmm_reg1,xmm_reg2);
+		}
+
+		//Xmmレジスタを解放
+		pobj_reg->UnlockXmmReg();
+
+		//汎用レジスタを確保
+		reg1=pobj_reg->LockReg();
+	}
+	else if(Is64Type(AnswerType)){
+		//////////////////////
+		// 64ビット整数演算
+		//////////////////////
+
+		//2つの項を適切なレジスタにセット
+		SetTowTermToReg_Whole64Calc(type,sp,&reg1,&reg2);
+
+		//cmp reg1,reg2
+		compiler.codeGenerator.op_cmp_reg(sizeof(_int64),reg1,reg2);
+	}
+	else{
+		//////////////////////
+		// 32ビット整数演算
+		//////////////////////
+
+		//2つの項を適切なレジスタにセット
+		SetTowTermToReg_Whole32Calc(type,sp,&reg1,&reg2);
+
+		//cmp reg1,reg2
+		compiler.codeGenerator.op_cmp_reg(sizeof(long),reg1,reg2);
+	}
+
+
+	////////////////////
+	// 条件分岐
+	////////////////////
+
+	int jmpOffset = 5;
+
+	if(idCalc==CALC_PE){
+		//	reg1 <= reg2
+		if(IsSignedType(AnswerType)&&IsWholeNumberType(AnswerType)){
+			//符号あり演算
+			//jle
+			compiler.codeGenerator.op_jle( jmpOffset );
+		}
+		else{
+			//符号なし演算
+			//jbe
+			compiler.codeGenerator.op_jbe( jmpOffset );
+		}
+	}
+	else if(idCalc==CALC_QE){
+		//  reg1 >= reg2
+		if(IsSignedType(AnswerType)&&IsWholeNumberType(AnswerType)){
+			//符号あり演算
+			//jge
+			compiler.codeGenerator.op_jge( jmpOffset );
+		}
+		else{
+			//符号なし演算
+			//jae
+			compiler.codeGenerator.op_jae( jmpOffset );
+		}
+	}
+	else if(idCalc==CALC_P){
+		//	reg1 < reg2
+		if(IsSignedType(AnswerType)&&IsWholeNumberType(AnswerType)){
+			//符号あり演算
+			//jl
+			compiler.codeGenerator.op_jl( jmpOffset );
+		}
+		else{
+			//符号なし演算
+			//jb
+			compiler.codeGenerator.op_jb( jmpOffset );
+		}
+	}
+	else if(idCalc==CALC_Q){
+		//  reg1 > reg2
+		if(IsSignedType(AnswerType)&&IsWholeNumberType(AnswerType)){
+			//符号あり演算
+			//jg
+			compiler.codeGenerator.op_jg( jmpOffset );
+		}
+		else{
+			//符号なし演算
+			//ja
+			compiler.codeGenerator.op_ja( jmpOffset );
+		}
+	}
+	else if(idCalc==CALC_NOTEQUAL){
+		//  reg1 <> reg2
+
+		//jne
+		compiler.codeGenerator.op_jne( jmpOffset );
+	}
+	else if(idCalc==CALC_EQUAL){
+		//  reg1 = reg2
+
+		//je
+		compiler.codeGenerator.op_je( jmpOffset );
+	}
+
+
+	//////////////////////
+	// FALSEをセット
+	//////////////////////
+
+	//xor reg1,reg1
+	compiler.codeGenerator.op_zero_reg(reg1);
+
+	//jmp 7（次のmovを飛び越す）
+	compiler.codeGenerator.op_jge( 7 );
+
+
+	///////////////////
+	// Trueをセット
+	///////////////////
+
+	//mov reg1,1
+	compiler.codeGenerator.op_mov_RV(sizeof(_int64),reg1,1);
+
+
+	if(reg1==REG_R14){
+		//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+		pobj_sf->push(REG_R14);
+	}
+
+	sp--;
+
+	*pStackPointer=sp;
+
+	type[sp-1]=DEF_BOOLEAN;
+
+	return 1;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/NumOpe_TypeOperation.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/NumOpe_TypeOperation.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/NumOpe_TypeOperation.cpp	(revision 482)
@@ -0,0 +1,594 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void ExtendTypeTo64( const Type &oldType, int reg ){
+	if( oldType.IsLong() )
+	{
+		//movsxd reg64,reg32
+		compiler.codeGenerator.op_movsxd(reg,reg);
+	}
+	else if( oldType.IsDWord() )
+	{
+		//and reg,00000000FFFFFFFFh
+	}
+	else if( oldType.IsInteger() )
+	{
+		//movsx reg64,reg16
+		compiler.codeGenerator.op_movsx64_FromReg16(reg,reg);
+	}
+	else if( oldType.IsWord() )
+	{
+		//and reg,000000000000FFFFh
+		compiler.codeGenerator.op_and64_value(reg,(int)0xFFFF);
+	}
+	else if( oldType.IsSByte() )
+	{
+		//movsx reg64,reg8
+		compiler.codeGenerator.op_movsx64_FromReg8(reg,reg);
+	}
+	else if( oldType.IsByte() || oldType.IsBoolean() )
+	{
+		//and reg,00000000000000FFh
+		compiler.codeGenerator.op_and64_value(reg,(int)0x00FF);
+	}
+}
+void ExtendTypeTo32( const Type &oldType, int reg ){
+	if( oldType.IsInteger() )
+	{
+		//movsx reg32,reg16
+		compiler.codeGenerator.op_movsx32_FromReg16(reg,reg);
+	}
+	else if( oldType.IsWord() )
+	{
+		//and reg,0000FFFFh
+		compiler.codeGenerator.op_and32_value(reg,(int)0xFFFF);
+	}
+	else if( oldType.IsSByte() )
+	{
+		//movsx reg32,reg8
+		compiler.codeGenerator.op_movsx32_FromReg8(reg,reg);
+	}
+	else if( oldType.IsByte() || oldType.IsBoolean() )
+	{
+		//and reg,000000FFh
+		compiler.codeGenerator.op_and32_value(reg,(int)0xFF);
+	}
+}
+void ExtendTypeTo16( const Type &oldType, int reg ){
+	if( oldType.IsSByte() )
+	{
+		//movsx reg16,reg8
+		compiler.codeGenerator.op_movsx16_FromReg8(reg,reg);
+	}
+	else if( oldType.IsByte() || oldType.IsBoolean() )
+	{
+		//and reg,000000FFh
+		compiler.codeGenerator.op_and32_value(reg,(int)0xFF);
+	}
+}
+
+void ChangeTypeToXmm_Double(int type,int xmm_reg,int general_reg){
+	if(type==DEF_DOUBLE){
+		//なにもしない
+	}
+	else if(type==DEF_SINGLE){
+		//Single型
+
+		//cvtss2sd
+		compiler.codeGenerator.op_cvtss2sd(xmm_reg,xmm_reg);
+	}
+	else if(Is64Type(type)){
+		//64ビット整数型
+
+		//cvtsi2sd xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2sd_reg(sizeof(_int64),xmm_reg,general_reg);
+
+		if(type==DEF_QWORD){
+			//符号なし
+
+			//test reg,reg
+			compiler.codeGenerator.op_test(general_reg,general_reg);
+
+			//jge 9
+			compiler.codeGenerator.op_jge( 9 );
+
+			//addsd xmm_reg,qword ptr[offset]	※offset value:43f0000000000000
+			_int64 i64data=0x43f0000000000000;
+			long temp=compiler.GetObjectModule().dataTable.Add( i64data );
+			compiler.codeGenerator.PutOld(
+				(char)0xF2,
+				(char)0x0F,
+				(char)0x58,
+				(char)(0x04 | REGISTER_OPERAND(xmm_reg)<<3),
+				(char)0x25
+			);
+			compiler.codeGenerator.PutOld(
+				temp,
+				Schedule::DataTable
+			);
+		}
+	}
+	else if(type==DEF_DWORD){
+		//符号なし32ビット値
+
+		//64ビットにレジスタ値を拡張
+		ExtendTypeTo64(type,general_reg);
+
+		//cvtsi2sd xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2sd_reg(sizeof(_int64),xmm_reg,general_reg);
+	}
+	else{
+		//その他整数
+
+		//32ビットにレジスタ値を拡張
+		ExtendTypeTo32(type,general_reg);
+
+		//cvtsi2sd xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2sd_reg(sizeof(long),xmm_reg,general_reg);
+	}
+}
+void ChangeTypeToXmm_Single(int type,int xmm_reg,int general_reg){
+	if(type==DEF_DOUBLE){
+		//Double型
+
+		//cvtsd2ss
+		compiler.codeGenerator.op_cvtsd2ss(xmm_reg,xmm_reg);
+	}
+	else if(type==DEF_SINGLE){
+		//なにもしない
+	}
+	else if(Is64Type(type)){
+		//64ビット整数型
+
+		//cvtsi2ss xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2ss_reg(sizeof(_int64),xmm_reg,general_reg);
+
+		if(type==DEF_QWORD){
+			//符号なし
+
+			//test reg,reg
+			compiler.codeGenerator.op_test(general_reg,general_reg);
+
+			//jge 9
+			compiler.codeGenerator.op_jge( 9 );
+
+			//addss xmm_reg,dword ptr[offset]	※offset value:5f800000
+			long i32data=0x5f800000;
+			long temp=compiler.GetObjectModule().dataTable.Add( i32data );
+			compiler.codeGenerator.PutOld(
+				(char)0xF3,
+				(char)0x0F,
+				(char)0x58,
+				(char)(0x04 | REGISTER_OPERAND(xmm_reg)<<3),
+				(char)0x25
+			);
+			compiler.codeGenerator.PutOld(
+				temp,
+				Schedule::DataTable
+			);
+		}
+	}
+	else if(type==DEF_DWORD){
+		//符号なし32ビット値
+
+		//64ビットにレジスタ値を拡張
+		ExtendTypeTo64(type,general_reg);
+
+		//cvtsi2ss xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2ss_reg(sizeof(_int64),xmm_reg,general_reg);
+	}
+	else{
+		//その他整数
+
+		//32ビットにレジスタ値を拡張
+		ExtendTypeTo32(type,general_reg);
+
+		//cvtsi2ss xmm_reg,reg
+		compiler.codeGenerator.op_cvtsi2ss_reg(sizeof(long),xmm_reg,general_reg);
+	}
+}
+
+void ChangeTypeToWhole( const Type &oldType, const Type &newType, int reg, int xmm_reg )
+{
+	if( oldType.IsDouble() )
+	{
+		if( newType.Is64() )
+		{
+			//cvttsd2si reg,xmm_reg
+			compiler.codeGenerator.op_cvttsd2si_xmm(sizeof(_int64),reg,xmm_reg);
+		}
+		else
+		{
+			//cvttsd2si reg,xmm_reg
+			compiler.codeGenerator.op_cvttsd2si_xmm(sizeof(long),reg,xmm_reg);
+		}
+	}
+	if( oldType.IsSingle() )
+	{
+		if( newType.Is64() )
+		{
+			//cvttss2si reg,xmm_reg
+			compiler.codeGenerator.op_cvttss2si_xmm(sizeof(_int64),reg,xmm_reg);
+		}
+		else
+		{
+			//cvttss2si reg,xmm_reg
+			compiler.codeGenerator.op_cvttss2si_xmm(sizeof(long),reg,xmm_reg);
+		}
+	}
+	else{
+		//整数から整数へ変換
+
+		if( newType.Is64() )
+		{
+			ExtendTypeTo64(oldType,reg);
+		}
+		if( newType.GetSize() == sizeof(long) )
+		{
+			ExtendTypeTo32(oldType,reg);
+		}
+		if( newType.GetSize() == sizeof(short) )
+		{
+			ExtendTypeTo16(oldType,reg);
+		}
+	}
+}
+
+
+
+/////////////////////////////////////////
+// 1つの項を適切なレジスタへセット
+/////////////////////////////////////////
+
+void SetOneTermToReg_RealCalc(int TermType,int *pXmmReg){
+	int xmm_reg;
+
+	if(IsRealNumberType(TermType)){
+		//実数型
+		xmm_reg=pobj_reg->GetLockingXmmReg();
+
+		if(xmm_reg==REG_XMM4){
+			if(TermType==DEF_DOUBLE){
+				//movlpd xmm4,qword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg,sizeof(double));
+			}
+			if(TermType==DEF_SINGLE){
+				//movss xmm4,dword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg,sizeof(float));
+			}
+		}
+	}
+	else{
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+
+	*pXmmReg=xmm_reg;
+}
+void SetOneTermToReg_Whole64Calc(int TermType,int *pReg){
+	//1つの項を適切なレジスタへセット（64ビット整数演算用）
+	int reg;
+
+	reg=pobj_reg->GetLockingReg();
+
+	if(reg==REG_R14){
+		//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R14);
+	}
+
+	//レジスタ値を64ビットに拡張
+	ExtendTypeTo64(TermType,reg);
+
+	*pReg=reg;
+}
+void SetOneTermToReg_Whole32Calc(int TermType,int *pReg){
+	//1つの項を適切なレジスタへセット（32ビット整数演算用）
+	int reg;
+
+	reg=pobj_reg->GetLockingReg();
+
+	if(reg==REG_R14){
+		//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R14);
+	}
+
+	//レジスタ値を32ビットに拡張
+	ExtendTypeTo32(TermType,reg);
+
+	*pReg=reg;
+}
+
+
+
+/////////////////////////////////////////
+// 2つの項を適切なレジスタへセット
+/////////////////////////////////////////
+
+void SetTowTermToReg_RealCalc(int AnswerType,int *type,int sp,int *pXmmReg1,int *pXmmReg2){
+	//2つの項を適切なレジスタへセット（Double演算用）
+	int xmm_reg1,xmm_reg2,temp_reg;
+
+
+	///////////////////
+	// 第2項
+	///////////////////
+
+	if(IsRealNumberType(type[sp-1])){
+		//実数型
+		xmm_reg2=pobj_reg->UnlockXmmReg();
+
+		if(xmm_reg2==REG_XMM4){
+			xmm_reg2=REG_XMM5;
+
+			if(type[sp-1]==DEF_DOUBLE){
+				//movlpd xmm5,qword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg2,sizeof(double));
+			}
+			if(type[sp-1]==DEF_SINGLE){
+				//movss xmm5,dword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg2,sizeof(float));
+			}
+		}
+		else{
+			if(!IsRealNumberType(type[sp-2])){
+				if(type[sp-1]==DEF_DOUBLE){
+					//movsd xmm5,xmm_reg
+					compiler.codeGenerator.op_movsd_RR( REG_XMM5, xmm_reg2 );
+				}
+				if(type[sp-1]==DEF_SINGLE){
+					//movss xmm5,xmm_reg
+					compiler.codeGenerator.op_movss_RR( REG_XMM5, xmm_reg2 );
+				}
+
+				xmm_reg2=REG_XMM5;
+			}
+		}
+	}
+	else{
+		//整数値
+
+		temp_reg=pobj_reg->UnlockReg();
+
+		if(temp_reg==REG_R14){
+			//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(REG_R14);
+		}
+
+		xmm_reg2=REG_XMM5;
+	}
+
+	//汎用レジスタ（temp_reg）をXMMレジスタ（xmm_reg2）にコピー
+	if(AnswerType==DEF_DOUBLE)
+		ChangeTypeToXmm_Double(type[sp-1],xmm_reg2,temp_reg);
+	if(AnswerType==DEF_SINGLE)
+		ChangeTypeToXmm_Single(type[sp-1],xmm_reg2,temp_reg);
+
+
+	///////////////////
+	// 第1項
+	///////////////////
+
+	if(IsRealNumberType(type[sp-2])){
+		//実数
+		xmm_reg1=pobj_reg->GetLockingXmmReg();
+
+		if(xmm_reg1==REG_XMM4){
+			if(type[sp-2]==DEF_DOUBLE){
+				//movlpd xmm4,qword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg1,sizeof(double));
+			}
+			if(type[sp-2]==DEF_SINGLE){
+				//movss xmm4,dword ptr[rsp+offset]		※スタックフレームを利用
+				pobj_sf->pop(xmm_reg1,sizeof(float));
+			}
+		}
+	}
+	else{
+		//整数
+
+		temp_reg=pobj_reg->UnlockReg();
+
+		if(temp_reg==REG_R14){
+			//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(REG_R14);
+		}
+
+		xmm_reg1=pobj_reg->LockXmmReg();
+	}
+
+	//汎用レジスタ（temp_reg）をXMMレジスタ（xmm_reg1）にコピー
+	if(AnswerType==DEF_DOUBLE)
+		ChangeTypeToXmm_Double(type[sp-2],xmm_reg1,temp_reg);
+	if(AnswerType==DEF_SINGLE)
+		ChangeTypeToXmm_Single(type[sp-2],xmm_reg1,temp_reg);
+
+
+	*pXmmReg1=xmm_reg1;
+	*pXmmReg2=xmm_reg2;
+}
+void SetTowTermToReg_Whole64Calc(int *type,int sp,int *pReg1,int *pReg2){
+	//2つの項を適切なレジスタへセット（64ビット整数演算用）
+	int reg1,reg2;
+
+	//////////////////
+	// 第2項
+	//////////////////
+	reg2=pobj_reg->UnlockReg();
+
+	if(reg2==REG_R14){
+		//mov r15,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R15);
+
+		reg2=REG_R15;
+	}
+
+	//レジスタ値を64ビットに拡張
+	ExtendTypeTo64(type[sp-1],reg2);
+
+
+	//////////////////
+	// 第1項
+	//////////////////
+	reg1=pobj_reg->GetLockingReg();
+
+	if(reg1==REG_R14){
+		//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R14);
+	}
+
+	//レジスタ値を64ビットに拡張
+	ExtendTypeTo64(type[sp-2],reg1);
+
+
+	*pReg1=reg1;
+	*pReg2=reg2;
+}
+void SetTowTermToReg_Whole32Calc(int *type,int sp,int *pReg1,int *pReg2){
+	//2つの項を適切なレジスタへセット（32ビット整数演算用）
+	int reg1,reg2;
+
+	//////////////////
+	// 第2項
+	//////////////////
+	reg2=pobj_reg->UnlockReg();
+
+	if(reg2==REG_R14){
+		//mov r15,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R15);
+
+		reg2=REG_R15;
+	}
+
+	//レジスタ値を32ビットに拡張
+	ExtendTypeTo32(type[sp-1],reg2);
+
+
+	//////////////////
+	// 第1項
+	//////////////////
+	reg1=pobj_reg->GetLockingReg();
+
+	if(reg1==REG_R14){
+		//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R14);
+	}
+
+	//レジスタ値を32ビットに拡張
+	ExtendTypeTo32(type[sp-2],reg1);
+
+
+	*pReg1=reg1;
+	*pReg2=reg2;
+}
+
+
+
+////////////////////////////
+// As 演算子によるキャスト
+////////////////////////////
+
+BOOL Calc_Cast(int *type,LONG_PTR *index_stack,int *pStackPointer){
+	//キャスト
+
+	int sp;
+	sp=*pStackPointer;
+
+	int castBasicType = type[sp-1];
+	if((castBasicType&FLAG_CAST)==0){
+		compiler.errorMessenger.Output(47,NULL,cp);
+		return 0;
+	}
+	castBasicType = castBasicType&(~FLAG_CAST);
+
+	Type oldType( type[sp-2], index_stack[sp-2] );
+	Type castType( castBasicType, index_stack[sp-1] );
+
+	int xmm_reg,reg;
+	if( castType.IsReal() )
+	{
+		//実数型へキャスト
+
+		if( oldType.IsReal() )
+		{
+			SetOneTermToReg_RealCalc(oldType.GetBasicType(),&xmm_reg);
+		}
+		else
+		{
+			if( oldType.Is64() )
+			{
+				SetOneTermToReg_Whole64Calc(oldType.GetBasicType(),&reg);
+			}
+			else if( oldType.IsWhole() )
+			{
+				SetOneTermToReg_Whole32Calc(oldType.GetBasicType(),&reg);
+			}
+
+			pobj_reg->UnlockReg();
+
+			xmm_reg=pobj_reg->LockXmmReg();
+		}
+
+		if( castType.IsDouble() )
+		{
+			//Double型にデータ変換
+			ChangeTypeToXmm_Double(oldType.GetBasicType(),xmm_reg,reg);
+		}
+		else if( castType.IsSingle() )
+		{
+			//Single型にデータ変換
+			ChangeTypeToXmm_Single(oldType.GetBasicType(),xmm_reg,reg);
+		}
+
+		if(xmm_reg==REG_XMM4){
+			//movsd qword ptr[rsp+offset],xmm4		※スタックフレームを利用
+			pobj_sf->push(REG_XMM4,sizeof(double));
+		}
+	}
+	else{
+		//その他整数型へ変換
+
+		if( oldType.IsReal() )
+		{
+			SetOneTermToReg_RealCalc(oldType.GetBasicType(),&xmm_reg);
+
+			pobj_reg->UnlockXmmReg();
+
+			reg=pobj_reg->LockReg();
+
+			//整数型へデータ変換
+			ChangeTypeToWhole(oldType,castType,reg,xmm_reg);
+
+			if(reg==REG_R14){
+				//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+				pobj_sf->push(REG_R14);
+			}
+		}
+		else{
+			reg=pobj_reg->GetLockingReg();
+
+			if(reg==REG_R14){
+				//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+				pobj_sf->pop(REG_R14);
+			}
+
+			//整数型へデータ変換
+			ChangeTypeToWhole(oldType,castType,reg,0);
+
+			if(reg==REG_R14){
+				//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+				pobj_sf->push(REG_R14);
+			}
+		}
+	}
+
+	type[sp-2] = castType.GetBasicType();
+	index_stack[sp-2] = castType.GetIndex();
+
+	sp--;
+
+	*pStackPointer=sp;
+	return 1;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Opcode.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Opcode.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Opcode.h	(revision 482)
@@ -0,0 +1,365 @@
+#pragma once
+
+#include <Type.h>
+#include <Procedure.h>
+#include "MachineFixed.h"
+
+
+//変数の種類
+#define NON_VAR				0
+#define VAR_GLOBAL			1	// Global Variable
+#define VAR_REFGLOBAL		2	// Global Refference Variable
+#define VAR_LOCAL			3	// Local Variable
+#define VAR_REFLOCAL		4	// Local Refference Variable
+#define VAR_DIRECTMEM		5	// Direct memory
+
+
+extern int cp;
+
+#define breakpoint compiler.codeGenerator.PutOld( (char)0xCC );
+
+
+//プロシージャ
+struct PROCEDURE{
+	char name[255];
+	int address;
+	int types[MAX_PARMS];
+	_int8 ByVal[MAX_PARMS];
+	BOOL ReturnType;
+};
+
+//With情報
+struct WITHINFO{
+	char **ppName;
+	int *pWithCp;
+	int num;
+};
+
+
+class StackFrame
+{
+	///////////////////////////
+	// スタックフレーム管理
+	///////////////////////////
+
+	PertialSchedules pertialSchedules;
+
+	int lowest_sp;			//スタックポインタの最下位位置
+	int now_sp;				//スタックポインタ
+	int max_parm_size;		//パラメータの最大サイズ
+
+public:
+	//コンストラクタ
+	StackFrame();
+
+	//デストラクタ
+	~StackFrame();
+
+	int GetFrameSize( int localParamSize );
+	int GetNowSp();
+	void mov_sp( int reg );
+	int push(int reg);
+	void push(int xmm_reg,int varSize);
+	void ref_offset_data( int reg, int sp_offset );
+	void ref(int reg);
+	void ref(int xmm_reg,int varSize);
+	void pop(int reg = REG_NON);
+	void pop(int xmm_reg,int varSize);
+	void parameter_allocate(int size);
+	void RunningSchedule( int stackFrameSize );
+
+	void error_check(void);
+};
+extern StackFrame *pobj_sf;
+
+
+class CBlockReg{
+	int array_BlockReg[256];
+	int num;
+
+public:
+	CBlockReg();
+	void lock(int reg);
+	void unlock(int reg);
+	BOOL check(int reg);
+	void clear(void);
+
+	//レジスタのバックアップと復旧
+	void backup();
+	void restore();
+};
+extern CBlockReg *pobj_BlockReg;
+class CRegister{
+	////////////////////
+	// レジスタ管理
+	////////////////////
+
+	//利用可能なレジスタを列挙する関数
+	void EnumRegister(int *pRegList,int nMaxList,int *array_reg,int *sp,int AnswerReg);
+
+	int array_UseReg[16],sp_UseReg;
+
+	int array_XmmReg[16];
+	int sp_XmmReg;
+
+	int init_sp_reg,init_sp_xmm_reg;
+
+public:
+	CRegister(){};
+	CRegister(int AnswerReg);
+	~CRegister(){};
+
+	//コンパイラにバグがないかをチェックする機構
+	void bug_check();
+
+	//汎用レジスタ
+	int GetNextReg();
+	int GetLockingReg();
+	int LockReg();
+	int UnlockReg();
+
+	//XMMレジスタ
+	int GetNextXmmReg();
+	int GetLockingXmmReg();
+	int LockXmmReg();
+	int UnlockXmmReg();
+
+	//レジスタが利用中かどうかを調べる
+	bool IsUsing( int reg );
+
+	//レジスタのバックアップと復旧
+	void backup();
+	void restore();
+};
+extern CRegister *pobj_reg;
+
+
+#define BACKUP_REGISTER_RESOURCE								\
+	/* レジスタをスタックフレームにバックアップ */				\
+	pobj_BlockReg->backup();									\
+	if(pobj_reg) pobj_reg->backup();							\
+																\
+	/* レジスタブロッキングオブジェクトを退避して再生成 */		\
+	CBlockReg *pobj_BlockReg_back;								\
+	pobj_BlockReg_back=pobj_BlockReg;							\
+	pobj_BlockReg=new CBlockReg;								\
+																\
+	/* レジスタ管理オブジェクトポインタを退避して0をセット */	\
+	CRegister *pobj_reg_back;									\
+	pobj_reg_back=pobj_reg;										\
+	pobj_reg=0;
+
+#define RESTORE_REGISTER_RESOURCE								\
+	/* レジスタブロッキングオブジェクトポインタを復元 */		\
+	delete pobj_BlockReg;										\
+	pobj_BlockReg=pobj_BlockReg_back;							\
+																\
+	/* レジスタ管理オブジェクトポインタを復元 */				\
+	delete pobj_reg;											\
+	pobj_reg=pobj_reg_back;										\
+																\
+	/* レジスタをスタックフレームから復元 */					\
+	if(pobj_reg) pobj_reg->restore();							\
+	pobj_BlockReg->restore();
+
+
+
+//RSrcSection.cpp
+char *GetRSrcSectionBuffer(int *pLen);
+
+//Compile.cpp
+void Compile( const char *source );
+void ChangeOpcode(char *Command);
+void GetGlobalDataForDll(void);
+DWORD CompileBuffer(char Return_Sequence,WORD Return_Command);
+
+//Register.cpp
+BOOL IsGeneralReg(int reg);
+BOOL IsXmmReg(int reg);
+BOOL IsVolatileReg(int reg);
+void IfR14Push( int reg );
+
+//Compile_Calc.cpp
+void SetVariableFromRax( const Type &varType, int CalcType,RELATIVE_VAR *pRelativeVar);
+void OpcodeCalc(const char *Command);
+
+//NumOpe.cpp
+bool TermOpeOnlyVariable( const char *term, Type &resultType, RELATIVE_VAR &relativeVar, bool isWriteAccess );
+bool TermOpe(
+			 const char *term,
+			 const Type &baseType,
+			 Type &resultType,
+			 bool &isLiteral,
+			 bool &isNeedHeapFreeStructure,
+			 bool *pIsClassName = NULL,
+			 bool isProcedureCallOnly = false,
+			 bool isWriteAccess = false );
+bool NumOpe( int *pReg,
+		   const char *Command,
+		   const Type &baseType,
+		   Type &resultType,
+		   bool *pbIsNeedHeapFreeStructure = NULL );
+
+//NumOpe_Arithmetic.cpp
+BOOL CalcTwoTerm_Arithmetic(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Mod(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Divide(int *type,int *pStackPointer,int BaseType);
+BOOL Calc_IntDivide(int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_MinusMark(int *type,int sp);
+BOOL Calc_Power(int *type,int *pStackPointer);
+BOOL Calc_Shift(int idCalc,int *type,int *pStackPointer);
+
+//NumOpe_Logical.cpp
+BOOL CalcTwoTerm_Logical(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer);
+BOOL Calc_Not(int *type,int sp);
+
+//NumOpe_Relation.cpp
+BOOL CalcTwoTerm_Relational(int idCalc,int *type,LONG_PTR *index_stack,int *pStackPointer);
+
+//NumOpe_TypeOperation.cpp
+void ExtendTypeTo64( const Type &oldType, int reg );
+void ExtendTypeTo32( const Type &oldType, int reg );
+void ExtendTypeTo16( const Type &oldType, int reg );
+void ChangeTypeToXmm_Double(int type,int xmm_reg,int general_reg);
+void ChangeTypeToXmm_Single(int type,int xmm_reg,int general_reg);
+void ChangeTypeToWhole( const Type &oldType, const Type &newType, int reg, int xmm_reg );
+void SetOneTermToReg_RealCalc(int TermType,int *pXmmReg);
+void SetOneTermToReg_Whole64Calc(int TermType,int *pReg);
+void SetOneTermToReg_Whole32Calc(int TermType,int *pReg);
+void SetTowTermToReg_RealCalc(int AnswerType,int *type,int sp,int *pXmmReg1,int *pXmmReg2);
+void SetTowTermToReg_Whole64Calc(int *type,int sp,int *pReg1,int *pReg2);
+void SetTowTermToReg_Whole32Calc(int *type,int sp,int *pReg1,int *pReg2);
+BOOL Calc_Cast(int *type,LONG_PTR *index_stack,int *pStackPointer);
+
+//Compile_Set_Var.cpp
+BOOL IsUse_r11(RELATIVE_VAR *pRelativeVar);
+void SetStructVariableFromRax( const Type &varType, const Type &calcType, RELATIVE_VAR *pRelativeVar,BOOL bUseHeap);
+void SetRealVariable(int VarType, int CalcType, RELATIVE_VAR *pRelativeVar);
+void SetBooleanVariable(int type,RELATIVE_VAR *pRelative);
+void SetWholeVariable(int varSize,int type,RELATIVE_VAR *pRelative);
+
+//increment.cpp
+void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight);
+
+//Compile_Calc_PushVar.cpp
+void SetXmmReg_DoubleVariable(RELATIVE_VAR *pRelativeVar,int xmm_reg);
+void SetXmmReg_SingleVariable(RELATIVE_VAR *pRelativeVar,int xmm_reg);
+void SetReg_WholeVariable( const Type &type, RELATIVE_VAR *pRelativeVar,int reg);
+
+//Compile_Object.cpp
+void Operator_New( const CClass &classObj, const char *objectSizeStr, const char *parameter,const Type &baseTypeInfo );
+void OpcodeDelete(const char *Parameter, bool isSweeping);
+
+//Compile_Var.cpp
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const Type &classType, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess);
+void SetThisPtrToReg(int reg);
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType, Subscripts *pResultSubscripts = NULL );
+bool SetInitGlobalData(int offset,const Type &type,const Subscripts &subscripts,const char *InitBuf);
+#define DIMFLAG_INITDEBUGVAR			0x01
+#define DIMFLAG_NONCALL_CONSTRACTOR		0x02
+#define DIMFLAG_STATIC					0x04
+#define DIMFLAG_CONST					0x08
+void dim( char *VarName, const Subscripts &subscripts, const Type &type, const char *InitBuf,const char *ConstractParameter,DWORD dwFlags);
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar);
+bool Compile_AddGlobalRootsForGc();
+
+//ParamImpl.cpp
+class ParamImpl{
+	char *Parms[255];
+	vector<Type> types;
+	int ParmsNum;
+
+	Type leftType;
+	Type returnType;
+
+	//一時オブジェクト管理用
+	bool useTempObject;
+	bool useTempParameters[255];
+	bool isNeedFreeStructures[255];
+	int StackOffsetOfTempObject[255];
+
+public:
+	ParamImpl(const char *buffer);
+	ParamImpl(const Parameters &params);
+	~ParamImpl();
+	void SetLeftType( const Type &type )
+	{
+		this->leftType = type;
+	}
+	void SetReturnType( const Type &returnType );
+
+private:
+	bool EvaluateOverloadScore( int level, const Parameters &targetParms, const Type &targetResultType, const Type &leftType, const UserProc &userProc, bool &isErrored );
+
+public:
+	const UserProc *_OverloadSolution( const char *name, std::vector<const UserProc *> &subs, const Type &leftType, bool isEnabledReturnType );
+	const UserProc *OverloadSolution( const char *name, std::vector<const UserProc *> &subs, const Type &leftType, bool isEnabledReturnType = false );
+
+	void ApplyDefaultParameters( const Parameters &params );
+	bool ErrorCheck( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+	void MacroParameterSupport( const Parameters &params );
+	void SetStructParameter( int reg, const Type &baseType, const char *expression );
+	void SetParameter( const string &procName, const Parameters &params, int SecondParmNum = -1, const UserProc *pUserProc = NULL );
+
+	//一時オブジェクトパラメータの生成と破棄
+	int NewTempParameters( const string &procName, const Parameters &params, int SecondParmNum = -1 );
+	void DeleteTempParameters();
+
+	void BackupParameter(int pi_num);
+	void RestoreParameter(int pi_num);
+};
+
+//CLockParameter.cpp
+#define MAX_LOCKPARMS 255
+class CDBLockParms{
+public:
+	int array_LevelCount[MAX_LOCKPARMS];
+	CDBLockParms();
+	~CDBLockParms();
+
+	void lock(int level);
+	void unlock(int level);
+};
+
+//Compile_CallProc.cpp
+#define PROCFLAG_NEW	1
+bool Opcode_CallProcPtr(const char *variable, const char *lpszParms,ProcPointer *pProcPointer);
+bool Opcode_CallProc(const char *Parameter,const UserProc *pUserProc,DWORD dwFlags,const char *ObjectName);
+bool Opcode_CallDllProc( const char *lpszParms,DllProc *pDllProc);
+void Opcode_CallDelegate( const Delegate &dg, const char *methodPtrValueStr, const char *objPtrValueStr, const char *params );
+
+//Compile_ProcOp.cpp
+void _compile_proc(const UserProc *pUserProc);
+
+//Compile_Func.cpp
+int GetFunctionFromName(char *FuncName);
+bool Opcode_CallFunc( const char *Parameter, const int FuncNum, const Type &baseType, Type &resultType, bool isCallOn = true );
+
+//OperatorProc.cpp
+void FreeTempObject(int reg,const CClass *pobj_c);
+int CallOperatorProc(BYTE idCalc, const Type &baseType, int *type_stack,LONG_PTR *index_stack,bool isNeedHeapFreeStructureStack[],int &sp);
+void CallCastOperatorProc(int reg,Type &calcType,BOOL bCalcUseHeap,const Type &toType);
+void CallIndexerGetterProc(int reg, const Type &classType, const char *ObjectName,char *Parameter,Type &resultType, DWORD dwProcFlags = 0 );
+
+//Compile_Statement.cpp
+void OpcodeOthers(const char *Command);
+void OpcodeIf(char *Parameter);
+void OpcodeGoto(char *Parameter);
+void OpcodeWhile(char *Parameter);
+void OpcodeFor(char *Parameter);
+void OpcodeForeach(const char *Parameter);
+void OpcodeDo(char *Parameter);
+void OpcodeContinue(void);
+void OpcodeExitSub(void);
+void OpcodeSelect( const char *Parameter );
+void OpcodeCase(char *Parameter);
+void OpcodeGosub(char *Parameter);
+void OpcodeReturn(char *Parameter);
+void OpcodeSetPtrData(char *Parameter,int type);
+
+
+//InsertOpcode.cpp
+void InsertDimStatement_ToProcHead(char *lpszCommand);
+
+
+BOOL IsSafeReg(int reg);
Index: /trunk/ab5.0/abdev/compiler_x64/OperatorProc.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/OperatorProc.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/OperatorProc.cpp	(revision 482)
@@ -0,0 +1,360 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void FreeTempObject(int reg,const CClass *pobj_c){
+	if(!IsSafeReg(reg)) compiler.errorMessenger.Output(300,NULL,cp);
+
+	////////////////////////////////////////////////
+	// 演算過程で利用した一時オブジェクトを破棄
+	// Thisポインタをr14レジスタを介して渡す
+	////////////////////////////////////////////////
+
+	const CMethod *method = pobj_c->GetDestructorMethod();
+	if( method ){
+		//mov rcx,reg
+		compiler.codeGenerator.op_mov_RR(REG_RCX,reg);
+
+		//call DestructorProcAddr
+		compiler.codeGenerator.op_call( &method->GetUserProc() );
+	}
+
+	//mov rcx,reg
+	compiler.codeGenerator.op_mov_RR(REG_RCX,reg);
+
+	//call free
+	extern const UserProc *pSub_free;
+	compiler.codeGenerator.op_call(pSub_free);
+}
+
+int CallOperatorProc(BYTE idCalc, const Type &baseType, int *type_stack,LONG_PTR *index_stack,bool isNeedHeapFreeStructureStack[],int &sp)
+{
+	Type leftType( type_stack[sp-2], index_stack[sp-2] );
+	Type rightType( type_stack[sp-1] & (~FLAG_CAST), index_stack[sp-1] );
+
+	//オーバーロードされたオペレータ関数を呼び出す
+	const CClass *pobj_c = &leftType.GetClass();
+
+	std::vector<const UserProc *> subs;
+	pobj_c->GetDynamicMethods().Enum( idCalc, subs );
+	if( subs.size() == 0 ){
+		return 0;
+	}
+
+
+	//項の数
+	BOOL bTwoTerm=1;
+	if(idCalc==CALC_AS) bTwoTerm=0;
+
+
+	/////////////////////////////////////////////
+	// オーバーロード解決用のパラメータを設定
+	/////////////////////////////////////////////
+
+	Parameters params;
+
+	if(bTwoTerm)
+	{
+		params.push_back( new Parameter( "", rightType ) );
+	}
+
+	//オーバーロードを解決
+	char temporary[255];
+	if(idCalc==CALC_EQUAL) lstrcpy(temporary,"==");
+	else GetCalcName(idCalc,temporary);
+	const UserProc *pUserProc = OverloadSolution( temporary, subs, params, baseType, leftType );
+
+	if(!pUserProc){
+		if(bTwoTerm){
+			delete params[0];
+		}
+		return -1;
+	}
+	else{
+		//オーバーロードされていないが、パラメータ個数が一致しないとき
+		if(params.size()!=pUserProc->Params().size()){
+			if(bTwoTerm){
+				delete params[0];
+			}
+			return -1;
+		}
+	}
+
+	for(int i=0;i<(int)params.size();i++){
+		CheckDifferentType(
+			*pUserProc->Params()[i],
+			*params[i],
+			NULL,
+			i);
+	}
+
+	if(bTwoTerm){
+		delete params[0];
+	}
+
+	int right_side_size = rightType.GetSize();
+
+	if(bTwoTerm){
+		if( pUserProc->RealParams()[1]->IsStruct() &&pUserProc->RealParams()[1]->IsRef() == false ){
+			//一時オブジェクトはメソッド内で破棄される
+			isNeedHeapFreeStructureStack[sp-1] = false;
+		}
+	}
+
+
+	if( pUserProc->ReturnType().IsStruct() ){
+		//////////////////////////////////////////////////////
+		// 戻り値に構造体インスタンスを持つ場合
+		// ※ByRef _System_ReturnValue パラメータ用領域を取得
+		//////////////////////////////////////////////////////
+
+
+		//////////////////////////////////////////////////////
+		/////    レジスタ資源のバックアップ
+		{	BACKUP_REGISTER_RESOURCE
+		//////////////////////////////////////////////////////
+
+			int object_size = pUserProc->ReturnType().GetClass().GetSize();
+
+			//mov rcx,object_size
+			compiler.codeGenerator.op_mov_RV(sizeof(_int64),REG_RCX,object_size);
+
+			//call calloc
+			extern const UserProc *pSub_calloc;
+			compiler.codeGenerator.op_call(pSub_calloc);
+
+			//mov r13,rax
+			compiler.codeGenerator.op_mov_RR(REG_R13,REG_RAX);
+
+		/////////////////////////////////////////////
+		//////   レジスタ資源を復元
+			RESTORE_REGISTER_RESOURCE
+		}////////////////////////////////////////////
+	}
+
+	int reg1,reg2;
+	if(bTwoTerm){
+		//右の項（実数の場合が未完成）
+		SetOneTermToReg_Whole64Calc(type_stack[sp-1],&reg2);
+		pobj_reg->UnlockReg();
+		if( !pUserProc->RealParams()[1]->IsRef() == false ){
+			//一時参照を作成
+			pobj_sf->push( reg2 );
+			pobj_sf->mov_sp( reg2 );
+		}
+	}
+
+	//左の項
+	SetOneTermToReg_Whole64Calc(DEF_INT64,&reg1);
+	pobj_reg->UnlockReg();
+
+	//ヒープ解放用に退避
+	if(isNeedHeapFreeStructureStack[sp-1]){
+		//mov qword ptr[rsp+offset],reg2     ※スタックフレームを利用
+		pobj_sf->push(reg2);
+	}
+	if(isNeedHeapFreeStructureStack[sp-2]){
+		//mov qword ptr[rsp+offset],reg1     ※スタックフレームを利用
+		pobj_sf->push(reg1);
+	}
+
+
+
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+		if(reg1==REG_RDX||reg1==REG_R8){
+			//mov r14,reg1
+			compiler.codeGenerator.op_mov_RR(REG_R14,reg1);
+			reg1=REG_R14;
+		}
+
+
+		if(bTwoTerm){
+			if( pUserProc->ReturnType().IsStruct() ){
+				//mov r8,reg2
+				compiler.codeGenerator.op_mov_RR(REG_R8,reg2);
+			}
+			else{
+				//mov rdx,reg2
+				compiler.codeGenerator.op_mov_RR(REG_RDX,reg2);
+			}
+		}
+
+		if( pUserProc->ReturnType().IsStruct() ){
+			//mov rdx,r13
+			compiler.codeGenerator.op_mov_RR(REG_RDX,REG_R13);
+		}
+
+		//mov rcx,reg1
+		compiler.codeGenerator.op_mov_RR(REG_RCX,reg1);
+
+		//call operator_proc
+		compiler.codeGenerator.op_call(pUserProc);
+
+		if( !pUserProc->ReturnType().IsNull() ){
+			//戻り値を一時的に退避
+
+			//mov r13,rax
+			compiler.codeGenerator.op_mov_RR(REG_R13,REG_RAX);
+		}
+
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+
+
+
+	if( isNeedHeapFreeStructureStack[sp-2] || isNeedHeapFreeStructureStack[sp-1] )
+	{
+		//////////////////////////////////////////////////////
+		/////    レジスタ資源のバックアップ
+		{	BACKUP_REGISTER_RESOURCE
+		//////////////////////////////////////////////////////
+
+			if( isNeedHeapFreeStructureStack[sp-2] )
+			{
+				//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+				pobj_sf->pop(REG_R14);
+
+				FreeTempObject(REG_R14,(CClass *)index_stack[sp-2]);
+			}
+			if( isNeedHeapFreeStructureStack[sp-1] )
+			{
+				//mov r14,qword ptr[rsp+offset]     ※スタックフレームを利用
+				pobj_sf->pop(REG_R14);
+
+				FreeTempObject(REG_R14,(CClass *)index_stack[sp-1]);
+			}
+
+		/////////////////////////////////////////////
+		//////   レジスタ資源を復元
+			RESTORE_REGISTER_RESOURCE
+		}////////////////////////////////////////////
+	}
+
+	if(bTwoTerm){
+		if( !pUserProc->RealParams()[1]->IsRef() == false ){
+			//一時参照を破棄
+			pobj_sf->pop();
+		}
+	}
+
+	if( !pUserProc->ReturnType().IsNull() ){
+		//戻り値をreg1にセット
+		reg1=pobj_reg->LockReg();
+
+		//mov reg1,r13
+		compiler.codeGenerator.op_mov_RR(reg1,REG_R13);
+	}
+
+	sp--;
+	type_stack[sp-1]=pUserProc->ReturnType().GetBasicType();
+	index_stack[sp-1]=pUserProc->ReturnType().GetIndex();
+
+	if( pUserProc->ReturnType().IsStruct() )
+	{
+		//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+		//※後にfreeする必要あり
+		isNeedHeapFreeStructureStack[sp-1] = true;
+	}
+	else
+	{
+		isNeedHeapFreeStructureStack[sp-1] = false;
+	}
+
+	return 1;
+}
+
+void CallCastOperatorProc(int reg,Type &calcType,BOOL bCalcUseHeap,const Type &toType){
+	int type_stack[10];
+	LONG_PTR index_stack[10];
+	bool array_bUseHeap[10];
+	int sp=2;
+	int iRet;
+
+
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+		//regを第一項目としてロック
+		pobj_reg=new CRegister(reg);
+		pobj_reg->LockReg();
+
+		if(bCalcUseHeap){
+			//未解放のインスタンスが存在する旨を示す警告
+			compiler.errorMessenger.Output(-105,NULL,cp);
+		}
+
+		//左辺
+		type_stack[0]=calcType.GetBasicType();
+		index_stack[0]=calcType.GetIndex();
+		array_bUseHeap[0]=0;
+		type_stack[1]=toType.GetBasicType();
+		index_stack[1]=toType.GetIndex();
+		array_bUseHeap[1]=0;
+
+		iRet=CallOperatorProc(CALC_AS,toType,type_stack,index_stack,array_bUseHeap,sp);
+
+		pobj_reg->UnlockReg();
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+
+
+	if(iRet==1){
+		//成功したとき
+		calcType.SetType( type_stack[0], index_stack[0] );
+		return;
+	}
+	else if(iRet==-1){
+		//エラーが発行されたとき
+		return;
+	}
+
+	//エラーを発行
+	compiler.errorMessenger.Output(-1,"キャスト演算子がオーバーロードされていません。",cp);
+}
+
+//インデクサ（getter）を呼び出す
+void CallIndexerGetterProc(int reg, const Type &classType, const char *ObjectName,char *Parameter,Type &resultType, DWORD dwProcFlags ){
+
+	std::vector<const UserProc *> subs;
+	classType.GetClass().GetDynamicMethods().Enum( CALC_ARRAY_GET, subs );
+	if( subs.size() == 0 ){
+		return;
+	}
+
+	const UserProc *pUserProc = subs[0];
+
+	//////////////////////////////////////////////////////
+	/////    レジスタ資源のバックアップ
+	{	BACKUP_REGISTER_RESOURCE
+	//////////////////////////////////////////////////////
+
+		Opcode_CallProc(Parameter,pUserProc,dwProcFlags,ObjectName);
+		resultType = pUserProc->ReturnType();
+
+		//mov reg,rax
+		compiler.codeGenerator.op_mov_RR(reg,REG_RAX);
+
+	/////////////////////////////////////////////
+	//////   レジスタ資源を復元
+		RESTORE_REGISTER_RESOURCE
+	}////////////////////////////////////////////
+
+
+	// 型パラメータを解決
+	ResolveFormalGenericTypeParameter( resultType, classType, pUserProc );
+}
Index: /trunk/ab5.0/abdev/compiler_x64/Register.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/Register.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/Register.cpp	(revision 482)
@@ -0,0 +1,318 @@
+#include "stdafx.h"
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+//エラー用
+extern int cp;
+
+
+////////////////////////////
+// レジスタのブロッキング
+////////////////////////////
+
+CBlockReg *pobj_BlockReg;
+
+CBlockReg::CBlockReg(){
+	num=0;
+}
+void CBlockReg::lock(int reg){
+	if(check(reg)){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+	array_BlockReg[num++]=reg;
+}
+void CBlockReg::unlock(int reg){
+	int i;
+	for(i=0;i<num;i++){
+		if(array_BlockReg[i]==reg) break;
+	}
+	if(i==num) return;
+
+	num--;
+	for(;i<num;i++){
+		array_BlockReg[i]=array_BlockReg[i+1];
+	}
+}
+BOOL CBlockReg::check(int reg){
+	int i;
+	for(i=0;i<num;i++){
+		if(array_BlockReg[i]==reg) return 1;
+	}
+	return 0;
+}
+void CBlockReg::clear(void){
+	num=0;
+}
+void CBlockReg::backup(){
+	int i;
+
+	for(i=num-1;i>=0;i--){
+		if(IS_XMM_REG(array_BlockReg[i])){
+			//movlpd qword ptr[rsp+offset],xmm_reg	※スタックフレームを利用
+			pobj_sf->push(array_BlockReg[i],sizeof(double));
+		}
+		else{
+			//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+			pobj_sf->push(array_BlockReg[i]);
+		}
+	}
+}
+void CBlockReg::restore(){
+	int i;
+
+	for(i=0;i<num;i++){
+		if(IS_XMM_REG(array_BlockReg[i])){
+			//movlpd xmm_reg,qword ptr[rsp+offset]	※スタックフレームを利用
+			pobj_sf->pop(array_BlockReg[i],sizeof(double));
+		}
+		else{
+			//mov reg,qword ptr[rsp+offset]     ※スタックフレームを利用
+			pobj_sf->pop(array_BlockReg[i]);
+		}
+	}
+}
+
+
+///////////////////
+// レジスタ管理
+///////////////////
+
+const int CalculationRegister[]={
+	REG_RAX,
+	REG_RCX,
+	REG_RDX,
+	REG_RBX,
+	REG_RSI,
+	REG_RDI,
+	REG_R8,
+	REG_R9,
+	REG_R10
+};
+
+const int CalculationXmmRegister[]={
+	REG_XMM0,
+	REG_XMM1,
+	REG_XMM2,
+	REG_XMM3,
+	/*XMM4、XMM5は演算時に一時的に利用*/
+/*	REG_XMM6,
+	REG_XMM7,
+	REG_XMM8,
+	REG_XMM9,
+	REG_XMM10,
+	REG_XMM11,
+	REG_XMM12,
+	REG_XMM13,
+	REG_XMM14,
+	REG_XMM15		関数呼び出し時のレジスタ保持を未搭載のため、保留*/
+};
+
+CRegister *pobj_reg;
+
+void CRegister::EnumRegister(int *pRegList,int nMaxList,int *array_reg,int *sp,int AnswerReg){
+	int i,i2,sw=0;
+
+	i2=nMaxList-1;
+	for(i=0;i2>=0;i++,i2--){
+		if(AnswerReg==pRegList[i2]){
+			sw=1;
+			i--;
+			continue;
+		}
+
+		if(pobj_BlockReg->check(pRegList[i2])){
+			//レジスタがブロッキングされているとき
+			i--;
+			continue;
+		}
+
+		array_reg[i]=pRegList[i2];
+	}
+
+	if(sw){
+		array_reg[i++]=AnswerReg;
+
+		//エラーチェック
+		if(pobj_BlockReg->check(AnswerReg)) compiler.errorMessenger.Output(300,NULL,cp);
+	}
+
+	*sp=i-1;
+}
+
+CRegister::CRegister(int AnswerReg){
+	/* 例： AnswerReg=REG_RCX	※REG_RCXをスタックの最後尾へセット
+								※r15、r14は一時保存用として利用する
+								※r13は同一関数内の単発処理用の一時保存レジスタとして利用する
+								※r12、r11は配列計算用として利用する
+	array_UseReg[0]=REG_R10
+	array_UseReg[1]=REG_R9
+	array_UseReg[2]=REG_R8
+	array_UseReg[3]=REG_RBX
+	array_UseReg[4]=REG_RDX
+	array_UseReg[5]=REG_RAX
+	array_UseReg[6]=REG_RCX	*/
+
+
+	///////////////////////////////////////////////////////////
+	//array_UseRegに、計算に利用するレジスタリストを作成
+	///////////////////////////////////////////////////////////
+
+	EnumRegister(
+		(int *)CalculationRegister,
+		sizeof(CalculationRegister)/sizeof(int),
+		array_UseReg,
+		&sp_UseReg,
+		AnswerReg);
+
+
+
+	///////////////////////////////////////////////////////////
+	//array_XmmRegに、計算に利用するレジスタリストを作成
+	///////////////////////////////////////////////////////////
+
+	EnumRegister(
+		(int *)CalculationXmmRegister,
+		sizeof(CalculationXmmRegister)/sizeof(int),
+		array_XmmReg,
+		&sp_XmmReg,
+		AnswerReg);
+
+
+	init_sp_reg=sp_UseReg;
+	init_sp_xmm_reg=sp_XmmReg;
+}
+void CRegister::bug_check(){
+	if(init_sp_reg!=sp_UseReg||
+		init_sp_xmm_reg!=sp_XmmReg) compiler.errorMessenger.Output(300,NULL,cp);
+}
+int CRegister::GetNextReg(){
+	if(sp_UseReg<0) return REG_R14;
+	return array_UseReg[sp_UseReg];
+}
+int CRegister::GetLockingReg(){
+	UnlockReg();
+	return LockReg();
+}
+int CRegister::LockReg(){
+	int reg;
+	reg=GetNextReg();
+
+	sp_UseReg--;
+
+	return reg;
+}
+int CRegister::UnlockReg(){
+	sp_UseReg++;
+	return GetNextReg();
+}
+int CRegister::GetNextXmmReg(){
+	if(sp_XmmReg<0) return REG_XMM4;
+	return array_XmmReg[sp_XmmReg];
+}
+int CRegister::GetLockingXmmReg(){
+	UnlockXmmReg();
+	return LockXmmReg();
+}
+int CRegister::LockXmmReg(){
+	int xmm_reg;
+	xmm_reg=GetNextXmmReg();
+
+	sp_XmmReg--;
+
+	return xmm_reg;
+}
+int CRegister::UnlockXmmReg(){
+	sp_XmmReg++;
+	return GetNextXmmReg();
+}
+bool CRegister::IsUsing( int reg ){
+	int i;
+
+	//汎用レジスタを調べる
+	for(i=init_sp_reg;i>sp_UseReg;i--){
+		if( array_UseReg[i] == reg ) return true;
+	}
+
+	//XMMレジスタを調べる
+	for(i=init_sp_xmm_reg;i>sp_XmmReg;i--){
+		if( array_XmmReg[i] == reg ) return true;
+	}
+
+	//ブロックされている場合を考慮
+	if( pobj_BlockReg->check( reg ) ) return true;
+
+	//使用中でないとき
+	return false;
+}
+void CRegister::backup(){
+	int i;
+
+	//汎用レジスタを退避
+	for(i=init_sp_reg;i>sp_UseReg;i--){
+		//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+		pobj_sf->push(array_UseReg[i]);
+	}
+
+	//XMMレジスタを退避
+	for(i=init_sp_xmm_reg;i>sp_XmmReg;i--){
+		//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+		pobj_sf->push(array_XmmReg[i],sizeof(_int64));
+	}
+}
+void CRegister::restore(){
+	int i;
+
+	//XMMレジスタを復元
+	if(sp_XmmReg<0) i=0;
+	else i=sp_XmmReg+1;
+	for(;i<=init_sp_xmm_reg;i++){
+		//mov reg,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(array_XmmReg[i],sizeof(_int64));
+	}
+
+	//汎用レジスタを復元
+	if(sp_UseReg<0) i=0;
+	else i=sp_UseReg+1;
+	for(;i<=init_sp_reg;i++){
+		//mov reg,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(array_UseReg[i]);
+	}
+}
+
+
+
+////////////////////////
+// その他
+////////////////////////
+
+BOOL IsGeneralReg(int reg){
+	if(REG_RAX<=reg&&reg<=REG_R15) return 1;
+	return 0;
+}
+BOOL IsXmmReg(int reg){
+	if(REG_XMM0<=reg&&reg<=REG_XMM15) return 1;
+	return 0;
+}
+BOOL IsVolatileReg(int reg){
+	if(reg==REG_RAX||
+		reg==REG_RCX||
+		reg==REG_RDX||
+		REG_R8<=reg&&reg<=REG_R11||
+		REG_XMM0<=reg&&reg<=REG_XMM5){
+		//値を保持する必要なし
+		return 1;
+	}
+	else{
+		//値を保持する必要あり
+		return 0;
+	}
+}
+
+void IfR14Push( int reg ){
+	if( reg == REG_R14 ){
+		//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+		pobj_sf->push( REG_R14 );
+	}
+}
Index: /trunk/ab5.0/abdev/compiler_x64/amd64_main.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/amd64_main.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/amd64_main.cpp	(revision 482)
@@ -0,0 +1,21 @@
+#include "stdafx.h"
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+BOOL IsSafeReg(int reg){
+	switch(reg){
+		case REG_RBX:
+		case REG_RSI:
+		case REG_RDI:
+		case REG_R12:
+		case REG_R13:
+		case REG_R14:
+		case REG_R15:
+			return 1;
+		default:
+			break;
+	}
+	return 0;
+}
Index: /trunk/ab5.0/abdev/compiler_x64/increment.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/increment.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/increment.cpp	(revision 482)
@@ -0,0 +1,191 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight)
+{
+	Type varType;
+	if( GetVarType( lpszLeft, varType, false ) )
+	{
+		if( varType.IsObject() )
+		{
+			// オブジェクトが対象だったとき
+			char temporary[8192];
+			char calcStr[32];
+			GetCalcName( idCalc, calcStr );
+			sprintf( temporary, "%s=%s %s %s", lpszLeft, lpszLeft, calcStr, lpszRight );
+			SetEscapeSequenceFormat( temporary );
+			KillStringSpaces( temporary );
+			OpcodeCalc( temporary );
+			return;
+		}
+	}
+
+	///////////////////////////
+	// 変数アドレスを取得
+	///////////////////////////
+
+	RELATIVE_VAR VarRelativeVar;
+	if(!GetVarOffsetReadWrite(
+		lpszLeft,
+		&VarRelativeVar,
+		varType)) return;
+
+	//変数オフセットを一時退避
+	if(IsUse_r11(&VarRelativeVar)){
+		//mov qword ptr[rsp+offset],r11     ※スタックフレームを利用
+		pobj_sf->push(REG_R11);
+	}
+
+
+	///////////////////////////////////
+	// レジスタへ変数の内容をコピー
+	///////////////////////////////////
+
+	int reg;
+	if( varType.IsDouble() ){
+		reg=REG_XMM0;
+		SetXmmReg_DoubleVariable(&VarRelativeVar,reg);
+	}
+	else if( varType.IsSingle() ){
+		reg=REG_XMM0;
+		SetXmmReg_SingleVariable(&VarRelativeVar,reg);
+	}
+	else{
+		reg=REG_RAX;
+		SetReg_WholeVariable(varType,&VarRelativeVar,reg);
+	}
+
+
+	if(varType.IsWhole()&&lstrcmp(lpszRight,"1")==0&&
+		(idCalc==CALC_ADDITION||idCalc==CALC_SUBTRACTION)){
+			if(idCalc==CALC_ADDITION){
+				//インクリメント
+				compiler.codeGenerator.op_inc(REG_RAX);
+			}
+			else if(idCalc==CALC_SUBTRACTION){
+				//デクリメント
+				compiler.codeGenerator.op_dec(REG_RAX);
+			}
+	}
+	else{
+		//結果を格納しているレジスタをブロッキング
+		pobj_BlockReg->lock(reg);
+
+		//右辺を計算
+		Type calcType;
+		if(reg==REG_RAX) reg=REG_RCX;
+		else reg=REG_RAX;
+		NumOpe(&reg,lpszRight,varType,calcType);
+
+		//レジスタのブロッキングを解除
+		pobj_BlockReg->clear();
+
+
+		if(varType.IsPointer()&&calcType.IsWhole()&&(!calcType.IsPointer())){
+			//左辺がポインタ型、右辺が整数型の場合は、エラーをださないようにする
+			calcType = varType;
+		}
+
+
+		/////////////////////////////////
+		// 右辺、左辺の型チェックを行う
+		/////////////////////////////////
+
+		CheckDifferentType(varType,calcType,0,0);
+
+
+		//レジスタ管理オブジェクトを生成
+		pobj_reg=new CRegister(REG_RAX);
+
+		//左辺用レジスタ
+		if(varType.IsReal())
+			pobj_reg->LockXmmReg();
+		else
+			pobj_reg->LockReg();
+
+		//右辺値レジスタ
+		if(varType.IsDouble())
+		{
+			ChangeTypeToXmm_Double(
+				calcType.GetBasicType(),
+				pobj_reg->LockXmmReg(),
+				pobj_reg->GetNextReg()
+			);
+		}
+		else if(varType.IsSingle())
+		{
+			ChangeTypeToXmm_Single(
+				calcType.GetBasicType(),
+				pobj_reg->LockXmmReg(),
+				pobj_reg->GetNextReg()
+			);
+		}
+		else
+		{
+			ChangeTypeToWhole(
+				calcType,
+				varType,
+				pobj_reg->LockReg(),
+				pobj_reg->GetNextXmmReg()
+			);
+		}
+
+		int type_stack[255],sp;
+		LONG_PTR index_stack[255];
+		type_stack[0]=varType.GetBasicType();
+		type_stack[1]=varType.GetBasicType();
+		index_stack[0]=varType.GetIndex();
+		index_stack[1]=varType.GetIndex();
+		sp=2;
+
+		switch(idCalc){
+			case CALC_XOR:
+			case CALC_OR:
+			case CALC_AND:
+				CalcTwoTerm_Logical(idCalc,type_stack,index_stack,&sp);
+				break;
+			case CALC_SHL:
+			case CALC_SHR:
+				Calc_Shift(idCalc,type_stack,&sp);
+				break;
+			case CALC_ADDITION:
+			case CALC_SUBTRACTION:
+			case CALC_PRODUCT:
+				CalcTwoTerm_Arithmetic(idCalc,type_stack,index_stack,&sp);
+				break;
+			case CALC_MOD:
+				Calc_Mod(type_stack,index_stack,&sp);
+				break;
+			case CALC_QUOTIENT:
+				Calc_Divide(type_stack,&sp,varType.GetBasicType());
+				break;
+			case CALC_INTQUOTIENT:
+				Calc_IntDivide(type_stack,index_stack,&sp);
+				break;
+			case CALC_POWER:
+				Calc_Power(type_stack,&sp);
+				break;
+		}
+
+		//レジスタ管理オブジェクトを解放
+		delete pobj_reg;
+		pobj_reg=0;
+	}
+
+
+	/////////////////////////////////////////////////
+	// rax（実数はxmm0）の内容を変数にコピー
+	/////////////////////////////////////////////////
+
+	//変数オフセットを復元
+	if(IsUse_r11(&VarRelativeVar)){
+		//mov r11,qword ptr[rsp+offset]     ※スタックフレームを利用
+		pobj_sf->pop(REG_R11);
+	}
+
+	SetVariableFromRax(varType,varType.GetBasicType(),&VarRelativeVar);
+}
Index: /trunk/ab5.0/abdev/compiler_x64/manifest.xml
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/manifest.xml	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/manifest.xml	(revision 482)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+version="1.0.0.0"
+processorArchitecture="amd64"
+name="BasicCompiler64.exe"
+type="win32"
+/>
+<description>Description</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity
+type="win32"
+name="Microsoft.Windows.Common-Controls"
+version="6.0.0.0"
+processorArchitecture="amd64"
+publicKeyToken="6595b64144ccf1df"
+language="*"
+/>
+</dependentAssembly>
+</dependency>
+</assembly>
Index: /trunk/ab5.0/abdev/compiler_x64/resource.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/resource.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/resource.h	(revision 482)
@@ -0,0 +1,56 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by BasicCompiler.rc
+//
+#define IDD_MAIN                        101
+#define IDD_VARLIST                     103
+#define IDI_MAIN                        108
+#define IDI_VARSTRUCT                   109
+#define IDI_VARDATA                     110
+#define IDI_VARSTR                      111
+#define IDI_VARARRAY                    112
+#define IDI_VARPTRSTRUCT                113
+#define IDD_CLIPMAIN                    114
+#define IDD_DEBUGGER                    115
+#define IDR_DEBUGGERTOOLBAR             117
+#define IDD_DEBUGGER_TOOLBARBASE        120
+#define IDR_DEBUGGER_VARLIST_MENU       122
+#define IDR_DEBUGGERTOOLBAR_DISABLED    125
+#define IDC_EXEPATH                     1000
+#define IDC_PROGRESS                    1001
+#define IDC_ERRORLIST                   1002
+#define IDC_MESSAGE                     1003
+#define IDC_DEBUGLIST                   1005
+#define IDC_SHOWERROR                   1006
+#define IDC_SHOWDEBUG                   1007
+#define IDC_THREADCOMBO                 1014
+#define IDC_VARTREE                     1015
+#define IDC_GLOBAL                      1016
+#define IDC_LOCAL                       1017
+#define IDC_PROCCOMBO                   1018
+#define IDC_HIDESYSVAR                  1019
+#define IDC_STEPIN                      1021
+#define IDC_STEPOVER                    1022
+#define IDC_ESP                         1023
+#define IDC_DUMMYCANCEL                 1024
+#define IDC_TAB1                        1025
+#define IDC_VARPOS                      1029
+#define IDC_WATCHLIST                   1033
+#define IDC_STATIC_VERSION              1034
+#define IDC_DEBUG_START                 40003
+#define IDC_DEBUG_STEPOVER              40004
+#define IDC_DEBUG_STEPIN                40005
+#define IDM_SHOW_DEFAULTSYSTEM_VAR      40007
+#define IDM_SHOW_RAD_VAR                40008
+#define IDM_SHOW_GUID_VAR               40009
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        126
+#define _APS_NEXT_COMMAND_VALUE         40010
+#define _APS_NEXT_CONTROL_VALUE         1035
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
Index: /trunk/ab5.0/abdev/compiler_x64/resource_back.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/resource_back.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/resource_back.h	(revision 482)
@@ -0,0 +1,55 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by BasicCompiler.rc
+//
+#define IDD_MAIN                        101
+#define IDD_VARLIST                     103
+#define IDI_MAIN                        108
+#define IDI_VARSTRUCT                   109
+#define IDI_VARDATA                     110
+#define IDI_VARSTR                      111
+#define IDI_VARARRAY                    112
+#define IDI_VARPTRSTRUCT                113
+#define IDD_CLIPMAIN                    114
+#define IDD_DEBUGGER                    115
+#define IDR_DEBUGGERTOOLBAR             117
+#define IDD_DEBUGGER_TOOLBARBASE        120
+#define IDR_DEBUGGER_VARLIST_MENU       122
+#define IDC_EXEPATH                     1000
+#define IDC_PROGRESS                    1001
+#define IDC_ERRORLIST                   1002
+#define IDC_MESSAGE                     1003
+#define IDC_DEBUGLIST                   1005
+#define IDC_SHOWERROR                   1006
+#define IDC_SHOWDEBUG                   1007
+#define IDC_THREADCOMBO                 1014
+#define IDC_VARTREE                     1015
+#define IDC_GLOBAL                      1016
+#define IDC_LOCAL                       1017
+#define IDC_PROCCOMBO                   1018
+#define IDC_HIDESYSVAR                  1019
+#define IDC_STEPIN                      1021
+#define IDC_STEPOVER                    1022
+#define IDC_ESP                         1023
+#define IDC_DUMMYCANCEL                 1024
+#define IDC_TAB1                        1025
+#define IDC_VARPOS                      1029
+#define IDC_WATCHLIST                   1033
+#define IDC_STATIC_VERSION              1034
+#define IDC_DEBUG_START                 40003
+#define IDC_DEBUG_STEPOVER              40004
+#define IDC_DEBUG_STEPIN                40005
+#define IDM_SHOW_DEFAULTSYSTEM_VAR      40007
+#define IDM_SHOW_RAD_VAR                40008
+#define IDM_SHOW_GUID_VAR               40009
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        125
+#define _APS_NEXT_COMMAND_VALUE         40010
+#define _APS_NEXT_CONTROL_VALUE         1035
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
Index: /trunk/ab5.0/abdev/compiler_x64/stack_frame.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/stack_frame.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/stack_frame.cpp	(revision 482)
@@ -0,0 +1,125 @@
+#include "stdafx.h"
+
+#include <Compiler.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "Opcode.h"
+
+
+/////////////////////////
+// スタックフレーム管理
+/////////////////////////
+
+StackFrame::StackFrame(){
+	lowest_sp=0;
+	now_sp=0;
+	max_parm_size=0;
+}
+StackFrame::~StackFrame(){
+	//オブジェクト破棄時に不整合がないかをチェック（バグ回避）
+	error_check();
+}
+int StackFrame::GetFrameSize( int localParamSize ){
+	int answer_sp;
+
+	answer_sp=lowest_sp-max_parm_size;
+
+	if(((answer_sp-localParamSize)%0x10)==0){
+		//関数のエントリポイントで128ビット境界ラインに合わせるため
+		return -(answer_sp-0x08);
+	}
+	return -(answer_sp-0x10);
+}
+int StackFrame::GetNowSp(){
+	return now_sp;
+}
+void StackFrame::mov_sp( int reg ){
+	//mov reg,rsp
+	compiler.codeGenerator.op_mov_RR( reg, REG_RSP );
+
+	//add reg,now_sp
+	pertialSchedules.push_back(
+		compiler.codeGenerator.op_add_RV( reg, now_sp, Schedule::None, true )
+	);
+}
+int StackFrame::push(int reg){
+	now_sp-=sizeof(_int64);
+	if(lowest_sp>now_sp) lowest_sp=now_sp;
+
+	if(reg==REG_NON) return now_sp;
+
+	//mov qword ptr[rsp+offset],reg
+	pertialSchedules.push_back(
+		compiler.codeGenerator.op_mov_MR(sizeof(_int64),reg,REG_RSP,now_sp,MOD_BASE_DISP32, Schedule::None, true)
+	);
+
+	return now_sp;
+}
+void StackFrame::push(int xmm_reg,int varSize){
+	now_sp-=sizeof(_int64);
+	if(lowest_sp>now_sp) lowest_sp=now_sp;
+
+	if(varSize==sizeof(double)){
+		//movlpd qword ptr[rsp+offset],xmm_reg
+		pertialSchedules.push_back(
+			compiler.codeGenerator.op_movlpd_MR(xmm_reg,REG_RSP,now_sp,MOD_BASE_DISP32, Schedule::None, true )
+		);
+	}
+	if(varSize==sizeof(float)){
+		//movss dword ptr[rsp+offset],xmm_reg
+		pertialSchedules.push_back(
+			compiler.codeGenerator.op_movss_MR( xmm_reg, REG_RSP, now_sp, MOD_BASE_DISP32, Schedule::None, true )
+		);
+	}
+}
+void StackFrame::ref_offset_data( int reg, int sp_offset ){
+	//mov reg,qword ptr[rsp+offset]     ※スタックフレームを利用
+	pertialSchedules.push_back(
+		compiler.codeGenerator.op_mov_RM(sizeof(_int64),reg,REG_RSP,sp_offset,MOD_BASE_DISP32, Schedule::None, true )
+	);
+}
+void StackFrame::ref(int reg){
+	ref_offset_data( reg, now_sp );
+}
+void StackFrame::ref(int xmm_reg,int varSize){
+	if(varSize==sizeof(double)){
+		//movlpd xmm_reg,qword ptr[rsp+offset]
+		pertialSchedules.push_back(
+			compiler.codeGenerator.op_movlpd_RM(xmm_reg,REG_RSP,now_sp,MOD_BASE_DISP32, Schedule::None, true )
+		);
+	}
+	if(varSize==sizeof(float)){
+		//movss xmm_reg,dword ptr[rsp+offset]
+		pertialSchedules.push_back(
+			compiler.codeGenerator.op_movss_MR( xmm_reg, REG_RSP, now_sp, MOD_BASE_DISP32, Schedule::None, true )
+		);
+	}
+}
+void StackFrame::pop(int reg){
+	if(reg!=REG_NON) ref(reg);
+
+	now_sp+=sizeof(_int64);
+}
+void StackFrame::pop(int xmm_reg,int varSize){
+	ref(xmm_reg,varSize);
+
+	now_sp+=sizeof(_int64);
+}
+void StackFrame::parameter_allocate(int size){
+	if(max_parm_size<size) max_parm_size=size;
+}
+void StackFrame::RunningSchedule( int stackFrameSize ){
+	BOOST_FOREACH( const PertialSchedule *pPertialSchedule, pertialSchedules )
+	{
+		compiler.codeGenerator.opfix_offset( pPertialSchedule, stackFrameSize );
+	}
+}
+
+void StackFrame::error_check(){
+	if(now_sp){
+		compiler.errorMessenger.Output(300,NULL,cp);
+	}
+}
+
+//スタックフレーム管理用オブジェクトポインタ
+StackFrame *pobj_sf;
Index: /trunk/ab5.0/abdev/compiler_x64/stdafx.cpp
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/stdafx.cpp	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/stdafx.cpp	(revision 482)
@@ -0,0 +1,1 @@
+#include "stdafx.h"
Index: /trunk/ab5.0/abdev/compiler_x64/stdafx.h
===================================================================
--- /trunk/ab5.0/abdev/compiler_x64/stdafx.h	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x64/stdafx.h	(revision 482)
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <map>
+#include <string>
+#include <vector>
+#include <fstream>
+#include <iostream>
+
+#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>
+
+//boost libraries
+#include <boost/foreach.hpp>
+
+#include <jenga/include/common/CmdLine.h>
+#include <jenga/include/common/Environment.h>
+#include <jenga/include/common/File.h>
+#include <jenga/include/common/Path.h>
+#include <jenga/include/common/String.h>
+
+#include <abdev/ab_common/Environment.h>
+
+#include "../BasicCompiler_Common/common.h"
+#include "../BasicCompiler_Common/BasicFixed.h"
+
+#include <Hashmap.h>
+#include <Configuration.h>
+#include <Program.h>
+#include <Compiler.h>
+#include <Debugger.h>
Index: unk/ab5.0/abdev/compiler_x86/BasicCompiler.rc
===================================================================
--- /trunk/ab5.0/abdev/compiler_x86/BasicCompiler.rc	(revision 481)
+++ 	(revision )
@@ -1,396 +1,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// 日本語 resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
-#ifdef _WIN32
-LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
-#pragma code_page(932)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-#if defined(APSTUDIO_INVOKED) || defined(JPN)
-#if defined(APSTUDIO_INVOKED)
-IDD_MAIN$(JPN) DIALOG  0, 0, 205, 229
-#else
-IDD_MAIN DIALOG  0, 0, 205, 229
-#endif
-STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "ActiveBasic Compiler(32bit)"
-FONT 9, "ＭＳ Ｐゴシック"
-BEGIN
-    DEFPUSHBUTTON   "コンパイル",IDOK,148,208,50,14
-    LTEXT           "出力先:",IDC_STATIC,7,10,23,8
-    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
-    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,179,14
-    GROUPBOX        "進行状況",IDC_STATIC,7,31,191,45
-    LTEXT           "準備中...",IDC_MESSAGE,13,44,161,8
-    GROUPBOX        "メッセージ リスト",IDC_STATIC,7,83,191,117
-    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "エラー",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,13,97,35,10
-    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,50,97,35,10
-    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    LTEXT           "Version",IDC_STATIC_VERSION,7,214,140,8
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(JPN)
-#if defined(APSTUDIO_INVOKED)
-IDD_VARLIST$(JPN) DIALOG  0, 0, 215, 199
-#else
-IDD_VARLIST DIALOG  0, 0, 215, 199
-#endif
-STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
-CAPTION "ブレーク ポイント"
-FONT 9, "ＭＳ Ｐゴシック"
-BEGIN
-    PUSHBUTTON      "閉じる",IDCANCEL,165,6,50,14
-    LTEXT           "対象領域:",IDC_STATIC,2,9,30,8
-    LTEXT           "対象スレッド:",IDC_STATIC,2,26,38,8
-    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,0,88,215,111
-    CONTROL         "グローバル",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,43,6,47,14
-    CONTROL         "ローカル",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,92,6,47,14
-    LTEXT           "プロシージャ:",IDC_STATIC,2,43,39,8
-    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "システム変数を表示しない",IDC_HIDESYSVAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,44,93,10
-    PUSHBUTTON      "ステップ(IN)",IDC_STEPIN,4,64,50,14
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
-    PUSHBUTTON      "ステップ(OVER)",IDC_STEPOVER,57,64,50,14
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(JPN)
-#if defined(APSTUDIO_INVOKED)
-IDD_CLIPMAIN$(JPN) DIALOGEX 0, 0, 332, 88
-#else
-IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
-#endif
-STYLE DS_SETFONT | WS_CHILD
-FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
-BEGIN
-    PUSHBUTTON      "コンパイル",IDOK,0,0,37,13
-    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
-    EDITTEXT        IDC_ERRORLIST,38,14,129,74,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "ビルド",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,20,37,12
-    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,34,37,12
-    EDITTEXT        IDC_DEBUGLIST,38,15,179,73,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x1,38,1,293,12
-    LTEXT           "準備中...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,WS_EX_TRANSPARENT
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,39,1
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(ENG)
-#if defined(APSTUDIO_INVOKED)
-IDD_CLIPMAIN$(ENG) DIALOGEX 0, 0, 332, 88
-#else
-IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
-#endif
-STYLE DS_SETFONT | WS_CHILD
-FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
-BEGIN
-    PUSHBUTTON      "Compile",IDOK,0,0,37,11
-    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
-    EDITTEXT        IDC_ERRORLIST,38,13,129,75,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,17,37,10
-    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,28,37,10
-    EDITTEXT        IDC_DEBUGLIST,38,14,179,74,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x1,38,0,293,12
-    LTEXT           "Waiting...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,WS_EX_TRANSPARENT
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,13,39,1
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(ENG)
-#if defined(APSTUDIO_INVOKED)
-IDD_MAIN$(ENG) DIALOG  0, 0, 205, 229
-#else
-IDD_MAIN DIALOG  0, 0, 205, 229
-#endif
-STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "ActiveBasic Compiler&Debugger"
-FONT 9, "ＭＳ Ｐゴシック"
-BEGIN
-    DEFPUSHBUTTON   "Compile",IDOK,148,208,50,14
-    LTEXT           "Output:",IDC_STATIC,7,10,22,8
-    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
-    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,179,14
-    GROUPBOX        "Advance situation",IDC_STATIC,7,31,191,45
-    LTEXT           "ready...",IDC_MESSAGE,13,44,161,8
-    GROUPBOX        "Message list",IDC_STATIC,7,83,191,117
-    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,13,97,30,10
-    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,50,97,35,10
-    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
-    LTEXT           "Version 4.00 Global Edition beta1",IDC_STATIC,7,214,98,8
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(ENG)
-#if defined(APSTUDIO_INVOKED)
-IDD_VARLIST$(ENG) DIALOG  0, 0, 215, 199
-#else
-IDD_VARLIST DIALOG  0, 0, 215, 199
-#endif
-STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
-CAPTION "Breakpoint"
-FONT 9, "ＭＳ Ｐゴシック"
-BEGIN
-    PUSHBUTTON      "Close",IDCANCEL,165,6,50,14
-    LTEXT           "Level:",IDC_STATIC,2,9,18,8
-    LTEXT           "Thread:",IDC_STATIC,2,26,22,8
-    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,0,88,215,111
-    CONTROL         "Global",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,43,6,47,14
-    CONTROL         "Local",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,92,6,47,14
-    LTEXT           "Procedure:",IDC_STATIC,2,43,31,8
-    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "Hide system variables",IDC_HIDESYSVAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,44,81,10
-    PUSHBUTTON      "Step In",IDC_STEPIN,4,64,50,14
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
-    PUSHBUTTON      "Step Over",IDC_STEPOVER,57,64,50,14
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(JPN)
-#if defined(APSTUDIO_INVOKED)
-IDD_DEBUGGER$(JPN) DIALOGEX 0, 0, 291, 148
-#else
-IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
-#endif
-STYLE DS_SETFONT | WS_CHILD
-FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
-BEGIN
-    LTEXT           "対象スレッド:",IDC_STATIC,5,21,38,8
-    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "プロシージャ:",IDC_STATIC,5,49,39,8
-    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
-    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,WS_EX_STATICEDGE
-    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,WS_EX_ACCEPTFILES
-    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
-END
-#endif
-
-IDD_DEBUGGER_TOOLBARBASE DIALOG  0, 0, 62, 15
-STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
-FONT 9, "ＭＳ Ｐゴシック"
-BEGIN
-END
-
-#if defined(APSTUDIO_INVOKED) || defined(ENG)
-#if defined(APSTUDIO_INVOKED)
-IDD_DEBUGGER$(ENG) DIALOGEX 0, 0, 291, 148
-#else
-IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
-#endif
-STYLE DS_SETFONT | WS_CHILD
-FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
-BEGIN
-    LTEXT           "Thread:",IDC_STATIC,5,21,22,8
-    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "Procedure:",IDC_STATIC,5,49,31,8
-    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
-    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,WS_EX_STATICEDGE
-    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,WS_EX_ACCEPTFILES
-    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
-END
-#endif
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
-BEGIN
-    "IDD_MAIN$(JPN)", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 198
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 222
-    END
-
-    "IDD_VARLIST$(JPN)", DIALOG
-    BEGIN
-        BOTTOMMARGIN, 161
-    END
-
-    "IDD_MAIN$(ENG)", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 198
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 222
-    END
-
-    "IDD_VARLIST$(ENG)", DIALOG
-    BEGIN
-        BOTTOMMARGIN, 161
-    END
-
-    IDD_DEBUGGER_TOOLBARBASE, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 55
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 8
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_MAIN                ICON                    "icon1.ico"
-IDI_VARSTRUCT           ICON                    "VarStruct.ico"
-IDI_VARDATA             ICON                    "VarData.ico"
-IDI_VARSTR              ICON                    "VarStr.ico"
-IDI_VARARRAY            ICON                    "VarArray.ico"
-IDI_VARPTRSTRUCT        ICON                    "VarPtrStruct.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Toolbar
-//
-
-IDR_DEBUGGERTOOLBAR TOOLBAR  16, 15
-BEGIN
-    BUTTON      IDC_DEBUG_START
-    BUTTON      IDC_DEBUG_STEPOVER
-    BUTTON      IDC_DEBUG_STEPIN
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDR_DEBUGGERTOOLBAR     BITMAP                  "toolbar_debugger.bmp"
-IDR_DEBUGGERTOOLBAR_DISABLED BITMAP                  "toolbar_debugger_disable.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_DEBUGGER_VARLIST_MENU MENU 
-BEGIN
-    POPUP "dummy"
-    BEGIN
-        MENUITEM "一般システム変数を表示する",               IDM_SHOW_DEFAULTSYSTEM_VAR
-        MENUITEM "RADシステム変数を表示する",              IDM_SHOW_RAD_VAR
-        MENUITEM "GUID変数を表示する",                 IDM_SHOW_GUID_VAR
-    END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 5,0,6,0
- PRODUCTVERSION 5,0,6,0
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "041104b0"
-        BEGIN
-            VALUE "CompanyName", "activebasic.com"
-            VALUE "FileDescription", "ActiveBasic"
-            VALUE "FileVersion", "5, 0, 6, 0"
-            VALUE "InternalName", "ActiveBasic"
-            VALUE "LegalCopyright", "Copyright (C) 2008 activebasic.com"
-            VALUE "OriginalFilename", "BasicCompiler32.exe"
-            VALUE "ProductName", "ActiveBasic"
-            VALUE "ProductVersion", "5, 0, 6, 0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x411, 1200
-    END
-END
-
-#endif    // 日本語 resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
Index: unk/ab5.0/abdev/compiler_x86/BasicCompiler.vcproj
===================================================================
--- /trunk/ab5.0/abdev/compiler_x86/BasicCompiler.vcproj	(revision 481)
+++ 	(revision )
@@ -1,1648 +1,0 @@
-<?xml version="1.0" encoding="shift_jis"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="compiler_x86"
-	ProjectGUID="{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\build\$(ConfigurationName)\bin\x86"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Debug/BasicCompiler.tlb"
-				HeaderFileName=""
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/BasicCompiler.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG,JPN"
-				Culture="1041"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
-				OutputFile="$(OutDir)\abc.exe"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="..\..\jenga\lib\x86;..\lib\x86"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile=".\Debug/BasicCompiler32.pdb"
-				SubSystem="1"
-				StackReserveSize="4194304"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-				AdditionalManifestFiles="manifest.xml"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-				SuppressStartupBanner="true"
-				OutputFile=".\Debug/BasicCompiler.bsc"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\build\$(ConfigurationName)\bin\x86"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Release/BasicCompiler.tlb"
-				HeaderFileName=""
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="2"
-				FavorSizeOrSpeed="1"
-				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN"
-				StringPooling="false"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="false"
-				RuntimeTypeInfo="true"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				BrowseInformation="0"
-				BrowseInformationFile=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG,JPN"
-				Culture="1041"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
-				OutputFile="$(OutDir)\abc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="..\..\jenga\lib\x86;..\lib\x86"
-				ProgramDatabaseFile=".\Release/BasicCompiler32.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-				AdditionalManifestFiles="manifest.xml"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-				SuppressStartupBanner="true"
-				OutputFile=".\Release/BasicCompiler.bsc"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-		<ProjectReference
-			ReferencedProjectIdentifier="{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}"
-			RelativePathToProject="..\jenga\projects\jenga\jenga.vcproj"
-		/>
-		<ProjectReference
-			ReferencedProjectIdentifier="{87835C33-64C9-4BA5-9B39-608BA5394387}"
-			RelativePathToProject=".\ab_common\ab_common.vcproj"
-		/>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="BasicCompiler.rc"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\stdafx.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="1"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="1"
-					/>
-				</FileConfiguration>
-			</File>
-			<Filter
-				Name="32及び64共通"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\BasicCompiler.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\calculation.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\Compile.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\Diagnose.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\error.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\gc.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\hash.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\MakeExe.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\NumOpe_GetType.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\Object.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\OldStatement.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\Overload.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\RSrcSection.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\StrOperation.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\StrOperation.h"
-					>
-				</File>
-				<Filter
-					Name="Intermediate"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\CommandFormat.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\Intermediate_Step1.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\Intermediate_Step2.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\Resource.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-				<Filter
-					Name="Parts"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\NonVolatile.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-				<Filter
-					Name="Debug（共通）"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\BreakPoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\BreakPoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\CDebugThreadInfo.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\Debug.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\debug.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\DebugMiddleFile.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\DebugSection.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\VarList.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\WatchList.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\$(InputName)1.obj"
-								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\$(InputName)1.obj"
-								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-				<Filter
-					Name="Schedule"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\PESchedule.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\PESchedule.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="Variable"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\VariableOpe.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\VariableOpe.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="Procedure"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\ParamImpl.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\Subroutine.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="x86Compiler"
-				>
-				<File
-					RelativePath="Compile_Statement.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="Compile_Var.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="MakePeHdr.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							PreprocessorDefinitions=""
-						/>
-					</FileConfiguration>
-				</File>
-				<Filter
-					Name="Calculation"
-					>
-					<File
-						RelativePath="Compile_Calc.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="Compile_Calc_PushVar.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="Compile_Set_Var.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="increment.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="NumOpe.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="NumOpe_Arithmetic.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="NumOpe_Logical.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="NumOpe_Relation.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="NumOpe_TypeOperation.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-				<Filter
-					Name="Object"
-					>
-					<File
-						RelativePath="Compile_Object.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-				<Filter
-					Name="Opcode"
-					>
-					<File
-						RelativePath="op32_main.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath=".\x86CodeGenerator.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="Procedure"
-					>
-					<File
-						RelativePath="Compile_CallProc.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="Compile_Func.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="Compile_ProcOp.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="CParameter.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="OperatorProc.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								PreprocessorDefinitions=""
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="Common Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							UsePrecompiledHeader="0"
-						/>
-					</FileConfiguration>
-				</File>
-			</Filter>
-			<Filter
-				Name="Compiler Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\CodeGenerator.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\CommonCodeGenerator.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\Compiler.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\Linker.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\Messenger.cpp"
-					>
-				</File>
-				<Filter
-					Name="Langauge Classes"
-					>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Class.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Class_Collect.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\Enum.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\Exception.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\Namespace.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\src\NamespaceSupporter.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\Symbol.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>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="Application Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\src\Program.cpp"
-					>
-				</File>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\BasicCompiler_Common\BasicCompiler.h"
-				>
-			</File>
-			<File
-				RelativePath="..\BasicCompiler_Common\BasicFixed.h"
-				>
-			</File>
-			<File
-				RelativePath="CommandValue.h"
-				>
-			</File>
-			<File
-				RelativePath="..\BasicCompiler_Common\common.h"
-				>
-			</File>
-			<File
-				RelativePath=".\MachineFixed.h"
-				>
-			</File>
-			<File
-				RelativePath="Opcode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\BasicCompiler_Common\include\option.h"
-				>
-			</File>
-			<File
-				RelativePath=".\stdafx.h"
-				>
-			</File>
-			<File
-				RelativePath="..\BasicCompiler_Common\include\ver.h"
-				>
-			</File>
-			<Filter
-				Name="言語対応文字列"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\common_msg_eng.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\common_msg_jpn.h"
-					>
-				</File>
-			</Filter>
-			<Filter
-				Name="Parts_h"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\NonVolatile.h"
-					>
-				</File>
-			</Filter>
-			<Filter
-				Name="Common Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Binary.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\BoostSerializationSupport.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Hashmap.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\logger.h"
-					>
-				</File>
-			</Filter>
-			<Filter
-				Name="Compiler Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\CodeGenerator.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Compiler.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Linker.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Messenger.h"
-					>
-				</File>
-				<Filter
-					Name="Language Classes"
-					>
-					<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"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Exception.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\Namespace.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\NamespaceSupporter.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\Prototype.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Source.h"
-						>
-					</File>
-					<File
-						RelativePath="..\BasicCompiler_Common\include\Symbol.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>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="Application Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Configuration.h"
-					>
-				</File>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Program.h"
-					>
-				</File>
-			</Filter>
-			<Filter
-				Name="Debugger Classes"
-				>
-				<File
-					RelativePath="..\BasicCompiler_Common\include\Debugger.h"
-					>
-				</File>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="icon1.ico"
-				>
-			</File>
-			<File
-				RelativePath="toolbar_debugger.bmp"
-				>
-			</File>
-			<File
-				RelativePath="toolbar_debugger_disable.bmp"
-				>
-			</File>
-			<File
-				RelativePath="VarArray.ico"
-				>
-			</File>
-			<File
-				RelativePath="VarData.ico"
-				>
-			</File>
-			<File
-				RelativePath="VarPtrStruct.ico"
-				>
-			</File>
-			<File
-				RelativePath="VarStr.ico"
-				>
-			</File>
-			<File
-				RelativePath="VarStruct.ico"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: /trunk/ab5.0/abdev/compiler_x86/compiler_x86.rc
===================================================================
--- /trunk/ab5.0/abdev/compiler_x86/compiler_x86.rc	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x86/compiler_x86.rc	(revision 482)
@@ -0,0 +1,396 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// 日本語 resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+#ifdef _WIN32
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(JPN) DIALOG  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG  0, 0, 205, 229
+#endif
+STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler(32bit)"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "コンパイル",IDOK,148,208,50,14
+    LTEXT           "出力先:",IDC_STATIC,7,10,23,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,179,14
+    GROUPBOX        "進行状況",IDC_STATIC,7,31,191,45
+    LTEXT           "準備中...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "メッセージ リスト",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "エラー",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,13,97,35,10
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version",IDC_STATIC_VERSION,7,214,140,8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(JPN) DIALOG  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG  0, 0, 215, 199
+#endif
+STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "ブレーク ポイント"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "閉じる",IDCANCEL,165,6,50,14
+    LTEXT           "対象領域:",IDC_STATIC,2,9,30,8
+    LTEXT           "対象スレッド:",IDC_STATIC,2,26,38,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,0,88,215,111
+    CONTROL         "グローバル",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,43,6,47,14
+    CONTROL         "ローカル",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,92,6,47,14
+    LTEXT           "プロシージャ:",IDC_STATIC,2,43,39,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "システム変数を表示しない",IDC_HIDESYSVAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,44,93,10
+    PUSHBUTTON      "ステップ(IN)",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "ステップ(OVER)",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(JPN) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE DS_SETFONT | WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "コンパイル",IDOK,0,0,37,13
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,14,129,74,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "ビルド",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,20,37,12
+    CONTROL         "デバッグ",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,34,37,12
+    EDITTEXT        IDC_DEBUGLIST,38,15,179,73,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x1,38,1,293,12
+    LTEXT           "準備中...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_CLIPMAIN$(ENG) DIALOGEX 0, 0, 332, 88
+#else
+IDD_CLIPMAIN DIALOGEX 0, 0, 332, 88
+#endif
+STYLE DS_SETFONT | WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "Compile",IDOK,0,0,37,11
+    EDITTEXT        IDC_EXEPATH,285,57,24,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
+    EDITTEXT        IDC_ERRORLIST,38,13,129,75,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,17,37,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,0,28,37,10
+    EDITTEXT        IDC_DEBUGLIST,38,14,179,74,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x1,38,0,293,12
+    LTEXT           "Waiting...",IDC_MESSAGE,286,47,24,8,NOT WS_VISIBLE,WS_EX_TRANSPARENT
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,13,39,1
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_MAIN$(ENG) DIALOG  0, 0, 205, 229
+#else
+IDD_MAIN DIALOG  0, 0, 205, 229
+#endif
+STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "ActiveBasic Compiler&Debugger"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    DEFPUSHBUTTON   "Compile",IDOK,148,208,50,14
+    LTEXT           "Output:",IDC_STATIC,7,10,22,8
+    EDITTEXT        IDC_EXEPATH,34,7,164,14,ES_AUTOHSCROLL
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,13,56,179,14
+    GROUPBOX        "Advance situation",IDC_STATIC,7,31,191,45
+    LTEXT           "ready...",IDC_MESSAGE,13,44,161,8
+    GROUPBOX        "Message list",IDC_STATIC,7,83,191,117
+    EDITTEXT        IDC_ERRORLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    CONTROL         "Error",IDC_SHOWERROR,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,13,97,30,10
+    CONTROL         "Debug",IDC_SHOWDEBUG,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,50,97,35,10
+    EDITTEXT        IDC_DEBUGLIST,13,113,179,80,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED | WS_VSCROLL | WS_HSCROLL
+    LTEXT           "Version 4.00 Global Edition beta1",IDC_STATIC,7,214,98,8
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_VARLIST$(ENG) DIALOG  0, 0, 215, 199
+#else
+IDD_VARLIST DIALOG  0, 0, 215, 199
+#endif
+STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Breakpoint"
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+    PUSHBUTTON      "Close",IDCANCEL,165,6,50,14
+    LTEXT           "Level:",IDC_STATIC,2,9,18,8
+    LTEXT           "Thread:",IDC_STATIC,2,26,22,8
+    COMBOBOX        IDC_THREADCOMBO,43,24,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Tree1",IDC_VARTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,0,88,215,111
+    CONTROL         "Global",IDC_GLOBAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,43,6,47,14
+    CONTROL         "Local",IDC_LOCAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,92,6,47,14
+    LTEXT           "Procedure:",IDC_STATIC,2,43,31,8
+    COMBOBOX        IDC_PROCCOMBO,43,40,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Hide system variables",IDC_HIDESYSVAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,44,81,10
+    PUSHBUTTON      "Step In",IDC_STEPIN,4,64,50,14
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,59,215,1
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,81,215,1
+    PUSHBUTTON      "Step Over",IDC_STEPOVER,57,64,50,14
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(JPN)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(JPN) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE DS_SETFONT | WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "対象スレッド:",IDC_STATIC,5,21,38,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "プロシージャ:",IDC_STATIC,5,49,39,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+IDD_DEBUGGER_TOOLBARBASE DIALOG  0, 0, 62, 15
+STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
+FONT 9, "ＭＳ Ｐゴシック"
+BEGIN
+END
+
+#if defined(APSTUDIO_INVOKED) || defined(ENG)
+#if defined(APSTUDIO_INVOKED)
+IDD_DEBUGGER$(ENG) DIALOGEX 0, 0, 291, 148
+#else
+IDD_DEBUGGER DIALOGEX 0, 0, 291, 148
+#endif
+STYLE DS_SETFONT | WS_CHILD
+FONT 9, "ＭＳ Ｐゴシック", 0, 0, 0x1
+BEGIN
+    LTEXT           "Thread:",IDC_STATIC,5,21,22,8
+    COMBOBOX        IDC_THREADCOMBO,5,30,69,100,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Procedure:",IDC_STATIC,5,49,31,8
+    COMBOBOX        IDC_PROCCOMBO,5,58,69,116,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,15,99,1
+    LTEXT           "dummy",IDC_VARPOS,98,0,35,41,NOT WS_VISIBLE,WS_EX_STATICEDGE
+    CONTROL         "List2",IDC_WATCHLIST,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,171,9,60,50,WS_EX_ACCEPTFILES
+    LTEXT           "コマンド",IDC_STATIC,3,3,23,8
+END
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    "IDD_MAIN$(JPN)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(JPN)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    "IDD_MAIN$(ENG)", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 198
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 222
+    END
+
+    "IDD_VARLIST$(ENG)", DIALOG
+    BEGIN
+        BOTTOMMARGIN, 161
+    END
+
+    IDD_DEBUGGER_TOOLBARBASE, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 55
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 8
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MAIN                ICON                    "icon1.ico"
+IDI_VARSTRUCT           ICON                    "VarStruct.ico"
+IDI_VARDATA             ICON                    "VarData.ico"
+IDI_VARSTR              ICON                    "VarStr.ico"
+IDI_VARARRAY            ICON                    "VarArray.ico"
+IDI_VARPTRSTRUCT        ICON                    "VarPtrStruct.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Toolbar
+//
+
+IDR_DEBUGGERTOOLBAR TOOLBAR  16, 15
+BEGIN
+    BUTTON      IDC_DEBUG_START
+    BUTTON      IDC_DEBUG_STEPOVER
+    BUTTON      IDC_DEBUG_STEPIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDR_DEBUGGERTOOLBAR     BITMAP                  "toolbar_debugger.bmp"
+IDR_DEBUGGERTOOLBAR_DISABLED BITMAP                  "toolbar_debugger_disable.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_DEBUGGER_VARLIST_MENU MENU 
+BEGIN
+    POPUP "dummy"
+    BEGIN
+        MENUITEM "一般システム変数を表示する",               IDM_SHOW_DEFAULTSYSTEM_VAR
+        MENUITEM "RADシステム変数を表示する",              IDM_SHOW_RAD_VAR
+        MENUITEM "GUID変数を表示する",                 IDM_SHOW_GUID_VAR
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,0,6,0
+ PRODUCTVERSION 5,0,6,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "041104b0"
+        BEGIN
+            VALUE "CompanyName", "activebasic.com"
+            VALUE "FileDescription", "ActiveBasic"
+            VALUE "FileVersion", "5, 0, 6, 0"
+            VALUE "InternalName", "ActiveBasic"
+            VALUE "LegalCopyright", "Copyright (C) 2008 activebasic.com"
+            VALUE "OriginalFilename", "BasicCompiler32.exe"
+            VALUE "ProductName", "ActiveBasic"
+            VALUE "ProductVersion", "5, 0, 6, 0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x411, 1200
+    END
+END
+
+#endif    // 日本語 resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Index: /trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj
===================================================================
--- /trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj	(revision 482)
+++ /trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj	(revision 482)
@@ -0,0 +1,1648 @@
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="compiler_x86"
+	ProjectGUID="{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\build\$(ConfigurationName)\bin\x86"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/BasicCompiler.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
+				OutputFile="$(OutDir)\abc.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="..\..\jenga\lib\x86;..\lib\x86"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\Debug/BasicCompiler32.pdb"
+				SubSystem="1"
+				StackReserveSize="4194304"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\Debug/BasicCompiler.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\build\$(ConfigurationName)\bin\x86"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Release/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN"
+				StringPooling="false"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				BrowseInformation="0"
+				BrowseInformationFile=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="comctl32.lib psapi.lib imagehlp.lib shlwapi.lib"
+				OutputFile="$(OutDir)\abc.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="..\..\jenga\lib\x86;..\lib\x86"
+				ProgramDatabaseFile=".\Release/BasicCompiler32.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\Release/BasicCompiler.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+		<ProjectReference
+			ReferencedProjectIdentifier="{F01805B6-65B4-4708-88F4-A5E07DEA9FBD}"
+			RelativePathToProject="..\jenga\projects\jenga\jenga.vcproj"
+		/>
+		<ProjectReference
+			ReferencedProjectIdentifier="{87835C33-64C9-4BA5-9B39-608BA5394387}"
+			RelativePathToProject=".\ab_common\ab_common.vcproj"
+		/>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="BasicCompiler.rc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="32及び64共通"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\BasicCompiler.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\calculation.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Compile.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Diagnose.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\error.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\gc.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\hash.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\MakeExe.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\NumOpe_GetType.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Object.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\OldStatement.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\Overload.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\RSrcSection.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\StrOperation.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\StrOperation.h"
+					>
+				</File>
+				<Filter
+					Name="Intermediate"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\CommandFormat.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step1.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Intermediate_Step2.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Resource.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Parts"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\NonVolatile.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Debug（共通）"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\BreakPoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\CDebugThreadInfo.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Debug.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\debug.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugMiddleFile.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\DebugSection.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VarList.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\WatchList.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Schedule"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\PESchedule.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Variable"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\VariableOpe.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\ParamImpl.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\Subroutine.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="x86Compiler"
+				>
+				<File
+					RelativePath="Compile_Statement.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="Compile_Var.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="MakePeHdr.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<Filter
+					Name="Calculation"
+					>
+					<File
+						RelativePath="Compile_Calc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Calc_PushVar.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Set_Var.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="increment.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Arithmetic.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Logical.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_Relation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="NumOpe_TypeOperation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Object"
+					>
+					<File
+						RelativePath="Compile_Object.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+				<Filter
+					Name="Opcode"
+					>
+					<File
+						RelativePath="op32_main.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath=".\x86CodeGenerator.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Procedure"
+					>
+					<File
+						RelativePath="Compile_CallProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_Func.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="Compile_ProcOp.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="CParameter.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="OperatorProc.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions=""
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Compiler Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\CodeGenerator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\CommonCodeGenerator.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Compiler.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Linker.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Messenger.cpp"
+					>
+				</File>
+				<Filter
+					Name="Langauge Classes"
+					>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Class.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Class_Collect.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\Enum.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\Exception.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\Namespace.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\src\NamespaceSupporter.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\Symbol.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>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Application Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\Program.cpp"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicCompiler.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\BasicFixed.h"
+				>
+			</File>
+			<File
+				RelativePath="CommandValue.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\common.h"
+				>
+			</File>
+			<File
+				RelativePath=".\MachineFixed.h"
+				>
+			</File>
+			<File
+				RelativePath="Opcode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\include\option.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\BasicCompiler_Common\include\ver.h"
+				>
+			</File>
+			<Filter
+				Name="言語対応文字列"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_eng.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\common_msg_jpn.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Parts_h"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\NonVolatile.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Binary.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\BoostSerializationSupport.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Hashmap.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\logger.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Compiler Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\CodeGenerator.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Compiler.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Linker.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Messenger.h"
+					>
+				</File>
+				<Filter
+					Name="Language Classes"
+					>
+					<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"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Exception.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\Namespace.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\NamespaceSupporter.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\Prototype.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Source.h"
+						>
+					</File>
+					<File
+						RelativePath="..\BasicCompiler_Common\include\Symbol.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>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="Application Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Configuration.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Program.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Debugger Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Debugger.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="icon1.ico"
+				>
+			</File>
+			<File
+				RelativePath="toolbar_debugger.bmp"
+				>
+			</File>
+			<File
+				RelativePath="toolbar_debugger_disable.bmp"
+				>
+			</File>
+			<File
+				RelativePath="VarArray.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarData.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarPtrStruct.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStr.ico"
+				>
+			</File>
+			<File
+				RelativePath="VarStruct.ico"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
