Mikhael Bogdanov
d278a5c6d5
Move java 8+defaults tests to separate folder
2017-01-13 13:52:57 +01:00
Mikhael Bogdanov
0a363fd1a5
Introduced test flag: JVM8_TARGET_WITH_DEFAULTS
2017-01-13 13:52:56 +01:00
Mikhael Bogdanov
7f8acbb759
Use proper flag for interface method invocation
2017-01-13 13:52:55 +01:00
Mikhael Bogdanov
62514e126d
Enable jvm 1.8 platform in cli
2017-01-13 13:52:54 +01:00
Alexander Udalov
e3f4b6e77e
Do not allow to use suspend functions in 1.0.6+
2017-01-13 11:53:52 +03:00
Dmitry Petrov
4dd100122b
Explicitly remove NOPs inserted for bytecode analysis in post-conditional loops.
...
Remove redundant NOPs during bytecode optimization.
NOP instruction is required iff one of the following is true:
(a) it is a first bytecode instruction in a try-catch block (JVM BE assumption);
(b) it is a sole bytecode instruction in a source code line (breakpoints on that line will not work).
All other NOP instructions can be removed.
Note that it doesn't really affect the performance for mature JVM implementations.
However, the perceived quality of the generated code is somewhat improved :).
Related: KT-15609
2017-01-13 10:31:07 +03:00
Dmitry Petrov
ba933fa887
KT-15112, KT-15631
...
Revert changes for "tolerant to uninitialized values" in OptimizationBasicInterpreter:
this approach doesn't converge for some specific cases where local variable is reused
(e.g., in several inlined functions - see https://youtrack.jetbrains.com/issue/KT-15112 ).
Instead, treat fake always-false conditional jump in the beginning of the post-condition loop as a "reference point" for stack on loop break / continue.
This requires an extra abstraction layer in FixStackAnalyzer, since we can't perform fine-grain manipulations on Frames
(such as "combine frame C from local variables of frame A and stack of frame B").
NB additional NOPs will be generated for post-condition loops.
Should make a separate bytecode postprocessing pass to get rid of unnecessary NOPs
(several YT issues for perceived quality of the generated bytecode are about such NOPs).
2017-01-13 10:31:07 +03:00
Alexey Andreev
a016147a79
JS: fix translation of return statement surrounded by try..finally block in suspend lambda. See KT-15625
2017-01-12 18:12:39 +03:00
Alexey Andreev
10a3fbf53f
JS: disable TemporaryAssignmentElimination, fix KT-15512
2017-01-12 18:12:39 +03:00
Alexey Andreev
7d170c0fcd
JS: fix translation of reassignment of inline properties. See KT-15590
2017-01-12 18:12:38 +03:00
Alexey Andreev
4eed7c1fcb
JS: fix translation of augmented assignment in class initializer. See KT-15569
2017-01-12 18:12:38 +03:00
Alexey Andreev
ee74342fbe
JS: fix compiler crash when optimizing JS AST with empty do..while statement. See KT-15513
2017-01-12 18:12:37 +03:00
Alexey Andreev
bad6f41d6e
JS: make some JVM tests compatible with JS BE
2017-01-12 18:12:37 +03:00
Alexey Andreev
70176dfacc
JS: translate call arguments in the order the occur in source code, not in order of parameters in descriptor. See KT-15506
2017-01-12 18:12:36 +03:00
Alexey Andreev
e6b78f68cd
JS: support case when class inherits method from superclass and both implements same method (but with optional parameter) from superinterface.
2017-01-12 18:12:36 +03:00
Alexander Udalov
abe2ad155c
Sanitize names for script class files
...
Use the same process that is done for package parts in the JVM back-end, except
adding the "Kt" suffix
#KT-15225 Fixed
2017-01-12 11:24:24 +03:00
Ilya Gorbunov
dcd7f3eb57
Fix test data after introducing overloads #KT-15630
2017-01-11 14:33:17 +03:00
Mikhael Bogdanov
ec42b58877
Fix @PublishedApi checking
2017-01-11 11:50:34 +01:00
Mikhael Bogdanov
2931c316a3
Fix for KT-15575: VerifyError: Bad type on operand stack
...
#KT-15575 Fixed
2017-01-11 11:50:33 +01:00
Alexander Udalov
a3f6fbe0c1
Add test on contents of .kotlin_module files
2017-01-11 13:15:59 +03:00
Alexander Udalov
0dbb02ec6a
Fix generic signature for KFunctionN types on JVM
...
#KT-15473 Fixed
2017-01-11 13:15:24 +03:00
Svyatoslav Scherbina
4c3fb9a21f
psi2ir: improve backing field usage generation
...
Also update corresponding tests data.
2017-01-11 14:54:10 +07:00
Mikhail Glukhikh
b81268cca1
Control-flow analysis: do-while scope is ended after condition but before jump #KT-15334 Fixed
2017-01-10 17:57:43 +03:00
Mikhael Bogdanov
5071baf970
Support increment and '*=' operations on inline properties
2017-01-10 14:09:42 +01:00
Mikhael Bogdanov
043f3199c7
Fix for KT-15446: Property reference on an instance of subclass causes java.lang.VerifyError
...
#KT-15446 Fixed
2017-01-10 14:09:42 +01:00
Mikhael Bogdanov
dc4cdbf82d
Fix for KT-14162: Support @InlineOnly on inline properties
...
#KT-14162 Fixed
2017-01-10 14:09:41 +01:00
Alexander Udalov
32d2faf3d1
Fix KAnnotatedElement.findAnnotation when no annotation is found
...
#KT-15540 Fixed
2017-01-10 12:23:26 +03:00
Alexander Udalov
7107ee2eeb
Write/load subclasses of sealed classes in metadata
...
Note that now DeserializedClassDescriptor.getSealedSubclasses works a lot
faster than before, for all newly compiled sealed classes except empty ones. It
may be optimized further if we look at the metadata version of the file the
class was loaded from, however it's not easy currently because
DeserializedClassDescriptor is declared in common (non-JVM) code and has no
direct access to the binary version information.
This will also allow to add a reflection API to get subclasses of a sealed
class
#KT-12795 Fixed
2017-01-10 12:23:26 +03:00
Alexander Udalov
164c72e877
Prefer package with class files to class with the same name
...
See comments in JvmDependenciesIndexImpl and in the test
#KT-15464 Fixed
2017-01-10 12:23:25 +03:00
Mikhail Zarechenskiy
cff0865c87
Fix error type for implicit invoke with function literal argument
...
#KT-11401 Fixed
2017-01-10 11:44:51 +03:00
Mikhail Zarechenskiy
76b0b785c5
Prohibit to use enum entry as a type
...
#KT-14179 Fixed
2017-01-09 18:30:32 +03:00
Alexey Andreev
069711c3d5
JS: fix translation of float constants. See KT-8413
2016-12-30 16:22:07 +03:00
Alexey Andreev
900adcf29b
JS: prohibit stable (public) names with non-identifier chars. Rewrite unstable (private) names with non-identifier chars. See KT-4160
2016-12-30 16:21:18 +03:00
Mikhael Bogdanov
3384c6f603
Updated test data
2016-12-30 10:19:57 +01:00
Mikhael Bogdanov
e775cc697e
Fix for KT-15447: Compiler backend error: "Don't know how to generate outer expression for class"
...
#KT-15447 Fixed
2016-12-29 16:57:03 +01:00
Mikhael Bogdanov
2566a7a25e
Rename receiver$0 in CallableReference to receiver
...
#KT-15449 Fixed
2016-12-29 16:57:02 +01:00
Alexey Andreev
07de819377
Regenerate tests and test data
2016-12-29 16:15:49 +03:00
Alexey Andreev
175d37fdc8
JS: add test to prove that KT-13523 is no more reproducible
2016-12-29 16:00:54 +03:00
Alexey Andreev
27c2a4f6a8
JS: disable mangling for PublishedApi. Export declarations marked with PublishedApi. See KT-15442
2016-12-29 16:00:51 +03:00
Alexey Andreev
ed7ac7cea9
JS: do not report declaration clash when common redeclaration diagnostic applies. See KT-14577
2016-12-29 16:00:36 +03:00
Alexey Andreev
1af01d0ecb
JS: make call to suspend lambda to resume it immediately. See KT-15379
2016-12-29 16:00:35 +03:00
Alexey Andreev
79ba6a57d6
JS: report errors on different external items:
...
* data classes
* val/var parameters of primary constructors
* enum entry with body
* anonymous `init {}` block in classes
2016-12-29 16:00:35 +03:00
Alexey Andreev
03682ee849
JS: fix how module checker handles super classes
2016-12-29 16:00:34 +03:00
Alexey Andreev
1a7e8b0690
JS: allow to omit delegated constructor call for external classes in common FE. Prohibit delegated constructor call for external classes in JS FE.
2016-12-29 16:00:33 +03:00
Alexey Andreev
02ea1a4d64
JS: split error diagnostic about body of external declaration into three different diagnostics (additional ones: wrong initializer, wrong default value of parameter).
2016-12-29 16:00:32 +03:00
Alexey Andreev
6ef4a3389e
JS: prohibit external functions and accessors with bodies other than noImpl. Prohibit to use anything except noImpl for default parameters initializers in external functions. See KT-13892
2016-12-29 16:00:30 +03:00
Alexey Andreev
55d4c0e439
JS: prohibit non-abstract members of external interfaces, except for nullable properties. See KT-15308
2016-12-29 16:00:30 +03:00
Alexey Andreev
403753f5b5
JS: prohibit inline external declarations. See KT-15307
2016-12-29 16:00:29 +03:00
Alexey Andreev
84f094c770
JS: prohibit to implement functional interfaces. See KT-15136
2016-12-29 16:00:29 +03:00
Ilya Gorbunov
0a840d0174
Migrate 1.1 reflection API usages in tests.
2016-12-29 06:51:01 +03:00