Index: Include/Classes/System/TypeInfo.ab
===================================================================
--- Include/Classes/System/TypeInfo.ab	(revision 198)
+++ Include/Classes/System/TypeInfo.ab	(revision 207)
@@ -10,4 +10,6 @@
 
 	Sub TypeInfo()
+	End Sub
+	Sub ~TypeInfo()
 	End Sub
 
@@ -45,8 +47,8 @@
 	name As String
 
+Protected
+
 	baseType As TypeInfo
 	'interfaces As f(^^;;;
-
-Protected
 
 	Sub TypeBaseImpl()
@@ -77,4 +79,7 @@
 	*/
 
+	Sub ~TypeBaseImpl()
+	End Sub
+
 Public
 
@@ -88,4 +93,8 @@
 	End Function
 
+	Sub SetBaseType( baseType As TypeInfo )
+		This.baseType = baseType
+	End Sub
+
 	Override Function FullName() As String
 		Return strNamespace + "." + name
@@ -142,5 +151,5 @@
 Public
 	Sub _System_TypeForValueType( name As String )
-		TypeInfo( "", name )
+		TypeBaseImpl( "", name )
 	End Sub
 
@@ -154,6 +163,6 @@
 	Inherits TypeBaseImpl
 Public
-	Sub _System_TypeForClass( strNamespace As String, name As String, baseType As TypeInfo )
-		TypeBaseImpl( strNamespace, name, baseType )
+	Sub _System_TypeForClass( strNamespace As String, name As String )
+		TypeBaseImpl( strNamespace, name )
 	End Sub
 	Sub ~_System_TypeForClass()
@@ -162,8 +171,4 @@
 		Return True
 	End Function
-
-	Sub SetBaseType( baseType As TypeInfo )
-		This.baseType = baseType
-	End Sub
 End Class
 
@@ -188,18 +193,12 @@
 
 '--------------------------------------------------------------------
-' プロセスに存在するすべての型を管理する（シングルトン クラス）
+' プロセスに存在するすべての型を管理する
 '--------------------------------------------------------------------
 Class _System_TypeBase
-	pTypes As *TypeInfo
-	count As Long
-
-	Sub _System_TypeBase()
-		pTypes = GC_malloc( 1 )
-		count = 0
-	End Sub
-	Sub ~_System_TypeBase()
-	End Sub
-
-	Sub Add( typeInfo As TypeInfo )
+	Static pTypes As *TypeBaseImpl
+	Static count As Long
+	Static isReady = False
+
+	Static Sub Add( typeInfo As TypeBaseImpl )
 		pTypes = realloc( pTypes, ( count + 1 ) * SizeOf(*TypeInfo) )
 		pTypes[count] = typeInfo
@@ -207,5 +206,50 @@
 	End Sub
 
-	Function Search( strNamespace As String, typeName As String ) As TypeInfo
+	Static Sub InitializeValueType()
+		' 値型の追加
+		Add( New _System_TypeForValueType( "Byte" ) )
+		Add( New _System_TypeForValueType( "SByte" ) )
+		Add( New _System_TypeForValueType( "Word" ) )
+		Add( New _System_TypeForValueType( "Integer" ) )
+		Add( New _System_TypeForValueType( "DWord" ) )
+		Add( New _System_TypeForValueType( "Long" ) )
+		Add( New _System_TypeForValueType( "QWord" ) )
+		Add( New _System_TypeForValueType( "Int64" ) )
+		Add( New _System_TypeForValueType( "Boolean" ) )
+		Add( New _System_TypeForValueType( "Single" ) )
+		Add( New _System_TypeForValueType( "Double" ) )
+	End Sub
+
+	Static Sub InitializeUserTypes()
+		' このメソッドの実装はコンパイラが自動生成する
+
+		'例:
+		'Add( New _System_TypeForClass( "System", "String" ) )
+		'Search( "String" ).SetBaseType( Search( "Object" ) )
+	End Sub
+
+Public
+
+	Static Sub Initialize()
+		pTypes = GC_malloc( 1 )
+		count = 0
+
+		' 値型を初期化
+		InitializeValueType()
+
+		isReady = True
+		' Class / Interface / Enum / Delegate を初期化
+		InitializeUserTypes()
+
+
+		OutputDebugString( Ex"ready dynamic meta datas!\r\n" )
+	End Sub
+
+	Static Sub _NextPointerForGC()
+		' TODO: 実装
+	End Sub
+
+	Static Function Search( strNamespace As LPSTR, typeName As LPSTR ) As TypeBaseImpl
+
 		' TODO: 名前空間に対応する
 		Dim i As Long
@@ -215,49 +259,14 @@
 			End If
 		Next
+
 		Return Nothing
 	End Function
 
-	' シングルトン オブジェクト
-	Static obj As _System_TypeBase
-
-	Static Sub InitializeValueType()
-		' 値型の追加
-		obj.Add( New _System_TypeForValueType( "Byte" ) )
-		obj.Add( New _System_TypeForValueType( "SByte" ) )
-		obj.Add( New _System_TypeForValueType( "Word" ) )
-		obj.Add( New _System_TypeForValueType( "Integer" ) )
-		obj.Add( New _System_TypeForValueType( "DWord" ) )
-		obj.Add( New _System_TypeForValueType( "Long" ) )
-		obj.Add( New _System_TypeForValueType( "QWord" ) )
-		obj.Add( New _System_TypeForValueType( "Int64" ) )
-		obj.Add( New _System_TypeForValueType( "Boolean" ) )
-		obj.Add( New _System_TypeForValueType( "Single" ) )
-		obj.Add( New _System_TypeForValueType( "Double" ) )
-	End Sub
-
-	Static Sub InitializeUserTypes()
-		' このメソッドの実装はコンパイラが自動生成する
-
-#generate InitializeUserTypes
-
-		'例:
-		'obj.Add( New _System_TypeForClass( "System", "String" ) )
-		'obj.Search( "String" ).SetBaseType( Search( "Object" ) )
-	End Sub
-
-Public
-
-	Static Sub _NextPointerForGC()
-		' TODO: 実装
-	End Sub
-
-	Static Sub Initialize()
-		' 値型を初期化
-		InitializeValueType()
-
-		' Class / Interface / Enum / Delegate を初期化
-		InitializeUserTypes()
-	End Sub
-End Class
+	Static Function IsReady() As Boolean
+		Return isReady
+	End Function
+
+End Class
+
 
 ' End Namespace ' System
