Ilya Chernikov
932eab8dfc
Implement semi-lazy PSI-based suppress cache for IR
...
calculates suppressions per root (KtFile) basis on demand.
2021-10-27 22:17:42 +02:00
Ilya Chernikov
1e056a7aa8
Report IR errors via new diagnostic infrastructure
2021-10-27 22:17:40 +02:00
Ivan Kochurkin
c13822a2c5
Optimize containsKey -> get pattern
2021-10-25 21:21:44 +03:00
Dmitry Petrov
c441980c74
JVM_IR don't move inplace arguments with variable stores
...
KT-49370
KT-49407
2021-10-25 20:11:42 +03:00
Dmitriy Novozhilov
f7bb55433d
Add LanguageVersion and ApiVersion for 1.8
2021-10-25 12:54:10 +03:00
Ilmir Usmanov
f760cd6736
Make CHECKCAST Object not break tail-call optimization
...
Since CHECKCAST Object does nothing for return value of suspend
function - the function returns references only, this is safe.
#KT-49157 Fixed
2021-10-11 06:40:26 +00:00
Dmitry Petrov
cc885f9b24
JVM don't remove NOP starting a try-catch block
2021-09-29 19:14:37 +03:00
Dmitry Petrov
ca7ee75f88
JVM replace redundant GOTOs with NOPs to preserve debugging behavior
2021-09-29 19:14:33 +03:00
Dmitry Petrov
0a67ab54fe
JVM_IR more compact safe call chains (almost as old BE)
2021-09-29 19:14:32 +03:00
Victor Petukhov
764361bc42
Format and remove unused imports and variables
2021-09-27 16:12:22 +03:00
Victor Petukhov
3696bebb48
Introduce NewCallableReferenceResolvedCall and commonize other logic under NewAbstractResolvedCall
2021-09-27 16:12:17 +03:00
Victor Petukhov
a264cbfe7d
Move CallUtil.kt under the resolve.util package
2021-09-27 16:12:01 +03:00
Victor Petukhov
1635bcad10
Move CallResolverUtil.kt under the resolve.util package
2021-09-27 16:12:00 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilmir Usmanov
91491eef06
Fixup end label of local variable if it is before start label
...
In that case, put end label to next label after start label.
2021-09-20 21:29:58 +00:00
pyos
ade9f5a1e8
JVM: rename a couple ValueKinds to make their purpose clearer
2021-09-20 19:29:44 +02:00
Alexander Udalov
987a346015
JVM IR: support cyclic module dependencies
...
The only way to make the compiler compile several modules with a
dependency loop is via the "build file", given by -Xbuild-file and used
in the JPS (IntelliJ built-in build system) plugin.
For the old frontend/backend it works like this: we _analyze_ sources of
all modules once, as if it's one big module, and then for each module,
we _generate_ (invoke backend) only sources of that module. Backend
needs to be invoked separately per-module because every module has its
own destination directory specified in the build file.
For JVM IR, this separation into just two steps, analyze and generate,
was problematic because there's psi2ir, which works like frontend, in
that it needs the global analysis result to be able to create and link
IR correctly. So, in case of JVM IR, we need to run psi2ir on the whole
module after analysis and before generation.
In this change, psi2ir is run on the whole module via
`CodegenFactory.convertToIr` (which does nothing in the old backend),
and then parts of the resulting IR module are extracted according to the
original separation of the combined module into individual modules via
`getModuleChunkBackendInput` by matching IrFile against KtFile. And
then, backend is run for each such module.
#KT-45915 Fixed
#KT-48668 Fixed
2021-09-17 17:39:49 +02:00
Alexander Udalov
5d6ca27c93
JVM IR: introduce CodegenFactory.convertToIr
...
The steps of psi2ir and JVM backend need to be separated in the API
because in case of cyclic module dependencies (which are allowed in JPS)
psi2ir should be run first on all sources, and then JVM backend on each
module separately. `CodegenFactory.convertToIr` does nothing in the old
backend.
Also, move the ignoreErrors to GenerationState for simplicity.
2021-09-17 17:39:48 +02:00
Ilmir Usmanov
9e4f234941
Minor. Add space after when
...
Co-authored-by: Louis CAD <louis.cognault@gmail.com >
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
755b92b0e9
Document coroutines codegen. Remove mentions of experimental coroutines
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
4d1545d522
More minor changes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
6a150fffe6
Minor spelling changes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
de3ffc4a89
Remove obsolete FIXME
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
0372d9050a
Clarify tail-call optimization for functions returning Unit
...
Review fixes.
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
1cdae75dc3
Document coroutines codegen: debug
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
995062cb19
Document coroutines codegen: callable references
...
returning inline classes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
fce06305b9
Document coroutines codegen: inliner part 3: returning inline classes
...
Update the information, mention, that there are two markers, not just
one
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
7d41451fba
Document coroutines codegen: inliner part 3: minor grammar fixes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
a736d4fef1
Document coroutines codegen: callable references
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
3276ef6cf8
Document coroutines codegen: Returning Inline Classes
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
25af290266
Document coroutines codegen: inliner part 3: crossroutines
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
ddaab2c2bb
Document coroutines codegen: inliner part 2
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
771b0c006f
Document coroutines codegen: inliner part 1
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
e2c5f9d245
Document coroutines codegen: functions
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
a8aac955d9
Document coroutines codegen: split long lines
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
7263b6e5d6
Document coroutines codegen: rest of suspend lambda
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
0814c5cc93
Document coroutines codegen: superclasses
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
bfd0291572
Document coroutines codegen: interception
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
8b604b8ce1
Document coroutines codegen: intrinsics part 2
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
611c1b1a38
Document coroutines codegen: intrinsics
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
0943a31675
Document coroutines codegen: spilling
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
57e69202e8
Document coroutines codegen: resume with exception
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
7e047ac96f
Document coroutines codegen: resume with result
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
355b36ead9
Document coroutines codegen: suspend function views
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
48fb31080e
Document coroutines codegen: CPS
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
307e01e6b6
Document coroutines codegen: suspend markers: JS & Native
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
f7cf5f435f
Document coroutines codegen: suspend markers
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
1d7a661624
Document coroutines codegen: state-machine
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
5fd08b3ee5
Document coroutines codegen: simple lambda example
2021-09-15 22:28:32 +02:00
Ilmir Usmanov
25edda02f4
Document coroutines codegen: introduction
2021-09-15 22:28:32 +02:00