1
0
mirror of https://github.com/golang/go synced 2024-11-17 10:14:46 -07:00
Commit Graph

48303 Commits

Author SHA1 Message Date
Cherry Mui
5a40fab19f [dev.typeparams] runtime, internal/bytealg: port performance-critical functions to register ABI on ARM64
This CL ports a few performance-critical assembly functions to use
register arguments directly. This is similar to CL 308931 and
CL 310184.

Change-Id: I6e30dfff17f76b8578ce8cfd51de21b66610fdb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/324400
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-03 16:28:19 +00:00
Dan Scales
370ff5ff96 [dev.typeparams] test: update all the typeparam tests to use the new union/tilde syntax
Did a mix of tilde and non-tilde usage. Tilde notation is not quite
fully functional, so no tests are currently trying to distinguish
(fail/not fail) based on tilde usage.

Change-Id: Ib50cec2fc0684f9d9f3561c889fd44c7a7af458c
Reviewed-on: https://go-review.googlesource.com/c/go/+/324572
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-06-03 16:05:22 +00:00
Cherry Mui
5a008a92e8 [dev.typeparams] internal/bytealg: call memeqbody directly in memequal_varlen on ARM64
Currently, memequal_varlen opens up a frame and call memequal,
which then tail-calls memeqbody. This CL changes memequal_varlen
tail-calls memeqbody directly.

This makes it simpler to switch to the register ABI in the next
CL.

Change-Id: Ia1367c0abb7f4755fe736c404411793fb9e5c04f
Reviewed-on: https://go-review.googlesource.com/c/go/+/324399
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-03 14:29:14 +00:00
Cherry Mui
165d39a1d4 [dev.typeparams] test: adjust codegen test for register ABI on ARM64
In codegen/arithmetic.go, previously there are MOVD's that match
for loads of arguments. With register ABI there are no more such
loads. Remove the MOVD matches.

Change-Id: I920ee2629c8c04d454f13a0c08e283d3528d9a64
Reviewed-on: https://go-review.googlesource.com/c/go/+/324251
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2021-06-03 14:28:14 +00:00
Cherry Mui
b5f37faf3b [dev.typeparams] cmd/internal/goobj: add duffzero/duffcopy to builtin list
duffzero and duffcopy are commonly referenced functions. Add them
to builtin list, so they are referenced by index, not by name.

Also change gcWriteBarrier to ABIInternal, which is changed in
CL 266638.

Regenerate the file.

Change-Id: If8550d9ed300ac2be930a7c58657a9cf1933ac1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/324250
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2021-06-03 14:28:02 +00:00
Cherry Mui
9c054f4137 [dev.typeparams] cmd/link: take function address in assembly in TestFuncAlign
In TestFuncAlign we want to get the address of an assembly
function. Take the address in assembly, so we get the actual
function's address, not the wrapper's.

Change-Id: Idc1fe2c8426562c70f8f7d6e489584ef059bc556
Reviewed-on: https://go-review.googlesource.com/c/go/+/324249
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2021-06-03 14:27:08 +00:00
Robert Griesemer
95c618e99a [dev.typeparams] cmd/compile/internal/types2: add Config.AllowTypeLists to control type list handling
Eventually the flag should not be set anymore, but we set it in the
compiler until all tests have been converted.

Also, convert some more types2 tests to use the type set notation.

