blob: 6210f10cdf457e45b34f2bf1a907cd6cb8e96fd5 [file] [log] [blame]
Matthew Dempskyd68f52a2015-02-27 17:40:34 +09001// 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
11package PACKAGE
12
13// emitted by compiler, not referred to by go programs
14
15func newobject(typ *byte) *any
16func panicindex()
17func panicslice()
18func panicdivide()
19func throwreturn()
20func throwinit()
21func panicwrap(string, string, string)
22
23func gopanic(interface{})
24func gorecover(*int32) interface{}
25
26func printbool(bool)
27func printfloat(float64)
28func printint(int64)
29func printhex(uint64)
30func printuint(uint64)
31func printcomplex(complex128)
32func printstring(string)
33func printpointer(any)
34func printiface(any)
35func printeface(any)
36func printslice(any)
37func printnl()
38func printsp()
39func printlock()
40func printunlock()
41
42func concatstring2(*[32]byte, string, string) string
43func concatstring3(*[32]byte, string, string, string) string
44func concatstring4(*[32]byte, string, string, string, string) string
45func concatstring5(*[32]byte, string, string, string, string, string) string
46func concatstrings(*[32]byte, []string) string
47
48func cmpstring(string, string) int
49func eqstring(string, string) bool
50func intstring(*[4]byte, int64) string
51func slicebytetostring(*[32]byte, []byte) string
52func slicebytetostringtmp([]byte) string
53func slicerunetostring(*[32]byte, []rune) string
54func stringtoslicebyte(*[32]byte, string) []byte
55func stringtoslicebytetmp(string) []byte
56func stringtoslicerune(*[32]rune, string) []rune
57func stringiter(string, int) int
58func stringiter2(string, int) (retk int, retv rune)
59func slicecopy(to any, fr any, wid uintptr) int
60func slicestringcopy(to any, fr any) int
61
62// interface conversions
63func typ2Itab(typ *byte, typ2 *byte, cache **byte) (ret *byte)
64func convI2E(elem any) (ret any)
65func convI2I(typ *byte, elem any) (ret any)
David Chase22701332015-03-27 11:21:14 -040066func convT2E(typ *byte, elem, buf *any) (ret any)
67func convT2I(typ *byte, typ2 *byte, cache **byte, elem, buf *any) (ret any)
Matthew Dempskyd68f52a2015-02-27 17:40:34 +090068
69// interface type assertions x.(T)
70func assertE2E(typ *byte, iface any, ret *any)
71func assertE2E2(typ *byte, iface any, ret *any) bool
72func assertE2I(typ *byte, iface any, ret *any)
73func assertE2I2(typ *byte, iface any, ret *any) bool
74func assertE2T(typ *byte, iface any, ret *any)
75func assertE2T2(typ *byte, iface any, ret *any) bool
76func assertI2E(typ *byte, iface any, ret *any)
77func assertI2E2(typ *byte, iface any, ret *any) bool
78func assertI2I(typ *byte, iface any, ret *any)
79func assertI2I2(typ *byte, iface any, ret *any) bool
80func assertI2T(typ *byte, iface any, ret *any)
81func assertI2T2(typ *byte, iface any, ret *any) bool
Russ Cox4224d812015-03-20 00:06:10 -040082func panicdottype(have, want, iface *byte)
Matthew Dempskyd68f52a2015-02-27 17:40:34 +090083
84func ifaceeq(i1 any, i2 any) (ret bool)
85func efaceeq(i1 any, i2 any) (ret bool)
86func ifacethash(i1 any) (ret uint32)
87func efacethash(i1 any) (ret uint32)
88
89// *byte is really *runtime.Type
90func makemap(mapType *byte, hint int64, mapbuf *any, bucketbuf *any) (hmap map[any]any)
91func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any)
92func mapaccess1_fast32(mapType *byte, hmap map[any]any, key any) (val *any)
93func mapaccess1_fast64(mapType *byte, hmap map[any]any, key any) (val *any)
94func mapaccess1_faststr(mapType *byte, hmap map[any]any, key any) (val *any)
95func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool)
96func mapaccess2_fast32(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
97func mapaccess2_fast64(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
98func mapaccess2_faststr(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
99func mapassign1(mapType *byte, hmap map[any]any, key *any, val *any)
100func mapiterinit(mapType *byte, hmap map[any]any, hiter *any)
101func mapdelete(mapType *byte, hmap map[any]any, key *any)
102func mapiternext(hiter *any)
103
104// *byte is really *runtime.Type
105func makechan(chanType *byte, hint int64) (hchan chan any)
106func chanrecv1(chanType *byte, hchan <-chan any, elem *any)
107func chanrecv2(chanType *byte, hchan <-chan any, elem *any) bool
108func chansend1(chanType *byte, hchan chan<- any, elem *any)
109func closechan(hchan any)
110
Russ Cox653d5602015-04-24 14:13:06 -0400111var writeBarrierEnabled bool
112
Matthew Dempskyd68f52a2015-02-27 17:40:34 +0900113func writebarrierptr(dst *any, src any)
114func writebarrierstring(dst *any, src any)
115func writebarrierslice(dst *any, src any)
116func writebarrieriface(dst *any, src any)
117
118// The unused *byte argument makes sure that src is 2-pointer-aligned,
119// which is the maximum alignment on NaCl amd64p32
120// (and possibly on 32-bit systems if we start 64-bit aligning uint64s).
121// The bitmap in the name tells which words being copied are pointers.
Russ Cox2050f572015-04-24 13:41:57 -0400122func writebarrierfat01(dst *any, _ uintptr, src any)
123func writebarrierfat10(dst *any, _ uintptr, src any)
124func writebarrierfat11(dst *any, _ uintptr, src any)
125func writebarrierfat001(dst *any, _ uintptr, src any)
126func writebarrierfat010(dst *any, _ uintptr, src any)
127func writebarrierfat011(dst *any, _ uintptr, src any)
128func writebarrierfat100(dst *any, _ uintptr, src any)
129func writebarrierfat101(dst *any, _ uintptr, src any)
130func writebarrierfat110(dst *any, _ uintptr, src any)
131func writebarrierfat111(dst *any, _ uintptr, src any)
132func writebarrierfat0001(dst *any, _ uintptr, src any)
133func writebarrierfat0010(dst *any, _ uintptr, src any)
134func writebarrierfat0011(dst *any, _ uintptr, src any)
135func writebarrierfat0100(dst *any, _ uintptr, src any)
136func writebarrierfat0101(dst *any, _ uintptr, src any)
137func writebarrierfat0110(dst *any, _ uintptr, src any)
138func writebarrierfat0111(dst *any, _ uintptr, src any)
139func writebarrierfat1000(dst *any, _ uintptr, src any)
140func writebarrierfat1001(dst *any, _ uintptr, src any)
141func writebarrierfat1010(dst *any, _ uintptr, src any)
142func writebarrierfat1011(dst *any, _ uintptr, src any)
143func writebarrierfat1100(dst *any, _ uintptr, src any)
144func writebarrierfat1101(dst *any, _ uintptr, src any)
145func writebarrierfat1110(dst *any, _ uintptr, src any)
146func writebarrierfat1111(dst *any, _ uintptr, src any)
Matthew Dempskyd68f52a2015-02-27 17:40:34 +0900147
Russ Cox653d5602015-04-24 14:13:06 -0400148// *byte is really *runtime.Type
Matthew Dempskyd68f52a2015-02-27 17:40:34 +0900149func typedmemmove(typ *byte, dst *any, src *any)
150func typedslicecopy(typ *byte, dst any, src any) int
151
152func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool
153func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool
154func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool
155
156func newselect(sel *byte, selsize int64, size int32)
157func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool)
158func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool)
159func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool)
160func selectdefault(sel *byte) (selected bool)
161func selectgo(sel *byte)
162func block()
163
164func makeslice(typ *byte, nel int64, cap int64) (ary []any)
Russ Cox32fddad2015-06-25 19:27:20 -0400165func growslice(typ *byte, old []any, cap int) (ary []any)
166func growslice_n(typ *byte, old []any, n int) (ary []any)
Matthew Dempskyd68f52a2015-02-27 17:40:34 +0900167func memmove(to *any, frm *any, length uintptr)
168func memclr(ptr *byte, length uintptr)
169
170func memequal(x, y *any, size uintptr) bool
171func memequal8(x, y *any) bool
172func memequal16(x, y *any) bool
173func memequal32(x, y *any) bool
174func memequal64(x, y *any) bool
175func memequal128(x, y *any) bool
176
177// only used on 32-bit
178func int64div(int64, int64) int64
179func uint64div(uint64, uint64) uint64
180func int64mod(int64, int64) int64
181func uint64mod(uint64, uint64) uint64
182func float64toint64(float64) int64
183func float64touint64(float64) uint64
184func int64tofloat64(int64) float64
185func uint64tofloat64(uint64) float64
186
187func complex128div(num complex128, den complex128) (quo complex128)
188
189// race detection
190func racefuncenter(uintptr)
191func racefuncexit()
192func raceread(uintptr)
193func racewrite(uintptr)
194func racereadrange(addr, size uintptr)
195func racewriterange(addr, size uintptr)