Commit Graph

47097 Commits

Author SHA1 Message Date
Ilya Chernikov fbbfe600ec Fix list of script definitions recognized by the asm-based loading:
fix of the previous fix to #KT-24926
2018-07-10 08:43:50 +02:00
Ilya Chernikov 199c3bce40 Fix explicit custom scripting definitions choice logic:
add standard script def after custom defs are processed
2018-07-10 08:43:50 +02:00
Ilya Chernikov e17c36cf12 Improve automatic scripting plugin picking logic 2018-07-10 08:43:50 +02:00
Ilya Chernikov 4812fcf1ad Fix script definition discovery logic:
for cases when directory-based dependencies are passed and directories
with resources are different from directories with classes
Significant refactoring to make code prettier
2018-07-10 08:43:50 +02:00
Ilya Chernikov 56e9bfcd62 Fix default configuration refinement in scripts 2018-07-10 08:43:50 +02:00
Ilya Chernikov befa94689a Return script instance from the evaluation in the basic jvm evaluator 2018-07-10 08:43:50 +02:00
Pavel Talanov 2ecddc996a Implement support for static resolving to scripts in source roots in IDEA 2018-07-10 08:43:50 +02:00
Ilya Chernikov 9453834fb1 Create proper constructor in script descriptor
allows to resolve calls to scripts in compiler (but not in the IDE yet)
Some refactorings on the way
2018-07-10 08:43:50 +02:00
Ilya Gorbunov b7d3382f13 Report more diagnostics when JDK8PlatformImplementations can't be cast to base type
#EA-120914 - CCE: PlatformImplementationsKt.<clinit>
2018-07-09 22:13:57 +03:00
Ilya Gorbunov 35beb9698e Fix overflow in empty progressions' last element
#KT-24204 Fixed
2018-07-09 22:13:51 +03:00
Ilya Gorbunov be8cb94105 Add failing tests for overflow in empty progressions KT-24204 2018-07-09 22:08:01 +03:00
Mikhail Zarechenskiy 14b8ff7d71 Load unsigned constants from class file with the use of expected type 2018-07-09 20:19:26 +03:00
Mikhail Zarechenskiy 9b6e8fa5d1 Do not recreate compile time initializer to avoid type info loosing
When we resolve arguments of annotation, expected type of parameters can
 be unknown. Therefore, if we'll try to load constants without expected type,
 info about unsigndness will be lost. For primitives it worked because we
 can differ type by its value
2018-07-09 20:19:25 +03:00
Mikhail Zarechenskiy 0c6757a8b0 Write is_unsigned flag into metadata for an annotation arguments
Instead of adding new kind of types, we'll use flag to disambiguate
 usual types from unsigned ones, this approach has two advantages:
 - less changes in the metadata format
 - it allows naturally extend format for unsigned arrays,
  which will be supported later

 #KT-25310 Fixed
 #KT-25273 Fixed
2018-07-09 20:06:05 +03:00
Mikhail Zarechenskiy 8c075bc622 Add ability to use unsigned types in LoadJava tests
This is a temporary solution, which will be completely removed in 1.3, see KT-25226
2018-07-09 20:05:38 +03:00
Nicolay Mitropolsky dd0e3cd135 Uast: ULambdaExpression returns proper functionalInterfaceType for SamAdapterExtensionFunctionDescriptor (KT-25297) 2018-07-09 19:41:07 +03:00
Nicolay Mitropolsky 2c7687195c Uast: properly handling explicit SAM (KT-25297) 2018-07-09 19:41:07 +03:00
Nicolay Mitropolsky 38e2d474b7 Uast: create KotlinULambdaExpression for in-place lambdas (KT-25297)
and provide appropriate functionalInterface
2018-07-09 19:41:07 +03:00
Dmitry Savvinov 668bd209f2 Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.

However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).

Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
2018-07-09 18:57:58 +03:00
Dmitry Savvinov 2783e9939b Fix internal-visibility mangling in IDE
Collect module name properly from facets settings, using CLI arguments
which define module name ('-module-name' on JVM and Common,
'-output-file' on JS).

