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?
to your account
var x = new(int)
This generates init code to call newobject (including a write barrier, which I thought wasn't supposed to happen any more?). Instead, we should make a BSS int symbol, and then make x contain a relocation to that symbol.
cc @randall77 @mvdan
The text was updated successfully, but these errors were encountered:
No, we still need a write barrier when initializing a global location.
The write barriers I changed recently removes them when initializing the contents of the results of a newobject call. Not sure if you're referring to that.
Yes, we can and should allocate the int statically. Small caveat: watch out for #29068.
Sorry, something went wrong.
Hi @josharian! Can I help?
Go for it. You'll be looking at sinit.go. It's not particularly clear code, even by compiler standards. I recommend writing yourself a few simplified examples to work off of.
Sounds lovely. :D But at least I'll learn while trying to figure it out. Which is always good. :)
Picking this up now. Sorry, was pre-occupied with another issue on packages. :)
No branches or pull requests