Change-Id: I616599a3473451ab75d67272016b2bd3de6835af
Reviewed-on: https://go-review.googlesource.com/c/go/+/324571
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-03 03:55:44 +00:00
Robert Griesemer
10d6b36ca3 [dev.typeparams] cmd/compile/internal/types2: disallow ~T where T is a defined type or an interface
Change-Id: I35f6f43db00d56847da48320308f2fcfff924738
Reviewed-on: https://go-review.googlesource.com/c/go/+/324570
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-03 03:55:37 +00:00
Robert Griesemer
8cdce85bdf [dev.typeparams] cmd/compile/internal/types2: convert testdata/check tests to type set sytax
Change-Id: I0c2dda10ba7cb40330545fd10fbacb8c84f66a2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/324569
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 23:28:39 +00:00
Robert Griesemer
c790964ae4 [dev.typeparams] cmd/compile/internal/types2: convert testdata/fixedbugs tests to type set sytax
Change-Id: I2ad94c71bebb93e0e3f4eba9d5199a3b3e9fa63d
Reviewed-on: https://go-review.googlesource.com/c/go/+/324530
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 23:19:31 +00:00
Robert Griesemer
9a99e728fe [dev.typeparams] cmd/compile/internal/types2: convert testdata/examples tests to type set sytax
Change-Id: Ida3837c9cbb970a2b49cd1598c6e6e9de8aa9690
Reviewed-on: https://go-review.googlesource.com/c/go/+/324529
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-02 23:19:30 +00:00
Robert Griesemer
d36b7d7bdd [dev.typeparams] cmd/compile/internal/importer: review of gcimporter_test.go
This CL removes the // UNREVIEWED disclaimer at the top of the
file. This file is essentially a copy of its reviewed version
at src/go/internal/gcimporter/gcimporter_test.go with adjustments
to make it work for the compiler and types2. To see the changes
made with respect to the original, compare patchset 2 against
patchset 3.

Change-Id: Iaeb9a56a6a56f4c1d93e7bfedc5b1f1968fa6792
Reviewed-on: https://go-review.googlesource.com/c/go/+/324131
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-02 23:19:29 +00:00
Robert Griesemer
3c1d502a19 [dev.typeparams] cmd/compile/internal/types2: eliminate need for unpack and asUnion functions
Change-Id: Iaa75b091d52f44939330e5945305aea323ba58f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/323355
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 23:19:27 +00:00
Robert Griesemer
848b58e473 [dev.typeparams] cmd/compile/internal/types2: clean up type set/union intersection
- Eliminate the need for bottom type: This is now represented by
  an empty union (denoting the set of no types).

- Clean up type set intersection and incorporate tilde information
  in intersection operation and satisfaction tests.

- Minor cleanups along the way.

- Note: The intersection algorithm does not always compute the
        largest possible intersection. To be addressed in a follow-up CL.

Change-Id: I7fa19df5996da36a4d8f29300d30a0aa4d8a3e5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/323354
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-02 23:19:26 +00:00
Dan Scales
97cb0113a3 [dev.typeparams] cmd/compile: fix export/import of constants with typeparam type
A constant will have a TYPEPARAM type if it appears in a place where it
must match that typeparam type (e.g. in a binary operation with a
variable of that typeparam type). If so, then we must write out its
actual constant kind as well, so its constant val can be read in
properly during import.

Fixed some export/import tests which were casting some untyped constants
to avoid this problem.

Change-Id: I285ad8f1c8febbe526769c96e6b27acbd23050f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/324189
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2021-06-02 23:10:42 +00:00
Matthew Dempsky
6b1cdeaef3 [dev.typeparams] cmd/link: include "go build" output in test logs
If running "go build" outputs anything, write it to the test log even
if the test succeeds. This makes it easier to diagnose errors within
the compiler by adding print statements and finding them in the test
log, even if the compiler exits successfully.

Change-Id: Id04716c4e1dcd9220c35ea0040ea516c1dd5237c
Reviewed-on: https://go-review.googlesource.com/c/go/+/324329
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-06-02 22:34:36 +00:00
Robert Griesemer
c7b9811581 [dev.typeparams] cmd/compile/internal/importer: review of gcimporter.go
This CL removes the // UNREVIEWED disclaimer at the top of the
file. This file is essentially a copy of its reviewed version
at src/go/internal/gcimporter/gcimporter.go with adjustments to
make it work for the compiler and types2. To see the changes
made with respect to the original, compare patchset 1 against
patchset 2.

