Browse Source

Patched issue with initialization of static arrays

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6978 8c9fc860-2736-0410-a75d-ab315db34111
felixf 8 years ago
parent
commit
346d08fece
1 changed files with 2 additions and 2 deletions
  1. 2 2
      source/FoxIntermediateBackend.Mod

+ 2 - 2
source/FoxIntermediateBackend.Mod

@@ -306,7 +306,7 @@ TYPE
 		END VisitOperator;
 		END VisitOperator;
 
 
 		PROCEDURE VisitVariable(x: SyntaxTree.Variable);
 		PROCEDURE VisitVariable(x: SyntaxTree.Variable);
-		VAR name: Basic.SegmentedName; irv: IntermediateCode.Section; align, i, dim: LONGINT;
+		VAR name: Basic.SegmentedName; irv: IntermediateCode.Section; align,  dim, i: LONGINT;
 			size: LONGINT; lastUpdated: LONGINT; imm: IntermediateCode.Operand;
 			size: LONGINT; lastUpdated: LONGINT; imm: IntermediateCode.Operand;
 
 
 			PROCEDURE TypeNeedsInitialization(type: SyntaxTree.Type): BOOLEAN;
 			PROCEDURE TypeNeedsInitialization(type: SyntaxTree.Type): BOOLEAN;
@@ -354,7 +354,7 @@ TYPE
 			
 			
 
 
 			PROCEDURE Initialize(type: SyntaxTree.Type; initializer: SyntaxTree.Expression; offset: LONGINT);
 			PROCEDURE Initialize(type: SyntaxTree.Type; initializer: SyntaxTree.Expression; offset: LONGINT);
-			VAR op: Operand; baseType: SyntaxTree.Type; variable: SyntaxTree.Variable;
+			VAR op: Operand; baseType: SyntaxTree.Type; variable: SyntaxTree.Variable; i: LONGINT; size: SIZE;
 			BEGIN
 			BEGIN
 				IF type = NIL THEN RETURN ELSE type := type.resolved END;
 				IF type = NIL THEN RETURN ELSE type := type.resolved END;
 				WITH type: SyntaxTree.RecordType DO
 				WITH type: SyntaxTree.RecordType DO