Commit Graph

26323 Commits

Author SHA1 Message Date
Mark Punzalan 277cb39e3b Add new tests for step progressions and fix existing tests. 2019-10-28 15:26:38 +01:00
Mark Punzalan 27642514b1 Move ForLoopsLowering before JvmStringConcatenationLowering.
ForLoopsLowering may produce IrStringConcatenations which should be
eliminated before codegen.
2019-10-28 15:26:38 +01:00
Mark Punzalan 8a4185202f Handle step progressions in ForLoopsLowering. 2019-10-28 15:26:38 +01:00
Denis Zharkov ea43d2880c FIR: Update FIR2IR test data changed because of callable references
^KT-32725 Fixed
2019-10-28 17:07:26 +03:00
Denis Zharkov 9ac0ac50ea FIR: Support callable references to vars
^KT-32725 In Progress
2019-10-28 17:07:25 +03:00
Denis Zharkov 4233cf1bd6 FIR: Get rid of the cycle in delegated properties resolution
^KT-32725 In Progress
2019-10-28 17:07:23 +03:00
Denis Zharkov f97f06a99a FIR: Support callable references for constructors
^KT-32725 In Progress
2019-10-28 17:07:22 +03:00
Denis Zharkov 1e0105d40e FIR: Fix initialization pieces for callable references after rebase
^KT-32725 In Progress
2019-10-28 17:07:21 +03:00
Denis Zharkov 7ae3eda37f FIR: Rename FirResolvedRealCallableReference -> FirResolvedCallableReference
^KT-32725 In Progress
2019-10-28 17:07:19 +03:00
Denis Zharkov 1564e72b59 FIR: Rename FirResolvedCallableReference -> FirResolvedNamedReference
^KT-32725 In Progress
2019-10-28 17:07:18 +03:00
Denis Zharkov 5e322a2dd9 FIR: Refactor ResolvedCallableReferenceAtom
^KT-32725 In Progress
2019-10-28 17:07:16 +03:00
Denis Zharkov fe8cd195aa FIR: Support callable references outside of the calls
^KT-32725 In Progress
2019-10-28 17:07:15 +03:00
Denis Zharkov 152236d84a FIR: Support callable references to declarations with implicit types
^KT-32725 In Progress
2019-10-28 17:07:14 +03:00
Denis Zharkov af72cea8b3 FIR: Add simple test on SAM conversion for callable receivers
^KT-32725 In Progress
2019-10-28 17:07:12 +03:00
Denis Zharkov 7feb1aecfe FIR: Add constraints for extension receiver of callable reference
^KT-32725 In Progress
2019-10-28 17:07:11 +03:00
Denis Zharkov 74b9ba1613 FIR: Support callable references to properties
^KT-32725 In Progress
2019-10-28 17:07:10 +03:00
Denis Zharkov 38ab6521aa FIR: Support static methods in callable references
^KT-32725 In Progress
2019-10-28 17:07:09 +03:00
Denis Zharkov 937ea3d8a0 FIR: Support postponed callable references resolution
^KT-32725 In Progress
2019-10-28 17:07:08 +03:00
Denis Zharkov cb50ea2707 FIR: Resolve callable references separately for each outer candidate
^KT-32725 In Progress
2019-10-28 17:07:02 +03:00
Denis Zharkov 03a9bfbea5 FIR: Provide Candidate receiver to argument resolution helpers
The receiver might be useful for working with postponed atoms
and other info from the Candidate

^KT-32725 In Progress
2019-10-28 17:04:53 +03:00
Denis Zharkov 006e475a99 FIR: Support callable references partially
^KT-32725 In Progress
2019-10-28 17:04:48 +03:00
Denis Zharkov cdb2bb2b45 FIR: Prepare tree for callable references resolution
^KT-32725 In Progress
2019-10-28 17:04:44 +03:00
Denis Zharkov aeceee5af0 FIR: Fix StoreReceiver transformer
^KT-32725 In Progress
2019-10-28 17:04:39 +03:00
Denis Zharkov e359791ab4 Minor. FIR: Simplify createFunctionalType
^KT-32725 In Progress
2019-10-28 17:04:29 +03:00
Nikolay Krasko 01d3b8d9c4 Store mute tests database in the code instead of build server 2019-10-28 14:06:06 +03:00
Igor Chevdar 7b0f03cc1c [IR] Made IR validator weaker during validating IrConstNull 2019-10-28 12:39:29 +03:00
Igor Chevdar f413da3e58 Turned off test for native
It fixes current JVM BE behavior but seems like this should've been a FE error.
2019-10-28 12:38:19 +03:00
Georgy Bronnikov b63f9176a3 JVM_IR: repair overriddenSymbols in InterfaceDelegationLowering
When creating delegation redirectors for default implementations of
interface functions, `overriddenSymbols` should be repaired across the
whole module, not just a particular file.
2019-10-28 12:12:32 +03:00
Mads Ager 88dd8f663c JVM_IR: Do not generate null checks for suspend function views.
The arguments are null whenever the suspend function is resumed
and takes its state from the continuation parameter.
2019-10-27 07:37:15 +03:00
Vladimir Dolzhenko 03c7f4bf00 Wrap KtClassOrObject.isLocal, KtFile.isScript with runReadAction in LightClasses
#EA-211576 Fixed