Change-Id: I0fd635730fb6bdee8cef1b89154f4049a6581751
Reviewed-on: https://go-review.googlesource.com/c/go/+/324132
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 22:13:34 +00:00
Matthew Dempsky
498a48327f [dev.typeparams] cmd/compile: sort iface fields before expansion
For toolstash -cmp compatibility with types2, we also need to sort
fields (or at least the embedded types) *before* expanding them. This
is relevant to what position information and parameter names are used
for methods when embedded interfaces have overlapping methods.

This came up in archive/zip, which has:

	type fileInfoDirEntry interface {
		fs.FileInfo
		fs.DirEntry
	}

and both of these embedded interfaces in turn have an "IsDir() bool"
method. Traditionally, cmd/compile would keep the method from
fs.FileInfo.IsDir, but with types2 it will now keep fs.DirEntry.IsDir
instead. This doesn't affect correctness at all, but it does end up in
DWARF sometimes.

Change-Id: Iac8d6321894be335466a76b5bf8a0c1b15a3581b
Reviewed-on: https://go-review.googlesource.com/c/go/+/324330
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-06-02 21:34:56 +00:00
Robert Griesemer
cc52fdd1f3 [dev.typeparams] cmd/compile/internal/importer: review of exportdata.go
This CL removes the // UNREVIEWED disclaimer at the top of the
file. This file is essentially a copy of its reviewed version
at src/go/internal/gcimporter/exportdata.go with adjustments to
make it work for the compiler and types2. To see the changes
made with respect to the original, compare patchset 1 against
patchset 2.

Change-Id: I276d898ef238afa37ec6b9605496407df36cf7d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/324133
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 20:33:12 +00:00
Robert Griesemer
8c5c5a9e69 [dev.typeparams] cmd/compile/internal/importer: review of support.go
This CL removes the // UNREVIEWED disclaimer at the top of the
file. This file is essentially a copy of its reviewed version
at src/go/internal/gcimporter/support.go with adjustments to
make it work for the compiler and types2. To see the changes
made with respect to the original, compare patchset 1 against
patchset 2.

Change-Id: Icb8e7e7cac02751265c1020431018293826bad18
Reviewed-on: https://go-review.googlesource.com/c/go/+/324130
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 20:31:25 +00:00
Robert Griesemer
589e32dbdf [dev.typeparams] cmd/compile/internal/types2: replace Sum type with Union type
- We still mostly ignore the tilde information.

- More consistent naming: A Union term is the pair (type, tilde).
  Rename Union.terms to Union.types; the Union.types and Union.tilde
  slices make up the Union terms.

- Replace Sum.is with Union.underIs: underIs iterates through all
  union terms and calls its argument function with the underlying
  type of the term (and thus can ignore the tilde information).
  This also eliminates the need to call under in the argument
  function.

- Added Union.is for situations where we need to consider the tilde
  information for each Union term.

Change-Id: I70fcf1813e072651dc0f61d52d5555642ee762fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/323274
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-06-02 20:31:01 +00:00
Keith Randall
7b876def6c [dev.typeparams] cmd/compile: add dictionary argument to generic functions
When converting from a generic function to a concrete implementation,
add a dictionary argument to the generic function (both an actual
argument at each callsite, and a formal argument of each
implementation).

The dictionary argument comes before all other arguments (including
any receiver).

The dictionary argument is checked for validity, but is otherwise unused.
Subsequent CLs will start using the dictionary for, e.g., converting a
value of generic type to interface{}.

Import/export required adding support for LINKSYMOFFSET, which is used
by the dictionary checking code.

Change-Id: I16a7a8d23c7bd6a897e0da87c69f273be9103bd7
Reviewed-on: https://go-review.googlesource.com/c/go/+/323272
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-06-02 20:23:12 +00:00
Cherry Mui
aa9cfdf775 [dev.typeparams] runtime: update ABIInternal assembly with register ABI on ARM64
mcall calls a closure (using ABIInternal) with an argument.
Update it to pass the argument in register.

