Mikhail Zarechenskiy
bebdf6fcef
[NI] Added test for KT-32094
2019-06-21 11:52:44 +03:00
Mikhail Zarechenskiy
f3e4c9cdb3
[NI] Don't avoid Nothing-like constraints if Nothing was in initial type
...
#KT-32081 Fixed
#KT-32951 Fixed
2019-06-21 11:52:39 +03:00
Mikhail Glukhikh
4b2175c8f8
FIR: do not resolve constructors / initializers in implicit type mode
2019-06-20 23:43:04 +03:00
Georgy Bronnikov
48b0cac92e
Update tests
2019-06-20 22:37:56 +03:00
pyos
8cca74c932
JVM_IR: support vararg & defaults in function references
2019-06-20 22:37:56 +03:00
pyos
b45e8c7021
JVM_IR: make CallableReferenceLowering a bit shorter
2019-06-20 22:37:56 +03:00
Denis Zharkov
6d63214d1b
Optimize AbstractTypeChecker::collectAllSupertypesWithGivenTypeConstructor
...
Add fast path for a case when subType is a class and super is not
Classes may only have classes supertypes
2019-06-20 15:42:42 +03:00
Denis Zharkov
7a31a14002
Clarify parameter names in AbstractTypeChecker
2019-06-20 15:42:42 +03:00
Denis Zharkov
1a2ccb50c6
Minor. Drop unused functions
2019-06-20 15:42:42 +03:00
Denis Zharkov
bf0781d790
FIR: Implement fast path for classes subtyping
2019-06-20 15:42:42 +03:00
Mikhail Glukhikh
cafe92639b
[FIR] Output total time & set passes in old FE performance test
2019-06-20 15:26:40 +03:00
Mikhail Glukhikh
c8003518a5
FIR: set super type reference properly
2019-06-20 15:26:40 +03:00
Mikhail Glukhikh
65d14ff097
FIR: do not try to calculate annotation call type
...
Annotation type is used instead
2019-06-20 15:26:40 +03:00
Mikhail Glukhikh
ca401cb01d
FIR2IR: support backing field symbols from FIR, fix test data
2019-06-20 15:26:40 +03:00
Mikhail Glukhikh
54078c4e9c
FIR resolve: support inferring property type from getter
2019-06-20 15:26:39 +03:00
Mikhail Glukhikh
16ead49967
FIR: implement backing field references via 'field' synthetic variable
2019-06-20 15:26:39 +03:00
Mikhail Glukhikh
11620d848b
FIR resolve: set property accessor return type to initializer type
2019-06-20 15:26:39 +03:00
Mikhail Glukhikh
7e2828c276
FIR: provide error type for property/variable without initializer
2019-06-20 15:26:39 +03:00
Ilya Matveev
65b7da9d0a
Gradle: Add a shortcut DSL method for linuxArm64 target
...
Issue #KT-32034 Fixed
2019-06-20 18:05:25 +07:00
Roman Artemev
88e92be091
[IR] Fix name clash between properties with the same fqn
...
Promote ABI version
2019-06-20 12:08:55 +03:00
Simon Ogorodnik
2995e9fcac
FIR deserializer optimization: avoid calling findKotlinClass twice
...
This commit influences enum entries deserialization.
In particular, now we don't deserialize enum entry members,
but deserialize its supertype correctly (see test data changes).
2019-06-19 23:04:41 +03:00
Mikhail Glukhikh
b3c21d6e14
Optimize FirClassSymbol.hashCode()
2019-06-19 22:54:14 +03:00
Mikhail Glukhikh
f4fefa042d
Optimization: directly call transformChildren on FirExpression
...
This is done instead of calling super transformer function,
which does the same after several redirections to other functions.
2019-06-19 22:53:24 +03:00
Mikhail Glukhikh
688c2cf74f
Optimization: make FIR expression an abstract class
...
NB: this commit does significant fir:tree refactoring.
It provides some boost due to faster abstract class dispatching in JVM.
2019-06-19 22:52:44 +03:00
Mikhail Glukhikh
dab6fe29b1
Optimization: make property 'FirExpression.resultType' inline
2019-06-19 22:52:20 +03:00
Mikhail Glukhikh
f6f879302f
Optimization: make FirFunctionCall an abstract class
2019-06-19 22:52:13 +03:00
Mikhail Glukhikh
d85ad650d5
Optimization: make FirWrappedArgumentExpression an abstract class
2019-06-19 22:52:04 +03:00
Mikhail Glukhikh
b71de954ff
Forbid manipulations with FirWrappedArgumentExpression type reference
...
The type of this expression is bound to the type of wrapped expression,
so it's better not to change it directly.
2019-06-19 22:51:26 +03:00
Mikhail Glukhikh
b7da2f2ad8
FIR resolve: check early receivers on kotlin.* only
...
To provide more stable behaviour, the check introduced in the previous
commit is now applied only to extensions from kotlin.* package.
2019-06-19 22:48:52 +03:00
Mikhail Glukhikh
374b59dee3
FIR resolve: add early explicit receiver type check
...
Before this commit, explicit extension receiver type check was performed
during found candidates analysis (together with arguments type check etc.)
Now we do it just after candidate is found, and filter the candidate
out if explicit receiver type is inappropriate.
This commit slightly changes resolve semantics,
replacing WRONG_RECEIVER with UNRESOLVED_REFERENCE in certain situations.
However, it provides significant performance boost.
2019-06-19 22:45:15 +03:00
Mikhail Glukhikh
d820b6ca52
More accurate messages about types in FirResolveBench
2019-06-19 22:45:14 +03:00
Dmitry Gridin
22a73bc09d
ChangeFunctionSignatureFix: fix wrong result
...
#KT-32001 Fixed
2019-06-19 18:52:53 +07:00
Pavel Punegov
85210d5db0
Update zipTestData: use zip64, add coroutineTestUtil and remove stdlib tests
2019-06-19 14:43:36 +03:00
Natalia Selezneva
b2109a2e65
Get rid of bunch file in AbstractScratchRunActionTest
2019-06-19 13:39:32 +03:00
Vladimir Dolzhenko
47a16cb252
Fixed and extended performance tests
2019-06-19 11:39:29 +02:00
Natalia Selezneva
5010824167
Fix compilation for 182, 183 branches
2019-06-19 12:17:23 +03:00
Alexander Podkhalyuzin
661d50de18
Do not search for Kotlin classes, when looking for Java classes
2019-06-19 11:03:54 +02:00
Natalia Selezneva
91ac38aaf4
Scratch: get editor from data context if possible
2019-06-19 11:29:15 +03:00
Natalia Selezneva
a1564fe696
Scratch: get scratch expression using last commited version of document to avoid differences between PsiFile and Document
2019-06-19 11:29:14 +03:00
Natalia Selezneva
414f98aa29
Implement REPL Mode for scratches
...
^KT-27963 Fixed
2019-06-19 11:29:14 +03:00
Natalia Selezneva
8bc03e54f7
Scratch: do not clear inlays in onStart
...
This is needed for sequential executor
2019-06-19 11:22:20 +03:00
Natalia Selezneva
b5b35a9037
Extract ScratchCompilingSession to allow calling executor multiple times
2019-06-19 11:22:20 +03:00
Natalia Selezneva
7038d9b8db
Do not use ConfigurationFileCrcFactory comparing scratch content because it needed the document to be saved
...
Check only if new fragment is not empty to avoid recompilation on minor changes
2019-06-19 11:22:20 +03:00
Natalia Selezneva
ab0877390b
Use after line end inlays to avoid moving inlay on the next line pressing enter
...
^KT-29534 Fixed
2019-06-19 11:22:19 +03:00
Natalia Selezneva
5bff3ac927
Report errors from REPL to Scratch Console
2019-06-19 11:22:19 +03:00
Natalia Selezneva
a6221cf594
Refactor scratch tests: add ability to set scratch options in test file
2019-06-19 11:22:19 +03:00
Alexander Podkhalyuzin
b59bd9d6a6
Faster component loading (better cache data structures)
2019-06-19 10:13:09 +02:00
Mikhail Zarechenskiy
796cdea50e
[NI] Require all proper constraints for Exact return type
...
Consider call `foo(bar())` where bar() returns some type variable `T`;
We had a contract that call `bar` can be completed without completion
of foo (type variables can be inferred from the current context) if `T`
has at least one proper lower constraint (ProperType <: T).
Indeed, new constraints can be added only as upper ones, so there is
no need to grow constraint system.
Unfortunately, we have Exact annotation that is used on return type of
elvis. Now, consider the following situation:
```
fun foo(a: Any) {}
fun bar(e: T): @Exact T
foo(bar("str"))
```
Here, because of Exact annotation, constraint with `Any`-type will be
added as an equal one => our prerequisite that there will be no new
lower constraints is false. `bar("str")` is inferred to Any in OI,
this seems conceptually wrong, but it's another topic of discussion.
In NI we can't just grow constraint system to use outer call because
of another important use-case:
```
fun <T> generic(i: Inv<T>) {}
fun test(a: Inv<*>?, b: Inv<*>) {
generic(a ?: b)
}
```
Common constraint system for these two calls can't be solved
(fundamentally) for this example, only if (a ?: b) and generic(result)
are computed separately.
So, to mitigate initial issue, we'll grow constraint system only if
there is at least one non-proper constraint.
#KT-31969 Fixed
2019-06-19 11:07:31 +03:00
Mikhail Zarechenskiy
ca997de6a7
[NI] Test data to understand changes in the next commit
...
##KT-31969 In Progress
2019-06-19 10:47:05 +03:00
Roman Artemev
50ad21e388
[IR BE] Fix symbol remapping for IrField/IrProperty
...
- Use appropriate wrapped descriptor
- Add test
2019-06-19 10:24:15 +03:00