From: Cherry Mui Date: Fri, 12 May 2023 19:09:03 +0000 (-0400) Subject: doc/go1.21: document reflect.Value escape improvements X-Git-Tag: go1.21rc1~503 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=51fe7062d3bdcf3c1fc6de5b8ef8aa689a1d2b73;p=gostls13.git doc/go1.21: document reflect.Value escape improvements With CL 408826, CL 413474, etc. reflect.ValueOf no longer unconditionally escapes its argument, allowing a Value's content to be allocated on the stack. Change-Id: I3a0af85c11e2fd0df42b056095565f0ce5548886 Reviewed-on: https://go-review.googlesource.com/c/go/+/494657 TryBot-Result: Gopher Robot Reviewed-by: David Chase Run-TryBot: Cherry Mui Reviewed-by: Austin Clements --- diff --git a/doc/go1.21.html b/doc/go1.21.html index 14a2e5fabc..e483e1e556 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -105,6 +105,18 @@ Do not send CLs removing the interior tags from such phrases. +
reflect
+
+

+ In Go 1.21, ValueOf + no longer forces its argument to be allocated on the heap, allowing + a Value's content to be allocated on the stack. Most + operations on a Value also allow the underlying value + to be stack allocated. +

+
+
+
sync