Commit Graph

10 Commits

Author SHA1 Message Date
Dmitry Petrov b669de1663 JVM_IR generate range-based loop closer to Java counter loop
KT-48435 KT-48507
2021-09-03 10:38:20 +03:00
Dmitry Petrov f4a1e27124 JVM optimize unneeded temporary vals 2021-08-24 18:56:20 +03:00
Dmitry Petrov d8f6d82411 JVM don't optimize temporary vals in old back-end 2021-08-24 18:56:19 +03:00
Dmitry Petrov dcbc2ea2b3 JVM infer temporary vals from bytecode 2021-08-24 18:56:13 +03:00
pyos 06c00f4d9e Unmute some JVM_IR inlining tests 2019-10-08 17:19:41 +02:00
Mads Ager 3a11322506 Enable bytecode text tests for the JVM_IR backend. 2018-12-21 16:20:45 +01:00
Dmitry Petrov e71090ae4c Spill stack for inline functions only if it's required
Stack should be spilled before inline function call and restored after
call only if one of the following conditions is met:
- inline function is a suspend function
- inline function has try-catch blocks
- inline function has loops (backward jumps)

Note that there're quite some "simple" inline functions in Kotlin stdlib
besides run/let/with/apply. For example, many string operations are
implemented as inline wrappers over Java method calls.
2017-10-10 08:49:19 +03:00
Dmitry Petrov 3502c393fc Drop package facades: JVM BE tests passed. 2015-10-19 16:03:16 +03:00
Natalia Ukhorskaya 9168572b8c Write local variable for inline function and inline argument 2015-10-17 17:02:55 +03:00
Denis Zharkov f1d9d11590 Store stack values before inlines. #KT-5634 Fixed
Inlining code violates JIT assumptions for OSR in Java 8 in case of
starting with non-empty and containing cycles.

Fix is to mark each inlined block with markers and then store/restore
stack state before and after inlined body.
2014-09-29 17:16:58 +04:00