Commit Graph

34524 Commits

Author SHA1 Message Date
Victor Petukhov b5d3f9ee31 Rename CoroutineInferenceSession to BuilderInferenceSession 2021-03-24 15:57:46 +03:00
Victor Petukhov 7a66e22bb2 Implement top-down completion for nested builder inference calls
^KT-42742 Fixed
2021-03-24 15:57:36 +03:00
Vladimir Dolzhenko 8068a5439f Fix handling non ctor elements in SECONDARY_CONSTRUCTOR_DELEGATION_CALL
#KT-45339 Fixed
2021-03-24 12:27:53 +00:00
Vladimir Dolzhenko 3d236b7171 Simplify reportOnElement
Relates to #KT-38959
2021-03-24 12:27:52 +00:00
Dmitriy Novozhilov fae0aa42c4 [FIR] Update testdata broken in de03124f 2021-03-24 14:11:11 +03:00
Ilya Muradyan 14d386223b [REPL] Fix unresolved imports caching
Before this fix, if some imports were not resolved during compilation,
this result had been saved in caches, and this import couldn't been
resolved during following compilations even if it was added to the
module dependencies. This commit adds special handling of resolution
caches for the REPL compiler.
2021-03-24 13:35:33 +03:00
Dmitriy Novozhilov e00e726bcb [FIR] Add test for KT-45584 2021-03-24 12:56:17 +03:00
Dmitriy Novozhilov f4afc2ef44 [FIR] Map dispatch receiver type of function in JvmMappedScope 2021-03-24 12:56:16 +03:00
Dmitriy Novozhilov b0969f626e [FIR] Rename SyntheticPropertySymbol to FirSyntheticPropertySymbol 2021-03-24 12:56:15 +03:00
Dmitriy Novozhilov 714871e4a5 [FIR2IR] Add proper toString to Fir2IrBindableSymbol 2021-03-24 12:56:15 +03:00
Dmitriy Novozhilov 7dc3be3b9b [FIR2IR] Replace star projections with upper bounds for SAM conversion types 2021-03-24 12:56:15 +03:00
Dmitriy Novozhilov 50f2666eba [IR] Properly render type arguments in error messages 2021-03-24 12:56:14 +03:00
Dmitriy Novozhilov de03124f50 [FIR] Fix reporting EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR warning 2021-03-24 12:56:14 +03:00
Dmitriy Novozhilov 3b6d3e5a08 [FIR] Don't record isFromVararg attribute to all properties from constructor 2021-03-24 12:56:13 +03:00
Dmitriy Novozhilov 094287741c [FIR] Add FirSourceElement.text extension for debug purposes 2021-03-24 12:56:13 +03:00
Dmitry Petrov 4f250ed498 JVM_IR KT-45377 rewrite constants again after AddContinuationLowering 2021-03-23 16:05:24 +03:00
Ilya Kirillov 0f2aca3280 FIR: use session symbolProvider from symbol for getting it's file 2021-03-23 13:41:03 +01:00
Alexander Udalov ea01c97a8e Write underlying property name & type for inline class to metadata
This will be used in the compiler starting from 1.5.20 instead of the
currently used approach of looking for the single value parameter of the
primary constructor. The problem with the current approach is that
primary constructor can be private (since 1.4.30) and the property could
always be private. Relying on private declarations from metadata is
dangerous; for example lazy IR doesn't usually create stubs for private
declarations, and it didn't create stubs for private inline class
constructors before b5f9b1df, which led to the problem reported in
KT-44723.
2021-03-23 11:45:22 +01:00
Ilmir Usmanov 886e3e6655 Update tests, which check -X... flag in LauncherScriptTest
Previously, -Xallow-result-return-type was used to test, whether the
launcher parses -X... flags correctly, however, it has no effect -
returning Result is allowed anyway. So, instead, use -Xno-inline and
check runtime behavior.
2021-03-22 23:14:23 +00:00
Alexander Udalov b5f9b1dfc0 JVM IR: support inline classes with private constructors from other modules
#KT-44723 Fixed
2021-03-22 21:57:07 +01:00
Alexander Udalov dac218dc39 Minor, regroup compileKotlinAgainstKotlin tests on inline classes 2021-03-22 21:57:04 +01:00
Ilmir Usmanov 3124a4ddae Minor. Update test data 2021-03-22 17:35:08 +01:00
Mads Ager 571971c5db JVM: Fix local variable ranges in state machine transform.
When a suspension point is inlined, the inlining local spans
unspilling code where the local slot has not been initialized.

