Skip to content

Fix Tasty unpickling of a TEMPLATE with a SHARED parent #3824

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

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

smarter
Copy link
Member

@smarter smarter commented Jan 13, 2018

No description provided.

@smarter
Copy link
Member Author

smarter commented Jan 13, 2018

Note: would be good if someone double-checked that there aren't other places where we use nextByte when nextUnsharedTag would be more appropriate.

@smarter smarter requested a review from odersky January 13, 2018 23:49
@smarter
Copy link
Member Author

smarter commented Jan 14, 2018

The test failure is due to a missing position for an unpickled tree, I'll investigate.

@smarter smarter force-pushed the fix-tasty-shared-parent branch 2 times, most recently from 17dc5b1 to ec723f4 Compare January 15, 2018 13:07
In general, this makes things easier to debug at virtually no cost. It
also makes it much easier to properly set positions on unpickled
TypeTrees: in TreeUnpickler#readTpt we can know make sure that the
position of the TypeTree is unpickled from the address found after
following all shared terms but before following any shared type.

Note that the major version bump could have been avoided by adding some
compatibility code, but that doesn't seem worthwhile until Tasty is used
in the wild.
@smarter smarter force-pushed the fix-tasty-shared-parent branch from ec723f4 to 4c5b6ef Compare January 15, 2018 17:52
@smarter
Copy link
Member Author

smarter commented Jan 15, 2018

Ready for review.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM

@smarter smarter merged commit 6c6cd96 into scala:master Jan 15, 2018
@allanrenucci allanrenucci deleted the fix-tasty-shared-parent branch January 16, 2018 08:00
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.

2 participants