github.com/goplus/gossa@v0.3.25/pkg/runtime/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 runtime
     7  
     8  import (
     9  	q "runtime"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "runtime",
    20  		Path: "runtime",
    21  		Deps: map[string]string{
    22  			"internal/abi":            "abi",
    23  			"internal/bytealg":        "bytealg",
    24  			"internal/cpu":            "cpu",
    25  			"internal/goexperiment":   "goexperiment",
    26  			"runtime/internal/atomic": "atomic",
    27  			"runtime/internal/math":   "math",
    28  			"runtime/internal/sys":    "sys",
    29  			"unsafe":                  "unsafe",
    30  		},
    31  		Interfaces: map[string]reflect.Type{
    32  			"Error": reflect.TypeOf((*q.Error)(nil)).Elem(),
    33  		},
    34  		NamedTypes: map[string]gossa.NamedType{
    35  			"BlockProfileRecord": {reflect.TypeOf((*q.BlockProfileRecord)(nil)).Elem(), "", ""},
    36  			"Frame":              {reflect.TypeOf((*q.Frame)(nil)).Elem(), "", ""},
    37  			"Frames":             {reflect.TypeOf((*q.Frames)(nil)).Elem(), "", "Next"},
    38  			"Func":               {reflect.TypeOf((*q.Func)(nil)).Elem(), "", "Entry,FileLine,Name,funcInfo,raw"},
    39  			"MemProfileRecord":   {reflect.TypeOf((*q.MemProfileRecord)(nil)).Elem(), "", "InUseBytes,InUseObjects,Stack"},
    40  			"MemStats":           {reflect.TypeOf((*q.MemStats)(nil)).Elem(), "", ""},
    41  			"StackRecord":        {reflect.TypeOf((*q.StackRecord)(nil)).Elem(), "", "Stack"},
    42  			"TypeAssertionError": {reflect.TypeOf((*q.TypeAssertionError)(nil)).Elem(), "", "Error,RuntimeError"},
    43  		},
    44  		AliasTypes: map[string]reflect.Type{},
    45  		Vars: map[string]reflect.Value{
    46  			"MemProfileRate": reflect.ValueOf(&q.MemProfileRate),
    47  		},
    48  		Funcs: map[string]reflect.Value{
    49  			"BlockProfile":            reflect.ValueOf(q.BlockProfile),
    50  			"Breakpoint":              reflect.ValueOf(q.Breakpoint),
    51  			"CPUProfile":              reflect.ValueOf(q.CPUProfile),
    52  			"Caller":                  reflect.ValueOf(q.Caller),
    53  			"Callers":                 reflect.ValueOf(q.Callers),
    54  			"CallersFrames":           reflect.ValueOf(q.CallersFrames),
    55  			"FuncForPC":               reflect.ValueOf(q.FuncForPC),
    56  			"GC":                      reflect.ValueOf(q.GC),
    57  			"GOMAXPROCS":              reflect.ValueOf(q.GOMAXPROCS),
    58  			"GOROOT":                  reflect.ValueOf(q.GOROOT),
    59  			"Goexit":                  reflect.ValueOf(q.Goexit),
    60  			"GoroutineProfile":        reflect.ValueOf(q.GoroutineProfile),
    61  			"Gosched":                 reflect.ValueOf(q.Gosched),
    62  			"KeepAlive":               reflect.ValueOf(q.KeepAlive),
    63  			"LockOSThread":            reflect.ValueOf(q.LockOSThread),
    64  			"MemProfile":              reflect.ValueOf(q.MemProfile),
    65  			"MutexProfile":            reflect.ValueOf(q.MutexProfile),
    66  			"NumCPU":                  reflect.ValueOf(q.NumCPU),
    67  			"NumCgoCall":              reflect.ValueOf(q.NumCgoCall),
    68  			"NumGoroutine":            reflect.ValueOf(q.NumGoroutine),
    69  			"ReadMemStats":            reflect.ValueOf(q.ReadMemStats),
    70  			"ReadTrace":               reflect.ValueOf(q.ReadTrace),
    71  			"SetBlockProfileRate":     reflect.ValueOf(q.SetBlockProfileRate),
    72  			"SetCPUProfileRate":       reflect.ValueOf(q.SetCPUProfileRate),
    73  			"SetCgoTraceback":         reflect.ValueOf(q.SetCgoTraceback),
    74  			"SetFinalizer":            reflect.ValueOf(q.SetFinalizer),
    75  			"SetMutexProfileFraction": reflect.ValueOf(q.SetMutexProfileFraction),
    76  			"Stack":                   reflect.ValueOf(q.Stack),
    77  			"StartTrace":              reflect.ValueOf(q.StartTrace),
    78  			"StopTrace":               reflect.ValueOf(q.StopTrace),
    79  			"ThreadCreateProfile":     reflect.ValueOf(q.ThreadCreateProfile),
    80  			"UnlockOSThread":          reflect.ValueOf(q.UnlockOSThread),
    81  			"Version":                 reflect.ValueOf(q.Version),
    82  		},
    83  		TypedConsts: map[string]gossa.TypedConst{
    84  			"GOARCH": {reflect.TypeOf(q.GOARCH), constant.MakeString(string(q.GOARCH))},
    85  			"GOOS":   {reflect.TypeOf(q.GOOS), constant.MakeString(string(q.GOOS))},
    86  		},
    87  		UntypedConsts: map[string]gossa.UntypedConst{
    88  			"Compiler": {"untyped string", constant.MakeString(string(q.Compiler))},
    89  		},
    90  	})
    91  }