(cherry picked from commit 75a59d4bced714af51abd7e354bc873313b28051)
2019-10-26 21:10:38 +02:00
Vladimir Dolzhenko 00055fc20a Wrap KtClassOrObject.isLocal, KtFile.isScript with runReadAction in LightClasses
#EA-211576 Fixed

(cherry picked from commit 75a59d4bced714af51abd7e354bc873313b28051)
2019-10-26 09:42:49 +02:00
Vladimir Dolzhenko 96768cbf2d Clean up after acquire lock for several seconds to create LightClasses to workaround dead-lock over resolve
Relates to #KT-34279
2019-10-25 22:05:28 +02:00
Alexander Udalov dac0fc7397 Remove obsolete assertion in ExpressionCodegen
With the mangling added in 488418d960, there's no longer any risk in
writing "special" function name ("<anonymous>" in this case) to the
local variable table.

 #KT-34356 Fixed
2019-10-25 19:31:20 +02:00
Alexander Udalov f248e4a2ee Update CLI test data and Gradle option descriptions 2019-10-25 19:26:20 +02:00
Pavel Semyonov c6f54b6412 Improve descriptions of compiler options 2019-10-25 19:26:19 +02:00
Pavel Kirpichenkov 87b88a738e [Minor] Update test data for NI 2019-10-25 19:37:06 +03:00
Mikhail Zarechenskiy 588218658c [NI] Fix ambiguity for extension functions with exact transient receiver 2019-10-25 16:28:40 +03:00
Steven Schäfer 210c354ae5 Fir2Ir: Set initializers for temporary variables 2019-10-25 14:27:19 +03:00
Pavel Kirpichenkov c21e699783 Fix default type of static classes inside parametrized parents
Default type of LazySubstitutingClassDescriptor is not lazy. However, most of default types are,
and there is an optimization in KotlinTypeFactory, which uses default type for simple type without
type arguments and/or annotations. LazySubstitutingClassDescriptor's default type creates simple type
with factory, which may therefore cause recursion.

#KT-34029 Fixed
2019-10-25 11:59:27 +03:00
Mads Ager 52febbcc07 [JVM_IR] Support default interface suspend functions.
Do this by reordering the lowerings so that the lowering that
adds continuations happen after default methods have been
eliminated if needed.

Mark more functions as known to be tail-calls: bridges and
delegated members.

Preserve source info and annotations when creating replacement
functions.
2019-10-24 18:51:41 +03:00
Vladimir Dolzhenko d16a1b14d8 Acquire lock for several seconds to create LightClasses to workaround dead-lock over resolve
Relates to #KT-34279
2019-10-24 17:32:36 +02:00
Kristoffer Andersen 8af3b3e51e [Backend] Reorganize version 1.0 codegen tests
- Extract all backend codegen tests that specifically target behaviour
  in to-be-deprecated functionality from language versions < 1.3"
- Remove those tests from the JVM IR test suite.
2019-10-24 16:51:19 +02:00
Kevin Bierhoff 5c9cbf7e77 allow relative friend paths matching relative classpaths 2019-10-24 14:56:46 +02:00
Yan Zhulanow fa45122c6b Minor: Fix warnings in KtCodeFragment 2019-10-24 21:33:00 +09:00
Mikhail Glukhikh 5e2b594638 FirBodyResolveTransformerAdapters: optimize imports 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh e14b63dfe1 FIR Java enhancement: get rid of FirAnnotationCall.resolvedFqName 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh be6100527b FIR Java enhancement: fix JVM signature generation for type parameters 2019-10-24 13:04:27 +03:00
Mikhail Glukhikh 47cf7373af Add extra tests for FIR J/K type mapping 2019-10-24 13:04:26 +03:00
Mikhail Glukhikh dc657dfda5 FIR Java refactoring: calculate JVM signatures directly by Java types 2019-10-24 13:04:26 +03:00
Vladimir Dolzhenko 6250f1a042 Detects main method with argument Array<String?> 2019-10-24 11:06:13 +02:00