Commit Graph

2097 Commits

Author SHA1 Message Date
Alexey Andreev
2cc299fb40 JS: refactor coroutines to support inlining of suspend functions 2016-11-16 19:29:34 +03:00
Alexey Andreev
e56d735723 JS: refactor how last argument to suspend call is substituted 2016-11-16 19:29:33 +03:00
Alexey Andreev
e7f044be92 JS: enable coroutine tests that don't enter infinite loop anymore 2016-11-16 19:29:32 +03:00
Alexey Andreev
d5a808dff6 JS: implementing try/finally in coroutines 2016-11-16 19:29:31 +03:00
Alexey Andreev
674e5df7f1 JS: make coroutine tests cross-platform 2016-11-16 19:29:30 +03:00
Alexey Andreev
c5999e8375 JS: prototyping coroutines 2016-11-16 19:29:27 +03:00
Ilya Gorbunov
4769ed5f79 Fix imports in tests: do not use java.util.* stuff 2016-11-16 18:47:42 +03:00
Ilya Gorbunov
daac46bce5 Fix rendering in test output after introducing type aliases for the types used in those tests. 2016-11-16 18:47:42 +03:00
Zalim Bashorov
eda8749b91 Mute without checks all diagnostic tests for tailrec since it's not supported in JS yet and it takes too much time when muted with checks 2016-11-15 22:11:09 +03:00
Zalim Bashorov
bde9f99d7c Unmute already worked tests and regenerate tests 2016-11-15 22:11:09 +03:00
Alexander Udalov
eedad9194e Drop KParameter.isNoinline, KParameter.isCrossinline
There seems to be no valuable use cases for them at the moment
2016-11-15 11:01:17 +03:00
Alexander Udalov
7e82d139cf Drop KFunction.isTailrec
The fate of this modifier seems unclear, and there doesn't seem to be any
valuable use cases for it in reflection
2016-11-15 11:01:16 +03:00
Denis Zharkov
6fca46a452 Allow inferring property type from its getter
#KT-550 Fixed
2016-11-15 09:30:13 +03:00
Mikhael Bogdanov
61da8be260 Generate parameters metadata for java 8 reflection 2016-11-14 14:27:08 +01:00
Dmitry Petrov
b429f7bc86 KT-14581 Make FixStackAnalyzer tolerant to uninitialized values 2016-11-11 13:30:15 +03:00
Dmitry Petrov
6876f0e4d2 Support type aliases as bare types after 'is/as'. 2016-11-10 18:33:50 +03:00
Mikhael Bogdanov
21f2febf82 Fix for KT-13557: VerifyError with delegated local variable used in object expression
#KT-13557 Fixed
2016-11-10 15:12:16 +01:00
Zalim Bashorov
afa58599ec Specify target backend as JVM for SAM tests; mute other failed tests and regenerate tests. 2016-11-10 13:27:54 +03:00
Zalim Bashorov
41bd276814 Mute some new tests for JS and regenerate tests 2016-11-09 21:51:33 +03:00
Zalim Bashorov
a27572af49 Fix failed tests 2016-11-09 21:41:12 +03:00
Zalim Bashorov
afe6ec92a4 Break infinity loop in the test 2016-11-09 21:41:12 +03:00
Zalim Bashorov
ee129bebb6 Automatically mute failed generated tests from compiler/testData/codegen/box/ranges 2016-11-09 21:41:12 +03:00
Zalim Bashorov
596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Denis Zharkov
55508afb8c Make initial continuation able to be resumed with exception
#KT-14719 Fixed
2016-11-09 16:26:32 +03:00
Denis Zharkov
ae70a60a0a Validate label value of coroutine in case of no suspension points
#KT-14718 Fixed
2016-11-09 16:26:32 +03:00
Denis Zharkov
bd5c08f598 Make fields for storing lambda parameters non-final
Because they get assigned within `invoke` call that contradicts with JVM spec
where it's told that they must not be assigned outside of constructors
2016-11-09 12:25:31 +03:00
Denis Zharkov
e54b466010 Make fields representing variables in coroutines non-volatile
#KT-14636 Fixed
2016-11-09 12:25:31 +03:00
Denis Zharkov
7e49db8768 Introduce CoroutineImpl as a common super class for coroutines
The main benefit are class-files sizes for them
(not repeating the same declaration for each coroutine)
Also it helped to simplify coroutine codegen code a little

Note that controller/label field become non-volatile (see KT-14636)

 #KT-14636 In Progress
