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
Alexander Udalov
e857966edb
JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
...
This feature is enabled by default since 1.4, which is the earliest
language version supported by Kotlin at this moment.
2021-09-14 22:29:12 +02:00
Dmitriy Novozhilov
70e8d23d6b
Fix new warnings in project code
2021-09-12 16:19:33 +03:00
Ivan Kochurkin
8cdb79f969
Move JvmNames, JvmFieldApplicabilityProblem to common.jvm module
2021-09-10 00:49:10 +03:00
Ivan Kochurkin
2baed77598
[FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
...
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Dmitry Petrov
e28d4a1877
JVM_IR allow remapped variables in inplace arguments transformation
2021-09-07 19:46:03 +03:00
Georgy Bronnikov
bf62e98a1a
JVM_IR: protect LookupTracker use by a lock
2021-09-06 23:39:12 +03:00
Alexander Udalov
8cb9a5ff67
Slightly cleanup coroutine codegen and utilities
...
Reformat, fix inspections, remove some minor leftovers after dropping
experimentail coroutines.
2021-09-02 22:11:22 +02:00
Alexander Udalov
0a10cec579
Remove obsolete -X compiler arguments for JVM backend
...
-Xno-exception-on-explicit-equals-for-boxed-null
-Xstrict-java-nullability-assertions
-Xuse-old-spilled-var-type-analysis
-Xpolymorphic-signature
2021-09-02 22:11:22 +02:00
Alexander Udalov
1864716c83
Remove -Xnormalize-constructor-calls
...
Constructor call normalization is enabled by default since 1.3.
2021-09-02 22:11:22 +02:00
Mikhael Bogdanov
cb7a59ea0e
Small optimization
2021-09-01 14:03:57 +00:00
Mikhael Bogdanov
f9b5414453
Calculate string encoding size more precisely
2021-09-01 14:03:56 +00:00
Mikhael Bogdanov
19474ee30f
Support large strings in indy-with-constants concatenation
...
#KT-47917 Fixed
2021-09-01 14:03:56 +00:00
Mikhael Bogdanov
d2d3708827
Refactor a bit StringConcatGenerator class
2021-09-01 14:03:55 +00:00
Dmitry Petrov
1c1b9547c1
JVM_IR KT-48435 use Java-like counter loop when possible
2021-08-31 16:39:25 +03:00