Index: trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 225)
+++ trunk/abdev/BasicCompiler32/Compile_Set_Var.cpp	(revision 230)
@@ -95,15 +95,9 @@
 		if(pRelativeVar->bOffsetOffset){
 			//fstp ptr[ecx+offset]
-			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset);
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_ECX,(int)pRelativeVar->offset, Schedule::GlobalVar );
 		}
 		else{
 			//mov ecx,offset
-			compiler.codeGenerator.op_mov_RV(REG_ECX,(int)pRelativeVar->offset);
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RV(REG_ECX,(int)pRelativeVar->offset, Schedule::GlobalVar );
 
 			//fstp ptr[ecx]
@@ -114,13 +108,10 @@
 		if(pRelativeVar->bOffsetOffset){
 			//add ecx,qword ptr[offset]
-			compiler.codeGenerator.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, Schedule::GlobalVar );
 		}
 		else{
 			//mov ecx,qword ptr[offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);
-		}
-		obp-=sizeof(long);
-		pobj_GlobalVarSchedule->add();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
 
 		goto directmem;
@@ -129,26 +120,20 @@
 		if(pRelativeVar->bOffsetOffset){
 			//fstp ptr[ebp+ecx+offset]
-			compiler.codeGenerator.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, Schedule::LocalVar );
 		}
 		else{
 			//fstp ptr[ebp+offset]
-			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset);
-		}
-		obp-=sizeof(long);
-		AddLocalVarAddrSchedule();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_fstp_base_offset(VarType,REG_EBP,(int)pRelativeVar->offset, Schedule::LocalVar );
+		}
 	}
 	else if(pRelativeVar->dwKind==VAR_REFLOCAL){
 		if(pRelativeVar->bOffsetOffset){
 			//add ecx,qword ptr[ebp+offset]
-			compiler.codeGenerator.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, Schedule::LocalVar );
 		}
 		else{
 			//mov ecx,qword ptr[ebp+offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
-		}
-		obp-=sizeof(long);
-		AddLocalVarAddrSchedule();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(long),REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32, Schedule::LocalVar );
+		}
 
 		goto directmem;
@@ -328,13 +313,10 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[ecx+offset],eax/ax/al
-			compiler.codeGenerator.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, Schedule::GlobalVar );
 		}
 		else{
 			//mov ptr[offset],eax/ax/al
-			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32);
-		}
-		obp-=sizeof(long);
-		pobj_GlobalVarSchedule->add();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,0,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
 	}
 	else if(pRelative->dwKind==VAR_REFGLOBAL){
@@ -344,13 +326,10 @@
 		if(pRelative->bOffsetOffset){
 			//add ecx,qword ptr[offset]
-			compiler.codeGenerator.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, Schedule::GlobalVar );
 		}
 		else{
 			//mov ecx,qword ptr[offset]
-			compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32);
-		}
-		obp-=sizeof(long);
-		pobj_GlobalVarSchedule->add();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
+		}
 
 		goto directmem;
@@ -359,26 +338,20 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[ebp+ecx+offset],eax/ax/al
-			compiler.codeGenerator.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, Schedule::LocalVar );
 		}
 		else{
 			//mov ptr[ebp+offset],eax/ax/al
-			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
-		}
-		obp-=sizeof(long);
-		AddLocalVarAddrSchedule();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_EAX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
+		}
 	}
 	else if(pRelative->dwKind==VAR_REFLOCAL){
 		if(pRelative->bOffsetOffset){
 			//add ecx,ptr[ebp+offset]
-			compiler.codeGenerator.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, Schedule::LocalVar );
 		}
 		else{
 			//mov ecx,ptr[ebp+offset]
-			compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32);
-		}
-		obp-=sizeof(long);
-		AddLocalVarAddrSchedule();
-		obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(PTR_SIZE,REG_ECX,REG_EBP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
+		}
 
 		goto directmem;
