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

make it possible to serialize SnoopCompile results #39695

Merged
merged 2 commits into from
Mar 31, 2021
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

Addresses #39655. I don't think it will realistically be possible for JLD to support these data structures, but Serialization might as well support it at least.

  • use nothing instead of NULL as a sentinel in specializations. This field is technically visible and we don't support user-visible SimpleVectors with NULLs
  • remove some Serializer restrictions around saving Methods. The code path for method.generator was broken. We disallowed serializing non-toplevel MethodInstance objects, but I don't see a good reason for that --- we might as well just save the data even if you can't do much with it.

- use `nothing` instead of NULL as a sentinel in specializations
- remove some Serializer restrictions around saving Methods
Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I follow looks good. Thanks Jeff! :)

@Sacha0
Copy link
Member

Sacha0 commented Feb 17, 2021

Backport candidate, or bridge too far? :)

@JeffBezanson
Copy link
Sponsor Member Author

The serializer part I think is just a bugfix, since the :generator code path only errored before (generator.inferred doesn't exist anymore). The other change is internal, but could affect packages that look at the specializations array. That may be ok though.

src/gf.c Outdated Show resolved Hide resolved
Co-authored-by: Jameson Nash <[email protected]>
@vtjnash vtjnash merged commit a5758aa into master Mar 31, 2021
@vtjnash vtjnash deleted the jb/methodserialize branch March 31, 2021 02:00
@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 31, 2021

This seems generally somewhat risky to copy in this way, but generally no worse than deepcopy of other things

simeonschaub added a commit to simeonschaub/Cthulhu.jl that referenced this pull request Mar 31, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
- use `nothing` instead of NULL as a sentinel in specializations
- remove some Serializer restrictions around saving Methods
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
- use `nothing` instead of NULL as a sentinel in specializations
- remove some Serializer restrictions around saving Methods
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
- use `nothing` instead of NULL as a sentinel in specializations
- remove some Serializer restrictions around saving Methods
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

Successfully merging this pull request may close these issues.

3 participants