github.com/goplus/gossa@v0.3.25/pkg/runtime/go115_export.go (about)

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