Index: trunk/Include/system/exception.ab
===================================================================
--- trunk/Include/system/exception.ab	(revision 372)
+++ trunk/Include/system/exception.ab	(revision 373)
@@ -6,5 +6,4 @@
 	Const basePtr As LONG_PTR
 	Const stackPtr As LONG_PTR
-	context As CONTEXT
 	Const debugProcNum As DWord
 	
@@ -13,13 +12,4 @@
 		This.basePtr = basePtr
 		This.stackPtr = stackPtr
-
-		Dim tempContext As CONTEXT
-
-		tempContext.ContextFlags = CONTEXT_CONTROL or CONTEXT_INTEGER
-		If Thread.CurrentThread().__GetContext(tempContext) = 0 Then
-			' TODO: エラー処理
-			debug
-		End If
-		context = tempContext
 
 #ifdef _DEBUG
@@ -58,5 +48,5 @@
 
 	'Try
-	Function BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer
+	Function _BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer
 		ppTryLayers = _System_realloc( ppTryLayers, ( nTryLayers + 1 ) * SizeOf( *TryLayer ) )
 		ppTryLayers[nTryLayers] = New TryLayer( addressOfCatch, basePtr, stackPtr )
@@ -64,4 +54,8 @@
 
 		Return ByVal ppTryLayers[nTryLayers-1]
+	End Function
+
+	Static Function BeginTryScope( addressOfCatch As VoidPtr, basePtr As LONG_PTR, stackPtr As LONG_PTR ) As TryLayer
+		Return _System_pobj_AllThreads->GetCurrentException()->_BeginTryScope( addressOfCatch, basePtr, stackPtr )
 	End Function
 
@@ -92,11 +86,12 @@
 		'--------------------------------------------------
 
-		'レジスタ情報を取得
-		Dim context = ppTryLayers[nTryLayers - 1]->context
+		Dim context As CONTEXT
+		context.ContextFlags = CONTEXT_CONTROL or CONTEXT_INTEGER
+		If GetThreadContext( GetCurrentThread(), context ) = 0 Then
+			' TODO: エラー処理
+			debug
+		End If
 
-		'カレント スレッドを取得
-		Dim thread = Thread.CurrentThread
-
-		'新しいip, spをセット
+		'新しいip, sp, bpをセット
 #ifdef _WIN64
 		context.Rip = ppTryLayers[nTryLayers - 1]->addressOfCatch As QWord
@@ -116,10 +111,9 @@
 		End If
 #endif
-debug
-		If thread.__SetContext( context ) = 0 Then
+
+		If SetThreadContext( GetCurrentThread(), context ) = 0 Then
 			OutputDebugString(Ex"レジスタ情報の設定に失敗しました。\r\n")
 			Return
 		End If
-		debug
 	End Sub
 
@@ -127,13 +121,4 @@
 		_Throw()
 	End Sub
-
-	Static Sub AllocateObject( pObj As VoidPtr )
-		Dim thread = Thread.CurrentThread
-		'TODO: ローカルオブジェクトを登録
-	End Sub
-
-	Static Sub DeallocateObject( pObj As VoidPtr )
-		'TODO: ローカルオブジェクトを破棄
-	End Sub
 End Class
 
Index: trunk/Include/system/gc.sbp
===================================================================
--- trunk/Include/system/gc.sbp	(revision 372)
+++ trunk/Include/system/gc.sbp	(revision 373)
@@ -8,8 +8,4 @@
 Dim _System_gc_StackRoot_StartPtr As VoidPtr
 */
-
-Function _System_GetSp() As LONG_PTR					'dummy
-End Function
-
 
 Const _System_GC_FLAG_ATOMIC = 1
