Index: trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 206)
+++ trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 225)
@@ -2,4 +2,6 @@
 
 #include <jenga/include/smoothie/Smoothie.h>
+
+#include <Compiler.h>
 
 #include "../BasicCompiler_Common/common.h"
@@ -21,27 +23,27 @@
 
 				//mov ecx,object_size
-				op_mov_RV(REG_ECX,object_size);
+				compiler.codeGenerator.op_mov_RV(REG_ECX,object_size);
 
 				//pop esi
-				op_pop(REG_ESI);
+				compiler.codeGenerator.op_pop(REG_ESI);
 
 				//pop edi
-				op_pop(REG_EDI);
+				compiler.codeGenerator.op_pop(REG_EDI);
 
 				if(bUseHeap){
 					//mov eax,esi
-					op_mov_RR(REG_EAX,REG_ESI);
+					compiler.codeGenerator.op_mov_RR(REG_EAX,REG_ESI);
 				}
 
 				//rep movs byte ptr[edi],byte ptr[esi]
-				op_rep_movs(sizeof(BYTE));
+				compiler.codeGenerator.op_rep_movs(sizeof(BYTE));
 
 				if(bUseHeap){
 					//push eax
-					op_push(REG_EAX);
+					compiler.codeGenerator.op_push(REG_EAX);
 
 					//call free
 					extern const UserProc *pSub_free;
-					op_call(pSub_free);
+					compiler.codeGenerator.op_call(pSub_free);
 				}
 
@@ -64,27 +66,27 @@
 
 			//push edx
-			op_push( REG_EDX );
+			compiler.codeGenerator.op_push( REG_EDX );
 
 			//push eax
-			op_push( REG_EAX );
+			compiler.codeGenerator.op_push( REG_EAX );
 
 			//fild qword ptr[esp]
-			op_fld_ptr_esp(DEF_INT64);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_INT64);
 
 			//pop
-			op_pop( REG_NON );
+			compiler.codeGenerator.op_pop( REG_NON );
 
 			//pop
-			op_pop( REG_NON );
+			compiler.codeGenerator.op_pop( REG_NON );
 		}
 		else{
 			//push eax
-			op_push( REG_EAX );
+			compiler.codeGenerator.op_push( REG_EAX );
 
 			//fild qword ptr[esp]
-			op_fld_ptr_esp(DEF_LONG);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_LONG);
 
 			//pop
-			op_pop( REG_NON );
+			compiler.codeGenerator.op_pop( REG_NON );
 		}
 	}
@@ -93,5 +95,5 @@
 		if(pRelativeVar->bOffsetOffset){
 			//fstp ptr[ecx+offset]
-			op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset);
+			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset);
 			obp-=sizeof(long);
 			pobj_GlobalVarSchedule->add();
@@ -100,5 +102,5 @@
 		else{
 			//mov ecx,offset
-			op_mov_RV(REG_ECX,(int)pRelativeVar->offset);
+			compiler.codeGenerator.op_mov_RV(REG_ECX,(int)pRelativeVar->offset);
 			obp-=sizeof(long);
 			pobj_GlobalVarSchedule->add();
@@ -106,5 +108,5 @@
 
 			//fstp ptr[ecx]
-			op_fstp_basereg(VarType,REG_ECX);
+			compiler.codeGenerator.op_fstp_basereg(VarType,REG_ECX);
 		}
 	}
@@ -112,9 +114,9 @@
 		if(pRelativeVar->bOffsetOffset){
 			//add ecx,qword ptr[offset]
-			op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+			compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
 		}
 		else{
 			//mov ecx,qword ptr[offset]
-			op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
+			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
 		}
 		obp-=sizeof(long);
@@ -127,9 +129,9 @@
 		if(pRelativeVar->bOffsetOffset){
 			//fstp ptr[ebp+ecx+offset]
-			op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);
+			compiler.codeGenerator.op_fstp_base_offset_ex(VarType,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);
 		}
 		else{
 			//fstp ptr[ebp+offset]
-			op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset);
+			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset);
 		}
 		obp-=sizeof(long);
@@ -140,9 +142,9 @@
 		if(pRelativeVar->bOffsetOffset){
 			//add ecx,qword ptr[ebp+offset]
-			op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_add_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
 		}
 		else{
 			//mov ecx,qword ptr[ebp+offset]
-			op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
 		}
 		obp-=sizeof(long);
@@ -155,5 +157,5 @@
 directmem:
 		//fstp ptr[ecx]
-		op_fstp_basereg(VarType,REG_ECX);
+		compiler.codeGenerator.op_fstp_basereg(VarType,REG_ECX);
 	}
 }
@@ -170,17 +172,17 @@
 	else if(type==DEF_INT64||type==DEF_QWORD){
 		//cmp eax,0
-		op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
+		compiler.codeGenerator.op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
 
 		//setne al
-		op_setne( REG_EAX );
+		compiler.codeGenerator.op_setne( REG_EAX );
 
 		//cmp edx,0
-		op_cmp_value(GetTypeSize(type,-1),REG_EDX,0);
+		compiler.codeGenerator.op_cmp_value(GetTypeSize(type,-1),REG_EDX,0);
 
 		//setne cl
-		op_setne( REG_ECX );
+		compiler.codeGenerator.op_setne( REG_ECX );
 
 		//or al,cl
-		op_or_RR( sizeof( _int8 ), REG_EAX, REG_ECX );
+		compiler.codeGenerator.op_or_RR( sizeof( _int8 ), REG_EAX, REG_ECX );
 	}
 	else{
@@ -193,8 +195,8 @@
 
 	//cmp eax,0
-	op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
+	compiler.codeGenerator.op_cmp_value(GetTypeSize(type,-1),REG_EAX,0);
 
 	//setne al
-	op_setne( REG_EAX );
+	compiler.codeGenerator.op_setne( REG_EAX );
 
 	SetWholeVariable( sizeof(char), DEF_BYTE, pRelative );
@@ -209,9 +211,9 @@
 	if(IsSignedType(type)){
 		//cdq
-		op_cdq();
+		compiler.codeGenerator.op_cdq();
 	}
 	else{
 		//xor edx,edx
-		op_zero_reg(REG_EDX);
+		compiler.codeGenerator.op_zero_reg(REG_EDX);
 	}
 }
