Skip to content

Commit

Permalink
cmd/compile/internal/gc: cleaning lex.go
Browse files Browse the repository at this point in the history
Cleaning along the way:
-convert variable types from int to bool
-remove unnecessary functions
-remove unnecessary type conversion
-remove unnecessary variable declarations
-transform struct{string,string} with lookup to map[string]string

This change passes go build -toolexec 'toolstash -cmp' -a std.

Change-Id: I259728fe4afd7f23b67f08fab856ce0abee57b21
Reviewed-on: https://go-review.googlesource.com/14435
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
stemar94 authored and ianlancetaylor committed Sep 15, 2015
1 parent 19d262f commit 211cdf1
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 153 deletions.
10 changes: 5 additions & 5 deletions src/cmd/compile/internal/gc/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,12 @@ type Sig struct {
type Io struct {
infile string
bin *obj.Biobuf
nlsemi int
eofnl int
cp string // used for content when bin==nil
last int
peekc int
peekc1 int // second peekc for ...
cp string // used for content when bin==nil
peekc1 int // second peekc for ...
nlsemi bool
eofnl bool
importsafe bool
}

Expand Down Expand Up @@ -598,7 +598,7 @@ var incannedimport int

var statuniqgen int // name generator for static temps

var loophack int
var loophack bool

var iota_ int32

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/go.y
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,6 @@ func fixlbrace(lbr int) {
// set up for another one now that we're done.
// See comment in lex.C about loophack.
if lbr == LBODY {
loophack = 1
loophack = true
}
}
Loading

0 comments on commit 211cdf1

Please sign in to comment.