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
Ilya Gorbunov
e025050dd9
Replace kotlin-runtime with kotlin-stdlib in kotlin-script-util and its tests
2017-01-24 22:04:46 +03:00
Ilya Gorbunov
19dd7ee09e
Build kotlin-test after kotlin-stdlib, build kotlin-test sources with kotlin-stdlib tests again
2017-01-24 22:04:46 +03:00
Ilya Gorbunov
a0cfd8d35e
Change builtins module name to kotlin-runtime to match that of maven built artifact.
2017-01-24 22:04:46 +03:00
Ilya Gorbunov
7ccaa77c5b
Shade kotlin-runtime into kotlin-stdlib
2017-01-24 22:04:46 +03:00
Ilya Gorbunov
8e9bbe276c
JS: Make Date.getTime return Double instead of Int.
...
#KT-4141 Fixed
2017-01-24 21:55:48 +03:00
Alexey Andreev
46d251df1b
JS: deprecate noImpl
2017-01-24 20:18:42 +03:00
Alexey Andreev
5243b451f7
JS: replace noImpl with definedExternally in hand-written stdlib
2017-01-24 20:18:42 +03:00
Alexey Andreev
c05870b461
JS: regenerate stdlib
2017-01-24 20:15:22 +03:00
Alexey Andreev
a9069d8973
JS: replace noImpl with definedExternally in stdlib generator
2017-01-24 20:15:21 +03:00
Alexey Andreev
c9a190b405
JS: regenerate stdlib sources from IDL
2017-01-24 20:15:19 +03:00
Alexey Andreev
e3da9066c4
JS: replace noImpl with definedExternally in IDL2K
2017-01-24 20:14:32 +03:00
Alexey Andreev
26abc19aa6
JS: replace noImpl with definedExternally in diagnostics and their messages
2017-01-24 20:14:32 +03:00
Alexey Andreev
aedf8bd232
JS: replace noImpl with definedExternally in tests
2017-01-24 20:14:31 +03:00
Alexey Andreev
71a5d8a4ee
JS: add definedExternally property as a replacement for noImpl, support it in checkers. See KT-15144
2017-01-24 20:14:31 +03:00
Alexey Andreev
26a3ac5a9b
JS: fix translation of delegated local variables in coroutines. See KT-15834
2017-01-24 20:13:53 +03:00
Alexey Andreev
8040d781b4
JS: fix translation of suspend lambda when it's not passed to another function
2017-01-24 20:13:53 +03:00
Alexey Andreev
1a5e0e4b06
JS: improve performance of suspend function calling suspen function when no suspension ever occur.
2017-01-24 20:12:12 +03:00
Alexey Andreev
bf55744e64
JS: fix translation of safe calls if suspend functions. See KT-15892
2017-01-24 20:11:55 +03:00
Alexey Andreev
2adaaf5e9f
JS: recognize LANGUAGE_VERSION directive in testData
2017-01-24 20:11:30 +03:00
Alexey Andreev
9aeba1d5cf
JS: fix names in stdlib and tests WRT to new mangling algorithm
2017-01-24 20:11:29 +03:00
Alexey Andreev
2ae46ceb4b
JS: change how signature for mangling is generated, taking into account more information. See KT-15285
2017-01-24 20:10:17 +03:00
Alexey Andreev
119bf52adf
JS: fix translation of callable reference to property of outer class with private setter
2017-01-24 20:09:32 +03:00