New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cgo: _cgoCheckPointer calling convention is suboptimal #18121

Open
mdempsky opened this Issue Nov 30, 2016 · 2 comments

Comments

Projects
None yet
5 participants
@mdempsky
Member

mdempsky commented Nov 30, 2016

_cgoCheckPointer is currently defined to take a ...interface{} parameter, but it always takes 0 or 1 arguments. And even in the 0 argument case, it would take less stack space to pass a nil interface{} value than a nil []interface{}.

Also, the []interface{} and the true argument used for pointers-to-fields currently escape to the heap. This could be addressed with the //go:noescape annotation.

/cc @ianlancetaylor

@mdempsky mdempsky added this to the Go1.9 milestone Nov 30, 2016

@bradfitz

This comment has been minimized.

Member

bradfitz commented Nov 30, 2016

For putting bools into interface values: #17725

@gopherbot

This comment has been minimized.

gopherbot commented Jan 24, 2017

CL https://golang.org/cl/35555 mentions this issue.

gopherbot pushed a commit that referenced this issue Feb 2, 2017

cmd/compile, runtime: convert byte-sized values to interfaces without…
… allocation

Based in part on khr's CL 2500.

Updates #17725
Updates #18121

Change-Id: I744e1f92fc2104e6c5bd883a898c30b2eea8cc31
Reviewed-on: https://go-review.googlesource.com/35555
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>

@ALTree ALTree modified the milestones: Go1.10, Go1.9 Jun 6, 2017

@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment