-
- Downloads
runtime: eliminate scase.kind field
This is the gofrontend version of https://golang.org/cl/245125. Original CL description: Currently, we include a "kind" field on scase to distinguish the three kinds of cases in a select statement: sends, receives, and defaults. This commit removes by kind field by instead arranging for the compiler to always place sends before receives, and to provide their counts separately. It also passes an explicit "block bool" parameter to avoid needing to include a default case in the array. It's safe to shuffle cases like this because the runtime will randomize the order they're polled in anyway. For golang/go#40410. This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279735
Showing
- gcc/go/gofrontend/MERGE 1 addition, 1 deletiongcc/go/gofrontend/MERGE
- gcc/go/gofrontend/runtime.def 2 additions, 2 deletionsgcc/go/gofrontend/runtime.def
- gcc/go/gofrontend/statements.cc 92 additions, 39 deletionsgcc/go/gofrontend/statements.cc
- gcc/go/gofrontend/statements.h 32 additions, 16 deletionsgcc/go/gofrontend/statements.h
- gcc/go/gofrontend/types.cc 2 additions, 5 deletionsgcc/go/gofrontend/types.cc
- libgo/go/runtime/select.go 53 additions, 40 deletionslibgo/go/runtime/select.go
Loading
Please register or sign in to comment