Georgy Bronnikov
d7dacef9af
JVM_IR: correct RetentionPolicy annotation generation
2019-05-30 19:04:31 +03:00
Mikhail Zarechenskiy
0bc4022242
Revert "Temporary remove failing test for new inference about SAM conversions"
...
This reverts commit 5bcd974944 .
Fixed in 7c4101e2
#KT-29561 Obsolete
2019-05-30 16:45:31 +03:00
Alexander Udalov
e72388895b
JVM IR: invoke codegen after lowering all files in the module
...
Inspired by discussion in #2316
2019-05-30 13:28:31 +02:00
Dmitriy Novozhilov
bcbbf4aba3
[NI] Fix replacing original in PropertyDescriptor
2019-05-30 11:01:10 +03:00
Yan Zhulanow
55bbcc4601
Generate line numbers for closing '}' in 'init {}' blocks (KT-12787)
2019-05-30 15:27:08 +09:00
Mads Ager
dc5f4ab240
Add annotation to static methods on DefaultImpls.
2019-05-29 15:37:09 +02:00
Mads Ager
5be0bd4a56
JVM_IR: Enable loadJava tests
2019-05-29 13:10:47 +02:00
Dmitriy Novozhilov
e574106799
[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed
2019-05-29 10:54:41 +03:00
Dmitriy Novozhilov
0f7e91ff6d
[NI] Update testdata for stdlib diagnostic tests
2019-05-29 10:53:34 +03:00
Dmitriy Novozhilov
139497bafb
[NI] Add checking @NotNull parameters for candidates
2019-05-29 10:53:07 +03:00
Dmitriy Novozhilov
7c4101e21c
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
2019-05-29 10:35:46 +03:00
Anton Bannykh
dad334ffcd
JS IR: ignore the new suspend callable reference test
2019-05-29 10:17:15 +03:00
Ilya Gorbunov
fe9bd9ee20
Fix method reference ambiguity in test after introducing 'capitalize' overload
2019-05-29 06:49:05 +03:00
Mikhail Zarechenskiy
f702417655
[NI] Relax rules for call completion: require at least one constraint
...
It's enough to have at least one good constraint.
Note that the whole algorithm can be a bit more general:
we could check also Out<T>, In<T> and verify that T has good only
lower constraint or upper constraint, but there are questions for
types like Inv<Out<T>>, where T should have lower and upper constraints
#KT-31514 Fixed
2019-05-29 02:14:00 +03:00
Mikhail Zarechenskiy
848640253a
Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
...
This reverts commit f20ec3e0a6 .
2019-05-29 01:31:28 +03:00
Mikhail Zarechenskiy
86a95e1a7b
Revert "[NI] Add checking @NotNull parameters for candidates"
...
This reverts commit 910177ab17 .
2019-05-29 01:31:27 +03:00
Anton Bannykh
052ddd60ce
JS: support callable references on suspend functions (KT-30987 fixed)
2019-05-28 19:13:08 +03:00
Alexander Udalov
f9d61f2dc7
Make inline+reified functions synthetic instead of private in bytecode
...
#KT-18563 Fixed
2019-05-28 16:17:49 +02:00
Alexander Udalov
b42adcd73d
Restructure bytecode listing tests on InlineOnly/inline+reified
2019-05-28 15:56:15 +02:00
Ilmir Usmanov
5631306165
Wrap result method node with max stack calculator in inliner
...
#KT-31347 Fixed
2019-05-28 16:37:45 +03:00
Alexander Udalov
082c337faa
Support fake Java property overrides in function equality in bridges
...
A synthetic property descriptor created for `B.value` (see the added
test) should not be equal to the normal descriptor created by the fake
override construction algorithm. Otherwise we can't reach this synthetic
non-abstract descriptor when building bridges in `C`, which results in
exception.
#KT-31367 Fixed
2019-05-28 11:50:13 +02:00
Dmitriy Novozhilov
910177ab17
[NI] Add checking @NotNull parameters for candidates
2019-05-28 11:18:33 +03:00
Dmitriy Novozhilov
f20ec3e0a6
[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
...
There is added a new service named `SubstitutingScopeProvider`, that
provides factory that creates captured types and approximator for them.
In OI they are the same as before commit, for NI they are empty, because
that approximation interferes with NI algorithm
That service is injected into function descriptors and property descriptors
and used for creating `SubstitutingScope` with correct services
Also there is changed time when we approximate captured types in NI
(after all call checkers)
#KT-25290 Fixed
2019-05-28 11:18:33 +03:00
Mikhail Glukhikh
2db8409d85
FIR: introduce & resolve spread named arguments #KT-31575 Fixed
2019-05-28 10:20:42 +03:00
Mikhail Glukhikh
56435fa283
FIR Java: add default constructors
2019-05-28 10:20:40 +03:00
Mikhail Glukhikh
d0404b2c2a
FIR resolve: check number of parameters when handling Java accessors
2019-05-28 10:20:38 +03:00
Mikhail Glukhikh
d2bdbd8978
FIR resolve: record & check implicit extension receiver type properly
2019-05-28 10:20:35 +03:00
Mikhail Glukhikh
4d145db9f7
FIR resolve (by semoro): support correct type inference for generic args
...
This commit includes additional test and fixes e.g.
resolve of listOf() + listOf()
2019-05-28 10:19:12 +03:00
Simon Ogorodnik
d3f00280e9
Disable data class copy function body in raw FIR
...
After this commit we require 'copy' body generation in FIR2IR converter
2019-05-28 10:18:00 +03:00
Simon Ogorodnik
58873b2d7b
FIR resolve: set setter value-parameter type properly
2019-05-28 10:17:57 +03:00
Mikhail Glukhikh
05e4539019
Set resolved type for lambdas properly during FIR resolve
...
Partially done by semoro
2019-05-28 10:17:31 +03:00
Mikhail Glukhikh
0aaf8c7689
Fix FIR Java enhancement of java.util.Map & similar supertypes
2019-05-28 10:17:21 +03:00
Simon Ogorodnik
cef108a5ae
FIR: implement qualifier resolver
2019-05-28 10:17:05 +03:00
Jiaxiang Chen
d3cc0e6ce9
JVM_IR: Optimize disjunction condition with intrinsic function call.
2019-05-28 08:48:43 +02:00
pyos
6d19eb1853
JVM_IR: sidestep defective getMethodAsmFlags when inlining lambdas
...
It uses isStaticMethod to determine whether to set ACC_STATIC, which is
not correct (see PR #2341 ). This results in using incorrectly typed
opcodes (as all arguments are shifted by 1) when modifying the inlined
lambda's bytecode. For example, in the test added by this commit, these
opcodes are inserted to spill the stack into locals before calling
another inline function.
Because getMethodAsmFlags is used by the non-IR backend (see PR #2341
again for why changing stuff might not be a good idea), the proposed
solution is to ditch it completely and override generateLambdaBody in
IrExpressionLambdaImpl to use FunctionCodegen's IR-based flag
computation logic.
2019-05-28 08:38:16 +02:00
Mikhail Zarechenskiy
c30e045b1b
[NI] Don't consider Any!-constraint from upper bounds as more specific
...
#KT-31624 Fixed
2019-05-27 17:32:25 +03:00
Mikhail Zarechenskiy
8bef345f0f
Duplicate test for NI and OI to avoid mismatch of diagnostics
...
There is a problem with different order of diagnostics for NI and OI,
so, in order to fix this test, it was duplicated
2019-05-27 17:32:24 +03:00
Mikhail Zarechenskiy
95710f4087
[NI] Avoid forcing resolve for array access expression
...
#KT-31606 Fixed
#EA-126523 Fixed
2019-05-27 17:32:24 +03:00
Mikhail Zarechenskiy
fe5976d7f4
[NI] Don't apply SAM-conversion for type that is subtype of function
...
Plus, don't get synthetic candidates as all candidates are creating
by conversion
#KT-31503 Fixed
2019-05-27 17:32:23 +03:00
Mikhail Zarechenskiy
8910859fd1
[NI] Implement various optimizations for incorporation algorithm
...
Mostly, these optimisations are picked from the old inference.
Also, remove exponential complexity for flexible types in approximation,
note that more correct fix for this would be to introduce new types
that corresponds just to platform types to avoid nullability problems,
but due to complexity it will be done later
#KT-31415 Fixed
2019-05-26 21:32:46 +03:00
Mikhail Zarechenskiy
bbec3bf001
Fix exception on star import from typealias
...
#KT-30983 Fixed
2019-05-26 21:32:07 +03:00
Mikhail Zarechenskiy
b84b890250
Add tests to preserve current behavior for upcoming changes
...
##KT-30983 In Progress
2019-05-26 21:32:03 +03:00
Mikhail Zarechenskiy
5173d5e359
[NI] More accurate handle of capture types from subtyping
...
#KT-31520 Fixed
2019-05-26 21:31:59 +03:00
Mikhail Zarechenskiy
cc29ca02f8
[NI] Don't loose inference session during property resolve
...
#KT-31620 Fixed
2019-05-26 21:31:54 +03:00
Alexander Udalov
2a3786e3f8
Retain "is moved from interface companion" property flag in kotlinx-metadata-jvm
...
#KT-31338 Fixed
2019-05-24 14:42:25 +02:00
pyos
4cd4ea126b
JVM_IR: generate more accessors for use in inline functions
2019-05-24 11:27:19 +02:00
pyos
cf74b5e87b
Mark callable reference classes as synthetic
2019-05-24 11:27:19 +02:00
pyos
e7dd41743f
Prefix captured variables' names with $
2019-05-24 11:27:19 +02:00
Ting-Yuan Huang
bdcd6f73b1
Move tailrecPhase before defaultArgumentStubPhase
...
So that default values can be copied to the recursive call sites.
2019-05-24 09:51:07 +02:00
Dmitriy Novozhilov
ffc0276215
Fix compiler testdata broken in 95544b0
2019-05-23 17:46:16 +03:00