| // Copyright 2023 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Code generated by "stringer -bitset -type ParamPropBits"; DO NOT EDIT. |
| |
| package inlheur |
| |
| import ( |
| "bytes" |
| "strconv" |
| ) |
| |
| func _() { |
| // An "invalid array index" compiler error signifies that the constant values have changed. |
| // Re-run the stringer command to generate them again. |
| var x [1]struct{} |
| _ = x[ParamNoInfo-0] |
| _ = x[ParamFeedsInterfaceMethodCall-2] |
| _ = x[ParamMayFeedInterfaceMethodCall-4] |
| _ = x[ParamFeedsIndirectCall-8] |
| _ = x[ParamMayFeedIndirectCall-16] |
| _ = x[ParamFeedsIfOrSwitch-32] |
| _ = x[ParamMayFeedIfOrSwitch-64] |
| } |
| |
| var _ParamPropBits_value = [...]uint64{ |
| 0x0, /* ParamNoInfo */ |
| 0x2, /* ParamFeedsInterfaceMethodCall */ |
| 0x4, /* ParamMayFeedInterfaceMethodCall */ |
| 0x8, /* ParamFeedsIndirectCall */ |
| 0x10, /* ParamMayFeedIndirectCall */ |
| 0x20, /* ParamFeedsIfOrSwitch */ |
| 0x40, /* ParamMayFeedIfOrSwitch */ |
| } |
| |
| const _ParamPropBits_name = "ParamNoInfoParamFeedsInterfaceMethodCallParamMayFeedInterfaceMethodCallParamFeedsIndirectCallParamMayFeedIndirectCallParamFeedsIfOrSwitchParamMayFeedIfOrSwitch" |
| |
| var _ParamPropBits_index = [...]uint8{0, 11, 40, 71, 93, 117, 137, 159} |
| |
| func (i ParamPropBits) String() string { |
| var b bytes.Buffer |
| |
| remain := uint64(i) |
| seen := false |
| |
| for k, v := range _ParamPropBits_value { |
| x := _ParamPropBits_name[_ParamPropBits_index[k]:_ParamPropBits_index[k+1]] |
| if v == 0 { |
| if i == 0 { |
| b.WriteString(x) |
| return b.String() |
| } |
| continue |
| } |
| if (v & remain) == v { |
| remain &^= v |
| x := _ParamPropBits_name[_ParamPropBits_index[k]:_ParamPropBits_index[k+1]] |
| if seen { |
| b.WriteString("|") |
| } |
| seen = true |
| b.WriteString(x) |
| } |
| } |
| if remain == 0 { |
| return b.String() |
| } |
| return "ParamPropBits(0x" + strconv.FormatInt(int64(i), 16) + ")" |
| } |