Panic functions tail-call Go panic functions using ABIInternal.
Update them to pass the arguments in registers.

Race functions are called using ABIInternal from compiler-
instrumented code. Update them to receive the arguments in
registers.

Now all.bash passes with GOEXPERIMENT=regabi on ARM64 (at least on
macOS).

Change-Id: I648f6502c7eeb1422330c6c829181f12e08c7d0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/323937
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-02 16:52:10 +00:00
Cherry Mui
0c123cdf8b [dev.typeparams] reflect: implement register ABI for MakeFunc etc. on ARM64
Implement register ABI for reflect.MakeFunc and method Value Call
on ARM64.

Change-Id: I5487febb9ea764af5ccf5d7c94858ab0acec7cac
Reviewed-on: https://go-review.googlesource.com/c/go/+/323936
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-02 16:50:22 +00:00
Cherry Mui
2e4b79949f [dev.typeparams] runtime: implement register ABI for reflectcall on ARM64
Implement register ABI version of reflectcall.

Now runtime tests pass with GOEXPERIMENT=regabiwrappers,regabireflect
on ARM64 (at least on macOS).

Change-Id: I2812cd96bdc13f8dc91c867e3f571921c0cdfc8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323935
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-02 16:49:46 +00:00
Cherry Mui
dc2cb529a8 [dev.typeparams] runtime: mark assembly functions called directly from compiler ABIInternal
For functions such as gcWriteBarrier and panicIndexXXX, the
compiler generates ABIInternal calls directly. And they must not
use wrappers because it follows a special calling convention or
the caller's PC is used. Mark them as ABIInternal.

Note that even though they are marked as ABIInternal, they don't
actually use the internal ABI, i.e. regabiargs is not honored for
now.

Now all.bash passes with GOEXPERIMENT=regabiwrappers (at least on
macOS).

Change-Id: I87e41964e6dc4efae03e8eb636ae9fa1d99285bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/323934
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-02 16:49:25 +00:00
Zachary Burkett
d2b435117d test: fix error check messages for 2 types2 tests
Many compiler tests fail with -G=3 due to changes in error message format.
This commit fixes two of these tests, to ensure I am on the right track in review.

Updates #46447

Change-Id: I138956d536a1d48ca9198e6ddbfde13865bb5dd5
GitHub-Last-Rev: 0ed904b9fa
GitHub-Pull-Request: golang/go#46445
Reviewed-on: https://go-review.googlesource.com/c/go/+/323314
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-02 05:14:45 +00:00
Keith Randall
b1f48e8add [dev.typeparams] cmd/compile: fix formatting
Looks like CL 322850 didn't have the change to ARM64Ops.go
properly gofmt'ed.

Change-Id: I1a080bc13ea27b897fbb91f18ded754ce440994b
Reviewed-on: https://go-review.googlesource.com/c/go/+/324109
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-06-02 00:19:52 +00:00
Cherry Mui
58ad36b359 [dev.typeparams] internal/buildcfg: allow regabi GOEXPERIMENTs on ARM64
It is not working yet, but allow enabling the experiments so we
can develop.

Change-Id: I957eb05acb4d80b2858ff1f8c16bbfb24e0f6e56
Reviewed-on: https://go-review.googlesource.com/c/go/+/323933
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2021-06-01 22:33:58 +00:00
Cherry Mui
c3639918d1 [dev.typeparams] internal/abi: define ARM64 register ABI constants
Change-Id: I9cdf0f2b6c1739f13a859a8e37351f8ecd77804a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323932
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-01 22:33:44 +00:00
Cherry Mui
6633dc8b09 [dev.typeparams] reflect: call ABI0 spill/unspill functions on AMD64
CL 321950 changed runtime.spillArgs and unspillArgs to ABI0.
References to those functions should have been updated to ABI0,
but this one was missed.

