ソースを参照

lower L7: EndSession takes the test-suffix flag

Prep for the flip: the driver passes lowerAst so EndSession can write
either "<mod>.ssa" (normal) or the test-only "<mod>L.ssa".
Eric Streit 1 週間 前
親
コミット
2509859574
2 ファイル変更、2 行追加、2 行削除
  1. 1 1
      compiler/src/Lower.def
  2. 1 1
      compiler/src/compiler.frm

+ 1 - 1
compiler/src/Lower.def

@@ -20,7 +20,7 @@ PROCEDURE LowerSession (units: ARRAY OF AST.Node; n: CARDINAL;
 PROCEDURE BeginSession (progName: ARRAY OF CHAR);
 PROCEDURE BeginSession (progName: ARRAY OF CHAR);
 PROCEDURE BeginUnit;
 PROCEDURE BeginUnit;
 PROCEDURE LowerUnitNow (unit: AST.Node; isProg: BOOLEAN);
 PROCEDURE LowerUnitNow (unit: AST.Node; isProg: BOOLEAN);
-PROCEDURE EndSession;
+PROCEDURE EndSession (testSuffix: BOOLEAN);
 
 
 (* The expression/statement/declaration walkers are mutually recursive.
 (* The expression/statement/declaration walkers are mutually recursive.
    gm2's link pass rejects FORWARD and V3 has no whole-module pass, so
    gm2's link pass rejects FORWARD and V3 has no whole-module pass, so

+ 1 - 1
compiler/src/compiler.frm

@@ -351,7 +351,7 @@ MODULE -->Grammar;
       INC(f)
       INC(f)
     END;
     END;
 
 
-    IF lowerAst THEN Lower.EndSession END;
+    IF lowerAst THEN Lower.EndSession(lowerAst) END;
 
 
     IF bad OR NOT SymTab.HaveProgram()
     IF bad OR NOT SymTab.HaveProgram()
       THEN FileIO.WriteString(FileIO.StdOut, "Incorrect source")
       THEN FileIO.WriteString(FileIO.StdOut, "Incorrect source")