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

Deterministic output #88

Open
dgryski opened this issue Jan 15, 2018 · 1 comment
Open

Deterministic output #88

dgryski opened this issue Jan 15, 2018 · 1 comment

Comments

@dgryski
Copy link

dgryski commented Jan 15, 2018

Every time I regenerate the assembly for https://github.com/dgryski/go-highway with python3, some of the labels change. This makes it difficult to isolate a small change in the source file with a small change in the output.

@Maratyszcza
Copy link
Owner

This is caused by iterating dict keys in https://github.com/Maratyszcza/PeachPy/blob/master/peachpy/name.py#L91 This could be fixed by assigning a function-global name id each time an object with a name (LABEL or instruction with Constant) is added in Function.add_instruction and sorting by these names in the loop. I don't have time to fix it now, but a PR would be welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants