summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stubs.goc
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-08-07 13:58:42 -0700
committerKeith Randall <khr@golang.org>2014-08-07 13:58:42 -0700
commitafce2dd9d99289cf536b5c389fad299fc65d3c50 (patch)
tree719acead05af3920ab4f0eff45f5a8e26290d649 /src/pkg/runtime/stubs.goc
parentb42a3ac4fc3414efa5e54b7ed6f41f0d7ccad292 (diff)
downloadgo-afce2dd9d99289cf536b5c389fad299fc65d3c50.tar.gz
runtime: convert interface routines from C to Go.
LGTM=dvyukov R=golang-codereviews, dave, bradfitz, dvyukov, khr CC=golang-codereviews https://codereview.appspot.com/98510044
Diffstat (limited to 'src/pkg/runtime/stubs.goc')
-rw-r--r--src/pkg/runtime/stubs.goc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pkg/runtime/stubs.goc b/src/pkg/runtime/stubs.goc
index 42a4bf143..8a043c63b 100644
--- a/src/pkg/runtime/stubs.goc
+++ b/src/pkg/runtime/stubs.goc
@@ -89,3 +89,17 @@ func GCMask(x Eface) (mask Slice) {
runtime·getgcmask(x.data, x.type, &mask.array, &mask.len);
mask.cap = mask.len;
}
+
+#pragma textflag NOSPLIT
+func gopersistentalloc(size uintptr) (x *void) {
+ // TODO: used only for itabs for now. Need to make &mstats.other_sys arg parameterized.
+ x = runtime·persistentalloc(size, 0, &mstats.other_sys);
+}
+
+#pragma textflag NOSPLIT
+func reflect·typelinks() (ret Slice) {
+ extern Type *typelink[], *etypelink[];
+ ret.array = (byte*)typelink;
+ ret.len = etypelink - typelink;
+ ret.cap = ret.len;
+}