-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Save TASTY in attribute of classfiles. #498
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
Conversation
So if there are multiple classes in the same file, the same attribute will be written multiple times? Also, how is this supposed to be accessible at runtime? |
This should be fixed by either having a single top-level class per compilation unit after pickler, or pickler should prepare a map of what TASTY to save in which file.
Given this implementation, only using classloader. This implementation is not thought as a long-term one, but to foster testing of TASTY in Dotty. |
If a unit has several top-level classes or object (which are not linked classes of each other) each gets its own pickle information, which contains any enclosing package clauses and imports and then just the top-level class/object and its companion object.
@DarkDimius Please review. |
It does not matter whether it comes from Dotty or elsewhere. We can record the name of the producer in a section of the format itself.
If a constructor for class C was called with wrong number of parameters, the previous error message referred to `method <init>`. Now it is `constructor C`.
Classfile parser now reads TASTY attributes or annotations and unpickles them in order to allow for separate compilation.
Add test-classes to .gitignore. (The change is produced persistently by my Eclipse IDE).
I pulled this PR together with #495 into master, then compiled Dotty, then ran it on a simple file, and it blew up. No idea whether I'm doing something wrong, or it's a genuine bug, but here's the log:
|
Save TASTY in attribute of classfiles.
Currently saves on all classfiles in the same compilation unit.
@odersky, feel free to take over