Commit Graph

5664 Commits

Author SHA1 Message Date
Ilmir Usmanov 486c6b3c15 Remove obsolete experimental coroutines support
in compiler.
2021-08-13 22:31:30 +02:00
Ilmir Usmanov ebb340fe68 Do not just merge consequent LVT ranges, but also extend them 2021-08-13 23:12:10 +03:00
Dmitry Petrov 55663a0fb1 JVM_IR KT-47984 allow only limited list of GETSTATICs in arg loading 2021-08-13 18:08:54 +03:00
Dmitry Petrov edd2ca775b JVM_IR KT-47984 use stack size calculator from ASM 2021-08-13 18:08:52 +03:00
Dmitry Petrov 5096e8c5c4 JVM_IR KT-47984 transform inplace arguments before inlining 2021-08-13 18:08:49 +03:00
Dmitry Petrov 9be941def2 JVM_IR KT-47984 don't move inplace arguments with suspension points 2021-08-13 18:08:47 +03:00
Dmitry Petrov 9acdcc7590 JVM_IR KT-47984 minor cleanup 2021-08-13 18:08:47 +03:00
Dmitry Petrov bf362abb57 JVM_IR KT-47984 update LVT entries for transformed instructions 2021-08-13 18:08:46 +03:00
Dmitry Petrov 6b18f33f92 JVM_IR KT-47984 don't transform calls with non-local jumps in arguments 2021-08-13 18:08:45 +03:00
Dmitry Petrov b01c13a4df JVM_IR KT-47984 inplace arguments inlining for @InlineOnly functions 2021-08-13 18:08:44 +03:00
Tianyu Geng 684ef871ee FIR: unify common special names scattered around the code base 2021-08-06 22:57:17 +03:00
Dmitry Petrov bd71fbe982 JVM_IR KT-34594 strip fake variable initialization during inlining 2021-08-03 20:41:31 +03:00
Ilmir Usmanov cbe0de6111 Extend local variable ranges
when it is safe. Otherwise, they will not be visible in
debugger as soon as they become dead.
 #KT-47749 Fixed
2021-08-03 08:00:51 +00:00
Dmitriy Novozhilov 199ec60742 [JVM] Reduce number of param slots for string concatenation
With paramSlot = 200 those tests fails on JDKs which are newer than JDK 9
- testConcatDynamic200Long
- testConcatDynamicIndy200Long()
2021-08-01 22:23:48 +03:00
Dmitry Petrov ebf837c135 JVM_IR disable IR and bytecode validation by default 2021-07-30 20:21:41 +03:00
Mikhael Bogdanov a919aab3ab Update metadata related logic after switch to 1.6 2021-07-29 19:45:53 +02:00
Dmitry Petrov ce79fc77c9 JVM minor cleanup in bytecode analyzers 2021-07-28 19:53:39 +03:00
Dmitry Petrov 4267852030 JVM cleanup bytecode analyzers 2021-07-28 08:04:55 +03:00
Mads Ager c0f5d09759 Copy locals in addition to instructions when inlining finally blocks
^KT-46448 Fixed
2021-07-23 09:11:48 +02:00
Dmitry Petrov 6c734289be JVM skip methods without NEW insns in UninitializedStoresProcessor 2021-07-22 21:29:41 +03:00
Dmitry Petrov eff7c375ce Minor HackedFixStackMethodAnalyzerBase -> FastStackAnalyzer 2021-07-22 21:29:41 +03:00
Dmitry Petrov aef9701661 JVM use new stack state analyzer in non-local returns preprocessing 2021-07-22 21:29:40 +03:00
Dmitry Petrov cf2b4dd277 JVM don't use SPBs in FixStack method analyzer (we don't merge) 2021-07-22 21:29:40 +03:00
Dmitry Petrov ca84aa4f2c JVM don't optimize if there are too many data on exception edges 2021-07-22 21:29:39 +03:00
Dmitry Petrov c1a5ce6e61 JVM skip redundant boxing optimization in methods without boxing 2021-07-22 21:29:38 +03:00
Alexander Udalov 9ebd665c96 Report error on annotated type inside typeOf on JVM
Since it's not feasible to support annotated types in 1.6, we're making
this an explicit error in 1.6, so that typeOf can become stable and this
feature can be supported in the future without breaking changes to the
existing code.

