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
Abduqodiri Qurbonzoda
fdd9287836
Get rid of platform differences in Regex.split() doc
2021-06-08 00:32:33 +00:00
Abduqodiri Qurbonzoda
0b521b5183
Get rid of platform differences in Regex.findAll() doc
2021-06-08 00:32:32 +00:00
Abduqodiri Qurbonzoda
53b6c25533
Get rid of platform differences in Grouping<T, K>.eachCount() doc
2021-06-08 00:32:31 +00:00
Abduqodiri Qurbonzoda
91d1baf3b5
Get rid of platform differences in Array.orEmpty() doc
2021-06-08 00:32:30 +00:00
Abduqodiri Qurbonzoda
cc3c33b8ae
Get rid of platform differences in Collection<T>.toTypedArray() doc
2021-06-08 00:32:29 +00:00
Abduqodiri Qurbonzoda
c64592665b
Get rid of platform differences in MutableList.sortWith() doc
2021-06-08 00:32:29 +00:00
Abduqodiri Qurbonzoda
a9946b01e6
Get rid of platform differences in MutableList.sort() doc
2021-06-08 00:32:28 +00:00
Abduqodiri Qurbonzoda
225be54c61
Get rid of platform differences in Regex.find doc
2021-06-08 00:32:27 +00:00
Abduqodiri Qurbonzoda
7fdd1154ee
Add default value for K/N actual functions #KT-46183
2021-06-08 00:32:26 +00:00
konrad.sztenderski
e338c5651b
Expose some methods and properties related to Cocoapods dependencies to access them in Apple gradle plugin
2021-06-07 21:28:07 +02: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
Elena Lepilkina
97a38ba0a9
[K/N] Added benchmarks for KT-46482 and KT-46425
2021-06-07 14:35:32 +00:00
Ilya Kirillov
74567f4b02
FIR IDE: restore fir ide spec tests with shorten test class name to make TC happy
...
Otherwise, TC will complain about too long fq test method names
2021-06-07 16:48:56 +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
Ivan Kylchik
b3fa7b25cf
Optimize Utils.kt by removing unused functions
2021-06-07 15:35:02 +03:00
Ivan Kylchik
877832ef8c
Optimize some methods of CallStack and Frame
2021-06-07 15:35:01 +03:00
Ivan Kylchik
e0438d1123
Implement better workflow of interpretation with callable reference
2021-06-07 15:34:59 +03:00
Ivan Kylchik
9a8e0f3fb3
Add new builtins methods for some interfaces into IrBuiltInsMapGenerated
...
This change allow us to skip looking for override when evaluate call
for some primitive.
2021-06-07 15:34:58 +03:00
Ivan Kylchik
b4463b948c
Rewrite unfoldValueParameters to take into account recursive calls
...
The workflow of evaluation value arguments is now like this:
1. Calculate not null arguments
2. Add them into intermediate stack
3. Calculate defaults for those parameters that have no argument
This flow allow us to avoid early addition of variable onto stack.
2021-06-07 15:34:57 +03:00
Ivan Kylchik
6411d09579
Rewrite wrap function to take into account function name
...
This is needed to understand whenever arrays must be unwrapped or not.
For now, in case of kotlin.Array.set and kotlin.Pair.<init> calls it is
considered to remain arrays as Primitive class to save their irType
info.
2021-06-07 15:34:55 +03:00
Ivan Kylchik
04b36ff19e
Make interpreted functions implicitly return Unit as result
2021-06-07 15:34:54 +03:00
Ivan Kylchik
0e8ca12499
Add callback to methods of CallInterceptor to specify default behaviour
2021-06-07 15:34:53 +03:00
Ivan Kylchik
285929ad07
Add new intercept method in CallInterceptor for proxy
2021-06-07 15:34:52 +03:00
Ivan Kylchik
25d01099d8
Add CallInterceptor interface and implement its default realization
...
CallInterceptor will handle calls, constructor calls, getting enum
entries and objects. It will make a decision for interpreter: this call
must be handled as intrinsic or it must be interpreted.
2021-06-07 15:34:50 +03:00
Ivan Kylchik
c8b268a789
Refactor entire IrInterpreter to achieve better code quality
2021-06-07 15:34:49 +03:00
Ivan Kylchik
3294af5e49
Get correct irClass from class reference in case of reified parameter
2021-06-07 15:34:47 +03:00
Ivan Kylchik
fe99b235d3
Implement more precise control flow in ir interpreter
...
"More precise" in terms of the number of passing tests.
In this case ControlStructures test block was used.
2021-06-07 15:34:46 +03:00
Ivan Kylchik
c3ad319c13
Implement correct processing for receivers of IrFunctionReference
2021-06-07 15:34:44 +03:00
Ivan Kylchik
a73173e480
Fix interpretation of arguments with default value
2021-06-07 15:34:43 +03:00
Ivan Kylchik
38f4e6e8bf
Implement interpretation of assert method
2021-06-07 15:34:42 +03:00
Ivan Kylchik
8617809528
Rename expression value parameter to declaration
2021-06-07 15:34:40 +03:00