LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/
141150043
var HashLoad = &hashLoad
-func gogoBytes() int32
-
-var GogoBytes = gogoBytes
+// For testing.
+func GogoBytes() int32 {
+ return _RuntimeGogoBytes
+}
-func gostringW([]uint16) string
+// in string.c
+//go:noescape
+func gostringw(w *uint16) string
-var GostringW = gostringW
+// entry point for testing
+func GostringW(w []uint16) (s string) {
+ onM(func() {
+ s = gostringw(&w[0])
+ })
+ return
+}
// These invariants do not hold yet but will be established once we have
// finished converting runtime support code from C to Go.
-// entry point for testing
-// TODO: mcall and run on M stack
-func gostringW(str Slice) (s String) {
- s = runtime·gostringw((uint16*)str.array);
-}
-
#pragma textflag NOSPLIT
func runtime·getg() (ret *G) {
ret = g;
ret.len = runtime·etypelink - runtime·typelink;
ret.cap = ret.len;
}
-
-// For testing.
-func gogoBytes() (x int32) {
- x = RuntimeGogoBytes;
-}