* Keep returnable blocks.
* Add a new lowering which simplifies returnable blocks by introducing
temporary variable for result and changing returnable block's type to Unit.
* Use information from returnable blocks in codegen to generate
the right source locations in sourcemap.
* Support in namer (LocalNameGenerator).
* Fix some lowerings to work correctly with returnable blocks.
#KT-46551 In Progress
1. the `primitive == object?.something` fusion should not apply to
`primitive.equals(object?.something)` because it can't;
2. coercions to Int are there for a reason - don't remove them;
3. better optimize `primitive == object?.something` -- the result
should be subject to if-null fusion, so it needs to have a specific
pattern that resembles safe calls.
#KT-47597 Fixed
^KT-47574 The fix done here supports only one level of substituting
underlying type-arguments.
HierarchicalTypeAliasCommonizationTest.`KT-47574 - test long typealias chain`
will assert proper behaviour for nested chains.
This drastically improves performance for now, since the previous
Adapter implementation was at least O(n^2). While the Adapter
implementation could have been reduced to O(n), the Signature of
StatelessCommonizer was misleading.
StatelessCommonizer will be introduced back later when other
Commonizer implementations are ready to be converted to a new
Signature.
After linking runtime, llvm-ir is modified to add checker function
call at all points where unknown function, which can possibly run long
is called. This function checks Native state is set, to avoid long locks
at gc.
Before we analyzed initializers of enum entry with scope for constructor
in implict type mode, so scope was untouchable. Now we analyze them
in body resolve phase, so previously we add value parameters to
constructors scope, which mess up scope of enum entry initializer
In some cases we check that some declaration (e.g. field) was
analyzed by checking type of it's body/initializer (is it implicit
or not), so if type of FirAnonymousObjectExpression is not implicit
we can skip resolve of anonymous object itself
`throw` is not needed in this case, because `error(...)` already
raises exception (so `throw` is unreachable). Also after previous
commit compiler reports `UNREACHABLE_CODE` warning on such `throw`