github.com/FenixAra/go@v0.0.0-20170127160404-96ea0918e670/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  func goschedguarded()
    25  
    26  func printbool(bool)
    27  func printfloat(float64)
    28  func printint(int64)
    29  func printhex(uint64)
    30  func printuint(uint64)
    31  func printcomplex(complex128)
    32  func printstring(string)
    33  func printpointer(any)
    34  func printiface(any)
    35  func printeface(any)
    36  func printslice(any)
    37  func printnl()
    38  func printsp()
    39  func printlock()
    40  func printunlock()
    41  
    42  func concatstring2(*[32]byte, string, string) string
    43  func concatstring3(*[32]byte, string, string, string) string
    44  func concatstring4(*[32]byte, string, string, string, string) string
    45  func concatstring5(*[32]byte, string, string, string, string, string) string
    46  func concatstrings(*[32]byte, []string) string
    47  
    48  func cmpstring(string, string) int
    49  func eqstring(string, string) bool
    50  func intstring(*[4]byte, int64) string
    51  func slicebytetostring(*[32]byte, []byte) string
    52  func slicebytetostringtmp([]byte) string
    53  func slicerunetostring(*[32]byte, []rune) string
    54  func stringtoslicebyte(*[32]byte, string) []byte
    55  func stringtoslicerune(*[32]rune, string) []rune
    56  func decoderune(string, int) (retv rune, retk int)
    57  func slicecopy(to any, fr any, wid uintptr) int
    58  func slicestringcopy(to any, fr any) int
    59  
    60  // interface conversions
    61  func convI2I(typ *byte, elem any) (ret any)
    62  func convT2E(typ *byte, elem *any) (ret any)
    63  func convT2I(tab *byte, elem *any) (ret any)
    64  
    65  // interface type assertions  x.(T)
    66  func assertE2I(typ *byte, iface any) (ret any)
    67  func assertE2I2(typ *byte, iface any) (ret any, b bool)
    68  func assertI2I(typ *byte, iface any) (ret any)
    69  func assertI2I2(typ *byte, iface any) (ret any, b bool)
    70  func panicdottype(have, want, iface *byte)
    71  func panicnildottype(want *byte)
    72  
    73  func ifaceeq(i1 any, i2 any) (ret bool)
    74  func efaceeq(i1 any, i2 any) (ret bool)
    75  
    76  // *byte is really *runtime.Type
    77  func makemap(mapType *byte, hint int64, mapbuf *any, bucketbuf *any) (hmap map[any]any)
    78  func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any)
    79  func mapaccess1_fast32(mapType *byte, hmap map[any]any, key any) (val *any)
    80  func mapaccess1_fast64(mapType *byte, hmap map[any]any, key any) (val *any)
    81  func mapaccess1_faststr(mapType *byte, hmap map[any]any, key any) (val *any)
    82  func mapaccess1_fat(mapType *byte, hmap map[any]any, key *any, zero *byte) (val *any)
    83  func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool)
    84  func mapaccess2_fast32(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    85  func mapaccess2_fast64(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    86  func mapaccess2_faststr(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
    87  func mapaccess2_fat(mapType *byte, hmap map[any]any, key *any, zero *byte) (val *any, pres bool)
    88  func mapassign(mapType *byte, hmap map[any]any, key *any) (val *any)
    89  func mapiterinit(mapType *byte, hmap map[any]any, hiter *any)
    90  func mapdelete(mapType *byte, hmap map[any]any, key *any)
    91  func mapiternext(hiter *any)
    92  
    93  // *byte is really *runtime.Type
    94  func makechan(chanType *byte, hint int64) (hchan chan any)
    95  func chanrecv1(chanType *byte, hchan <-chan any, elem *any)
    96  func chanrecv2(chanType *byte, hchan <-chan any, elem *any) bool
    97  func chansend1(chanType *byte, hchan chan<- any, elem *any)
    98  func closechan(hchan any)
    99  
   100  var writeBarrier struct {
   101  	enabled bool
   102  	needed  bool
   103  	cgo     bool
   104  }
   105  
   106  func writebarrierptr(dst *any, src any)
   107  
   108  // *byte is really *runtime.Type
   109  func typedmemmove(typ *byte, dst *any, src *any)
   110  func typedmemclr(typ *byte, dst *any)
   111  func typedslicecopy(typ *byte, dst any, src any) int
   112  
   113  func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool
   114  func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool
   115  func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool
   116  
   117  func newselect(sel *byte, selsize int64, size int32)
   118  func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool)
   119  func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool)
   120  func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool)
   121  func selectdefault(sel *byte) (selected bool)
   122  func selectgo(sel *byte)
   123  func block()
   124  
   125  func makeslice(typ *byte, len int, cap int) (ary []any)
   126  func makeslice64(typ *byte, len int64, cap int64) (ary []any)
   127  func growslice(typ *byte, old []any, cap int) (ary []any)
   128  func memmove(to *any, frm *any, length uintptr)
   129  func memclrNoHeapPointers(ptr *byte, length uintptr)
   130  func memclrHasPointers(ptr *byte, length uintptr)
   131  
   132  func memequal(x, y *any, size uintptr) bool
   133  func memequal8(x, y *any) bool
   134  func memequal16(x, y *any) bool
   135  func memequal32(x, y *any) bool
   136  func memequal64(x, y *any) bool
   137  func memequal128(x, y *any) bool
   138  
   139  // only used on 32-bit
   140  func int64div(int64, int64) int64
   141  func uint64div(uint64, uint64) uint64
   142  func int64mod(int64, int64) int64
   143  func uint64mod(uint64, uint64) uint64
   144  func float64toint64(float64) int64
   145  func float64touint64(float64) uint64
   146  func float64touint32(float64) uint32
   147  func int64tofloat64(int64) float64
   148  func uint64tofloat64(uint64) float64
   149  func uint32tofloat64(uint32) float64
   150  
   151  func complex128div(num complex128, den complex128) (quo complex128)
   152  
   153  // race detection
   154  func racefuncenter(uintptr)
   155  func racefuncexit()
   156  func raceread(uintptr)
   157  func racewrite(uintptr)
   158  func racereadrange(addr, size uintptr)
   159  func racewriterange(addr, size uintptr)
   160  
   161  // memory sanitizer
   162  func msanread(addr, size uintptr)
   163  func msanwrite(addr, size uintptr)