Source file src/cmd/compile/internal/types/algkind_string.go

     1  // Code generated by "stringer -type AlgKind -trimprefix A alg.go"; DO NOT EDIT.
     2  
     3  package types
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[ANOEQ-0]
    12  	_ = x[AMEM0-1]
    13  	_ = x[AMEM8-2]
    14  	_ = x[AMEM16-3]
    15  	_ = x[AMEM32-4]
    16  	_ = x[AMEM64-5]
    17  	_ = x[AMEM128-6]
    18  	_ = x[ASTRING-7]
    19  	_ = x[AINTER-8]
    20  	_ = x[ANILINTER-9]
    21  	_ = x[AFLOAT32-10]
    22  	_ = x[AFLOAT64-11]
    23  	_ = x[ACPLX64-12]
    24  	_ = x[ACPLX128-13]
    25  	_ = x[AMEM-100]
    26  	_ = x[ASPECIAL - -1]
    27  }
    28  
    29  const (
    30  	_AlgKind_name_0 = "SPECIALNOEQMEM0MEM8MEM16MEM32MEM64MEM128STRINGINTERNILINTERFLOAT32FLOAT64CPLX64CPLX128"
    31  	_AlgKind_name_1 = "MEM"
    32  )
    33  
    34  var (
    35  	_AlgKind_index_0 = [...]uint8{0, 7, 11, 15, 19, 24, 29, 34, 40, 46, 51, 59, 66, 73, 79, 86}
    36  )
    37  
    38  func (i AlgKind) String() string {
    39  	switch {
    40  	case -1 <= i && i <= 13:
    41  		i -= -1
    42  		return _AlgKind_name_0[_AlgKind_index_0[i]:_AlgKind_index_0[i+1]]
    43  	case i == 100:
    44  		return _AlgKind_name_1
    45  	default:
    46  		return "AlgKind(" + strconv.FormatInt(int64(i), 10) + ")"
    47  	}
    48  }
    49  

View as plain text