Browse Source

Fixed references in cooperative mode

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7328 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 years ago
parent
commit
69201e8268
1 changed files with 4 additions and 6 deletions
  1. 4 6
      source/FoxIntermediateBackend.Mod

+ 4 - 6
source/FoxIntermediateBackend.Mod

@@ -12329,6 +12329,7 @@ TYPE
 				VAR s: Sections.Section; procedureType: SyntaxTree.ProcedureType; parameter: SyntaxTree.Parameter; pos: LONGINT;
 				VAR s: Sections.Section; procedureType: SyntaxTree.ProcedureType; parameter: SyntaxTree.Parameter; pos: LONGINT;
 					flags: SET;
 					flags: SET;
 				BEGIN
 				BEGIN
+					IF procedure.externalName # NIL THEN RETURN END;
 					IF RefInfo THEN Info(section, "Procedure") END;
 					IF RefInfo THEN Info(section, "Procedure") END;
 					pos := CurrentIndex(); 
 					pos := CurrentIndex(); 
 					procedureType := procedure.type.resolved(SyntaxTree.ProcedureType);
 					procedureType := procedure.type.resolved(SyntaxTree.ProcedureType);
@@ -12487,12 +12488,9 @@ TYPE
 			BEGIN
 			BEGIN
 				NEW(indirectTypes, 32); 
 				NEW(indirectTypes, 32); 
 				ArrayBlock(section,sizePC,"", FALSE);
 				ArrayBlock(section,sizePC,"", FALSE);
-				
-				IF ~implementationVisitor.backend.cooperative THEN
-					startPC := section.pc;
-					NModule(module.module, -1);
-					PatchArray(section,sizePC,CurrentIndex());
-				END;
+				startPC := section.pc;
+				NModule(module.module, -1);
+				PatchArray(section,sizePC,CurrentIndex());
 			END References;
 			END References;
 			
 			
 		(*
 		(*