Debian Codegraph @

stdlib/go1_21_sort.go

raw symbols SCIP
1 // Code generated by 'yaegi extract sort'. DO NOT EDIT.
2
3 //go:build go1.21 && !go1.22
4 // +build go1.21,!go1.22
5
6 package stdlib
7
8 import (
9 "reflect"
10 "sort"
11 )
12
13 func init() {
14 Symbols["sort/sort"] = map[string]reflect.Value{
15 // function, constant and variable definitions
16 "Find": reflect.ValueOf(sort.Find),
17 "Float64s": reflect.ValueOf(sort.Float64s),
18 "Float64sAreSorted": reflect.ValueOf(sort.Float64sAreSorted),
19 "Ints": reflect.ValueOf(sort.Ints),
20 "IntsAreSorted": reflect.ValueOf(sort.IntsAreSorted),
21 "IsSorted": reflect.ValueOf(sort.IsSorted),
22 "Reverse": reflect.ValueOf(sort.Reverse),
23 "Search": reflect.ValueOf(sort.Search),
24 "SearchFloat64s": reflect.ValueOf(sort.SearchFloat64s),
25 "SearchInts": reflect.ValueOf(sort.SearchInts),
26 "SearchStrings": reflect.ValueOf(sort.SearchStrings),
27 "Slice": reflect.ValueOf(sort.Slice),
28 "SliceIsSorted": reflect.ValueOf(sort.SliceIsSorted),
29 "SliceStable": reflect.ValueOf(sort.SliceStable),
30 "Sort": reflect.ValueOf(sort.Sort),
31 "Stable": reflect.ValueOf(sort.Stable),
32 "Strings": reflect.ValueOf(sort.Strings),
33 "StringsAreSorted": reflect.ValueOf(sort.StringsAreSorted),
34
35 // type definitions
36 "Float64Slice": reflect.ValueOf((*sort.Float64Slice)(nil)),
37 "IntSlice": reflect.ValueOf((*sort.IntSlice)(nil)),
38 "Interface": reflect.ValueOf((*sort.Interface)(nil)),
39 "StringSlice": reflect.ValueOf((*sort.StringSlice)(nil)),
40
41 // interface wrapper definitions
42 "_Interface": reflect.ValueOf((*_sort_Interface)(nil)),
43 }
44 }
45
46 // _sort_Interface is an interface wrapper for Interface type
47 type _sort_Interface struct {
48 IValue interface{}
49 WLen func() int
50 WLess func(i int, j int) bool
51 WSwap func(i int, j int)
52 }
53
54 func (W _sort_Interface) Len() int { return W.WLen() }
55 func (W _sort_Interface) Less(i int, j int) bool { return W.WLess(i, j) }
56 func (W _sort_Interface) Swap(i int, j int) { W.WSwap(i, j) }