Commit Graph

36817 Commits

Author SHA1 Message Date
Alexey Andreev ad4fb44827 JS: report about using of external interfaces in class literals 2017-01-25 18:09:22 +03:00
Alexey Andreev deaac83e70 JS: report about wrong module usage in class literals. See KT-15253 2017-01-25 18:09:21 +03:00
Alexey Andreev f52eebd302 Add extension point for back-ends to perform platform-specific checks of class literals 2017-01-25 18:09:21 +03:00
Alexey Andreev 9000d54d8a JS: when checking calls to JsModule declarations, check arguments passed to reified type parameters. See KT-15253 2017-01-25 18:09:20 +03:00
Mikhael Bogdanov 4c7a07bed6 Optimize defaults format: avoid reduntant stack normalization operations 2017-01-25 15:56:56 +01:00
Mikhael Bogdanov fc4be17623 Fix for KT-14966: Regression: VerifyError on access super implementation from delegate
#KT-14966 Fixed
2017-01-25 15:56:55 +01:00
Mikhael Bogdanov 11578c602e Added inline tests for jvm 8 target 2017-01-25 15:56:55 +01:00
Simon Ogorodnik 32f1ce7551 Added "kotlin.reflect.jvm.internal" to excluded from completion and auto imports list 2017-01-25 17:45:59 +03:00
Simon Ogorodnik e220a20eed KT-15796 Import of class referenced only in KDoc not preserved after copy-paste
#KT-15796 fixed
2017-01-25 17:41:26 +03:00
Simon Ogorodnik 4ca10c61fd KT-11308 Hide kotlin.jvm.internal package contents from completion and auto-import
#KT-11308 fixed
2017-01-25 17:39:36 +03:00
Simon Ogorodnik 5c52bdc684 KT-14859 "Parameter Info" doesn't work properly in one case
#KT-14859 fixed
2017-01-25 17:32:57 +03:00
Ilya Chernikov e3338c1e31 Fix testdata 2017-01-25 15:29:15 +01:00
Ilya Chernikov ec7e8873f4 Update daemon client with wrappers for basic compiler API
Other changes to extract results for compiler, tests.
2017-01-25 15:29:15 +01:00
Nikolay Krasko afd0655776 Fix after review 2017-01-25 17:19:53 +03:00
Nikolay Krasko c525a59df8 Make breakpoints work in suspend functions 2017-01-25 16:46:35 +03:00
Nikolay Krasko 649ec9a73d Check that breakpoints work in suspend function without suspension points 2017-01-25 16:46:33 +03:00
Nikolay Krasko 1a3d333da1 Add diagnostic for null error in KotlinClsStubBuilder 2017-01-25 16:46:32 +03:00
Mikhail Glukhikh d13978e64f Change log 1.1-RC (preliminary) 2017-01-25 15:27:19 +03:00
Alexey Sedunov 983ad55357 Code Insight: Preserve identifier quotes in "Generate equals()/hashCode()/toString()" actions
#KT-15883 Fixed
2017-01-25 14:24:51 +03:00
Alexey Sedunov 7382d7c7d6 Extract Function: Add 'suspend' modifier if extracted function contains suspend-calls
#KT-14704 Fixed
2017-01-25 14:24:49 +03:00
Alexey Sedunov 41f5a3e864 Support "Change parameter type" for parameters with type-mismatched default value
#KT-15627 Fixed
2017-01-25 14:24:48 +03:00
Denis Zharkov ba0f8b908f Fix Kotlin bytecode toolwindow showing wrong code for suspend functions
Use binding context from the full resolve, because otherwise control-flow
analysis is not being run, that is very important for suspend functions
(tail-call optimizations)

 #KT-15827 Fixed
2017-01-25 14:22:40 +03:00
Alexey Andreev e15b2b0dd0 Fix compilation of project 2017-01-25 14:15:23 +03:00
Mikhail Glukhikh 426619e47c Change log from 1.1-Beta added to master branch 2017-01-25 14:02:05 +03:00
Denis Zharkov 9ce3880ac6 Support getValue/setValue/provideDelegate suspend functions in JVM backend
- Determine if there are non-tail calls to getValue/setValue simply
by existance of such a property
(it might be too strict, but implementing more granular check may be rather hard)

- Change in ExpressionCodegen is relevant for provideDelegate,
that in case of local variables uses OnStack as StackValue
(see the comment near these changes)

 #KT-15933 Fixed
2017-01-25 13:54:01 +03:00
Denis Zharkov 9ca9a988a6 Fix accessor generation for suspend functions
1. JVM view of suspend accessors must be also an instance of AccessorForFunctionDescriptor,
thus `createSubstitutedCopy` should be correctly overidden.

2. accessibleFunctionDescriptor should unwap the initial suspend descriptor,
for the same reasons as for type aliases constructors and etc:
these descriptors are used as keys of the map of accessors, so
to avoid duplication for suspend view and initial suspend descriptor,
we always use the latter one as a key.

 #KT-15907 Fixed
 #KT-15935 Fixed
