Commit Graph

24111 Commits

Author SHA1 Message Date
Dmitriy Novozhilov aa96a05469 [NI] Fix initial data flow info for analyzing lambdas
#KT-30734 Fixed
2019-04-05 12:52:29 +03:00
Anton Bannykh b7ffdb9fde JS IR: support kotlin.test 2019-04-05 12:30:21 +03:00
Anton Bannykh d04a0246db make smartJavaExec composable with NoDebugJavaExec 2019-04-05 12:30:21 +03:00
Anton Bannykh ad4c2144a7 JS IR: moved klib creation to the serialization_test module 2019-04-05 12:30:20 +03:00
Anton Bannykh 0f183ed662 JS IR: split compilation and deserialization 2019-04-05 12:30:20 +03:00
Anton Bannykh 08785b7cea JS IR: split serialization into a separate module 2019-04-05 12:30:20 +03:00
Anton Bannykh 42f576f033 IR: move serialization to serialization.common 2019-04-05 12:30:20 +03:00
Steven Schäfer 59c5d8bdb8 Add an implicit cast to Unit in returns from a constructor. 2019-04-05 12:05:53 +03:00
Vasily Levchenko 826f55ecb4 Merge pull request #2240 from JetBrains/rr/minamoto/ir-IrFunctionInlineBodyImpl
[IR] introduced additional field 'inlineFunctionSymbol' to IrReturnableBlock
2019-04-05 11:49:08 +03:00
Vasily Levchenko 1ebf7faedc [IR][refactoring] g/c IrReturnableBlock[Impl]
- drop calculatable from 'inlineFunctionSymbol' fields: 'sourceFileSymbol' and 'sourceFileName' and
replace then with extension values