2016-11-09 12:25:31 +03:00
Ilya Gorbunov
6656d10c67 Fix tests: do not refer to removed things. 2016-11-07 21:39:41 +03:00
Ilya Gorbunov
a895702730 Remove js classes that should not be there 2016-11-07 21:35:27 +03:00
Alexander Udalov
3db459c1d8 JS: drop Collections.reverse and java.util.Collections altogether 2016-11-07 12:27:54 +03:00
Michael Bogdanov
fd6d4c352c Special enum function support; Fix for KT-10569: Cannot iterate over values of an enum class when it is used as a generic parameter
#KT-10569 Fixed
2016-11-03 14:27:13 +03:00
Anton Bannykh
2fb7b01320 Fix capturing variables declared via destructuring (#KT-14535 fixed). 2016-11-01 14:00:24 +03:00
Anton Bannykh
6a1b0b9cbc withNonLocalReturn.kt was disabled for a wrong reason; reported the actual issue and fixed the comment 2016-10-27 17:27:03 +03:00
Anton Bannykh
7ee3baa020 Replaced when appropriate 'TARGET_BACKEND: JVM' -> 'IGNORE_BACKEND: JS'. Enabled some succesfully working decompiledText tests. 2016-10-27 14:17:25 +03:00
Alexander Udalov
455fef90c0 Fix codefen test case by adding stdlib 2016-10-27 10:44:33 +03:00
Anton Bannykh
a3566174d6 Support destructuring in lambda parameters (KT-14422) and skipping some components in a destructuring declaration (KT-14507). 2016-10-26 18:29:13 +03:00
Ilya Gorbunov
98f7c61333 Reuse JVM box tests for binary operations in JS, excluding those that can't pass now. 2016-10-26 16:36:09 +03:00
Ilya Gorbunov
62fb47d137 Introduce bitwise operations and/or/xor/inv for Byte and Short. #KT-13554
Annotate new bitwise operations with SinceKotlin.
2016-10-26 16:35:46 +03:00
Michael Bogdanov
eaf9c2e8b0 Fix for KT-13890: IllegalAccessError when invoking protected method with default arguments
#KT-13890 Fixed
2016-10-26 12:13:20 +03:00
Michael Bogdanov
1e59161e8f Fix for KT-14201: UnsupportedOperationException: Don't know how to generate outer expression for anonymous object with invoke and non-trivial closure
#KT-14201 Fixed
2016-10-26 12:13:19 +03:00
Alexander Udalov
035d6156a7 Drop Cloneable in JS, synthesize it at compile-time on JVM
Use the same approach that is used for creating function type classes
(Function{0,1,...}) + add Cloneable to supertypes of Array and primitive arrays

 #KT-5537 Fixed
2016-10-25 15:42:33 +03:00
Denis Zharkov
b7e8071a7d Do not use BasicInterpreter for bytecode analysis
The problem with BasicInterpreter is the following:
it creates BasicValue objects that should be replaced in favor of StrictBasicicValue

See commit message in 25c6ac1 for clarification

 #KT-14447 Fixed
2016-10-25 10:14:52 +03:00
Denis Zharkov
3a197e8d7e Fix NPE caused by nullability checks optimizations
Mostly this commit replaces instances of original BasicValue from ASM
with ones of StrictBasicValue having strict equals implementation

Optimization issue was related to non-symmetric 'equals':
- NotNullBasicValue("java/lang/Object").equals(BasicValue("java/lang/Object")) == false
- BasicValue("java/lang/Object").equals(NotNullBasicValue("java/lang/Object")) == true

 #KT-14242 Fixed
2016-10-25 10:14:52 +03:00
Denis Zharkov
a9fcee098d Support single-underscore named variables in JVM backend
There are mainly two kind of changes:
- skipping 'componentX' calls for destructuring entries named _
- fixing local variable table for them
 - skip entries for destructuring entries named _
 - use $noName_<i> format for lambda parameters named _

 #KT-3824 Fixed
 #KT-2783 Fixed
2016-10-24 10:19:25 +03:00
Dmitry Petrov
c41ec1ddfb KT-14400: Properly handle TypeAliasConstructorDescriptor in KotlinTypeMapper.mapToCallableMethod(...)
Implement getDefaultType() in TypeAliasDescriptor subclasses.
2016-10-20 09:56:03 +03:00
Denis Zharkov
4793f71da2 Properly generate indices for destructured parameters in inline case
#KT-14399 Fixed
2016-10-19 16:05:50 +03:00
Dmitry Petrov
a5d6559056 KT-14360 Microoptimizations in RedundantCoercionToUnitTransformer 2016-10-17 10:13:03 +03:00
Dmitry Petrov
ac675784c1 KT-14357 Run RedundantCoercionToUnitTransformer before DeadCodeEliminatingMethodTransformer.
Remove empty try-catch blocks in DeadCodeEliminatingMethodTransformer.
2016-10-17 10:10:46 +03:00
Nikolay Krasko
87b628a3f7 Generate 'nop' instruction on lambda call when everything on line is going to be eliminated by inliner (KT-6477)
(cherry picked from commit 462bdb2)

 #KT-6477 Fixed
2016-10-14 14:52:06 +03:00