]> Cypherpunks repositories - gostls13.git/commit
runtime, reflect: access runtime.reflectcall directly
authorAustin Clements <austin@google.com>
Thu, 8 Nov 2018 15:34:19 +0000 (10:34 -0500)
committerAustin Clements <austin@google.com>
Mon, 12 Nov 2018 20:27:14 +0000 (20:27 +0000)
commit4f3604d3f2b25905907742f48cd0feeec5b458e1
tree393a6f20d5d07b39e23eb547bb767c1b9aceb5ca
parentf58b02a29c395b5ec28bb548b1fd3ca18e2b3a4f
runtime, reflect: access runtime.reflectcall directly

Currently, package runtime contains the definition of reflect.call,
even though it's just a jump to runtime.reflectcall. This "push"
symbol is confusing, since it's not clear where the definition of
reflect.call comes from when you're in the reflect package.

Replace this with a "pull" symbol: the runtime now defines only
runtime.reflectcall and package reflect uses a go:linkname to access
this symbol directly. This makes it clear where reflect.call is coming
from without any spooky action at a distance and eliminates all of the
definitions of reflect.call in the runtime.

Change-Id: I3ec73cd394efe9df8d3061a57c73aece2e7048dd
Reviewed-on: https://go-review.googlesource.com/c/148657
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
13 files changed:
src/cmd/vet/all/whitelist/all.txt
src/reflect/value.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_mipsx.s
src/runtime/asm_ppc64x.s
src/runtime/asm_s390x.s
src/runtime/asm_wasm.s
src/runtime/stubs.go