"getExtension" returns default value when the requested extension is not
present, which is 0 for Int, which makes no sense for extensions like
methodImplClassName that are storing the number in the string table
- move enums and messages nested in Callable to top level, since they're likely
to be reused in other messages soon
- delete obsolete comments: some did not any value, some became obsolete with
custom options ("id in StringTable" -> name_id_in_table)
Rework SerializerExtension interface: don't pass StringTable to each method
every time, create it in each extension's constructor instead and expose to
DescriptorSerializer with an interface method
1. ConstantValue
* just holds some value and its type
* implementations for concrete constants
2. CompileTimeConstant
* is only produced by ConstantExpressionEvaluator
* has additional flags (canBeUsedInAnnotation etc)
* has two implementations TypedCompileTimeConstant containing a constant value
and IntegerValueConstant which does not have exact type
* can be converted to ConstantValue
Adjustt usages to use ConstantValue if flags are not needed
Add tests for some uncovered cases
Check with the containing class or package first, don't load the class if the
container doesn't know about it. This also makes the workaround for
case-insensitive file systems unnecessary
Refactor: no need to create package view in order to obtain its subpackages
LazyPackageViewDescriptorImpl to replace PackageViewDescriptorImpl
This allows to avoid computations when package views are requested but their contents not necessarily queried
For example: DescriptorResolver.resolvePackageHeader()
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there
#KT-7088 Fixed
BuiltinsPackageFragment was only designed to work with a single instance alive.
Because of this, it was creating deserialization subsystem upon initialization.
This was not working perfectly in JS where it was used, because multiple
storage managers, class caches and other components were created for each
package, leading to different concurrency errors and performance hits. Also in
the near future another package fragment will be needed to represent the
built-in package "kotlin.reflect"