Commit Graph

6 Commits

Author SHA1 Message Date
Dmitry Petrov ba933fa887 KT-15112, KT-15631
Revert changes for "tolerant to uninitialized values" in OptimizationBasicInterpreter:
this approach doesn't converge for some specific cases where local variable is reused
(e.g., in several inlined functions - see https://youtrack.jetbrains.com/issue/KT-15112).

Instead, treat fake always-false conditional jump in the beginning of the post-condition loop as a "reference point" for stack on loop break / continue.
This requires an extra abstraction layer in FixStackAnalyzer, since we can't perform fine-grain manipulations on Frames
(such as "combine frame C from local variables of frame A and stack of frame B").

NB additional NOPs will be generated for post-condition loops.
Should make a separate bytecode postprocessing pass to get rid of unnecessary NOPs
(several YT issues for perceived quality of the generated bytecode are about such NOPs).
2017-01-13 10:31:07 +03:00
Yan Zhulanow 5844f3cf1b Kapt3: Write stub class files with metadata (needed for incremental compilation) 2016-12-28 22:28:30 +03:00
Alexander Udalov 5402d50ea3 Light analysis tests: do not render empty lines between classes and in the beginning 2016-12-23 22:30:48 +03:00
Yan Zhulanow fcafaf5500 Update LightAnalysisModeCodegenTests for Kotlin 1.1 2016-12-05 20:10:32 +03:00
Yan Zhulanow 75aaf6e797 Minor: Update tests for light analysis mode (rebase) 2016-12-05 19:58:02 +03:00
Yan Zhulanow 328286ab14 Use box tests to check if the light analysis mode (without analyzing bodies when possible) produces the same result as the complete analysis. See also the next commit in which light analysis mode is applied. Note that no tests were changed. 2016-12-05 19:57:47 +03:00