]> Cypherpunks repositories - gostls13.git/commit
runtime: split PCs out of scase
authorMatthew Dempsky <mdempsky@google.com>
Mon, 27 Jul 2020 22:20:18 +0000 (15:20 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 18 Aug 2020 20:06:16 +0000 (20:06 +0000)
commitd36bc7d78ad226b20056c08fb8bca041e25b3d1d
treee0233fb7ce06226269c57ab5b3fb6325df1fc153
parent8a984e8e3f2cf4101f448ea9b9d9880b9e83c11e
runtime: split PCs out of scase

Per-case PCs are only needed for race detector builds, so this allows
skipping allocating stack space for them for non-race builds.

It's possible to arrange the PCs and order arrays consecutively in
memory so that we could just reuse the order0 pointer to identify
both. However, there's more risk of that silently going wrong, so this
commit passes them as separate arguments for now. We can revisit this
in the future.

Updates #40410.

Change-Id: I8468bc25749e559891cb0cb007d1cc4a40fdd0f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/245124
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/select.go
src/runtime/select.go