aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-24[dev.go2go] README: document that this branch is no longer maintaineddev.go2goIan Lance Taylor
For golang/go#46346 Change-Id: Iab050557efb96217477072eca42966662485b6b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/322192 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2021-04-13[dev.go2go] cmd/go2go: don't pass "run run" to cmd/goIan Lance Taylor
Fixes #45502 Change-Id: I510c47e7780a42ffd0c855da5ce1674d487c1633 Reviewed-on: https://go-review.googlesource.com/c/go/+/309570 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2021-03-22cmd/go2go: add ability to specify build tags in go2goAlan D. Cabrera
You can specify build tags, so that imports properly work during translation, by using the `-tags` option, e.g. `go tool go2go run -tags=appengine x.go2`. The `-tags` option is available for all the `go2go` sub-commands. Change-Id: Ib60e7542b10c6a561b61db23d35592b2bc7f63cd GitHub-Last-Rev: 954cccfae819aaac1cb78b97905e2a97dfdcefa7 GitHub-Pull-Request: golang/go#45147 Reviewed-on: https://go-review.googlesource.com/c/go/+/303275 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2021-03-04[dev.go2go] all: merge master (12bb256) into dev.go2goRob Findley
Included in this merge are CL 293010 switching to a new ast.ListExpr for type argument lists (instead of overloading CallExpr), and CL 295929 partially hiding the new type parameter API. As a result of those two CLs, the following changes were made to fix the go2go tool: + Update the go2go rewriter for the new syntax. + Update test cases to eliminate some remaining '()' syntax for type argument lists. + Add new files exposing the now-hidden API. These changes can be reviewed by comparing the latest patchset to patchset 1. Merge List: + 2021-03-04 12bb256cb3 go/types: use correct recv for parameterized embedded methods + 2021-03-03 6db80d7420 cmd/compile/internal/types2: use correct recv for parameterized embedded methods + 2021-03-03 d6f6ef6358 cmd/compile: remove races introduced in abiutils field update + 2021-03-03 3e524ee65a cmd/compile: make modified Aux type for OpArgXXXX pass ssa/check + 2021-03-03 9f33dc3ca1 cmd/compile: handle aggregate OpArg in registers + 2021-03-03 c4e3f6c4c7 cmd/compile: remove 8-byte alignment requirement of stack slot on s390x + 2021-03-03 85f62b0941 cmd/compile: remove 8-byte alignment requirement of stack slot on mips + 2021-03-03 497feff168 cmd/compile: intrinsify runtime/internal/atomic.{And,Or}{8,} on RISCV64 + 2021-03-03 00cb841b83 syscall: implement rawVforkSyscall for remaining linux platforms + 2021-03-03 f2df1e3c34 cmd/compile: retrieve Args from registers + 2021-03-03 06c72f3627 A+C: change email address for Baokun Lee + 2021-03-03 84ca4949a7 cmd/compile: remove 8-byte alignment requirement of stack slot on mips64 + 2021-03-03 77973863c3 cmd/compile: use abiutils for all rcvr/in/out frame offsets. + 2021-03-03 aea1259a72 cmd/link: disable flaky Darwin "symbols" test + 2021-03-02 312fd9937d cmd/go: remove -insecure flag on go get + 2021-03-02 2a2f99eefb cmd/go/internal/modload: do not resolve an arbitrary version for 'go list --versions' + 2021-03-02 b65091c11d cmd/go: add a test case that reproduces #44296 + 2021-03-02 e9eed78dc3 cmd/go: resolve std-vendored dependencies as std packages except in 'go get' and 'go mod' + 2021-03-02 09f4ef4fa7 cmd/go/internal/mvs: prune spurious dependencies in Downgrade + 2021-03-02 c6374f5162 dist: generate stub go.mod in workdir + 2021-03-02 97b32a6724 cmd/compile: better version of check frame offsets against abi + 2021-03-02 2b50ab2aee cmd/compile: optimize single-precision floating point square root + 2021-03-02 ebb92dfed9 internal/poll, runtime: handle netpollopen error in poll_runtime_pollOpen + 2021-03-02 4c1a7ab49c cmd/go: reject relative paths in GOMODCACHE environment + 2021-03-02 580636a78a all: fix spelling + 2021-03-02 a6eeb4add4 go/parser,go/types: hide API changes related to type parameters + 2021-03-02 ff5cf4ced3 cmd/link,debug/elf: mips32, add .gnu.attributes and .MIPS.abiflags sections + 2021-03-01 700b73975e runtime: use entersyscall in syscall_syscallX on Darwin + 2021-03-01 a69c45213d go/types: review of expr.go + 2021-03-01 b98ce3b606 cmd/compile: import empty closure function correctly + 2021-03-01 97bdac03ae cmd: upgrade golang.org/x/mod to relax import path check + 2021-03-01 f6a74c6568 cmd/compile/internal/ir: fix up stale comment + 2021-03-01 87beecd6df cmd/go: add missing newline to retraction warning message + 2021-03-01 a400eb3261 Revert "cmd/compile: check frame offsets against abi" + 2021-03-01 5fafc0bbd4 cmd/go/internal/modload: don't query when fixing canonical versions + 2021-03-01 2a8df4488e os: mark pipes returned by os.Pipe() as inheritable by default + 2021-02-27 5ff7ec98b7 cmd/compile: check frame offsets against abi + 2021-02-27 a429926159 cmd/compile: fix escape analysis of heap-allocated results + 2021-02-27 998fe70b68 cmd/compile: fixed which-result confusion in presence of 0-width types + 2021-02-27 d9fd38e68b time: correct unusual extension string cases + 2021-02-26 cda8ee095e reflect: fix register ABI spill space calculation + 2021-02-26 d8e33d558e cmd/compile: deal with closures in generic functions and instantiated function values + 2021-02-26 19f96e73bf syscall: introduce SysProcAttr.ParentProcess on Windows + 2021-02-26 3146166baa syscall: introduce SysProcAttr.AdditionalInheritedHandles on Windows + 2021-02-26 2d760816ff syscall: restrict inherited handles on Windows + 2021-02-26 ba9168bd07 syscall: add support for proc thread attribute lists + 2021-02-26 f41460145e cmd/link: recognize ARM64 PE files and relocations + 2021-02-26 a655208c9e cmd/link: handle types as converted to interface when dynlink + 2021-02-26 23943a6737 cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer + 2021-02-26 e25040d162 cmd/compile: change StaticCall to return a "Results" + 2021-02-26 9a555fc24c cmd/compile: fix missing descend in Addrtaken for closures. + 2021-02-25 a61524d103 cmd/internal/obj: add Prog.SetFrom3{Reg,Const} + 2021-02-25 5f15af111c syscall: comment on fields omitted from the win32finddata1 struct + 2021-02-25 9a7fe196e4 Revert "cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer" + 2021-02-25 b83d073e9e reflect: add Method.IsExported and StructField.IsExported methods + 2021-02-25 7fcf9893f7 cmd/internal/obj: fix typo in docs + 2021-02-25 6c3bcda866 cmd/compile: declare inlined result params early for empty returns + 2021-02-25 526ee96f49 os: avoid allocation in File.WriteString + 2021-02-25 194b636f8f database/sql: close driver.Connector if it implements io.Closer + 2021-02-25 4ebb6f5110 cmd/compile: automate resultInArg0 register checks + 2021-02-25 1a3e968b1f cmd/compile: fix mishandling of unsafe-uintptr arguments with call method in go/defer + 2021-02-25 ee2a45e5fb runtime: use pipe2 for nonblockingPipe on dragonfly + 2021-02-25 1f7a01459b runtime: batch moving gFree list between local p and global schedt + 2021-02-25 bcac57f89c cmd: upgrade golang.org/x/mod to fix go.mod parser + 2021-02-25 3137da82fd cmd/go: add a script test corresponding to the downhiddenartifact MVS test + 2021-02-25 2c4c189bba cmd/go/internal/mvs: add test cases for downgrade interaction with hidden versions + 2021-02-25 9fe8ebf9b4 test: add test case that failed with gccgo + 2021-02-25 ad17b65b34 testing/fstest: treat dash specially when building glob + 2021-02-25 37ca84a9cd syscall: return error if GetQueuedCompletionStatus truncates key + 2021-02-25 76c0003cd5 syscall, os: use pipe2 syscall on DragonflyBSD instead of pipe + 2021-02-25 666ad85df4 cmd/compile: fix typo in rewrite_test.go + 2021-02-25 d822ffebc5 test: fix inline.go test for linux-amd64-noopt + 2021-02-25 ff614b13d9 runtime: subtract one from ip when determining abort + 2021-02-24 dbbc5ec7e8 syscall: restore broken GetQueuedCompletionStatus signature but make it not crash + 2021-02-24 d0d21b7c4c cmd/compile: plumb abi info into expandCalls + 2021-02-24 8027343b63 cmd/compile: disable inlining functions with closures for now + 2021-02-24 6c3f8a2f47 cmd/link: use ctxt.Logf instead of package log + 2021-02-24 3ee32439b5 cmd/compile: ARM64 optimize []float64 and []float32 access + 2021-02-24 80ddc17ae1 cmd/compile/internal-abi: fix ABI0-equivalence for zero-sized values + 2021-02-24 3deb528199 cmd/compile/internal-abi: update internal ABI spec for g register + 2021-02-24 478277f812 cmd/compile/internal-abi: use x87 mode, not MMX mode + 2021-02-24 bf48163e8f cmd/compile: add rule to coalesce writes + 2021-02-24 b7f62daa59 cmd/internal/goobj: add test case for object file reader + 2021-02-24 c9d9b40b13 context: avoid importing context package twice + 2021-02-24 dc4698f52b syscall: do not overflow key memory in GetQueuedCompletionStatus + 2021-02-24 7a2f3273c5 cmd/compile: plumb abi info into ssagen/ssa + 2021-02-24 adb467ffd2 cmd/compile: reduce inline cost of OCONVOP + 2021-02-24 27684ea195 testing: print late arriving log line in panic + 2021-02-24 ae1fa08e41 context: reduce contention in cancelCtx.Done + 2021-02-24 691ac806d2 cmd/go: fix version validation in 'go mod edit -exclude' + 2021-02-24 b97b1456ae cmd/go, cmd/cgo: pass -mfp32 and -mhard/soft-float to MIPS GCC + 2021-02-24 07c658316b io/ioutil: forward TempFile and TempDir to os package + 2021-02-24 04edf418d2 encoding/json: reduce allocated space in Unmarshal + 2021-02-24 e496120891 database: remove race in TestTxContextWait + 2021-02-24 26001d109e go/types: review of call.go + 2021-02-24 35b80eac7d hash/maphash: remove duplicate from Hash documentation + 2021-02-24 eb863240dc runtime: remove unused const stackSystem on dragonfly + 2021-02-24 084b07d6f6 spec: improve sentence structure for passing a slice + 2021-02-24 6ba4a300d8 docs: fix spelling + 2021-02-24 43652dc46f bufio, bytes, strings: handle negative runes in WriteRune + 2021-02-24 3780529255 unicode: correctly handle negative runes + 2021-02-24 0694fb3d78 image: resolve the TODO of doc comment style + 2021-02-23 6cc8aa7ece go/types: minor updates to comments to align with types2 + 2021-02-23 42b9e3a8df context: fix XTestInterlockedCancels + 2021-02-23 aaed6cbced testing/race: fixing intermittent test failure + 2021-02-23 fbed561f8a runtime: reset stack poison flag accidentally set + 2021-02-23 0458d8c983 go/types, types2: constraints may be parenthesized and that includes "any" + 2021-02-23 74903553bc doc: start draft go1.17 release notes, move go1.16 to x/website + 2021-02-23 fa40c0232c cmd/go: reproduce issue #44497 in TestScript/mod_edit + 2021-02-23 a4dac8bd22 runtime: use BX instead of R15 in race detector + 2021-02-23 c49c7a675a runtime: save R15 before checking AVX state + 2021-02-23 d2911d7612 cmd/compile: fold MOV*nop and MOV*const + 2021-02-23 d434c2338b runtime: clarify GC fractional mode description + 2021-02-23 a671e33c6d all: use more precise build tags + 2021-02-23 c584f42dcf cmd/compile: change riscv64 Eq32/Neq32 to zero extend before subtraction + 2021-02-23 080119799b runtime: fix usleep on windows/arm + 2021-02-23 74cac8d479 cmd/compile: add AMD64 parameter register defs, Arg ops, plumb to ssa.Config + 2021-02-23 42cd40ee74 cmd/compile: improve bit test code + 2021-02-23 f1562c7610 cmd/go: recognize DLL magic from llvm binaries + 2021-02-23 bf5fa2d198 cmd/compile: guard special register usage with GOEXPERIMENT=regabi + 2021-02-23 c7f596f919 cmd/go: resolve TODO by replacing InDir() function + 2021-02-23 5e94fe9316 go/build/constraint: fix splitPlusBuild func doc comment + 2021-02-23 55d7dcc3cd runtime: optimize the memory padding in p struct + 2021-02-23 ab331c0254 runtime/cgo: use correct lean and mean macro + 2021-02-23 91cfbf39e4 cmd/link: set .ctors COFF section to writable and aligned + 2021-02-23 811167e2c9 cmd/link: do not pass -Bsymbolic for PE DLLs + 2021-02-23 a51daac840 cmd/link: set SizeOfRawData rather than VirtualSize in COFF files for .bss section + 2021-02-23 e5159b2a2f cmd/internal/dwarf: minor cleanups + 2021-02-23 b3b65f2176 runtime: enable race detector on openbsd/amd64 + 2021-02-23 a78b0e6721 internal/poll: fix the verbose condition in splice + 2021-02-23 08543f0715 ios/fs: mention f.dir in (*subFS).fixErr godoc + 2021-02-23 0398a771d2 cmd/internal/obj/riscv: prevent constant loads that do not target registers + 2021-02-23 6525abddce cmd/internal/obj/riscv: clean up branch tests + 2021-02-23 c4b771348c runtime: fix windows/arm signal handling assembly + 2021-02-23 2a18e37c4e cmd/compile: remove backend's "scratch mem" support + 2021-02-23 e52149822b cmd/compile: simplify assert{E,I}2I{,2} calling conventions + 2021-02-23 86deb459de cmd/compile: remove selectnbrecv2 + 2021-02-23 4048491234 cmd/compile,runtime: make selectnbrecv return two values + 2021-02-23 5e804ba17d cmd/compile: use transitive relations for slice len/cap in poset + 2021-02-23 6a40dd05d8 cmd/compile/internal/types2: review of sanitize.go + 2021-02-23 975ba6e2b2 cmd/compile: mark OpSB, OpSP as poor statement Op + 2021-02-23 a2e150c7cd go/types, cmd/compile/internal/types2: use regular type printing for unsafe.Pointer + 2021-02-23 5a0e4fc4e7 cmd/compile/internal/types2: review of conversions.go + 2021-02-23 89eb2b55b9 cmd/compile/internal/types2: review of issues_test.go + 2021-02-23 378f73e2d5 cmd/compile/internal/types2: enable TestIssue25627 + 2021-02-23 1901e2647f test: add test for findTypeLoop with symbols from other packages + 2021-02-23 5f3dabbb79 cmd/compile: fix import of functions of multiple nested closure + 2021-02-23 7af821a661 all: faster midpoint computation in binary search + 2021-02-23 f113e9a14f cmd/dist: match goexperiment.regabi tag when GOEXPERIMENT is on + 2021-02-22 1126bbb82a go/parser: return ast.BadExpr for missing index operands + 2021-02-22 1678829d95 cmd/compile: correctly use X15 to zero frame + 2021-02-22 094048b938 cmd/compile/internal: loop opt + 2021-02-22 1391d4142c fix typo in issue16760.go + 2021-02-22 04903476fe cmd/compile: reject some rare looping CFGs in shortcircuit + 2021-02-22 87e984ab29 test: add test for issue 38698 + 2021-02-22 b2bdadfe88 cmd/internal: cleanup ppc64 optab structure + 2021-02-21 0f66fb7b85 go/internal/gccgoimporter: fix up gccgo installation test + 2021-02-21 e78e04ce39 cmd/compile: fix panic in DWARF-gen handling obfuscated code + 2021-02-20 03d36d8198 syscall: add explicit ios build tag + 2021-02-20 40656f3a75 doc/1.16: fix link to fs.FileInfo + 2021-02-20 d4b2638234 all: go fmt std cmd (but revert vendor) + 2021-02-20 0625460f79 cmd/vet: update buildtag check for //go:build lines + 2021-02-20 9fd6cc105d go/printer: canonicalize //go:build and // +build lines while formatting + 2021-02-20 5b76343a10 go/build: prefer //go:build over // +build lines + 2021-02-20 a8942d2cff runtime/pprof: disable TestMorestack on darwin/arm64 + 2021-02-20 078f08f0ee spec: every type has a method set (minor clarification) + 2021-02-19 26713b5fef go/types: don't write during sanitizeInfo if nothing has changed + 2021-02-19 9a99515c8f all: REVERSE MERGE dev.typeparams (7cdfa49) into master + 2021-02-19 7cdfa4969a [dev.typeparams] all: merge master (06b86e9) into dev.typeparams + 2021-02-19 6521c7b378 [dev.typeparams] cmd/compile/internal/types2: resolve decl cycle the same way as in go/types + 2021-02-19 06b86e9803 cmd/compile: fix check to avoid creating new closure function when typechecking inline body + 2021-02-19 9322eec8a2 codereview.cfg: add codereview.cfg for master branch + 2021-02-19 02e5a8fdfc runtime: ignore SPWRITE in syscall functions + 2021-02-19 fa18f224c3 runtime/pprof: disable TestMorestack on macOS under race detector + 2021-02-19 01eb70e3dd os: fix hex exit code print on 32-bit windows + 2021-02-19 49add6ad90 runtime: fix spurious stack overflow detection + 2021-02-19 fce2a94d84 cmd/compile: fix buglet in inlined info abstract function dwarf-gen + 2021-02-19 dfe0ef961b [dev.typeparams] go/types, types2: revert fancy struct printing (fixes x/tools tests) + 2021-02-19 7764ee5614 runtime: fix invalid nil g check for for mips64x + 2021-02-19 2f37939a21 go/parser: improve error recovery from invalid selector exprs + 2021-02-19 8654db4555 [dev.typeparams] go/types: adjust printing of embedded struct fields (fixes x/tools/cmd/guru tests) + 2021-02-19 87f425da14 cmd/go/internal/mvs: split Reqs into narrower per-function interfaces + 2021-02-19 4da0188c6c cmd/go/internal/modget: split resolveCandidates into two methods + 2021-02-19 5f2e24efb3 cmd/internal/diff: skip over Cygwin warning in diff output + 2021-02-19 ee7038f6a5 net: disable Windows netsh tests when netsh won't run + 2021-02-19 40765ffa95 os/exec: disable failing LookPathTest on windows/arm64 + 2021-02-19 b445d6ea34 runtime/pprof: expect tests to pass on macOS + 2021-02-19 b110a43628 runtime: delete gosave (dead code) + 2021-02-19 474d5f4f4d math: remove most 387 implementations + 2021-02-19 c7c6c113be runtime: convert windows/arm64 assembly + 2021-02-19 3527caa7d6 runtime: initial windows/arm64 implementation files + 2021-02-19 427bd7599d runtime: generate windows/arm64 callback asm + 2021-02-19 f6c4b4bf96 syscall: add windows/arm64 support + 2021-02-19 ac024a0c7b cmd/vendor: get golang.org/x/sys@beda7e5e158 + 2021-02-19 a3b97e7628 test: disable nilptr on windows/arm64 + 2021-02-19 985d087782 cmd/link: add windows/arm64 support + 2021-02-19 95a44d2409 cmd/internal/objfile: recognize Windows ARM64 executables + 2021-02-19 0ca0551f02 debug/pe: recognize arm64 executables + 2021-02-19 47e4b0739e Merge "[dev.typeparams] all: merge master (eb98272) into dev.typeparams" into dev.typeparams + 2021-02-19 0c633125f2 cmd/dist: add windows/arm64 support + 2021-02-19 bb6efb9609 build: set GOPATH consistently in run.bash, run.bat, run.rc + 2021-02-19 a1222b7535 cmd/link: add debug print in deadcode + 2021-02-19 1c659f2525 cmd/link: clean up windows PE generation + 2021-02-19 b6379f190b syscall: clean up windows a bit + 2021-02-19 09e059afb1 runtime: enable framepointer on all arm64 + 2021-02-19 b19e7b518e runtime: clean up windows a bit + 2021-02-19 5421c37a1d runtime: fix windows/arm externalthreadhandler + 2021-02-19 91cc484ea9 runtime: fix time on windows/arm under WINE + 2021-02-19 38672d3dcf runtime: crash earlier on windows for runtime.abort + 2021-02-19 a1e9148e3d runtime: print hex numbers with hex prefixes in traceback debug + 2021-02-19 75e273fc2c runtime: fix windows/arm CONTEXT_CONTROL + 2021-02-19 76ab626bfc runtime: factor common code out of defs_windows_*.go + 2021-02-19 ece954d8b8 runtime: find g in Windows profiler using SP + 2021-02-19 a54f7fc0fd runtime: do not treat asmcgocall as a topofstack on g0 + 2021-02-19 776ee4079a runtime: do not treat morestack as a topofstack + 2021-02-19 5ecd9e34df runtime: do not treat mcall as a topofstack + 2021-02-19 54da3ab385 runtime: use TOPFRAME to identify top-of-frame functions + 2021-02-19 fbe74dbf42 runtime: use FuncInfo SPWRITE flag to identify untraceable profile samples + 2021-02-19 4dd77bdc91 cmd/asm, cmd/link, runtime: introduce FuncInfo flag bits + 2021-02-19 aa0388f2ed runtime: remove unnecessary writes to gp.sched.g + 2021-02-19 6fe8981620 cmd/internal/obj/riscv: fix JMP name<>(SB) + 2021-02-19 01f05d8ff1 runtime: unify asmcgocall and systemstack traceback setup + 2021-02-19 229695a283 runtime: clean up funcID assignment + 2021-02-19 c80da0a33a runtime: handle nil gp in cpuprof + 2021-02-19 a78879ac67 runtime: move sys.DefaultGoroot to runtime.defaultGOROOT + 2021-02-19 8ac23a1f15 runtime: document, clean up internal/sys + 2021-02-19 678568a5cf runtime: delete windows setlasterror (unused) + 2021-02-19 0d94f989d1 runtime: clean up system calls during cgo callback init + 2021-02-19 e7ee3c1fa8 os: report Windows exit status in hex + 2021-02-18 a789be7814 [dev.typeparams] cmd/compile: use new converter functions rather than methods (fix build) + 2021-02-18 20050a15fe [dev.typeparams] cmd/compile: support generic types (with stenciling of method calls) + 2021-02-18 e7493a9c74 [dev.typeparams] all: merge master (eb98272) into dev.typeparams + 2021-02-18 2ff1e05a4c [dev.typeparams] all: update parent repository + 2021-02-18 eb982727e3 cmd/go/internal/mvs: fix Downgrade to match Algorithm 4 + 2021-02-18 3b7277d365 cmd/go: add a script test for artifacts resulting from 'go get -u' + 2021-02-18 8960ce7735 [dev.typeparams] cmd/compile/internal/types2: minor adjustments to match go/types more closely + 2021-02-18 6f3878b942 [dev.typeparams] cmd/compile/internal/types: review of typestring_test.go + 2021-02-18 d6bdd1aeef [dev.typeparams] cmd/compile/internal/types: review of typestring.go + 2021-02-18 c2314babb8 [dev.typeparams] cmd/compile/internal/types: review of type.go + 2021-02-18 099374b55e [dev.typeparams] cmd/compile/internal/types2: remove Type.Under method in favor of function + 2021-02-18 653386a89a [dev.typeparams] cmd/compile/internal/types2: replace Named, TypeParam methods with functions + 2021-02-18 5e4da8670b [dev.typeparams] cmd/compile/internal/types2: use converter functions rather than methods + 2021-02-18 5ecb9a7887 [dev.typeparams] go/types: use a new ast.ListExpr for multi-type instances + 2021-02-18 f3c2208e2c cmd/go: add script tests for potential upgrades due to downgrades + 2021-02-18 a5c8a15f64 cmd/go/internal/mvs: clarify and annotate test cases + 2021-02-18 a76efea1fe cmd/go/internal/mvs: don't emit duplicates from Req + 2021-02-18 609d82b289 cmd/dist: set GOARM=7 for windows/arm + 2021-02-18 7b679617f3 [dev.typeparams] go/types: conversions to type parameters are not constant + 2021-02-18 f0be3cc547 runtime: unbreak linux/riscv64 following regabi merge + 2021-02-18 07ef313525 runtime/cgo: add cast in C code to avoid C compiler warning + 2021-02-17 f5d0c653e6 [dev.typeparams] merge master (2f0da6d) into dev.typeparams + 2021-02-17 e196cb8258 [dev.typeparams] cmd/dist: disable -G=3 on the std go tests for now + 2021-02-17 2f0da6d9e2 go/types: revert "no 'declared but not used' errors for invalid var decls" + 2021-02-17 70c37ee7d0 cmd/compile/internal/test: gofmt abiutils_test.go + 2021-02-16 84825599dc all: merge branch dev.regabi (d3cd4830ad) into master + 2021-02-16 d3cd4830ad [dev.regabi] test: run abi/regabipragma test with -c=1 + 2021-02-16 03cea563d1 [dev.regabi] all: merge master (5faf941) into dev.regabi + 2021-02-16 b8fb049c7a [dev.regabi] cmd/go: copy internal/abi in TestNewReleaseRebuildsStalePackagesInGOPATH + 2021-02-16 5faf941df0 internal/goversion: update Version to 1.17 + 2021-02-16 ed55da46ab [dev.regabi] go/types: overlapping embedded interfaces requires go1.14 + 2021-02-16 7696c94334 [dev.regabi] go/types: type alias decl requires go1.9 + 2021-02-16 c2358a1ae7 [dev.regabi] runtime: stub out spillArgs and unspillArgs + 2021-02-16 8cfbf34dd9 internal/abi: set register count constants to zero for regabi experiment + 2021-02-16 6f3da9d2f6 README: pull gopher image from website + 2021-02-16 d28aae26b0 [dev.regabi] cmd/link: recognize internal/abi as runtime package + 2021-02-16 098504c73f cmd/link: generate trampoline for inter-dependent packages + 2021-02-16 1004a7cb31 runtime/metrics: update documentation to current interface + 2021-02-16 6530f2617f doc/go1.16: remove draft notice + 2021-02-16 353e111455 doc/go1.16: fix mismatched id attribute + 2021-02-16 e0215315f5 [dev.regabi] reflect: support for register ABI on amd64 for reflect.(Value).Call + 2021-02-16 f0d23c9dbb internal/poll: netpollcheckerr before sendfile + 2021-02-16 0cb3415154 doc: remove all docs not tied to distribution + 2021-02-16 626ef08127 doc: remove install.html and install-source.html + 2021-02-16 30641e36aa internal/poll: if copy_file_range returns 0, assume it failed + 2021-02-15 33d72fd412 doc/faq: update generics entry to reflect accepted proposal + 2021-02-15 852ce7c212 cmd/go: provide a more helpful suggestion for "go vet -?" + 2021-02-13 66c27093d0 cmd/link: fix typo in link_test.go + 2021-02-13 b81efb7ec4 [dev.regabi] go/types: add support for language version checking + 2021-02-13 a7e9b4b948 [dev.regabi] go/types: untyped shift counts must fit into uint + 2021-02-13 060fa49bd2 [dev.regabi] go/types: refuse excessively long constants + 2021-02-12 a06bd9fecb [dev.typeparams] cmd/compile/internal/types: review of resolver_test.go + 2021-02-12 042f88fe30 [dev.typeparams] cmd/compile/internal/types: review of errors_test.go + 2021-02-12 0abd7b768b [dev.typeparams] cmd/compile/internal/types: review of universe.go + 2021-02-12 1b6f0bf1b2 [dev.typeparams] cmd/compile/internal/types: review of sizes_test.go + 2021-02-12 1758780181 [dev.typeparams] cmd/compile/internal/types: review of sizes.go + 2021-02-12 3aee461d5c [dev.typeparams] cmd/compile/internal/types: review of return.go + 2021-02-12 7428318af6 [dev.typeparams] cmd/compile/internal/types: review of object_test.go + 2021-02-12 b20f9e2da1 [dev.typeparams] cmd/compile/internal/types: review of object.go + 2021-02-12 20746b2f37 [dev.typeparams] cmd/compile/internal/types: review of labels.go + 2021-02-12 bab3461123 [dev.typeparams] cmd/compile/internal/types: review of infer.go + 2021-02-12 9168590977 [dev.typeparams] cmd/compile/internal/types: review of builtin_test.go + 2021-02-12 f1777cf84c [dev.typeparams] cmd/compile/internal/types: review of builtin.go + 2021-02-12 baa6c75dce [dev.regabi] internal/abi: add new internal/abi package for ABI constants + 2021-02-12 d1fd9a8863 [dev.regabi] all: merge master (ff0e93e) into dev.regabi + 2021-02-12 ff0e93ea31 doc/go1.16: note that package path elements beginning with '.' are disallowed + 2021-02-12 0f43973b4b [dev.typeparams] go/types: make predeclared "any" alias for interface{} + 2021-02-12 58758e0a21 [dev.typeparams] go/types: better error message for invalid ... use + 2021-02-11 c0aa7bd760 [dev.typeparams] cmd/compile: small fixes for stenciling + 2021-02-11 249da7ec02 CONTRIBUTORS: update for the Go 1.16 release + 2021-02-11 864d4f1c6b cmd/go: multiple small 'go help' fixes + 2021-02-11 26ceae85a8 spec: More precise wording in section on function calls. + 2021-02-11 930c2c9a68 cmd/go: reject embedded files that can't be packed into modules + 2021-02-11 e5b08e6d5c io/fs: allow backslash in ValidPath, reject in os.DirFS.Open + 2021-02-10 df23540dde [dev.typeparams] cmd/gofmt: add the -G flag to allow generic code + 2021-02-10 ed8079096f cmd/compile: mark concrete call of reflect.(*rtype).Method as REFLECTMETHOD + 2021-02-10 ddec18cf82 [dev.typeparams] cmd/compile/internal/types2: overlapping embedded interfaces requires go1.14 + 2021-02-10 59703d53e2 [dev.regabi] cmd/link: stop using ABI aliases if wrapper is enabled + 2021-02-10 fdf3496fcc [dev.typeparams] cmd/compile: make type conversions by type parameters work + 2021-02-10 12e15d430d [dev.typeparams] cmd/compile: handle calling a method on a type param in stenciling + 2021-02-09 e9c9683597 cmd/go: suppress errors from 'go get -d' for packages that only conditionally exist + 2021-02-09 168d6a49a5 [dev.regabi] go/types: use 512 bits as max. integer precision + 2021-02-09 0a62067708 [dev.regabi] go/types: adjust importer to match compiler importer + 2021-02-09 1c58fcf7ed [dev.regabi] go/types: handle untyped constant arithmetic overflow + 2021-02-09 493363ccff [dev.regabi] go/types: must not import a package called "init" + 2021-02-09 e0ac989cf3 archive/tar: detect out of bounds accesses in PAX records resulting from padded lengths + 2021-02-09 c48d1503ba [dev.regabi] go/types: report unused packages in source order + 2021-02-09 813958f13c [dev.regabi] go/types: factor out sorting of methods + 2021-02-09 11d15c171b [dev.regabi] go/types: convert untyped arguments to delete + 2021-02-08 ca18c42054 [dev.typeparams] merge dev.regabi (618e3c1) into dev.typeparams + 2021-02-09 c9d6f45fec runtime/metrics: fix a couple of documentation typpos + 2021-02-09 cea4e21b52 io/fs: backslash is always a glob meta character + 2021-02-08 dc725bfb3c doc/go1.16: mention new vet check for asn1.Unmarshal + 2021-02-08 618e3c15bd [dev.regabi] go/types: consistently report nil type as "untyped nil" + 2021-02-08 a360eeb528 [dev.typeparams] cmd/compile/internal/types2: conversions to type parameters are not constant + 2021-02-08 0fbde54ea6 [dev.typeparams] cmd/compile: allow generic funcs to call other generic funcs for stenciling + 2021-02-08 50449de66a [dev.regabi] all: merge master (1901853) into dev.regabi + 2021-02-08 7b0dfb177f [dev.regabi] runtime: use g register in some assembly functions on AMD64 + 2021-02-08 2e60c00f56 [dev.regabi] cmd/internal/obj/x86: use g register in stack bounds check + 2021-02-08 22f9e1ccbc [dev.regabi] runtime: initialize special registers before sigpanic + 2021-02-08 5d7dc53888 [dev.regabi] cmd/compile, runtime: reserve R14 as g registers on AMD64 + 2021-02-08 1901853098 runtime/metrics: fix panic in readingAllMetric example + 2021-02-08 ed3e4afa12 syscall/plan9: remove spooky fd action at a distance + 2021-02-08 a21de9ec73 [dev.regabi] cmd/link: resolve symbol ABI in shared linkage + 2021-02-05 724d0720b3 doc/go1.16: add missed heading tag in vet section + 2021-02-05 b54cd94d47 embed, io/fs: clarify that leading and trailing slashes are disallowed + 2021-02-05 4516afebed testing/fstest: avoid symlink-induced failures in tester + 2021-02-05 8fa84772ba [dev.regabi] runtime: delete gosave function + 2021-02-05 946351d5a2 [dev.regabi] runtime: zero X15 in racecall + 2021-02-05 397a46a10a [dev.regabi] cmd/asm: define g register on AMD64 + 2021-02-05 e79c2fd428 [dev.regabi] runtime: mark racecallbackthunk as ABIInternal + 2021-02-05 7cc6de59f2 [dev.regabi] runtime: don't mark rt0_go ABIInternal + 2021-02-05 dcb5e0392e [dev.typeparams] cmd/compile: add stenciling of simple generic functions + 2021-02-05 63de211014 [dev.regabi] runtime/cgo: call setg_gcc in crosscall_amd64 + 2021-02-04 f37b0c6c12 [dev.typeparams] cmd/compile/internal/types2: type alias decl requires go1.9 + 2021-02-04 721488498a [dev.typeparams] cmd/compile: pass -lang flag value to new type checker + 2021-02-04 1ff2fdaaf1 [dev.typeparams] cmd/compile/internal/types2: add support for language version checking + 2021-02-04 370e9f5843 [dev.typeparams] cmd/compile/internal/types2: use 512 bits as max. integer precision + 2021-02-04 120b819f45 [dev.regabi] go/types: report error for invalid main function signature + 2021-02-04 52d5cb2822 [dev.regabi] cmd/internal/obj: access Attribute atomically + 2021-02-04 bc451b5770 [dev.regabi] go/types: port check_test.go ergonomics from dev.typeparams + 2021-02-04 afd67f3334 [dev.regabi] go/types: no "declared but not used" errors for invalid var decls + 2021-02-04 ca2f152893 [dev.typeparams] go/types: add missing test from dev.go2go + 2021-02-04 8869086d8f runtime: fix typo in histogram.go + 2021-02-03 401d7e5a24 [dev.regabi] cmd/compile: reserve X15 as zero register on AMD64 + 2021-02-03 bfc7418e6d [dev.regabi] runtime, syscall, etc.: mark Darwin syscall wrappers as ABIInternal + 2021-02-03 e491c6eea9 math/big: fix comment in divRecursiveStep Change-Id: Idc1fbc206629b016f7bb24c2066c2be9046a511a
2021-03-04go/types: use correct recv for parameterized embedded methodsRob Findley
This is a direct port of CL 298129 to go/types. Fixes #44688 Change-Id: I950992ea7beea5b9c8bea0c296b5ce03b2aa9b12 Reviewed-on: https://go-review.googlesource.com/c/go/+/298349 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>
2021-03-03cmd/compile/internal/types2: use correct recv for parameterized embedded methodsRobert Griesemer
Methods of generic types are instantiated lazily (upon use). Thus, when we encounter a method of such a type, we need to instantiate the method signature with the receiver type arguments. We infer those type arguments from the method receiver. If the method is embedded, we must use the actual embedded receiver type, otherwise the receiver type declared with the method doesn't match up and inference will fail. (Note that there's no type inference in the source code here, it's only the implementation which uses the existing inference mechanism to easily identify the actual type arguments. If the implementation is correct, the inference will always succeed.) Updates #44688. Change-Id: Ie35b62bebaeaf42037f2ca00cf8bd34fec2ddd9c Reviewed-on: https://go-review.googlesource.com/c/go/+/298129 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2021-03-03cmd/compile: remove races introduced in abiutils field updateDavid Chase
This fix uses mutex around the problematic store and subsequent access; if this causes performance problems later a better fix is to do all the ABI binding in gc/walk where it is single-threaded. Change-Id: I488f28ab75beb8351c856fd50b0095cab463642e Reviewed-on: https://go-review.googlesource.com/c/go/+/298109 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2021-03-03cmd/compile: make modified Aux type for OpArgXXXX pass ssa/checkDavid Chase
For #40724. Change-Id: I7d1e76139d187cd15a6e0df9d19542b7200589f6 Reviewed-on: https://go-review.googlesource.com/c/go/+/297911 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03cmd/compile: handle aggregate OpArg in registersDavid Chase
Also handles case where OpArg does not escape but has its address taken. May have exposed a lurking bug in 1.16 expandCalls, if e.g., loading len(someArrayOfstructThing[0].secondStringField) from a local. Maybe. For #40724. Change-Id: I0298c4ad5d652b5e3d7ed6a62095d59e2d8819c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/293396 Trust: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03cmd/compile: remove 8-byte alignment requirement of stack slot on s390xeric fang
This CL applies CL 267999 to s390x. Updates #42385 Change-Id: Ie8e69ad1b3f7ddc2c8f05125f4af617aeac035ec Reviewed-on: https://go-review.googlesource.com/c/go/+/297769 Reviewed-by: Keith Randall <khr@golang.org> Trust: eric fang <eric.fang@arm.com>
2021-03-03cmd/compile: remove 8-byte alignment requirement of stack slot on mipseric fang
This CL applies CL 267999 to mips. Updates #42385 Change-Id: I8096e16c1b4def767b0c20c16add36fa2406bcab Reviewed-on: https://go-review.googlesource.com/c/go/+/297772 Reviewed-by: Keith Randall <khr@golang.org> Trust: eric fang <eric.fang@arm.com>
2021-03-03cmd/compile: intrinsify runtime/internal/atomic.{And,Or}{8,} on RISCV64Joel Sing
The 32 bit versions are easily implement with a single instruction, while the 8 bit versions require a bit more effort but use the same atomic instructions via rewrite rules. Change-Id: I42e8d457b239c8f75e39a8e282fc88c1bb292a99 Reviewed-on: https://go-review.googlesource.com/c/go/+/268098 Trust: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03syscall: implement rawVforkSyscall for remaining linux platformsJoel Sing
This allows the use of CLONE_VFORK and CLONE_VM for fork/exec, preventing 'fork/exec ...: cannot allocate memory' failures from occuring when attempting to execute commands from a Go process that has a large memory footprint. Additionally, this should reduce the latency of fork/exec on these platforms. Fixes #31936 Change-Id: I4e28cf0763173145cacaa5340680dca9ff449305 Reviewed-on: https://go-review.googlesource.com/c/go/+/295849 Trust: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03cmd/compile: retrieve Args from registersDavid Chase
in progress; doesn't fully work until they are also passed on register on the caller side. For #40724. Change-Id: I29a6680e60bdbe9d132782530214f2a2b51fb8f6 Reviewed-on: https://go-review.googlesource.com/c/go/+/293394 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03A+C: change email address for Baokun LeeBaokun Lee
Change-Id: Ib82e1c8c549c91e20c5aff5e50736617c6831f8c Reviewed-on: https://go-review.googlesource.com/c/go/+/277792 Run-TryBot: Baokun Lee <bk@golangcn.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Alberto Donizetti <alb.donizetti@gmail.com>
2021-03-03cmd/compile: remove 8-byte alignment requirement of stack slot on mips64eric fang
This CL applies CL 267999 to mips64. Updates #42385 Change-Id: Ideab21be0d8c1a36b3be7411b24adac70a3d16e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/297771 Reviewed-by: eric fang <eric.fang@arm.com> Reviewed-by: Keith Randall <khr@golang.org> Trust: eric fang <eric.fang@arm.com> Run-TryBot: eric fang <eric.fang@arm.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-03-03cmd/compile: use abiutils for all rcvr/in/out frame offsets.David Chase
types thought it knew how to do this, but that's a lie, because types doesn't know what the ABI is. includes extra checking to help prevent things from accidentally working if they need to be changed but aren't. For #40724. Change-Id: I166cd948f262344b7bebde6a2c25e7a7f878bbfb Reviewed-on: https://go-review.googlesource.com/c/go/+/293393 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-03cmd/link: disable flaky Darwin "symbols" testDavid Chase
About one run out of 3 it fails on my laptop, and I am tired of having to be a nanny for my tests just because of this one flaky test. This has been a problem for months. Updates #32218. Change-Id: I2871d4c6f47e9432d189ed7bdcda8f9c0871cfc5 Reviewed-on: https://go-review.googlesource.com/c/go/+/297469 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-02cmd/go: remove -insecure flag on go getwitchard
Resolves #37519 Change-Id: Iba675a180b0e61b12835cdb6ecd4c6dc61e0605c GitHub-Last-Rev: aa018af6f8fc7f0b829820e831ad96734adcb8d0 GitHub-Pull-Request: golang/go#44724 Reviewed-on: https://go-review.googlesource.com/c/go/+/297709 Trust: Jay Conrod <jayconrod@google.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-03-02cmd/go/internal/modload: do not resolve an arbitrary version for 'go list ↵Bryan C. Mills
--versions' If we don't actually require the listed module, we previously implicitly resolved "latest", but also (erroneously) forgot to apply exclusions and retractions for it. But there is really no need to resolve "latest" in this case at all — now we omit the version from the reported module info entirely. Fixes #44296 Change-Id: Id595f52f597c7213bd65b73bf066a678d9e1d694 Reviewed-on: https://go-review.googlesource.com/c/go/+/297150 Trust: Bryan C. Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
2021-03-02cmd/go: add a test case that reproduces #44296Bryan C. Mills
For #44296 Change-Id: I310f99ccd406622e39f3fbfa12f7a3bee39602db Reviewed-on: https://go-review.googlesource.com/c/go/+/297149 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
2021-03-02cmd/go: resolve std-vendored dependencies as std packages except in 'go get' ↵Bryan C. Mills
and 'go mod' In CL 251159, I removed a hard-coded special case changing the rewriting behavior for std dependencies in GOROOT/src/vendor and GOROOT/src/cmd/vendor. Unfortunately, that caused packages in 'std' to be reported as stale when run within GOROOT/src. This change restores the special-case behavior, but plumbs it through the PackageOpts explicitly instead of comparing strings stored in global variables. Fixes #44725 Change-Id: If084fe74972ce1704715ca79b0b7e092dd90c88b Reviewed-on: https://go-review.googlesource.com/c/go/+/297869 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>
2021-03-02cmd/go/internal/mvs: prune spurious dependencies in DowngradeBryan C. Mills
Previously, mvs.Downgrade could introduce spurious dependencies if the downgrade computed for one module lands on a “hidden” version (such as a pseudo-version) due to a requirement introduced by the downgrade for another module. To eliminate those spurious dependencies, we can add one more call to BuildList to recompute the “actual” downgraded versions, and then including only those actual versions in the final call to BuildList. For #36460 Change-Id: Icc6b54aa004907221b2bcbbae74598b0e4100776 Reviewed-on: https://go-review.googlesource.com/c/go/+/294294 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
2021-03-02dist: generate stub go.mod in workdirTamir Duberstein
...and run commands from there. This removes the requirement that bootstrap must not run inside a module by ensuring that enclosing modules do not interfere with bootstrap. Fixes #44209. Change-Id: I700a81829226770b8160c8ff04127b855b6e26bf Reviewed-on: https://go-review.googlesource.com/c/go/+/296610 Trust: Jay Conrod <jayconrod@google.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-03-02cmd/compile: better version of check frame offsets against abiDavid Chase
improved to run on more architectures. this is in preparation for turning off calculation of frame offsets in types.CalcSize. Replaces https://go-review.googlesource.com/c/go/+/293392 . Updates #44675. For #40724. Change-Id: I40ba496172447cf09b86bc646148859363c11ad9 Reviewed-on: https://go-review.googlesource.com/c/go/+/297637 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2021-03-02cmd/compile: optimize single-precision floating point square rootfanzha02
Add generic rule to rewrite the single-precision square root expression with one single-precision instruction. The optimization will reduce two times of precision converting between double-precision and single-precision. On arm64 flatform. previous: FCVTSD F0, F0 FSQRTD F0, F0 FCVTDS F0, F0 optimized: FSQRTS S0, S0 And this patch adds the test case to check the correctness. This patch refers to CL 241877, contributed by Alice Xu (dianhong.xu@arm.com) Change-Id: I6de5d02281c693017ac4bd4c10963dd55989bd7e Reviewed-on: https://go-review.googlesource.com/c/go/+/276873 Trust: fannie zhang <Fannie.Zhang@arm.com> Run-TryBot: fannie zhang <Fannie.Zhang@arm.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2021-03-02internal/poll, runtime: handle netpollopen error in poll_runtime_pollOpenTobias Klauser
When netpollopen in poll_runtime_pollOpen returns an error, the work in runtime_pollUnblock and runtime_pollClose can be avoided since the underlying system call to set up the poller failed. E.g. on linux, this avoids calling netpollclose and thus epoll_ctl(fd, EPOLL_CTL_DEL, ...) in case the file does not support epoll, i.e. epoll_ctl(fd, EPOLL_CTL_ADD, ...) in netpollopen failed. Fixes #44552 Change-Id: I564d90340fd1ab3a6490526353616a447ae0cfb8 Reviewed-on: https://go-review.googlesource.com/c/go/+/297392 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-02cmd/go: reject relative paths in GOMODCACHE environmentBaokun Lee
Go already rejects relative paths in a couple environment variables, It should reject relative paths in GOMODCACHE. Fixes #43715 Change-Id: Id1ceff839c7ab21c00cf4ace45ce48324733a526 Reviewed-on: https://go-review.googlesource.com/c/go/+/284432 Run-TryBot: Baokun Lee <bk@golangcn.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Jay Conrod <jayconrod@google.com> Trust: Baokun Lee <bk@golangcn.org>
2021-03-02all: fix spellingJohn Bampton
Change-Id: Iad14571c3e19b01740cd744f0b3025b3e2f1cb72 GitHub-Last-Rev: e8064019299f4e593116060ce2bbd14d62830af7 GitHub-Pull-Request: golang/go#44685 Reviewed-on: https://go-review.googlesource.com/c/go/+/297409 Trust: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-02go/parser,go/types: hide API changes related to type parametersRob Findley
While the dev.typeparams branch was merged, the type parameter API is slated for go1.18. Hide these changes to the go/parser and go/types API. This was done as follows: + For APIs that will probably not be needed for go1.18, simply unexport them. + For APIs that we expect to export in go1.18, prefix symbols with '_', so that the planned (upper-cased) symbol name is apparent. + For APIs that must be exported for testing, move both API and tests to files guarded by the go1.18 build constraint. + parser.ParseTypeParams is unexported and copied wherever it is needed. + The -G flag is removed from gofmt, replaced by enabling type parameters if built with the go1.18 build constraint. Notably, changes related to type parameters in go/ast are currently left exported. We're looking at the AST API separately. The new API diff from 1.16 is: +pkg go/ast, method (*FuncDecl) IsMethod() bool +pkg go/ast, method (*ListExpr) End() token.Pos +pkg go/ast, method (*ListExpr) Pos() token.Pos +pkg go/ast, type FuncType struct, TParams *FieldList +pkg go/ast, type ListExpr struct +pkg go/ast, type ListExpr struct, ElemList []Expr +pkg go/ast, type TypeSpec struct, TParams *FieldList +pkg go/types, type Config struct, GoVersion string Change-Id: I1baf67e26279b49092e774309a836c460979774a Reviewed-on: https://go-review.googlesource.com/c/go/+/295929 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>
2021-03-02cmd/link,debug/elf: mips32, add .gnu.attributes and .MIPS.abiflags sectionsYunQiang Su
MIPS32 uses .gnu.attributes and .MIPS.abiflags sections to mark FP ABI the object is using, and the kernel will set the correct FP mode for it. Currrently Go doesn't generate these 2 sections. If we link object without these 2 sections togather FPXX objects, the result will be FPXX, which is wrong: FP32 + FPXX -> FP32 FPXX + FP64 -> FP64 FP32 + FP64 -> reject These 2 sections is also needed to support FPXX and FP64 in future. More details about FP32/FPXX/FP64 are explained in: https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking Fixes #39677 Change-Id: Ia34e7461dee38a4f575dd8ace609988744512ac1 Reviewed-on: https://go-review.googlesource.com/c/go/+/239217 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Meng Zhuo <mzh@golangcn.org>
2021-03-01runtime: use entersyscall in syscall_syscallX on DarwinCherry Zhang
CL 197938 changed syscall* functions to call entersyscall, instead of entersyscallblock. It missed syscall_syscallX, probably because it was in sys_darwin_64.go, not sys_darwin.go like others. Change that one as well. Found during the review of CL 270380 (thanks Joel). Change-Id: I0884fc766703f555a3895be332dccfa7d2431374 Reviewed-on: https://go-review.googlesource.com/c/go/+/286435 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-01go/types: review of expr.goRob Findley
The changes from the (reviewed) dev.regabi copy of expr.go can be seen by comparing patchset 2 and 7. The actual change is some small improvements to readability and consistency in untyped conversion, adding some missing documentation, and removing the "// REVIEW INCOMPLETE" marker. Note that expr.go diverges from types2 in its handling of untyped conversion. Change-Id: I13a85f6e08f43343e249818245aa857b1f4bf29c Reviewed-on: https://go-review.googlesource.com/c/go/+/295729 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>
2021-03-01cmd/compile: import empty closure function correctlyDan Scales
On import, make sure that an empty closure is represented as a single empty block statement. Otherwise, the closure is dropped. Block statements are not exported explicitly, so must recreate on import. Fixes #44330 Change-Id: I061598f0f859dd71d2d0cbd10c77cdd81525d1f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/297569 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Trust: Dan Scales <danscales@google.com>
2021-03-01cmd: upgrade golang.org/x/mod to relax import path checkJay Conrod
This incorporates CL 297089, which allows leading dots in import path elements but not module path elements. Also added a test. Fixes #43985 Updates #34992 Change-Id: I2d5faabd8f7b23a7943d3f3ccb6707ab5dc2ce3c Reviewed-on: https://go-review.googlesource.com/c/go/+/297530 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-03-01cmd/compile/internal/ir: fix up stale commentThan McIntosh
Fix a small stale comment in FinishCaptureNames (refers to old code structure before the big refactoring). Change-Id: I2dfb84ce238f919f6e17061439a8bd9b09459dae Reviewed-on: https://go-review.googlesource.com/c/go/+/296829 Trust: Than McIntosh <thanm@google.com> Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-03-01cmd/go: add missing newline to retraction warning messageJordan Liggitt
Fixes #44674 Change-Id: Icbdb79084bf7bd2f52cc0a53abcc1ec6f0c4a1bf Reviewed-on: https://go-review.googlesource.com/c/go/+/297350 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Jay Conrod <jayconrod@google.com>
2021-03-01Revert "cmd/compile: check frame offsets against abi"Bryan C. Mills
This reverts CL 293392. Reason for revert: broke most non-x86 builders Fixes #44675 Change-Id: I1e815c3ab27a02e83a2f0d221a617909dd021403 Reviewed-on: https://go-review.googlesource.com/c/go/+/297549 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-03-01cmd/go/internal/modload: don't query when fixing canonical versionsJay Conrod
If a canonical version is passed to fixVersion when loading the main go.mod and that version don't match the module path's major version suffix, don't call Query. Query doesn't return a useful error in this case when the path is malformed, for example, when it doens't have a dot in the first path element. It's better to report the major version mismatch error. Fixes #44494 Change-Id: I97b1f64aee894fa0db6fb637aa03a51357ee782c Reviewed-on: https://go-review.googlesource.com/c/go/+/296590 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-03-01os: mark pipes returned by os.Pipe() as inheritable by defaultJason A. Donenfeld
Now that we don't automatically pass all inheritable handles to new processes, we can make pipes returned by os.Pipe() inheritable, just like they are on Unix. This then allows them to be passed through the SysProcAttr.AdditionalInheritedHandles parameter simply. Updates #44011. Fixes #21085. Change-Id: I8eae329fbc74f9dc7962136fa9aae8fb66879751 Reviewed-on: https://go-review.googlesource.com/c/go/+/288299 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2021-02-27cmd/compile: check frame offsets against abiDavid Chase
this is in preparation for turning off calculation of frame offsets in types.CalcSize For #40724. Change-Id: I2c29fd289c014674076e5ec5170055dbca5ea64b Reviewed-on: https://go-review.googlesource.com/c/go/+/293392 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-02-27cmd/compile: fix escape analysis of heap-allocated resultsMatthew Dempsky
One of escape analysis's responsibilities is to summarize whether/how each function parameter flows to the heap so we can correctly incorporate those flows into callers' escape analysis data flow graphs. As an optimization, we separately record when parameters flow to result parameters, so that we can more precisely analyze parameter flows based on how the results are used at the call site. However, if a named result parameter itself needs to be heap allocated, this optimization isn't safe and the parameter needs to be recorded as flowing to heap rather than flowing to result. Escape analysis used to get this correct because it conservatively rewalked the data-flow graph multiple times. So even though it would incorrectly record the result parameter flow, it would separately find a flow to the heap. However, CL 196811 (specifically, case 3) optimized the walking logic to reduce unnecessary rewalks causing us to stop finding the extra heap flow. This CL fixes the issue by correcting location.leakTo to be sensitive to sink.escapes and not record result-flows when the result parameter escapes to the heap. Fixes #44614. Change-Id: I48742ed35a6cab591094e2d23a439e205bd65c50 Reviewed-on: https://go-review.googlesource.com/c/go/+/297289 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2021-02-27cmd/compile: fixed which-result confusion in presence of 0-width typesDavid Chase
A function returning multiple results, some of them zero-width, will have more than one result present at an offset. Be sure that offset AND type match. Includes test. Change-Id: I3eb1f56116d989b4e73f533fefabb1bf554c901b Reviewed-on: https://go-review.googlesource.com/c/go/+/297169 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-02-27time: correct unusual extension string casesIan Lance Taylor
This fixes two uncommon cases. First, the tzdata code permits timezone offsets up to 24 * 7, although the POSIX TZ parsing does not. The tzdata code uses this to specify a day of week in some cases. Second, we incorrectly rejected a negative time offset for when a time zone change comes into effect. Fixes #44385 Change-Id: I5f2efc1d385e9bfa974a0de3fa81e7a94b827602 Reviewed-on: https://go-review.googlesource.com/c/go/+/296392 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2021-02-26reflect: fix register ABI spill space calculationMichael Anthony Knyszek
Currently this does things the old way by computing the number of registers, but we're going to be using their ABI0 layout for the spill space for now. Change-Id: Ibcef1ee48fd834af7cbdaabe704bcabe066ed358 Reviewed-on: https://go-review.googlesource.com/c/go/+/293011 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Trust: Michael Knyszek <mknyszek@google.com>
2021-02-26cmd/compile: deal with closures in generic functions and instantiated ↵Dan Scales
function values - Deal with closures in generic functions by fixing the stenciling code - Deal with instantiated function values (instantiated generic functions that are not immediately called) during stenciling. This requires changing the OFUNCINST node to an ONAME node for the appropriately instantiated function. We do this in a second pass, since this is uncommon, but requires editing the tree at multiple levels. - Check global assignments (as well as functions) for generic function instantiations. - Fix a bug in (*subst).typ where a generic type in a generic function may definitely not use all the type args of the function, so we need to translate the rparams of the type based on the tparams/targs of the function. - Added new test combine.go that tests out closures in generic functions and instantiated function values. - Added one new variant to the settable test. - Enabling inlining functions with closures for -G=3. (For now, set Ntype on closures in -G=3 mode to keep compatibility with later parts of compiler, and allow inlining of functions with closures.) Change-Id: Iea63d5704c322e42e2f750a83adc8b44f911d4ec Reviewed-on: https://go-review.googlesource.com/c/go/+/296269 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dan Scales <danscales@google.com>
2021-02-26syscall: introduce SysProcAttr.ParentProcess on WindowsJason A. Donenfeld
This allows users to specify which process should be used as the parent process when creating a new process. Note that this doesn't just trivially pass the handle onward to PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, because inherited handles must be valid in the parent process, so if we're changing the destination process, then we must also change the origin of the parent handles. And, the StartProcess function must clean up these handles successfully when exiting, regardless of where the duplication happened. So, we take care in this commit to use DuplicateHandle for both duplicating and for closing the inherited handles. The test was taken originally from CL 288272 and adjusted for use here. Fixes #44011. Change-Id: Ib3b132028dcab1aded3dc0e65126c8abebfa35eb Reviewed-on: https://go-review.googlesource.com/c/go/+/288300 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2021-02-26syscall: introduce SysProcAttr.AdditionalInheritedHandles on WindowsJason A. Donenfeld
This allows users to specify handles that they explicitly want to be inherited by the new process. These handles must already be marked as inheritable. Updates #44011. Updates #21085. Change-Id: Ib18322e7dc2909e68c4209e80385492804fa15d3 Reviewed-on: https://go-review.googlesource.com/c/go/+/288298 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2021-02-26syscall: restrict inherited handles on WindowsJason A. Donenfeld
Windows does not have CLOEXEC, but rather handles are marked explicitly for being inherited by new processes. This can cause problems when different Windows functions create new processes from different threads. syscall.StartProcess has traditionally used a mutex to prevent races with itself, but this doesn't handle races with other win32 functions. Fortunately there's a solution: PROC_THREAD_ATTRIBUTE_HANDLE_LIST allows us to pass the entire list of handles that we want to be inherited. This lets us get rid of the mutex and also makes process creation safe across the Go runtime, no matter the context. Updates #44011. Change-Id: Ia3424cd2ec64868849cbd6cbb5b0d765224bf4ab Reviewed-on: https://go-review.googlesource.com/c/go/+/288297 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2021-02-26syscall: add support for proc thread attribute listsJason A. Donenfeld
This will allow us to pass additional attributes when starting processes. Updates #44011. Change-Id: I4af365c5544a6d421830f247593ec970200e5e03 Reviewed-on: https://go-review.googlesource.com/c/go/+/288296 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>