Commit 7b144ed4 authored by Russ Cox's avatar Russ Cox
Browse files

[dev.regabi] cmd/compile: rewrite concurrentFlagOk to be clearer

The current implementation copies Debug, clears a bunch of flags
that are meant to be considered OK, and then checks the result
against the zero value. But more flags are cleared than remain:
it's easier to write and to understand to just check the ones that
need checking.

This phrasing also makes it safe to move more flags into the struct.

It turns out that some of the flags being checked should probably
not be checked, but this CL is meant to be a strict semantic no-op,
so left a TODO to clean up the function a bit more later.

Change-Id: I7afe6d7b32b5b889c40dd339568e8602e02df9bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/271666


Trust: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent c754f252
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment