1
0
mirror of https://github.com/golang/go synced 2024-11-06 06:36:20 -07:00
Commit Graph

1859 Commits

Author SHA1 Message Date
Robert Griesemer
2fb4b8bc95 go/gcimporter15: use latest std/lib gcimporter code
Change-Id: Ia497e56084cf262510461b7e94296570ca8e2049
Reviewed-on: https://go-review.googlesource.com/18770
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-01-20 20:18:03 +00:00
Dmitri Shuralyov
5804fef4c0 x/tools/go/vcs: fix FromDir returning bad root on Windows
Import path is a '/'-separated path. FromDir documentation says
on return, root is the import path corresponding to the root of
the repository. On Windows and other OSes where os.PathSeparator
is not '/', that wasn't true since root would contain characters
other than '/', and therefore it wasn't a valid import path
corresponding to the root of the repository. Fix that by using
filepath.ToSlash.

Add test coverage for root value returned from FromDir, it was
previously not tested.

Additionally, remove a dubious statement from the documentation
"(thus root is a prefix of importPath)". There is no variable
importPath that is being referred to. It's also redundant and
confusing. Without it, the description of root value matches
the documentation of RepoRoot.Root struct field:

	// Root is the import path corresponding to the root of the
	// repository.
	Root string

Fixes golang/go#7723.

Change-Id: If9f5f55b5751e01a7f88b79d9b039402af3e9312
Reviewed-on: https://go-review.googlesource.com/18461
Reviewed-by: Chris Manghane <cmang@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-19 15:45:24 +00:00
Kenji Kaneda
3c782264fb go/types: fix a comment of Named.Obj
// TypeName returns ...
-> // Obj returns ...

Change-Id: I2ac6133a703ec2c4b2045d4bdf9acc70049f0e1e
Reviewed-on: https://go-review.googlesource.com/18704
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-16 17:31:34 +00:00
Daniel Morsing
ae18226edd oracle: handle implicit selections in callees
The types only optimization for callees looked at the type of the
receiver to figure out if it was a dynamic call. If the selection
involves any implicit selections, we cannot be sure that this type
is the one that will actually receive the call.

Fix by working backwards from function signature to find the true
receiver

Change-Id: If79e3de7af33480e37bcf1081abe44bb04914da4
Reviewed-on: https://go-review.googlesource.com/18563
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-01-13 18:20:05 +00:00
Alan Donovan
5a2875abe7 go/loader: reduce contention for findPackage mutex
...by making the cache non-blocking and duplicate-suppressing.

(The bottleneck was introduced while adding vendoring support.)
This reduces the 95th percentile map shard time for type-checking 120K
packages to 8min from 20min.

Also: move the I/O-limiting counting semaphore and the NoGoError check
from FindPackage to findPackage so that all implementations benefit.

Change-Id: I43527122262cf80475dd3212d78c340e1c71e36c
Reviewed-on: https://go-review.googlesource.com/18580
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-13 18:09:25 +00:00
Andrew Gerrand
b81ea3a5e1 godoc: hide vendored packages from /pkg/ as we do with internal packages
Such packages may be viewed by adding ?m=all to the URL.

Fixes golang/go#13929

Change-Id: Id0ac48bc2937b5bec722b95b9a690d48d065ea6b
Reviewed-on: https://go-review.googlesource.com/18554
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-13 08:57:48 +00:00
Timothy Studd
b57d82def5 x/tools/present: add video element for slides
Change-Id: I19f7c181d9bd8148f7791925f04207a34c95ac1e
Reviewed-on: https://go-review.googlesource.com/18484
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-01-13 03:34:37 +00:00
Alan Donovan
f8ecfdb6b6 cmd/stringer: fork and tag for go1.4
The previous change updated the import of golang.org/x/tools/go/types
to the standard go/types package, causing 1.4 builds to fail.

Fixes #13874.

Change-Id: Idf0b4ac5e4e01dd5cd7cc9b89d017fbffb7a29df
Reviewed-on: https://go-review.googlesource.com/18430
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-11 14:24:22 +00:00
Timothy Studd
4ad533583d x/tools/godoc: fixed width limit for non-paragraph text
Change-Id: I6020e03959a434622e3e999e0054849f0bfb522f
Fixes: golang/go#13602
Reviewed-on: https://go-review.googlesource.com/18361
Reviewed-by: Francesc Campoy Flores <campoy@golang.org>
2016-01-09 02:08:43 +00:00
Alan Donovan
ae186f56a2 go/loader: don't treat unsafe specially wrt vendoring
The loader treats GOROOT's "unsafe" package specially,
with no source files and a Package of types.Unsafe.

