1
0
mirror of https://github.com/golang/go synced 2024-09-29 17:14:29 -06:00

internal/reflectlite: delete TODO pass safe to packEface don't need to copy if safe==true

reflect on the https://go-review.googlesource.com/c/go/+/548436
delete TODO the same.

Change-Id: I5b278cbfcb4108e5ffb332ba82dafb1eaa2bd6b2
GitHub-Last-Rev: cfc3950908
GitHub-Pull-Request: golang/go#64628
Reviewed-on: https://go-review.googlesource.com/c/go/+/548615
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
qiulaidongfeng 2023-12-09 05:50:59 +00:00 committed by Gopher Robot
parent 8c45dddd5d
commit ed18d85ad7

View File

@ -123,8 +123,6 @@ func packEface(v Value) any {
// Value is indirect, and so is the interface we're making.
ptr := v.ptr
if v.flag&flagAddr != 0 {
// TODO: pass safe boolean from valueInterface so
// we don't need to copy if safe==true?
c := unsafe_New(t)
typedmemmove(t, c, ptr)
ptr = c
@ -285,7 +283,6 @@ func valueInterface(v Value) any {
})(v.ptr)
}
// TODO: pass safe to packEface so we don't need to copy if safe==true?
return packEface(v)
}