Commit Graph

276 Commits

Author SHA1 Message Date
Svyatoslav Kuzmich f5a80a30f7 Mute and unmute tests 2018-08-15 18:20:07 +03:00
Ilmir Usmanov 1c098bf5cf Minor. Fix test 2018-08-15 14:23:33 +03:00
Ilmir Usmanov b4189d9e85 Minor. Use more granular assertion levels in assertion tests 2018-08-15 14:23:30 +03:00
Mikhael Bogdanov 494828f4cf Unmute jvm ir-tests 2018-08-15 10:26:28 +03:00
Mikhael Bogdanov cb31962b38 Generate old style lambda classes in jvm ir backend 2018-08-13 15:10:20 +03:00
Mikhael Bogdanov a7d706f693 Unmute jvm ir-tests 2018-08-09 16:30:32 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Mikhael Bogdanov 06b16a6459 Unmute ir-tests after prev commit 2018-08-09 14:22:46 +03:00
Mikhail Zarechenskiy 1497c19dc9 Do not generate useless methods inside wrapper for inline class
Fix for test data (inlineFunctionInsideInlineClassesBox.kt) is needed
 to avoid check about "no inline functions".

 This check has two steps: first, names of inline functions from
 the metadata are loaded, then these names are checked that they are
 presented for physical methods in the classfile.

 Because now there are no physical methods in the classfile, we can't pass
 the second check, therefore this fix is needed.

 #KT-24872 Fixed
2018-08-07 12:15:46 +03:00
Mikhael Bogdanov ddf6bdffcf Move jvm ir tests to jvm ones 2018-08-06 13:57:43 +03:00
Ilmir Usmanov 0c867b4804 Disable callable references to suspend functions in 1.2
#KT-25604: Fixed
2018-08-02 18:55:49 +03:00
Mikhael Bogdanov 6c65507f29 Mute inline tests 2018-08-02 13:19:25 +02:00
Mikhael Bogdanov 9ccb25789b Unmute jvm-ir inline tests 2018-08-02 13:19:24 +02:00
Roman Artemev c9b7db646c Temporary mute test with issue between coroutines and crossinline 2018-08-01 10:56:08 +03:00
Roman Artemev dac1fac957 Unmute working test 2018-08-01 10:55:21 +03:00
Svyatoslav Kuzmich 625983b28a [JS IR BE] Enum class lowering 2018-07-23 15:08:18 +03:00
Svyatoslav Kuzmich 1abb4f42ac [JS IR BE] Add ranges to runtime, rangeTo for primitive numbers 2018-07-17 20:18:29 +03:00
Anton Bannykh cf9ad635e1 JS: add more tests 2018-07-12 14:18:34 +03:00
Anton Bannykh 07b3b66fd9 JS IR: unmute tests 2018-07-10 13:34: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 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
Ilmir Usmanov eea95441c5 Add diagnostics tests. Forbid callable reference to coroutineContext
#KT-16908: Fixed
2018-07-05 15:08:42 +03:00
Roman Artemev d130ba6f44 [JS IR BE] Update test data 2018-07-03 19:14:00 +03:00
Mikhael Bogdanov b1693acfcd Unmute smap test in ir 2018-06-28 17:12:09 +02:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Anton Bannykh 04a2ffc0c1 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh 9039b75c25 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Roman Artemev f69bd54d6c [JS IR BE] Update test data 2018-06-19 17:09:31 +03:00
Anton Bannykh b551afb202 JS IR: minor fix for callable ref translation
The caching variable has to have no initializers so that there is no
dependence on evaluation order.
2018-06-18 13:15:19 +03:00
Anton Bannykh 43e3314255 JS IR: Remove inline functions with reified type parameters
Otherwise we cannot handle type casts
2018-06-18 13:15:19 +03:00
Anton Bannykh 3808d77bf4 JS IR: inliner 2018-06-18 13:15:19 +03:00
Ilmir Usmanov 8a5ae16947 Generate separate methods for inline and noinline uses of inline suspend functions
Previously, inline suspend functions were effectively inline only,
but ordinary inline functions can be used as noinline.
To fix the issue, I generate two functions: one for inline with suffix
$$forInline and without state machine; and the other one without any
suffix and state machine for direct calls.
This change does not affect effectively inline only suspend functions,
i.e. functions with reified generics, annotated with @InlineOnly
annotation and functions with crossinline parameters.
 #KT-20219: Fixed
