[pull] master from golang:master#769
Merged
pull[bot] merged 14 commits intohttpsgithu:masterfrom Mar 1, 2022
Merged
Conversation
Some of the SSA pseudo-variables like the memory variable don't have a package. Print those gracefully instead of printing a panic. Fixes #51108 Change-Id: I5c29029356e045c5cf70909d6e63666ebc58ffaa Reviewed-on: https://go-review.googlesource.com/c/go/+/384614 Trust: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Fixes #50823 Change-Id: I1c12e875b840eecadefb0d9e044ff2a268ccfbaa Reviewed-on: https://go-review.googlesource.com/c/go/+/380894 Reviewed-by: Keith Randall <khr@golang.org> Trust: Michael Knyszek <mknyszek@google.com>
For certain values of GOMAXPROCS, the current code is less random than it looks. For example with GOMAXPROCS=12, there are 4 coprimes: 1 5 7 11. That's bad, as 12 and 4 are not relatively prime. So if pos == 2, then we always pick 7 as the inc. We want to pick pos and inc independently at random. Change-Id: I5c7e4f01f9223cbc2db12a685dc0bced2cf39abf Reviewed-on: https://go-review.googlesource.com/c/go/+/369976 Run-TryBot: Keith Randall <khr@golang.org> Trust: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Just a cleanup to make sure that generic SSA is properly typed. Change-Id: Ie75fa972ae4e5fdaca535968769bca36044191c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/372574 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This keeps cmd/compile/internal/importer similar to how go/internal/gcimporter will work after unified IR support is added in a subsequent CL. Change-Id: Id3c000f3a13a54a725602552c6b3191d1affb184 Reviewed-on: https://go-review.googlesource.com/c/go/+/388614 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
No need to eagerly read the object dictionary or setup the object reader outside of the lazy resolve function. Change-Id: Ic4245b0c09f3beaff97860d7f2dfb5b2b5778cc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/388615 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
The next CL will remove the -G flag, effectively hard-coding it to its current default (-G=3). Change-Id: Ib4743b529206928f9f1cca9fdb19989728327831 Reviewed-on: https://go-review.googlesource.com/c/go/+/388534 Reviewed-by: Keith Randall <khr@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Post 1.18, we're committed to types2 as cmd/compile's type checker. Change-Id: I30d2dd2b2ba62832fcdcaeb996fcbc8a4a05d591 Reviewed-on: https://go-review.googlesource.com/c/go/+/388535 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org>
This code was only needed for supporting -G=0 mode, which is now gone. Change-Id: I504887ab179e357a3cd21ef582f9edae49f6cbb6 Reviewed-on: https://go-review.googlesource.com/c/go/+/388536 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org>
The typechecking code for dealing with dot imports and redeclaration errors can be removed, as these will now always be caught by types2 instead. Even when running the typecheck on internally constructed IR, we'll never introduce new imports or redeclare identifiers. Also, Func.Shortname (and typecheck.addmethod) was only used by the -G=0 frontend. The new types2-based frontends directly associate methods with their receiver type during IR construction. Change-Id: I6578a448412141c87a0a53a6566639d9c00eeed7 Reviewed-on: https://go-review.googlesource.com/c/go/+/388537 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org>
ir.PkgName was only used by the old -G=0 frontend for representing identifiers that refer to a package name. The new types2-based frontends directly resolve the qualified identifier to the respective object during IR construction. Similarly, most of the ir.*Type nodes were only needed for representing types in the IR prior to type checking. The new types2-based frontends directly construct the corresponding types.Type instead. Exception: The internal typecheck.DeclFunc API used for compiler-generated functions still depends on ir.FuncType, so that IR node type is retained for now. (Eventually, we should update typecheck.DeclFunc and callers to not depend on it, but it's not urgent.) Change-Id: I982f1bbd41eef5b42ce0f32676c7dc4a8ab6d0ee Reviewed-on: https://go-review.googlesource.com/c/go/+/388538 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org>
This test case is failing on the noopt builder, because it disables inlining. Evidently the explicit -gcflags flag in all of our generics tests was overriding the noopt builder's default mode. This CL restores a noop -gcflags to get the builder green again until the issue can be properly fixed. Updates #51413. Change-Id: I61d22a007105f756104ba690b73f1d68ce4be281 Reviewed-on: https://go-review.googlesource.com/c/go/+/388894 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
We use AutogeneratedPos for most compiler-generated functions. But for method value wrappers we currently don't. Instead, we use the Pos for their (direct) declaration if there is one, otherwise not set it in methodValueWrapper, which will probably cause it to inherit from the caller, i.e. the Pos of that method value expression. If that Pos has inline information, it will cause the method wrapper to have bogus inline information, which could lead to infinite loop when printing a stack trace. Change it to use AutogeneratedPos instead. Fixes #51401. Change-Id: I398dfe85f9f875e1fd82dc2f489dab63ada6570d Reviewed-on: https://go-review.googlesource.com/c/go/+/388794 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Especially once this code gets copied into x/tools, we need a way to evolve the file format, so add an explicit version number. Change-Id: I9cc2e357c3ca3f07fd8d0c0ba4e4a95f89edeac6 Reviewed-on: https://go-review.googlesource.com/c/go/+/388914 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )