Index: trunk/abdev/BasicCompiler64/Compile_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/Compile_Var.cpp	(revision 159)
+++ trunk/abdev/BasicCompiler64/Compile_Var.cpp	(revision 183)
@@ -1,2 +1,9 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
+#include <LexicalScopingImpl.h>
+#include <CodeGenerator.h>
+#include <Compiler.h>
+
 #include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
@@ -216,5 +223,5 @@
 
 	//アクセシビリティをチェック
-	if(&objClass==pobj_CompilingClass){
+	if(&objClass==Smoothie::Temp::pCompilingClass){
 		//同一クラスオブジェクトの場合はプライベートアクセスを容認する
 		if(pMember->IsNoneAccess()){
@@ -388,5 +395,5 @@
 	// 名前空間を分離
 	char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE];
-	Smoothie::meta.namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );
+	Smoothie::GetMeta().namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );
 
 	// 先頭オブジェクトまたはクラス名と入れ子メンバに分割
@@ -446,5 +453,5 @@
 
 
-	if(pobj_CompilingClass){
+	if(Smoothie::Temp::pCompilingClass){
 		//////////////////////
 		// クラスメンバの参照
@@ -457,5 +464,5 @@
 			pRelativeVar->dwKind=VAR_DIRECTMEM;
 
-			resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+			resultType.SetType( DEF_OBJECT, Smoothie::Temp::pCompilingClass );
 			return true;
 		}
@@ -470,5 +477,5 @@
 
 			bool isFound = false;
-			BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){
+			BOOST_FOREACH( CMember *pMember, Smoothie::Temp::pCompilingClass->GetDynamicMembers() ){
 				if( pMember->GetName() == VarName ){
 					isFound = true;
@@ -481,9 +488,9 @@
 		//Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
 		//（コンストラクタ、デストラクタ内を除く）
-		const CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();
+		const CMethod *pMethod = Smoothie::GetMeta().GetClasses().GetNowCompilingMethodInfo();
 		if( isWriteAccess &&
 			pMethod->IsConst() &&
-			pobj_CompilingClass->IsCompilingConstructor() == false &&
-			pobj_CompilingClass->IsCompilingDestructor() == false
+			Smoothie::Temp::pCompilingClass->IsCompilingConstructor() == false &&
+			Smoothie::Temp::pCompilingClass->IsCompilingDestructor() == false
 			){
 				SetError(131, NULL, cp );
@@ -497,5 +504,5 @@
 			isErrorEnabled,
 			isWriteAccess,
-			*pobj_CompilingClass,
+			*Smoothie::Temp::pCompilingClass,
 			variable,
 			pRelativeVar,
@@ -541,8 +548,8 @@
 			}
 
-			int typeDefIndex = Smoothie::meta.typeDefs.GetIndex( VarName );
+			int typeDefIndex = Smoothie::GetMeta().typeDefs.GetIndex( VarName );
 			if( typeDefIndex != -1 ){
 				// TypeDef後の型名だったとき
-				lstrcpy( VarName, Smoothie::meta.typeDefs[typeDefIndex].GetBaseName().c_str() );
+				lstrcpy( VarName, Smoothie::GetMeta().typeDefs[typeDefIndex].GetBaseName().c_str() );
 			}
 
@@ -557,8 +564,8 @@
 		}
 
-		if(pobj_CompilingClass){
+		if(Smoothie::Temp::pCompilingClass){
 			//自身のクラスから静的メンバを参照する場合
 			char temp2[VN_SIZE];
-			sprintf(temp2,"%s.%s",pobj_CompilingClass->GetName().c_str(),VarName);
+			sprintf(temp2,"%s.%s",Smoothie::Temp::pCompilingClass->GetName().c_str(),VarName);
 			pVar = globalVars.Find( temp2 );
 			if( pVar ){
@@ -844,5 +851,5 @@
 			char *temp;
 			temp=(char *)i64data;
-			i2=dataTable.AddString( temp );
+			i2=Compiler::GetNativeCode().GetDataTable().AddString( temp );
 			HeapDefaultFree(temp);
 
@@ -994,5 +1001,5 @@
 			char *temp;
 			temp=(char *)i64data;
-			i2=dataTable.AddString( temp );
+			i2=Compiler::GetNativeCode().GetDataTable().AddString( temp );
 			HeapDefaultFree(temp);
 
@@ -1086,6 +1093,6 @@
 
 		//レキシカルスコープ
-		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
-		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->ScopeLevel=GetLexicalScopes().GetNowLevel();
+		pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress();
 		pVar->bLiving=TRUE;
 
@@ -1121,6 +1128,6 @@
 
 		//レキシカルスコープ
-		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
-		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->ScopeLevel=GetLexicalScopes().GetNowLevel();
+		pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress();
 		pVar->bLiving=TRUE;
 
