Change-Id: I01b2278eb50585331b8ff7ff5e3c1f9c5ba52b63
Reviewed-on: https://go-review.googlesource.com/33156
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
var bout *bio.Writer
+// nerrors is the number of compiler errors reported
+// since the last call to saveerrors.
var nerrors int
+// nsavederrors is the total number of compiler errors
+// reported before the last call to saveerrors.
var nsavederrors int
var nsyntaxerrors int
var timings Timings
var benchfile string
+// Main parses flags and Go source files specified in the command-line
+// arguments, type-checks the parsed Go package, compiles functions to machine
+// code, and finally writes the compiled package definition to disk.
func Main() {
timings.Start("fe", "init")
errorexit()
}
+ // Write object data to disk.
timings.Start("be", "dumpobj")
dumpobj()
if asmhdr != "" {
func (x byLineno) Less(i, j int) bool { return x[i].lineno < x[j].lineno }
func (x byLineno) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+// flusherrors sorts errors seen so far by line number, prints them to stdout,
+// and empties the errors array.
func flusherrors() {
Ctxt.Bso.Flush()
if len(errors) == 0 {