From: qiulaidongfeng <2645477756@qq.com> Date: Sat, 9 Dec 2023 05:50:59 +0000 (+0000) Subject: internal/reflectlite: delete TODO pass safe to packEface don't need to copy if safe... X-Git-Tag: go1.23rc1~1405 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ed18d85ad798441e13d3b428678defb5bb0fb176;p=gostls13.git 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: cfc39509085477e9cba8e8ba1698653837a12301 GitHub-Pull-Request: golang/go#64628 Reviewed-on: https://go-review.googlesource.com/c/go/+/548615 Auto-Submit: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI TryBot-Result: Gopher Robot Reviewed-by: Keith Randall --- diff --git a/src/internal/reflectlite/value.go b/src/internal/reflectlite/value.go index c47e5ea12b..f4f15d8e5f 100644 --- a/src/internal/reflectlite/value.go +++ b/src/internal/reflectlite/value.go @@ -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) }