github.com/goplus/gossa@v0.3.25/pkg/reflect/go117_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //go:build go1.17 && !go1.18
     4  // +build go1.17,!go1.18
     5  
     6  package reflect
     7  
     8  import (
     9  	q "reflect"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "reflect",
    20  		Path: "reflect",
    21  		Deps: map[string]string{
    22  			"internal/abi":          "abi",
    23  			"internal/goexperiment": "goexperiment",
    24  			"internal/itoa":         "itoa",
    25  			"internal/unsafeheader": "unsafeheader",
    26  			"math":                  "math",
    27  			"runtime":               "runtime",
    28  			"strconv":               "strconv",
    29  			"sync":                  "sync",
    30  			"unicode":               "unicode",
    31  			"unicode/utf8":          "utf8",
    32  			"unsafe":                "unsafe",
    33  		},
    34  		Interfaces: map[string]reflect.Type{
    35  			"Type": reflect.TypeOf((*q.Type)(nil)).Elem(),
    36  		},
    37  		NamedTypes: map[string]gossa.NamedType{
    38  			"ChanDir":      {reflect.TypeOf((*q.ChanDir)(nil)).Elem(), "String", ""},
    39  			"Kind":         {reflect.TypeOf((*q.Kind)(nil)).Elem(), "String", ""},
    40  			"MapIter":      {reflect.TypeOf((*q.MapIter)(nil)).Elem(), "", "Key,Next,Value"},
    41  			"Method":       {reflect.TypeOf((*q.Method)(nil)).Elem(), "IsExported", ""},
    42  			"SelectCase":   {reflect.TypeOf((*q.SelectCase)(nil)).Elem(), "", ""},
    43  			"SelectDir":    {reflect.TypeOf((*q.SelectDir)(nil)).Elem(), "", ""},
    44  			"SliceHeader":  {reflect.TypeOf((*q.SliceHeader)(nil)).Elem(), "", ""},
    45  			"StringHeader": {reflect.TypeOf((*q.StringHeader)(nil)).Elem(), "", ""},
    46  			"StructField":  {reflect.TypeOf((*q.StructField)(nil)).Elem(), "IsExported", ""},
    47  			"StructTag":    {reflect.TypeOf((*q.StructTag)(nil)).Elem(), "Get,Lookup", ""},
    48  			"Value":        {reflect.TypeOf((*q.Value)(nil)).Elem(), "Addr,Bool,Bytes,Call,CallSlice,CanAddr,CanConvert,CanInterface,CanSet,Cap,Close,Complex,Convert,Elem,Field,FieldByIndex,FieldByName,FieldByNameFunc,Float,Index,Int,Interface,InterfaceData,IsNil,IsValid,IsZero,Kind,Len,MapIndex,MapKeys,MapRange,Method,MethodByName,NumField,NumMethod,OverflowComplex,OverflowFloat,OverflowInt,OverflowUint,Pointer,Recv,Send,Set,SetBool,SetBytes,SetCap,SetComplex,SetFloat,SetInt,SetLen,SetMapIndex,SetPointer,SetString,SetUint,Slice,Slice3,String,TryRecv,TrySend,Type,Uint,UnsafeAddr,assignTo,call,pointer,recv,runes,send,setRunes", ""},
    49  			"ValueError":   {reflect.TypeOf((*q.ValueError)(nil)).Elem(), "", "Error"},
    50  		},
    51  		AliasTypes: map[string]reflect.Type{},
    52  		Vars:       map[string]reflect.Value{},
    53  		Funcs: map[string]reflect.Value{
    54  			"Append":          reflect.ValueOf(q.Append),
    55  			"AppendSlice":     reflect.ValueOf(q.AppendSlice),
    56  			"ArrayOf":         reflect.ValueOf(q.ArrayOf),
    57  			"ChanOf":          reflect.ValueOf(q.ChanOf),
    58  			"Copy":            reflect.ValueOf(q.Copy),
    59  			"DeepEqual":       reflect.ValueOf(q.DeepEqual),
    60  			"FuncOf":          reflect.ValueOf(q.FuncOf),
    61  			"Indirect":        reflect.ValueOf(q.Indirect),
    62  			"MakeChan":        reflect.ValueOf(q.MakeChan),
    63  			"MakeFunc":        reflect.ValueOf(q.MakeFunc),
    64  			"MakeMap":         reflect.ValueOf(q.MakeMap),
    65  			"MakeMapWithSize": reflect.ValueOf(q.MakeMapWithSize),
    66  			"MakeSlice":       reflect.ValueOf(q.MakeSlice),
    67  			"MapOf":           reflect.ValueOf(q.MapOf),
    68  			"New":             reflect.ValueOf(q.New),
    69  			"NewAt":           reflect.ValueOf(q.NewAt),
    70  			"PtrTo":           reflect.ValueOf(q.PtrTo),
    71  			"Select":          reflect.ValueOf(q.Select),
    72  			"SliceOf":         reflect.ValueOf(q.SliceOf),
    73  			"StructOf":        reflect.ValueOf(q.StructOf),
    74  			"Swapper":         reflect.ValueOf(q.Swapper),
    75  			"TypeOf":          reflect.ValueOf(q.TypeOf),
    76  			"ValueOf":         reflect.ValueOf(q.ValueOf),
    77  			"VisibleFields":   reflect.ValueOf(q.VisibleFields),
    78  			"Zero":            reflect.ValueOf(q.Zero),
    79  		},
    80  		TypedConsts: map[string]gossa.TypedConst{
    81  			"Array":         {reflect.TypeOf(q.Array), constant.MakeInt64(int64(q.Array))},
    82  			"Bool":          {reflect.TypeOf(q.Bool), constant.MakeInt64(int64(q.Bool))},
    83  			"BothDir":       {reflect.TypeOf(q.BothDir), constant.MakeInt64(int64(q.BothDir))},
    84  			"Chan":          {reflect.TypeOf(q.Chan), constant.MakeInt64(int64(q.Chan))},
    85  			"Complex128":    {reflect.TypeOf(q.Complex128), constant.MakeInt64(int64(q.Complex128))},
    86  			"Complex64":     {reflect.TypeOf(q.Complex64), constant.MakeInt64(int64(q.Complex64))},
    87  			"Float32":       {reflect.TypeOf(q.Float32), constant.MakeInt64(int64(q.Float32))},
    88  			"Float64":       {reflect.TypeOf(q.Float64), constant.MakeInt64(int64(q.Float64))},
    89  			"Func":          {reflect.TypeOf(q.Func), constant.MakeInt64(int64(q.Func))},
    90  			"Int":           {reflect.TypeOf(q.Int), constant.MakeInt64(int64(q.Int))},
    91  			"Int16":         {reflect.TypeOf(q.Int16), constant.MakeInt64(int64(q.Int16))},
    92  			"Int32":         {reflect.TypeOf(q.Int32), constant.MakeInt64(int64(q.Int32))},
    93  			"Int64":         {reflect.TypeOf(q.Int64), constant.MakeInt64(int64(q.Int64))},
    94  			"Int8":          {reflect.TypeOf(q.Int8), constant.MakeInt64(int64(q.Int8))},
    95  			"Interface":     {reflect.TypeOf(q.Interface), constant.MakeInt64(int64(q.Interface))},
    96  			"Invalid":       {reflect.TypeOf(q.Invalid), constant.MakeInt64(int64(q.Invalid))},
    97  			"Map":           {reflect.TypeOf(q.Map), constant.MakeInt64(int64(q.Map))},
    98  			"Ptr":           {reflect.TypeOf(q.Ptr), constant.MakeInt64(int64(q.Ptr))},
    99  			"RecvDir":       {reflect.TypeOf(q.RecvDir), constant.MakeInt64(int64(q.RecvDir))},
   100  			"SelectDefault": {reflect.TypeOf(q.SelectDefault), constant.MakeInt64(int64(q.SelectDefault))},
   101  			"SelectRecv":    {reflect.TypeOf(q.SelectRecv), constant.MakeInt64(int64(q.SelectRecv))},
   102  			"SelectSend":    {reflect.TypeOf(q.SelectSend), constant.MakeInt64(int64(q.SelectSend))},
   103  			"SendDir":       {reflect.TypeOf(q.SendDir), constant.MakeInt64(int64(q.SendDir))},
   104  			"Slice":         {reflect.TypeOf(q.Slice), constant.MakeInt64(int64(q.Slice))},
   105  			"String":        {reflect.TypeOf(q.String), constant.MakeInt64(int64(q.String))},
   106  			"Struct":        {reflect.TypeOf(q.Struct), constant.MakeInt64(int64(q.Struct))},
   107  			"Uint":          {reflect.TypeOf(q.Uint), constant.MakeInt64(int64(q.Uint))},
   108  			"Uint16":        {reflect.TypeOf(q.Uint16), constant.MakeInt64(int64(q.Uint16))},
   109  			"Uint32":        {reflect.TypeOf(q.Uint32), constant.MakeInt64(int64(q.Uint32))},
   110  			"Uint64":        {reflect.TypeOf(q.Uint64), constant.MakeInt64(int64(q.Uint64))},
   111  			"Uint8":         {reflect.TypeOf(q.Uint8), constant.MakeInt64(int64(q.Uint8))},
   112  			"Uintptr":       {reflect.TypeOf(q.Uintptr), constant.MakeInt64(int64(q.Uintptr))},
   113  			"UnsafePointer": {reflect.TypeOf(q.UnsafePointer), constant.MakeInt64(int64(q.UnsafePointer))},
   114  		},
   115  		UntypedConsts: map[string]gossa.UntypedConst{},
   116  	})
   117  }