2018-06-13 15:08:19 +03:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Yan Zhulanow 5f43808cfd Revert "Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064)" 2018-06-08 19:37:20 +03:00
Ilmir Usmanov f568149863 Implement new assert semantics in back-end
Previously, assert was just a regular function and its argument used to
be computed on each call (even if assertions are disabled on JVM).
This change adds support for 3 new behaviours of assert:
* always-enable (independently from -ea on JVM)
* always-disable (independently from -ea JVM)
* runtime/jvm (compile the calls like javac generates assert-operator)
* legacy (leave current eager semantics) - this already existed

Default behaviour is legacy for now.

The behavior is changed based on -Xassertions flag.
 #KT-7540: Fixed
2018-05-21 20:43:37 +03:00
Mikhail Zarechenskiy b25a1d9522 Support inline functions inside inline classes 2018-05-07 15:25:46 +03:00
Ilya Gorbunov bea94d1d59 Update line numbers of inlined stdlib functions after updating copyright
This should not be needed, see KT-23862
2018-04-26 21:57:50 +03:00
Ilmir Usmanov 3cceb13d04 Update inliner test after changing bootstrap compiler 2018-04-23 21:52:00 +03:00
Ilmir Usmanov f60787d57c Move coroutines to kotlin.coroutines package: tests
Introduce COMMON_COROUTINES_TEST directive.
Every test with this directive is run twice: one time with
language version 1.2 and kotlin.coroutines.experimental package
and the other time with language version 1.3 and kotlin.coroutines
package. Each run is a separate method: with suffixes _1_2 and _1_3
respectively.
However, since codegen of release coroutines is not supported in JS
backend, we generate only one method: with suffix _1_2.
 #KT-23362
2018-04-23 21:51:59 +03:00
Yan Zhulanow 95684b9ecb Minor: Fix codegen tests for smap 2018-04-09 19:45:49 +03:00
Yan Zhulanow eec9c6bffa Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064) 2018-04-02 19:14:14 +03:00
Ilmir Usmanov 826d667398 Remove redundant locals
Do not transform already transformed suspend lambdas
Ignore duplicates of continuation in local variable table during redundant locals elimination.
2018-03-16 16:26:14 +03:00
Ilmir Usmanov 81f3e39f29 Do not generate ACONST_NULL as continuation of crossinline suspend lambda 2018-03-16 16:26:13 +03:00
Ilmir Usmanov 6854135077 Support crossinline suspend lambda as parameter of inline function
Use fake continuation instead of ALOAD 0 while inlining
Do not generate state machine for inner lambdas and inner objects,
which capture crossinline suspend lambda.

 #KT-19159: Fixed
2018-03-16 16:26:11 +03:00
Mikhael Bogdanov c1c8660e55 Don't try to transform sam wrappers in same module
#KT-22304 Fixed
2018-03-08 11:50:08 +01:00
Mikhael Bogdanov d732f0e160 Never delete types from inline functions during inline transformations
#KT-19399 Fixed
2018-02-16 16:48:53 +01:00
Mikhael Bogdanov 0954d1ab1b Don't generate hash in sam wrapper class name
#KT-17091 Fixed
2018-02-08 10:11:48 +01:00
Dmitry Savvinov b29a6e48fb Refactor language features, which control effect system
- Introduce new language feature 'ReadDeserializedContracts', which
allows to deserialize contracts from metadata.

- Introduce new language feature 'AllowContractsForCustomFunctions',
which allows reading contracts from sources.

- Use new features instead of combination 'CallsInPlaceEffect ||
ReturnsEffect'

- Rename 'CallsInPlaceEffect' -> 'UseCallsInPlaceEffect',
'ReturnsEffect' -> 'UseReturnsEffect'. As names suggest, they control
if it is allowed to use corresponding effect in analysis.

We have to introduce separate 'ReadDeserializedContracts' to enable
contracts only in some modules of the project, because libraries are
read with project-wide settings (see KT-20692).
2018-01-26 11:30:44 +03:00
Mikhael Bogdanov 50608d0844 Don't delete nested default lambda classes during inline transformation 2017-12-21 12:52:29 +01:00