Procházet zdrojové kódy

step2.1: rename 64-bit images .MCD -> .MC4 per spec sections 8 and 14

Eric Streit před 3 týdny
rodič
revize
cf445a1904
28 změnil soubory, kde provedl 7 přidání a 7 odebrání
  1. 0 0
      M.MC4
  2. binární
      M2c
  3. 1 1
      M2c.atg
  4. 2 2
      MGen.def
  5. 1 1
      MGen.mod
  6. binární
      MGen.o
  7. 0 0
      TArith.MC4
  8. 0 0
      TBadArr.MC4
  9. 0 0
      TBadAsn.MC4
  10. 0 0
      TBadConst.MC4
  11. 0 0
      TBadDeref.MC4
  12. 0 0
      TBadExit.MC4
  13. 0 0
      TBadWith.MC4
  14. 0 0
      TBool.MC4
  15. 0 0
      TCase.MC4
  16. 0 0
      TChar.MC4
  17. 0 0
      TConst.MC4
  18. 0 0
      TEnum.MC4
  19. 0 0
      TFor.MC4
  20. 0 0
      TFull.MC4
  21. 0 0
      TIf.MC4
  22. 0 0
      TLoop.MC4
  23. 0 0
      TMin.MC4
  24. 0 0
      TReal.MC4
  25. 0 0
      TRepeat.MC4
  26. 0 0
      TSet.MC4
  27. 0 0
      TWhile.MC4
  28. 3 3
      run_tests.sh

+ 0 - 0
M.MCD → M.MC4


binární
M2c


+ 1 - 1
M2c.atg

@@ -13,7 +13,7 @@ COMPILER M2c
      CARDINAL and subranges form one integer family; no mixed
      INTEGER/REAL arithmetic; INTEGER assigns to REAL; 1-character
      literal is CHAR; InvalidType suppresses follow-on errors)
-   - backend (MGen): emits a single-module MC64 image <ModName>.MCD
+   - backend (MGen): emits a single-module MC64 image <ModName>.MC4
      (current directory), runnable with mcint. Lowered: scalar
      globals, CONST literals (startup stores), SET OF ordinals
      (bit masks) with literals, IN, = and #; full scalar

+ 2 - 2
MGen.def

@@ -1,7 +1,7 @@
 DEFINITION MODULE MGen;
 (* MC64 image emitter for the M2c scalar subset (see M2c.atg).
 
-   Buffers a single-module MC64 image and writes "<Module>.MCD"
+   Buffers a single-module MC64 image and writes "<Module>.MC4"
    (current directory) at EndModule. The image satisfies the
    reference loader (Loader2): magic "MC64", descriptor with name,
    TOINIT flag, global sizes (one 8-byte slot per variable), two
@@ -44,7 +44,7 @@ PROCEDURE BeginBody;
 
 PROCEDURE EndModule;
 (* Emits the epilogue, the print procedure, the procedure table,
-   the descriptor, the checksum, and writes the .MCD file. *)
+   the descriptor, the checksum, and writes the .MC4 file. *)
 
 PROCEDURE LoadVar (name: ARRAY OF CHAR);
 (* Pushes the global (placeholder push-0 if unknown). *)

+ 1 - 1
MGen.mod

@@ -814,7 +814,7 @@ PROCEDURE EndModule;
     StrCpy(fname, modName);
     i := StrLen(fname);
     fname[i] := "."; fname[i + 1] := "M"; fname[i + 2] := "C";
-    fname[i + 3] := "D"; fname[i + 4] := 0C;
+    fname[i + 3] := "4"; fname[i + 4] := 0C;
     FileIO.Open(f, fname, TRUE);
     IF FileIO.Okay THEN
       i := 0;

binární
MGen.o


+ 0 - 0
TArith.MCD → TArith.MC4


+ 0 - 0
TBadArr.MCD → TBadArr.MC4


+ 0 - 0
TBadAsn.MCD → TBadAsn.MC4


+ 0 - 0
TBadConst.MCD → TBadConst.MC4


+ 0 - 0
TBadDeref.MCD → TBadDeref.MC4


+ 0 - 0
TBadExit.MCD → TBadExit.MC4


+ 0 - 0
TBadWith.MCD → TBadWith.MC4


+ 0 - 0
TBool.MCD → TBool.MC4


+ 0 - 0
TCase.MCD → TCase.MC4


+ 0 - 0
TChar.MCD → TChar.MC4


+ 0 - 0
TConst.MCD → TConst.MC4


+ 0 - 0
TEnum.MCD → TEnum.MC4


+ 0 - 0
TFor.MCD → TFor.MC4


+ 0 - 0
TFull.MCD → TFull.MC4


+ 0 - 0
TIf.MCD → TIf.MC4


+ 0 - 0
TLoop.MCD → TLoop.MC4


+ 0 - 0
TMin.MCD → TMin.MC4


+ 0 - 0
TReal.MCD → TReal.MC4


+ 0 - 0
TRepeat.MCD → TRepeat.MC4


+ 0 - 0
TSet.MCD → TSet.MC4


+ 0 - 0
TWhile.MCD → TWhile.MC4


+ 3 - 3
run_tests.sh

@@ -3,7 +3,7 @@
 # Step-2 test runner for M2c (scalars + MC64 backend).
 # Usage: ./run_tests.sh   (from the m2c directory, after ./build.sh)
 #
-# Positive tests: compile with M2c, run the newest .MCD under mcint,
+# Positive tests: compile with M2c, run the newest .MC4 under mcint,
 # compare the printed ExitCode value with the expectation.
 #
 
@@ -52,7 +52,7 @@ expect_run() {
   name="$1"
   want="$2"
   mod=$(head -n 1 "tests/$name" | cut -d' ' -f2 | cut -d';' -f1)
-  mcd="$mod.MCD"
+  mcd="$mod.MC4"
   rm -f "$mcd"
   out=$(./M2c "tests/$name" 2>&1)
   case "$out" in
@@ -79,7 +79,7 @@ expect_run_none() {
   # $1 = test file — must compile and run with empty output
   name="$1"
   mod=$(head -n 1 "tests/$name" | cut -d' ' -f2 | cut -d';' -f1)
-  mcd="$mod.MCD"
+  mcd="$mod.MC4"
   rm -f "$mcd"
   out=$(./M2c "tests/$name" 2>&1)
   case "$out" in