Unified
Split
Showing
with
1,737 additions
and 762 deletions.
- +1 −1 VERSION
- +1 −1 api/go1.11.txt
- +6 −45 doc/code.html
- +16 −5 doc/go1.11.html
- +14 −9 src/cmd/compile/internal/gc/reflect.go
- +4 −0 src/cmd/compile/internal/gc/ssa.go
- +113 −78 src/cmd/go/alldocs.go
- +42 −48 src/cmd/go/go_test.go
- +17 −32 src/cmd/go/internal/get/get.go
- +14 −0 src/cmd/go/internal/imports/scan.go
- +23 −20 src/cmd/go/internal/list/list.go
- +0 −50 src/cmd/go/internal/load/flag.go
- +107 −85 src/cmd/go/internal/load/pkg.go
- +1 −8 src/cmd/go/internal/load/search.go
- +25 −15 src/cmd/go/internal/modcmd/download.go
- +0 −65 src/cmd/go/internal/modcmd/fix.go
- +0 −1 src/cmd/go/internal/modcmd/mod.go
- +2 −1 src/cmd/go/internal/modcmd/tidy.go
- +13 −11 src/cmd/go/internal/modcmd/why.go
- +30 −22 src/cmd/go/internal/modconv/convert_test.go
- +17 −0 src/cmd/go/internal/modfetch/cache.go
- +14 −0 src/cmd/go/internal/modfetch/codehost/vcs.go
- +3 −4 src/cmd/go/internal/modfetch/coderepo_test.go
- +8 −3 src/cmd/go/internal/modfetch/fetch.go
- +13 −2 src/cmd/go/internal/modfetch/repo.go
- +4 −4 src/cmd/go/internal/modfile/rule.go
- +7 −6 src/cmd/go/internal/modget/get.go
- +11 −5 src/cmd/go/internal/modload/build.go
- +84 −5 src/cmd/go/internal/modload/help.go
- +12 −1 src/cmd/go/internal/modload/import.go
- +1 −1 src/cmd/go/internal/modload/import_test.go
- +15 −2 src/cmd/go/internal/modload/init.go
- +152 −66 src/cmd/go/internal/modload/load.go
- +6 −0 src/cmd/go/internal/modload/query.go
- +57 −62 src/cmd/go/internal/search/search.go
- +5 −5 src/cmd/go/internal/work/build.go
- +1 −0 src/cmd/go/main.go
- +71 −0 src/cmd/go/testdata/script/gcflags_patterns.txt
- +2 −0 src/cmd/go/testdata/script/mod_download.txt
- +9 −0 src/cmd/go/testdata/script/mod_enabled.txt
- +12 −0 src/cmd/go/testdata/script/mod_fs_patterns.txt
- +2 −2 src/cmd/go/testdata/script/mod_get_commit.txt
- +4 −1 src/cmd/go/testdata/script/mod_list_dir.txt
- +16 −0 src/cmd/go/testdata/script/mod_list_test.txt
- +23 −32 src/cmd/go/testdata/script/mod_patterns.txt
- +46 −0 src/cmd/go/testdata/script/mod_run_internal.txt
- +15 −0 src/cmd/go/testdata/script/mod_run_path.txt
- +19 −0 src/cmd/go/testdata/script/mod_std_vendor.txt
- +7 −0 src/cmd/go/testdata/script/mod_tidy.txt
- +11 −0 src/cmd/go/testdata/script/mod_vcs_missing.txt
- +14 −0 src/cmd/vet/print.go
- +4 −0 src/cmd/vet/testdata/print.go
- +10 −5 src/crypto/tls/common.go
- +3 −3 src/crypto/tls/conn.go
- +18 −0 src/crypto/tls/handshake_client_test.go
- +18 −0 src/crypto/tls/handshake_server_test.go
- +8 −8 src/crypto/tls/prf.go
- +6 −6 src/crypto/tls/prf_test.go
- +89 −0 src/crypto/tls/testdata/Client-TLSv10-ExportKeyingMaterial
- +84 −0 src/crypto/tls/testdata/Client-TLSv12-ExportKeyingMaterial
- +92 −0 src/crypto/tls/testdata/Server-TLSv10-ExportKeyingMaterial
- +92 −0 src/crypto/tls/testdata/Server-TLSv12-ExportKeyingMaterial
- +9 −0 src/crypto/tls/tls_test.go
- +13 −1 src/go/doc/comment.go
- +29 −29 src/go/printer/nodes.go
- +33 −0 src/go/printer/testdata/alignment.golden
- +40 −0 src/go/printer/testdata/alignment.input
- +2 −2 src/internal/poll/sendfile_windows.go
- +61 −0 src/net/sendfile_test.go
- +6 −1 src/os/file_plan9.go
- +5 −5 src/runtime/runtime2.go
- +2 −2 src/runtime/sys_darwin_amd64.s
- +2 −2 src/runtime/sys_darwin_arm64.s
- +21 −0 test/closure4.go
| @@ -1 +1 @@ | ||
| go1.11rc1 | ||
| go1.11rc2 |
| @@ -1,7 +1,7 @@ | ||
| pkg crypto/cipher, func NewGCMWithTagSize(Block, int) (AEAD, error) | ||
| pkg crypto/rsa, method (*PrivateKey) Size() int | ||
| pkg crypto/rsa, method (*PublicKey) Size() int | ||
| pkg crypto/tls, type ConnectionState struct, ExportKeyingMaterial func(string, []uint8, int) ([]uint8, bool) | ||
| pkg crypto/tls, method (*ConnectionState) ExportKeyingMaterial(string, []uint8, int) ([]uint8, error) | ||
| pkg database/sql, method (IsolationLevel) String() string | ||
| pkg database/sql, type DBStats struct, Idle int | ||
| pkg database/sql, type DBStats struct, InUse int | ||
| @@ -44,18 +44,16 @@ <h3 id="Overview">Overview</h3> | ||
| <h3 id="Workspaces">Workspaces</h3> | ||
| <p> | ||
| A workspace is a directory hierarchy with three directories at its root: | ||
| A workspace is a directory hierarchy with two directories at its root: | ||
| </p> | ||
| <ul> | ||
| <li><code>src</code> contains Go source files, | ||
| <li><code>pkg</code> contains package objects, and | ||
| <li><code>src</code> contains Go source files, and | ||
| <li><code>bin</code> contains executable commands. | ||
| </ul> | ||
| <p> | ||
| The <code>go</code> tool builds source packages and installs the resulting | ||
| binaries to the <code>pkg</code> and <code>bin</code> directories. | ||
| The <code>go</code> tool builds and installs binaries to the <code>bin</code> directory. | ||
| </p> | ||
| <p> | ||
| @@ -72,10 +70,6 @@ <h3 id="Workspaces">Workspaces</h3> | ||
| bin/ | ||
| hello # command executable | ||
| outyet # command executable | ||
| pkg/ | ||
| linux_amd64/ | ||
| github.com/golang/example/ | ||
| stringutil.a # package object | ||
| src/ | ||
| <a href="https://github.com/golang/example/">github.com/golang/example/</a> | ||
| .git/ # Git repository metadata | ||
| @@ -374,9 +368,8 @@ <h3 id="Library">Your first library</h3> | ||
| </pre> | ||
| <p> | ||
| This won't produce an output file. To do that, you must use <code>go | ||
| install</code>, which places the package object inside the <code>pkg</code> | ||
| directory of the workspace. | ||
| This won't produce an output file. | ||
| Instead it saves the compiled package in the local build cache. | ||
| </p> | ||
| <p> | ||
| @@ -400,19 +393,13 @@ <h3 id="Library">Your first library</h3> | ||
| </pre> | ||
| <p> | ||
| Whenever the <code>go</code> tool installs a package or binary, it also | ||
| installs whatever dependencies it has. | ||
| So when you install the <code>hello</code> program | ||
| Install the <code>hello</code> program: | ||
| </p> | ||
| <pre> | ||
| $ <b>go install github.com/user/hello</b> | ||
| </pre> | ||
| <p> | ||
| the <code>stringutil</code> package will be installed as well, automatically. | ||
| </p> | ||
| <p> | ||
| Running the new version of the program, you should see a new, reversed message: | ||
| </p> | ||
| @@ -429,10 +416,6 @@ <h3 id="Library">Your first library</h3> | ||
| <pre> | ||
| bin/ | ||
| hello # command executable | ||
| pkg/ | ||
| linux_amd64/ # this will reflect your OS and architecture | ||
| github.com/user/ | ||
| stringutil.a # package object | ||
| src/ | ||
| github.com/user/ | ||
| hello/ | ||
| @@ -441,22 +424,6 @@ <h3 id="Library">Your first library</h3> | ||
| reverse.go # package source | ||
| </pre> | ||
| <p> | ||
| Note that <code>go install</code> placed the <code>stringutil.a</code> object | ||
| in a directory inside <code>pkg/linux_amd64</code> that mirrors its source | ||
| directory. | ||
| This is so that future invocations of the <code>go</code> tool can find the | ||
| package object and avoid recompiling the package unnecessarily. | ||
| The <code>linux_amd64</code> part is there to aid in cross-compilation, | ||
| and will reflect the operating system and architecture of your system. | ||
| </p> | ||
| <p> | ||
| Go command executables are statically linked; the package objects need not | ||
| be present to run Go programs. | ||
| </p> | ||
| <h3 id="PackageNames">Package names</h3> | ||
| <p> | ||
| @@ -597,12 +564,6 @@ <h2 id="remote">Remote packages</h2> | ||
| <pre> | ||
| bin/ | ||
| hello # command executable | ||
| pkg/ | ||
| linux_amd64/ | ||
| github.com/golang/example/ | ||
| stringutil.a # package object | ||
| github.com/user/ | ||
| stringutil.a # package object | ||
| src/ | ||
| github.com/golang/example/ | ||
| .git/ # Git repository metadata | ||
| @@ -167,7 +167,18 @@ <h3 id="importpath">Import path restriction</h3> | ||
| <h3 id="gopackages">Package loading</h3> | ||
| <p> | ||
| TODO: Note about go/build versus golang.org/x/tools/go/packages. | ||
| The new package | ||
| <a href="https://godoc.org/golang.org/x/tools/go/packages"><code>golang.org/x/tools/go/packages</code></a> | ||
| provides a simple API for locating and loading packages of Go source code. | ||
| Although not yet part of the standard library, for many tasks it | ||
| effectively replaces the <a href="/pkg/go/build"><code>go/build</code></a> | ||
| package, whose API is unable to fully support modules. | ||
| Because it runs an external query command such as | ||
| <a href="/cmd/go/#hdr-List_packages"><code>go list</code></a> | ||
| to obtain information about Go packages, it enables the construction of | ||
| analysis tools that work equally well with alternative build systems | ||
| such as <a href="https://bazel.build">Bazel</a> | ||
| and <a href="https://buckbuild.com">Buck</a>. | ||
| </p> | ||
| <h3 id="gocache">Build cache requirement</h3> | ||
| @@ -262,9 +273,8 @@ <h3 id="debugging">Debugging</h3> | ||
| This is useful, for example, to call <code>String</code> methods | ||
| when paused at a breakpoint. | ||
| <!-- TODO(austin): Make sure methods calls are actually supported by Delve --> | ||
| This is currently only supported by Delve. | ||
| This is currently only supported by Delve (version 1.1.0 and up). | ||
| </p> | ||
| <h3 id="test">Test</h3> | ||
| @@ -490,7 +500,8 @@ <h3 id="minor_library_changes">Minor changes to the library</h3> | ||
| <dd> | ||
| <p><!-- CL 85115 --> | ||
| <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>'s new | ||
| <code>ExportKeyingMaterial</code> field allows exporting keying material bound to the | ||
| <a href="/pkg/crypto/tls/#ConnectionState.ExportKeyingMaterial"><code>ExportKeyingMaterial</code></a> | ||
| method allows exporting keying material bound to the | ||
| connection according to RFC 5705. | ||
| </p> | ||
| @@ -793,7 +804,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3> | ||
| <!-- CL 101715 was reverted --> | ||
| <dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt> | ||
| <dl id="runtime-again"><dt><a href="/pkg/runtime/">runtime</a></dt> | ||
| <dd> | ||
| <p><!-- CL 70993 --> | ||
| @@ -34,8 +34,9 @@ type ptabEntry struct { | ||
| // runtime interface and reflection data structures | ||
| var ( | ||
| signatsetmu sync.Mutex // protects signatset | ||
| signatmu sync.Mutex // protects signatset and signatslice | ||
| signatset = make(map[*types.Type]struct{}) | ||
| signatslice []*types.Type | ||
| itabs []itabEntry | ||
| ptabs []ptabEntry | ||
| @@ -960,9 +961,9 @@ func typesymprefix(prefix string, t *types.Type) *types.Sym { | ||
| // This function is for looking up type-related generated functions | ||
| // (e.g. eq and hash). Make sure they are indeed generated. | ||
| signatsetmu.Lock() | ||
| signatmu.Lock() | ||
| addsignat(t) | ||
| signatsetmu.Unlock() | ||
| signatmu.Unlock() | ||
| //print("algsym: %s -> %+S\n", p, s); | ||
| @@ -974,9 +975,9 @@ func typenamesym(t *types.Type) *types.Sym { | ||
| Fatalf("typenamesym %v", t) | ||
| } | ||
| s := typesym(t) | ||
| signatsetmu.Lock() | ||
| signatmu.Lock() | ||
| addsignat(t) | ||
| signatsetmu.Unlock() | ||
| signatmu.Unlock() | ||
| return s | ||
| } | ||
| @@ -1447,7 +1448,10 @@ func itabsym(it *obj.LSym, offset int64) *obj.LSym { | ||
| // addsignat ensures that a runtime type descriptor is emitted for t. | ||
| func addsignat(t *types.Type) { | ||
| signatset[t] = struct{}{} | ||
| if _, ok := signatset[t]; !ok { | ||
| signatset[t] = struct{}{} | ||
| signatslice = append(signatslice, t) | ||
| } | ||
| } | ||
| func addsignats(dcls []*Node) { | ||
| @@ -1462,14 +1466,15 @@ func addsignats(dcls []*Node) { | ||
| func dumpsignats() { | ||
| // Process signatset. Use a loop, as dtypesym adds | ||
| // entries to signatset while it is being processed. | ||
| signats := make([]typeAndStr, len(signatset)) | ||
| for len(signatset) > 0 { | ||
| signats := make([]typeAndStr, len(signatslice)) | ||
| for len(signatslice) > 0 { | ||
| signats = signats[:0] | ||
| // Transfer entries to a slice and sort, for reproducible builds. | ||
| for t := range signatset { | ||
| for _, t := range signatslice { | ||
| signats = append(signats, typeAndStr{t: t, short: typesymname(t), regular: t.String()}) | ||
| delete(signatset, t) | ||
| } | ||
| signatslice = signatslice[:0] | ||
| sort.Sort(typesByString(signats)) | ||
| for _, ts := range signats { | ||
| t := ts.t | ||
| @@ -3515,6 +3515,10 @@ func (s *state) call(n *Node, k callKind) *ssa.Value { | ||
| break | ||
| } | ||
| closure = s.expr(fn) | ||
| if thearch.LinkArch.Family == sys.Wasm { | ||
| // TODO(neelance): On other architectures this should be eliminated by the optimization steps | ||
| s.nilCheck(closure) | ||
| } | ||
| case OCALLMETH: | ||
| if fn.Op != ODOTMETH { | ||
| Fatalf("OCALLMETH: n.Left not an ODOTMETH: %v", fn) | ||
Oops, something went wrong.