cmd/compile: move Node.Walkdef into flags

Node.Walkdef is 0, 1, or 2, so it only requires two bits.
Add support for 2-bit values to bitset,
and use it for Node.Walkdef.

Class, Embedded, Typecheck, and Initorder will follow suit
in subsequent CLs.

The multi-bit flags will go at the beginning,
since that generates (marginally) more efficient code.

Change-Id: Id6e2e66e437f10aaa05b8a6e1652efb327d06128
Reviewed-on: https://go-review.googlesource.com/41791
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-25 17:30:08 -07:00
parent 804784c8ba
commit d286399641
4 changed files with 43 additions and 27 deletions

View file

@ -25,7 +25,7 @@ func TestSizeof(t *testing.T) {
{Func{}, 100, 168},
{Name{}, 36, 56},
{Param{}, 28, 56},
{Node{}, 84, 136},
{Node{}, 80, 136},
}
for _, tt := range tests {