]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: change two pushedio.bin tests to use importpkg instead
authorMatthew Dempsky <mdempsky@google.com>
Sat, 20 Feb 2016 02:39:25 +0000 (18:39 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 20 Feb 2016 04:40:29 +0000 (04:40 +0000)
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>
src/cmd/compile/internal/gc/lex.go

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