hi,
this is just an update on the one aspect of the inlining story that i'm working on. insights /
comments welcome.
in separate compilation, the icodeReader fails to load the code of methods in trait
implementation classes (A$class)
there's quite a mess when it comes to the symbol for such a class (only in separate
compilation). there are four (!)
- one ClassSymbol created during Erasure / AddInterfaces
- one ClassSymbol created by the ClassPath, because the "A$class.class" file exists
- one ModuleSymbol, also created due to the classfile
- one ModuleClassSymbol, also created due to the classfile
i observed at least two issues:
1. AddInterfaces "unlinks" the existing ClassSymbol from the "owner.info.decls". The
intention is good, but i think it's not good enough.
a. it should also unlink the symbols for module and the moduleClass.
b. i think we have a general problem when it comes to un-linking: it removes a symbol
only from the scope of the current type, but not all types in the typeHistory
1.b. seems to be a real problem because the supposedly unlinked symbol comes back /
is found during ICodeReader
2. ClassfileParser is confused because the (bytecode) methods in implementation classes
static, so it thinks the symbol for the method found in the moduleClass.
maybe fixing 2. is enough, but everything seems quite brittle...
lukas