summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/amd64/closure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/amd64/closure.c')
-rw-r--r--src/pkg/runtime/amd64/closure.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/runtime/amd64/closure.c b/src/pkg/runtime/amd64/closure.c
index de2d1695f..5033468d2 100644
--- a/src/pkg/runtime/amd64/closure.c
+++ b/src/pkg/runtime/amd64/closure.c
@@ -9,20 +9,20 @@
// fn func(arg0, arg1, arg2 *ptr, callerpc uintptr, xxx) yyy,
// arg0, arg1, arg2 *ptr) (func(xxx) yyy)
void
-·closure(int32 siz, byte *fn, byte *arg0)
+runtime·closure(int32 siz, byte *fn, byte *arg0)
{
byte *p, *q, **ret;
int32 i, n;
int64 pcrel;
if(siz < 0 || siz%8 != 0)
- throw("bad closure size");
+ runtime·throw("bad closure size");
ret = (byte**)((byte*)&arg0 + siz);
if(siz > 100) {
// TODO(rsc): implement stack growth preamble?
- throw("closure too big");
+ runtime·throw("closure too big");
}
// compute size of new fn.
@@ -40,12 +40,12 @@ void
if(n%8)
n += 8 - n%8;
- p = mal(n);
+ p = runtime·mal(n);
*ret = p;
q = p + n - siz;
if(siz > 0) {
- mcpy(q, (byte*)&arg0, siz);
+ runtime·mcpy(q, (byte*)&arg0, siz);
// SUBQ $siz, SP
*p++ = 0x48;
@@ -117,7 +117,7 @@ void
*p++ = 0xc3;
if(p > q)
- throw("bad math in sys.closure");
+ runtime·throw("bad math in sys.closure");
}