Change-Id: I99238e4a96c945a47bec0981a415037578c73de4
Reviewed-on: https://go-review.googlesource.com/c/go/+/323931
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
2021-06-01 22:33:29 +00:00
Cherry Mui
e4003463ff [dev.typeparams] cmd/compile: match register-ABI version of memmove call on ARM64
Update the rule to match register-ABI version of the call for
inlining memmove.

Change-Id: Ic6da810e4d7ac391ffb766fcdc943985f0739624
Reviewed-on: https://go-review.googlesource.com/c/go/+/323930
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2021-06-01 22:33:10 +00:00
Cherry Mui
8e7abefdaa [dev.typeparams] cmd/compile: update ARM64 CALL* ops for register ABI
Now they take variable number of args.

Change-Id: I49c8bce9c3a403947eac03e397ae264a8f4fdd2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/323929
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2021-06-01 22:33:00 +00:00
Cherry Mui
c9d1a2bdd2 [dev.typeparams] all: merge master (2725522) into dev.typeparams
Merge List:

+ 2021-06-01 272552275f A+C: update name
+ 2021-06-01 2bec019fb5 doc/go1.17: add release notes for register ABI
+ 2021-06-01 2e59cc5fb4 cmd/go: add [-src] to documentation
+ 2021-06-01 0b80cf1136 cmd/go: make 'go get' save sums for incidentally updated modules
+ 2021-05-30 3b770f2ccb go/types: don't declare 'comparable' when typeparams are disabled
+ 2021-05-30 1607c28172 go/types: unexport the GoVersion configuration option for Go 1.17
+ 2021-05-29 79bda65041 doc/go1.17: mention time.Layout
+ 2021-05-29 f6cc392d1d doc/go1.17: document text/template/parse.SkipFuncCheck
+ 2021-05-28 1419ca7cea doc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC
+ 2021-05-28 6624771c83 doc/go1.17: mention testing.[TB].Setenv methods
+ 2021-05-28 bbda923592 doc/go1.17: mention new Windows SysProcAttr fields
+ 2021-05-28 6f58088bd8 doc/go1.17: document new go/build/BuildContext.ToolTags field
+ 2021-05-28 c295107708 doc/go1.17: mention new encoding/csv/Reader.FieldPos method
+ 2021-05-28 ccd9784edf doc/go1.17: document new debug/elf constant
+ 2021-05-28 3de3440fb9 go/ast: remove FuncDecl.IsMethod for Go 1.17
+ 2021-05-27 639acdc833 doc/go1.17: clarify that compress/lzw Reader and Writer types are new
+ 2021-05-27 193d514131 net/http: correct Client.Do doc about context cancelation
+ 2021-05-27 ab2ef4aaa7 doc/go1.17: document reflect changes
+ 2021-05-27 0ece95a0fe cmd/go: don't let 'go mod download' save sums for inconsistent requirements
+ 2021-05-27 cdcd02842d net: verify results from Lookup* are valid domain names
+ 2021-05-27 8bf5bf5173 cmd/compile: improve debug locations for partially live in-params
+ 2021-05-27 56af34f875 cmd/compile: place reg spills after OpArg{Int,Float}Reg ops
+ 2021-05-27 db66e9e15d cmd/link: accept Windows line-ending in TestTrampolineCgo
+ 2021-05-27 6b8c94b6c5 go/types: guard against check==nil in newNamed
+ 2021-05-27 fca7b8f3e6 Revert "net: verify results from Lookup* are valid domain names"
+ 2021-05-27 950fa11c4c net/http/httputil: always remove hop-by-hop headers
+ 2021-05-27 9bc52686da cmd/go,cmd/link: do not check for staleness in most tests
+ 2021-05-27 6ff0ae2aa4 crypto/elliptic: fix typo in p521Point type name
+ 2021-05-26 3075ffc93e os: deflake TestFdReadRace
+ 2021-05-26 a62c08734f src/os: revert accidentally submitted change
+ 2021-05-26 1d5298d46a doc/go1.17: document net/... changes
+ 2021-05-26 0fbecece98 doc/go1.17: document syscall changes
+ 2021-05-26 02beecb397 mime: document use of the Shared MIME-Info Database
+ 2021-05-26 a92460fd2f doc/go1.17: add release notes for runtime/metrics package
+ 2021-05-26 55aefbb268 doc/go1.17: mention enabling frame pointer on all ARM64
+ 2021-05-26 39da9ae513 go/types: ensure that Named.check is nilled out once it is expanded
+ 2021-05-26 bfd7798a6c runtime,cmd/link/internal/ld: fix typos
+ 2021-05-26 e4615ad74d math/big: move division into natdiv.go
+ 2021-05-26 d050238bb6 doc/go1.17: fix formatting for time changes
+ 2021-05-25 74242baa41 archive/zip: only preallocate File slice if reasonably sized

