Decompile builtins (kotlin_class and kotlin_package files)

The main purpose of this is to be able to index builtin declarations and enable go to symbol/class functionality in ide
Also it makes sense to show builtin classes (Any, Int ...) as classes when browsing kotlin-runtime.jar

Refactor decompiler code to eliminate existing and potential duplication
Share the code between js (kjsm) decompilation and builtin decompilation heavily
This commit is contained in:
Pavel V. Talanov
2015-12-03 18:10:45 +03:00
parent 6164566cad
commit c40d6af1e5
21 changed files with 533 additions and 137 deletions
@@ -30,9 +30,9 @@ public object BuiltInsSerializedResourcePaths : SerializedResourcePaths() {
BuiltInsProtoBuf.registerAllExtensions(extensionRegistry)
}
private val CLASS_METADATA_FILE_EXTENSION = "kotlin_class"
private val PACKAGE_FILE_EXTENSION = "kotlin_package"
private val STRING_TABLE_FILE_EXTENSION = "kotlin_string_table"
val CLASS_METADATA_FILE_EXTENSION = "kotlin_class"
val PACKAGE_FILE_EXTENSION = "kotlin_package"
val STRING_TABLE_FILE_EXTENSION = "kotlin_string_table"
public override fun getClassMetadataPath(classId: ClassId): String {
return packageFqNameToPath(classId.getPackageFqName()) + "/" + classId.getRelativeClassName().asString() +