^KT-23668 Fixed
2018-07-09 18:50:50 +03:00
Dmitry Savvinov 04f12846f1 Minor: reformat ModuleDescriptorImpl.kt 2018-07-09 18:50:35 +03:00
Nikolay Krasko b709012dea Minor: "Recheck now" -> "Check again" 2018-07-09 18:07:25 +03:00
Nikolay Krasko aa21e9c3bc Show current Kotlin installed version in update form (KT-25255)
#KT-25255 Fixed
2018-07-09 18:07:25 +03:00
Nikolay Krasko 90f1829fb8 Minor: find tested element with <caret> in ResolveElementCacheTest.kt 2018-07-09 18:07:24 +03:00
Mikhael Bogdanov 66e68fbb53 Generate sam wrappers in inlined lambda in same way as in inline function
#KT-24825 Fixed
2018-07-09 15:52:54 +02:00
Alexey Tsvetkov 93e183c2e4 Test for KT-25051 2018-07-09 15:50:06 +03:00
Alexey Tsvetkov f735586819 Remove redundant test
`testMultiModuleICNonAndroidModuleIsChanged` already tested
android and non-android change
2018-07-09 15:50:05 +03:00
Alexey Tsvetkov 5760b8cf8b Register kotlin_module as output of all files
Previously kotlin_module was registered as output
only for files containing top-level declarations
2018-07-09 15:48:11 +03:00
Alexey Tsvetkov 63b4302cea Always generate kotlin_module
#KT-25133 fixed
    #KT-25051 fixed
2018-07-09 15:48:11 +03:00
Denis Zharkov 4bf51af2fa Fix reference-public-api
It's necessary because of the changes in 3497880f203449121ea8035c49b792cc4dc53bd6
2018-07-09 15:27:19 +03:00
Denis Zharkov 0b3048f60a Replace trivial usages of suspendCoroutineOrReturn in tests
This is necessary since suspendCoroutineOrReturn gets removed in 1.3
2018-07-09 15:27:19 +03:00
Denis Zharkov a23ce42c80 Replace a couple of usages of suspendCoroutineOrReturn in tests 2018-07-09 15:27:19 +03:00
Denis Zharkov e753e0978f Fix dispatchResume.kt tests after suspendCoroutineOrReturn removal
To leave them COMMON_COROUTINES_TEST use suspendCoroutine instead
But, since it requires for continuation to be called externally
the tests are rewritten
2018-07-09 15:27:19 +03:00
Denis Zharkov 8c65e55c02 Fix some of the bytecodeText tests
The changes are necessary because of release coroutines support:
- Get rid of suspendCoroutineOrReturn calls. It's anyway irrelevant
to what is being tested here

- In varValueConflictsWithTable.kt, variables slots have been shifted
because the variable for continuation's exception was removed

- In varValueConflictsWithTableSameSort.kt, a variable has been introduced
to preserve the same slot numbers for old variables.
Otherwise, they become shifted and to the second slot,
and there are a lot of irrelevant "ALOAD 2" instructions

This change is another example of why bytecode text tests are evil
2018-07-09 15:27:19 +03:00
Denis Zharkov 820506d9c6 Fix tests after new Continuation API support
#KT-24863 Fixed
2018-07-09 15:27:19 +03:00
Denis Zharkov 170086250b Support new Continuation API in JVM BE
#KT-24863 Fixed
2018-07-09 15:27:19 +03:00
Denis Zharkov aee0afbff1 Support CoroutineUtil.kt helpers within AbstractCompileKotlinAgainstKotlinTest 2018-07-09 15:27:19 +03:00
Denis Zharkov f23a0c8fea Add ContinuationAdapter to coroutine tests helpers
It allows having the same Continuation implementations for different
API versions
2018-07-09 15:27:19 +03:00
Denis Zharkov f01e690f49 Minor. Use coroutine test helpers for inline/diagnostics tests
It should help with decreasing test data copy-pasting when
testing against release / pre-release coroutines
2018-07-09 15:27:19 +03:00
Denis Zharkov 2c195555ad Minor. Reformat CoroutineCodegen.kt 2018-07-09 15:27:19 +03:00
Denis Zharkov 1ced127660 Minor. Move helpers for coroutines tests to kt-file 2018-07-09 15:27:19 +03:00
Roman Elizarov 3aa76c58fc Updated SuccessOrFailure class corresponding to KEEP-127 and docs. 2018-07-09 15:27:19 +03:00
Roman Elizarov 33f4a3fcbf Extracted BaseContinuationImpl 2018-07-09 15:27:19 +03:00
Roman Elizarov 38c17249b9 releaseInterceptedContinuation clarified and ref check in impl fixed 2018-07-09 15:27:19 +03:00
Roman Elizarov d33409ff8a Fixed boxing of SuccessOrFailure inside SafeContinuation impl 2018-07-09 15:27:19 +03:00
Roman Elizarov 0370fac0b6 Further design improvements for coroutines 1.3 APIs
* Documentation improvements and clarification
* Dropped legacy intrinsic functions
* Remove context parameter default from Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov 719d45510a Continuation builder function 2018-07-09 15:27:19 +03:00
Roman Elizarov 0b17c619bc Fixed ContinuationImpl.intercepted 2018-07-09 15:27:19 +03:00
Roman Elizarov 7513557315 Unroll recursion in resumeWith
Fixes KT-18987
2018-07-09 15:27:19 +03:00
Roman Elizarov af9743709c Implement COROUTINE_SUSPENDED as a property with getter 2018-07-09 15:27:19 +03:00