github.com/dannin/go@v0.0.0-20161031215817-d35dfd405eaa/src/cmd/compile/internal/gc/builtin/runtime.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // NOTE: If you change this file you must run "go generate"
     6  // to update builtin.go. This is not done automatically
     7  // to avoid depending on having a working compiler binary.
     8  
     9  // +build ignore
    10  
    11  package runtime
    12  
    13  // emitted by compiler, not referred to by go programs
    14  
    15  func newobject(typ *byte) *any
    16  func panicindex()
    17  func panicslice()
    18  func panicdivide()
    19  func throwinit()
    20  func panicwrap(string, string, string)
    21  
    22  func gopanic(interface{})
    23  func gorecover(*int32) interface{}
    24  
    25  func printbool(bool)
    26  func printfloat(float64)
    27  func printint(int64)
    28  func printhex(uint64)
    29  func printuint(uint64)
    30  func printcomplex(complex128)
    31  func printstring(string)
    32  func printpointer(any)
    33  func printiface(any)
    34  func printeface(any)
    35  func printslice(any)
    36  func printnl()
    37  func printsp()
    38  func printlock()
    39  func printunlock()
    40  
    41  func concatstring2(*[32]byte, string, string) string
    42  func concatstring3(*[32]byte, string, string, string) string
    43  func concatstring4(*[32]byte, string, string, string, string) string
    44  func concatstring5(*[32]byte, string, string, string, string, string) string
    45  func concatstrings(*[32]byte, []string) string
    46  
    47  func cmpstring(string, string) int
    48  func eqstring(string, string) bool
    49  func intstring(*[4]byte, int64) string
    50  func slicebytetostring(*[32]byte, []byte) string
    51  func slicebytetostringtmp([]byte) string
    52  func slicerunetostring(*[32]byte, []rune) string
    53  func stringtoslicebyte(*[32]byte, string) []byte
    54  func stringtoslicerune(*[32]rune, string) []rune
    55  func decoderune(string, int) (retv rune, retk int)
    56  func slicecopy(to any, fr any, wid uintptr) int
    57  func slicestringcopy(to any, fr any) int
    58  
    59  // interface conversions
    60  func convI2I(typ *byte, elem any) (ret any)
    61  func convT2E(typ *byte, elem *any) (ret any)
    62  func convT2I(tab *byte, elem *any) (ret any)
    63  
    64  // interface type assertions  x.(T)
    65  func assertE2E(typ *byte, iface any, ret *any)
    66  func assertE2E2(typ *byte, iface any, ret *any) bool
    67  func assertE2I(typ *byte, iface any, ret *any)
    68  func assertE2I2(typ *byte, iface any, ret *any) bool
    69  func assertE2T(typ *byte, iface any, ret *any)
    70  func assertE2T2(typ *byte, iface any, ret *any) bool
    71  func assertI2E(typ *byte, iface any, ret *any)
    72  func assertI2E2(typ *byte, iface any, ret *any) bool
    73  func assertI2I(typ *byte, iface any, ret *any)
    74  func assertI2I2(typ *byte, iface any, ret *any) bool
    75  func assertI2T(typ *byte, iface any, ret *any)
    76  func assertI2T2(typ *byte, iface any, ret *any) bool
    77  func panicdottype(have, want, iface *byte)
    78  
    79  func ifaceeq(i1 any, i2 any) (ret bool)
    80  func efaceeq(i1 any, i2 any) (ret bool)
    81  
    82  // *byte is really *runtime.Type
    83  func makemap(mapType *byte, hint int64, mapbuf *any, bucketbuf *any) (hmap map[any]any)
    84  func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any)
    85  func mapaccess1_fast32(mapType *byte, hmap map[any]any, key any) (val *any)
    86  func mapaccess1_fast64(mapType *byte, hmap map[any]any, key any) (val *any)
    87  func mapaccess1_faststr(mapType *byte, hmap map[any]any, key any) (val *any)
    88  func mapaccess1_fat(mapType *byte, hmap map[any]any, key *any, zero *byte) (val *any)
    89  func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool)
    90  func mapaccess2_fast32(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    91  func mapaccess2_fast64(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    92  func mapaccess2_faststr(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    93  func mapaccess2_fat(mapType *byte, hmap map[any]any, key *any, zero *byte) (val *any, pres bool)
    94  func mapassign(mapType *byte, hmap map[any]any, key *any) (val *any)
    95  func mapiterinit(mapType *byte, hmap map[any]any, hiter *any)
    96  func mapdelete(mapType *byte, hmap map[any]any, key *any)
    97  func mapiternext(hiter *any)
    98  
    99  // *byte is really *runtime.Type
   100  func makechan(chanType *byte, hint int64) (hchan chan any)
   101  func chanrecv1(chanType *byte, hchan <-chan any, elem *any)
   102  func chanrecv2(chanType *byte, hchan <-chan any, elem *any) bool
   103  func chansend1(chanType *byte, hchan chan<- any, elem *any)
   104  func closechan(hchan any)
   105  
   106  var writeBarrier struct {
   107  	enabled bool
   108  	needed  bool
   109  	cgo     bool
   110  }
   111  
   112  func writebarrierptr(dst *any, src any)
   113  
   114  // *byte is really *runtime.Type
   115  func typedmemmove(typ *byte, dst *any, src *any)
   116  func typedmemclr(typ *byte, dst *any)
   117  func typedslicecopy(typ *byte, dst any, src any) int
   118  
   119  func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool
   120  func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool
   121  func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool
   122  
   123  func newselect(sel *byte, selsize int64, size int32)
   124  func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool)
   125  func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool)
   126  func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool)
   127  func selectdefault(sel *byte) (selected bool)
   128  func selectgo(sel *byte)
   129  func block()
   130  
   131  func makeslice(typ *byte, len int, cap int) (ary []any)
   132  func makeslice64(typ *byte, len int64, cap int64) (ary []any)
   133  func growslice(typ *byte, old []any, cap int) (ary []any)
   134  func memmove(to *any, frm *any, length uintptr)
   135  func memclrNoHeapPointers(ptr *byte, length uintptr)
   136  func memclrHasPointers(ptr *byte, length uintptr)
   137  
   138  func memequal(x, y *any, size uintptr) bool
   139  func memequal8(x, y *any) bool
   140  func memequal16(x, y *any) bool
   141  func memequal32(x, y *any) bool
   142  func memequal64(x, y *any) bool
   143  func memequal128(x, y *any) bool
   144  
   145  // only used on 32-bit
   146  func int64div(int64, int64) int64
   147  func uint64div(uint64, uint64) uint64
   148  func int64mod(int64, int64) int64
   149  func uint64mod(uint64, uint64) uint64
   150  func float64toint64(float64) int64
   151  func float64touint64(float64) uint64
   152  func float64touint32(float64) uint32
   153  func int64tofloat64(int64) float64
   154  func uint64tofloat64(uint64) float64
   155  func uint32tofloat64(uint32) float64
   156  
   157  func complex128div(num complex128, den complex128) (quo complex128)
   158  
   159  // race detection
   160  func racefuncenter(uintptr)
   161  func racefuncexit()
   162  func raceread(uintptr)
   163  func racewrite(uintptr)
   164  func racereadrange(addr, size uintptr)
   165  func racewriterange(addr, size uintptr)
   166  
   167  // memory sanitizer
   168  func msanread(addr, size uintptr)
   169  func msanwrite(addr, size uintptr)