2017-01-25 13:54:01 +03:00
Denis Zharkov 0693bd6b62 Fix codegen issue on suspend functions with receiver
When the extension receiver of a named suspend function was marked as used
from the inner lambda, codegen used to throw a "Don't know how to generate outer expression for class" exception.

It may seem quite tricky, but currently for suspend lambda body
its extension receiver is treated as it's defined inside the relevant "doResume"
(there is an actual bytecode part that fills the relevant local variable)

The problem was that inside ExpressionCodegen for "doResume" of named
suspend function we couldn't determine that original function has
an extension receiver.

 #KT-15821 Fixed
 #KT-15820 Fixed
2017-01-25 13:54:01 +03:00
Denis Zharkov 131c008ba3 Minor. Refine naming for original suspend lambda descriptors
Also inline some methods with single usage
2017-01-25 13:54:01 +03:00
Denis Zharkov 02b40326cc Fix incorrect coroutines codegen behavior
If all the suspension calls in a suspend function were "hidden"
under the for-convention (iterator/next/hasNext) calls,
control-flow didn't find them, thus supposing that there is no
suspension points and there is no need to generate a coroutine state machine

The solution is to add relevant calls to CFG

 #KT-15824 Fixed
2017-01-25 13:54:01 +03:00
Alexey Andreev 8cbea903f4 JS: add checker that checks if JsQualifier has wrong format 2017-01-25 13:52:19 +03:00
Alexey Andreev ba65e58fdd JS: add checker to detect non-external declarations in files marked by JsModule or JsQualifier annotation 2017-01-25 13:52:19 +03:00
Alexey Andreev cc67f6c9f7 JS: add support of JsQualifier annotation. See KT-15905 2017-01-25 13:52:18 +03:00
Alexey Andreev 6624736ccf JS: fix is check on Throwable instances 2017-01-25 13:52:18 +03:00
Alexey Andreev aef7b83932 JS: fix toString in case of kotlin.Throwable 2017-01-25 13:52:17 +03:00
Alexey Andreev 6b2f1ba4e4 JS: move couple of helper functions from TranslationUtils to JsDescriptorUtils 2017-01-25 13:52:17 +03:00
Alexey Andreev 115f6ced87 JS: fix support of throwable constructors without message and/or cause parameters 2017-01-25 13:52:16 +03:00
Alexey Andreev 6f4d8decc7 JS: add support of custom exceptions inherited from kotlin.Throwable that call super constructor from secondary constructor 2017-01-25 13:52:16 +03:00
Alexey Andreev f34093db9f JS: make kotlin.Throwable = Error. See KT-15312 2017-01-25 13:52:13 +03:00
Alexey Andreev c565697e77 JS: refactor FunctionIntrinsic 2017-01-25 13:51:54 +03:00
Alexey Andreev 0a9c536c01 JS: make defensive copy of argument list in JsInvocation and JsNew constructor 2017-01-25 13:51:53 +03:00
Alexey Andreev 51e5b5aac7 JS: allow to inherit external class from kotlin.Throwable. See KT-15336 2017-01-25 13:51:53 +03:00
Anton Bannykh 847ec9e550 JS: fixed subSequence in CharSequence descendants (KT-14035) + added support for function intrics in delegation 2017-01-25 12:59:53 +03:00
Vyacheslav Gerasimov 4fe040eeb9 Fixed several bugs in Android lint ApiDetector (KT-15002, KT-12024, KT-14737, KT-14825, KT-12023, KT-15018)
Merged IntelliJApiDetector to ApiDetector

#KT-15002 Fixed
#KT-12024 Fixed
#KT-14737 Fixed
#KT-14825 Fixed
#KT-12023 Fixed
#KT-15018 Fixed

(cherry picked from commit e830e8b55fa2e354303a6c604b3905285a05b9db)
2017-01-25 10:50:36 +03:00
Vyacheslav Gerasimov d0f1b81bfa Fixed bugs in Kotlin Android Lint CleanupDetector
#KT-14780 Fixed
#KT-14677 Fixed

(cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
2017-01-25 10:50:35 +03:00
Mikhail Zarechenskiy 68b223211c Fix bogus integer overflow warning for 'mod' operator
#KT-15875 Fixed
2017-01-25 02:24:28 +03:00
Ilya Gorbunov f9e552e3c2 Build kotlin-stdlib in addition to kotlin-runtime in ant build. 2017-01-24 22:38:05 +03:00
Ilya Gorbunov a2bd3bfc7b List artifacts explicitly for test. 2017-01-24 22:04:46 +03:00
Ilya Gorbunov 43003cffbb Make kotlin-runtime dependency optional for kotlin script executor for maven, but still add if it's found. 2017-01-24 22:04:46 +03:00
Ilya Gorbunov 070f9d9d17 Binary compatibility validation: dump public API of merged stdlib to another file 2017-01-24 22:04:46 +03:00
Ilya Gorbunov 4da4de1104 Replace kotlin-runtime with kotlin-stdlib, where it was used as a dependency. 2017-01-24 22:04:46 +03:00