-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime, cmd/compile: share more constants #59670
Comments
Change https://go.dev/cl/485195 mentions this issue: |
For anyone curious, here are the duplicated constants my little tool found. Some of these are only coincidental, but most are real duplicates.
|
Change https://go.dev/cl/485495 mentions this issue: |
Change https://go.dev/cl/485496 mentions this issue: |
Change https://go.dev/cl/485497 mentions this issue: |
Change https://go.dev/cl/486381 mentions this issue: |
Change https://go.dev/cl/486379 mentions this issue: |
Change https://go.dev/cl/486380 mentions this issue: |
…ternal/abi For #59670. Change-Id: I04a17079b351b9b4999ca252825373c17afb8a88 Reviewed-on: https://go-review.googlesource.com/c/go/+/486379 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
The current definitions of StackLimit and StackGuard only indirectly specify the NOSPLIT stack limit and duplicate a literal constant (928). Currently, they define the stack guard delta, and from there compute the NOSPLIT limit. Rationalize these by defining a new constant, abi.StackNosplitBase, which consolidates and directly specifies the NOSPLIT stack limit (in the default case). From this we then compute the stack guard delta, inverting the relationship between these two constants. While we're here, we rename StackLimit to StackNosplit to make it clearer what's being limited. This change does not affect the values of these constants in the default configuration. It does slightly change how StackGuardMultiplier values other than 1 affect the constants, but this multiplier is a pretty rough heuristic anyway. before after stackNosplit 800 800 _StackGuard 928 928 stackNosplit -race 1728 1600 _StackGuard -race 1856 1728 For #59670. Change-Id: Ibe20825ebe0076bbd7b0b7501177b16c9dbcb79e Reviewed-on: https://go-review.googlesource.com/c/go/+/486380 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
For #59670. Change-Id: I4476d6f92663e8a825d063d6e6a7fc9a2ac99d4d Reviewed-on: https://go-review.googlesource.com/c/go/+/486381 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Change https://go.dev/cl/486975 mentions this issue: |
Change https://go.dev/cl/486977 mentions this issue: |
Change https://go.dev/cl/486976 mentions this issue: |
For #59670. Change-Id: I517e97ea74cf232e5cfbb77b127fa8804f74d84b Reviewed-on: https://go-review.googlesource.com/c/go/+/485495 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com>
For #59670. Change-Id: Ie784ba4dd2701e4f455e1abde4a6bfebee4b1387 Reviewed-on: https://go-review.googlesource.com/c/go/+/485496 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com>
… internal/abi We also rename the constants related to unsafe-points: currently, they follow the same naming scheme as the PCDATA table indexes, but are not PCDATA table indexes. For #59670. Change-Id: I06529fecfae535be5fe7d9ac56c886b9106c74fd Reviewed-on: https://go-review.googlesource.com/c/go/+/485497 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
…ternal/abi For #59670. Change-Id: I91448363be2fc678964ce119d85cd5fae34a14da Reviewed-on: https://go-review.googlesource.com/c/go/+/486975 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com>
The current definitions of StackLimit and StackGuard only indirectly specify the NOSPLIT stack limit and duplicate a literal constant (928). Currently, they define the stack guard delta, and from there compute the NOSPLIT limit. Rationalize these by defining a new constant, abi.StackNosplitBase, which consolidates and directly specifies the NOSPLIT stack limit (in the default case). From this we then compute the stack guard delta, inverting the relationship between these two constants. While we're here, we rename StackLimit to StackNosplit to make it clearer what's being limited. This change does not affect the values of these constants in the default configuration. It does slightly change how StackGuardMultiplier values other than 1 affect the constants, but this multiplier is a pretty rough heuristic anyway. before after stackNosplit 800 800 _StackGuard 928 928 stackNosplit -race 1728 1600 _StackGuard -race 1856 1728 For #59670. Change-Id: Ia94094c5e47897e7c088d24b4a5e33f5c2768db5 Reviewed-on: https://go-review.googlesource.com/c/go/+/486976 Auto-Submit: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
For #59670. Change-Id: I0efa743edc08e48dc8d906803ba45e9f641369db Reviewed-on: https://go-review.googlesource.com/c/go/+/486977 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com>
Change https://go.dev/cl/494795 mentions this issue: |
method -> Method For #59670 Change-Id: I78e0410f3d5094aa12b2f3ccd6735fec0d696190 Reviewed-on: https://go-review.googlesource.com/c/go/+/494795 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com>
This is much better than it was! Taking another pass through the common constants, I think these could still be merged: _dotdotdot src/runtime/traceback.go:657:3 _endAgg src/runtime/traceback.go:656:3 _endSeq src/runtime/traceback.go:654:3 _offsetTooLarge src/runtime/traceback.go:658:3 _startAgg src/runtime/traceback.go:655:3 boundsIndex src/runtime/error.go:127:2 boundsSlice3Acap src/runtime/error.go:134:2 boundsSlice3Alen src/runtime/error.go:133:2 boundsSlice3B src/runtime/error.go:135:2 boundsSlice3C src/runtime/error.go:136:2 boundsSliceAcap src/runtime/error.go:130:2 bucketCnt src/runtime/map.go:67:2 flagAddr src/internal/reflectlite/value.go:73:2 flagEmbedRO src/internal/reflectlite/value.go:71:2 flagIndir src/internal/reflectlite/value.go:72:2 flagKindWidth src/internal/reflectlite/value.go:68:2 flagMethod src/internal/reflectlite/value.go:74:2 flagMethodShift src/internal/reflectlite/value.go:75:2 flagRO src/internal/reflectlite/value.go:76:2 flagStickyRO src/internal/reflectlite/value.go:70:2 kindArray src/runtime/typekind.go:24:2 kindBool src/runtime/typekind.go:8:2 kindChan src/runtime/typekind.go:25:2 kindComplex128 src/runtime/typekind.go:23:2 kindComplex64 src/runtime/typekind.go:22:2 kindDirectIface src/runtime/typekind.go:35:2 kindFloat32 src/runtime/typekind.go:20:2 kindFloat64 src/runtime/typekind.go:21:2 kindFunc src/runtime/typekind.go:26:2 kindGCProg src/runtime/typekind.go:36:2 kindInt src/runtime/typekind.go:9:2 kindInt16 src/runtime/typekind.go:11:2 kindInt32 src/runtime/typekind.go:12:2 kindInt64 src/runtime/typekind.go:13:2 kindInt8 src/runtime/typekind.go:10:2 kindInterface src/runtime/typekind.go:27:2 kindMap src/runtime/typekind.go:28:2 kindMask src/runtime/typekind.go:37:2 kindPtr src/runtime/typekind.go:29:2 kindSlice src/runtime/typekind.go:30:2 kindString src/runtime/typekind.go:31:2 kindStruct src/runtime/typekind.go:32:2 kindUint src/runtime/typekind.go:14:2 kindUint16 src/runtime/typekind.go:16:2 kindUint32 src/runtime/typekind.go:17:2 kindUint64 src/runtime/typekind.go:18:2 kindUint8 src/runtime/typekind.go:15:2 kindUintptr src/runtime/typekind.go:19:2 kindUnsafePointer src/runtime/typekind.go:33:2 limit src/runtime/traceback.go:662:3 maxDepth src/runtime/traceback.go:663:3 maxElemSize src/runtime/map.go:80:2 maxInt64 src/runtime/string.go:354:2 maxKeySize src/runtime/map.go:79:2 maxLen src/runtime/traceback.go:664:3 maxPtrmaskBytes src/reflect/type.go:2617:7 maxValSize src/reflect/type.go:1955:2 maxZero src/runtime/map.go:1439:7 minfunc src/runtime/symtab.go:501:7 pcbucketsize src/runtime/symtab.go:502:7 selectDefault src/runtime/select.go:538:2 selectRecv src/runtime/select.go:537:2 selectSend src/runtime/select.go:536:2 |
Change https://go.dev/cl/543655 mentions this issue: |
For #59670 Change-Id: If2b05b1ba30b607b518577b0e11ba5a0b07999c5 GitHub-Last-Rev: a664aa1 GitHub-Pull-Request: #64906 Reviewed-on: https://go-review.googlesource.com/c/go/+/553276 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
…ernal/abi For #59670 Change-Id: I651e211650e69989c598ab16202105bc6e68d67e GitHub-Last-Rev: fba087a GitHub-Pull-Request: #64776 Reviewed-on: https://go-review.googlesource.com/c/go/+/550615 Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
…/abi For #59670 Change-Id: Iec85ee7312bb566b3f1224424f7d27bf4e408b13 GitHub-Last-Rev: c620abf GitHub-Pull-Request: #64905 Reviewed-on: https://go-review.googlesource.com/c/go/+/553295 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
… into internal/abi For golang#59670
…l/abi For #59670 Change-Id: I63a6e2cfaf9eec03866ea61064164a059fc42bb2 GitHub-Last-Rev: a3aa46a GitHub-Pull-Request: #64773 Reviewed-on: https://go-review.googlesource.com/c/go/+/550595 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
…al/abi For #59670 Change-Id: I248bad2d2f9d05903b80022e52a795ff7a4fae93 GitHub-Last-Rev: df6a7bf GitHub-Pull-Request: #64775 Reviewed-on: https://go-review.googlesource.com/c/go/+/550596 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
For golang#59670 Change-Id: I48a6fca4154591bef8df4364230295e826bd8730
Change https://go.dev/cl/559435 mentions this issue: |
For golang#59670 Change-Id: I53e100362325472fd16a986c49ad94bb2c77244f
Change https://go.dev/cl/559475 mentions this issue: |
@aclements Should the common constants here not merge the exported API? |
Change https://go.dev/cl/562298 mentions this issue: |
For golang#59670 Change-Id: I53e100362325472fd16a986c49ad94bb2c77244f
For #59670 Change-Id: I6343bacd3126fe6381a2e73be10f61691792824d GitHub-Last-Rev: bbab8d1 GitHub-Pull-Request: #65373 Reviewed-on: https://go-review.googlesource.com/c/go/+/559475 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
For golang#59670 Change-Id: If2b05b1ba30b607b518577b0e11ba5a0b07999c5 GitHub-Last-Rev: a664aa1 GitHub-Pull-Request: golang#64906 Reviewed-on: https://go-review.googlesource.com/c/go/+/553276 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
…ernal/abi For golang#59670 Change-Id: I651e211650e69989c598ab16202105bc6e68d67e GitHub-Last-Rev: fba087a GitHub-Pull-Request: golang#64776 Reviewed-on: https://go-review.googlesource.com/c/go/+/550615 Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
…/abi For golang#59670 Change-Id: Iec85ee7312bb566b3f1224424f7d27bf4e408b13 GitHub-Last-Rev: c620abf GitHub-Pull-Request: golang#64905 Reviewed-on: https://go-review.googlesource.com/c/go/+/553295 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
…l/abi For golang#59670 Change-Id: I63a6e2cfaf9eec03866ea61064164a059fc42bb2 GitHub-Last-Rev: a3aa46a GitHub-Pull-Request: golang#64773 Reviewed-on: https://go-review.googlesource.com/c/go/+/550595 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
…al/abi For golang#59670 Change-Id: I248bad2d2f9d05903b80022e52a795ff7a4fae93 GitHub-Last-Rev: df6a7bf GitHub-Pull-Request: golang#64775 Reviewed-on: https://go-review.googlesource.com/c/go/+/550596 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
For golang#59670 Change-Id: I6343bacd3126fe6381a2e73be10f61691792824d GitHub-Last-Rev: bbab8d1 GitHub-Pull-Request: golang#65373 Reviewed-on: https://go-review.googlesource.com/c/go/+/559475 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
… into internal/abi For #59670 Change-Id: I5c0a463f54208db215683f11e6454d0178edda3c GitHub-Last-Rev: 6963f3c GitHub-Pull-Request: #64904 Reviewed-on: https://go-review.googlesource.com/c/go/+/553275 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
…l/abi For #59670 Change-Id: I9265e033bf3a84c3dc7b4a5d52c0df9672435f0d GitHub-Last-Rev: 8e40990 GitHub-Pull-Request: #64774 Reviewed-on: https://go-review.googlesource.com/c/go/+/550117 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
For #59670 Change-Id: Id66e102f13e529dd041b68ce869026a56f0a1b9b GitHub-Last-Rev: 43aa937 GitHub-Pull-Request: #65564 Reviewed-on: https://go-review.googlesource.com/c/go/+/562298 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Austin Clements <austin@google.com>
CL 462115 merged a few constants that were duplicated between several runtime-related and toolchain-related packages into a single
internal/abi
package. This is an internal cleanup tracking issue for merging more of these constants.The text was updated successfully, but these errors were encountered: