LGTM On Mon, Sep 8, 2014 at 9:57 AM, <khr@golang.org> wrote: > Reviewers: golang-codereviews, > ...
10 years, 7 months ago
(2014-09-08 17:02:29 UTC)
#2
LGTM
On Mon, Sep 8, 2014 at 9:57 AM, <khr@golang.org> wrote:
> Reviewers: golang-codereviews,
>
> Message:
> Hello golang-codereviews@googlegroups.com,
>
> I'd like you to review this change to
> https://code.google.com/p/go/
>
>
> Description:
> runtime: a few cleanups.
>
> Please review this at https://codereview.appspot.com/134630043/
>
> Affected files (+13, -18 lines):
> M src/runtime/asm_386.s
> M src/runtime/asm_amd64.s
> M src/runtime/asm_amd64p32.s
> M src/runtime/asm_arm.s
> M src/runtime/malloc.go
> M src/runtime/stubs.go
> M src/runtime/thunk.s
>
>
> Index: src/runtime/asm_386.s
> ===================================================================
> --- a/src/runtime/asm_386.s
> +++ b/src/runtime/asm_386.s
> @@ -328,7 +328,7 @@
> 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 @@
> 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: src/runtime/asm_amd64.s
> ===================================================================
> --- a/src/runtime/asm_amd64.s
> +++ b/src/runtime/asm_amd64.s
> @@ -307,7 +307,7 @@
> 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 @@
> 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: src/runtime/asm_amd64p32.s
> ===================================================================
> --- a/src/runtime/asm_amd64p32.s
> +++ b/src/runtime/asm_amd64p32.s
> @@ -280,7 +280,7 @@
> 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 @@
> 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: src/runtime/asm_arm.s
> ===================================================================
> --- a/src/runtime/asm_arm.s
> +++ b/src/runtime/asm_arm.s
> @@ -319,7 +319,7 @@
> 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 @@
> 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: src/runtime/malloc.go
> ===================================================================
> --- a/src/runtime/malloc.go
> +++ b/src/runtime/malloc.go
> @@ -35,6 +35,8 @@
> bitMask = bitBoundary | bitMarked
>
> mSpanInUse = 0
> +
> + concurrentSweep = true
> )
>
> // Page number (address>>pageShift)
> Index: src/runtime/stubs.go
> ===================================================================
> --- a/src/runtime/stubs.go
> +++ b/src/runtime/stubs.go
> @@ -7,9 +7,6 @@
> 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 @@
> 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 @@
> //go:noescape
> func memmove(to unsafe.Pointer, from unsafe.Pointer, n uintptr)
>
> -const (
> - concurrentSweep = true
> -)
> -
> func gosched()
> func starttheworld()
> func stoptheworld()
> Index: src/runtime/thunk.s
> ===================================================================
> --- a/src/runtime/thunk.s
> +++ b/src/runtime/thunk.s
> @@ -56,8 +56,8 @@
> 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)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-codereviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-codereviews+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
*** Submitted as https://code.google.com/p/go/source/detail?r=862455e09163 *** runtime: a few cleanups. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://codereview.appspot.com/134630043
10 years, 7 months ago
(2014-09-08 17:14:44 UTC)
#3
Issue 134630043: code review 134630043: runtime: a few cleanups.
(Closed)
Created 10 years, 7 months ago by khr
Modified 10 years, 7 months ago
Reviewers:
Base URL:
Comments: 0