From 51fe7062d3bdcf3c1fc6de5b8ef8aa689a1d2b73 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Fri, 12 May 2023 15:09:03 -0400 Subject: [PATCH] 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 --- doc/go1.21.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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

-- 2.50.0