Note that extension function types are a special case of annotated
types. A separate error is created for them just because the message
"annotated types are not supported" would be confusing, since such types
don't have explicit annotations in the source code.

 #KT-29919
2021-07-22 15:54:48 +02:00
Dmitry Petrov 46d2e52543 JVM Minor: move uninitialized value check to stack recovery 2021-07-20 19:51:04 +03:00
Dmitry Petrov e72d24960d JVM we don't merge frames in stack normalization 2021-07-20 19:51:03 +03:00
Dmitry Petrov 91afa3335c JVM represent uninitialized values explicitly in stack normalization 2021-07-20 19:51:02 +03:00
Dmitry Petrov 35b4a9d4cc JVM treat all variable loads as "initialized" in stack normalization 2021-07-20 19:51:00 +03:00
Dmitry Petrov c8b705fd2d JVM update license for HackedFixStackMethodAnalyzerBase.kt 2021-07-20 19:50:59 +03:00
Dmitry Petrov 8763235053 JVM specially hacked method analyzer for FixStack 2021-07-20 19:50:58 +03:00
Dmitry Petrov 3ecd612ce7 JVM FixStackValue & FixStackInterpreter 2021-07-20 19:50:57 +03:00
Dmitriy Novozhilov 85c7f386eb Add Kotlin 1.7 language version 2021-07-20 13:33:41 +03:00
Ilmir Usmanov e870a200c4 Merge consequent LVT records
that is, if LVT record starts where previous one ends, merge them.
 #KT-47749 Fixed
2021-07-19 22:07:16 +00:00
Ilmir Usmanov 5ae01c8b2a Do not duplicate $result in LVT
#KT-47749
2021-07-19 22:07:16 +00:00
Ilmir Usmanov b4d356c5bd Split LVT record for known nulls
Since they are not spilled, the logic for splitting LVT records, that
is applied for spilled variables, was not applied for known nulls.
Fix that by applying the logic to them.
 #KT-47749
2021-07-19 22:07:15 +00:00
Mads Ager 83dddd73b0 Always add a local variable for its live ranges.
There used to be code that extended a previous range instead.
However, that does not work as that extension could have the
local cover code where it does not exists. Since we no longer
extend the range of locals, we should always introduce a new
one even if there was another one for a previous range.
2021-07-19 22:07:14 +00:00
Dmitry Petrov e276dec4de JVM don't merge local values in FixStackAnalyzer
We care only about stacks there.
This yields about 10-15% in a pathological case such as KT-41510.
2021-07-19 19:24:57 +03:00
Dmitry Petrov b98322c1b4 JVM don't optimize methods with too many TCBs 2021-07-15 20:18:18 +03:00
Dmitry Petrov d65d66c03a JVM reserve 2 slots for node predecessors/successors in CFG 2021-07-15 20:18:15 +03:00
Dmitry Petrov 6c2d93bb8b JVM traverse nodes in reverse order in 'findSafelyReachableReturns' 2021-07-15 20:18:13 +03:00
Mikhail Glukhikh 113d2653aa Drop deprecated -Xexperimental flag from compiler and tests 2021-07-14 21:18:23 +03:00
pyos 07cb3a5ff8 JVM: do not reify methods of objects in lambdas
All type parameters used in them are not from the inline function
anyway.
2021-07-14 10:11:05 +02:00
pyos 717cf2066a JVM: remove more redundant properties from LambdaInfo 2021-07-14 10:11:05 +02:00
pyos c1c56ca388 JVM: refactor extraction of default inline lambdas a bit more 2021-07-14 10:11:05 +02:00
pyos 91cf1a1a4d JVM: remove a redundant DefaultLambda field
and add a comment explaining one branch of the inliner... Better than
nothing, I guess?
2021-07-14 10:11:05 +02:00
pyos 100d2d629c JVM: inline default lambda coercions from bridge invoke
The type of the default lambda may be a subtype of the parameter type,
so we can't really generate our own coercions at all as we don't know
the precise Kotlin type of the `invoke` method.
2021-07-14 10:11:05 +02:00
pyos d0b9c4ae6b JVM: generalize getMethodNode
to allow matching by arbitrary predicates.
2021-07-14 10:11:05 +02:00
pyos 664bb055c8 JVM_IR: support codegen of property delegate methods
The purpose of a property-related method is now determined by its
origin; codegen no longer assumes all methods with Property metadata
source are `getX$annotations`.
2021-07-12 22:38:43 +02:00