-
Notifications
You must be signed in to change notification settings - Fork 18k
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
runtime, cmd/compile: add getclosureptr intrinsic #21258
Comments
Hi, if no one is working on this, I'd like to take it. But I think I need some guides...
It seems that the size store in closure can be accessed by DX+8. But as far as I know, closure will be represented by a struct contained a function pointer and all catched variables, why can we access the size store in closure by DX+8, and what is stored in DX? |
You could probably use this CL as a model. |
The Go 1.1 Function Calls Design Doc should help explain the DX+8. |
After I wrote everything like https://go-review.googlesource.com/c/31851, I changed
Then I run
Actually I don't have much experience dealing with compiler bug, but I think there must be some wrongs with my |
It would help us help you if you pushed up a change so we can see what you did. Some observations, though:
But without being able to look at your actual changes, all I can do is guess. |
Change https://golang.org/cl/53411 mentions this issue: |
I suggest we add runtime.getclosureptr as a compiler intrinsic. It should be somewhat easy to implement, since all it is doing is identifying a register. Then we could use it to implement memhash_varlen in plain Go, rather than assembly.
Fairly low priority, but might be an interesting (if slightly non-trivial) starter project for someone who wants to learn a bit about the compiler.
The text was updated successfully, but these errors were encountered: