File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
src/cmd/compile/internal/gc Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,12 @@ var linkobj string
119
119
120
120
var bout * bio.Writer
121
121
122
+ // nerrors is the number of compiler errors reported
123
+ // since the last call to saveerrors.
122
124
var nerrors int
123
125
126
+ // nsavederrors is the total number of compiler errors
127
+ // reported before the last call to saveerrors.
124
128
var nsavederrors int
125
129
126
130
var nsyntaxerrors int
Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ func supportsDynlink(arch *sys.Arch) bool {
98
98
var timings Timings
99
99
var benchfile string
100
100
101
+ // Main parses flags and Go source files specified in the command-line
102
+ // arguments, type-checks the parsed Go package, compiles functions to machine
103
+ // code, and finally writes the compiled package definition to disk.
101
104
func Main () {
102
105
timings .Start ("fe" , "init" )
103
106
@@ -483,6 +486,7 @@ func Main() {
483
486
errorexit ()
484
487
}
485
488
489
+ // Write object data to disk.
486
490
timings .Start ("be" , "dumpobj" )
487
491
dumpobj ()
488
492
if asmhdr != "" {
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ func (x byLineno) Len() int { return len(x) }
58
58
func (x byLineno ) Less (i , j int ) bool { return x [i ].lineno < x [j ].lineno }
59
59
func (x byLineno ) Swap (i , j int ) { x [i ], x [j ] = x [j ], x [i ] }
60
60
61
+ // flusherrors sorts errors seen so far by line number, prints them to stdout,
62
+ // and empties the errors array.
61
63
func flusherrors () {
62
64
Ctxt .Bso .Flush ()
63
65
if len (errors ) == 0 {
You can’t perform that action at this time.
0 commit comments