فهرست منبع

Fixed reflection of set values

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7815 8c9fc860-2736-0410-a75d-ab315db34111
eth.negelef 7 سال پیش
والد
کامیت
12731370b8
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      source/FoxIntermediateBackend.Mod
  2. 2 2
      source/Generic.Reflection.Mod

+ 1 - 1
source/FoxIntermediateBackend.Mod

@@ -11545,7 +11545,7 @@ TYPE
 		PROCEDURE Set(section: IntermediateCode.Section; value: Basic.Set);
 		PROCEDURE Set(section: IntermediateCode.Section; value: Basic.Set);
 		VAR op: IntermediateCode.Operand;
 		VAR op: IntermediateCode.Operand;
 		BEGIN
 		BEGIN
-			IntermediateCode.InitImmediate(op,IntermediateCode.GetType(module.system, module.system.sizeType),SYSTEM.VAL(HUGEINT,value));
+			IntermediateCode.InitImmediate(op,IntermediateCode.GetType(module.system, module.system.setType),SYSTEM.VAL(Basic.Integer,value));
 			section.Emit(Data(Basic.invalidPosition,op));
 			section.Emit(Data(Basic.invalidPosition,op));
 		END Set;
 		END Set;
 
 

+ 2 - 2
source/Generic.Reflection.Mod

@@ -202,7 +202,7 @@ CONST
 	VAR set: SET; i: SIZE;
 	VAR set: SET; i: SIZE;
 	BEGIN
 	BEGIN
 		IF ~Expect(offset, offset < LEN(refs)) THEN RETURN {} END; 
 		IF ~Expect(offset, offset < LEN(refs)) THEN RETURN {} END; 
-		FOR i := 0 TO SIZEOF(LONGINT)-1 DO
+		FOR i := 0 TO SIZEOF(SET)-1 DO
 			SYSTEM.PUT8(ADDRESSOF(set)+i, refs[offset]);
 			SYSTEM.PUT8(ADDRESSOF(set)+i, refs[offset]);
 			INC(offset);
 			INC(offset);
 		END;
 		END;
@@ -212,7 +212,7 @@ CONST
 	(* skip a set in the byte stream *)
 	(* skip a set in the byte stream *)
 	PROCEDURE SkipSet*(VAR offset: SIZE);
 	PROCEDURE SkipSet*(VAR offset: SIZE);
 	BEGIN
 	BEGIN
-		INC(offset, SIZEOF(LONGINT)); 
+		INC(offset, SIZEOF(SET)); 
 	END SkipSet;
 	END SkipSet;
 
 
 	(* consume a string in the byte stream *)
 	(* consume a string in the byte stream *)