1
0
mirror of https://github.com/golang/go synced 2024-11-25 00:17:58 -07:00

cmd/compile: change two pushedio.bin tests to use importpkg instead

pushedio.bin and importpkg are both non-nil iff we're parsing an
package's export data, so "pushedio.bin == nil" and "importpkg == nil"
are equivalent tests.

Change-Id: I571ee908fef867117ef72c5da1eb24fe9b3fd12d
Reviewed-on: https://go-review.googlesource.com/19751
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Matthew Dempsky 2016-02-19 18:39:25 -08:00
parent f8e41f6f59
commit 4e6e8e8c58

View File

@ -1936,7 +1936,7 @@ check:
fallthrough fallthrough
case '\n': case '\n':
if pushedio.bin == nil { if importpkg == nil {
lexlineno++ lexlineno++
} }
} }
@ -1948,7 +1948,7 @@ check:
func ungetc(c int) { func ungetc(c int) {
curio.peekc1 = curio.peekc curio.peekc1 = curio.peekc
curio.peekc = c curio.peekc = c
if c == '\n' && pushedio.bin == nil { if c == '\n' && importpkg == nil {
lexlineno-- lexlineno--
} }
} }