Skip to content
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/compile: inline all type assertions #10208

Closed
rsc opened this issue Mar 20, 2015 · 3 comments
Closed

cmd/compile: inline all type assertions #10208

rsc opened this issue Mar 20, 2015 · 3 comments

Comments

@rsc
Copy link
Contributor

rsc commented Mar 20, 2015

CL 7862 inlined y.(*T) for types that fit in the interface.
It's only one extra indirection to get the types that are
stored indirectly. We probably should do that.
Then assertE2T, assertE2T2, assertI2T, assertI2T2
can all be deleted from the runtime.

@rsc rsc added this to the Go1.5 milestone Mar 20, 2015
@rsc
Copy link
Contributor Author

rsc commented Jun 8, 2015

Too late for Go 1.5.

@rsc rsc modified the milestones: Go1.6, Go1.5 Jun 8, 2015
@rsc rsc changed the title cmd/internal/gc: inline all type assertions cmd/compile: inline all type assertions Jun 8, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Nov 4, 2015
@haya14busa
Copy link
Contributor

I'm sorry if i'm wrong but this issue was fixed by 688995d ?

FWIW, I grepped assertE2T, assertE2T2, assertI2T, assertI2T2 and I found that below comment may be outdated?

// Special: use temporary variables to hold result,
// so that assertI2Tetc can take address of temporary.
// No temporary for blank assignment.

// so that assertI2Tetc can take address of temporary.

@randall77
Copy link
Contributor

Yes, this issue is fixed. As for that comment, it is still kind of true, we allocate a temporary for non-SSAable types.

@golang golang locked and limited conversation to collaborators Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants