]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove incannedimport
authorMatthew Dempsky <mdempsky@google.com>
Mon, 12 Sep 2016 20:39:54 +0000 (13:39 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 12 Sep 2016 21:35:10 +0000 (21:35 +0000)
commit1ee544641450236e8c78d8d408e6cb8ab69cee60
tree50c70408b5b35921808ef9ed7ef72db5d5e281ad
parent4c83d2914467e670d680b967ec689f8434136188
cmd/compile: remove incannedimport

This used to be used to give special semantics to the builtin
definitions of package runtime and unsafe, but none of those are
relevant anymore:

- The builtin runtime and unsafe packages do not risk triggering false
  import cycles since they no longer contain `import "runtime"`.

- bimport.go never creates ODCLTYPE, so no need to special case them.

- "incannedimport != 0" is only true when "importpkg != nil" anyway,
  so "incannedimport == 0 && importpkg == nil" is equivalent to just
  "importpkg == nil".

Change-Id: I076f15dd705d4962e7a4c33972e304ef67e7effb
Reviewed-on: https://go-review.googlesource.com/29084
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/typecheck.go