src/cmd/compile/internal/types/utils.go
raw| 1 | // Copyright 2017 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package types |
| 6 | |
| 7 | const BADWIDTH = -1000000000 |
| 8 | |
| 9 | type bitset8 uint8 |
| 10 | |
| 11 | func (f *bitset8) set(mask uint8, b bool) { |
| 12 | if b { |
| 13 | *(*uint8)(f) |= mask |
| 14 | } else { |
| 15 | *(*uint8)(f) &^= mask |
| 16 | } |
| 17 | } |