From 7dbe2779d37da17210a94468cef25f10ae6837fc Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Thu, 3 Jan 2019 23:03:04 -0500 Subject: [PATCH] errormsg: remove errorText This was never used, and makes `print' allocate memory for no good reason. --- src/errormsg.sig | 1 - src/errormsg.sml | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/errormsg.sig b/src/errormsg.sig index 12dbb6e..bd04c40 100644 --- a/src/errormsg.sig +++ b/src/errormsg.sig @@ -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 diff --git a/src/errormsg.sml b/src/errormsg.sml index 5c04589..9a3b975 100644 --- a/src/errormsg.sml +++ b/src/errormsg.sml @@ -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]; -- 2.20.1