Ivan Kylchik
bc9b2fd78b
Uncomment some test cases in reflection test data for interpreter
2021-08-13 16:18:29 +03:00
Ivan Kylchik
23b315446f
Support sam conversion in ir interpreter
2021-08-13 16:18:28 +03:00
Ivan Kylchik
4f15bd4817
Introduce a workaround in interpreter tests to make them pass
...
There is a problem with ranges and iterators. To work properly
they must be resolved firstly, before operator rangeTo.
2021-08-06 13:33:33 +03:00
Ivan Kylchik
6482abc602
Add CompileTimeCalculation annotation as helper to interpreter's tests
2021-08-06 13:33:25 +03:00
Ivan Kylchik
fe74dd2689
Mute failing tests for IrInterpreterAfterPsi2IrTestGenerated
...
These tests are not passing because of the way how test system works.
To works properly interpreter needs source files. For now they are
passed as additional source files, but this method is not working
for old frontend, some conflicts appear in symbol table. Best way to
fix it is to wait until ir serialization.
2021-08-06 13:33:23 +03:00
Ivan Kylchik
295638b26e
Allow to interpret non const properties of compile time object
2021-08-06 13:33:22 +03:00
Ivan Kylchik
1978bfcd85
Rewrite rendering of meta info for CHECK_NOT_NULL in interpreter's test
...
This way it is possible to unify rendering of elements built by psi2ir
and fir2ir.
2021-08-06 13:33:22 +03:00
Ivan Kylchik
a9abf3b9b6
Drop redundant frames after some of exceptions in interpreter
...
Drop only last frame because it is pointing on function itself.
2021-08-06 13:33:21 +03:00
Ivan Kylchik
334d518aba
Change the way of getting name and ordinal for enum entry in interpreter
...
For now IrProperty doesn't have corresponding overridden symbol, so
it must be taken from getter.
2021-08-06 13:33:20 +03:00
Ivan Kylchik
0c5fca31ec
Support early return from constructor interpretation
2021-08-06 13:33:19 +03:00
Ivan Kylchik
96cc74a752
Fix enum interpretation in case when primary constructor is missing
2021-08-06 13:33:18 +03:00
Ivan Kylchik
668bb4fd71
Fix equals check in interpreter in case when object is wrapped as Proxy
2021-08-06 13:33:18 +03:00
Ivan Kylchik
4ad88679fd
Unify logic of creation new ir tree nodes in interpreter
2021-08-06 13:33:17 +03:00
Ivan Kylchik
78475a5d9c
Support interpretation of toArray for collections
2021-08-06 13:33:11 +03:00
Ivan Kylchik
b10fdb919f
Support cast to array with reified argument in interpreter
2021-08-06 13:33:10 +03:00
Ivan Kylchik
b150cc9537
Implement better support for default args in interpreter
...
Now supported default args:
1. from super class or interface;
2. with field access, declared in interface;
3. with field access, declared in outer class.
2021-08-06 13:33:09 +03:00
Ivan Kylchik
42ea17b151
Support interpretation of dataClassArrayMemberToString method
2021-08-06 13:33:09 +03:00
Ivan Kylchik
0716c557fe
Allow inner class to has outer super class in interpreter
2021-08-06 13:33:07 +03:00
Ivan Kylchik
574c607f1c
Support proper subtype check in interpreter for KFunction
2021-08-06 13:33:06 +03:00
Ivan Kylchik
9638af042d
Support proper behavior in interpreter for cast of null value
2021-08-06 13:33:05 +03:00
Ivan Kylchik
c2fc017d96
Move doubleArrayOf test file to proper place in interpreter test data
2021-08-06 13:33:04 +03:00
Ivan Kylchik
b44fd1a6fe
Simplify logic of interpreting invoke method for lambdas
...
For now will be created separate invoke method that will contains
a call to lambda. This way it is clearer and more intuitive
2021-08-06 13:33:04 +03:00
Ivan Kylchik
3326cbd9c0
Support passing property as argument to array constructor in interpreter
2021-08-06 13:33:02 +03:00
Ivan Kylchik
59fefb6214
Fix property rendering in interpreter
2021-08-06 13:33:01 +03:00
Ivan Kylchik
23392b73a9
Simplify the interpretation logic of methods defined in super Wrapper
2021-08-06 13:32:58 +03:00
Ivan Kylchik
cf20e64c61
Support basic interpretation of IrGetClass
2021-08-06 13:32:57 +03:00
Georgy Bronnikov
f0f01db66e
Temporarily mute a failing test
2021-06-16 01:48:28 +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
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
e28ab45c51
Add ir interpreter tests
2021-06-07 15:35:12 +03:00