Index: /trunk/abdev/BasicCompiler64/Compile_Func.cpp
===================================================================
--- /trunk/abdev/BasicCompiler64/Compile_Func.cpp	(revision 431)
+++ /trunk/abdev/BasicCompiler64/Compile_Func.cpp	(revision 432)
@@ -7,4 +7,10 @@
 #include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
+
+#ifdef _AMD64_
+#include "../BasicCompiler64/FunctionValue.h"
+#else
+#include "../BasicCompiler32/FunctionValue.h"
+#endif
 
 int GetFunctionFromName(char *FuncName){
@@ -20,5 +26,8 @@
 	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_New" ) == 0 )		return FUNC_SYSTEM_NEW;
+	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;
@@ -471,30 +480,45 @@
 }
 
-void Opcode_Func_System_New( const char *parameter, Type &resultType, bool isCallOn )
-{
-	if( !compiler.StringToType( parameter, resultType ) )
-	{
-		SetError();
-		return;
-	}
-	if( !resultType.IsObject() )
-	{
-		SetError();
-		return;
-	}
-
-	if( isCallOn )
-	{
-		Type tempResultType;
-		if( !Operator_New( parameter, resultType, tempResultType ) )
-		{
-			return;
-		}
-
-		if( !resultType.Equals( tempResultType ) )
-		{
-			SetError();
-		}
-	}
+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() );
 }
 
@@ -566,6 +590,19 @@
 			resultType.SetBasicType( DEF_INT64 );
 			break;
-		case FUNC_SYSTEM_NEW:
-			Opcode_Func_System_New( Parameter, resultType, isCallOn );
+		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;
 
Index: /trunk/abdev/BasicCompiler64/FunctionValue.h
===================================================================
--- /trunk/abdev/BasicCompiler64/FunctionValue.h	(revision 431)
+++ /trunk/abdev/BasicCompiler64/FunctionValue.h	(revision 432)
@@ -20,5 +20,8 @@
 #define FUNC_SYSTEM_GET_BP	0x0625
 #define FUNC_SYSTEM_GET_SP	0x0626
-#define FUNC_SYSTEM_NEW		0x0627
+#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
 
 //ポインタ
