]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/objabi: support boolean GOEXPERIMENTs
authorAustin Clements <austin@google.com>
Mon, 15 Mar 2021 20:23:21 +0000 (16:23 -0400)
committerAustin Clements <austin@google.com>
Thu, 18 Mar 2021 16:51:24 +0000 (16:51 +0000)
commitaf4388aee195c4328a779ba8f8171ad1632feb7e
treeb3b6ad2a85303649ef7342f2278bfde88d46c7cd
parent6461d74bf203925c981c889034ac5f713dc9db0b
cmd/internal/objabi: support boolean GOEXPERIMENTs

Currently, objabi exports GOEXPERIMENT flags as ints that are either 0
or 1. Since the dawn of time, there's been a comment saying that we
*could* support general integers here, but it's never happened and all
the "== 0" and "!= 0" and "== 1" are driving me crazy and are making
the code harder to read and maintain. Hence, this CL adds support for
boolean GOEXPERIMENT flags. We'll introduce some bool-typed flags in
the next CL.

Change-Id: I7813400db130a9b8f71a644fe7912808dbe645bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/302069
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/internal/objabi/util.go