Tested on Go 1.4.1, 1.5, and ~1.6 (tip).

Fixes issue #13882

Change-Id: I86c4e394665d86a50ec3852d6d702f0e9c5d2276
Reviewed-on: https://go-review.googlesource.com/18457
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-08 20:29:04 +00:00
Alan Donovan
e211dfb000 refactor/rename: fix crash with "." as -from package
Cause: the absolute cwd, not ".", must be passed to build.Import.

Also: simplify the lookup logic in findFromObjects, and handle nil
gracefully.

(No unit test---not worth faking os.Getwd.)

Fixes issue #13866

Change-Id: I7e8eede55bc83d98e2ef5e42609c287e74c04501
Reviewed-on: https://go-review.googlesource.com/18453
Reviewed-by: Michael Matloob <matloob@golang.org>
2016-01-08 19:32:44 +00:00
Alan Donovan
1fb1f857ac go/loader: use Skipf in test
(late response to comment in review of CL 18452)

Change-Id: I1fa80fd1c7fd22cec752c839d20a483e0732337c
Reviewed-on: https://go-review.googlesource.com/18454
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-01-08 19:32:38 +00:00
Alan Donovan
10712091e1 tools: fallout from flipped sense of build.IgnoreVendor flag
(See https://go-review.googlesource.com/#/c/18450)

Details:
- delete buildutil.AllowVendor flag.
  Instead use unexported 'go16' var in each package that needs it.
- delete buildutil.StripVendor; was never needed.
- remove inapplicable vendoring comments from loader14.go
- importgraph: go1.5: don't bother checking for 1.6 before calling
  absolutize (minor simplifiication and deoptimization).

Tested on 1.4.1, 1.5, and ~1.6 (tip).

Change-Id: If692b0df2eb6c120a9c09d7b1ed99f1b4c6b0826
Reviewed-on: https://go-review.googlesource.com/18452
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-08 18:54:48 +00:00
Robert Griesemer
dd6e749ee1 refactor/rename: skip Diff test on Windows (build fix attempt)
TBR=adonovan

Change-Id: I37dd29bfaa73b4b563c19be5fa47b938f06a4e0d
Reviewed-on: https://go-review.googlesource.com/18392
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-08 00:30:52 +00:00
Alan Donovan
da91609d88 cmd/vet: roll back update of go/types import
(from importing golang.org/x/tools/go/types to std lib go/types)

The cmd/vet package should never have been included in this change.

Tested with 1.4.1, 1.5 and ~1.6 (tip).

Change-Id: I6d915619cbfa0297dbb9aa9ba033c1320a08c367
Reviewed-on: https://go-review.googlesource.com/18385
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-07 20:27:05 +00:00
Alan Donovan
4747062949 go/gcimporter15: a copy of go/gcimporter using go1.5 std go/types
Because the std go/importer's Lookup functionality is incomplete,
clients have no way to create a Go 1.5 types.Package from an io.Reader
reading from gc export data.  This package provides a stopgap until
the standard library is complete.

The go/gcimporter package remains unchanged, and uses only the
golang.org/x/tools/go/types package.

Change-Id: I47a817f4b6a52ddab26c6b01de6e28099301faf5
Reviewed-on: https://go-review.googlesource.com/18382
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-07 18:06:54 +00:00
Andrew Gerrand
819a9109e1 godoc/dl: record and display SHA256 hashes for files
Fixes golang/go#12057

Change-Id: I2e0a27c96f3f13478a079765b8c363c9f3919c48
Reviewed-on: https://go-review.googlesource.com/18354
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-07 05:23:22 +00:00
Timothy Studd
1e63c6ac3b present: add background image element for slides
Fixes golang/go#11470

Change-Id: I665622197bea48b95adc839be8de7d03bf812f37
Reviewed-on: https://go-review.googlesource.com/18360
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-01-07 03:28:50 +00:00
Andrew Gerrand
791f468ced godoc/static: show relevant test instructions on install page
Fixes golang/go#12490

Change-Id: Ifb408f225a84b3c5daf739e1e0afc4f5540e4ebd
Reviewed-on: https://go-review.googlesource.com/18278
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-07 01:41:21 +00:00
Alan Donovan
542ffc7e75 tools: switch to standard go/types at tip
A few files have been forked and tagged "go1.5,!go1.6" to work around
minor API changes between the two types packages:
- constant.Value.String() in oracle/describe.go and its tests;
- constant.ToInt must now be called before constant.Int64Val.
- types.Config{Importer: importer.Default()} in a number of places
- go/types/typeutil/import_test.go uses lowercase names to avoid 'import "C"'.

Files in go/types/typesutil, missing from my previous CL, have been
tagged !go1.5; these files will be deleted in February.

All affected packages were tested using 1.4.1, 1.5, and ~1.6 (tip).

Change-Id: Iec7fd370e1434508149b378438fb37f65b8d2ba8
Reviewed-on: https://go-review.googlesource.com/18207
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-06 22:15:26 +00:00
Alan Donovan
2477c0d578 x/tools/...: fork and tag !1.5 all files that use go/types et al
This change will ensure that the tree continues to work with go1.4.1.

All files continue to depend on golang.org/x/tools/go/types, but in a
follow-up change, I will switch the primary files to depend on the
standard go/types package.  Another (smaller) set of files will be
forked and tagged, this time !1.6, due to API differences between the
two packages.

All tests pass using 1.4.1, 1.5, and ~1.6 (tip).

Change-Id: Ifd75a6330e120957d646be91693daaba1ce0e8c9
Reviewed-on: https://go-review.googlesource.com/18333
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-06 20:40:09 +00:00
Alan Donovan
8f90b5e560 go/ssa/interp: remove stale TODO
Followup to TBR'd change https://go-review.googlesource.com/#/c/18191/.

Change-Id: I7d6957a46aea00cfe0b734576b5392d578ee06d9
Reviewed-on: https://go-review.googlesource.com/18326
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-01-06 19:24:01 +00:00
Alan Donovan
c49318f04a go/ssa/interp: make os.Pipe intrinsic POSIX-portable; disable on Windows
Change-Id: I6c2f495c7c75f86590a0d79f86423ca67d695347
Reviewed-on: https://go-review.googlesource.com/18325
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-06 19:21:02 +00:00
Alan Donovan
0f870d4d86 go/loader: fix interaction of cwd and vendor
Packages specified on the command line should be interpreted relative to
cwd iff they are local (e.g. ./http within $GOROOT/src/net), otherwise a
request for, say, "golang.org/x/net/http2/hpack" might return the vendored
package depending on the working directory.

The FindPackage hook function now takes a build.ImportMode parameter, so
it matches the signature of (*build.Context).Import.  The AllowVendor
flag is enabled only for imports within source files, but not for the
initial packages.

+ test.

Change-Id: I756dc46b70928d2fd9f824e6670092d8169e0d64
Reviewed-on: https://go-review.googlesource.com/18318
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-01-06 18:28:16 +00:00
David R. Jenni
e7d14dfe5b refactor/rename: fix crash when renaming type embedded in another package.
Fixes golang/go#12038.

Change-Id: I9026edef7f8769b451f2b1502c107d6b2bb45096
Reviewed-on: https://go-review.googlesource.com/13451
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-01-05 17:28:30 +00:00
Andrew Gerrand
a8498a77d5 godoc: hide appengine dependencies behind build tags
Fixes the continuous build.

Change-Id: If55b08c3b702ba705d84a30fdbce842438477883
Reviewed-on: https://go-review.googlesource.com/18241
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-01-04 23:08:03 +00:00
Alan Donovan
2dff1e88eb oracle: referrers: fix crash when loading nonexistent files
Files with //line directives may not exist.
Print a helpful error instead of panicking when a file fails to load.

+ Test.

Fixes issue #13459

Change-Id: I305d1380e66e64d20ea84a27c284f53c019fe5e6
Reviewed-on: https://go-review.googlesource.com/18209
Reviewed-by: Michael Matloob <matloob@golang.org>
2015-12-30 22:01:27 +00:00
Alan Donovan
3a85b8da38 refactor/importgraph: reduce I/O concurrency to avoid EMFILE
Use an concurrency-limiting semaphore to reduce I/O parallelism in Import.

Also, start the producer in a new goroutine so that it runs in parallel
with the consumer.  Paradoxically, this reduces the peak number of
goroutines.

Also, in buildutil.ForEachPackage, make the concurrency limiting
semaphore global, since I/O parallelism is a process-wide resource.

Change-Id: I282b717c50603361826e5675077c9f464c874132
Reviewed-on: https://go-review.googlesource.com/18215
Reviewed-by: Michael Matloob <matloob@golang.org>
2015-12-30 22:01:03 +00:00
Alan Donovan
6e2f52e572 refactor/importgraph: document some optimization experiments
Change-Id: I5ea8f097814cd83a8534be1bfbeda4ebdabee168
Reviewed-on: https://go-review.googlesource.com/18216
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-30 20:26:04 +00:00
Alan Donovan
22501a76a1 oracle: describe: fix crash on bad ImportSpec
+ Test

Fixes issue #13380

Change-Id: I6d738756017f83a296bde6a04845cd985a351409
Reviewed-on: https://go-review.googlesource.com/18210
Reviewed-by: Michael Matloob <matloob@golang.org>
2015-12-30 20:24:55 +00:00
Alan Donovan
d331899c12 refactor/rename: add pid to name of temporary file for diff
Change-Id: Icd543062b4e1fe8c998f95c0daff5364f08ce83c
Reviewed-on: https://go-review.googlesource.com/18211
Reviewed-by: Ralph Corderoy <ralph.corderoy@gmail.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2015-12-30 17:21:38 +00:00
Alan Donovan
b2a7698651 go/loader: in stdlib_test, remove workaround for lack of vendoring
Change-Id: I058081ef596e8b5231321ef05d5256ec44cc58c6
Reviewed-on: https://go-review.googlesource.com/18214
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-30 16:37:28 +00:00
Alan Donovan
108b52ee61 cmd/gorename: -d flag prints diffs instead of rewriting files
The user may specify the diff tool using the -diffcmd flag.

+ test.

Also:
- eliminate redundant DryRun flag
- simplify Verbose messages using log.SetPrefix

Fixes issue #13355

Change-Id: I917edc73e31ddf0f5d5b9b30c43f826465529da1
Reviewed-on: https://go-review.googlesource.com/18208
Reviewed-by: Michael Matloob <matloob@golang.org>
2015-12-30 15:25:00 +00:00
Alan Donovan
a09dffbb6c go/vcs: workaround EOF bug in token-based XML decoder
...using same logic as in $GOROOT/go/src/cmd/go/discovery.go

See issue #13757

Change-Id: I2ace0abed0743f4a8675fa8780e190d640b57e6c
Reviewed-on: https://go-review.googlesource.com/18196
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29 20:27:04 +00:00
Dmitri Shuralyov
157f8abbbd go/vcs: accept domain.root in RepoRootForImportDynamic
This is the same change as in https://golang.org/cl/12193.

Fixes golang/go#13506.

Related to golang/go#9357.

Change-Id: I9c7d956008641b1907e14bcb08198235f5f9552f
Reviewed-on: https://go-review.googlesource.com/18152
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-29 15:00:21 +00:00
Alan Donovan
2b78567943 go/loader: fix tests to work at go1.5 and tip
Change-Id: Icc80f112a7ec4b64519220c57b6ccb2612166656
Reviewed-on: https://go-review.googlesource.com/18197
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-28 22:42:32 +00:00
Alan Donovan
b14dd1a5b7 go/importer: in TestImportStdLib, skip 2 packages that use vendoring
(See issue #13756)

Change-Id: Icda14c34f3460e941ae092f147432c795465a077
Reviewed-on: https://go-review.googlesource.com/18195
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-28 21:28:10 +00:00
Alan Donovan
9b7a39c6be go/loader: fix brittle example test
We need a better approach for tests such as these.

Change-Id: I6fb608acc096088fe377f6f2c40ff6124cf3d09c
Reviewed-on: https://go-review.googlesource.com/18194
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-28 21:24:47 +00:00
Alan Donovan
8463610142 go/ssa/interp: enable support for Example tests
1. Added intrinsic for os.Pipe to avoid use of "unsafe".  This makes
   Example tests work in the interpreter, fixing the broken "unicode"
   package (which recently sprouted some Examples) and allowing us to
   enable tests for:

      encoding/csv
      flag
      path
      text/scanner
      unicode/utf8

   The implementation of os.Pipe may require tweaking for non-Linux platforms.

2. Added intrinsic for strings.Index to avoid assembly dependency.

3. Added dumb intrinsic for testing۰runExample to work around a bug in
   go/ssa/testmain.go that requires an invasive fix
   (Until then, the output of Example functions will not be checked.)

Change-Id: I6374c9c47aa802275b7cdc98525e057f5db0615a
Reviewed-on: https://go-review.googlesource.com/18191
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-28 21:19:28 +00:00
Alan Donovan
e3e5aae018 go/types: in TestStdlib, skip 2 packages that use vendoring
(gcimporter does not support vendoring---see issue #13756)

Change-Id: Ief4101e4f33007d497ed1519845febfcffdded38
Reviewed-on: https://go-review.googlesource.com/18193
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-28 21:04:49 +00:00
Alan Donovan
f75338cbc6 go/types: skip two failing $GOROOT/test/fixedbugs tests
Change-Id: I7dfb95f34ae23c0b7905714b32068dc336a05656
Reviewed-on: https://go-review.googlesource.com/18192
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-28 19:40:50 +00:00
Alan Donovan
d6e83e534d go/loader: changes for vendor support
Prior to this change, the loader made the simplifying assumption
that an import path is equal to a package path, that is, a
subdirectory of src/.  (This assumption was already false because
relative imports "../foo" are possible, though discouraged.)
Now, an import "foo" may denote "a/vendor/foo" or "b/vendor/foo"
depending on whether it appears beneath a/ or b/.  Thus import
paths and package paths are no longer the same, and the directory
containing an import declaration is a necessary input to the
import resolution function.

This change makes the loader hygienic w.r.t. the directory of
each import declaration, and cleans up the terminology.
The only API change is to the FindPackage hook, which most
clients never use.

Details:
- Add a 'fromDir string' parameter to the FindPackage hook function.
- Add a dir field to each PackageInfo.
- doImport (called by go/types) now consists of two steps:
  use FindPackage(dir, importPath) to locate the package,
  then consult the import map using the canonical package path.
  Only the first step can fail.
- Memoize FindPackage.
- Simplify importInfo now that it no longer has to deal with errors.
  Replace a condition variable with a channel.
- Use a separate type to report importErrors.
- Rename loadAll to importAll
- Delete the importMode constant.
- Test.

Change-Id: I3defab51bfa12b48b1511a2172fb48dc8e9150e6
Reviewed-on: https://go-review.googlesource.com/18053
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-12-22 18:31:24 +00:00
Shenghou Ma
9673333889 godoc/dl: update label for ARMv6 binary distribution
See also golang/go#13669 and https://golang.org/cl/18059.

Change-Id: If958efc4a09082dad393df9a891f20921602320d
Reviewed-on: https://go-review.googlesource.com/18080
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-20 20:15:05 +00:00
Alan Donovan
fa833fdef5 refactor/importgraph: changes for vendor support
Each string in build.Package.{,Test,XTest}Imports must now be
interpreted relative to the Package.Dir.  This adds a ton of
redundant I/O.

Also:
- use a counting semaphore to limit concurrent I/O calls
  (Fixes golang/go#10306)
- remove obsolete call to runtime.GOMAXPROCS from the test.

Change-Id: Ic556c4cf41cce7a88c0158800c992e66f354c484
Reviewed-on: https://go-review.googlesource.com/18050
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-18 20:17:50 +00:00
Alan Donovan
27534aa951 go/buildutil: changes for vendor support
Add AllowVendor constant for convenience across x/tools.
 (Will delete go/loader's importMode later)
Add StripVendor utility function + test.

Change-Id: I885076cb4ea67588996d85b749b85f49cd619f0d
Reviewed-on: https://go-review.googlesource.com/18049
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-12-18 20:00:43 +00:00
Alan Donovan
42bc1282f3 go/loader: update example_test for Go1.6
Change-Id: Ib3bf913e3c8f3cf06ba855f8dda855453e0a1aa2
Reviewed-on: https://go-review.googlesource.com/18048
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-18 18:15:14 +00:00
Alan Donovan
99c318c742 cmd/bundle: add blank line before package declaration
so that the bundled package doesn't clobber the package declaration
of the host package.

Also: minor comment tweaks.

Change-Id: I28ab3aca2b02213edc95c6b12c0d1a2514453cfe
Reviewed-on: https://go-review.googlesource.com/18040
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-18 13:56:53 +00:00
Chris Broadfoot
4a5fb9938b cmd/tip: add App Engine Managed VM health check handler
Change-Id: I67826efaa3cb2883771837581dd95aa9ec3e6d2b
Reviewed-on: https://go-review.googlesource.com/18025
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-18 02:25:12 +00:00
Chris Broadfoot
9532e1006b godoc: use ARMv6 as the label for arm6 builds.
Change-Id: I53c51fb772f23ab3f035b8e50bf017335d01e1c4
Reviewed-on: https://go-review.googlesource.com/18019
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-12-18 00:32:01 +00:00
Russ Cox
34ae141ecc go/loader: use build.AllowVendor during Import on Go 1.6 and later
Makes programs like ssadump work on packages using vendored code,
for example net/http.

For golang/go#12278.
Depends on CL 17726 in main repository.

Change-Id: Ibabf564e397044a0f449087124dd96161081baaf
Reviewed-on: https://go-review.googlesource.com/17727
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-12-17 20:34:07 +00:00