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: use memmove to initialize non-global static data #29693

josharian opened this issue Jan 11, 2019 · 0 comments


Copy link

commented Jan 11, 2019

This is a duplicate of #29573 (comment) and #29574 (comment), but split out so that it doesn't get lost in the other discussions.

When initializing static data in a function (non-global) context, we generate code to construct the desired object. In some (most?) cases, it'd be preferable to have a static data symbol containing the desired object and then copy it into place using memmove/typedmemmove.

See those issues/comments for more details.

cc @dsnet @randall77

@josharian josharian added this to the Go1.13 milestone Jan 11, 2019

@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.