Juan Chen
9dd8eda1c9
[FIR]: fix library methods in packages
...
Library methods such as 'listOf' are resolved
to have the package fragments as their parents,
but JVM expects their containing file classes as parents.
This fix generates those file classes and
uses them as parent replacements for such library methods.
2020-02-20 14:24:02 +03:00
Steven Schäfer
5f6af58aeb
JVM IR: (Un)mute tests and add more tests for bridge generation
2020-02-07 18:44:50 +03:00
Juan Chen
188abc243a
[FIR] add vararg arguments support, improve vararg parameters support
2020-01-31 16:41:25 +03:00
Steven Schäfer
aea5e3ffbc
JVM IR: Remove type substitutions from ExpressionCodegen
...
Instead, determine whether the return type of a call is Nothing, by
looking at the type of the call expression.
2020-01-22 15:51:11 +01:00
Dmitriy Novozhilov
72cb0de705
[FIR-TEST] Update testdata
2020-01-22 14:49:23 +03:00
Mikhail Zarechenskiy
5c5635ce20
Fix codegen & bytecode tests after unifying exceptions in JVM backend
...
See KT-22275 for details
2020-01-20 16:36:03 +03:00
Pavel Kirpichenkov
cb0b44273d
[NI] Check stub types in result type
...
An uninferred parameter stub may leak through calculation of CST(Inv<Uninferred Stub>, Nothing) into a result type.
A stub type in the result type means a type error. So we can afford recalculating
CST with stub-containing types filtered out, since its an error anyway.
This prevents stub types leakages and helps with reporting type error diagnostics.
KT-35914 Fixed
KT-35943 Fixed
2020-01-20 11:11:31 +03:00
Ilya Gorbunov
ac790bea71
Reorganize diagnostics tests with stdlib and reflect
...
DiagnosticsTestWithStdLib now require stdlib only.
Move test data accordingly.
The only test that required kotlin-reflect is transformed into
codegen box test.
2020-01-16 15:35:58 +03:00
Juan Chen
573188bdc4
[FIR2IR]: fix translation of this references in instance methods
...
Currently FirThisReceiverExpression of instance methods are translated
to references of the class' thisReceiver,
not the method's dispatch receiver,
which causes problems with IrFrameMap::typeOf,
as the class' thisReceiver is not in the typeMap.
This commit translates non-qualified "this" references of
instance methods to references of the methods' dispatch receiver.
2020-01-10 10:43:07 +03:00
Steven Schäfer
929fb5c82b
Mute FIR tests containing broken function calls
2020-01-08 13:20:00 +01:00
Juan Chen
4c04ad2371
FIR: Add bindings for dispatch receiver parameters
...
Before this commit, such descriptors have null owners, which causes problems when the getter of the owner property is called.
2019-12-27 10:13:44 +03:00
Dmitry Petrov
09c3279cc7
PSI2IR: Infer smart cast on dispatch receiver of FAKE_OVERRIDE calls
...
NB here we have use derived class type with type arguments replaced
with star-projections. This emulates JVM erasure (to some degree),
but, unfortunately, that's best we can offer here at the moment.
2019-12-19 12:24:58 +03:00
Mark Punzalan
5afab1ac2b
[FIR] FIR2IR: Populate calls with type arguments and function type
...
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00
Mikhail Glukhikh
95203e9310
FIR: unmute passing black-box tests (nested constructor resolve)
2019-11-19 23:02:35 +03:00
Mikhail Glukhikh
9c9cf2086d
Unmute recently fixed FIR black box tests
2019-11-19 11:00:10 +03:00
Mark Punzalan
9df2f69f09
[FIR] Disable failing blackbox codegen tests for FIR.
2019-11-19 11:00:09 +03:00
Pavel Kirpichenkov
42740c8b97
Fix capturing of outer type parameters for classes declared inside init block
2019-10-09 16:01:46 +03:00
Mikhail Zarechenskiy
d59b910403
Add tests for obsolete issues
...
#KT-32207 Obsolete
#KT-32836 Obsolete
#KT-32949 Obsolete
#KT-9384 Obsolete
2019-08-15 13:01:39 +03:00
Mikhael Bogdanov
47bee6a6c5
JVM_IR. Support reified parameters in anonymous object super constructor call
2019-08-06 14:48:16 +02:00
Ting-Yuan Huang
1c3b895fc0
Generate accessors for super calls if necessary
...
Current implementation of calls with super qualifier relies on
invokespecial, which has some more constraints than regular virtual
invocations. When those constraints aren't met, accessors are needed.
2019-05-10 08:57:37 +02:00
Georgy Bronnikov
bfe148efd5
IR: mostly remove descriptors from codegen
2019-05-01 20:08:20 +03:00
pyos
8c55376f0c
Unmute almost all JVM_IR tests that use property references
2019-03-19 12:00:29 +01:00
Mads Ager
b902da55d5
JVM_IR: Block with nothing type do not generate values on the stack.
2019-02-07 16:05:16 +01:00
Svyatoslav Kuzmich
aa811dcfb3
[JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests
2019-01-24 16:14:40 +03:00
Mikhael Bogdanov
f59b6a350f
Specify JVM target backend for other java related tests
2018-12-21 16:09:11 +01:00
Mikhael Bogdanov
f4e532e449
Specify JVM target backend for test with '@JvmXXX' annotations
2018-12-21 16:09:07 +01:00
Mikhael Bogdanov
a8a1bfca72
Specify JVM target backend for test with '// File: *.java'
2018-12-21 16:09:06 +01:00
Mikhael Bogdanov
3ef06c1e44
Specify JVM target backend for test with 'import java...'
2018-12-21 16:09:06 +01:00
Mikhael Bogdanov
f36519d4f5
Specify JVM target backend for test with '.javaClass' usage
2018-12-21 16:09:05 +01:00
Mikhael Bogdanov
1217d3591b
Specify JVM target backend for test with '::class.java' usage
2018-12-21 16:09:04 +01:00
Roman Artemev
e436e7cf61
[JS IR BE] Support call super with default parameters
2018-12-18 15:55:09 +03:00
Dmitry Petrov
f8582c1929
psi2ir: ersatz type approximation for intersection types
...
Emulate old JVM back-end behavior for intersection type mapping.
IrType renderer should render the IR type, not the original Kotlin type.
2018-12-07 10:51:55 +03:00
Roman Artemev
c5922bf74b
Refact stdlib generator, add support for different backends
...
[JS IR BE] Runtime fixes
* Do not generate external declarations for IR BE
* Move `arrayToString` helper function out of shared JS stdlib
* Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00
Anton Bannykh
8c6337f3f6
[JS IR BE]: support dynamic_var["foo"] = "bar"
...
Used EQ origin to detect. Added a test to check dynamic_var = "bar" case
is not affected
2018-10-10 13:43:22 +03:00
Svyatoslav Kuzmich
b79dcbe8e6
[JS IR BE] Refactor equals and compareTo lowering
2018-09-24 18:21:57 +03:00
Anton Bannykh
2e709a81fa
[JS IR BE] Arrays, varargs
2018-09-18 14:36:20 +03:00
Svyatoslav Kuzmich
ad58fdd158
[JS IR BE] Unmute tests after adding stdlib
2018-09-04 20:19:04 +03:00
Roman Artemev
8a871b3f0c
Update tests
2018-08-31 15:34:18 +03:00
Svyatoslav Kuzmich
392ad521fd
[JS IR BE] Reflection support
2018-08-15 13:35:14 +03:00
Mikhael Bogdanov
494828f4cf
Unmute jvm ir-tests
2018-08-15 10:26:28 +03:00
Mikhael Bogdanov
357359b1dd
Unmute ir-tests after CR support
2018-08-09 14:22:50 +03:00
Mikhael Bogdanov
06b16a6459
Unmute ir-tests after prev commit
2018-08-09 14:22:46 +03:00
Mikhael Bogdanov
6c41f078a6
Mute jvm ir box tests
2018-08-02 13:19:28 +02:00
Mikhail Zarechenskiy
f9b19c6286
[NI] Approximate types during type translation for IR
2018-07-24 20:14:17 +03:00
Anton Bannykh
07b3b66fd9
JS IR: unmute tests
2018-07-10 13:34:19 +03:00
Zalim Bashorov
56bf1f895c
Mute failed test for JS IR BE
...
(cherry picked from commit 6d379a6)
2018-06-29 11:24:46 +03:00
Mikhael Bogdanov
e149cbe852
Mute failed jvm ir tests
2018-06-28 12:26:41 +02:00
Anton Bannykh
04a2ffc0c1
JS IR: unmute tests
2018-06-21 13:27:17 +03:00
Roman Artemev
f69bd54d6c
[JS IR BE] Update test data
2018-06-19 17:09:31 +03:00
Roman Artemev
6ac4fd2e5f
[JS IR BE] Update test data
2018-06-14 19:54:30 +03:00