]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: pass only the itab to the assertI2I-style functions
authorKeith Randall <khr@golang.org>
Mon, 11 Sep 2023 21:39:06 +0000 (14:39 -0700)
committerKeith Randall <khr@golang.org>
Fri, 6 Oct 2023 17:01:59 +0000 (17:01 +0000)
commit749925701606fae9c71559704a094279bc775512
treed4c4e17a2ab44edc8164c987318fb6c3906bfff9
parent39263f34a307814a74823b280a313829dad374e5
cmd/compile: pass only the itab to the assertI2I-style functions

It is currently slightly better to pass the whole interface to these
functions, so that we don't need to spill/restore the data word across
the function call.

I'm adding a cache in front of these calls, which means we'll no longer
need a spill/restore in the common case, so it is better to just pass
the itab word.

It also makes unifying the logic between I2I and I2I2 versions easier.

Change-Id: I3c3e9fbb1e54890482840d76a1df79f4325bb5bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/528075
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/typecheck/_builtin/runtime.go
src/cmd/compile/internal/typecheck/builtin.go
src/runtime/iface.go
src/runtime/mfinal.go