]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
2 years agolib/time: fix RFC 6557 url
180909 [Sun, 15 Aug 2021 01:57:33 +0000 (01:57 +0000)]
lib/time: fix RFC 6557 url

Change-Id: I59406ee7dbab7b2a0404b62061af552b6b4ecf5f
GitHub-Last-Rev: 7cad5ae9bac19fdffb072413095fe5b223c95eca
GitHub-Pull-Request: golang/go#47696
Reviewed-on: https://go-review.googlesource.com/c/go/+/342209
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agotime/tzdata: update links in comment
Ian Lance Taylor [Fri, 13 Aug 2021 20:58:23 +0000 (13:58 -0700)]
time/tzdata: update links in comment

Change-Id: I141d29bb4adc957de5de1f8ed8867980fd3c8386
Reviewed-on: https://go-review.googlesource.com/c/go/+/342071
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2 years agocmd/dist: remove tests using the typeparams build tag
Robert Findley [Sat, 14 Aug 2021 04:03:09 +0000 (00:03 -0400)]
cmd/dist: remove tests using the typeparams build tag

This stanza is no longer necessary now that the typeparams build tag is
not used.

Change-Id: I7bcc4a01e354e5130d50b00895a5b96c25c71502
Reviewed-on: https://go-review.googlesource.com/c/go/+/342153
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>
2 years agosync/atomic: fix documentation for CompareAndSwap
Jeff Wentworth [Sat, 14 Aug 2021 09:46:32 +0000 (09:46 +0000)]
sync/atomic: fix documentation for CompareAndSwap

Fixes #47699

The documentation for CompareAndSwap atomic/value incorrectly labelled the function as CompareAndSwapPointer. This PR fixes that.

Change-Id: I6db08fdfe166570b775248fd24550f5d28e3434e
GitHub-Last-Rev: 41f78707928f48c9cdac26b6a4f618d4284e1ca1
GitHub-Pull-Request: golang/go#47700
Reviewed-on: https://go-review.googlesource.com/c/go/+/342210
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agocmd/compile/internal/types2: rename TypeParams to TParamList
Robert Findley [Fri, 13 Aug 2021 15:16:50 +0000 (11:16 -0400)]
cmd/compile/internal/types2: rename TypeParams to TParamList

The 'TypeParams' name is too easily confused with the singular
'TypeParam', and does not say anything about what type of collection it
is. We decided that TTuple was not great. TParamList seems OK for now,
though perhaps a better name will emerge.

Change-Id: I5eabdc91b1f666bb4c7ea8acdbebf7c372d19227
Reviewed-on: https://go-review.googlesource.com/c/go/+/341861
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>
2 years agocmd/compile/internal/types2: remove targs from substMap
Robert Findley [Thu, 12 Aug 2021 19:03:45 +0000 (15:03 -0400)]
cmd/compile/internal/types2: remove targs from substMap

Now that we always capture targs when constructing an instance, we no
longer need to pass them via the substMap. This simplifies the code and
resolves a TODO.

Change-Id: I592dccaeb89c7cc31ac037d919137bb762820365
Reviewed-on: https://go-review.googlesource.com/c/go/+/341859
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>
2 years agocmd/compile/internal/types2: use the orig object for Named.Obj
Rob Findley [Wed, 11 Aug 2021 16:43:27 +0000 (12:43 -0400)]
cmd/compile/internal/types2: use the orig object for Named.Obj

Exposing a synthetic type name for instantiated types is problematic:
there is no way to ensure that type instances are first created in the
same type checking pass, and therefore no guarantee that their
instantiation positions are the same. Even type checking a given package
with different file ordering could result in different positions being
associated with type instances. This is therefore an implementation
detail that we should not expose.

Keep the synthetic type name for accurate error reporting, but hide it
in the API.

Change-Id: I61f0e3ed322e97b157eb1ca316480f5719dcc174
Reviewed-on: https://go-review.googlesource.com/c/go/+/341858
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>
2 years agocmd/compile/internal/types2: simplify Named.under
Rob Findley [Wed, 11 Aug 2021 17:36:26 +0000 (13:36 -0400)]
cmd/compile/internal/types2: simplify Named.under

Remove some unnecessary logic from Named.under:
 - no need to have special handling for Typ[Invalid]: this is the same
   as other cases where the underlying type is resolved.
 - use Underlying() to get the loaded and expanded underlying
 - no need for special handling of the first iteration

Change-Id: I2029711f51fa9eaaee11debadd55974a1376a980
Reviewed-on: https://go-review.googlesource.com/c/go/+/341857
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>
2 years agocmd/compile/internal/types2: define Identical for instances
Rob Findley [Wed, 11 Aug 2021 15:45:11 +0000 (11:45 -0400)]
cmd/compile/internal/types2: define Identical for instances

Instantiation of parameterized types may occur in other packages, so we
need an intrinsic notion of type identity for instances.

Add the natural definition: two instances are identical if their bases
and type arguments are identical.

Type unification was already considering type arguments, but has some
inaccurate logic with respect to objects. This will be addressed in a
follow-up CL.

Change-Id: Ib2ce67c05de65eb302ee588cc40c89c60018da50
Reviewed-on: https://go-review.googlesource.com/c/go/+/341856
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>
2 years agocmd/compile/internal/types2: merge Instantiate and InstantiateLazy
Rob Findley [Tue, 10 Aug 2021 18:00:56 +0000 (14:00 -0400)]
cmd/compile/internal/types2: merge Instantiate and InstantiateLazy

Instantiate and InstantiateLazy have the same signature; on first
principles, if Instantiate should work for importers it should be
possible to consolidate these APIs.

This CL does this. In order to make it work, a typMap needs to be
threaded through type expansion to prevent infinite recursion in the
case that the Checker is nil.

Notably, Named types now must be expanded before returning from
Underlying(). This makes Underlying generally unsafe to call while type
checking a package, so a helper function safeUnderlying is added to
provide the previous behavior. This is probably overly conservative at
most call sites, but cleanup is deferred to a later CL.

Change-Id: I03cfb75bea0750862cd6eea4e3cdc875a7daa989
Reviewed-on: https://go-review.googlesource.com/c/go/+/341855
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>
2 years agonet: update IP.String doc to reflect RFC 5952 conformance
hitzhangjie [Sat, 7 Aug 2021 04:18:37 +0000 (04:18 +0000)]
net: update IP.String doc to reflect RFC 5952 conformance

Fixes #44485

Change-Id: I1b1bf14245ef738342ec881ac4c99adbfc9c5b7d
GitHub-Last-Rev: ae0242c6d61fc0e80c58113a70db74829f6aa12c
GitHub-Pull-Request: golang/go#47394
Reviewed-on: https://go-review.googlesource.com/c/go/+/337409
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
2 years agocmd/link: fix dead reference link
korzhao [Tue, 10 Aug 2021 14:05:34 +0000 (22:05 +0800)]
cmd/link: fix dead reference link

Change-Id: I0f53cc2b845f8a52fece2aaba1445a0ecb9cdc53
Reviewed-on: https://go-review.googlesource.com/c/go/+/341129
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>

2 years agotest: change issue10441.go from "build" to "compile"
Ian Lance Taylor [Tue, 13 Jul 2021 16:26:28 +0000 (09:26 -0700)]
test: change issue10441.go from "build" to "compile"

We use "build" for tests in the main package with a main function.
We use "compile" for tests that are not in the main package.

Change-Id: I9876b55a9e4672277483fd24e69058d439c66658
Reviewed-on: https://go-review.googlesource.com/c/go/+/334329
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agolib/time: fix tz-link ftp url
180909 [Wed, 11 Aug 2021 08:52:31 +0000 (08:52 +0000)]
lib/time: fix tz-link ftp url

Change-Id: Id09c01192dea6a6f26cbad7222946266587acfda
GitHub-Last-Rev: c4f99aedcdc8316f13e8d9bfe9a00e48443fae9e
GitHub-Pull-Request: golang/go#47639
Reviewed-on: https://go-review.googlesource.com/c/go/+/341389
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2 years agoruntime: don't use systemstack for BeforeFork/AfterFork
Ian Lance Taylor [Wed, 11 Aug 2021 22:34:29 +0000 (15:34 -0700)]
runtime: don't use systemstack for BeforeFork/AfterFork

In https://golang.org/cl/140930043 syscall.BeforeFork was changed to
call beforefork via onM. This was done because at the time BeforeFork
was written in C but was called from Go. While the runtime was being
converted to Go, calls to complex C functions used onM to ensure that
enough stack space was available.

In https://golang.org/cl/172260043 the syscall.BeforeFork and
beforefork functions were rewritten into Go. In this rewrite
syscall.BeforeFork continue to call beforefork via onM, although
because both functions were now in Go that was no longer necessary.

In https://golang.org/cl/174950043 onM was renamed to systemstack,
producing essentially the code we have today.

Therefore, the use of systemstack in syscall.BeforeFork (and
syscall.AfterFork) is a historical relic.  Remove it.

Change-Id: Ia570f556b20e8405afa6c5e707bd6f4ad18fd7ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/341335
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2 years agotest: add test case for CL 340609
Ian Lance Taylor [Mon, 9 Aug 2021 21:59:56 +0000 (14:59 -0700)]
test: add test case for CL 340609

The first version of CL 340609 for gofrontend passed all existing tests,
but not this one.

For #42076

Change-Id: I6491e2f186091bdae140b7f7befa511806a6478a
Reviewed-on: https://go-review.googlesource.com/c/go/+/340950
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2 years agotest: add test case that caused a gofrontend compiler crash
Ian Lance Taylor [Fri, 16 Jul 2021 19:16:21 +0000 (12:16 -0700)]
test: add test case that caused a gofrontend compiler crash

For #47131

Change-Id: Ie2d5a2bd3dceec607544c43e6dc68bd5ea353091
Reviewed-on: https://go-review.googlesource.com/c/go/+/335172
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agoall: gofmt more (but vendor, testdata, and top-level test directories)
Dmitri Shuralyov [Tue, 10 Aug 2021 00:29:14 +0000 (20:29 -0400)]
all: gofmt more (but vendor, testdata, and top-level test directories)

CL 294430 made packages in std and cmd modules use Go 1.17 gofmt format,
adding //go:build lines. This change applies the same formatting to some
more packages that 'go fmt' missed (e.g., syscall/js, runtime/msan), and
everything else that is easy and safe to modify in bulk.

