Commit Graph

35688 Commits

Author SHA1 Message Date
Mikhail Glukhikh c33608e009 FIR: don't render resolved type annotations in favor of attributes 2021-06-09 15:42:43 +03:00
Mikhail Glukhikh 06379ec587 FIR: handle varargs properly during annotation serialization 2021-06-09 15:42:42 +03:00
Mikhail Glukhikh da671eedc9 FIR: avoid CCE in constants during annotation serialization 2021-06-09 15:42:41 +03:00
Mikhail Glukhikh 3127fad23d FIR: more precise annotation argument serialization 2021-06-09 15:42:39 +03:00
Mikhail Glukhikh 491267b4f7 FIR2IR: convert annotations on local variables 2021-06-09 15:42:38 +03:00
Mikhail Glukhikh 77dd0ad396 FIR: handle custom attributes more precise 2021-06-09 15:42:37 +03:00
Mikhail Glukhikh 4f70f47fa6 FIR2IR: convert annotations on type parameters #KT-46967 Fixed 2021-06-09 15:42:36 +03:00
Andrey Zinovyev ddc9c1bd1b [FIR] Fix extension property reference resolution
On type with star projection
#KT-44372 Fixed
2021-06-09 15:15:28 +03:00
Mikhail Glukhikh 2b4ea8e6e7 Add forgotten test data 2021-06-09 14:59:57 +03:00
pyos ade8b0a7d3 JVM_IR: box bound receiver before calling the reference constructor
This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
2021-06-09 14:36:07 +03:00
nataliya.valtman 117c99aee6 send build stat to ES 2021-06-09 13:25:10 +03:00
Andrey Zinovyev 972cd9e9e7 [FIR] Fix PACKAGE_CANNOT_BE_IMPORTED diagnostic
Don't report it when there is a function/property with the same name as
package
2021-06-09 09:02:49 +03:00
Denis.Zharkov 2653565f56 FIR: Support exhaustive whens on subjects of intersection type 2021-06-08 18:59:48 +03:00
Elena Lepilkina 2cb3a20733 [K/N] Added functions for set/get array operatorswithout bounds check 2021-06-08 11:59:56 +00:00
Dmitriy Novozhilov 773fc25587 Fix compilation after 3572a96b 2021-06-08 12:16:03 +03:00
Mikhail Glukhikh 0e63484738 Fix OptIn marker usages in code according to new limitation 2021-06-08 11:37:35 +03:00
Mikhail Glukhikh 63bc3f9708 Forbid experimental markers on various targets #KT-45845 Fixed
In this commit we forbid experimental markers on:
- local variables
- value parameters
- fields, including delegate fields
- property getters
2021-06-08 11:37:34 +03:00
Mikhail Glukhikh eb9c658c1c OptIn: handle usages via type aliases properly 2021-06-08 11:37:33 +03:00
Mikhail Glukhikh b4ee116de7 Experimental checkers: simplify visiting code a bit 2021-06-08 11:37:32 +03:00
Mikhail Glukhikh 702d839c66 Forbid TYPE and TYPE_PARAMETER as possible OptIn targets 2021-06-08 11:37:31 +03:00
Mikhail Glukhikh 603afe89a2 Forbid using experimental markers on override declarations
#KT-45844 Fixed
2021-06-08 11:37:30 +03:00
Mikhail Glukhikh bb9efab3c4 Forbid experimental markers on getter #KT-45845 Fixed 2021-06-08 11:37:29 +03:00
Mikhail Glukhikh 0a670bf055 Report EXPERIMENTAL_API diagnostics on various implicit usages
#KT-32443 Fixed
#KT-22852 Fixed
2021-06-08 11:37:28 +03:00
Mikhail Glukhikh d8d38862d9 Introduce EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION diagnostic
#KT-22941 Fixed
2021-06-08 11:37:27 +03:00
Mikhail Glukhikh 7393465696 Don't report EXPERIMENTAL_OVERRIDE_ERROR on annotated local functions
#KT-31728 Fixed
2021-06-08 11:37:26 +03:00
Mikhail Glukhikh cb232725f0 FoldConstantLowering: drop unnecessary experimental annotation 2021-06-08 11:37:25 +03:00
Mikhail Glukhikh fa307a5f75 Drop LocalCallableIdConstructor OptIn-annotation 2021-06-08 11:37:24 +03:00
Andrey Zinovyev 3572a96bb9 [FIR] Lookup in local sources in default imports based on the flag
Reuse ALLOW_KOTLIN_PACKAGE for that
2021-06-08 08:23:25 +00:00
Andrey Zinovyev 3eeddf7077 [FIR] Use member scope to look up function/property by name 2021-06-08 08:18:57 +00:00
Andrey Zinovyev c507d1c938 [FIR] Implement OPERATOR_RENAMED_ON_IMPORT diagnostic 2021-06-08 08:18:56 +00:00
Andrey Zinovyev 7c669b65c3 [FIR] Implement CONFLICTING_IMPORT diagnostic 2021-06-08 08:18:55 +00:00
Andrey Zinovyev 14789cb9e5 [FIR] Implement CANNOT_BE_IMPORTED diagnostic 2021-06-08 08:18:54 +00:00
Andrey Zinovyev bf153ab0f0 [FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic 2021-06-08 08:18:54 +00:00
Dmitry Petrov 81b09ca09f KT-46267 JVM_IR don't generate unnecessary ATHROW in lateinit var read 2021-06-07 20:02:24 +03:00
Simon Ogorodnik d3453e98b0 FIR Tests: Add async-profiler per-pass sampling to full pipeline 2021-06-07 19:43:28 +03:00
Simon Ogorodnik 718e9c11f5 FIR Tests: Fix FirMetaModularizedTest to run properly on Windows 2021-06-07 19:43:10 +03:00
Ivan Kylchik cc169613c1 Drop result of finally block after interpretation
This change is needed due to using FIR as frontend for tests. In this
case finally block doesn't has coercion to unit so it's result must
be dropped manually.
2021-06-07 15:35:20 +03:00
Ivan Kylchik 61d65436f4 Fix interpreter files provider to make tests work on windows 2021-06-07 15:35:19 +03:00
Ivan Kylchik 5596e1e1e1 Properly support char and boolean arrays in interpreter
For now boolean array will expect proper Boolean instead of any value.
This change just unify logic of working with primitive arrays.
2021-06-07 15:35:18 +03:00
Ivan Kylchik 25989b36c5 Allow to create object in interpreter only if it is compile time 2021-06-07 15:35:16 +03:00
Ivan Kylchik 6e12cee626 Extract common checker logic into accessesTopLevelOrObjectField 2021-06-07 15:35:15 +03:00
Ivan Kylchik 49d8bd5845 Remove unnecessary property message from interpreter exceptions 2021-06-07 15:35:14 +03:00
Ivan Kylchik e28ab45c51 Add ir interpreter tests 2021-06-07 15:35:12 +03:00
Ivan Kylchik cc2d7340dc Implement simple test system to check ir interpreter correctness 2021-06-07 15:35:11 +03:00
Ivan Kylchik 3b250132d0 Put all logic of working with expect/actual declarations inside Wrapper
For now decision of how to work with class or function is made by their
signatures.
2021-06-07 15:35:09 +03:00
Ivan Kylchik 0cc866a2fb Support Enum class as intrinsic in ir interpreter
Methods of Enum class don't have bodies, so must be treated as
intrinsics
2021-06-07 15:35:08 +03:00
Ivan Kylchik e5617ede7e Add Throwable class into interpreter builtins map
Methods of Throwable class doesn't have bodies using FIR, so they must
be handled as builtins
2021-06-07 15:35:07 +03:00
Ivan Kylchik 8234c9cec1 Add toString function with nullable receiver into builtins map
On JVM we don't have body for this function, so we must process it as
intrinsic or builtin
2021-06-07 15:35:06 +03:00
Ivan Kylchik 7882fdf232 Simplify logic of checking that IrGetField can be interpreted 2021-06-07 15:35:04 +03:00
Ivan Kylchik ca1932b3a5 Set proper fir type for deserialized annotation's arguments 2021-06-07 15:35:03 +03:00