Forráskód Böngészése

Patched issue with fictive offsets (symbol file did not show them ....)

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6678 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 éve
szülő
commit
36588b303f
3 módosított fájl, 8 hozzáadás és 4 törlés
  1. 2 0
      source/FoxPrintout.Mod
  2. 1 1
      source/FoxSemanticChecker.Mod
  3. 5 3
      source/FoxSyntaxTree.Mod

+ 2 - 0
source/FoxPrintout.Mod

@@ -1097,6 +1097,8 @@ TYPE
 					Value(Global.NameFixed,x.alignment,first)
 				ELSIF x.alignment > 1 THEN
 					Value(Global.NameAligned,x.alignment,first)
+				ELSIF x.fictive THEN
+					Value(Global.NameFictive, x.fictiveOffset, first);
 				END;
 				IF x.untraced THEN
 					Flag(Global.NameUntraced,first)

+ 1 - 1
source/FoxSemanticChecker.Mod

@@ -6600,7 +6600,7 @@ TYPE
 					IF (variable.scope IS SyntaxTree.ProcedureScope) THEN
 						Error(position, Diagnostics.Invalid,"fictive offset not possible in procedure");
 					END;
-					variable.SetFictive(TRUE);
+					variable.SetFictive(value);
 					variable.SetOffset(value*system.dataUnit);
 				END;
 				IF HasFlag(modifiers, Global.NameRegister, position) THEN variable.SetUseRegister(TRUE) END;

+ 5 - 3
source/FoxSyntaxTree.Mod

@@ -3193,6 +3193,7 @@ TYPE
 		nextVariable-: Variable;
 		untraced-: BOOLEAN;
 		fictive-: BOOLEAN; (* variable is not allocated but has a fixed offset *)
+		fictiveOffset-: LONGINT; (* offset of fictive as provided by the source code *)
 		useRegister-: BOOLEAN; registerNumber-: LONGINT;
 		modifiers-: Modifier;
 		initializer-: Expression;
@@ -3232,10 +3233,11 @@ TYPE
 			registerNumber := reg
 		END SetRegisterNumber;
 		
-		PROCEDURE SetFictive*(f: BOOLEAN);
+		PROCEDURE SetFictive*(offset: LONGINT);
 		BEGIN
-			fictive := f;
-			IF fictive THEN SetUntraced(TRUE) END;
+			fictive := TRUE;
+			fictiveOffset := offset;
+			SetUntraced(TRUE);
 		END SetFictive;
 		
 		PROCEDURE SetModifiers*(flag: Modifier);