Consider the top-level test directory, testdata, and vendor directories
out of scope, since there are many files that don't follow strict gofmt
formatting, often for intentional and legitimate reasons (testing gofmt
itself, invalid Go programs that shouldn't crash the compiler, etc.).

That makes it easy and safe to gofmt -w the .go files that are found
with gofmt -l with aforementioned directories filtered out:

$ gofmt -l . 2>/dev/null | \
grep -v '^test/' | \
grep -v '/testdata/' | \
grep -v '/vendor/' | wc -l
      51

None of the 51 files are generated. After this change, the same command
prints 0.

For #41184.

Change-Id: Ia96ee2a0f998d6a167d4473bcad17ad09bc1d86e
Reviewed-on: https://go-review.googlesource.com/c/go/+/341009
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>

2 years agoruntime: drop SIGPROF while in ARM < 7 kernel helpers
Michael Pratt [Thu, 12 Aug 2021 21:17:51 +0000 (17:17 -0400)]
runtime: drop SIGPROF while in ARM < 7 kernel helpers

On Linux ARMv6 and below runtime/internal/atomic.Cas calls into a kernel
cas helper at a fixed address. If a SIGPROF arrives while executing the
kernel helper, the sigprof lostAtomic logic will miss that we are
potentially in the spinlock critical section, which could cause
a deadlock when using atomics later in sigprof.

Fixes #47505

Change-Id: If8ba0d0fc47e45d4e6c68eca98fac4c6ed4e43c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/341889
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agocmd/internal/str: move package from cmd/go/internal/str
Jay Conrod [Wed, 14 Jul 2021 20:52:00 +0000 (13:52 -0700)]
cmd/internal/str: move package from cmd/go/internal/str

This will let cmd/cgo and cmd/link use this package for argument parsing.

For golang/go#41400

Change-Id: I12ee21151bf3f00f3e8d427faaaab2453c823117
Reviewed-on: https://go-review.googlesource.com/c/go/+/334730
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/341934
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2 years agocmd/go: make fewer 'go mod' commands update go.mod
Jay Conrod [Tue, 20 Jul 2021 21:46:40 +0000 (14:46 -0700)]
cmd/go: make fewer 'go mod' commands update go.mod

'go mod graph', 'go mod vendor', 'go mod verify', and 'go mod why'
will no longer edit go.mod or go.sum.

'go mod graph', 'go mod verify', and 'go mod why' may still fetch
files and look up packages as if they were able to update
go.mod. They're useful for debugging and should still work when go.mod
is a little broken.

This is implemented in modload.setDefaultBuildMod based on command
name for now. Super gross. Sorry. This should be fixed with a larger
refactoring for #40775.

Fixes golang/go#45551

Change-Id: If5f225937180d32e9a5dd252c78d988042bbdedf
Reviewed-on: https://go-review.googlesource.com/c/go/+/336151
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/341933
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2 years agocmd/go: add -testsum flag to update go.sum in script tests
Jay Conrod [Tue, 20 Jul 2021 21:37:53 +0000 (14:37 -0700)]
cmd/go: add -testsum flag to update go.sum in script tests

-testsum may be set to "tidy", "listm", or "listall". When set,
TestScript runs 'go mod tidy', 'go list -m -mod=mod all', or
'go list -mod=mod all' at the beginning of each test that has a go.mod
file in its root directory. If the test passes and go.mod or go.sum
was updated, TestScript will rewrite the test file with the initial
content of go.mod and go.sum (after the above command).

This is useful for writing tests that need a working go.sum and for
fixing tests that rely on -mod=mod.

For golang/go#41302

Change-Id: I63a5667621a5082ccedfc1bff33c3969c29e8b3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/336150
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/341932
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2 years agoMerge "all: REVERSE MERGE dev.typeparams (4d3cc84) into master"
Gerrit Code Review [Thu, 12 Aug 2021 21:33:09 +0000 (21:33 +0000)]
Merge "all: REVERSE MERGE dev.typeparams (4d3cc84) into master"

2 years agotime: fix docs for new comma layouts
Russ Cox [Fri, 6 Aug 2021 17:21:25 +0000 (13:21 -0400)]
time: fix docs for new comma layouts

The current text is slightly inaccurate. Make it more correct.

Change-Id: Iebe0051b74649d13982d7eefe3697f9e69c9b75d
Reviewed-on: https://go-review.googlesource.com/c/go/+/340449
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agoall: REVERSE MERGE dev.typeparams (4d3cc84) into master
Matthew Dempsky [Thu, 12 Aug 2021 20:23:41 +0000 (13:23 -0700)]
all: REVERSE MERGE dev.typeparams (4d3cc84) into master

This commit is a REVERSE MERGE.
It merges dev.typeparams back into its parent branch, master.
This marks the end of development on dev.typeparams.

Merge List:

+ 2021-08-12 4d3cc84774 Merge "[dev.typeparams] all: merge master (46fd547) into dev.typeparams" into dev.typeparams
+ 2021-08-12 a64ab8d3ec [dev.typeparams] all: merge master (46fd547) into dev.typeparams
+ 2021-08-12 7e9f911ec4 [dev.typeparams] cmd/compile:  remove some shape checks in type substituter, other cleanups
+ 2021-08-12 677dfe5ad6 [dev.typeparams] cmd/compile: don't print out node pointer in ir.Dump
+ 2021-08-11 8ab59d812a [dev.typeparams] cmd/compile: change export version to 1.17 for testing
+ 2021-08-11 d7d4f28a06 [dev.typeparams] runtime, internal/bytealg: remove regabi fallback code on AMD64
+ 2021-08-11 eeb7899137 [dev.typeparams] internal/buildcfg: always enable regabi on AMD64
+ 2021-08-11 0888a8cd2d [dev.typeparams] cmd/compile/internal/types2: remove unused TypeParam.Bound method
+ 2021-08-10 7308d747e7 [dev.typeparams] cmd/compile/internal/types2: remove Named.SetTArgs
+ 2021-08-10 0f34a92df7 [dev.typeparams] go/types: don't expose the TypeSet API for 1.18
+ 2021-08-10 40ba119e3f [dev.typeparams] cmd/compile: keep export format unchanged if no type params are exported
+ 2021-08-10 fb8579746c [dev.typeparams] internal/goexperiment: update comment for RegabiArgs requirements
+ 2021-08-10 2e250cc957 [dev.typeparams] cmd: update vendored golang.org/x/tools to 337cebd2c151
+ 2021-08-10 2fbf6aafe7 [dev.typeparams] cmd/compile: handle interface type parameters in type switches
+ 2021-08-10 e4cfa2f6da [dev.typeparams] cmd/compile/internal/types2: parameterized functions must have a body
+ 2021-08-10 508624f359 [dev.typeparams] cmd/compile/internal/types2: expand is only required for *Named types
+ 2021-08-09 f5f79c47f9 [dev.typeparams] cmd/compile: use types2.Constraint() rather than types2.Bound()
+ 2021-08-09 9f4d6a8359 [dev.typeparams] cmd/compile: call transformArgs before early typecheckaste in noder
+ 2021-08-09 ca3c6985cd [dev.typeparams] cmd/compile: implement generic type switches
+ 2021-08-09 57668b84ff [dev.typeparams] cmd/compile: simplify interface conversions
+ 2021-08-07 d10a904712 [dev.typeparams] cmd/compile: don't export/import type parameter indices anymore
+ 2021-08-06 9e0ac72d68 [dev.typeparams] cmd/compile/internal/types2: remove Interface.Complete (cleanup)
+ 2021-08-06 9bd1817e41 [dev.typeparams] cmd/compile/internal/types2: limit termlist lengths
+ 2021-08-06 313924f272 [dev.typeparams] cmd/compile: swap export order of union term components (cleanup)
+ 2021-08-06 0d7dc417ea [dev.typeparams] cmd/compile: change types2.Union API to accept a list of Terms
+ 2021-08-06 09d82689ed [dev.typeparams] cmd/compile/internal/types2: add defined type to term/termlist tests
+ 2021-08-06 3a9fd99849 [dev.typeparams] cmd/compile/internal/syntax: cleanup panic calls
+ 2021-08-06 c3b57af8bc [dev.typeparams] cmd/compile/internal/types2: minor cleanup of writeTParamList
+ 2021-08-06 0811108670 [dev.typeparams] cmd/compile/internal/types2: fix make with type parameter argument
+ 2021-08-06 93285c89d1 [dev.typeparams] cmd/compile/internal/types2: fix range over exprs of type parameter type
+ 2021-08-06 5aac85ad5e [dev.typeparams] cmd/compile/internal/types2: better names for things (cleanup)
+ 2021-08-06 110343e4a2 [dev.typeparams] cmd/compile: cleanup wrapper code for generics
+ 2021-08-06 5e33d11e10 [dev.typeparams] cmd/compile: do transformCall with non-shape type of call
+ 2021-08-06 ac78501b9c [dev.typeparams] cmd/compile: make sure closures inside generic funcs are not compiled
+ 2021-08-05 f78d538858 [dev.typeparams] cmd/compile/internal/types2: cleanup panic calls
+ 2021-08-05 c5b6c36ddd [dev.typeparams] cmd/compile/internal/types2: remove TestIncompleteInterfaces (cleanup)
+ 2021-08-05 f14908d01b [dev.typeparams] cmd/compile/internal/types2: remove unused gcCompatibilityMode flag (cleanup)
+ 2021-08-05 bb5608dd5d [dev.typeparams] cmd/compile/internal/types2: implement type sets with term lists
+ 2021-08-05 6dadee759c [dev.typeparams] cmd/compile: unified importReader receiver name to r
+ 2021-08-05 5dcb5e2cea [dev.typeparams] cmd/compile: dictionary/shape cleanup
+ 2021-08-05 3cdf8b429e [dev.typeparams] cmd/compile: fixing case where type arg is an interface
+ 2021-08-04 1b708c0260 [dev.typeparams] go/types: remove a stale comment (cleanup)
+ 2021-08-04 0ec2a8b42d [dev.typeparams] go/types: switch the TArgs API to NumTArgs/TArg
+ 2021-08-04 e5fe769be1 [dev.typeparams] cmd/compile/internal/types2: implement term lists
+ 2021-08-04 b730a26729 [dev.typeparams] cmd/compile: put shape types in their own package
+ 2021-08-04 e590cb64f9 [dev.typeparams] runtime: handle d.link carefully when freeing a defer
+ 2021-08-04 d27a889119 [dev.typeparams] go/types: move instance.go contents into named.go (cleanup)
+ 2021-08-04 b01e775e9c [dev.typeparams] go/types: print constraint info for type param operands
+ 2021-08-04 3efc8f9a8d [dev.typeparams] go/types: (TypeParam) SetBound -> SetConstraint
+ 2021-08-04 ed3667d079 [dev.typeparams] go/types: use type terms to represent unions
+ 2021-08-04 880ab6209e [dev.typeparams] cmd/compile/internal/types2: fix a panic in missingMethod
+ 2021-08-04 5b51cf47dc [dev.typeparams] go/types: implement type terms
+ 2021-08-04 e0d0907212 [dev.typeparams] go/types: use comparable bit rather than ==() method
+ 2021-08-04 18e0503724 [dev.typeparams] go/types: embedded type cannot be a (pointer to) a type parameter
+ 2021-08-04 89897473e2 [dev.typeparams] go/types: implement TypeParam.Constraint
+ 2021-08-04 1ea3596b41 [dev.typeparams] go/types: adjust unsafe.Alignof/Offsetof/Sizeof
+ 2021-08-03 88bd92bb6d [dev.typeparams] runtime: simplify freedefer
+ 2021-08-03 1a0630aef4 [dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop
+ 2021-08-03 077925e2b0 [dev.typeparams] runtime: remove unnecessary split-prevention from defer code
+ 2021-08-03 7ab8754029 [dev.typeparams] cmd/compile: avoid redundant method wrappers in unified IR
+ 2021-08-03 fe73f28dc5 [dev.typeparams] cmd/compile: set sym.Def to ir.Name for method value wrappers
+ 2021-08-03 656f0888b7 [dev.typeparams] cmd/compile: make softfloat mode work with register ABI
+ 2021-08-03 1b193598b3 [dev.typeparams] cmd/compile: fail early on unexpected types2.Invalid
+ 2021-08-02 e56234a305 [dev.typeparams] cmd/compile: simple shape cleanups
+ 2021-08-02 c3c19731a9 [dev.typeparams] cmd/compile/internal/types2: move instance.go contents into named.go (cleanup)
+ 2021-08-02 156eeb40a6 [dev.typeparams] cmd/compile: make HasShape() more efficient by implementing with a type flag
+ 2021-08-02 283991bd7f [dev.typeparams] cmd/compile/internal/types2: print constraint info for type param operands
+ 2021-08-02 aa3d54da07 [dev.typeparams] runtime: rewrite softfloat functions to avoid using floats
+ 2021-07-31 0b8a9ccb25 [dev.typeparams] cmd/compile: make all pointer types have the same shape
+ 2021-07-30 7bed50e667 [dev.typeparams] Revert "[dev.typeparams] runtime: remove unnecessary split-prevention from defer code"
+ 2021-07-30 e3e9f0bb2d [dev.typeparams] Revert "[dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop"
+ 2021-07-30 40e561d933 [dev.typeparams] cmd/compile: allow types with the same underlying type to have the same shape
+ 2021-07-30 fd0011dca5 [dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop
+ 2021-07-30 53fd5b1b77 [dev.typeparams] runtime: remove unnecessary split-prevention from defer code
+ 2021-07-30 ea94e5d3c5 [dev.typeparams] runtime: use func() for deferred functions
+ 2021-07-30 4480e3b11a [dev.typeparams] go/types: backport lazy loading changes from CL 336252
+ 2021-07-30 27283d208f [dev.typeparams] cmd/compile: remove now-unneeded check for '==' method for comparable type
+ 2021-07-29 3e7571f6ff [dev.typeparams] go/types,cmd/compile/internal/types2: fix TypeParams.At docs
+ 2021-07-29 1d35d8ffa5 [dev.typeparams] cmd/compile: switch unified IR from TypeParam.Bound to TypeParam.Constraint
+ 2021-07-29 35dbdda2fe [dev.typeparams] cmd/compile: remove remaining uses of Unshapify
+ 2021-07-29 600b7b431b [dev.typeparams] cmd/compile: handle meth expressions on typeparams
+ 2021-07-29 5ecbd811b5 [dev.typeparams] cmd/compile/internal/types2: (TypeParam) SetBound -> SetConstraint
+ 2021-07-29 46cc686381 [dev.typeparams] cmd/compile/internal/types2: use the TParams API consistently
+ 2021-07-29 27552e9172 [dev.typeparams] cmd/compile: set type parameter indices when they are bound
+ 2021-07-29 af903261e7 [dev.typeparams] go/types, types2: remove instance.verify field (cleanup)
+ 2021-07-29 c079b6baaa [dev.typeparams] cmd/compile/internal/types2: trigger verification while resolving instance
+ 2021-07-29 ff0c0dbca6 [dev.typeparams] cmd/compile/internal/types2: use type terms to represent unions
+ 2021-07-29 2fa8f00915 [dev.typeparams] cmd/compile/internal/types2: implement type terms
+ 2021-07-29 f4f503e0a3 [dev.typeparams] cmd/compile: implement generic .(T) operations
+ 2021-07-28 4a47e40a14 [dev.typeparams] cmd/compile: don't export blank functions in unified IR
+ 2021-07-28 506fd520d5 [dev.typeparams] cmd/compile: don't compile blank functions
+ 2021-07-28 adedf54288 [dev.typeparams] test: rename blank functions
+ 2021-07-28 5355753009 [dev.typeparams] test/typeparam: gofmt -w
+ 2021-07-28 473e493d18 [dev.typeparams] cmd/compile/internal/types2: merge instance and Named to eliminate sanitization
+ 2021-07-28 e00a6ec084 [dev.typeparams] cmd/compile: mark methods of instantiated interface types as used
+ 2021-07-27 c751e2e6ba [dev.typeparams] cmd/compile/internal/types2: use comparable bit rather than ==() method
+ 2021-07-27 5d8f90f904 [dev.typeparams] cmd/compile: don't need to unshapify append calls
+ 2021-07-27 cb14e673ec [dev.typeparams] runtime: don't keep stack uintptr across potential stack move
+ 2021-07-26 37d2219960 [dev.typeparams] cmd/compile/internal/types2: embedded type cannot be a (pointer to) a type parameter
+ 2021-07-26 d6753fd491 [dev.typeparams] cmd/compile/internal/types2: implement TypeParam.Constraint
+ 2021-07-26 9e3274bb3d [dev.typeparams] cmd/compile/internal/types2: import regexp/syntax instead of cmd/compile/internal/syntax
+ 2021-07-26 b93f646125 [dev.typeparams] cmd/compile/internal/types2: fix a bug in package qualification logic
+ 2021-07-26 996b0dbc65 [dev.typeparams] all: merge master (ecaa681) into dev.typeparams
+ 2021-07-26 bfcb7c4c8a [dev.typeparams] cmd/compile: fix unified IR support for //go:nointerface
+ 2021-07-24 b27c7e30dc [dev.typeparams] cmd/compile: fix HasShape, add dottype test
+ 2021-07-24 a2e2b0362b [dev.typeparams] transformDot() should set Selection and tc flag for added ODOTs
+ 2021-07-24 3dc0a0a2c5 [dev.typeparams] cmd/compile: get rid of concretify use for bounds.
+ 2021-07-24 77e0bf294c [dev.typeparams] cmd/compile: introduce OCONVIDATA op
+ 2021-07-24 9f928f9318 [dev.typeparams] go/types, types2: set tset when constructing interfaces in the universe
+ 2021-07-23 6992dcdad9 [dev.typeparams] cmd/compile: fix some issues with cons.go
+ 2021-07-23 e6d956e1c5 [dev.typeparams] cmd/compile: add CONVIFACE nodes for return values during noder2
+ 2021-07-23 02c0172500 [dev.typeparams] cmd/compile: add dictionary entries for itab conversion
+ 2021-07-23 12866bd8ea [dev.typeparams] Add CONVIFACE nodes in noder2, where possible
+ 2021-07-23 4cdc65d32a [dev.typeparams] cmd/compile/internal/types: format union types
+ 2021-07-22 244267e8c4 Merge "[dev.typeparams] all: merge master (798ec73) into dev.typeparams" into dev.typeparams
+ 2021-07-22 d8ceb133ca [dev.typeparams] runtime: mark TestGcSys as flaky
+ 2021-07-22 a27e325c59 [dev.typeparams] all: merge master (798ec73) into dev.typeparams
+ 2021-07-22 5cb84f0604 [dev.typeparams] cmd/compile: make sure types added to the dictionary are instantiated correctly
+ 2021-07-22 73162a54c2 [dev.typeparams] cmd/compile: remove outdate TODO in escape analysis
+ 2021-07-22 80127a7dfe [dev.typeparams] cmd/compile/internal/types2: adjust unsafe.Alignof/Offsetof/Sizeof
+ 2021-07-22 fca3e5c445 [dev.typeparams] cmd/compile: fix missing condition in usemethod
+ 2021-07-22 5ba06495c1 [dev.typeparams] go/types: use the TParams API consistently
+ 2021-07-22 6f57139c7a [dev.typeparams] go/types: set type parameter indices when they are bound
+ 2021-07-22 311baf65f4 [dev.typeparams] test: cleanup 'go env' and -goexperiment
+ 2021-07-22 b7149b781f [dev.typeparams] go/types: trigger verification while resolving instance
+ 2021-07-22 61f69d2559 [dev.typeparams] go/types: merge instance and Named to eliminate sanitization
+ 2021-07-22 8e9109e95a [dev.typeparams] Fix problem with 14.go
+ 2021-07-22 ee20dff27d [dev.typeparams] Get dictionaryCapture.go working.
+ 2021-07-21 4e6836e82c [dev.typeparams] Fix the types of the OFUNCINST nodes in noder2
+ 2021-07-21 dcc8350ad3 [dev.typeparams] cmd/compile: handle ++/-- in noder2 for operands with generic type
+ 2021-07-21 f19e49e7b1 [dev.typeparams] cmd/compile: added a builtins.go test, fixed one bug
+ 2021-07-21 e6a2cf233f [dev.typeparams] cmd/compile: get runtime stuff working
+ 2021-07-21 4a97fe8c22 [dev.typeparams] cmd/compile: avoid adding incorrectly instantiated types to the dictionary
+ 2021-07-21 2fe4b14795 [dev.typeparams] cmd/compile: ensure methods of generic types survive linker pruning
+ 2021-07-21 73af5f718f [dev.typeparams] cmd/compile: disable failing generic tests
+ 2021-07-21 a7a17f0ca8 [dev.typeparams] cmd/compile: introduce named gcshape types
+ 2021-07-21 897970688b [dev.typeparams] cmd/compile: cleanup unified IR file format a little
+ 2021-07-21 d5f6ba943c [dev.typeparams] test: add regression test for go/defer wrapper
+ 2021-07-20 6a931673f0 [dev.typeparams] cmd/compile: add base.Assertf{,At} functions
+ 2021-07-20 e4994e71fb [dev.typeparams] all: merge master (c8f4e61) into dev.typeparams
+ 2021-07-19 c6d3d0b0ad [dev.typeparams] go/types: fix the type parameter index in applyTypeFunc
+ 2021-07-19 6bf2667d4e [dev.typeparams] go/types: more consistent handling of predeclared "any"
+ 2021-07-19 7e714f448e [dev.typeparams] go/types: embedding stand-alone type parameters is not permitted
+ 2021-07-19 82f875d735 [dev.typeparams] go/types: fix generic type indirection
+ 2021-07-19 62f6f130fe [dev.typeparams] go/types: interface identity must consider full type set
+ 2021-07-19 baeabf3b36 [dev.typeparams] go/types: cleanups around receiver type checks
+ 2021-07-19 b3d91e3a24 [dev.typeparams] go/types: implement delete(m, k) where m is of type parameter type
+ 2021-07-19 cf7e66b7d4 [dev.typeparams] go/types: implement close(ch) where ch is of type parameter type
+ 2021-07-19 19b4142f24 [dev.typeparams] go/types: implement ch <- x where ch is of type parameter type
+ 2021-07-19 d6d7f8458e [dev.typeparams] go/types: implement <-ch where ch is of type parameter type
+ 2021-07-19 796ac6d5f2 [dev.typeparams] go/types: move methods on *Named into named.go
+ 2021-07-19 22f39ba208 [dev.typeparams] go/types: use InstantiateLazy to create instance types (cleanup)
+ 2021-07-19 4a72be87b3 [dev.typeparams] go/types: move instantiation code to instantiate.go (cleanup)
+ 2021-07-19 41ff0aac13 [dev.typeparams] go/types: replace types2.Instantiate with Checker.Instantiate
+ 2021-07-19 9e147c55b7 [dev.typeparams] go/types: update TypeParam APIs to match types2
+ 2021-07-19 22a38ba5ca [dev.typeparams] go/types: remove unnecessary guard from NewInterfaceType
+ 2021-07-19 b96f1b9419 [dev.typeparams] go/types: add some missing APIs for the importer
+ 2021-07-19 43ad1ffa99 [dev.typeparams] go/types: recursive substitution must terminate (bug fix)
+ 2021-07-19 c7c13ae432 [dev.typeparams] go/types: use scope numbers to identify local types
+ 2021-07-19 ccf95f17dd [dev.typeparams] go/types: support local defined types
+ 2021-07-19 76b39959f4 [dev.typeparams] go/types: don't permit method calls on ptr to type parameter receivers
+ 2021-07-19 9b85985d36 [dev.typeparams] Separate out gcshape types that are instantiated types
+ 2021-07-17 df778e6fd9 [dev.typeparams] go/types: replace optype() with under() in various cases (cleanup)
+ 2021-07-17 e9836fe318 [dev.typeparams] go/types: clean up index expr implementation for type parameters
+ 2021-07-17 c4cd76fbbb [dev.typeparams] go/types: disallow "free" type parameter as RHS of a type declaration
+ 2021-07-16 521828091c [dev.typeparams] go/types: move (remaining) type decls into their own files (cleanup)
+ 2021-07-16 624d152db7 [dev.typeparams] go/types: move Interface type decl into interface.go (cleanup)
+ 2021-07-16 e12d43866d [dev.typeparams] go/types: move Signature type decl into signature.go (cleanup)
+ 2021-07-16 b3e7f23a48 [dev.typeparams] go/types: move Struct type decl into struct.go (cleanup)
+ 2021-07-16 7c35f5c2fc [dev.typeparams] go/types: rename newTypeSet -> computeTypeSet
+ 2021-07-16 de209e693a [dev.typeparams] go/types: make Interface.obj a *TypeName
+ 2021-07-16 0f4198b5e2 [dev.typeparams] go/types: delay interface check for type bounds
+ 2021-07-16 5f50a6442e [dev.typeparams] go/internal/typeparams: remove the Enabled guard
+ 2021-07-16 726ffce659 [dev.typeparams] go/types: "comparable" must not be visible before Go 1.18
+ 2021-07-16 79955155e9 [dev.typeparams] go/types: move newTypeSet function into typeset.go
+ 2021-07-16 fe4f13404d [dev.typeparams] go/types: move embedding positions from Checker to Interface
+ 2021-07-16 b98b8b9b5b [dev.typeparams] go/types: remove unused *Checker arguments (cleanup)
+ 2021-07-16 fce6290e0a [dev.typeparams] go/types: remove typeparams wrappers and aliases
+ 2021-07-16 24f9eb2de3 [dev.typeparams] go/types: introduce type set abstraction for interfaces
+ 2021-07-16 b296e54618 [dev.typeparams] go/types: port lazy import resolution from types2
+ 2021-07-16 10c8b7c1d7 [dev.typeparams] cmd/compile: use dictionary to convert arguments of ==, != to interfaces
+ 2021-07-16 ed9e109dc9 [dev.typeparams] cmd/compile: fix small -G=3 issues for tests disabled in run.go
+ 2021-07-16 3d8453e00e [dev.typeparams] cmd/compile/internal/types2: more consistent handling of predeclared "any"
+ 2021-07-16 334f2fc045 [dev.typeparams] go/*: switch from ListExpr to MultiIndexExpr
+ 2021-07-15 6b85a218b8 [dev.typeparams] cmd/compile: make TestUnifiedCompare insensitive to default -G level
+ 2021-07-14 4ff0e04c2e [dev.typeparams] cmd/compile/internal/types2: embedding stand-alone type parameters is not permitted
+ 2021-07-14 3a047326e8 [dev.typeparams] cmd/compile/internal/types2: fix generic type indirection
+ 2021-07-14 dd8bdf4a1f [dev.typeparams] cmd/compile/internal/types2: interface identity must consider full type set
+ 2021-07-14 2a8087817c [dev.typeparams] cmd/compile/internal/types2: cleanups around receiver type checks
+ 2021-07-14 95f8e64fc0 [dev.typeparams] cmd/compile/internal/types2: implement delete(m, k) where m is of type parameter type
+ 2021-07-14 5f0ea40c67 [dev.typeparams] cmd/compile/internal/types2: implement close(ch) where ch is of type parameter type
+ 2021-07-14 6511922a14 [dev.typeparams] cmd/compile/internal/types2: implement ch <- x where ch is of type parameter type
+ 2021-07-14 ff33d3dc3a [dev.typeparams] cmd/compile/internal/types2: implement <-ch where ch is of type parameter type
+ 2021-07-14 e3e6cd3022 [dev.typeparams] cmd/compile: fix escape printout bugs for -G=3
+ 2021-07-14 2b10d7ff0b [dev.typeparams] go/types: export the Config.GoVersion field
+ 2021-07-14 5517053d17 [dev.typeparams] cmd/compile: record more typ/fun info for dictionaries in unified IR
+ 2021-07-14 82744bfbfc [dev.typeparams] cmd/compile: handle objStub earlier in reader
+ 2021-07-13 e5faa8d84b [dev.typeparams] cmd/compile/internal/types2: move methods on *Named into named.go (cleanup)
+ 2021-07-13 d0324eb8fb [dev.typeparams] cmd/compile/internal/types2: use InstantiateLazy to create instance types (cleanup)
+ 2021-07-13 70f1246a9f [dev.typeparams] cmd/compile/internal/types2: move instantiation code to instantiate.go (cleanup)
+ 2021-07-13 22e9265467 [dev.typeparams] cmd/compile/internal/types2: replace types2.Instantiate with Checker.Instantiate
+ 2021-07-12 1c783dc148 [dev.typeparams] Add optional sub-dict entry for typeparam bound calls
+ 2021-07-11 0dcab98fd8 [dev.typeparams] cmd/compile: slightly more incremental unified typecheck
+ 2021-07-10 3c3c1d8d28 [dev.typeparams] cmd/compile: more incremental typecheck for unified IR
+ 2021-07-10 a12ad27119 [dev.typeparams] cmd/compile: report functions declared in Go and assembly
+ 2021-07-10 5059aed9dd [dev.typeparams] internal/buildcfg: allow regabiwrappers on all GOARCH
+ 2021-07-09 f2ed30c31e [dev.typeparams] cmd/compile/internal/types2: recursive substitution must terminate (bug fix)
+ 2021-07-09 69d945fc6e [dev.typeparams] cmd/compile/internal/types2: use scope numbers to identify local types
+ 2021-07-09 04acb8a7b9 [dev.typeparams] cmd/compile:  report mismatch between types because of //go:notinheap
+ 2021-07-08 2b1d70a137 [dev.typeparams] all: merge master (296ddf2) into dev.typeparams
+ 2021-07-08 42fe132787 [dev.typeparams] cmd/compile: cleanup ABI utils tests
+ 2021-07-08 d4f6d161e4 [dev.typeparams] cmd/compile: fix bunch of -G=3 bugs for test cases in test/typeparams/mdempsky
+ 2021-07-07 18135150b0 [dev.typeparams] cmd/compile/internal/types2: don't permit method calls on ptr to type parameter receivers
+ 2021-07-07 d2bf94fb86 [dev.typeparams] cmd/compile/internal/types2: replace optype() with under() in various cases (cleanup)
+ 2021-07-07 03ec8de24b [dev.typeparams] cmd/compile/internal/types2: clean up index expr implementation for type parameters
+ 2021-07-07 47547d8508 [dev.typeparams] cmd/compile/internal/types2: disallow "free" type parameter as RHS of a type declaration
+ 2021-07-07 60cb2cab97 [dev.typeparams] cmd/compile: fix bug with types2.Instantiate with interface type param
+ 2021-07-07 85267f402c [dev.typeparams] cmd/compile: move def of comparable to end of predeclared slices
+ 2021-07-07 c65ca97a45 [dev.typeparams] cmd/compile: fix windows longtest builder
+ 2021-07-07 501725032c [dev.typeparams] cmd/compile: handle derived types that are converted to interfaces
+ 2021-07-07 b614c05a15 [dev.typeparams] cmd/compile: add built-in name/type "comparable".
+ 2021-07-07 b4844c9f54 [dev.typeparams] cmd/compile: handle the (*T).M method expression with dictionaries
+ 2021-07-07 4676c3675e [dev.typeparams] cmd/compile: rename PartialCallType -> MethodValueType
+ 2021-07-07 5c42b6a953 [dev.typeparams] test: add regress tests that fail(ed) with -G=3
+ 2021-07-07 49ade6b298 [dev.typeparams] test: add expected failure mechanism
+ 2021-07-04 cd00499c61 [dev.typeparams] cmd/compile: better Call constructor
+ 2021-07-04 899b158ee9 [dev.typeparams] cmd/compile: set Func.ClosureCalled in escape analysis
+ 2021-07-03 ea5369bac0 [dev.typeparams] cmd/compile: remove ir.CallUse
+ 2021-07-03 c45d0eaadb [dev.typeparams] cmd/compile: flatten OINLCALL in walk
+ 2021-07-03 ad2ba3ff51 [dev.typeparams] src,cmd: run 'go mod tidy'
+ 2021-07-03 5dac279fbd [dev.typeparams] cmd/compile: formalize "hidden parameters" idea
+ 2021-07-03 611056ec34 Merge "[dev.typeparams] all: merge master (912f075) into dev.typeparams" into dev.typeparams
+ 2021-07-02 ef39edefe1 [dev.typeparams] src,cmd: bump go.mod to 'go 1.18'
+ 2021-07-02 f35d86fd5f [dev.typeparams] all: merge master (912f075) into dev.typeparams
+ 2021-07-02 b994cc69e0 [dev.typeparams] cmd/compile:  separate out creating instantiations from creating dictionaries
+ 2021-07-02 6dec18cc75 [dev.typeparams] cmd/compile: start using sub-dictionary entries where needed
+ 2021-07-02 a18726a648 [dev.typeparams] cmd/compile: incremental typecheck during unified IR
+ 2021-07-02 2aea44204e [dev.typeparams] cmd/compile: enable generics syntax with -lang=go1.18
+ 2021-07-01 30e5f266ed [dev.typeparams] cmd/compile/internal/types2: move (remaining) type decls into their own files (cleanup)
+ 2021-07-01 9c1e7d9eff [dev.typeparams] cmd/compile/internal/types2: move Interface type decl into interface.go (cleanup)
+ 2021-07-01 838079beef [dev.typeparams] cmd/internal/dwarf: remove putInlinedFunc's callersym param
+ 2021-07-01 9ba294e15b [dev.typeparams] cmd/compile: fix getDictionarySym for methods references, write out sub-dictionaries
+ 2021-07-01 0e0b80cb56 [dev.typeparams] cmd/compile/internal/types2: move Signature type decl into signature.go (cleanup)
+ 2021-07-01 1aadb18f83 [dev.typeparams] cmd/compile/internal/types2: move Struct type decl into struct.go (cleanup)
+ 2021-07-01 fac21803ce [dev.typeparams] cmd/compile/internal/types2: rename newTypeSet -> computeTypeSet
+ 2021-07-01 1eb756689c [dev.typeparams] cmd/compile/internal/types2: make Interface.obj a *TypeName
+ 2021-07-01 9cb1b0f50b [dev.typeparams] cmd/compile/internal/types2: delay interface check for type bounds
+ 2021-07-01 1cd505c353 [dev.typeparams] cmd/compile/internal/types2: "comparable" must not be visible before Go 1.18
+ 2021-07-01 706c580ee1 [dev.typeparams] cmd/compile: simplify autotmpname
+ 2021-07-01 372b312735 [dev.typeparams] cmd/compile: refactor top-level typechecking in unified IR
+ 2021-06-30 ad7e5b219e [dev.typeparams] all: merge master (4711bf3) into dev.typeparams
+ 2021-06-30 8767b87ab5 [dev.typeparams] cmd/compile: functions to create GC shape types/names for a concrete type
+ 2021-06-30 b47cbc2ffe [dev.typeparams] cmd/compile/internal/types2: move newTypeSet function into typeset.go
+ 2021-06-30 f0206e3df2 [dev.typeparams] cmd/compile/internal/types2: move embedding positions from Checker to Interface
+ 2021-06-30 1ff43d1b17 [dev.typeparams] cmd/compile/internal/types2: remove unused *Checker arguments (cleanup)
+ 2021-06-30 4b5fdb0b7a [dev.typeparams] cmd/compile/internal/types2: introduce type set abstraction for interfaces
+ 2021-06-30 f503740ccf [dev.typeparams] cmd/compile: add derived-type dictionaries to unified IR
+ 2021-06-29 6a5f7e8498 [dev.typeparams] cmd/compile: use dictionary entries for more conversion cases
+ 2021-06-29 5fa6bbc669 [dev.typeparams] cmd/compile: clean up instantiation and dictionary naming
+ 2021-06-29 dfa8fd861c [dev.typeparams] cmd/compile: add a field (method) name for function in TestABIUtilsInterfaces
+ 2021-06-28 64e6c75924 [dev.typeparams] cmd/compile: port fix for issue46725 to transform.go
+ 2021-06-28 f99b3fe2ab [dev.typeparams] cmd/compile: move MethodValueWrapper to walk
+ 2021-06-28 a8861b907d [dev.typeparams] cmd/compile: port CL 330838 for -G=3
+ 2021-06-27 20a04f6041 [dev.typeparams] cmd/compile: delay method value wrapper generation until walk
+ 2021-06-27 1b995f91a5 [dev.typeparams] cmd/compile: rename OCALLPART to OMETHVALUE
+ 2021-06-27 d44ed5d144 [dev.typeparams] cmd/compile: add method value wrappers to unified IR
+ 2021-06-26 3ea0fcfe15 [dev.typeparams] cmd/compile: do not skip TestUnifiedCompare in short mode
+ 2021-06-26 27e3b797bb [dev.typeparams] cmd/compile: remove OCALLMETH Fatals in SSA generation
+ 2021-06-26 0cf71f7f92 [dev.typeparams] cmd/compile: rewrite method calls during typecheck
+ 2021-06-26 180c338c68 [dev.typeparams] cmd/compile: restore check for OCALLMETH in walkCall
+ 2021-06-26 942bcc2d4f [dev.typeparams] cmd/compile: fix wrong AST generation in devirtualization
+ 2021-06-26 d417b8cf87 [dev.typeparams] cmd/compile: clarify comment about checking reflect.Method in usemethod
+ 2021-06-25 ed647b16d0 [dev.typeparams] cmd/compile: use Type.LinkString for map keys
+ 2021-06-25 942edc7502 [dev.typeparams] cmd/compile: rename types.Type.{Short,Long}String to {Link,Name}String
+ 2021-06-25 373ca3a846 Merge "[dev.typeparams] all: merge master (37f9a8f) into dev.typeparams" into dev.typeparams
+ 2021-06-25 1b60284c0a [dev.typeparams] cmd/compile: simplify variable capturing in unified IR
+ 2021-06-25 9fe7c38d3d [dev.typeparams] cmd/compile: fix TestUnifiedCompare
+ 2021-06-25 f4198f85d5 [dev.typeparams] cmd/compile: generate wrappers within unified IR
+ 2021-06-25 3f1a517a45 [dev.typeparams] cmd/compile: refactor "need to emit" logic for types
+ 2021-06-25 badb98364b [dev.typeparams] cmd/compile: switch CaptureVars to use syntax.Walk
+ 2021-06-25 ac2de11cfb [dev.typeparams] all: merge master (37f9a8f) into dev.typeparams
+ 2021-06-25 2493c72742 [dev.typeparams] cmd/compile: rewrite method call into method expression during escape analysis
+ 2021-06-25 f190a9280d [dev.typeparams] cmd/compile: simplify usemethod
+ 2021-06-25 aee209c044 [dev.typeparams] cmd/compile: catch another mis-used OCALLMETH in backend
+ 2021-06-24 75ad323773 [dev.typeparams] test: skip -G=3 testing under GOEXPERIMENT=unified
+ 2021-06-24 808dca3b2d [dev.typeparams] cmd/compile: suppress liveness diagnostics of wrappers
+ 2021-06-24 ddb09af1b8 [dev.typeparams] cmd/compile:  add derived types and subdictionaries to dictionaries
+ 2021-06-24 df00abc61b [dev.typeparams] cmd/compile: skip escape analysis diagnostics for wrappers
+ 2021-06-24 b55cc6687d [dev.typeparams] cmd/compile: use r.hasTypeParams in typIdx
+ 2021-06-24 9bdbf73c98 [dev.typeparams] cmd/compile: simplify writer.collectDecls
+ 2021-06-23 ee4fc0c1bc [dev.typeparams] Fix issues related to dictionaries and method calls with embedded fields
+ 2021-06-23 8165256bc2 [dev.typeparams] cmd/compile/internal/syntax: go/ast-style walk API
+ 2021-06-23 a72a499c24 [dev.typeparams] cmd/compile: optimize wrapping of constant arguments
+ 2021-06-23 eb691fdd62 [dev.typeparams] cmd/compile: escape analysis of method expression calls
+ 2021-06-23 0a0e3a3dea [dev.typeparams] cmd/compile: move call logic from order.go to escape
+ 2021-06-23 574ec1c645 [dev.typeparams] cmd/compile: desugar ORECOVER into ORECOVERFP
+ 2021-06-23 9be8303df9 [dev.typeparams] cmd/compile: add ORECOVERFP, OGETCALLER{PC,SP} ops
+ 2021-06-23 70f4ab6565 [dev.typeparams] cmd/compile: remove SetClosureCalled(false) hacks
+ 2021-06-23 107b1fce64 [dev.typeparams] cmd/compile: explain why expandInline needed
+ 2021-06-23 99732b9070 [dev.typeparams] cmd/compile: refactor escape analysis of calls
+ 2021-06-23 1a445dab66 [dev.typeparams] cmd/compile: remove CallExpr.PreserveClosure
+ 2021-06-23 e59a19cceb [dev.typeparams] cmd/compile: simplify walkGoDefer
+ 2021-06-23 493e177639 [dev.typeparams] cmd/compile: allow typecheck of OCHECKNIL
+ 2021-06-23 c4e0c652fb [dev.typeparams] cmd/compile: refactor CaptureName
+ 2021-06-22 62095c66e0 [dev.typeparams] go/types: adjust logic for method expression arg naming
+ 2021-06-22 541612b974 [dev.typeparams] cmd/gofmt: remove typeparams guards
+ 2021-06-22 3e6219c6a9 [dev.typeparams] cmd/compile: split package escape into multiple files
+ 2021-06-22 077100dfcd [dev.typeparams] cmd/compile: remove special escape analysis tags
+ 2021-06-22 859d903b06 [dev.typeparams] cmd/compile: add -d=unifiedquirks for quirks mode
+ 2021-06-22 d626ba27bb [dev.typeparams] all: merge master (16e82be) into dev.typeparams
+ 2021-06-21 844c076359 [dev.typeparams] cmd/compile: simplify import* functions
+ 2021-06-21 e57da8e53c [dev.typeparams] cmd/compile: explain why reader.funcExt need to set n.Defn
+ 2021-06-21 3f7f72a258 [dev.typeparams] cmd/compile: fold reader checking type params logic to separate method
+ 2021-06-20 d24c90a153 [dev.typeparams] cmd/compile: explain how pkgReader.typIdx handles alias cyclic
+ 2021-06-18 3f7a3133da [dev.typeparams] cmd/compile: add "toolstash -cmp"-like test of -d=unified
+ 2021-06-18 e9c01f9804 [dev.typeparams] cmd/compile: add missing copy of Field.Embedded in type substituter.
+ 2021-06-18 6fa0437958 [dev.typeparams] cmd/compile: add documentation for unified IR pipeline
+ 2021-06-18 54fe57bc22 [dev.typeparams] cmd/compile: record writer's stack at export data sync points
+ 2021-06-18 78aa251ace [dev.typeparams] cmd/go: include new internal packages in TestNewReleaseRebuildsStalePackagesInGOPATH
+ 2021-06-18 2a7900762c [dev.typeparams] go/types: report better error for invalid untyped operation
+ 2021-06-18 90096f445e [dev.typeparams] cmd/compile/internal/syntax: convert (most) parser tests to new type set syntax
+ 2021-06-17 feec53c4e5 [dev.typeparams] cmd/compile: skip types2 GC test during bootstrapping
+ 2021-06-17 fb84d213a8 [dev.typeparams] reflect: support big endian architectures in callMethod
+ 2021-06-17 9f50d9a0b4 [dev.typeparams] internal/reflectlite: remove unused ptrSize
+ 2021-06-17 890a8407a9 [dev.typeparams] internal/reflectlite: use goarch.PtrSize instead of the duplicated ptrSize [generated]
+ 2021-06-17 bfd9b63f12 [dev.typeparams] reflect: delete unused ptrSize and PtrSize
+ 2021-06-17 95c104ee61 [dev.typeparams] reflect: use goarch.PtrSize instead of the duplicated ptrSize [generated]
+ 2021-06-17 2e600fb8b3 [dev.typeparams] runtime/internal/sys: remove unused Goarch* and Goos* constants
+ 2021-06-17 46e1e74a86 [dev.typeparams] runtime: replace Goarch* constants with internal/goarch versions [generated]
+ 2021-06-17 7b0e9cae66 [dev.typeparams] runtime: replace Goos* constants with internal/goos versions [generated]
+ 2021-06-17 81a6a4354b [dev.typeparams] internal/goarch,internal/goos: rename Goos and Goarch constants
+ 2021-06-17 33d1b82d16 [dev.typeparams] runtime/internal/sys: replace ArchFamily and constants with goarch
+ 2021-06-17 85b12a8563 [dev.typeparams] runtime,runtime/internal/sys: remove unused BigEndian
+ 2021-06-17 9a93072a07 [dev.typeparams] runtime/internal/sys: replace BigEndian with goarch.BigEndian [generated]
+ 2021-06-17 9c58e399a4 [dev.typeparams] runtime: fix import sort order [generated]
+ 2021-06-17 671954e72e [dev.typeparams] runtime/internal/sys: replace GOOS with goos.GOOS
+ 2021-06-17 5c028751bd [dev.typeparams] runtime/internal/sys: replace uses of GOARCH with goarch.GOARCH
+ 2021-06-17 6d89c90fb1 [dev.typeparams] runtime/internal/sys: remove unused PtrSize
+ 2021-06-17 6d85891b29 [dev.typeparams] runtime: replace uses of runtime/internal/sys.PtrSize with internal/goarch.PtrSize [generated]
+ 2021-06-17 122f5e16d6 [dev.typeparams] internal/goarch,internal/goos: explode runtime/internal/sys into pieces
+ 2021-06-17 804ecc2581 [dev.typeparams] all: add GOEXPERIMENT=unified knob
+ 2021-06-17 b14fd720a8 [dev.typeparams] cmd/compile: make types2 report better error for invalid untyped operation
+ 2021-06-17 8115ae198d [dev.typeparams] go/types: disallow ~T where T is a defined type or an interface
+ 2021-06-17 6237e441bc [dev.typeparams] go/types: disallow type list handling
+ 2021-06-17 6e50f4f111 [dev.typeparams] go/types: convert testdata/check tests to type set syntax
+ 2021-06-17 b6fc4d01a8 [dev.typeparams] go/types: convert testdata/fixedbugs tests to type set sytax
+ 2021-06-17 795f4475e5 [dev.typeparams] go/types: convert testdata/examples tests to type set sytax
+ 2021-06-17 8e14a9cf04 [dev.typeparams] go/types: eliminate need for unpack and asUnion functions
+ 2021-06-17 aecfd5c29e [dev.typeparams] go/types: clean up type set/union intersection
+ 2021-06-17 c7a460526e [dev.typeparams] go/types: replace Sum type with Union type
+ 2021-06-17 e7451f6616 [dev.typeparams] go/types: accept embedded interface elements
+ 2021-06-17 54f854fb41 [dev.typeparams] go/parser: accept embedded type literals
+ 2021-06-17 ab4b3c4b15 [dev.typeparams] go/parser: accept "~" and "|" interface elements
+ 2021-06-17 7c5d7a4caf [dev.typeparams] go/token, go/scanner: add the "~" operator
+ 2021-06-17 ad59efb027 [dev.typeparams] go/ast: remove the typeparams build constraint
+ 2021-06-16 1ba2074440 [dev.typeparams] cmd/compile/internal/types2: support local defined types
+ 2021-06-16 dd95a4e3db [dev.typeparams] cmd/compile: simplify SSA devirtualization
+ 2021-06-16 132ea56d29 [dev.typeparams] cmd/compile: fix crawling of embeddable types
+ 2021-06-16 8f95eaddd3 [dev.typeparams] cmd/compile: fix missing sync implicit types
+ 2021-06-16 a4121d7dd6 [dev.typeparams] Revert "[dev.typeparams] runtime: make deferproc take a func() argument"
+ 2021-06-16 4d6f9d60cf [dev.typeparams] all: merge master (785a8f6) into dev.typeparams
+ 2021-06-16 ee0420d3b5 [dev.typeparams] cmd/compile: factor out implicit/explicit handling
+ 2021-06-15 cf1ae5fc36 [dev.typeparams] cmd/compile: add -d=unified flag to enable unified IR
+ 2021-06-15 79cd1687e6 [dev.typeparams] cmd/compile: unified IR construction
+ 2021-06-14 ea438bda85 [dev.typeparams] all: merge master (fdab5be) into dev.typeparams
+ 2021-06-13 8eeaf961c5 [dev.typeparams] cmd/compile: move //go:embed -lang check to noder
+ 2021-06-12 f1b1c2f67f [dev.typeparams] cmd/compile: simplify NewClosureFunc
+ 2021-06-12 db7c868307 [dev.typeparams] test: add string quoting support to test/run.go
+ 2021-06-12 0132b91127 [dev.typeparams] cmd/compile: refactor closure construction
+ 2021-06-12 8f00eb0099 [dev.typeparams] cmd/compile: avoid ir.DeepCopy in noder.constDecl
+ 2021-06-12 2954f11ead [dev.typeparams] cmd/compile: scaffolding for export data experiments
+ 2021-06-11 c93d5d1a52 [dev.typeparams] all: always enable regabig on AMD64
+ 2021-06-11 2fe324858b [dev.typeparams] internal/buildcfg: always enable regabiwrappers on AMD64
+ 2021-06-11 e0e9fb8aff [dev.typeparams] runtime: simplify defer record allocation
+ 2021-06-11 4468e1cfb9 [dev.typeparams] runtime: allow newproc split stack
+ 2021-06-11 ef6c5be160 [dev.typeparams] cmd/compile: fix wrapper generation for imported generics
+ 2021-06-11 4a735ce068 [dev.typeparams] cmd/compile: add "check" field to noder.gcimports
+ 2021-06-11 61888d47c4 [dev.typeparams] cmd/compile: allow embedding Type.Vargen into Sym.Name
+ 2021-06-11 62e32dd386 [dev.typeparams] cmd/compile: extract SetBaseTypeIndex function
+ 2021-06-11 18788245ea [dev.typeparams] cmd/compile: add ir.TypeNodeAt
+ 2021-06-09 b20747334a [dev.typeparams] cmd/compile, runtime: simplify opendefer metadata
+ 2021-06-09 c0a86c10f1 [dev.typeparams] cmd/compile: simplify openDeferSave
+ 2021-06-08 74b0b2772a [dev.typeparams] cmd/compile, runtime: remove _defer.siz field
+ 2021-06-08 b80a4c56f0 [dev.typeparams] runtime: allow deferproc split stack
+ 2021-06-08 83da32749c [dev.typeparams] runtime: make deferproc take a func() argument
+ 2021-06-08 8e5304f729 [dev.typeparams] cmd/compile, runtime: remove the siz argument of newproc/deferproc
+ 2021-06-08 00d01b5786 [dev.typeparams] runtime: remove tracebackdefers
+ 2021-06-08 12b37b713f [dev.typeparams] runtime: remove variadic defer/go calls
+ 2021-06-08 5b350505da [dev.typeparams] cmd/compile: remove variadic defer calls
+ 2021-06-08 a9de78ac88 [dev.typeparams] cmd/compile, runtime: always enable defer/go wrapping
+ 2021-06-08 e58bddde70 [dev.typeparams] internal/goexperiment: regenerate generated files
+ 2021-06-08 0c40cb4a07 [dev.typeparams] cmd/compile/internal/types2: provide valid signature in errors involving method expressions
+ 2021-06-07 74d46381b2 [dev.typeparams] cmd/compile: do extra markObjects during iexport to deal with generics
+ 2021-06-07 ccfb0ce8df [dev.typeparams] cmd/compile: convert generic values to interface type using dictionary
+ 2021-06-07 cf4b6dc48e [dev.typeparams] cmd/compile: allow conversions from type parameter to interface
+ 2021-06-07 bcb3927cb5 [dev.typeparams] cmd/compile: introduce IsTypeParam() helper
+ 2021-06-07 f0c97219a3 Merge "[dev.typeparams] all: merge master (8212707) into dev.typeparams" into dev.typeparams
+ 2021-06-07 201d55e637 [dev.typeparams] cmd/compile: create .dict Param in the package of the instantiated function
+ 2021-06-07 0e39cdc0e9 [dev.typeparams] all: merge master (8212707) into dev.typeparams
+ 2021-06-07 7c8a5be2d6 [dev.typeparams] go/types: factor out constraint satisfaction check
+ 2021-06-07 7497e57a39 [dev.typeparams] go/types: simplify Interface accessors
+ 2021-06-07 2f26adc232 [dev.typeparams] go/types: re-use existing code for Interface.Complete
+ 2021-06-07 1395952075 [dev.typeparams] go/types: add Named.SetTParams and Named.Orig methods
+ 2021-06-07 991dca0112 [dev.typeparams] go/types: move signature checking into separate file
+ 2021-06-06 c23294d6b3 [dev.typeparams] cmd/compile/internal/types2: return Universe for ((*Package)(nil)).Scope()
+ 2021-06-05 a5be3eaee2 [dev.typeparams] cmd/compile: refactor export writing
+ 2021-06-05 4c072c94dc [dev.typeparams] cmd/compile: refactor import reading
+ 2021-06-05 4e001a8d9e [dev.typeparams] runtime/race: make test compatible with types2
+ 2021-06-05 246a5570be [dev.typeparams] cmd/compile: rename (types2.Inferred.)Targs to TArgs
+ 2021-06-05 692399fbaa [dev.typeparams] cmd/compile/internal/syntax: not all index expressions can be instantiated types
+ 2021-06-04 a94e4f5a85 [dev.typeparams] cmd/compile: point StructKeyExpr at the types.Field
+ 2021-06-04 bad388744b [dev.typeparams] cmd/compile: handle dictionaries for top-level instantiations
+ 2021-06-04 de61465156 [dev.typeparams] cmd/compile: allow inlining in instantiated functions
+ 2021-06-04 4cf7f5f694 [dev.typeparams] test: test regabidefers in live.go
+ 2021-06-04 3298c749ac [dev.typeparams] runtime: undo go'd closure argument workaround
+ 2021-06-04 46beeed0ac [dev.typeparams] cmd/compile: allow go'd closure to escape when compiling runtime
+ 2021-06-04 8e6dfe1b31 [dev.typeparams] cmd/compile: export/import of recursive generic types.
+ 2021-06-04 93a886a165 [dev.typeparams] go/types: move struct checking into separate file
+ 2021-06-04 ffc74ad5d3 [dev.typeparams] go/types: move interface checking into separate file
+ 2021-06-04 090a17c998 [dev.typeparams] go/types: use correct type parameter list in missingMethod
+ 2021-06-04 62c40878e4 [dev.typeparams] go/types: better recv Var for method expressions
+ 2021-06-04 e32fab145b [dev.typeparams] go/types: fix panic with nil package name
+ 2021-06-04 cd6e9df446 [dev.typeparams] go/types: print "incomplete" for interfaces in debug mode only
+ 2021-06-04 655246f99a [dev.typeparams] go/types: make TestManual work for directories
+ 2021-06-04 d7592ab424 [dev.typeparams] go/types: implement types.Instantiate
+ 2021-06-04 410fa4c75b [dev.typeparams] go/types: rename Inferred.Targs to TArgs
+ 2021-06-04 298149a915 [dev.typeparams] go/types: use Checker-provided type parameter IDs when possible
+ 2021-06-04 2175e2f573 [dev.typeparams] cmd/compile: lazy import resolution for types2
+ 2021-06-03 4d2b528795 [dev.typeparams] internal/buildcfg: turn on register ABI by default on ARM64
+ 2021-06-03 5f034f9b46 [dev.typeparams] internal/buildcfg: turn on regabireflect by default on ARM64
+ 2021-06-03 026480d06b [dev.typeparams] cmd/compile: allow nil Syms in Sym.Less
+ 2021-06-03 a2d6a2caeb [dev.typeparams] internal/buildcfg: turn on regabiwrappers by default on ARM64
+ 2021-06-03 55b4310acd [dev.typeparams] runtime: crash the GC at clobberdead pointer on ARM64
+ 2021-06-03 6b1e4430bb [dev.typeparams] cmd/compile: implement clobberdead mode on ARM64
+ 2021-06-03 1c947e4f31 [dev.typeparams] cmd/compile: properly copy tilde value for unions in types2-to-types1 conversion
+ 2021-06-03 e9ba0750b6 [dev.typeparams] reflect: guard abi_test.go with regabiargs build tag
+ 2021-06-03 28bd325e41 [dev.typeparams] runtime: use ABIInternal callbackWrap in callbackasm1 on ARM64
+ 2021-06-03 3de4986852 [dev.typeparams] runtime: call cgocallbackg indirectly on ARM64
+ 2021-06-03 5a40fab19f [dev.typeparams] runtime, internal/bytealg: port performance-critical functions to register ABI on ARM64
+ 2021-06-03 370ff5ff96 [dev.typeparams] test: update all the typeparam tests to use the new union/tilde syntax
+ 2021-06-03 5a008a92e8 [dev.typeparams] internal/bytealg: call memeqbody directly in memequal_varlen on ARM64
+ 2021-06-03 165d39a1d4 [dev.typeparams] test: adjust codegen test for register ABI on ARM64
+ 2021-06-03 b5f37faf3b [dev.typeparams] cmd/internal/goobj: add duffzero/duffcopy to builtin list
+ 2021-06-03 9c054f4137 [dev.typeparams] cmd/link: take function address in assembly in TestFuncAlign
+ 2021-06-03 95c618e99a [dev.typeparams] cmd/compile/internal/types2: add Config.AllowTypeLists to control type list handling
+ 2021-06-03 10d6b36ca3 [dev.typeparams] cmd/compile/internal/types2: disallow ~T where T is a defined type or an interface
+ 2021-06-02 8cdce85bdf [dev.typeparams] cmd/compile/internal/types2: convert testdata/check tests to type set sytax
+ 2021-06-02 c790964ae4 [dev.typeparams] cmd/compile/internal/types2: convert testdata/fixedbugs tests to type set sytax
+ 2021-06-02 9a99e728fe [dev.typeparams] cmd/compile/internal/types2: convert testdata/examples tests to type set sytax
+ 2021-06-02 d36b7d7bdd [dev.typeparams] cmd/compile/internal/importer: review of gcimporter_test.go
+ 2021-06-02 3c1d502a19 [dev.typeparams] cmd/compile/internal/types2: eliminate need for unpack and asUnion functions
+ 2021-06-02 848b58e473 [dev.typeparams] cmd/compile/internal/types2: clean up type set/union intersection
+ 2021-06-02 97cb0113a3 [dev.typeparams] cmd/compile: fix export/import of constants with typeparam type
+ 2021-06-02 6b1cdeaef3 [dev.typeparams] cmd/link: include "go build" output in test logs
+ 2021-06-02 c7b9811581 [dev.typeparams] cmd/compile/internal/importer: review of gcimporter.go
+ 2021-06-02 498a48327f [dev.typeparams] cmd/compile: sort iface fields before expansion
+ 2021-06-02 cc52fdd1f3 [dev.typeparams] cmd/compile/internal/importer: review of exportdata.go
+ 2021-06-02 8c5c5a9e69 [dev.typeparams] cmd/compile/internal/importer: review of support.go
+ 2021-06-02 589e32dbdf [dev.typeparams] cmd/compile/internal/types2: replace Sum type with Union type
+ 2021-06-02 7b876def6c [dev.typeparams] cmd/compile: add dictionary argument to generic functions
+ 2021-06-02 aa9cfdf775 [dev.typeparams] runtime: update ABIInternal assembly with register ABI on ARM64
+ 2021-06-02 0c123cdf8b [dev.typeparams] reflect: implement register ABI for MakeFunc etc. on ARM64
+ 2021-06-02 2e4b79949f [dev.typeparams] runtime: implement register ABI for reflectcall on ARM64
+ 2021-06-02 dc2cb529a8 [dev.typeparams] runtime: mark assembly functions called directly from compiler ABIInternal
+ 2021-06-02 d2b435117d test: fix error check messages for 2 types2 tests
+ 2021-06-02 b1f48e8add [dev.typeparams] cmd/compile: fix formatting
+ 2021-06-01 58ad36b359 [dev.typeparams] internal/buildcfg: allow regabi GOEXPERIMENTs on ARM64
+ 2021-06-01 c3639918d1 [dev.typeparams] internal/abi: define ARM64 register ABI constants
+ 2021-06-01 6633dc8b09 [dev.typeparams] reflect: call ABI0 spill/unspill functions on AMD64
+ 2021-06-01 e4003463ff [dev.typeparams] cmd/compile: match register-ABI version of memmove call on ARM64
+ 2021-06-01 8e7abefdaa [dev.typeparams] cmd/compile: update ARM64 CALL* ops for register ABI
+ 2021-06-01 c9d1a2bdd2 [dev.typeparams] all: merge master (2725522) into dev.typeparams
+ 2021-06-01 2580e9a160 [dev.typeparams] cmd/compile: refactor noder/irgen helpers
+ 2021-06-01 4b10e4c547 [dev.typeparams] cmd/compile: handle ONONAME in subster.node
+ 2021-05-31 f32f4f58d9 [dev.typeparams] cmd/compile: simplify formatting of defined types
+ 2021-05-27 22f5ece3b1 [dev.typeparams] cmd/compile/internal/noder: refactor irgen import handling
+ 2021-05-27 417955d151 [dev.typeparams] cmd/compile/internal/inline: refactor mkinlcall
+ 2021-05-27 88583a2a66 [dev.typeparams] test: trim list of expected -G=3 failures
+ 2021-05-27 ea522bc546 [dev.typeparams] cmd/compile: add and use ir.RawOrigExpr
+ 2021-05-27 de5d1aca5e [dev.typeparams] cmd/compile: tweaks to match types2
+ 2021-05-27 c2c1b53b39 [dev.typeparams] cmd/compile: use old export format if not compiling with generics
+ 2021-05-27 8c99e5db43 [dev.typeparams] cmd/compile/internal/types2: ensure that Named.check is nilled out once it is expanded
+ 2021-05-27 963f33b03b [dev.typeparams] cmd/compile: enable register args on ARM64
+ 2021-05-27 06df0ee7fa [dev.typeparams] cmd/compile: add arg/result register load/spill code on ARM64
+ 2021-05-26 1ec056244e [dev.typeparams] cmd/compile: inlining tweaks for toolstash
+ 2021-05-26 6da1661371 [dev.typeparams] cmd/compile: simplify inlining variadic calls
+ 2021-05-26 e99e9a6e01 [dev.typeparams] cmd/compile: simplify ~r/~b naming
+ 2021-05-26 4c68edd1fe [dev.typeparams] cmd/compile: add morestack arg spilling code on ARM64
+ 2021-05-26 a4b2a04bc5 [dev.typeparams] cmd/internal/obj/arm64: use ABI-compatible registers in function prologue
+ 2021-05-26 4bb927f82e [dev.typeparams] cmd/compile: define ARM64 parameter registers
+ 2021-05-26 cf23daeda3 [dev.typeparams] cmd/compile: do not schedule in-register args late, even for block control
+ 2021-05-26 4ed6317e73 [dev.typeparams] cmd/compile: always generate (*T).M wrappers for instantiated methods
+ 2021-05-26 b7f7d1cd7b [dev.typeparams] cmd/compile:  get type aliases working with generic types
+ 2021-05-26 95748d1b74 [dev.typeparams] cmd/compile: avoid some redundant type construction
+ 2021-05-26 fd54ae8b0c [dev.typeparams] cmd/compile: adding union support in types1
+ 2021-05-25 6c9e1c58bc [dev.typeparams] test: fix and update run.go's generics testing
+ 2021-05-25 5c1e119d48 [dev.typeparams] all: merge master (f22ec51) into dev.typeparams
+ 2021-05-24 155dc0e541 [dev.typeparams] cmd/compile/internal/types2: factor out constraint satisfaction check
+ 2021-05-24 5770d7a637 [dev.typeparams] cmd/compile/internal/types2: accept embedded interface elements
+ 2021-05-24 cc7ceea585 [dev.typeparams] cmd/compile/internal/types2: simplify Interface accessors
+ 2021-05-24 1608577e05 [dev.typeparams] cmd/compile/internal/types2: re-use existing code for Interface.Complete
+ 2021-05-24 d48f6d9f6f [dev.typeparams] Don't check typecheck(3) on transform, so no need to export/import it
+ 2021-05-24 4c50721cda [dev.typeparams] cmd/compile:  Fix handling of Name nodes during stenciling
+ 2021-05-24 dcaf785add [dev.typeparams] internal/buildcfg: enable defer/go wrapping everywhere
+ 2021-05-24 f642742678 [dev.typeparams] reflect: use internal/abi.FuncPCABI0 to take address of assembly functions
+ 2021-05-24 e0844acfc8 [dev.typeparams] runtime/pprof: replace funcPC with internal/abi.FuncPCABIInternal
+ 2021-05-24 ae26b45113 [dev.typeparams] cmd/compile/abi-internal.md: specify ARM64 register-based ABI
+ 2021-05-24 b18b2d372e [dev.typeparams] cmd/compile:  fix case where we were copying a raw Node
+ 2021-05-21 5b1120fac7 [dev.typeparams] cmd/compile: fix handling of Nname field in (*subster).tstruct.
+ 2021-05-21 8d2b4cb6cc [dev.typeparams] cmd/compile: fixing import of comm clauses/closures in generic functions
+ 2021-05-21 626e89c261 [dev.typeparams] runtime: replace funcPC with internal/abi.FuncPCABIInternal
+ 2021-05-21 6a81e063dd [dev.typeparams] runtime: fix misuse of funcPC
+ 2021-05-21 7d928460a1 [dev.typeparams] runtime: use internal/abi.FuncPCABI0 to reference ABI0 assembly symbols
+ 2021-05-21 0e0a1f94f3 [dev.typeparams] runtime: use ABI0 handler addresses on Windows/ARM64
+ 2021-05-21 fb42fb705d [dev.typeparams] runtime: use internal/abi.FuncPCABI0 to take address of assembly functions
+ 2021-05-21 21db1d193c [dev.typeparams] runtime: fix newproc arg size on ARM
+ 2021-05-21 b1a398cf0f [dev.typeparams] cmd/compile:  add import/export of calls to builtin functions
+ 2021-05-21 ccbfbb1c33 [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions)
+ 2021-05-21 243076da64 [dev.typeparams] cmd/compile/internal/types2: move signature checking into separate file
+ 2021-05-21 cfe0250497 [dev.typeparams] cmd/compile/internal/types2: move struct checking into separate file
+ 2021-05-21 211244e172 [dev.typeparams] cmd/compile/internal/types2: move interface checking into separate file
+ 2021-05-21 7b3ee6102d [dev.typeparams] cmd/compile: move to new export version, keep reading previous version
+ 2021-05-21 15ad61aff5 [dev.typeparams] cmd/compile: get export/import of generic types & functions working
+ 2021-05-20 468efd5e2f [dev.typeparams] cmd/compile:  change method instantiations back to being functions
+ 2021-05-20 382c5dd5f7 [dev.typeparams] internal/buildcfg: turn on register ABI on all AMD64 platforms
+ 2021-05-20 240d6d00ca [dev.typeparams] cmd/link: mangle symbol ABI name on Plan 9
+ 2021-05-20 ed2001232a [dev.typeparams] runtime: use internal/abi.FuncPCABI0 for sigtramp PC on Plan 9
+ 2021-05-20 02117775d1 [dev.typeparams] cmd/compile, runtime: do not zero X15 on Plan 9
+ 2021-05-20 a5cd89b8c3 [dev.typeparams] runtime: use internal/abi.FuncPCABI0 and cgo_unsafe_args for Solaris syscall wrappers
+ 2021-05-19 6bdfff112f [dev.typeparams] cmd/compile/internal/types2: use correct type parameter list in missingMethod
+ 2021-05-19 eff66248ea [dev.typeparams] cmd/compile/internal/types2: implement package height
+ 2021-05-19 3f6f12972b [dev.typeparams] runtime: use internal/abi.FuncPCABI0 for sigtramp PC on DragonflyBSD
+ 2021-05-19 b69347d24a [dev.typeparams] cmd/compile: simplify tparam's type
+ 2021-05-19 701bd60646 [dev.typeparams] cmd/compile: simplify targ's type
+ 2021-05-19 c2966ae272 [dev.typeparams] cmd/compile/internal/ir: more position details in dump
+ 2021-05-19 fb79f6955e [dev.typeparams] cmd/compile/internal/importer: implement position reading
+ 2021-05-19 c92ae885d9 [dev.typeparams] cmd/compile/internal/types2: better recv Var for method expressions
+ 2021-05-19 90b6e72605 [dev.typeparams] cmd/compile/internal/types2: tweak anonymous parameter position
+ 2021-05-19 fc9e64cc98 [dev.typeparams] cmd/compile/internal/types2: fix types2 panic
+ 2021-05-19 c81562d99f [dev.typeparams] test: update regress tests for types2
+ 2021-05-19 81b22480cf [dev.typeparams] cmd/compile/internal/syntax: accept embedded type literals
+ 2021-05-18 f3fc8b5779 [dev.typeparams] cmd/compile: simplify type alias handling for export
+ 2021-05-18 140cd7c1d3 [dev.typeparams] runtime: use internal/abi.FuncPCABI0 for syscall wrappers on OpenBSD
+ 2021-05-18 bbc0059b03 [dev.typeparams] test: run more tests with -G=3
+ 2021-05-18 f208f1ac99 [dev.typeparams] cmd/compile/internal/ir: more useful Fatalfs
+ 2021-05-18 c7dd3e305d [dev.typeparams] all: merge master (690a8c3) into dev.typeparams
+ 2021-05-18 077f03f4d8 [dev.typeparams] runtime: use internal/abi.FuncPCABI0 for sigtramp PC on FreeBSD
+ 2021-05-17 f39200b037 [dev.typeparams] go/constant: implement Kind.String
+ 2021-05-14 0d1e293b23 [dev.typeparams] cmd/compile/internal/types2: print "incomplete" for interfaces in debug mode only
+ 2021-05-14 03ed590e51 [dev.typeparams] cmd/compile/internal/types2: use Checker-provided type parameter IDs when possible
+ 2021-05-13 c3fa51c9a2 cmd/compile: changed representation of typeparam bound in types1
+ 2021-05-13 9daf3cca82 [dev.typeparams] cmd/compile:  keep instantiated method as a method, rather than converting to function
+ 2021-05-12 04f65d394c [dev.typeparams] cmd/compile:  fix use of method values with stenciled methods
+ 2021-05-11 d2b3efcb90 [dev.typeparams] all: merge master (9b84814) into dev.typeparams

Updates #47351.

Change-Id: Ia8a78ec0d91f11adb533a4da7047b4c05c2f0ea0

2 years agoMerge "[dev.typeparams] all: merge master (46fd547) into dev.typeparams" into dev...
Gerrit Code Review [Thu, 12 Aug 2021 20:22:27 +0000 (20:22 +0000)]
Merge "[dev.typeparams] all: merge master (46fd547) into dev.typeparams" into dev.typeparams

2 years ago[dev.typeparams] all: merge master (46fd547) into dev.typeparams
Matthew Dempsky [Thu, 12 Aug 2021 19:18:51 +0000 (12:18 -0700)]
[dev.typeparams] all: merge master (46fd547) into dev.typeparams

Conflicts:

- src/go/types/check_test.go

  CL 324730 on dev.typeparams changed the directory paths in TestCheck,
  TestExamples, and TestFixedbugs and renamed checkFiles to testFiles;
  whereas CL 337529 on master added a new test case just above them and
  that used checkFiles.

Merge List:

+ 2021-08-12 46fd547d89 internal/goversion: update Version to 1.18
+ 2021-08-12 5805efc78e doc/go1.17: remove draft notice
+ 2021-08-12 39634e7dae CONTRIBUTORS: update for the Go 1.17 release
+ 2021-08-12 095bb790e1 os/exec: re-enable LookPathTest/16
+ 2021-08-11 dea23e9ca8 src/make.*: make --no-clean flag a no-op that prints a warning
+ 2021-08-11 d4c0ed26ac doc/go1.17: linker passes -I to extld as -Wl,--dynamic-linker
+ 2021-08-10 1f9c9d8530 doc: use "high address/low address" instead of "top/bottom"
+ 2021-08-09 f1dce319ff cmd/go: with -mod=vendor, don't panic if there are duplicate requirements
+ 2021-08-09 7aeaad5c86 runtime/cgo: when using msan explicitly unpoison cgoCallers
+ 2021-08-08 507cc341ec doc: add example for conversion from slice expressions to array ptr
+ 2021-08-07 891547e2d4 doc/go1.17: fix a typo introduced in CL 335135
+ 2021-08-06 8eaf4d16bc make.bash: do not overwrite GO_LDSO if already set
+ 2021-08-06 63b968f4f8 doc/go1.17: clarify Modules changes
+ 2021-08-06 70546f6404 runtime: allow arm64 SEH to be called if illegal instruction
+ 2021-08-05 fd45e267c2 runtime: warn that KeepAlive is not an unsafe.Pointer workaround
+ 2021-08-04 6e738868a7 net/http: speed up and deflake TestCancelRequestWhenSharingConnection
+ 2021-08-02 8a7ee4c51e io/fs: don't use absolute path in DirEntry.Name doc
+ 2021-07-31 b8ca6e59ed all: gofmt
+ 2021-07-30 b7a85e0003 net/http/httputil: close incoming ReverseProxy request body
+ 2021-07-29 70fd4e47d7 runtime: avoid possible preemption when returning from Go to C
+ 2021-07-28 9eee0ed439 cmd/go: fix go.mod file name printed in error messages for replacements
+ 2021-07-28 b39e0f461c runtime: don't crash on nil pointers in checkptrAlignment
+ 2021-07-27 7cd10c1149 cmd/go: use .mod instead of .zip to determine if version has go.mod file
+ 2021-07-27 c8cf0f74e4 cmd/go: add missing flag in UsageLine
+ 2021-07-27 7ba8e796c9 testing: clarify T.Name returns a distinct name of the running test
+ 2021-07-27 33ff155970 go/types: preserve untyped constants on the RHS of a shift expression
+ 2021-07-26 840e583ff3 runtime: correct variable name in comment
+ 2021-07-26 bfbb288574 runtime: remove adjustTimers counter
+ 2021-07-26 9c81fd53b3 cmd/vet: add missing copyright header

Change-Id: Ia80604d24c6f4205265683024e3100769cf32065

2 years ago[dev.typeparams] cmd/compile: remove some shape checks in type substituter, other...
Dan Scales [Thu, 12 Aug 2021 16:58:54 +0000 (09:58 -0700)]
[dev.typeparams] cmd/compile:  remove some shape checks in type substituter, other cleanups

The type substituter (typecheck.Typ()) was temporarily substituting from
shapes back to concrete types, but doesn't need to anymore. So, remove
two shape checks, so the type substituter is now only for substituting
type params again.

Several other cleanups:

 - renamed makeGenericName() to makeInstName1(), since that function is
   a helper to MakeInstName() and MakeDictName() that definitely makes
   instantiated names, not generic names.

 - removed the logic in makeInstName1() that adds the ".inst." prefix
   for concrete type args. We are only specifying concrete type args (as
   opposed to shape args) when we are calling from MakeDictName, and
   then we immediately strip of the .inst prefix anyway.

 - Added a comment on types.Identical that a shape type is considered
   identicall to another type if their underlying types are the same, or
   they are both pointers.

Change-Id: I3e0206dbd403897797ae7bec3c527ae16b0b930a
Reviewed-on: https://go-review.googlesource.com/c/go/+/341729
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>

2 years agointernal/goversion: update Version to 1.18
Carlos Amedee [Wed, 11 Aug 2021 21:19:21 +0000 (17:19 -0400)]
internal/goversion: update Version to 1.18

This is the start of the Go 1.18 development cycle, so update the
Version value accordingly. It represents the Go 1.x version that
will soon open up for development (and eventually become released).

Updates #40705
Updates #47351

Change-Id: Icfb99e28529a3c9fb7394e114a34586f613dfcbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/341590
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2 years agodoc/go1.17: remove draft notice
Dmitri Shuralyov [Thu, 12 Aug 2021 16:12:56 +0000 (12:12 -0400)]
doc/go1.17: remove draft notice

Fixes #44513.

Change-Id: I82c44a681b1fa67df123af86ee02a980b13acdc8
Reviewed-on: https://go-review.googlesource.com/c/go/+/341673
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agoCONTRIBUTORS: update for the Go 1.17 release
Carlos Amedee [Thu, 12 Aug 2021 16:10:47 +0000 (12:10 -0400)]
CONTRIBUTORS: update for the Go 1.17 release

This update was created using the updatecontrib command:

go get golang.org/x/build/cmd/updatecontrib
cd gotip
GO111MODULE=off updatecontrib

With manual changes based on publicly available information
to canonicalize letter case and formatting for a few names.

For #12042.

Change-Id: I96718c0fe438cd97b62499a027252748a1fa0779
Reviewed-on: https://go-review.googlesource.com/c/go/+/341709
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agoos/exec: re-enable LookPathTest/16
Dmitri Shuralyov [Thu, 12 Aug 2021 02:02:59 +0000 (22:02 -0400)]
os/exec: re-enable LookPathTest/16

This failure was confirmed to be due to a bug in prerelease versions
of Windows, and has been fixed by now. Remove the skip for this test.

Fixes #44379.

Change-Id: Idfb92ffd6b9d416d4c78ef3800a5ffdda06c6562
Reviewed-on: https://go-review.googlesource.com/c/go/+/341455
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years ago[dev.typeparams] cmd/compile: don't print out node pointer in ir.Dump
zikaeroh [Tue, 3 Aug 2021 20:41:49 +0000 (13:41 -0700)]
[dev.typeparams] cmd/compile: don't print out node pointer in ir.Dump

This has been a part of the node dumping since the very beginning, but
this makes diffing -W output pretty annoying. -d=dumpptrs already prints
these out if needed.

Change-Id: I9524a7f7b44ec780ae42a8a2a9588f11ab3950f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/340253
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agosrc/make.*: make --no-clean flag a no-op that prints a warning
Matthew Dempsky [Wed, 11 Aug 2021 19:40:12 +0000 (12:40 -0700)]
src/make.*: make --no-clean flag a no-op that prints a warning

This flag is undocumented and is no longer useful. Users who want to
install additional toolchains without cleaning the installed packages
should just use `go install`.

This CL changes cmd/dist to print a warning that --no-clean is
deprecated and to advise users to use `go install std cmd` instead,
and then otherwise ignores it:

```
$ ./make.bash --no-clean
Building Go cmd/dist using $GOROOT_BOOTSTRAP. (devel +b7a85e0003 linux/amd64)
warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead
Building Go toolchain1 using $GOROOT_BOOTSTRAP.
```

Fixes #47204.

Change-Id: I275031832098401a49e491e324e8de3427973630
Reviewed-on: https://go-review.googlesource.com/c/go/+/341392
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2 years ago[dev.typeparams] cmd/compile: change export version to 1.17 for testing
Dan Scales [Tue, 10 Aug 2021 19:49:21 +0000 (12:49 -0700)]
[dev.typeparams] cmd/compile: change export version to 1.17 for testing

This is a temporary change. We will revert this back before the 1.18
release. We make this change now to simplify testing, since a lot of
tools will break on the new export version.

Updates #47654.

Change-Id: I0650fa753bb11229c71254d779dd61b5c1af9cdf
Reviewed-on: https://go-review.googlesource.com/c/go/+/341211
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2 years ago[dev.typeparams] runtime, internal/bytealg: remove regabi fallback code on AMD64
Cherry Mui [Mon, 2 Aug 2021 22:28:40 +0000 (18:28 -0400)]
[dev.typeparams] runtime, internal/bytealg: remove regabi fallback code on AMD64

As we commit to always enabling register ABI on AMD64, remove the
fallback code.

Change-Id: I30556858ba4bac367495fa94f6a8682ecd771196
Reviewed-on: https://go-review.googlesource.com/c/go/+/341152
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: Austin Clements <austin@google.com>
2 years ago[dev.typeparams] internal/buildcfg: always enable regabi on AMD64
Cherry Mui [Mon, 2 Aug 2021 16:18:19 +0000 (12:18 -0400)]
[dev.typeparams] internal/buildcfg: always enable regabi on AMD64

In Go 1.17 we added register ABI on AMD64 on Linux/macOS/Windows
as a GOEXPERIMENT, on by default. In Go 1.18, we commit to always
enabling register ABI on AMD64.

Now "go build" for AMD64 always have goexperiment.regabi* tags
set. However, at bootstrapping cmd/dist does not set the tags
when building go_bootstrap. For this to work, unfortunately, we
need to hard-code AMD64 to use register ABI in runtime code.

Change-Id: I0b31e678e186b9cdeeb8502cd9e38ed0d7e72d4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/341151
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: Austin Clements <austin@google.com>
2 years agodoc/go1.17: linker passes -I to extld as -Wl,--dynamic-linker
Ian Lance Taylor [Wed, 11 Aug 2021 16:10:55 +0000 (09:10 -0700)]
doc/go1.17: linker passes -I to extld as -Wl,--dynamic-linker

For #22446

Change-Id: I71a30761a28e81c50b7089d5a28be99c736c2dc8
Reviewed-on: https://go-review.googlesource.com/c/go/+/341332
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

2 years ago[dev.typeparams] cmd/compile/internal/types2: remove unused TypeParam.Bound method
Robert Griesemer [Mon, 9 Aug 2021 22:13:22 +0000 (15:13 -0700)]
[dev.typeparams] cmd/compile/internal/types2: remove unused TypeParam.Bound method

Use TypeParam.Constraint instead.

Change-Id: Iebd77d304f2b7238baa231fb9869c964f66ea355
Reviewed-on: https://go-review.googlesource.com/c/go/+/340990
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: remove Named.SetTArgs
Rob Findley [Mon, 9 Aug 2021 17:39:32 +0000 (13:39 -0400)]
[dev.typeparams] cmd/compile/internal/types2: remove Named.SetTArgs

Calling SetTArgs without substituting can leave the type in incoherent
state, so we should avoid exposing this API unless necessary. Since it
is currently not used by the importer(s), it is probably not necessary
to expose for 1.18, so remove it.

Change-Id: I06bd7b5bbfacd3c65e2e66a9d5980f20cd1c10c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/341290
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>
2 years ago[dev.typeparams] go/types: don't expose the TypeSet API for 1.18
Rob Findley [Wed, 4 Aug 2021 14:45:16 +0000 (10:45 -0400)]
[dev.typeparams] go/types: don't expose the TypeSet API for 1.18

The TypeSet API is very new and probably not necessary to expose outside
of go/types, at least for 1.18. Users can check whether a type is
contained within a type set via Implements, and can access the
representation of the type set via the embedded Unions.

Change-Id: Icc7355285785bee5aa7a8fe74052bcb0fedcd0a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/341289
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>
2 years ago[dev.typeparams] cmd/compile: keep export format unchanged if no type params are...
Dan Scales [Mon, 9 Aug 2021 23:00:29 +0000 (16:00 -0700)]
[dev.typeparams] cmd/compile: keep export format unchanged if no type params are exported

Added new export tags 'G' and 'U' to export parameterized
functions/methods and parameterized types respectively. This has the
advantage that the Go 1.18 format remains backward-compatible with the
Go 1.17 format if no type parameters are exported.

Change-Id: I9dba8faaa65609eb3f9c693bd0c79daee98bd865
Reviewed-on: https://go-review.googlesource.com/c/go/+/340989
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2 years ago[dev.typeparams] internal/goexperiment: update comment for RegabiArgs requirements
Cherry Mui [Mon, 2 Aug 2021 16:17:13 +0000 (12:17 -0400)]
[dev.typeparams] internal/goexperiment: update comment for RegabiArgs requirements

RegabiG and regabiDefer have been always enabled and removed from
experiments. Update the comment.

Change-Id: Ieaf4b4f0a7e0e9d6733a18932ca457be4f150d08
Reviewed-on: https://go-review.googlesource.com/c/go/+/341150
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years ago[dev.typeparams] cmd: update vendored golang.org/x/tools to 337cebd2c151
Cherry Mui [Tue, 10 Aug 2021 15:02:34 +0000 (11:02 -0400)]
[dev.typeparams] cmd: update vendored golang.org/x/tools to 337cebd2c151

Update vendored golang.org/x/tools repo to pick up CL 339250 for
assembly function check for register ABI.

This is done with

cd GOROOT/cmd
go get golang.org/x/tools@master
go mod tidy
go mod vendor

Update cmd/vet tests as the error ouput changes in CL 301949.
The error message now includes full package-qualified name.

Change-Id: I52dc7223aee9e011214254488bacf02dc5b4c2ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/341149
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2 years ago[dev.typeparams] cmd/compile: handle interface type parameters in type switches
Keith Randall [Mon, 9 Aug 2021 18:40:46 +0000 (11:40 -0700)]
[dev.typeparams] cmd/compile: handle interface type parameters in type switches

Change-Id: I9bba21a64d7e9f42395b6fcdf8aa3ca01cf131dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/340912
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: parameterized functions must have a...
Robert Griesemer [Mon, 9 Aug 2021 17:53:43 +0000 (10:53 -0700)]
[dev.typeparams] cmd/compile/internal/types2: parameterized functions must have a body

Add the respective check and add missing bodies to tests.
Use {} as body for functions that don't return a result.
Use { panic(0) } as body for functions that return a result.

For #47069.

Change-Id: Ia5d7525c9c036baf8a955d13bff448401e08235e
Reviewed-on: https://go-review.googlesource.com/c/go/+/340911
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: expand is only required for *Named...
Robert Griesemer [Sun, 8 Aug 2021 19:37:35 +0000 (12:37 -0700)]
[dev.typeparams] cmd/compile/internal/types2: expand is only required for *Named types

Now that the pointer identity for a *Named type doesn't change
anymore when going from lazy instantiated to actually instantiated
(= expanded) state, expand() only needs to be called when we deal
with *Named types and only if we care about a *Named type's internals.

Remove the expand function and respective calls for all types and
replace with specific t.expand() method calls where t is a *Named.

Change-Id: If82299360d60108b00adc4013b29399aec90b940
Reviewed-on: https://go-review.googlesource.com/c/go/+/340749
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years agodoc: use "high address/low address" instead of "top/bottom"
fanzha02 [Tue, 3 Aug 2021 04:11:29 +0000 (12:11 +0800)]
doc: use "high address/low address" instead of "top/bottom"

The current document uses the "top" and "bottom" when talking
about the address within a frame, which may easily lead to
misunderstandings. This patch directly uses "high address"
and "low address" to make the expression clearer.

Change-Id: I7469330bbdc158672d7f0314fe6680ebdd9ab79a
Reviewed-on: https://go-review.googlesource.com/c/go/+/339369
Trust: fannie zhang <Fannie.Zhang@arm.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years ago[dev.typeparams] cmd/compile: use types2.Constraint() rather than types2.Bound()
Dan Scales [Sun, 8 Aug 2021 05:26:46 +0000 (22:26 -0700)]
[dev.typeparams] cmd/compile: use types2.Constraint() rather than types2.Bound()

types2.Constraint() returns the top-level constraint type, including any
unions or other interface elements. Because of that, we needed to
add/fix some code in the type substituter and generic type instantiater
in the importer to deal with unions and non-method members of an
interface. Also, NewUnion was not correctly setting the HasTParam flag.

I also added a better error message when a symbol is not found in
(*deadcodePass).decodeIfaceMethod().

Change-Id: Id3668dc596dce63690fa05a9e5e42295b5e2bbb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/340670
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2 years agocmd/go: with -mod=vendor, don't panic if there are duplicate requirements
Jay Conrod [Thu, 5 Aug 2021 22:18:42 +0000 (15:18 -0700)]
cmd/go: with -mod=vendor, don't panic if there are duplicate requirements

In loadModFile with -mod=vendor, load the vendor list and use it to
initialize the module graph before calling updateRoots.

In updateLazyRoots with any mode other than "mod", return the original
*Requirements if no roots needed to be upgraded, even if there are
inconsistencies. This means 'go list -m -mod=readonly' and -mod=vendor
may succeed if there are duplicate requirements or requirements on
versions of the main module.

Fixes #47565

Change-Id: I4640dffc4a7359367cc910da0d29e3538bfd1ca4
Reviewed-on: https://go-review.googlesource.com/c/go/+/340252
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2 years ago[dev.typeparams] cmd/compile: call transformArgs before early typecheckaste in noder
Dan Scales [Fri, 6 Aug 2021 20:24:14 +0000 (13:24 -0700)]
[dev.typeparams] cmd/compile: call transformArgs before early typecheckaste in noder

In the cases where we do an early call to typecheckaste() in noder to
expose CONVIFACE nodes, we need a preceding call to transformArgs().
This is needed to allow typecheckaste() to run correctly, in the case of
f(g()), where g has multiple return values.

I also cleaned up the code a bit and commented the code in Call(), and
we do the call to typecheckaste() in several more cases.

In stencil.go:stencil(), I moved the transformCall earlier for the
OCALLMETH/ODOTMETH case, just as I did in my previous CL for
OCALL/OFUNCINST. By doing this, transformArgs no longer needs to deal
with the extra dictionary args. Therefore, I was able to simply
transformArgs() to look like typecheckargs() again, and make use of
RewriteMultiValue directly.

Updates #47514

Change-Id: I49eb82ac05707e50c2e2fb03e39458a70491d406
Reviewed-on: https://go-review.googlesource.com/c/go/+/340531
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] cmd/compile: implement generic type switches
Keith Randall [Tue, 3 Aug 2021 15:10:17 +0000 (08:10 -0700)]
[dev.typeparams] cmd/compile: implement generic type switches

Add a new dynamicType node, which is used as a case entry when
the type being switched to is generic.

Change-Id: Ice77c6f224b8fdd3ff574fdf4a8ea5f6c7ddbe75
Reviewed-on: https://go-review.googlesource.com/c/go/+/339429
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2 years ago[dev.typeparams] cmd/compile: simplify interface conversions
Keith Randall [Thu, 5 Aug 2021 05:18:23 +0000 (22:18 -0700)]
[dev.typeparams] cmd/compile: simplify interface conversions

Simplify the implementation of interface conversions in the compiler.
Don't pass fields that aren't needed (the data word, usually) to the runtime.

For generics, we need to put a dynamic type in an interface. The new
dataWord function is exactly what we need (the type word will come
from a dictionary).

Change-Id: Iade5de5c174854b65ad248f35c7893c603f7be3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/340029
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>
2 years agoruntime/cgo: when using msan explicitly unpoison cgoCallers
Ian Lance Taylor [Thu, 5 Aug 2021 03:55:28 +0000 (20:55 -0700)]
runtime/cgo: when using msan explicitly unpoison cgoCallers

This avoids an incorrect msan uninitialized memory report when using
runtime.SetCgoTraceback when a signal occurs while the fifth argument
register is undefined. See the issue for more details.

Fixes #47543

Change-Id: I3d1b673e2c93471ccdae0171a99b88b5a6062840
Reviewed-on: https://go-review.googlesource.com/c/go/+/339902
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2 years agodoc: add example for conversion from slice expressions to array ptr
Cuong Manh Le [Sun, 8 Aug 2021 17:52:21 +0000 (00:52 +0700)]
doc: add example for conversion from slice expressions to array ptr

Fixes #47599

Change-Id: I8f4ccd3b0c2bcdb057ee853163b4421229141333
Reviewed-on: https://go-review.googlesource.com/c/go/+/340351
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: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] cmd/compile: don't export/import type parameter indices anymore
Dan Scales [Fri, 6 Aug 2021 23:29:09 +0000 (16:29 -0700)]
[dev.typeparams] cmd/compile: don't export/import type parameter indices anymore

types2 now determines type parameter indices lazily, so we don't need
them just as we are importing. We set them in types1 as we are importing
the type param list itself.

type param indices are not strongly needed in types1 - we only use them
in one place which could be rewritten. But I kept them in analogy to
types2 (TypeParam.Index).

Fixes #47451

Change-Id: I30631f95c45a259354eaf7ec5194f71e799eb358
Reviewed-on: https://go-review.googlesource.com/c/go/+/340532
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>

2 years agodoc/go1.17: fix a typo introduced in CL 335135
Bryan C. Mills [Sat, 7 Aug 2021 01:10:31 +0000 (21:10 -0400)]
doc/go1.17: fix a typo introduced in CL 335135

Change-Id: I62388bcb6d6f910ffa95d3db856ea29838573256
Reviewed-on: https://go-review.googlesource.com/c/go/+/340590
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Rob Pike <r@golang.org>
2 years agomake.bash: do not overwrite GO_LDSO if already set
Cherry Mui [Fri, 6 Aug 2021 19:37:10 +0000 (15:37 -0400)]
make.bash: do not overwrite GO_LDSO if already set

Change-Id: I704bdb411bda3d8a40906c12f182e268dca4718f
Reviewed-on: https://go-review.googlesource.com/c/go/+/340450
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years agodoc/go1.17: clarify Modules changes
Bryan C. Mills [Fri, 16 Jul 2021 20:51:11 +0000 (16:51 -0400)]
doc/go1.17: clarify Modules changes

Writing CL 333629 clarified my thinking about the behavioral changes
associated with lazy loading. There are really two interrelated
changes — graph pruning, and lazy loading proper — that are both made
possible by the added redundancy in the go.mod file.

(I had initially approached the whole cluster of features as “lazy
loading” because that was the starting point for the design. Graph
pruning came into the picture when we looked at how to bound the
worst-case behavior of lazy loading, but it is really the more
important of the two aspects of the design.)

Note that this change adds links to doc anchors added in CL 333629.

Fixes #36460
Fixes #47397

Change-Id: I0ef4af57f647bf5ee210ea7099191fb4befa2cc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/335135
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: remove Interface.Complete (cleanup)
Robert Griesemer [Fri, 6 Aug 2021 01:33:22 +0000 (18:33 -0700)]
[dev.typeparams] cmd/compile/internal/types2: remove Interface.Complete (cleanup)

Interface.Complete is not needed anymore. We can remove it in
types2 (and eventually make it an empty function in go/types,
where we must maintain the existing API).

Change-Id: I689f0d6f3a83997d8ca5bae773b9af0083d0bf4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/340255
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: limit termlist lengths
Robert Griesemer [Fri, 6 Aug 2021 01:14:28 +0000 (18:14 -0700)]
[dev.typeparams] cmd/compile/internal/types2: limit termlist lengths

At the moment, operations on termlists are O(n^2).
This is fine for normal-sized unions, but overlong
termlist lenghts will lead to excessive type checking
times.

Limit the length of termlists to avoid "compilations
that don't finish".

Change-Id: I39a7fc61b01c9db06faeb49a0e014b1ede532710
Reviewed-on: https://go-review.googlesource.com/c/go/+/340254
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>
2 years ago[dev.typeparams] cmd/compile: swap export order of union term components (cleanup)
Robert Griesemer [Thu, 5 Aug 2021 20:58:24 +0000 (13:58 -0700)]
[dev.typeparams] cmd/compile: swap export order of union term components (cleanup)

Export a term as a pair (tilde, type) rather than (type, tilde)
to match the new Union/Term API.

Change-Id: I221c09c2c746ae19fbae0c970ffb26fa7a8ac736
Reviewed-on: https://go-review.googlesource.com/c/go/+/340251
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2 years ago[dev.typeparams] cmd/compile: change types2.Union API to accept a list of Terms
Robert Griesemer [Thu, 5 Aug 2021 20:24:15 +0000 (13:24 -0700)]
[dev.typeparams] cmd/compile: change types2.Union API to accept a list of Terms

Instead of providing a list of tildes and types, use a list of
Terms to create a Union, with suitable accessors.

Define the (exported) notion of a Term representing a union term.

This simplified various uses and also will be easier to extend
should we want to add more information to a Term in the future.

Change-Id: I52fd73938bfa11bac60adbf10580b6d0680df4f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/340250
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: add defined type to term/termlist tests
Robert Griesemer [Thu, 5 Aug 2021 05:22:54 +0000 (22:22 -0700)]
[dev.typeparams] cmd/compile/internal/types2: add defined type to term/termlist tests

Follow-up on https://golang.org/cl/339596 .

Change-Id: Ifa249379df083f80176b9f99900be0bf12483f41
Reviewed-on: https://go-review.googlesource.com/c/go/+/339905
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>
2 years ago[dev.typeparams] cmd/compile/internal/syntax: cleanup panic calls
Robert Griesemer [Thu, 5 Aug 2021 04:17:54 +0000 (21:17 -0700)]
[dev.typeparams] cmd/compile/internal/syntax: cleanup panic calls

End-users are not expected to deal with the details of panics,
so providing extra information such as an "internal error" prefix
is not helpful.

Matches the types2 changes made in https://golang.org/cl/339969 .

Change-Id: Icb34a9daab981a84f41f8ae7ae5dc1b85b2d2c81
Reviewed-on: https://go-review.googlesource.com/c/go/+/339904
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: minor cleanup of writeTParamList
Robert Griesemer [Thu, 5 Aug 2021 04:10:31 +0000 (21:10 -0700)]
[dev.typeparams] cmd/compile/internal/types2: minor cleanup of writeTParamList

Change-Id: Iaa58b17ad65e93548bb3da8231e0cb6da0c48105
Reviewed-on: https://go-review.googlesource.com/c/go/+/339903
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: fix make with type parameter argument
Robert Griesemer [Thu, 5 Aug 2021 01:01:41 +0000 (18:01 -0700)]
[dev.typeparams] cmd/compile/internal/types2: fix make with type parameter argument

For make with a type parameter argument, the structural type of
the type parameter's constraint determines what make is making.

Change-Id: I3b48f8ce3236b7624e0638b5f5be208c5915c987
Reviewed-on: https://go-review.googlesource.com/c/go/+/339899
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: fix range over exprs of type parameter...
Robert Griesemer [Wed, 4 Aug 2021 23:52:25 +0000 (16:52 -0700)]
[dev.typeparams] cmd/compile/internal/types2: fix range over exprs of type parameter type

For range expressions of type parameter type, the structural type
of the type parameter's constraint determines the range operation.

While at it, rename implicitArrayDeref to arrayPtrDeref.

Change-Id: Ib631a8a14e717498e5264944f659309df1f68cc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/339897
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: better names for things (cleanup)
Robert Griesemer [Wed, 4 Aug 2021 22:18:37 +0000 (15:18 -0700)]
[dev.typeparams] cmd/compile/internal/types2: better names for things (cleanup)

- use the symbol 𝓤 (as in 𝓤niverse) instead of ⊤ to denote the set
  of all types (for better readabilty, ⊤ is hard to distinguish from
  T in some fonts)

- use isAll instead of isTop to test for the set of all types

- use allTermlist instead of topTermlist to denote the termlist
  representing all types

Change-Id: Idcb0b3398782b38653338e65173c0dbb935e430a
Reviewed-on: https://go-review.googlesource.com/c/go/+/339891
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>
2 years ago[dev.typeparams] cmd/compile: cleanup wrapper code for generics
Dan Scales [Thu, 5 Aug 2021 17:17:40 +0000 (10:17 -0700)]
[dev.typeparams] cmd/compile: cleanup wrapper code for generics

Simple change - added some comments, but also removed some TODO comments
which are now done or no longer a question. Cleaned up the initial check
for generic methods.

The one remaining TODO that really needs to be done is generating
dictionary wrappers for any methods involving embedded fields. Given we
are not doing this, I think this would only affect if a struct with an
embedded field with methods was converted to an interface containing the
embedded method, and then the method was called via that interface.

Change-Id: I6a8a2885de33ad60b313c1899b659daef7550dfb
Reviewed-on: https://go-review.googlesource.com/c/go/+/340260
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] cmd/compile: do transformCall with non-shape type of call
Dan Scales [Thu, 5 Aug 2021 22:59:39 +0000 (15:59 -0700)]
[dev.typeparams] cmd/compile: do transformCall with non-shape type of call

Do the transformCall using the original types2-derived type of the call
(in particular, the types of the params as non-shapes). Currently, since
we were using the param types of the instantiation, we might add in
interface conversions to an interface with shapes in the one case of a
full-instantiated generic call. So, we do the transformCall() before
installing the shaped-based instantiation. transformCall() works
correctly even in the case of OCALL/FUNCINST.

Fixed two related bugs:
  - Fixed case where we still were not correctly substituting the types
    for a function instantiation.
  - The type substituter needs to copy field flags while substituting in
    tstruct.

Change-Id: I14e960737d6840a75846ede480e6650534ba3af3
Reviewed-on: https://go-review.googlesource.com/c/go/+/340259
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] cmd/compile: make sure closures inside generic funcs are not compiled
Dan Scales [Fri, 6 Aug 2021 06:26:21 +0000 (23:26 -0700)]
[dev.typeparams] cmd/compile: make sure closures inside generic funcs are not compiled

Closures inside generic functions were being added to the g.target.Decls
list during noding, just like other closures. We remove generic
functions/methods from g.target.Decls, so they don't get compiled
(they're only available for export and stenciling). Most closures inside
generic functions/methods were similarly being removed from
g.target.Decls, because they have a generic parameter. But we need to
ensure no closures in generic function/methods are left remaining in
g.target.Decls, since we don't want them transformed and compiled.

So, we set a flag in (*irgen) that records when we are noding a
top-level generic function/method, and don't add any closures to
g.target.Decls when the flag is true.

Updates #47514

Change-Id: Id66b4c41d307ffa8f54cab6ce3646ade81606862
Reviewed-on: https://go-review.googlesource.com/c/go/+/340258
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2 years agoruntime: allow arm64 SEH to be called if illegal instruction
Jason A. Donenfeld [Thu, 5 Aug 2021 11:37:29 +0000 (13:37 +0200)]
runtime: allow arm64 SEH to be called if illegal instruction

DLLs built with recent Microsoft toolchains for ARM64 test for ARMv8.1
atomics by potentially calling an illegal instruction, and then trapping
the exception to disable use of them by way of a structured exception
handler. However, vectored exception handlers are always called before
structured exception handlers. When LoadLibrary-ing DLLs that do this
probing during initialization, our lastcontinuehandler winds up being
called, and then crashing, but actually it should give execution back to
the library to handle the exception and fix up the state. So special
case this for arm64 with illegal instructions, and hope that we're not
masking other things in external DLLs that might more fatally trigger an
illegal instruction exception.

Updates #47576.

Change-Id: I341ab99cd8d513ae999b75596749d49779072022
Reviewed-on: https://go-review.googlesource.com/c/go/+/340070
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2 years agoruntime: warn that KeepAlive is not an unsafe.Pointer workaround
Matthew Dempsky [Thu, 5 Aug 2021 20:05:23 +0000 (13:05 -0700)]
runtime: warn that KeepAlive is not an unsafe.Pointer workaround

Even experienced users occasionally mistake that runtime.KeepAlive can
be used as a workaround for following the unsafe.Pointer safety rules,
but it cannot. Add an explicit warning to this effect to dissuade
users from trying to use it as such.

Fixes #47562.

Change-Id: I842e33a3e1c080933c6b1bd1b6318448adbf495c
Reviewed-on: https://go-review.googlesource.com/c/go/+/340269
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2 years ago[dev.typeparams] cmd/compile/internal/types2: cleanup panic calls
Robert Griesemer [Wed, 4 Aug 2021 19:57:23 +0000 (12:57 -0700)]
[dev.typeparams] cmd/compile/internal/types2: cleanup panic calls

End-users are not expected to deal with the details of panics,
so providing extra information such as an "internal error" prefix
or the name of the function invoking the panic are not helpful.

Remove unnecessary panic verbiage if it is readily available from
a stack trace (such as the function where it happens, and the fact
that is is an "internal error").

Change-Id: I5f86bae6d2cca7c04ce692d17257da7ddee206d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/339969
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: remove TestIncompleteInterfaces (cleanup)
Robert Griesemer [Wed, 4 Aug 2021 19:27:26 +0000 (12:27 -0700)]
[dev.typeparams] cmd/compile/internal/types2: remove TestIncompleteInterfaces (cleanup)

TestIncompleteInterfaces is not useful anymore because interface
printing always shows the syntactic type structure of an interface.

Also remove the respective support code in interface printing and
simplify that code.

Move the newDefined and nopos support declarations unchanged into
api_test.go where they are used.

Updates #46167.

Change-Id: I23e303bc4ae4271912ba75f201bd2b7cd4a17b3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/339832
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: remove unused gcCompatibilityMode flag...
Robert Griesemer [Wed, 4 Aug 2021 19:12:27 +0000 (12:12 -0700)]
[dev.typeparams] cmd/compile/internal/types2: remove unused gcCompatibilityMode flag (cleanup)

This flag is not needed by types2 (and possibly can also be removed
from go/types). Removed some unnecessary comments along the way.

Updates #46174.

Change-Id: I1a7a99f724205a084d1c9850bce6f6f5d33f83ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/339831
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile/internal/types2: implement type sets with term lists
Robert Griesemer [Thu, 29 Jul 2021 18:10:04 +0000 (11:10 -0700)]
[dev.typeparams] cmd/compile/internal/types2: implement type sets with term lists

This CL resolves several known issues and TODOs.

- Represent type sets with term lists and using term list abstractions.

- Represent Unions internally as a list of (syntactical) terms.
  Use term operations to print terms and detect overlapping union
  entries.

- Compute type sets corresponding to unions lazily, on demand.

- Adjust code throughout.

- Adjusted error check in test/typeparam/mincheck.dir/main.go
  to make test pass.

Change-Id: Ib36fb7e1d343c2b6aec51d304f0f7d1ad415f999
Reviewed-on: https://go-review.googlesource.com/c/go/+/338310
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2 years ago[dev.typeparams] cmd/compile: unified importReader receiver name to r
Leonard Wang [Thu, 5 Aug 2021 15:04:16 +0000 (23:04 +0800)]
[dev.typeparams] cmd/compile: unified importReader receiver name to r

Change-Id: Iaf8ec7665282f4f8c0cb09a652e78aa97959274b
Reviewed-on: https://go-review.googlesource.com/c/go/+/340150
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

2 years ago[dev.typeparams] cmd/compile: dictionary/shape cleanup
Dan Scales [Thu, 5 Aug 2021 00:58:54 +0000 (17:58 -0700)]
[dev.typeparams] cmd/compile: dictionary/shape cleanup

 - Removed gcshapeType - we're going with more granular shapes for now, and gradually
   coarsening later if needed.

 - Put in early return in getDictionarySym(), so the entire rest of the
   function can be un-indented by one level.

 - Removed some duplicated infoprint calls, and fixed one infoprint
   message in getGfInfo.

Change-Id: I13acce8fdabdb21e903275b53ff78a1e6a378de2
Reviewed-on: https://go-review.googlesource.com/c/go/+/339901
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] cmd/compile: fixing case where type arg is an interface
Dan Scales [Wed, 4 Aug 2021 21:25:01 +0000 (14:25 -0700)]
[dev.typeparams] cmd/compile: fixing case where type arg is an interface

In this case, we can't use an itab for doing a bound call, since we're
converting from an interface to an interface. We do a static or dynamic
type assert in new function assertToBound().

The dynamic type assert in assertToBound() is only needed if a bound is
parameterized. In that case, we must do a dynamic type assert, and
therefore need a dictionary entry for the type bound (see change in
getGfInfo). I'm not sure if we can somehow limit this case, since using
an interface as a type arg AND having the type bound of the type
arg be parameterized is a very unlikely case.

Had to add the TUNION case to parameterizedBy1() (which is only used for
extra checking).

Added a bunch of these test cases to 13.go, which now passes.

Change-Id: Ic22eed637fa879b5bbb46d36b40aaad6f90b9d01
Reviewed-on: https://go-review.googlesource.com/c/go/+/339898
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2 years ago[dev.typeparams] go/types: remove a stale comment (cleanup)
Rob Findley [Wed, 4 Aug 2021 20:21:15 +0000 (16:21 -0400)]
[dev.typeparams] go/types: remove a stale comment (cleanup)

Remove a stale comment from when the new types.Info API was guarded
behind the typeparams build constraint.

Change-Id: I319ad0a9e4e4958efdb96c967bf13a0119b5647b
Reviewed-on: https://go-review.googlesource.com/c/go/+/340010
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>
2 years ago[dev.typeparams] go/types: switch the TArgs API to NumTArgs/TArg
Rob Findley [Wed, 4 Aug 2021 14:43:08 +0000 (10:43 -0400)]
[dev.typeparams] go/types: switch the TArgs API to NumTArgs/TArg

As with other go/types APIs, we should not expose the underlying
Named.targs slice.

Change-Id: Iba869298fbd3856022ffe8ec2c3273341598c324
Reviewed-on: https://go-review.googlesource.com/c/go/+/340009
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: implement term lists
Robert Griesemer [Wed, 4 Aug 2021 03:43:39 +0000 (20:43 -0700)]
[dev.typeparams] cmd/compile/internal/types2: implement term lists

Prerequisite for clean implementation of type sets
on top of term lists.

Change-Id: Ice87f2f47327aa6b1f3eaad7f9af20ad7c548155
Reviewed-on: https://go-review.googlesource.com/c/go/+/339596
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>
2 years ago[dev.typeparams] cmd/compile: put shape types in their own package
Keith Randall [Wed, 4 Aug 2021 02:33:01 +0000 (19:33 -0700)]
[dev.typeparams] cmd/compile: put shape types in their own package

Put shape types in the top level package called ".shape".
Name them using the serialization of the shape name, instead of
the .shapeN names.

This allows the linker to deduplicate instantiations across packages.

Not sure that this is entirely correct, as shapes in this package
may reference other packages (e.g. a field of a struct). But it seems
to work for now.

For the added test, when you look at the resulting binary (use the -k
option with run.go) it has only one instantiation of F, and 4 call sites:

$ objdump -d a.exe | grep _a\.F
 1053cb0: e8 8b 00 00 00  callq 139 <_a.F[.shape.*uint8]>
 1053ce9: e8 52 00 00 00  callq 82 <_a.F[.shape.*uint8]>
_a.F[.shape.*uint8]:
 1053d90: e8 ab ff ff ff  callq -85 <_a.F[.shape.*uint8]>
 1053dc9: e8 72 ff ff ff  callq -142 <_a.F[.shape.*uint8]>

Change-Id: I627f7e50210aabe4a10d0e2717d87b75ac82e99b
Reviewed-on: https://go-review.googlesource.com/c/go/+/339595
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>
2 years ago[dev.typeparams] runtime: handle d.link carefully when freeing a defer
Austin Clements [Wed, 4 Aug 2021 12:54:09 +0000 (08:54 -0400)]
[dev.typeparams] runtime: handle d.link carefully when freeing a defer

CL 339396 allowed stack copying on entry to and during freedefer, but
this introduced a subtle bug: if d is heap-allocated, and d.link
points to a stack-allocated defer, stack copying during freedefer can
briefly introduce a stale pointer, which the garbage collector can
discover and panic about. This happens because d has already been
unlinked from the defer chain when freedefer is called, so stack
copying won't update stack pointers in it.

Fix this by making freedefer nosplit again and immediately clearing
d.link.

This should fix the longtest builders, which currently fail on
GOMAXPROCS=2 runtime -cpu=1,2,4 -quick in the TestDeferHeapAndStack
test.

This seems like the simplest fix, but it just deals with the subtlety
rather than eliminating it. Really, every call site of freedefer (of
which there are surprisingly many) has hidden subtlety between
unlinking the defer and calling freedefer. We could consolidate the
subtlety into each call site by requiring that they unlink the defer
and set d.link to nil before calling freedefer. freedefer could check
this condition like it checks that various other fields have already
been zeroed. A more radical option is to replace freedefer with
"popDefer", which would both pop the defer off the link and take care
of freeing it. There would still be a brief moment of subtlety, but it
would be in one place, in popDefer. Annoyingly, *almost* every call to
freedefer just pops the defer from the head of the G's list, but
there's one place when handling open-coded defers where we have to
remove a defer from the middle of the list. I'm inclined to first fix
that subtlety by only expanding open-coded defer records when they're
at the head of the defer list, and then revisit the popDefer idea.

Change-Id: I3130d2542c01a421a5d60e8c31f5379263219627
Reviewed-on: https://go-review.googlesource.com/c/go/+/339730
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years agonet/http: speed up and deflake TestCancelRequestWhenSharingConnection
Damien Neil [Wed, 4 Aug 2021 02:38:37 +0000 (19:38 -0700)]
net/http: speed up and deflake TestCancelRequestWhenSharingConnection

This test made many requests over the same connection for 10
seconds, trusting that this will exercise the request cancelation
race from #41600.

Change the test to exhibit the specific race in a targeted fashion
with only two requests.

Updates #41600.
Updates #47016.

Change-Id: If99c9b9331ff645f6bb67fe9fb79b8aab8784710
Reviewed-on: https://go-review.googlesource.com/c/go/+/339594
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2 years ago[dev.typeparams] go/types: move instance.go contents into named.go (cleanup)
Rob Findley [Wed, 4 Aug 2021 01:43:39 +0000 (21:43 -0400)]
[dev.typeparams] go/types: move instance.go contents into named.go (cleanup)

This is a port of CL 338469 to go/types.

Change-Id: I3ee655fa2dc7e789f210c8dec171b3358c4ff132
Reviewed-on: https://go-review.googlesource.com/c/go/+/339677
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>
2 years ago[dev.typeparams] go/types: print constraint info for type param operands
Rob Findley [Wed, 4 Aug 2021 01:39:53 +0000 (21:39 -0400)]
[dev.typeparams] go/types: print constraint info for type param operands

This is a clean port of CL 338309 to go/types.

Change-Id: Ie2c9e2ea51d6321af8bf149e43cd71b7ac282d13
Reviewed-on: https://go-review.googlesource.com/c/go/+/339676
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>
2 years ago[dev.typeparams] go/types: (TypeParam) SetBound -> SetConstraint
Rob Findley [Wed, 4 Aug 2021 01:14:31 +0000 (21:14 -0400)]
[dev.typeparams] go/types: (TypeParam) SetBound -> SetConstraint

This is a straightforward port of CL 338196 to go/types, minus the
deprecated TypeParam.Bound() method (since it is not needed), plus an
adjustment for methodset.go.

Change-Id: Ie372bfeec245094102a2c3257a43499d75981447
Reviewed-on: https://go-review.googlesource.com/c/go/+/339675
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>
2 years ago[dev.typeparams] go/types: use type terms to represent unions
Rob Findley [Wed, 4 Aug 2021 01:10:42 +0000 (21:10 -0400)]
[dev.typeparams] go/types: use type terms to represent unions

This is a straightforward port of CL 338092 to go/types.

Change-Id: I414ec0ad95648c201e85fd2b4f494b1206c658e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/339674
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>
2 years ago[dev.typeparams] cmd/compile/internal/types2: fix a panic in missingMethod
Rob Findley [Wed, 4 Aug 2021 00:36:02 +0000 (20:36 -0400)]
[dev.typeparams] cmd/compile/internal/types2: fix a panic in missingMethod

When static == false, missingMethod incorrectly continues with a nil
Func.

Also remove some unnecessary type names from typeterm_test.go, which was
done in the go/types port.

Change-Id: I21fa637ac82b115563d3601314a470a5a43f9ae0
Reviewed-on: https://go-review.googlesource.com/c/go/+/339672
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2 years ago[dev.typeparams] go/types: implement type terms
Rob Findley [Tue, 3 Aug 2021 20:50:35 +0000 (16:50 -0400)]
[dev.typeparams] go/types: implement type terms

This is a port of CL 338049 to go/types. It identical to that CL, except
for eliding unnecessary typenames from the testTerms declaration.

Change-Id: Ieb04d7bbc20063044eb63ea985f75d529f030cd7
Reviewed-on: https://go-review.googlesource.com/c/go/+/339653
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>
2 years ago[dev.typeparams] go/types: use comparable bit rather than ==() method
Rob Findley [Tue, 3 Aug 2021 20:47:15 +0000 (16:47 -0400)]
[dev.typeparams] go/types: use comparable bit rather than ==() method

This is a port of CL 337354 to go/types, adjusted for the error
reporting API and to reposition a couple error messages in
issue47411.go2 (the go/types position is probably better).

A panic is also fixed in lookup.go when method lookup fails and static
== false. I'll send a fix for types2 in a separate CL.

For #47411

Change-Id: Icc48f03c3958695f581f10e8675c1f32434c424b
Reviewed-on: https://go-review.googlesource.com/c/go/+/339652
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>
2 years ago[dev.typeparams] go/types: embedded type cannot be a (pointer to) a type parameter
Rob Findley [Tue, 3 Aug 2021 20:32:23 +0000 (16:32 -0400)]
[dev.typeparams] go/types: embedded type cannot be a (pointer to) a type parameter

This is a port of CL 337353 to go/types, adjusted for the error API and
to comment out a test for MethodSet.

Some nearby error messages that were using errorf rather than error were
also adjusted.

Fixes #43621

Change-Id: I28c9747e044ec7a2863f6890db69475fb8c29231
Reviewed-on: https://go-review.googlesource.com/c/go/+/339651
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>
2 years ago[dev.typeparams] go/types: implement TypeParam.Constraint
Rob Findley [Tue, 3 Aug 2021 20:24:20 +0000 (16:24 -0400)]
[dev.typeparams] go/types: implement TypeParam.Constraint

This is a clean port of CL 336989 to go/types.

Change-Id: Ib8dbe03f420d28ada6d5fc7003ab0c82c7e06c41
Reviewed-on: https://go-review.googlesource.com/c/go/+/339650
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>
2 years ago[dev.typeparams] go/types: adjust unsafe.Alignof/Offsetof/Sizeof
Rob Findley [Tue, 3 Aug 2021 20:22:00 +0000 (16:22 -0400)]
[dev.typeparams] go/types: adjust unsafe.Alignof/Offsetof/Sizeof

This is a port of CL 335413 to go/types, adjusted for the parsing API of
go/parser.

Change-Id: Ie6836add7d027aaf5d6d3dae65222b1d15bd7558
Reviewed-on: https://go-review.googlesource.com/c/go/+/339649
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>
2 years ago[dev.typeparams] runtime: simplify freedefer
Austin Clements [Tue, 3 Aug 2021 21:03:42 +0000 (17:03 -0400)]
[dev.typeparams] runtime: simplify freedefer

Currently, freedefer manually zeros all the fields in the _defer
because simply assigning _defer{} used to cause a nosplit stack
overflow. freedefer is no longer nosplit, so go back to the simpler,
more robust code.

Change-Id: I881f557bab3b1ee7ab29b68e7fb56d0fe6d35d8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/339669
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years ago[dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop
Austin Clements [Mon, 26 Jul 2021 19:44:22 +0000 (15:44 -0400)]
[dev.typeparams] runtime,cmd/compile,cmd/link: replace jmpdefer with a loop

Currently, deferreturn runs deferred functions by backing up its
return PC to the deferreturn call, and then effectively tail-calling
the deferred function (via jmpdefer). The effect of this is that the
deferred function appears to be called directly from the deferee, and
when it returns, the deferee calls deferreturn again so it can run the
next deferred function if necessary.

This unusual flow control leads to a large number of special cases and
complications all over the tool chain.

This used to be necessary because deferreturn copied the deferred
function's argument frame directly into its caller's frame and then
had to invoke that call as if it had been called from its caller's
frame so it could access it arguments. But now that we've simplified
defer processing so the runtime only deals with argument-less
closures, this approach is no longer necessary.

This CL simplifies all of this by making deferreturn simply call
deferred functions in a loop.

This eliminates the need for jmpdefer, so we can delete a bunch of
per-architecture assembly code.

This eliminates several special cases on Wasm, since it couldn't
support these calling shenanigans directly and thus had to simulate
the loop a different way. Now Wasm can largely work the way the other
platforms do.

This eliminates the per-architecture Ginsnopdefer operation. On PPC64,
this was necessary to reload the TOC pointer after the tail call
(since TOC pointers in general make tail calls impossible). The tail
call is gone, and in the case where we do force a jump to the
deferreturn call when recovering from an open-coded defer, we go
through gogo (via runtime.recovery), which handles the TOC. On other
platforms, we needed a NOP so traceback didn't get confused by seeing
the return to the CALL instruction, rather than the usual return to
the instruction following the CALL instruction. Now we don't inject a
return to the CALL instruction at all, so this NOP is also
unnecessary.

The one potential effect of this is that deferreturn could now appear
in stack traces from deferred functions. However, this could already
happen from open-coded defers, so we've long since marked deferreturn
as a "wrapper" so it gets elided not only from printed stack traces,
but from runtime.Callers*.

This is a retry of CL 337652 because we had to back out its parent.
There are no changes in this version.

Change-Id: I3f54b7fec1d7ccac71cc6cf6835c6a46b7e5fb6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/339397
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years ago[dev.typeparams] runtime: remove unnecessary split-prevention from defer code
Austin Clements [Mon, 26 Jul 2021 16:04:36 +0000 (12:04 -0400)]
[dev.typeparams] runtime: remove unnecessary split-prevention from defer code

Prior to regabi, the compiler passed defer arguments to the runtime as
untyped values on the stack. This meant a lot of defer-related runtime
functions had to be very careful not to grow the stack or allow
preemption since the stack could not be safely scanned or moved.
However, with regabi, every defer is now simply a func() from the
runtime's perspective, which means we no longer have untyped values on
the stack when we enter defer-related runtime code.

Hence, this CL removes a lot of the now-unnecessary carefulness in the
defer implementation. Specifically, deferreturn no longer needs to be
nosplit because it doesn't copy untyped defer arguments to its
caller's frame (we also update some stale comments in deferreturn).
freedefer no longer needs to be nosplit because it's none of its
callers are deeply nosplit. And newdefer and freedefer no longer need
to switch to the systemstack on their slow paths to avoid stack
growth.

deferprocStack is the only function that still needs to be nosplit,
but that's because the compiler calls it with uninitialized live
pointer slots on the stack (maybe we should change that, but that's a
very different fix).

This is a retry of CL 337651, which was rolled back. This version
disables preemption in newdefer and freedefer while they hold the
current P.

Change-Id: Ibf469addc0b69dc3ba9a3d1a5e0c2804b7b4b244
Reviewed-on: https://go-review.googlesource.com/c/go/+/339396
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>