github.com/sean-/go@v0.0.0-20151219100004-97f854cd7bb6/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 PACKAGE 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 throwreturn() 20 func throwinit() 21 func panicwrap(string, string, string) 22 23 func gopanic(interface{}) 24 func gorecover(*int32) interface{} 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 stringtoslicebytetmp(string) []byte 56 func stringtoslicerune(*[32]rune, string) []rune 57 func stringiter(string, int) int 58 func stringiter2(string, int) (retk int, retv rune) 59 func slicecopy(to any, fr any, wid uintptr) int 60 func slicestringcopy(to any, fr any) int 61 62 // interface conversions 63 func typ2Itab(typ *byte, typ2 *byte, cache **byte) (ret *byte) 64 func convI2E(elem any) (ret any) 65 func convI2I(typ *byte, elem any) (ret any) 66 func convT2E(typ *byte, elem, buf *any) (ret any) 67 func convT2I(typ *byte, typ2 *byte, cache **byte, elem, buf *any) (ret any) 68 69 // interface type assertions x.(T) 70 func assertE2E(typ *byte, iface any, ret *any) 71 func assertE2E2(typ *byte, iface any, ret *any) bool 72 func assertE2I(typ *byte, iface any, ret *any) 73 func assertE2I2(typ *byte, iface any, ret *any) bool 74 func assertE2T(typ *byte, iface any, ret *any) 75 func assertE2T2(typ *byte, iface any, ret *any) bool 76 func assertI2E(typ *byte, iface any, ret *any) 77 func assertI2E2(typ *byte, iface any, ret *any) bool 78 func assertI2I(typ *byte, iface any, ret *any) 79 func assertI2I2(typ *byte, iface any, ret *any) bool 80 func assertI2T(typ *byte, iface any, ret *any) 81 func assertI2T2(typ *byte, iface any, ret *any) bool 82 func panicdottype(have, want, iface *byte) 83 84 func ifaceeq(i1 any, i2 any) (ret bool) 85 func efaceeq(i1 any, i2 any) (ret bool) 86 func ifacethash(i1 any) (ret uint32) 87 func efacethash(i1 any) (ret uint32) 88 89 // *byte is really *runtime.Type 90 func makemap(mapType *byte, hint int64, mapbuf *any, bucketbuf *any) (hmap map[any]any) 91 func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any) 92 func mapaccess1_fast32(mapType *byte, hmap map[any]any, key any) (val *any) 93 func mapaccess1_fast64(mapType *byte, hmap map[any]any, key any) (val *any) 94 func mapaccess1_faststr(mapType *byte, hmap map[any]any, key any) (val *any) 95 func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool) 96 func mapaccess2_fast32(mapType *byte, hmap map[any]any, key any) (val *any, pres bool) 97 func mapaccess2_fast64(mapType *byte, hmap map[any]any, key any) (val *any, pres bool) 98 func mapaccess2_faststr(mapType *byte, hmap map[any]any, key any) (val *any, pres bool) 99 func mapassign1(mapType *byte, hmap map[any]any, key *any, val *any) 100 func mapiterinit(mapType *byte, hmap map[any]any, hiter *any) 101 func mapdelete(mapType *byte, hmap map[any]any, key *any) 102 func mapiternext(hiter *any) 103 104 // *byte is really *runtime.Type 105 func makechan(chanType *byte, hint int64) (hchan chan any) 106 func chanrecv1(chanType *byte, hchan <-chan any, elem *any) 107 func chanrecv2(chanType *byte, hchan <-chan any, elem *any) bool 108 func chansend1(chanType *byte, hchan chan<- any, elem *any) 109 func closechan(hchan any) 110 111 var writeBarrier struct { 112 enabled bool 113 needed bool 114 cgo bool 115 } 116 117 func writebarrierptr(dst *any, src any) 118 func writebarrierstring(dst *any, src any) 119 func writebarrierslice(dst *any, src any) 120 func writebarrieriface(dst *any, src any) 121 122 // The unused *byte argument makes sure that src is 2-pointer-aligned, 123 // which is the maximum alignment on NaCl amd64p32 124 // (and possibly on 32-bit systems if we start 64-bit aligning uint64s). 125 // The bitmap in the name tells which words being copied are pointers. 126 func writebarrierfat01(dst *any, _ uintptr, src any) 127 func writebarrierfat10(dst *any, _ uintptr, src any) 128 func writebarrierfat11(dst *any, _ uintptr, src any) 129 func writebarrierfat001(dst *any, _ uintptr, src any) 130 func writebarrierfat010(dst *any, _ uintptr, src any) 131 func writebarrierfat011(dst *any, _ uintptr, src any) 132 func writebarrierfat100(dst *any, _ uintptr, src any) 133 func writebarrierfat101(dst *any, _ uintptr, src any) 134 func writebarrierfat110(dst *any, _ uintptr, src any) 135 func writebarrierfat111(dst *any, _ uintptr, src any) 136 func writebarrierfat0001(dst *any, _ uintptr, src any) 137 func writebarrierfat0010(dst *any, _ uintptr, src any) 138 func writebarrierfat0011(dst *any, _ uintptr, src any) 139 func writebarrierfat0100(dst *any, _ uintptr, src any) 140 func writebarrierfat0101(dst *any, _ uintptr, src any) 141 func writebarrierfat0110(dst *any, _ uintptr, src any) 142 func writebarrierfat0111(dst *any, _ uintptr, src any) 143 func writebarrierfat1000(dst *any, _ uintptr, src any) 144 func writebarrierfat1001(dst *any, _ uintptr, src any) 145 func writebarrierfat1010(dst *any, _ uintptr, src any) 146 func writebarrierfat1011(dst *any, _ uintptr, src any) 147 func writebarrierfat1100(dst *any, _ uintptr, src any) 148 func writebarrierfat1101(dst *any, _ uintptr, src any) 149 func writebarrierfat1110(dst *any, _ uintptr, src any) 150 func writebarrierfat1111(dst *any, _ uintptr, src any) 151 152 // *byte is really *runtime.Type 153 func typedmemmove(typ *byte, dst *any, src *any) 154 func typedslicecopy(typ *byte, dst any, src any) int 155 156 func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool 157 func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool 158 func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool 159 160 func newselect(sel *byte, selsize int64, size int32) 161 func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool) 162 func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool) 163 func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool) 164 func selectdefault(sel *byte) (selected bool) 165 func selectgo(sel *byte) 166 func block() 167 168 func makeslice(typ *byte, nel int64, cap int64) (ary []any) 169 func growslice(typ *byte, old []any, cap int) (ary []any) 170 func growslice_n(typ *byte, old []any, n int) (ary []any) 171 func memmove(to *any, frm *any, length uintptr) 172 func memclr(ptr *byte, length uintptr) 173 174 func memequal(x, y *any, size uintptr) bool 175 func memequal8(x, y *any) bool 176 func memequal16(x, y *any) bool 177 func memequal32(x, y *any) bool 178 func memequal64(x, y *any) bool 179 func memequal128(x, y *any) bool 180 181 // only used on 32-bit 182 func int64div(int64, int64) int64 183 func uint64div(uint64, uint64) uint64 184 func int64mod(int64, int64) int64 185 func uint64mod(uint64, uint64) uint64 186 func float64toint64(float64) int64 187 func float64touint64(float64) uint64 188 func int64tofloat64(int64) float64 189 func uint64tofloat64(uint64) float64 190 191 func complex128div(num complex128, den complex128) (quo complex128) 192 193 // race detection 194 func racefuncenter(uintptr) 195 func racefuncexit() 196 func raceread(uintptr) 197 func racewrite(uintptr) 198 func racereadrange(addr, size uintptr) 199 func racewriterange(addr, size uintptr) 200 201 // memory sanitizer 202 func msanread(addr, size uintptr) 203 func msanwrite(addr, size uintptr)