@@ -219,17 +221,17 @@
 	if(type==DEF_INTEGER || (Smoothie::IsUnicode()&&type==DEF_CHAR)){
 		//movsx reg32,reg16
-		op_movsx_R32R16(reg,reg);
+		compiler.codeGenerator.op_movsx_R32R16(reg,reg);
 	}
 	else if(type==DEF_WORD){
 		//and reg,0000FFFFh
-		op_and_RV(reg,(int)0x0000FFFF);
+		compiler.codeGenerator.op_and_RV(reg,(int)0x0000FFFF);
 	}
 	else if(type==DEF_SBYTE || (Smoothie::IsUnicode()==false&&type==DEF_CHAR)){
 		//movsx reg32,reg8
-		op_movsx_R32R8(reg,reg);
+		compiler.codeGenerator.op_movsx_R32R8(reg,reg);
 	}
 	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
 		//and reg,000000FFh
-		op_and_RV(reg,(int)0xFF);
+		compiler.codeGenerator.op_and_RV(reg,(int)0xFF);
 	}
 }
@@ -237,9 +239,9 @@
 	if(type==DEF_SBYTE || (Smoothie::IsUnicode()==false&&type==DEF_CHAR)){
 		//movsx reg16,reg8
-		op_movsx_R16R8(reg,reg);
+		compiler.codeGenerator.op_movsx_R16R8(reg,reg);
 	}
 	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
 		//and reg,000000FFh
-		op_and_RV(reg,(int)0xFF);
+		compiler.codeGenerator.op_and_RV(reg,(int)0xFF);
 	}
 }
@@ -256,14 +258,14 @@
 			//push
 			//push
-			op_sub_esp( PTR_SIZE * 2 );
+			compiler.codeGenerator.op_sub_esp( PTR_SIZE * 2 );
 
 			//fistp qword ptr[esp]
-			op_fistp_ptr_esp( sizeof(_int64) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(_int64) );
 
 			//pop eax
-			op_pop( REG_EAX );
+			compiler.codeGenerator.op_pop( REG_EAX );
 
 			//pop edx
-			op_pop( REG_EDX );
+			compiler.codeGenerator.op_pop( REG_EDX );
 		}
 		else{
@@ -272,11 +274,11 @@
 
 			//push
-			op_push( REG_NON );
+			compiler.codeGenerator.op_push( REG_NON );
 
 			//fistp dword ptr[esp]
-			op_fistp_ptr_esp( sizeof(long) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(long) );
 
 			//pop eax
-			op_pop( REG_EAX );
+			compiler.codeGenerator.op_pop( REG_EAX );
 		}
 	}
@@ -310,11 +312,11 @@
 
 		//mov ecx,eax
-		op_mov_RR( REG_ECX, REG_EAX );
+		compiler.codeGenerator.op_mov_RR( REG_ECX, REG_EAX );
 
 		//add ecx,sizeof(long)
-		op_add_RV8( REG_ECX, sizeof(long) );
+		compiler.codeGenerator.op_add_RV8( REG_ECX, sizeof(long) );
 
 		//mov eax,edx
-		op_mov_RR( REG_EAX, REG_EDX );
+		compiler.codeGenerator.op_mov_RR( REG_EAX, REG_EDX );
 
 		SetWholeVariable(sizeof(long),DEF_LONG,pRelative);
@@ -326,9 +328,9 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[ecx+offset],eax/ax/al
-			op_mov_MR(varSize,REG_EAX,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_ECX,(int)pRelative->offset,MOD_BASE_DISP32);
 		}
 		else{
 			//mov ptr[offset],eax/ax/al
-			op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32);
 		}
 		obp-=sizeof(long);
@@ -342,9 +344,9 @@
 		if(pRelative->bOffsetOffset){
 			//add ecx,qword ptr[offset]
-			op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
+			compiler.codeGenerator.op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
 		}
 		else{
 			//mov ecx,qword ptr[offset]
-			op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
+			compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
 		}
 		obp-=sizeof(long);
@@ -357,9 +359,9 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[ebp+ecx+offset],eax/ax/al
-			op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET);
+			compiler.codeGenerator.op_mov_MR_ex(varSize,REG_EAX,REG_EBP,REG_ECX,(int)pRelative->offset,USE_OFFSET);
 		}
 		else{
 			//mov ptr[ebp+offset],eax/ax/al
-			op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
 		}
 		obp-=sizeof(long);
@@ -370,9 +372,9 @@
 		if(pRelative->bOffsetOffset){
 			//add ecx,ptr[ebp+offset]
-			op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_add_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
 		}
 		else{
 			//mov ecx,ptr[ebp+offset]
-			op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
+			compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
 		}
 		obp-=sizeof(long);
@@ -386,5 +388,5 @@
 
 		//mov ptr[ecx],eax/ax/al
-		op_mov_MR(varSize,REG_EAX,REG_ECX,0,MOD_BASE);
-	}
-}
+		compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_ECX,0,MOD_BASE);
+	}
+}