- drop unused constructors.
2019-04-05 11:47:45 +03:00
pyos 05e09df683 Throw a clearer error on unexpected IR nodes in expressions 2019-04-04 21:39:49 +02:00
pyos c3a74ded0e Make isDefaultValueForType shorter 2019-04-04 21:39:47 +02:00
pyos fb55e34b8f Merge generateBreakOrContinueExpression and doFinallyOnReturn 2019-04-04 21:39:46 +02:00
pyos c0af91b6d1 Inline markFunctionLineNumber 2019-04-04 21:11:39 +02:00
pyos 9f28b2042a Move common declarations up 2019-04-04 21:11:37 +02:00
pyos a7dbd08f45 Inline genFinallyBlockOrGoto 2019-04-04 21:11:35 +02:00
pyos 6690e50dd2 Remove direct block stack manipulation 2019-04-04 21:11:33 +02:00
pyos 57450912fb Remove a couple unused classes, inline a short method 2019-04-04 21:11:31 +02:00
Zalim Bashorov 6634d7ab15 [psi2ir] Minor: dynamicWithImplicitCast.kt -> dynamicWithSmartCast.kt 2019-04-04 17:14:04 +03:00
Zalim Bashorov 57a6b53780 [psi2ir] Add tests for implicit casts "to" and "from" dynamic type 2019-04-04 17:14:03 +03:00
Vasily Levchenko 6f9feacf6e [IR] introduced additional field 'inlineFunctionSymbol' to IrReturnableBlock
This change let backend calculate and bind right function to the code block on generation debug information
e.g. for Kotlin/Native backend this let codegnerator to produce DILocation(..., inlinedAt:..) with correct value
for inlinedAt parameter, thus signifiacntly improve behaviour of debugger.
2019-04-04 16:14:34 +03:00
Dmitry Petrov 1c0c01725b Preserve original for constructors of LazySubstitutingClassDescriptor
We would like DeclarationDescriptor.getOriginal() to always point to a
(preferably unique) unsubstituted descriptors for the given possibly
substituted descriptor. In case of LazySubstitutingClassDescriptor
(which can be observed for nested generic Java classes), this invariant
was broken, because 'getOriginal()' for constructors of substituted
class returned a copy created for this particular substituted class.
2019-04-04 14:42:23 +03:00
pyos 4c01614136 Avoid leaking SamConstructorDescriptors from psi2ir 2019-04-04 09:45:00 +02:00
pyos 23d742237f Add tests for merging SAM wrappers and references 2019-04-04 09:45:00 +02:00
pyos e05c151a73 Remove explicit mention of an internal name from a test 2019-04-04 09:45:00 +02:00
pyos ee59530f71 Fix casts of the null constant to SAM types 2019-04-04 09:45:00 +02:00
pyos f47d9d54c0 psi2ir: add test for SAM-conversion of operator arguments 2019-04-04 09:45:00 +02:00
pyos 39c8939241 JVM_IR: optimize SAM conversion of lambda literals
Instead of materializing an invokable object and storing it in an
instance of the implementation, create a specialized class that calls
the lambda directly, resulting in one less nesting layer and one less
class.
2019-04-04 09:45:00 +02:00
pyos b74586f84e JVM_IR: implement single-abstract-method conversions 2019-04-04 09:45:00 +02:00
Mikhail Glukhikh 141e8d553e FIR body resolve: support variable assignments 2019-04-04 10:31:15 +03:00
Mikhail Glukhikh c56b471b71 FIR body resolve: handle constant types more precisely 2019-04-04 10:31:13 +03:00
Mikhail Glukhikh cc2a5cfc06 FIR body resolve: calculate type even for resolved references 2019-04-04 10:31:12 +03:00
Mikhail Glukhikh d7f0392f90 FIR body resolve: fix value parameter expected type 2019-04-04 10:31:11 +03:00
Mikhail Glukhikh 8a6c9a6aec FIR deserializer: read nullability & add constructors 2019-04-04 10:31:09 +03:00
Mikhail Glukhikh 6e9d78d431 FIR structure: make implicit built-in types resolved 2019-04-04 10:31:08 +03:00
Mikhail Glukhikh bf0190d96c FIR structure: reuse StandardClassIds in implicit built-in typeRef 2019-04-04 10:31:07 +03:00
Mikhail Glukhikh b3cf3c6579 FIR structure: include calleeReference into FirDelegatedConstructorCall 2019-04-04 10:31:05 +03:00
Mikhail Glukhikh 63d3100122 FIR structure: FirClassLikeDeclaration is now FirStatement
Done to support (in theory) local type aliases
2019-04-04 10:31:04 +03:00
Mikhail Glukhikh 4213a4c7e2 FIR Java: reuse StandardClassIds 2019-04-04 10:31:02 +03:00
Mikhail Glukhikh a0fa9e6b48 Raw FIR: make component call a function call, its argument -> receiver 2019-04-04 10:31:01 +03:00
Mikhail Glukhikh 30697787a0 Raw FIR: set "implicit boolean" result type for some operator calls 2019-04-04 10:31:00 +03:00
Mikhail Glukhikh eb1aaad41b Raw FIR: generate Unit at the end of empty lambda 2019-04-04 10:30:52 +03:00
Mikhail Glukhikh eb86c9e540 FIR: get rid of ANDAND / OROR by replacing with when 2019-04-04 10:30:49 +03:00
Mikhail Glukhikh 395651a21e Raw FIR: swap branches in when for elvis and bang-bang 2019-04-04 10:30:48 +03:00
Mikhail Glukhikh f77ba2dd3e Raw FIR: make object/sealed/enum constructor visibility private 2019-04-04 10:30:47 +03:00
Mikhail Glukhikh 057156f323 Raw FIR builder: cleanup code 2019-04-04 10:30:45 +03:00
Mikhail Glukhikh 33729aaf9b Raw FIR: add Any/Enum/Annotation to supertypes iff no supertypes exists 2019-04-04 10:30:44 +03:00
Mikhail Glukhikh 7dd89a48f0 Raw FIR: introduce FirConstructor.isPrimary 2019-04-04 10:30:43 +03:00
Mikhail Glukhikh 61c2e4e590 Raw FIR: handle local visibility for functions & classes 2019-04-04 10:30:41 +03:00
Mikhail Glukhikh 4187ea1f86 Raw FIR: add initializers to primary constructor properties 2019-04-04 10:30:40 +03:00