Change-Id: I8a02edee1a6889547c52aa28c53cf8250766ab2c
2021-06-01 14:58:52 -04:00
Matthew Dempsky
2580e9a160 [dev.typeparams] cmd/compile: refactor noder/irgen helpers
This CL refactors the code for invoking the types2 checker and for
validating //go:embed directives to be easier to reuse separately.
No functional change.

Change-Id: I706f4ea4a26b1f1d2f4064befcc0777a1067383d
Reviewed-on: https://go-review.googlesource.com/c/go/+/323310
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
2021-06-01 18:03:44 +00:00
Cuong Manh Le
4b10e4c547 [dev.typeparams] cmd/compile: handle ONONAME in subster.node
Fixes #46472

Change-Id: I27802978fa0c3bb32a29e452165a6fcac93473bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/323731
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-06-01 17:10:20 +00:00
OneOfOne
272552275f A+C: update name
Change-Id: I1f88304858da5147bfd082c2fc2b7d24ed371cd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/321955
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-06-01 17:08:12 +00:00
Cherry Mui
2bec019fb5 doc/go1.17: add release notes for register ABI
Also delete the TODO for the linker section.

Updates #44513.
Updates #40724.

Change-Id: I4d62a907e8c3070831a052cdfe1e21648698df12
Reviewed-on: https://go-review.googlesource.com/c/go/+/323289
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-06-01 16:26:24 +00:00
Vitaly Zdanevich
2e59cc5fb4 cmd/go: add [-src] to documentation
Change-Id: I554b5021386575af6ff44571a95bb31b38a0547f
GitHub-Last-Rev: 20aaec3aa0
GitHub-Pull-Request: golang/go#45956
Reviewed-on: https://go-review.googlesource.com/c/go/+/317109
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
2021-06-01 13:23:26 +00:00
Jay Conrod
0b80cf1136 cmd/go: make 'go get' save sums for incidentally updated modules
When 'go get' updates a module, it may update another module in the
build list that provides a package in 'all' that wasn't loaded as part
of the 'go get' command. If 'go get' doesn't add a sum for that
module, builds may fail later.

With this change, 'go get' will fetch a sum for the content of an
updated module if we had a sum for the version before the update.

'go get' won't load the complete package graph, so there are still
cases where the build may be broken, like when an updated (but not
loaded) package imports a package from a new module.

Fixes #44129

Change-Id: I62eba3df4137a3e84e2ca8d549c36eec3670f08c
Reviewed-on: https://go-review.googlesource.com/c/go/+/322832
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-01 12:20:06 +00:00
Matthew Dempsky
f32f4f58d9 [dev.typeparams] cmd/compile: simplify formatting of defined types
The existing code for deciding how to format defined type names is
incredibly convoluted and difficult to follow. In particular, I'm
looking at changing how Vargen works, and I couldn't tell from the
existing code whether my idea was viable.

This CL overhauls the logic to be much simpler with fewer special
cases, while overall behaving the same. A few notable intentional
differences from how the current code works:

