From: Matthew Dempsky Date: Tue, 20 Jul 2021 19:46:13 +0000 (-0700) Subject: [dev.typeparams] all: merge master (c8f4e61) into dev.typeparams X-Git-Tag: go1.18beta1~1818^2^2~137 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=e4994e71fb1809d8ce7df89e471586e05797e171;p=gostls13.git [dev.typeparams] all: merge master (c8f4e61) into dev.typeparams Conflicts: - src/runtime/internal/sys/zgoarch_386.go - src/runtime/internal/sys/zgoarch_amd64.go - src/runtime/internal/sys/zgoarch_arm.go - src/runtime/internal/sys/zgoarch_arm64.go - src/runtime/internal/sys/zgoarch_arm64be.go - src/runtime/internal/sys/zgoarch_armbe.go - src/runtime/internal/sys/zgoarch_mips.go - src/runtime/internal/sys/zgoarch_mips64.go - src/runtime/internal/sys/zgoarch_mips64le.go - src/runtime/internal/sys/zgoarch_mips64p32.go - src/runtime/internal/sys/zgoarch_mips64p32le.go - src/runtime/internal/sys/zgoarch_mipsle.go - src/runtime/internal/sys/zgoarch_ppc.go - src/runtime/internal/sys/zgoarch_ppc64.go - src/runtime/internal/sys/zgoarch_ppc64le.go - src/runtime/internal/sys/zgoarch_riscv.go - src/runtime/internal/sys/zgoarch_riscv64.go - src/runtime/internal/sys/zgoarch_s390.go - src/runtime/internal/sys/zgoarch_s390x.go - src/runtime/internal/sys/zgoarch_sparc.go - src/runtime/internal/sys/zgoarch_sparc64.go - src/runtime/internal/sys/zgoarch_wasm.go On dev.typeparams, CL 328336 moved these files to internal/goarch; whereas on master, CL 333909 reserved GOARCH=loong64. For this CL, I resolved the conflict by simply running "go generate internal/goarch". Merge List: + 2021-07-19 c8f4e6152d spec: correct example comment in Conversions from slice to array + 2021-07-19 1d91551b73 time: correct typo in documentation for UnixMicro + 2021-07-19 404127c30f cmd/compile: fix off-by-one error in traceback argument counting + 2021-07-19 6298cfe672 cmd/compile: fix typo in fatal message of builtinCall + 2021-07-19 49402bee36 cmd/{compile,link}: fix bug in map.zero handling + 2021-07-18 a66190ecee test/bench/go1: fix size for RegexpMatchMedium_32 + 2021-07-18 650fc2117a text/scanner: use Go convention in Position doc comment + 2021-07-16 aa4e0f528e net/http: correct capitalization in cancelTimeBody comment + 2021-07-15 0941dbca6a testing: clarify in docs that TestMain is advanced + 2021-07-15 69728ead87 cmd/go: update error messages in tests to match CL 332573 + 2021-07-15 c1cc9f9c3d cmd/compile: fix lookup package of redeclared dot import symbol + 2021-07-15 21a04e3335 doc/go1.17: mention GOARCH=loong64 + 2021-07-14 2b00a54baf go/build, runtime/internal/sys: reserve GOARCH=loong64 + 2021-07-14 60ddf42b46 cmd/go: change link in error message from /wiki to /doc. + 2021-07-13 d8f348a589 cmd/go: remove a duplicated word from 'go help mod graph' + 2021-07-12 a98589711d crypto/tls: test key type when casting + 2021-07-12 cfbd73ba33 doc/go1.17: editing pass over the "Compiler" section + 2021-07-09 ab4085ce84 runtime/pprof: call runtime.GC twice in memory profile test Change-Id: I1490a4c7e4c560659c21a4eb67d243f35d1f908e --- e4994e71fb1809d8ce7df89e471586e05797e171 diff --cc src/internal/goarch/zgoarch_386.go index 7fa23b07ef,0000000000..2395b80951 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_386.go +++ b/src/internal/goarch/zgoarch_386.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build 386 +// +build 386 + +package goarch + +const GOARCH = `386` + +const Is386 = 1 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_amd64.go index a6bf1cc6f4,0000000000..c301d279c1 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_amd64.go +++ b/src/internal/goarch/zgoarch_amd64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build amd64 +// +build amd64 + +package goarch + +const GOARCH = `amd64` + +const Is386 = 0 +const IsAmd64 = 1 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_arm.go index dcdaa1f44d,0000000000..4a5ff37999 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_arm.go +++ b/src/internal/goarch/zgoarch_arm.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build arm +// +build arm + +package goarch + +const GOARCH = `arm` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 1 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_arm64.go index dd8d9806ab,0000000000..840e280f94 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_arm64.go +++ b/src/internal/goarch/zgoarch_arm64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build arm64 +// +build arm64 + +package goarch + +const GOARCH = `arm64` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 1 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_arm64be.go index a37df97031,0000000000..bdbe5faacf mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_arm64be.go +++ b/src/internal/goarch/zgoarch_arm64be.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build arm64be +// +build arm64be + +package goarch + +const GOARCH = `arm64be` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 1 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_armbe.go index 909b114330,0000000000..36be514a0b mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_armbe.go +++ b/src/internal/goarch/zgoarch_armbe.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build armbe +// +build armbe + +package goarch + +const GOARCH = `armbe` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 1 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_loong64.go index 0000000000,0000000000..9465cf5bf5 new file mode 100644 --- /dev/null +++ b/src/internal/goarch/zgoarch_loong64.go @@@ -1,0 -1,0 +1,33 @@@ ++// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. ++ ++//go:build loong64 ++// +build loong64 ++ ++package goarch ++ ++const GOARCH = `loong64` ++ ++const Is386 = 0 ++const IsAmd64 = 0 ++const IsAmd64p32 = 0 ++const IsArm = 0 ++const IsArmbe = 0 ++const IsArm64 = 0 ++const IsArm64be = 0 ++const IsPpc64 = 0 ++const IsPpc64le = 0 ++const IsLoong64 = 1 ++const IsMips = 0 ++const IsMipsle = 0 ++const IsMips64 = 0 ++const IsMips64le = 0 ++const IsMips64p32 = 0 ++const IsMips64p32le = 0 ++const IsPpc = 0 ++const IsRiscv = 0 ++const IsRiscv64 = 0 ++const IsS390 = 0 ++const IsS390x = 0 ++const IsSparc = 0 ++const IsSparc64 = 0 ++const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mips.go index 0ff91f201a,0000000000..e1458c0485 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mips.go +++ b/src/internal/goarch/zgoarch_mips.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mips +// +build mips + +package goarch + +const GOARCH = `mips` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 1 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mips64.go index 3b61356b18,0000000000..7de345e321 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mips64.go +++ b/src/internal/goarch/zgoarch_mips64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mips64 +// +build mips64 + +package goarch + +const GOARCH = `mips64` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 1 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mips64le.go index 14c9330cad,0000000000..96b1c3c021 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mips64le.go +++ b/src/internal/goarch/zgoarch_mips64le.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mips64le +// +build mips64le + +package goarch + +const GOARCH = `mips64le` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 1 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mips64p32.go index b7429f2bf3,0000000000..91d1f3c4df mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mips64p32.go +++ b/src/internal/goarch/zgoarch_mips64p32.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mips64p32 +// +build mips64p32 + +package goarch + +const GOARCH = `mips64p32` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 1 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mips64p32le.go index 35c21c1675,0000000000..18f2ef2347 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mips64p32le.go +++ b/src/internal/goarch/zgoarch_mips64p32le.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mips64p32le +// +build mips64p32le + +package goarch + +const GOARCH = `mips64p32le` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 1 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_mipsle.go index ba7be189bc,0000000000..4551de1a32 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_mipsle.go +++ b/src/internal/goarch/zgoarch_mipsle.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build mipsle +// +build mipsle + +package goarch + +const GOARCH = `mipsle` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 1 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_ppc.go index ab19982a12,0000000000..ffed58c2e5 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_ppc.go +++ b/src/internal/goarch/zgoarch_ppc.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build ppc +// +build ppc + +package goarch + +const GOARCH = `ppc` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 1 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_ppc64.go index d3e35ca877,0000000000..c369c74166 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_ppc64.go +++ b/src/internal/goarch/zgoarch_ppc64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build ppc64 +// +build ppc64 + +package goarch + +const GOARCH = `ppc64` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 1 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_ppc64le.go index ef24e95c4d,0000000000..de5bae2a81 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_ppc64le.go +++ b/src/internal/goarch/zgoarch_ppc64le.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build ppc64le +// +build ppc64le + +package goarch + +const GOARCH = `ppc64le` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 1 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_riscv.go index fe6b385c50,0000000000..07c9d81b39 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_riscv.go +++ b/src/internal/goarch/zgoarch_riscv.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build riscv +// +build riscv + +package goarch + +const GOARCH = `riscv` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 1 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_riscv64.go index 85299a6b4b,0000000000..24e6ef3fdf mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_riscv64.go +++ b/src/internal/goarch/zgoarch_riscv64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build riscv64 +// +build riscv64 + +package goarch + +const GOARCH = `riscv64` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 1 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_s390.go index 39325c473e,0000000000..429206d653 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_s390.go +++ b/src/internal/goarch/zgoarch_s390.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build s390 +// +build s390 + +package goarch + +const GOARCH = `s390` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 1 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_s390x.go index 64d714ace2,0000000000..0c59005216 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_s390x.go +++ b/src/internal/goarch/zgoarch_s390x.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build s390x +// +build s390x + +package goarch + +const GOARCH = `s390x` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 1 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_sparc.go index 9ccd362414,0000000000..83a356e4c7 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_sparc.go +++ b/src/internal/goarch/zgoarch_sparc.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build sparc +// +build sparc + +package goarch + +const GOARCH = `sparc` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 1 +const IsSparc64 = 0 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_sparc64.go index 490a714eb6,0000000000..7c9d40986e mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_sparc64.go +++ b/src/internal/goarch/zgoarch_sparc64.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build sparc64 +// +build sparc64 + +package goarch + +const GOARCH = `sparc64` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 1 +const IsWasm = 0 diff --cc src/internal/goarch/zgoarch_wasm.go index a4b4a38401,0000000000..5aac1dfc47 mode 100644,000000..100644 --- a/src/internal/goarch/zgoarch_wasm.go +++ b/src/internal/goarch/zgoarch_wasm.go @@@ -1,32 -1,0 +1,33 @@@ +// Code generated by gengoarch.go using 'go generate'. DO NOT EDIT. + +//go:build wasm +// +build wasm + +package goarch + +const GOARCH = `wasm` + +const Is386 = 0 +const IsAmd64 = 0 +const IsAmd64p32 = 0 +const IsArm = 0 +const IsArmbe = 0 +const IsArm64 = 0 +const IsArm64be = 0 +const IsPpc64 = 0 +const IsPpc64le = 0 ++const IsLoong64 = 0 +const IsMips = 0 +const IsMipsle = 0 +const IsMips64 = 0 +const IsMips64le = 0 +const IsMips64p32 = 0 +const IsMips64p32le = 0 +const IsPpc = 0 +const IsRiscv = 0 +const IsRiscv64 = 0 +const IsS390 = 0 +const IsS390x = 0 +const IsSparc = 0 +const IsSparc64 = 0 +const IsWasm = 1 diff --cc test/run.go index 3ccf1046ce,d7f5d02391..ce0d645985 --- a/test/run.go +++ b/test/run.go @@@ -2093,162 -1941,66 +2093,163 @@@ func overlayDir(dstRoot, srcRoot string }) } +// The following is temporary scaffolding to get types2 typechecker +// up and running against the existing test cases. The explicitly +// listed files don't pass yet, usually because the error messages +// are slightly different (this list is not complete). Any errorcheck +// tests that require output from analysis phases past initial type- +// checking are also excluded since these phases are not running yet. +// We can get rid of this code once types2 is fully plugged in. + // List of files that the compiler cannot errorcheck with the new typechecker (compiler -G option). // Temporary scaffolding until we pass all the tests at which point this map can be removed. -var excluded = map[string]bool{ - "complit1.go": true, // types2 reports extra errors - "const2.go": true, // types2 not run after syntax errors - "ddd1.go": true, // issue #42987 - "directive.go": true, // misplaced compiler directive checks - "float_lit3.go": true, // types2 reports extra errors - "import1.go": true, // types2 reports extra errors - "import5.go": true, // issue #42988 - "import6.go": true, // issue #43109 - "initializerr.go": true, // types2 reports extra errors - "linkname2.go": true, // error reported by noder (not running for types2 errorcheck test) - "notinheap.go": true, // types2 doesn't report errors about conversions that are invalid due to //go:notinheap - "shift1.go": true, // issue #42989 - "typecheck.go": true, // invalid function is not causing errors when called - "writebarrier.go": true, // correct diagnostics, but different lines (probably irgen's fault) - - "fixedbugs/bug176.go": true, // types2 reports all errors (pref: types2) - "fixedbugs/bug195.go": true, // types2 reports slightly different (but correct) bugs - "fixedbugs/bug228.go": true, // types2 not run after syntax errors - "fixedbugs/bug231.go": true, // types2 bug? (same error reported twice) - "fixedbugs/bug255.go": true, // types2 reports extra errors - "fixedbugs/bug351.go": true, // types2 reports extra errors - "fixedbugs/bug374.go": true, // types2 reports extra errors - "fixedbugs/bug385_32.go": true, // types2 doesn't produce missing error "type .* too large" (32-bit specific) - "fixedbugs/bug388.go": true, // types2 not run due to syntax errors - "fixedbugs/bug412.go": true, // types2 produces a follow-on error - - "fixedbugs/issue11590.go": true, // types2 doesn't report a follow-on error (pref: types2) - "fixedbugs/issue11610.go": true, // types2 not run after syntax errors - "fixedbugs/issue11614.go": true, // types2 reports an extra error - "fixedbugs/issue13415.go": true, // declared but not used conflict - "fixedbugs/issue14520.go": true, // missing import path error by types2 - "fixedbugs/issue16428.go": true, // types2 reports two instead of one error - "fixedbugs/issue17038.go": true, // types2 doesn't report a follow-on error (pref: types2) - "fixedbugs/issue17645.go": true, // multiple errors on same line - "fixedbugs/issue18331.go": true, // missing error about misuse of //go:noescape (irgen needs code from noder) - "fixedbugs/issue18393.go": true, // types2 not run after syntax errors - "fixedbugs/issue19012.go": true, // multiple errors on same line - "fixedbugs/issue20233.go": true, // types2 reports two instead of one error (pref: compiler) - "fixedbugs/issue20245.go": true, // types2 reports two instead of one error (pref: compiler) - "fixedbugs/issue20250.go": true, // correct diagnostics, but different lines (probably irgen's fault) - "fixedbugs/issue21979.go": true, // types2 doesn't report a follow-on error (pref: types2) - "fixedbugs/issue23732.go": true, // types2 reports different (but ok) line numbers - "fixedbugs/issue25958.go": true, // types2 doesn't report a follow-on error (pref: types2) - "fixedbugs/issue28079b.go": true, // types2 reports follow-on errors - "fixedbugs/issue28268.go": true, // types2 reports follow-on errors - "fixedbugs/issue33460.go": true, // types2 reports alternative positions in separate error - "fixedbugs/issue41575.go": true, // types2 reports alternative positions in separate error - "fixedbugs/issue42058a.go": true, // types2 doesn't report "channel element type too large" - "fixedbugs/issue42058b.go": true, // types2 doesn't report "channel element type too large" - "fixedbugs/issue4232.go": true, // types2 reports (correct) extra errors - "fixedbugs/issue4452.go": true, // types2 reports (correct) extra errors - "fixedbugs/issue5609.go": true, // types2 needs a better error message - "fixedbugs/issue6889.go": true, // types2 can handle this without constant overflow - "fixedbugs/issue7525.go": true, // types2 reports init cycle error on different line - ok otherwise - "fixedbugs/issue7525b.go": true, // types2 reports init cycle error on different line - ok otherwise - "fixedbugs/issue7525c.go": true, // types2 reports init cycle error on different line - ok otherwise - "fixedbugs/issue7525d.go": true, // types2 reports init cycle error on different line - ok otherwise - "fixedbugs/issue7525e.go": true, // types2 reports init cycle error on different line - ok otherwise - "fixedbugs/issue46749.go": true, // types2 reports can not convert error instead of type mismatched +var types2Failures = setOf( + "directive.go", // misplaced compiler directive checks + "float_lit3.go", // types2 reports extra errors + "import1.go", // types2 reports extra errors + "import6.go", // issue #43109 + "initializerr.go", // types2 reports extra errors + "linkname2.go", // error reported by noder (not running for types2 errorcheck test) + "notinheap.go", // types2 doesn't report errors about conversions that are invalid due to //go:notinheap + "shift1.go", // issue #42989 + "typecheck.go", // invalid function is not causing errors when called + + "interface/private.go", // types2 phrases errors differently (doesn't use non-spec "private" term) + + "fixedbugs/bug176.go", // types2 reports all errors (pref: types2) + "fixedbugs/bug195.go", // types2 reports slightly different (but correct) bugs + "fixedbugs/bug228.go", // types2 doesn't run when there are syntax errors + "fixedbugs/bug231.go", // types2 bug? (same error reported twice) + "fixedbugs/bug255.go", // types2 reports extra errors + "fixedbugs/bug374.go", // types2 reports extra errors + "fixedbugs/bug388.go", // types2 not run due to syntax errors + "fixedbugs/bug412.go", // types2 produces a follow-on error + + "fixedbugs/issue10700.go", // types2 reports ok hint, but does not match regexp + "fixedbugs/issue11590.go", // types2 doesn't report a follow-on error (pref: types2) + "fixedbugs/issue11610.go", // types2 not run after syntax errors + "fixedbugs/issue11614.go", // types2 reports an extra error + "fixedbugs/issue14520.go", // missing import path error by types2 + "fixedbugs/issue16133.go", // types2 doesn't use package path for qualified identifiers when package name is ambiguous + "fixedbugs/issue16428.go", // types2 reports two instead of one error + "fixedbugs/issue17038.go", // types2 doesn't report a follow-on error (pref: types2) + "fixedbugs/issue17645.go", // multiple errors on same line + "fixedbugs/issue18331.go", // missing error about misuse of //go:noescape (irgen needs code from noder) + "fixedbugs/issue18419.go", // types2 reports + "fixedbugs/issue19012.go", // multiple errors on same line + "fixedbugs/issue20233.go", // types2 reports two instead of one error (pref: compiler) + "fixedbugs/issue20245.go", // types2 reports two instead of one error (pref: compiler) + "fixedbugs/issue21979.go", // types2 doesn't report a follow-on error (pref: types2) + "fixedbugs/issue23732.go", // types2 reports different (but ok) line numbers + "fixedbugs/issue25958.go", // types2 doesn't report a follow-on error (pref: types2) + "fixedbugs/issue28079b.go", // types2 reports follow-on errors + "fixedbugs/issue28268.go", // types2 reports follow-on errors + "fixedbugs/issue31053.go", // types2 reports "unknown field" instead of "cannot refer to unexported field" + "fixedbugs/issue33460.go", // types2 reports alternative positions in separate error + "fixedbugs/issue42058a.go", // types2 doesn't report "channel element type too large" + "fixedbugs/issue42058b.go", // types2 doesn't report "channel element type too large" + "fixedbugs/issue4232.go", // types2 reports (correct) extra errors + "fixedbugs/issue4452.go", // types2 reports (correct) extra errors + "fixedbugs/issue4510.go", // types2 reports different (but ok) line numbers ++ "fixedbugs/issue47201.go", // types2 spells the error message differently + "fixedbugs/issue5609.go", // types2 needs a better error message + "fixedbugs/issue7525b.go", // types2 reports init cycle error on different line - ok otherwise + "fixedbugs/issue7525c.go", // types2 reports init cycle error on different line - ok otherwise + "fixedbugs/issue7525d.go", // types2 reports init cycle error on different line - ok otherwise + "fixedbugs/issue7525e.go", // types2 reports init cycle error on different line - ok otherwise + "fixedbugs/issue7525.go", // types2 reports init cycle error on different line - ok otherwise +) + +var types2Failures32Bit = setOf( + "printbig.go", // large untyped int passed to print (32-bit) + "fixedbugs/bug114.go", // large untyped int passed to println (32-bit) + "fixedbugs/issue23305.go", // large untyped int passed to println (32-bit) + "fixedbugs/bug385_32.go", // types2 doesn't produce missing error "type .* too large" (32-bit specific) +) + +var g3Failures = setOf( + "writebarrier.go", // correct diagnostics, but different lines (probably irgen's fault) + + "typeparam/nested.go", // -G=3 doesn't support function-local types with generics + + "typeparam/mdempsky/4.go", // -G=3 can't export functions with labeled breaks in loops +) + +var unifiedFailures = setOf( + "closure3.go", // unified IR numbers closures differently than -d=inlfuncswithclosures + "escape4.go", // unified IR can inline f5 and f6; test doesn't expect this + "inline.go", // unified IR reports function literal diagnostics on different lines than -d=inlfuncswithclosures + + "fixedbugs/issue42284.go", // prints "T(0) does not escape", but test expects "a.I(a.T(0)) does not escape" + "fixedbugs/issue7921.go", // prints "… escapes to heap", but test expects "string(…) escapes to heap" +) + +func setOf(keys ...string) map[string]bool { + m := make(map[string]bool, len(keys)) + for _, key := range keys { + m[key] = true + } + return m +} + +// splitQuoted splits the string s around each instance of one or more consecutive +// white space characters while taking into account quotes and escaping, and +// returns an array of substrings of s or an empty list if s contains only white space. +// Single quotes and double quotes are recognized to prevent splitting within the +// quoted region, and are removed from the resulting substrings. If a quote in s +// isn't closed err will be set and r will have the unclosed argument as the +// last element. The backslash is used for escaping. +// +// For example, the following string: +// +// a b:"c d" 'e''f' "g\"" +// +// Would be parsed as: +// +// []string{"a", "b:c d", "ef", `g"`} +// +// [copied from src/go/build/build.go] +func splitQuoted(s string) (r []string, err error) { + var args []string + arg := make([]rune, len(s)) + escaped := false + quoted := false + quote := '\x00' + i := 0 + for _, rune := range s { + switch { + case escaped: + escaped = false + case rune == '\\': + escaped = true + continue + case quote != '\x00': + if rune == quote { + quote = '\x00' + continue + } + case rune == '"' || rune == '\'': + quoted = true + quote = rune + continue + case unicode.IsSpace(rune): + if quoted || i > 0 { + quoted = false + args = append(args, string(arg[:i])) + i = 0 + } + continue + } + arg[i] = rune + i++ + } + if quoted || i > 0 { + args = append(args, string(arg[:i])) + } + if quote != 0 { + err = errors.New("unclosed quote") + } else if escaped { + err = errors.New("unfinished escaping") + } + return args, err }