This is needed to avoid bundling of FIR classes to IDE plugin for
parcelize, because it can cause compatibility issues, because
IDE plugin does not contain FIR compiler
This commit fixes DFA problem (see test) when we accidentally try
to merge incoming flows from member property (val ... by cached ...) and
the following function. While completing lambda of buildList { ... }
inside by cached we accidentally assume that delegate is already left
and add the lambda into exitsFromCompletedPostponedAnonymousFunction.
This commit fixes the problem by exiting delegate later, after completion.
This commit saves us some performance and fixes test for KT-35684.
FIR-based constraint completer at this moment can't extract type
variables from already completed calls.
Folding allows us to extract ordered type variables before completion.
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.
Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.
#KT-49925 Fixed
Intentionally use doFirst section to trick gradle and not affect
inputs with absolute path usage.
Old behaviour can be returned by kotlin.build.use.absolute.paths.in.klib
in local.properties
Should be removed after KT-50876 fix.
^KTI-730 In Progress
Result of calling `ExpressionCodegen.gen` was used only in two call
sites in the inliner. In all other call sites, we were doing unnecessary
work (and sometimes were even failing) by trying to construct a
KotlinType instance out from an IrType.
Note that even though the code from KT-50617 no longer fails to compile,
the underlying problem is still not solved, since the IrType for foo's
dispatch receiver is constructed incorrectly. The reason is that
SymbolTable links everything by IdSignature, which is identical for
classes with the same FQ name.
#KT-50617 Fixed
Make addArgument/addElement/putElement extension functions. This will
simplify transition to auto-generated IR.
Co-authored-by: mcpiroman <mcpiroman@gmail.com>
To simplify review of the upcoming IR tree generator.
Note that copyright is dated 2021, since that's in
license/COPYRIGHT_HEADER.txt which is used by generators.
This change only moves code around, no behavior is changed.
Specifically, ir.tree sources containing several declarations are split
into several files: one file per class, and one file for all extension
functions per package (IrDeclarations.kt, IrExpressions.kt,
IrVisitors.kt, IrConstructorCallTypeArguments.kt).
This is useful because after introducing IR tree generator, we can
easily see how generated sources are different from those which were
written manually, since Git will recognize file moves. Also, it will
keep Git history for sources which consisted of one big class + a couple
of extension functions (e.g. IrElementVisitorVoid.kt).
Kotlin Android extensions plugin adds layout directories as input to
KotlinCompile task when experimental flag is enabled. This breaks
cache relocation.
^KT-48849 Fixed