github.com/ader1990/go@v0.0.0-20140630135419-8c24447fa791/src/cmd/gc/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 "./mkbuiltin" 6 // to update builtin.c. 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 new(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 panic(interface{}) 24 func recover(*int32) interface{} 25 26 func printbool(bool) 27 func printfloat(float64) 28 func printint(int64) 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 goprintf() 39 40 func concatstring2(string, string) string 41 func concatstring3(string, string, string) string 42 func concatstring4(string, string, string, string) string 43 func concatstring5(string, string, string, string, string) string 44 func concatstrings([]string) string 45 46 func cmpstring(string, string) int 47 func eqstring(string, string) bool 48 func intstring(int64) string 49 func slicebytetostring([]byte) string 50 func slicebytetostringtmp([]byte) string 51 func slicerunetostring([]rune) string 52 func stringtoslicebyte(string) []byte 53 func stringtoslicerune(string) []rune 54 func stringiter(string, int) int 55 func stringiter2(string, int) (retk int, retv rune) 56 func copy(to any, fr any, wid uintptr) int 57 func slicestringcopy(to any, fr any) int 58 59 // interface conversions 60 func typ2Itab(typ *byte, typ2 *byte, cache **byte) (ret *byte) 61 func convI2E(elem any) (ret any) 62 func convI2I(typ *byte, elem any) (ret any) 63 func convT2E(typ *byte, elem *any) (ret any) 64 func convT2I(typ *byte, typ2 *byte, cache **byte, elem *any) (ret any) 65 66 // interface type assertions x.(T) 67 func assertE2E(typ *byte, iface any) (ret any) 68 func assertE2E2(typ *byte, iface any) (ret any, ok bool) 69 func assertE2I(typ *byte, iface any) (ret any) 70 func assertE2I2(typ *byte, iface any) (ret any, ok bool) 71 func assertE2T(typ *byte, iface any) (ret any) 72 func assertE2T2(typ *byte, iface any) (ret any, ok bool) 73 func assertI2E(typ *byte, iface any) (ret any) 74 func assertI2E2(typ *byte, iface any) (ret any, ok bool) 75 func assertI2I(typ *byte, iface any) (ret any) 76 func assertI2I2(typ *byte, iface any) (ret any, ok bool) 77 func assertI2T(typ *byte, iface any) (ret any) 78 func assertI2T2(typ *byte, iface any) (ret any, ok bool) 79 func assertI2TOK(typ *byte, iface any) (ok bool) 80 func assertE2TOK(typ *byte, iface any) (ok bool) 81 82 func ifaceeq(i1 any, i2 any) (ret bool) 83 func efaceeq(i1 any, i2 any) (ret bool) 84 func ifacethash(i1 any) (ret uint32) 85 func efacethash(i1 any) (ret uint32) 86 87 func equal(typ *byte, x1, x2 any) (ret bool) 88 89 // *byte is really *runtime.Type 90 func makemap(mapType *byte, hint int64) (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 func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool 112 func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool 113 func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool 114 115 func newselect(size int32) (sel *byte) 116 func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool) 117 func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool) 118 func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool) 119 func selectdefault(sel *byte) (selected bool) 120 func selectgo(sel *byte) 121 func block() 122 123 func makeslice(typ *byte, nel int64, cap int64) (ary []any) 124 func growslice(typ *byte, old []any, n int64) (ary []any) 125 func memmove(to *any, frm *any, length uintptr) 126 127 func memequal(eq *bool, size uintptr, x, y *any) 128 func memequal8(eq *bool, size uintptr, x, y *any) 129 func memequal16(eq *bool, size uintptr, x, y *any) 130 func memequal32(eq *bool, size uintptr, x, y *any) 131 func memequal64(eq *bool, size uintptr, x, y *any) 132 func memequal128(eq *bool, size uintptr, x, y *any) 133 134 // only used on 32-bit 135 func int64div(int64, int64) int64 136 func uint64div(uint64, uint64) uint64 137 func int64mod(int64, int64) int64 138 func uint64mod(uint64, uint64) uint64 139 func float64toint64(float64) int64 140 func float64touint64(float64) uint64 141 func int64tofloat64(int64) float64 142 func uint64tofloat64(uint64) float64 143 144 func complex128div(num complex128, den complex128) (quo complex128) 145 146 // race detection 147 func racefuncenter(uintptr) 148 func racefuncexit() 149 func raceread(uintptr) 150 func racewrite(uintptr) 151 func racereadrange(addr, size uintptr) 152 func racewriterange(addr, size uintptr)