1. The old code replaced the 'S' verb for fmtTypeGo and fmtTypeDebug
to 'v', whereas the new code leaves it alone. There's currently no
code that actually uses 'S' with these modes anyway, so it doesn't
seem important to maintain this special case. If future code wants 'v'
formatting, it should just use 'v' instead of 'S'.

2. The old code included Vargen for fmtTypeIDName mode with the 'S'
verb; but again, this functionality isn't actually used. I think it
would make sense for fmtTypeIDName to include Vargen like fmtTypeID
does (Vargen is logically part of the type's identity after all), but
that breaks tests and toolstash -cmp. So for now, this is left as a
TODO to investigate in the future.

3. The old code only added Vargen for fmtTypeID in 'v' mode when
printing types from the local package. But because we don't currently
support exporting function-scoped defined types anyway, this is again
irrelevant. In fact, once we *do* support exporting function-scoped
defined types, we'll need to include Vargen to generate the linker
symbols correctly.

Passes toolstash -cmp.

Change-Id: I4e481276bc4dc8d5b17eebf597b612737f26be5b
Reviewed-on: https://go-review.googlesource.com/c/go/+/323709
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2021-05-31 03:22:58 +00:00
Rob Findley
3b770f2ccb go/types: don't declare 'comparable' when typeparams are disabled
Fixes #46453

Change-Id: I92b9b1e43ec5182162b2eeeb667f1f548ea373a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/323609
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-05-30 17:47:50 +00:00
Rob Findley
1607c28172 go/types: unexport the GoVersion configuration option for Go 1.17
The GoVersion field was added to types.Config as part of the work on
type parameters. Specifically, it was added to be consistent with
cmd/compile/internal/types2, which requires such an option.

This configuration option is useful, but is also non-trivial and did not
go through the proposal process. Unexport it for Go 1.17; we can create
a proposal to export it for Go 1.18.

Fixes #46296

Change-Id: Id82d8a7096887dcfc404c4d6d8da9c761b316609
Reviewed-on: https://go-review.googlesource.com/c/go/+/323430
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-05-30 02:37:38 +00:00
Ian Lance Taylor
79bda65041 doc/go1.17: mention time.Layout
For #44513

Change-Id: Id4624e977654f7e8c489508a9dce98c9fab621a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323490
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-05-29 01:59:17 +00:00
Ariel Mashraki
f6cc392d1d doc/go1.17: document text/template/parse.SkipFuncCheck
Documents the newly added mode that skips type checking
functions as per CL 301493.

Fixes #46025
For #34652
For #44513
For #38627

Change-Id: I56c4f65924702a931944796e39f43cfeb66abc8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/311569
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Michael Knyszek <mknyszek@google.com>
2021-05-29 00:16:11 +00:00
Ian Lance Taylor
1419ca7cea doc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC
For #44513

Change-Id: I8c0070b116ee520a76726eb9d3dcbdd489a1fb1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323351
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:41:07 +00:00
Ian Lance Taylor
6624771c83 doc/go1.17: mention testing.[TB].Setenv methods
For #41260
For #44513

Change-Id: I47ac0c751dafeb05abfe66fdf77938774164915f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323353
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
2021-05-28 18:36:54 +00:00
Ian Lance Taylor
bbda923592 doc/go1.17: mention new Windows SysProcAttr fields
For #44011
For #44513

Change-Id: I512466f2e775e36098eb36ca7ef82333cd9e632a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323352
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:35:37 +00:00
Ian Lance Taylor
6f58088bd8 doc/go1.17: document new go/build/BuildContext.ToolTags field
For #44513

Change-Id: Ib21af742e574fcaa7e38bb437d42dbeed9d01f0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/323350
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:34:18 +00:00
Ian Lance Taylor
c295107708 doc/go1.17: mention new encoding/csv/Reader.FieldPos method
For #44221
For #44513

Change-Id: I2d2d1c55255f4411c11fd51f0f3ae726cbf4d136
Reviewed-on: https://go-review.googlesource.com/c/go/+/323349
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
2021-05-28 18:33:29 +00:00