]> Cypherpunks repositories - gostls13.git/commit
reflect: create funcTypes using StructOf
authorcuiweixie <cuiweixie@gmail.com>
Wed, 24 Aug 2022 14:00:45 +0000 (22:00 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 26 Sep 2022 21:39:25 +0000 (21:39 +0000)
commit63668a5155c808f474d5adab676ef3f3aa50c1d3
tree538233e500d13d455ab67dabd16dfbb80af22215
parent22f447159981a58508ac190f297798cdd5fd668b
reflect: create funcTypes using StructOf

follow the TODO to use StructOf, this cl can save the used memory.
for example, old code alloc [128]*rtype for func with 65 arguments(in+out),
this cl change to alloc [65]*rtype to save memory.

Change-Id: I1494bb6b3524d0d46869c3f24a628fec88119d8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/425314
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/reflect/type.go