Commit Graph

1160 Commits

Author SHA1 Message Date
Alexey Andreev 9218b61141 Add tests for source maps in JS BE 2017-05-30 12:12:27 +03:00
Alexey Andreev 383e273fed In LightAnalysisModeTestGenerated skip tests ignored in JVM
When a test is marked as ignored in JVM BE (i.e. IGNORE_BACKEND: JVM)
it's ignored in LightAnalysisModeTestGenerated. This means that
this tests is expected to fail. However, often tests that fail
in JVM blackbox tests, don't fail in LAMTG, therefore it's reasonable
to skip these tests in LAMTG at all.
2017-05-29 15:30:27 +03:00
Alexey Andreev e2fc808d83 Add simple test infrastructure for JS DCE
Add test infrastructure that allows to test handwritten JS
to test various small aspects of DCE, as opposed to box tests
which test kotlin stdlib + kotlin generated examples
2017-05-26 18:20:30 +03:00
Alexey Andreev 8a8fdf1968 Command-line tool for JS DCE 2017-05-26 18:20:17 +03:00
Alexey Andreev 0e31c14a86 Implement inlining of default parameters in JS BE
Fix KT-17910
2017-05-25 14:38:53 +03:00
Valentin Kipyatkov 40bbf82a41 Hint action to update usages on cut/paste of top-level declarations 2017-05-24 16:49:37 +03:00
Alexey Sedunov a80fb6f20f Copy: Report module accessibility conflicts 2017-05-18 14:22:39 +03:00
baratynskiy 5eea3b6569 Introduce experimental -Xuse-javac compilation mode
In this mode, javac AST and Symbol files are used during
Kotlin compilation instead of PSI / binary stuff.
Later, they are reused for Java file compilation.
javac in this mode is integrated into kotlinc.
2017-05-17 17:48:17 +03:00
Denis Zharkov 63c5d85cf4 Optimize memory footprint for generated protobuf code
The problem was that an overload of CodedOutputStream.newInstance
without size uses 4000 as a default value, thus allocating
a 4k-sized byte array.
At the same time the array remained effectively unused
in the most cases since it only used for storing data
for unknown fields.

Because such arrays are being created for each read of
protobuf message, during compilation of IntelliJ project
it was producing 25% of redundant memory traffic.

Of course these arrays were all in the young gen, but still
they have some effect on GC
2017-05-17 14:34:11 +03:00
Pavel V. Talanov 1c5e7c4726 Make sure java completion doesn't suggest classes from builtIns
Fix an undesirable sideeffect of previous changes
2017-05-16 22:01:05 +03:00
Zalim Bashorov fb9d88315a Don't print unnecessary empty line separators when generate tests 2017-05-16 19:42:47 +03:00
Alexey Sedunov 92446df14a Copy: Support class copying
#KT-8180 Fixed
 #KT-9054 Fixed
2017-05-16 13:10:39 +03:00
Nikolay Krasko 861cac5b52 Better indent in multi-line strings (KT-17849)
Inspired by MultilineStringEnterHandler from https://github.com/JetBrains/intellij-scala
https://github.com/JetBrains/intellij-scala/blob/edb741f344afff063197b406ca0c7c266a26c436/src/org/jetbrains/plugins/scala/editor/enterHandler/MultilineStringEnterHandler.scala

 #KT-17849 Fixed
