From 16df7038715e9644dc3e23984439731db4333e57 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 3 May 2019 17:15:54 +0000 Subject: os/user: disable TestGroupIds for AIX The corresponding Go Toolchain patch is CL 164039 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175079 From-SVN: r270857 --- libgo/go/os/user/user_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libgo/go') diff --git a/libgo/go/os/user/user_test.go b/libgo/go/os/user/user_test.go index 2563077..eeb24dd 100644 --- a/libgo/go/os/user/user_test.go +++ b/libgo/go/os/user/user_test.go @@ -129,6 +129,9 @@ func TestLookupGroup(t *testing.T) { func TestGroupIds(t *testing.T) { checkGroup(t) + if runtime.GOOS == "aix" { + t.Skip("skipping GroupIds, see golang.org/issue/30563") + } if runtime.GOOS == "solaris" { t.Skip("skipping GroupIds, see golang.org/issue/14709") } -- cgit v1.1 From 08c8a26e9ca87ad2dd5b26d397e6107b68adfe76 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 3 May 2019 21:45:35 +0000 Subject: compiler: recognize and optimize array range clear Recognize for i := range a { a[i] = zero } for array or slice a, and rewrite it to call memclr, as the gc compiler does. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169398 From-SVN: r270862 --- libgo/go/runtime/mbarrier.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libgo/go') diff --git a/libgo/go/runtime/mbarrier.go b/libgo/go/runtime/mbarrier.go index d3ffd3c..89febb9 100644 --- a/libgo/go/runtime/mbarrier.go +++ b/libgo/go/runtime/mbarrier.go @@ -23,6 +23,7 @@ import ( // //go:linkname typedmemmove runtime.typedmemmove //go:linkname typedslicecopy runtime.typedslicecopy +//go:linkname memclrHasPointers runtime.memclrHasPointers // Go uses a hybrid barrier that combines a Yuasa-style deletion // barrier—which shades the object whose reference is being -- cgit v1.1 From b65b77cc80885f72f710da4134f05fc6b12fc8c5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 8 May 2019 04:39:19 +0000 Subject: reflect: correctly handle direct interface typed receiver in Value.call A direct interface type's value method takes value receiver now. Don't pass pointer to the method function. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175798 From-SVN: r271000 --- libgo/go/reflect/value.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgo/go') diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go index d3a6243..298fbac 100644 --- a/libgo/go/reflect/value.go +++ b/libgo/go/reflect/value.go @@ -401,7 +401,7 @@ func (v Value) call(op string, in []Value) []Value { if v.flag&flagMethod != 0 { nin++ } - firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethodFn != 0 + firstPointer := len(in) > 0 && ifaceIndir(t.In(0).common()) && v.flag&flagMethodFn != 0 params := make([]unsafe.Pointer, nin) off := 0 if v.flag&flagMethod != 0 { -- cgit v1.1 From fbe4e644c0c8f1303ec91a25b8da6e626976500c Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Wed, 8 May 2019 17:40:45 +0000 Subject: runtime: use builtin memmove directly We can use the intrinsic memmove directly, without going through C. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170004 * go-gcc.cc (Gcc_backend::Gcc_backend): Define memmove builtin. From-SVN: r271016 --- libgo/go/runtime/stubs.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libgo/go') diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go index dfdb38e..435cdf7 100644 --- a/libgo/go/runtime/stubs.go +++ b/libgo/go/runtime/stubs.go @@ -100,6 +100,7 @@ func reflect_memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) { // memmove copies n bytes from "from" to "to". //go:noescape +//extern __builtin_memmove func memmove(to, from unsafe.Pointer, n uintptr) //go:linkname reflect_memmove reflect.memmove -- cgit v1.1