]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] all: add GOEXPERIMENT=unified knob
authorMatthew Dempsky <mdempsky@google.com>
Thu, 17 Jun 2021 04:41:28 +0000 (21:41 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 17 Jun 2021 09:09:02 +0000 (09:09 +0000)
commit804ecc2581caf33ae347d6a1ce67436d1f74e93b
treed04b43c900a4e302a32d66378b695b92c480576d
parentb14fd720a8c3822161ed85447774e38fab835f6f
[dev.typeparams] all: add GOEXPERIMENT=unified knob

Setting `-gcflags=all=-d=unified` works for normal builds/tests, but
seems to have trouble with the test/run.go regress tests. So add a
GOEXPERIMENT knob to allow another way to turn on unified IR
construction, which plays better with all.bash.

While here, update two existing test expectations that currently fail
during GOEXPERIMENT=unified ./all.bash:

1. misc/cgo/errors/testdata/err2.go is testing column positions, and
types2 gets one case slightly better, and another case slightly
worse. For now, the test case is updated to accept both.

2. fixedbugs/issue42284.go is added to the list of known failures,
because it fails for unified IR. (It's an escape analysis test, and
escape analysis is working as expected; but unified is formatting an
imported constant value differently than the test's regexp expects.)

Updates #46786.

Change-Id: I40a4a70fa1b85ac87fcc85a43687f5d81e011ec0
Reviewed-on: https://go-review.googlesource.com/c/go/+/328215
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
misc/cgo/errors/testdata/err2.go
src/cmd/compile/internal/base/flag.go
src/internal/goexperiment/exp_unified_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_unified_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go
test/run.go