The transformer already inserted initialization code for the local,
however, it did not split the local variable table. Therefore,
the inlining local is defined on instructions where the local
slot has no value (namely the instructions that initialize
the local slot on the unspilling path).

This change adds splitting of the local variable table as well.
When updating to a new version of D8, the uninitialized local
slot showed up. D8 will repair it in this case, but it is
better to not generate such code.
2021-03-22 17:35:06 +01:00
Ilmir Usmanov b838ba8c62 Check whether backend is IR instead of distinct ones 2021-03-22 15:08:59 +00:00
Ilmir Usmanov 9c97f1ce35 Allow Result return type and nullability operators on Result type
by default
2021-03-22 14:56:16 +00:00
Br0mm 75e4c74256 [FIR] Add FirConstValWithGetterOrDelegateChecker 2021-03-22 15:05:40 +03:00
Ilya Kirillov 93f711e2b8 FIR: extract initializing of containingClassAttr into fun 2021-03-22 12:30:59 +01:00
Ilya Kirillov 9f0af3faba FIR: fix containigClassAttr for property accessor without body in light tree builder 2021-03-22 12:30:58 +01:00
Ilya Kirillov 801d4a0c77 FIR: initialize containingClassAttr in light tree builder to match RawFirBuilder 2021-03-22 12:30:58 +01:00
Ilya Kirillov dcf64779a9 FIR: add declaration attributes checking to rawFirBuilder/lightTree tests 2021-03-22 12:30:58 +01:00
Ilmir Usmanov 3bcc2fe476 Minor. Add IDE MPP test 2021-03-22 11:13:14 +00:00
Ilmir Usmanov 164e9034d1 IC MPP: Allow expect value classes without @JvmInline
#KT-45525 Fixed
2021-03-22 11:13:13 +00:00
Ilya Kirillov 010f1cb634 FIR IDE: build KtJavaFieldSymbol only for Java fields 2021-03-22 11:27:22 +01:00
scaventz 0dc5ed53f8 Provide sensible toString for getter/setter in reflection. 2021-03-22 11:21:54 +01:00
Igor Yakovlev 25929b50d9 [FIR IDE] RawFirBuilder for lazy bodies 2021-03-21 10:42:29 +01:00
Ilya Goncharov f85ad41674 [IR] Check pureness in inlining lowering after transformation 2021-03-19 21:52:51 +03:00
Ilya Goncharov 8ac8dbdab8 [JS IR] Type operator call pureness 2021-03-19 21:52:51 +03:00
Ilya Goncharov 47d050c420 [JS IR] Correct pureness of expressions for arrayLiteral 2021-03-19 21:52:50 +03:00
Ilya Goncharov f890156dde [JS IR] arrayConcat not use additional slice 2021-03-19 21:52:50 +03:00
Ilya Goncharov 76005813ff [JS IR] Fix for pureness of vararg 2021-03-19 21:52:50 +03:00
Ilya Goncharov 278a8c27fc [JS IR] Not create temporary variable for pure expressions on inline 2021-03-19 21:52:50 +03:00
Ilya Goncharov ece0e200d5 [JS IR] Not nullize external varargs if it is not on the end of call 2021-03-19 21:52:50 +03:00
Ilya Goncharov b8d5712bc0 [JS IR] Not use double slice for external varargs 2021-03-19 21:52:50 +03:00
Ilya Goncharov 120b5b9e05 [JS IR] Move isPure check to backend.common and add platform-specific check on calls with side effects 2021-03-19 21:52:50 +03:00
Ilya Goncharov 7bbb5b77db [JS IR] Concat varargs with non varargs on compile time for function w/o receiver 2021-03-19 21:52:50 +03:00
Ilya Goncharov fc559ab0cd [JS IR] Unite varargs and non varargs before vararg 2021-03-19 21:52:49 +03:00
Dmitry Petrov 9e30ddd12e JVM_IR KT-45581 generate H_INVOKEINTERFACE for interface method handles 2021-03-19 18:57:21 +03:00
Dmitry Petrov 73d4fa65ea JVM_IR KT-45431 don't optimize out $$delegatedProperties in companion
Corresponding delegates are initialized in the host class, using
'$$delegatedProperties'.
TODO figure out proper code generation scheme for delegated properties
in companions (KT-45580)
2021-03-19 18:54:01 +03:00
Dmitry Petrov f6baabd98e JVM_IR KT-45408 rewrite static calls recursively 2021-03-19 18:53:59 +03:00
Alexander Udalov e5f218859b JVM IR: minor, improve error messages for inline classes
It will help in diagnosing problems like KT-44723.
2021-03-19 16:33:42 +01:00