The basic principle behind this change is that no context object should store components.
Components should be injected instead, and contexts only carry parameters around.
Particular changes:
- resolveCallWithGivenName() and resolveBinaryCall() moved to CallResolver
- ForLoopConventionsChecker introduced to confine checking conventions for Iterator and Iterable
- ExpressionTypingComponents introduced to deliver necessary components to ExpressionTypingVisitor's
- Some static methods became non-static to get access to injected components
- ExpressionTypingUtils and ControlStructureTypingUtils became components (got state injected) to avoid passing parameters around
LazyPackageDescriptor objects are going to be used as input for light class
generation. Java code generator expects to find connection between descriptors
and files in binding context.
This allows Kotlin compiler to be compatible only with the version of runtime
it was built against. This is currently done only on the first cycle of our
bootstrap process (the final released compiler is still supposed to work
against a separately shipped runtime)
Minimize usages of jet.* in Java code: this will help in migration of jet.* to
package kotlin. Since tests will work with fq names instead of Class<?>
instances from now on, ClassLoaderIsolationUtil is useless now (except for one
unrelated method, which was moved to CodegenTestUtil)
Float.rangeTo(Long) and Long.rangeTo(Float) now both return FloatRange for
consistency with other binary operations between floats and longs which, in
turn, return float to be consistent with Java
Now that Any has members, we need to make sure fake overrides are properly
generated in every class descriptor we create automatically or manually.
This fixes DescriptorSerializationTestGenerated
This is needed because our built-ins can be loaded with two different
mechanisms (deserialization and lazy resolve) and, when that happens,
corresponding descriptors aren't equal to each other, so one of two resolved
descriptors for Any (or the same with Nothing) was never considered to be a
"special class" with no supertypes