The Go Programming Language

Source file src/cmd/gc/runtime.go

     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.boot.  This is not done automatically
     7	// to avoid depending on having a working compiler binary.
     8	
     9	package PACKAGE
    10	
    11	// emitted by compiler, not referred to by go programs
    12	
    13	func new(int32) *any
    14	func panicindex()
    15	func panicslice()
    16	func throwreturn()
    17	func throwinit()
    18	func panicwrap(string, string, string)
    19	
    20	func panic(interface{})
    21	func recover(*int32) interface{}
    22	
    23	func printbool(bool)
    24	func printfloat(float64)
    25	func printint(int64)
    26	func printuint(uint64)
    27	func printcomplex(complex128)
    28	func printstring(string)
    29	func printpointer(any)
    30	func printiface(any)
    31	func printeface(any)
    32	func printslice(any)
    33	func printnl()
    34	func printsp()
    35	func goprintf()
    36	
    37	// filled in by compiler: int n, string, string, ...
    38	func concatstring()
    39	
    40	// filled in by compiler: Type*, int n, Slice, ...
    41	func append()
    42	func appendslice(typ *byte, x any, y []any) any
    43	
    44	func cmpstring(string, string) int
    45	func slicestring(string, int, int) string
    46	func slicestring1(string, int) string
    47	func intstring(int64) string
    48	func slicebytetostring([]byte) string
    49	func sliceinttostring([]int) string
    50	func stringtoslicebyte(string) []byte
    51	func stringtosliceint(string) []int
    52	func stringiter(string, int) int
    53	func stringiter2(string, int) (retk int, retv int)
    54	func slicecopy(to any, fr any, wid uint32) int
    55	func slicestringcopy(to any, fr any) int
    56	
    57	// interface conversions
    58	func convI2E(elem any) (ret any)
    59	func convI2I(typ *byte, elem any) (ret any)
    60	func convT2E(typ *byte, elem any) (ret any)
    61	func convT2I(typ *byte, typ2 *byte, elem any) (ret any)
    62	
    63	// interface type assertions  x.(T)
    64	func assertE2E(typ *byte, iface any) (ret any)
    65	func assertE2E2(typ *byte, iface any) (ret any, ok bool)
    66	func assertE2I(typ *byte, iface any) (ret any)
    67	func assertE2I2(typ *byte, iface any) (ret any, ok bool)
    68	func assertE2T(typ *byte, iface any) (ret any)
    69	func assertE2T2(typ *byte, iface any) (ret any, ok bool)
    70	func assertI2E(typ *byte, iface any) (ret any)
    71	func assertI2E2(typ *byte, iface any) (ret any, ok bool)
    72	func assertI2I(typ *byte, iface any) (ret any)
    73	func assertI2I2(typ *byte, iface any) (ret any, ok bool)
    74	func assertI2T(typ *byte, iface any) (ret any)
    75	func assertI2T2(typ *byte, iface any) (ret any, ok bool)
    76	
    77	func ifaceeq(i1 any, i2 any) (ret bool)
    78	func efaceeq(i1 any, i2 any) (ret bool)
    79	func ifacethash(i1 any) (ret uint32)
    80	func efacethash(i1 any) (ret uint32)
    81	
    82	// *byte is really *runtime.Type
    83	func makemap(mapType *byte, hint int64) (hmap map[any]any)
    84	func mapaccess1(mapType *byte, hmap map[any]any, key any) (val any)
    85	func mapaccess2(mapType *byte, hmap map[any]any, key any) (val any, pres bool)
    86	func mapassign1(mapType *byte, hmap map[any]any, key any, val any)
    87	func mapassign2(mapType *byte, hmap map[any]any, key any, val any, pres bool)
    88	func mapiterinit(mapType *byte, hmap map[any]any, hiter *any)
    89	func mapiternext(hiter *any)
    90	func mapiter1(hiter *any) (key any)
    91	func mapiter2(hiter *any) (key any, val 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, received bool)
    97	func chansend1(chanType *byte, hchan chan<- any, elem any)
    98	func closechan(hchan any)
    99	
   100	func selectnbsend(chanType *byte, hchan chan<- any, elem any) bool
   101	func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool
   102	func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool
   103	
   104	func newselect(size int) (sel *byte)
   105	func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool)
   106	func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool)
   107	func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool)
   108	func selectdefault(sel *byte) (selected bool)
   109	func selectgo(sel *byte)
   110	func block()
   111	
   112	func makeslice(typ *byte, nel int64, cap int64) (ary []any)
   113	func growslice(typ *byte, old []any, n int64) (ary []any)
   114	func sliceslice1(old []any, lb uint64, width uint64) (ary []any)
   115	func sliceslice(old []any, lb uint64, hb uint64, width uint64) (ary []any)
   116	func slicearray(old *any, nel uint64, lb uint64, hb uint64, width uint64) (ary []any)
   117	
   118	func closure() // has args, but compiler fills in
   119	
   120	// only used on 32-bit
   121	func int64div(int64, int64) int64
   122	func uint64div(uint64, uint64) uint64
   123	func int64mod(int64, int64) int64
   124	func uint64mod(uint64, uint64) uint64
   125	func float64toint64(float64) int64
   126	func float64touint64(float64) uint64
   127	func int64tofloat64(int64) float64
   128	func uint64tofloat64(uint64) float64
   129	
   130	func complex128div(num complex128, den complex128) (quo complex128)

release.r60.3. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.