errormsg: remove errorText
authorClinton Ebadi <clinton@unknownlamer.org>
Fri, 4 Jan 2019 04:03:04 +0000 (23:03 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 4 Jan 2019 04:03:04 +0000 (23:03 -0500)
This was never used, and makes `print' allocate memory for no good
reason.

src/errormsg.sig
src/errormsg.sml

index 12dbb6e..bd04c40 100644 (file)
@@ -7,7 +7,6 @@ signature ERRORMSG =
     val reset : unit -> unit
       
     val anyErrors : bool ref
-    val errorText : string ref
       
     val fileName : string ref
     val sourceStream : TextIO.instream ref
index 5c04589..9a3b975 100644 (file)
@@ -7,19 +7,16 @@ structure ErrorMsg :> ERRORMSG =
     (* Initial values of compiler state variables *)
     val anyErrors = ref false
     val anyWarnings = ref false
-    val errorText = ref ""
     val fileName = ref ""
     val lineNum = ref 1
     val linePos = ref [1]
     val sourceStream = ref TextIO.stdIn
 
-    fun print msg = (errorText := !errorText ^ msg;
-                    TextIO.print msg)
+    fun print msg = (TextIO.print msg)
 
     (* Reset compiler to initial state *)
     fun reset() = (anyErrors:=false;
                   anyWarnings:=false;
-                  errorText:="";
                    fileName:="";
                    lineNum:=1;
                    linePos:=[1];