]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: unify reflect, string and slice copy runtime functions
authorMartin Möhrmann <moehrmann@google.com>
Mon, 14 Sep 2020 14:30:43 +0000 (16:30 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Wed, 16 Sep 2020 04:37:14 +0000 (04:37 +0000)
commit790fa1c546a05936406f6bbf24f6a6ddeb6ec6ad
tree9236845ca84c8c52fa7845d6d7a35f5e41341839
parenteaa97fbf20baffac713ed1b780f864a6fee54ab6
cmd/compile: unify reflect, string and slice copy runtime functions

Use a common runtime slicecopy function to copy strings or slices
into slices. This deduplicates similar code previously used in
reflect.slicecopy and runtime.stringslicecopy.

Change-Id: I09572ff0647a9e12bb5c6989689ce1c43f16b7f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/254658
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/walk.go
src/runtime/mbarrier.go
src/runtime/slice.go