diff options
| author | Alberto Donizetti <alb.donizetti@gmail.com> | 2020-10-19 11:31:10 +0200 |
|---|---|---|
| committer | Alberto Donizetti <alb.donizetti@gmail.com> | 2020-10-22 09:33:46 +0000 |
| commit | 3bac5faa4af2f5c454b2cebaa8be5cde9b8e2add (patch) | |
| tree | 98a8f42a1ba64fba2c406522629de2bb51b5078e /src/runtime | |
| parent | 4c7a18d74ae4d574313c01e95de66be06e3a3e82 (diff) | |
| download | go-3bac5faa4af2f5c454b2cebaa8be5cde9b8e2add.tar.xz | |
cmd/compile: make gc debug flags collector a struct
gc debug flags are currently stored in a 256-long array, that is then
addressed using the ASCII numeric value of the flag itself (a quirk
inherited from the old C compiler). It is also a little wasteful,
since we only define 16 flags, and the other 240 array elements are
always empty.
This change makes Debug a struct, which also provides static checking
that we're not referencing flags that does not exist.
Change-Id: I2f0dfef2529325514b3398cf78635543cdf48fe0
Reviewed-on: https://go-review.googlesource.com/c/go/+/263539
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
