]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: a few cleanups.
authorKeith Randall <khr@golang.org>
Mon, 8 Sep 2014 17:14:41 +0000 (10:14 -0700)
committerKeith Randall <khr@golang.org>
Mon, 8 Sep 2014 17:14:41 +0000 (10:14 -0700)
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/134630043

src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/malloc.go
src/runtime/stubs.go
src/runtime/thunk.s

index 25026417bf5954b6d10a47c20ed667b08cba7475..7eba8977c680a63688cf627bbee85c153392a72e 100644 (file)
@@ -328,7 +328,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0-0
        MOVL    $0, DX
        JMP runtime·morestack(SB)
 
-// reflect·call: call a function with the given argument list
+// reflectcall: call a function with the given argument list
 // func call(f *FuncVal, arg *byte, argsize, retoffset uint32).
 // we don't have variable-sized frames, so we use a small number
 // of constant-sized-frame functions to encode a few bits of size in the pc.
@@ -341,7 +341,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$0-0
        JMP     AX
 // Note: can't just "JMP NAME(SB)" - bad inlining results.
 
-TEXT reflect·call(SB), NOSPLIT, $0-16
+TEXT runtime·reflectcall(SB), NOSPLIT, $0-16
        MOVL    argsize+8(FP), CX
        DISPATCH(runtime·call16, 16)
        DISPATCH(runtime·call32, 32)
index cc32ad8a18dcc7e811606138a695d07eee54563e..a47fb0952275d5bb999c7f61816f2b725172ecbd 100644 (file)
@@ -307,7 +307,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$0-0
        MOVQ    $0, 0x1003      // crash if newstack returns
        RET
 
-// reflect·call: call a function with the given argument list
+// reflectcall: call a function with the given argument list
 // func call(f *FuncVal, arg *byte, argsize, retoffset uint32).
 // we don't have variable-sized frames, so we use a small number
 // of constant-sized-frame functions to encode a few bits of size in the pc.
@@ -320,7 +320,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$0-0
        JMP     AX
 // Note: can't just "JMP NAME(SB)" - bad inlining results.
 
-TEXT reflect·call(SB), NOSPLIT, $0-24
+TEXT runtime·reflectcall(SB), NOSPLIT, $0-24
        MOVLQZX argsize+16(FP), CX
        DISPATCH(runtime·call16, 16)
        DISPATCH(runtime·call32, 32)
index 6c10bec5c350dc85426c9e4d186b87b417fd728b..95d04cae4f550fc981a21d223857b30e5069b453 100644 (file)
@@ -280,7 +280,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$0-0
        MOVL    $0, 0x1003      // crash if newstack returns
        RET
 
-// reflect·call: call a function with the given argument list
+// reflectcall: call a function with the given argument list
 // func call(f *FuncVal, arg *byte, argsize, retoffset uint32).
 // we don't have variable-sized frames, so we use a small number
 // of constant-sized-frame functions to encode a few bits of size in the pc.
@@ -293,7 +293,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$0-0
        JMP     AX
 // Note: can't just "JMP NAME(SB)" - bad inlining results.
 
-TEXT reflect·call(SB), NOSPLIT, $0-16
+TEXT runtime·reflectcall(SB), NOSPLIT, $0-16
        MOVLQZX argsize+8(FP), CX
        DISPATCH(runtime·call16, 16)
        DISPATCH(runtime·call32, 32)
index 3db907945c8a145b76078e95caa76ee885cb2da0..af536f079cd839c14c41791a648098cde2aef1df 100644 (file)
@@ -319,7 +319,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0
        MOVW    $0, R7
        B runtime·morestack(SB)
 
-// reflect·call: call a function with the given argument list
+// reflectcall: call a function with the given argument list
 // func call(f *FuncVal, arg *byte, argsize, retoffset uint32).
 // we don't have variable-sized frames, so we use a small number
 // of constant-sized-frame functions to encode a few bits of size in the pc.
@@ -331,7 +331,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0
        MOVW    $NAME(SB), R1;          \
        B       (R1)
 
-TEXT reflect·call(SB),NOSPLIT,$-4-16
+TEXT runtime·reflectcall(SB),NOSPLIT,$-4-16
        MOVW    argsize+8(FP), R0
        DISPATCH(runtime·call16, 16)
        DISPATCH(runtime·call32, 32)
index 883ca0cef79dbeba2e30dd089bc2850bfedaa484..b3c9c1fd7834a3df44eaba65fa5596f7eacdcc89 100644 (file)
@@ -35,6 +35,8 @@ const (
        bitMask     = bitBoundary | bitMarked
 
        mSpanInUse = 0
+
+       concurrentSweep = true
 )
 
 // Page number (address>>pageShift)
index 03f618e155b78e12349a85aeb66aa8ec5a26ee9b..bf6c33a41ec68166f980735bd4b1a370132653b3 100644 (file)
@@ -7,9 +7,6 @@ package runtime
 import "unsafe"
 
 // Declarations for runtime services implemented in C or assembly.
-// C implementations of these functions are in stubs.goc.
-// Assembly implementations are in various files, see comments with
-// each function.
 
 const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
 const regSize = 4 << (^uintreg(0) >> 63) // unsafe.Sizeof(uintreg(0)) but an ideal const
@@ -26,7 +23,7 @@ func roundup(p unsafe.Pointer, n uintptr) unsafe.Pointer {
        return unsafe.Pointer(uintptr(p) + delta)
 }
 
-// in stubs.goc
+// in runtime.c
 func getg() *g
 func acquirem() *m
 func releasem(mp *m)
@@ -114,10 +111,6 @@ func memclr(ptr unsafe.Pointer, n uintptr)
 //go:noescape
 func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr)
 
-const (
-       concurrentSweep = true
-)
-
 func gosched()
 func starttheworld()
 func stoptheworld()
index babc9276802b2d79b9699f4a97eae5c619bbc909..7bdf7b950da19a79e333b86b05c10998b60859cd 100644 (file)
@@ -56,8 +56,8 @@ TEXT runtime∕pprof·runtime_cyclesPerSecond(SB),NOSPLIT,$0-0
 TEXT bytes·Compare(SB),NOSPLIT,$0-0
        JMP     runtime·cmpbytes(SB)
 
-TEXT runtime·reflectcall(SB), NOSPLIT, $0-0
-       JMP     reflect·call(SB)
+TEXT reflect·call(SB), NOSPLIT, $0-0
+       JMP     runtime·reflectcall(SB)
 
 TEXT reflect·chanclose(SB), NOSPLIT, $0-0
        JMP     runtime·closechan(SB)