2017-05-12 17:34:05 +03:00
Yuli Fiterman 99b1bb98dc KT-7848: Literal copy/paste processor for Kotlin (#1074)
* KT-7848 Initial implementation of literal copy/paste processor for Kotlin

* KT-7847: Tests

* KT-7847: fix issues caught in unit tests with recognizing invalid template entries

* KT-7847: check for KtFile

* KT-7847:  fix capitalization for test data file names

* KT-7847:  Initial changes according as per review
2017-05-08 17:18:28 +03:00
Yan Zhulanow 254e8156ac NoArg: Initialize properties in noarg constructor (KT-16692) 2017-05-04 18:46:42 +03:00
Pavel V. Talanov ac92cf8bea Refactor: AnnotatedMembersSearchTest is now generated and J2K'ed 2017-05-02 15:40:21 +03:00
Pavel V. Talanov 7ef18fe5ba Tests: add some test cases for inheritor search
Refactor inheritor search tests to be generated
2017-05-02 15:40:19 +03:00
Alexander Udalov a519ab681a Add diagnostic tests against Java 9
These tests currently won't run if you don't have environment variable
JDK_9 set up
2017-04-27 20:35:14 +03:00
Mikhail Glukhikh 53e11cbeb5 Create test group: AbstractLocalInspectionTest
Goal is to have inspection tests that work on per-file per-case basis
Test group allow both inspection message control and local fixes control
2017-04-27 18:21:15 +03:00
Vyacheslav Gerasimov 49c8dfbb06 Add gutter icons for Android resource references
#KT-16843 Fixed
2017-04-26 18:38:29 +03:00
Alexey Andreev 83df21329f JS: add protobuf declarations for JS AST 2017-04-24 18:29:17 +03:00
Zalim Bashorov e1cf6445ee KJS: make OutputPrefixPostfixTest generated and migrate to BasicBoxTest 2017-04-24 17:59:08 +03:00
Zalim Bashorov 7eb882ed27 KJS: switch sourcemap tests to generated using BasicBoxTest 2017-04-24 17:59:07 +03:00
Denis Zharkov a5c352dc9f Add -Xuse-old-class-files-reading CLI argument
By default we use the fast implementation in CLI compiler,
but in the most of the tests the old one is enabled

Also add tests on CompiledJava with the fast class reading
implementation
2017-04-21 12:56:29 +03:00
Zalim Bashorov c021af0fef KJS: fix non-local return inside catch block 2017-04-19 20:20:21 +03:00
Ilya Gorbunov a87da4338f arrayIterators: Restore index to the previous value after NoSuchElementException has been thrown
Relates to #KT-17453
2017-04-19 18:12:58 +03:00
Vyacheslav Gerasimov 5b58a6f9e8 Add intentions Add/Remove/Redo parcelable implementation
#KT-17465 Fixed
#KT-12049 Fixed
2017-04-18 19:04:14 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +03:00
Zalim Bashorov 05c3e7e81d Don't export kotlin-reflect form util module and add it explicitly where it's required.
Also, remove kotlin-reflect form container module.

Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:31 +03:00
Alexander Udalov 78c0111c6e Drop cli-parser, use simple reflection-based parser instead
The main reason of this change is that major changes are required in how
command line arguments are parsed in kotlinc, and it's much easier to
make them in our own codebase (given that the code is short and simple
enough) than in a third-party library
2017-04-14 20:07:53 +03:00
Ilya Gorbunov e8e8bec342 Drop unneeded steps from updateDependencies
Do not download closure compiler for ant,
do not rebuild markdown anymore,
do not build protobuf-lite.
2017-04-08 08:31:07 +03:00
Alexander Udalov 3b8110f51c Minor, use "use" to automatically close JarFile
JarFile extends Closeable on JDK 8, so we can use "use" here now
2017-04-03 18:05:04 +03:00
Alexander Udalov 78e278ec4c Remove redundant type arguments for Java 8+ in compiler modules 2017-04-03 14:51:18 +03:00
Alexander Udalov d440f07111 Use Java 7+ diamond operator in compiler modules 2017-04-03 14:51:15 +03:00
Alexander Udalov 37f435da93 Use List.sort instead of Collections.sort 2017-04-03 14:50:33 +03:00
Alexander Udalov 5ebee6ceca Use Java 8 lambdas instead of anonymous classes in compiler modules 2017-04-03 14:49:23 +03:00
Alexander Udalov 34f0576135 Invoke "remove unnecessary final" intention in compiler modules 2017-04-03 14:26:52 +03:00
Alexey Sedunov 2eb912a30c Move: Convert AbstractMoveTest to light fixture test case
Extract multi-module move test to a separate class
2017-03-31 18:24:16 +03:00
Dmitry Petrov 2a97fb17ba Fix source information mapping in PsiSourceManager
Add tests for source information mapping

KT-17108 source information corrupted on PSI -> IR transformation
2017-03-29 13:03:38 +03:00
Dmitry Jemerov 6febe1e8a2 Convert RenameTest to light fixture test case
Extract multi-module rename test to a separate class.
2017-03-28 15:48:38 +02:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Pavel V. Talanov a81bac0b50 LightClassTest: test corner cases related to inherited visiblity
EA-99155
 #KT-16899 Fixed
2017-03-27 17:58:51 +03:00
Nikolay Krasko 9dfc92c55e Navigate to lambda declaration from generated 'it' (KT-16992)
#KT-16992 Fixed
 #KT-13013 In Progress
2017-03-23 13:37:05 +03:00
Alexander Udalov 579238c3be Remove deprecated declarations from project code, cleanup usages 2017-03-22 20:25:54 +03:00
Alexander Udalov 43f1c843ce Minor, fix typo in docs on built-ins 2017-03-22 13:27:38 +03:00
Yan Zhulanow 7a5f94129c Add ClassBuilderMode.KAPT3 tests 2017-03-21 20:49:36 +03:00
Yan Zhulanow c50881fd02 Refactoring: Extract light analysis tests from box tests 2017-03-21 20:49:34 +03:00
Ilya Gorbunov 87c055cc61 Fix progression iterators to respect the Iterator contract.
#KT-16923 Fixed
2017-03-20 20:13:54 +03:00
Mikhail Glukhikh 045a23ae10 Cleanup: apply "Convert lambda to reference" 2017-03-15 17:36:02 +03:00
Mikhail Glukhikh b121bf8802 Cleanup: fix some compiler warnings (mostly deprecations, javaClass) 2017-03-15 17:35:31 +03:00