Index: trunk/abdev/BasicCompiler32/Compile_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 224)
+++ trunk/abdev/BasicCompiler32/Compile_Var.cpp	(revision 225)
@@ -28,5 +28,5 @@
 
 	//pop ebx
-	op_pop(REG_EBX);
+	compiler.codeGenerator.op_pop(REG_EBX);
 
 	if( resultType.PtrLevel() ){
@@ -36,5 +36,5 @@
 		if(typeSize>=2){
 			//imul ebx,i2
-			op_imul_RV( REG_EBX, typeSize );
+			compiler.codeGenerator.op_imul_RV( REG_EBX, typeSize );
 		}
 	}
@@ -46,14 +46,13 @@
 
 	//pop ecx
-	op_pop(REG_ECX);
+	compiler.codeGenerator.op_pop(REG_ECX);
 
 	//add ecx,ebx
-	OpBuffer[obp++]=(char)0x03;
-	OpBuffer[obp++]=(char)0xCB;
+	compiler.codeGenerator.op_add_RR( REG_ECX, REG_EBX );
 }
 void SetRelativeOffset( RELATIVE_VAR &relativeVar ){
 	if(relativeVar.dwKind==VAR_DIRECTMEM){
 		//mov ecx,dword ptr[ecx]
-		op_mov_RM( sizeof(long), REG_ECX, REG_ECX, 0, MOD_BASE );
+		compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_ECX, 0, MOD_BASE );
 	}
 	else{
@@ -63,5 +62,5 @@
 
 		//mov ecx,dword ptr[eax]
-		op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE );
+		compiler.codeGenerator.op_mov_RM( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE );
 	}
 }
@@ -114,8 +113,8 @@
 
 	//push ecx
-	op_push(REG_ECX);
+	compiler.codeGenerator.op_push(REG_ECX);
 
 	//push 0
-	op_push_V(0);
+	compiler.codeGenerator.op_push_V(0);
 
 	for(i=i3-1;i>=0;i--){
@@ -133,5 +132,5 @@
 
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		for(i2=i+1,i4=1;i2<i3;i2++) i4*=subscripts[i2]+1;
@@ -152,5 +151,5 @@
 
 	//pop eax
-	op_pop(REG_EAX);
+	compiler.codeGenerator.op_pop(REG_EAX);
 
 	//imul eax,TypeSize
@@ -161,9 +160,8 @@
 
 	//pop ecx
-	op_pop(REG_ECX);
+	compiler.codeGenerator.op_pop(REG_ECX);
 
 	//add ecx,eax
-	OpBuffer[obp++]=(char)0x03;
-	OpBuffer[obp++]=(char)0xC8;
+	compiler.codeGenerator.op_add_RR( REG_ECX, REG_EAX );
 
 	return 1;
@@ -628,5 +626,5 @@
 		//xor ecx,ecx（ecxを0に初期化する）
 		//※ecxは変数ベースアドレスからの相対オフセットを示す
-		op_zero_reg(REG_ECX);
+		compiler.codeGenerator.op_zero_reg(REG_ECX);
 
 		pRelativeVar->bOffsetOffset=1;
@@ -1194,8 +1192,8 @@
 		else{
 			//push 0
-			op_push_V(0);
+			compiler.codeGenerator.op_push_V(0);
 
 			//push VarSize
-			op_push_V( pVar->GetMemorySize() );
+			compiler.codeGenerator.op_push_V( pVar->GetMemorySize() );
 
 			//mov eax,ebp
@@ -1210,5 +1208,5 @@
 
 			//push eax
-			op_push(REG_EAX);
+			compiler.codeGenerator.op_push(REG_EAX);
 
 			//call FillMemory
@@ -1237,5 +1235,5 @@
 
 		//pop eax
-		op_pop( REG_EAX );
+		compiler.codeGenerator.op_pop( REG_EAX );
 
 		RELATIVE_VAR RelativeVar;
@@ -1273,9 +1271,9 @@
 
 			//add eax,dword ptr[offset]
-			op_add_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+			compiler.codeGenerator.op_add_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
 		}
 		else{
 			//mov eax,dword ptr[offset]
-			op_mov_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
+			compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_NON, (int)pRelativeVar->offset, MOD_DISP32 );
 		}
 		obp-=sizeof(long);
@@ -1356,5 +1354,5 @@
 
 			// 変数領域に要するLONG_PTR単位の個数を引き渡す
-			op_push_V( pVar->GetMemorySize()/PTR_SIZE );
+			compiler.codeGenerator.op_push_V( pVar->GetMemorySize()/PTR_SIZE );
 
 
@@ -1363,5 +1361,5 @@
 
 			//mov eax,offset
-			op_mov_RV(REG_EAX,(int)pVar->GetOffsetAddress());
+			compiler.codeGenerator.op_mov_RV(REG_EAX,(int)pVar->GetOffsetAddress());
 			obp-=sizeof(long);
 			pobj_GlobalVarSchedule->add();
@@ -1369,5 +1367,5 @@
 
 			//push eax
-			op_push( REG_EAX );
+			compiler.codeGenerator.op_push( REG_EAX );
 
 			//
@@ -1381,5 +1379,5 @@
 
 			//push eax
-			op_push( REG_EAX );
+			compiler.codeGenerator.op_push( REG_EAX );
 
 			//
@@ -1388,5 +1386,5 @@
 
 			// call AddGlobalRootPtr
-			op_call( pUserProc_AddGlobalRootPtr );
+			compiler.codeGenerator.op_call( pUserProc_AddGlobalRootPtr );
 
 			ReallocNativeCodeBuffer();
