go/src/reflect
Ian Lance Taylor 493517bb5c runtime, reflect: avoid allocation in structType.Field common cases
Use assembler to make runtime.staticuint64s into a readonly array
so that the reflect package can safely create a slice without requiring
any allocation.

Fixes #2320
Fixes #68380

Change-Id: If2c97238eca782d0632db265c840581d4ecb9d18
Reviewed-on: https://go-review.googlesource.com/c/go/+/597855
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2024-09-10 22:38:30 +00:00
..
internal
abi.go reflect: remove redundent ifaceIndir 2024-05-07 17:08:32 +00:00
abi_test.go
all_test.go runtime, reflect: avoid allocation in structType.Field common cases 2024-09-10 22:38:30 +00:00
arena.go reflect: add available godoc link 2024-04-02 15:20:05 +00:00
asm_386.s
asm_amd64.s
asm_arm.s
asm_arm64.s
asm_loong64.s all: delete loong64 non-register ABI fallback path 2024-05-13 15:04:25 +00:00
asm_mips64x.s
asm_mipsx.s
asm_ppc64x.s
asm_riscv64.s
asm_s390x.s
asm_wasm.s
badlinkname.go all: document legacy //go:linkname for final round of modules 2024-05-29 17:58:53 +00:00
benchmark_test.go
deepequal.go runtime,internal: move runtime/internal/sys to internal/runtime/sys 2024-07-23 19:05:35 +00:00
example_test.go
export_test.go all: use kind* of abi 2024-04-02 15:10:48 +00:00
float32reg_generic.go
float32reg_ppc64x.s
float32reg_riscv64.s
iter.go reflect: add line breaks for long sentences 2024-05-22 13:40:11 +00:00
iter_test.go reflect: let Value.Seq iterate integer conform to the spec 2024-05-10 14:27:54 +00:00
makefunc.go reflect: add available godoc link 2024-04-02 15:20:05 +00:00
map_noswiss.go all: split old and swiss map abi and compiler integration 2024-08-02 16:41:53 +00:00
map_swiss.go cmd/compile,runtime: disable swissmap fast variants 2024-08-02 16:47:38 +00:00
nih_test.go
set_test.go
stubs_ppc64x.go
stubs_riscv64.go
swapper.go runtime: use .Pointers() instead of manual checking 2024-03-04 17:34:30 +00:00
tostring_test.go
type.go runtime, reflect: avoid allocation in structType.Field common cases 2024-09-10 22:38:30 +00:00
type_test.go net/http, reflect: rename Test function names 2024-05-15 23:39:44 +00:00
value.go all: create swissmap experiment and fork files 2024-08-02 15:34:37 +00:00
visiblefields.go
visiblefields_test.go