When recovering from a panic in a HTTP handler, close the request body
before closing the *conn, ensuring that the *conn's bufio.Reader is safe
to recycle.
Fixes#46866.
Change-Id: I3fe304592e3b423a0970727d68bc1229c3752939
Reviewed-on: https://go-review.googlesource.com/c/go/+/329922
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go 1.18 development is well underway. This is a time to update all
golang.org/x/... module versions that contribute packages to the std
and cmd modules in the standard library to latest master versions.
gotip $ updatestd -goroot=$(pwd) -branch=master
> go version
go version devel go1.18-2872496ba5 Wed Sep 1 23:41:53 2021 +0000 darwin/amd64
> go env GOROOT
/Users/dmitshur/gotip
> go version -m /Users/dmitshur/go/bin/bundle
/Users/dmitshur/go/bin/bundle: go1.17
path golang.org/x/tools/cmd/bundle
mod golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA=
dep golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
dep golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
skipping github.com/chzyer/logex (out of scope, it's not a golang.org/x dependency)
skipping github.com/chzyer/readline (out of scope, it's not a golang.org/x dependency)
skipping github.com/chzyer/test (out of scope, it's not a golang.org/x dependency)
skipping github.com/google/pprof (out of scope, it's not a golang.org/x dependency)
skipping github.com/ianlancetaylor/demangle (out of scope, it's not a golang.org/x dependency)
skipping github.com/yuin/goldmark (out of scope, it's not a golang.org/x dependency)
skipping golang.org/x/tools (temporarily out of scope due to golang.org/issue/48124)
skipping rsc.io/pdf (out of scope, it's not a golang.org/x dependency)
updating module cmd in /Users/dmitshur/gotip/src/cmd
> go mod edit -go=1.18
> go get -d golang.org/x/arch@ebb09ed340f18f7e2a2200f1adf792992c448346 golang.org/x/crypto@32db794688a5a24a23a43f2a984cecd5b3d8da58 golang.org/x/mod@1b1db11ec8f43eeafa9418698423dc637655ff0c golang.org/x/net@e898025ed96aa6d08e98132b8dca210e9e7a0cd2 golang.org/x/sync@036812b2e83c0ddf193dd5a34e034151da389d09 golang.org/x/sys@f4d43177bf5e2ee98617956e417d0555d4b69c17 golang.org/x/term@6886f2dfbf5b25f595b4fe4279c49956e867c59b golang.org/x/text@383b2e75a7a4198c42f8f87833eefb772868a56f golang.org/x/xerrors@5ec99f83aff198f5fbd629d6c8d8eb38a04218ca
go get: upgraded golang.org/x/arch v0.0.0-20210502124803-cbf565b21d1e => v0.0.0-20210901143047-ebb09ed340f1
go get: upgraded golang.org/x/mod v0.5.1-0.20210827163434-4029241eb1d5 => v0.5.1-0.20210830214625-1b1db11ec8f4
go get: upgraded golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 => v0.0.0-20210825183410-e898025ed96a
go get: upgraded golang.org/x/term v0.0.0-20210503060354-a79de5458b56 => v0.0.0-20210615171337-6886f2dfbf5b
go get: upgraded golang.org/x/text v0.3.3 => v0.3.7
> go mod tidy
> go mod vendor
skipping golang.org/x/tools (temporarily out of scope due to golang.org/issue/48124)
updating module std in /Users/dmitshur/gotip/src
> go mod edit -go=1.18
> go get -d golang.org/x/crypto@32db794688a5a24a23a43f2a984cecd5b3d8da58 golang.org/x/net@e898025ed96aa6d08e98132b8dca210e9e7a0cd2 golang.org/x/sys@f4d43177bf5e2ee98617956e417d0555d4b69c17 golang.org/x/term@6886f2dfbf5b25f595b4fe4279c49956e867c59b golang.org/x/text@383b2e75a7a4198c42f8f87833eefb772868a56f
go get: upgraded golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 => v0.0.0-20210615171337-6886f2dfbf5b
go get: upgraded golang.org/x/text v0.3.7-0.20210503195748-5c7c50ebbd4f => v0.3.7
> go mod tidy
> go mod vendor
updating bundles in /Users/dmitshur/gotip/src
> go generate -run=bundle std cmd
The x/tools module will be updated in a following CL,
after issue #48124 is resolved.
The module in GOROOT/src/crypto/ed25519/internal/edwards25519/field/_asm
directory is not updated in this CL.
For #36905.
Change-Id: I728000e8465c0fbf6976629e6da42cc4f9be20fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/347191
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
This resolves an outstanding TODO to be consistent about calling
SetTParams.
Done in both go/internal/gcimporter and cmd/compile/internal/importer.
Change-Id: Ief642efe016f02bab1bab960f6731a0ac0a8ad28
Reviewed-on: https://go-review.googlesource.com/c/go/+/347389
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>
Ran the following commands inside std and cmd modules:
go get -d golang.org/x/crypto@32db794688a5a24a23a43f2a984cecd5b3d8da58 # master
go mod tidy
go mod vendor
Also add the new golang.org/x/crypto/curve25519/internal/field package
(it was created in x/crypto CL 315269) to TestDependencies in go/build.
Position it next to its upstream copy, since its required dependencies
are expected to be identical.
For #36905.
Change-Id: I589499cd7176c9b4b8758e59025653d19b58130e
Reviewed-on: https://go-review.googlesource.com/c/go/+/347190
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Ran the following commands inside std and cmd modules:
go get -d golang.org/x/sys@f4d43177bf5e2ee98617956e417d0555d4b69c17 # master
go mod tidy
go mod vendor
Followed by the following command in std module:
go generate syscall internal/syscall/...
For #36905.
Change-Id: I53d6ba03246372b6f7abd5ac57dbb71715d6eb4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/347189
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Fix a buglet in relocation processing that crops up with external
linking when you have an undefined function symbol that also has a
prototype (as if it were being defined in assembly src).
Fixes#47993.
Change-Id: Ib655492a63b205ffdc124cfd0cb7f7b731571821
Reviewed-on: https://go-review.googlesource.com/c/go/+/345473
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This CL simplifies riscv addition (add r, imm) to
(ADDI (ADDI r, imm/2), imm-imm/2) if imm is in specific ranges.
(-4096 <= imm <= -2049 or 2048 <= imm <= 4094)
There is little impact to the go1 benchmark, while the total
size of pkg/linux_riscv64 decreased by about 11KB.
Change-Id: I236eb8af3b83bb35ce9c0b318fc1d235e8ab9a4e
GitHub-Last-Rev: a2f56a0763
GitHub-Pull-Request: golang/go#48110
Reviewed-on: https://go-review.googlesource.com/c/go/+/346689
Run-TryBot: Ben Shi <powerman1st@163.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Michael Munday <mike.munday@lowrisc.org>
Add a new test TestImportTypeparamTests that compiles and imports
packages contained in test/typeparam, and compares the resulting package
scope with the scope produced by type-checking directly.
In the process, fix a bug in go/types affecting embedded instances with
more than one type argument. This was uncovered by smoketest.go.
To enable this new test it was easiest to move gcimporter_test.go to an
external test, which required copying the pkgExts variable.
Fixes#48101
Change-Id: Ie4d981bf463e886a8d141809805d184dbbf64607
Reviewed-on: https://go-review.googlesource.com/c/go/+/347070
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>
Port the necessary logic to go/internal/gcimporter from
cmd/compile/internal/importer/iimport.go to support type parameters.
This is a partial port of several compiler CLs: at least CL 319930,
CL 322609, CL 323029, CL 338192, CL 340251, and CL 340989. Because these
ports were not interleaved with the corresponding go/types API changes,
it is easier to just take the latest importer logic.
Notably, the equivalent of types2.AsTypeParam is not used. It should be
unnecessary.
Updates #48101
Change-Id: I938bd8debc3f6a68a3ad8d44c61ef9c5038be7e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/347069
Trust: Robert Findley <rfindley@google.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Usually, fixalloc is used to allocate small, persistent and reuseable
objects. The size is typically between range [sizeof(mlink), _FixAllocChunk].
It's rare for being out of the range. But if it did happen, we got a
hard-to-discover memory corruption. This commit prevents that situation by limiting object's size.
Change-Id: If6ef8b0831596464e0f55d09f79094b79ae08c66
GitHub-Last-Rev: cb8b1b01bb
GitHub-Pull-Request: golang/go#47395
Reviewed-on: https://go-review.googlesource.com/c/go/+/337429
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
ORANGE is still not inlineable now. This CL is correct only when the range statement is statically dead, and thus not counted during the inline budget check.
If we support range statements in inlining closures in the future, may require additional processing.
Fixes#48033.
Change-Id: I28f5755c28cfa27e41daef9eff2ae332059909bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/345436
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
The minimum required Linux kernel version for Go 1.18 will be changed to
2.6.32, see #45964. The current minimum required version is 2.6.23 and
accept4 was added in 2.6.28, so the fallback to accept in Accept on
Linux can be removed.
For #45964
Change-Id: I78fc4e5b58417bbc540912c9dbf1b1b3db888fea
Reviewed-on: https://go-review.googlesource.com/c/go/+/346849
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The minimum required Linux kernel version for Go 1.18 will be changed to
2.6.32, see #45964. The current minimum required version is 2.6.23 and
utimensat was added in 2.6.22, so the fallback isn't even necessary for
the current minimum supported version. Remove the fallback to utimes.
For #45964
Change-Id: I5536f6ea7a34944dd9165f1533c10692171fb0c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/346790
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The minimum required Linux kernel version for Go 1.18 will be changed to
2.6.32, see #45964. The pipe2 syscall was added in 2.6.27, so the
fallback to use the pipe syscall in os.Pipe and syscall.forkExecPipe on
Linux can be removed.
For #45964
Change-Id: I033a534f2b39e9bafc9980c9ce980e92f1e3a136
Reviewed-on: https://go-review.googlesource.com/c/go/+/346789
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
When setting an invalid GOROOT_BOOTSTRAP, make.bash try looking at env to
find a valid go command and use that GOROOT instead. It's better if the
script emit a warning, instead of silently change the GOROOT_BOOTSTRAP.
Change-Id: I6038093d5e8c072da27bcae44b125f6774f809a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/326030
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: Matthew Dempsky <mdempsky@google.com>
Currently, if a test explicitly specify -G flag, if that flag conflict
with compiler default -G flag, the test will be skipped. That's the
reason CL 346469 haven't fixed the unified IR stuff, but still make the
unified builder passed.
This CL makes run.go always run the test in unified IR mode, regardless
of the explicit -G flag specified.
Updates #48094
Change-Id: I959ecaff6aca07844f0ffcf36caa60cf0747e8ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/347271
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Followup todo in CL 346769.
Change-Id: I6c870014523426d65d135da999f97a818a997237
Reviewed-on: https://go-review.googlesource.com/c/go/+/347270
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: Matthew Dempsky <mdempsky@google.com>
CL 346469 added support for unsafe.Sizeof and friends to operate on
generic parameters for compiler importer/exporter. This CL adds support
for unified IR.
Updates #48094
Change-Id: I63af1a7c3478f59b03ecc23229ac2254d3457868
Reviewed-on: https://go-review.googlesource.com/c/go/+/346769
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>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Add (temporary) syntax.AllowTypeLists mode to control the
acceptance of type lists; the compiler doesn't set it,
but existing syntax and types2 tests do so that the code
remains exercised while it exists.
Adjust various tests to use the type set notation.
Change-Id: I798e607912552db6bfe38a7cd4324b74c6bf4d95
Reviewed-on: https://go-review.googlesource.com/c/go/+/347249
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>
When type-checking expressions, detection of uninstantiated generic
functions and types was somewhat ad-hoc.
Add an extra parameter "allowGenerics" to rawExpr. If not set, the
result operand cannot be generic.
The only place where rawExpr is called with allowGenerics != false
is from exprOrType, which passes an allowGenerics parameter through.
The only place where exprOrType is called with allowGenerics == true
is when handling index expressions and calls. Make sure that we only
accept generic operands where expected, and check the other branches.
As a result, a recently added varType call (CL 345970) can be removed
again.
This also fixes a bug where an error for a conversion to generic
type was reported after the conversion (i.e., with the converted
value, rather than the generic type). Added a test case for that.
For #48048.
Change-Id: I8576326f5fcfb58d78b3ce8572068aa32e66c568
Reviewed-on: https://go-review.googlesource.com/c/go/+/346471
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
For #42777.
Change-Id: I963db8c666e8bcf0fc4f390b359db6408a0f792b
Reviewed-on: https://go-review.googlesource.com/c/go/+/347010
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This CL skips reading of imported function bodies except from the
local package or for inlining. Previously, we wasted a bunch of CPU
and memory by reading in normal function bodies for all imported
functions and methods.
Change-Id: I0b3df3f4a3e2819117dac11a1f9e4526288c14d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/347030
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This CL delays unified IR's wrapper generation to after inlining.
Change-Id: Idfe496663489d6b797a647eb17200c6322d0334a
Reviewed-on: https://go-review.googlesource.com/c/go/+/347029
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Change-Id: Ibc23b43dc9a7fabb27d7991977b283459f3deae3
Reviewed-on: https://go-review.googlesource.com/c/go/+/333009
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Add support to the assembler for F[N]M{ADD,SUB}[SD] instructions.
Argument order is:
OP RS1, RS2, RS3, RD
Also, add support for the FMA intrinsic to the compiler. Automatic
FMA matching is left to a future CL.
Change-Id: I47166c7393b2ab6bfc2e42aa8c1a8997c3a071b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/293030
Trust: Michael Munday <mike.munday@lowrisc.org>
Run-TryBot: Michael Munday <mike.munday@lowrisc.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
In -G=3 mode, irgen use its own generated IR, which is mis-handling of
bodyless function and declared function with //go:noescape pragma.
Fix this by adopting the same logic in noder.funcDecl, which minor
change in linkname detection.
Fixes#48097
Change-Id: Ibef921c1f75e071ca61685e0cb4543f2ee5efc7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/346470
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This CL splits the creation of the "init" function responsible for
executing package-scope variable initialization statemens from the
creation of the "inittask" record that tells the runtime how to
sequence all program-wide package initialization.
Longer term, this is desirable because sorting variable initialization
is already handled by types2 (with Info.InitOrder), so we might as
well reuse that.
As a more immediate impetus, for unified IR, I want to defer method
wrapper generation until after inlining (to know which wrappers are
needed). But the staticinit optimization used to decide whether to
emit the inittask calls into reflectdata, which in turn tries to
generate its own method wrappers. So separating the work allows to
create the "init" function early and then emit "inittask" after
inlining is done.
Change-Id: Ice1d421f92feecaaeafdf7da6b9647c0f27e3571
Reviewed-on: https://go-review.googlesource.com/c/go/+/346629
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Improve the code which fixes up conditional branches which exceed the
range of a single instruction by inserting one extra jump when
possible instead of two.
Change-Id: Ib0eb5b0f47f7d0e0ccd55471307a5f73fbda88a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/342930
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
If the TypeParam has all the methods of an interface, allow conversions from TypeParam to interface
Fixes#47708
Change-Id: I40a82a31f6ea9354130dbe3bcfc83537094bf12c
Reviewed-on: https://go-review.googlesource.com/c/go/+/342509
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Trust: Keith Randall <khr@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Rather than jumping and branching to a label (the offset for which changes
when instructions are added or removed), use PC-relative offsets. This
reduces unnecessary churn in the instruction encodings.
Change-Id: I6816ce939eeabdf828039f59f4f29260eb1ac8da
Reviewed-on: https://go-review.googlesource.com/c/go/+/344449
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Munday <mike.munday@lowrisc.org>
Add more error tests for riscv64 assembly. Also avoid a panic when one of
these error conditions is hit.
Change-Id: If5d913894facbd67f7d014eab745da77c8c66ab0
Reviewed-on: https://go-review.googlesource.com/c/go/+/344228
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Otherwise the modifications of transformAssign are dropped on the floor.
Change-Id: Id40782564952ed53f9ade1dba4e85290c8522abc
Reviewed-on: https://go-review.googlesource.com/c/go/+/346590
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>
Missing case types.TUNSAFEPTR in parameterizedBy().
Also realized there was the same missing case in the type substituter
(*Tsubster).Typ().
Fixes#48103
Change-Id: If71f1a6ef80932f0e2120d4c18b39a30189fd8fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/346669
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
CL 309831 fixed importing of method expressions, by re-using the same
code already have for ODOTMETH. But that code does not work with
embedded field.
To fix this, we need to calculate all methods of the receiver base type
of method expression, before looking up the selection.
Fixes#48088
Change-Id: Ia244d36a3ed0f989735eb57becdfa70a81912f57
Reviewed-on: https://go-review.googlesource.com/c/go/+/346489
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: Matthew Dempsky <mdempsky@google.com>
This is a port of CL 346294 to go/types.
Change-Id: Ib70541a92e352c8df8123c8b82bb4eeedce3b89f
Reviewed-on: https://go-review.googlesource.com/c/go/+/346560
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 346291 to go/types.
Change-Id: I8f864aca5cdb4037bc27a81cde1597430b9a48db
Reviewed-on: https://go-review.googlesource.com/c/go/+/346559
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 346009 to go/types. An unnecessary break statement
was removed from both the port and types2.
Change-Id: I2cc1328a61100d4b01a2d26ac7bac9044440d579
Reviewed-on: https://go-review.googlesource.com/c/go/+/346558
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345929 to go/types. It is also a step toward making
instantiation concurrency-safe.
Also fix some whitespace in instantiate.go.
Updates #47910
Change-Id: Icdeb227cb83eee15da6db90daab294c8c55db601
Reviewed-on: https://go-review.googlesource.com/c/go/+/346557
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345791 to go/types.
Change-Id: I673c22ad8b668f07aae4117555b1c0efb273fb78
Reviewed-on: https://go-review.googlesource.com/c/go/+/346556
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345891 to go/types.
Change-Id: I5abcb9c9c5110923a743f0c47d9b34b2baabab68
Reviewed-on: https://go-review.googlesource.com/c/go/+/346555
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345890 to go/types.
Change-Id: I98162deaf044b2194b05dc51e6948e227216fc4d
Reviewed-on: https://go-review.googlesource.com/c/go/+/346554
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345472 to go/types.
Change-Id: I0e2a88909ecebe9dea3325244153f5c74e4c3ce7
Reviewed-on: https://go-review.googlesource.com/c/go/+/346553
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345471 to go/types.
Change-Id: Icad5fb8b3b4375182f420a51c80607b88696561e
Reviewed-on: https://go-review.googlesource.com/c/go/+/346552
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This is a port of CL 345177 to go/types.
Change-Id: I79fcfbf5b28e9a7a2e66c81bc831e164a8da8bbb
Reviewed-on: https://go-review.googlesource.com/c/go/+/346551
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>