forked from traefik/yaegi
/
go1_20_runtime.go
84 lines (76 loc) · 3.74 KB
/
go1_20_runtime.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Code generated by 'yaegi extract runtime'. DO NOT EDIT.
//go:build go1.20
// +build go1.20
package stdlib
import (
"go/constant"
"go/token"
"reflect"
"runtime"
)
func init() {
Symbols["runtime/runtime"] = map[string]reflect.Value{
// function, constant and variable definitions
"BlockProfile": reflect.ValueOf(runtime.BlockProfile),
"Breakpoint": reflect.ValueOf(runtime.Breakpoint),
"CPUProfile": reflect.ValueOf(runtime.CPUProfile),
"Caller": reflect.ValueOf(runtime.Caller),
"Callers": reflect.ValueOf(runtime.Callers),
"CallersFrames": reflect.ValueOf(runtime.CallersFrames),
"Compiler": reflect.ValueOf(constant.MakeFromLiteral("\"gc\"", token.STRING, 0)),
"FuncForPC": reflect.ValueOf(runtime.FuncForPC),
"GC": reflect.ValueOf(runtime.GC),
"GOARCH": reflect.ValueOf(runtime.GOARCH),
"GOMAXPROCS": reflect.ValueOf(runtime.GOMAXPROCS),
"GOOS": reflect.ValueOf(runtime.GOOS),
"GOROOT": reflect.ValueOf(runtime.GOROOT),
"Goexit": reflect.ValueOf(runtime.Goexit),
"GoroutineProfile": reflect.ValueOf(runtime.GoroutineProfile),
"Gosched": reflect.ValueOf(runtime.Gosched),
"KeepAlive": reflect.ValueOf(runtime.KeepAlive),
"LockOSThread": reflect.ValueOf(runtime.LockOSThread),
"MemProfile": reflect.ValueOf(runtime.MemProfile),
"MemProfileRate": reflect.ValueOf(&runtime.MemProfileRate).Elem(),
"MutexProfile": reflect.ValueOf(runtime.MutexProfile),
"NumCPU": reflect.ValueOf(runtime.NumCPU),
"NumCgoCall": reflect.ValueOf(runtime.NumCgoCall),
"NumGoroutine": reflect.ValueOf(runtime.NumGoroutine),
"ReadMemStats": reflect.ValueOf(runtime.ReadMemStats),
"ReadTrace": reflect.ValueOf(runtime.ReadTrace),
"SetBlockProfileRate": reflect.ValueOf(runtime.SetBlockProfileRate),
"SetCPUProfileRate": reflect.ValueOf(runtime.SetCPUProfileRate),
"SetCgoTraceback": reflect.ValueOf(runtime.SetCgoTraceback),
"SetFinalizer": reflect.ValueOf(runtime.SetFinalizer),
"SetMutexProfileFraction": reflect.ValueOf(runtime.SetMutexProfileFraction),
"Stack": reflect.ValueOf(runtime.Stack),
"StartTrace": reflect.ValueOf(runtime.StartTrace),
"StopTrace": reflect.ValueOf(runtime.StopTrace),
"ThreadCreateProfile": reflect.ValueOf(runtime.ThreadCreateProfile),
"UnlockOSThread": reflect.ValueOf(runtime.UnlockOSThread),
"Version": reflect.ValueOf(runtime.Version),
// type definitions
"BlockProfileRecord": reflect.ValueOf((*runtime.BlockProfileRecord)(nil)),
"Error": reflect.ValueOf((*runtime.Error)(nil)),
"Frame": reflect.ValueOf((*runtime.Frame)(nil)),
"Frames": reflect.ValueOf((*runtime.Frames)(nil)),
"Func": reflect.ValueOf((*runtime.Func)(nil)),
"MemProfileRecord": reflect.ValueOf((*runtime.MemProfileRecord)(nil)),
"MemStats": reflect.ValueOf((*runtime.MemStats)(nil)),
"StackRecord": reflect.ValueOf((*runtime.StackRecord)(nil)),
"TypeAssertionError": reflect.ValueOf((*runtime.TypeAssertionError)(nil)),
// interface wrapper definitions
"_Error": reflect.ValueOf((*_runtime_Error)(nil)),
}
}
// _runtime_Error is an interface wrapper for Error type
type _runtime_Error struct {
IValue interface{}
WError func() string
WRuntimeError func()
}
func (W _runtime_Error) Error() string {
return W.WError()
}
func (W _runtime_Error) RuntimeError() {
W.WRuntimeError()
}