]> Cypherpunks repositories - gostls13.git/commitdiff
internal/reflectlite: delete TODO pass safe to packEface don't need to copy if safe...
authorqiulaidongfeng <2645477756@qq.com>
Sat, 9 Dec 2023 05:50:59 +0000 (05:50 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 23 Jan 2024 17:20:01 +0000 (17:20 +0000)
reflect on the https://go-review.googlesource.com/c/go/+/548436
delete TODO the same.

Change-Id: I5b278cbfcb4108e5ffb332ba82dafb1eaa2bd6b2
GitHub-Last-Rev: cfc39509085477e9cba8e8ba1698653837a12301
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>
src/internal/reflectlite/value.go

index c47e5ea12b3ced5df11264b27c5f4dd1b98ba9fd..f4f15d8e5f1b7689e29c6fa789a3d71bd960f0f1 100644 (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)
 }