Skip to content

Cleanup and document Tasty format #6267

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 3 commits into from
Apr 11, 2019
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 9, 2019

No description provided.

ImplicitArg = IMPLICITARG arg_Term
ASTRef = Nat // byte position in AST payload
Param = PARAM Length NameRef type_Term rhs_Term? Modifier* -- modifiers name : type (= rhs_Term)?. `rhsTerm` is present in the case of an aliased class parameter
Template = TEMPLATE Length TypeParam* Param* parent_Term* Self? Stat* -- [typeparams] paramss extends parents { self => stats }, where Stat* always starts with the primary constructor.
Copy link
Member

Choose a reason for hiding this comment

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

This should be Params*, I think.

ERASEDMETHODtype Length result_Type NamesTypes -- A method type `erased (NamesTypes)result`, needed for refinements
GIVENMETHODtype Length result_Type NamesTypes -- A method type `given (NamesTypes)result`, needed for refinements
ERASEDGIVENMETHODtype Length result_Type NamesTypes -- A method type `given erased (NamesTypes)result`, needed for refinements
IMPLCITMETHODtype Length result_Type NamesTypes -- A method type `(implicit NamesTypes)result`, needed for refinements
Copy link
Member

@smarter smarter Apr 9, 2019

Choose a reason for hiding this comment

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

Suggested change
IMPLCITMETHODtype Length result_Type NamesTypes -- A method type `(implicit NamesTypes)result`, needed for refinements
IMPLICITMETHODtype Length result_Type NamesTypes -- A method type `(implicit NamesTypes)result`, needed for refinements

odersky added 3 commits April 11, 2019 12:20
It was not supported yet by pickler and unpickler. In fact it would be quite
awkward to support it since in the pickling format a symbol reference is the
address of the definition tree node. So if there is only a single OBJECTDEF
node, we get an ambiguity between object and its module class. This makes
tree unpickling much harder.

So I believe it is better to expose the object encoding into a lazy val
and a class definition. That also explains where OBJECTNAMEs are bound.
@odersky odersky merged commit d6ea51d into scala:master Apr 11, 2019
@allanrenucci allanrenucci deleted the change-tasty-std branch April 11, 2019 17:20
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