Alexey Andreev
dbfa3fce2a
Fix running tests in node.js
2017-04-11 16:15:24 +03:00
Alexander Udalov
3430059b3a
Minor, refactor TargetPlatformDetector.getPlatform
...
Inline dangerous getPlatform(PsiFile) method to prevent it from being
called accidentally instead of getPlatform(KtFile)
2017-04-11 16:06:56 +03:00
Zalim Bashorov
5f0e896843
Minor: simplify isVisible of Visibilities.INTERNAL and write comment on non-obvious line
2017-04-11 15:47:02 +03:00
Zalim Bashorov
712b2c8117
Add tests for KT-12199 to prevent regression
...
#KT-12199 Obsolete
2017-04-11 15:46:13 +03:00
Nikolay Krasko
ab2dbba249
Abstract class icon added (KT-7810)
...
#KT-7810 Fixed
2017-04-11 14:28:11 +03:00
Nikolay Krasko
6898176b43
Abstract extension function added
2017-04-11 14:28:10 +03:00
Denis Zharkov
1596f19fd7
Add javaslang library to kotlin-plugin artifact
...
This change should be contained in 5e449fdc02
But I've forgotten to apply it
2017-04-11 12:52:52 +03:00
Nikolay Krasko
cee54a4111
Revert "Workaround for building against jars from both JDK 6 and JDK 8 on TeamCity"
...
This reverts commit 0cf1c8d900 .
2017-04-11 12:33:07 +03:00
Nikolay Krasko
cc3b6998b1
Minor: fix warnings in KotlinTypeMapper.java
2017-04-11 12:33:07 +03:00
Nikolay Krasko
172bee58b4
Expose connection between mangling internal names in backend and jdiEval
2017-04-11 12:33:07 +03:00
Nikolay Krasko
42868b1364
Fix evaluate for internal functions (KT-15854)
...
#KT-15854 Fixed
2017-04-11 12:33:07 +03:00
Nikolay Krasko
9eae9aa938
Minor: fix warnings and refactoring
2017-04-11 12:33:07 +03:00
Alexey Sedunov
9979c6e361
Move: Fix processing of callable references to Java constructors
2017-04-11 12:11:51 +03:00
Alexey Sedunov
bdaf73411a
Move: Extract MoveToKotlinFileProcessor class
2017-04-11 12:11:50 +03:00
Alexander Udalov
cb4d2994a3
Drop CompilerMessageLocation.NO_LOCATION, use null everywhere instead
2017-04-11 12:08:31 +03:00
Alexander Udalov
861d9a1620
Use null instead of CompilerMessageLocation.NO_LOCATION in MessageCollector
2017-04-11 12:08:31 +03:00
Alexey Sedunov
411a8dc206
Move: Remove duplicating conflict messages from test data
2017-04-11 11:45:13 +03:00
Alexey Sedunov
cd6177534a
Move: Add conflict checking for "Move packages" case
2017-04-11 11:45:12 +03:00
Alexey Sedunov
e21ff23e26
Move: Add conflict checking for "Move directory with classes" case
2017-04-11 11:45:11 +03:00
Alexey Sedunov
87a12ee1c7
Move: Check for conflicts using entire collections of elements to move
2017-04-11 11:45:10 +03:00
Alexey Sedunov
358b5fe548
Move: Force package name change when moving Java files
...
Package statement in Java file is updated too late
when moving the entire containing directory, so we force it
with intercepting MoveFileHandler implementation
2017-04-11 11:45:08 +03:00
Alexey Sedunov
3007b11973
Move: Use MoveFilesWithDeclarationProcessor for files & directories
2017-04-11 11:45:07 +03:00
Alexey Sedunov
22a56a81b9
Move: Drop obsolete code
2017-04-11 11:45:06 +03:00
Alexey Sedunov
f5d106a68f
Refactoring: Drop obsolete KotlinFileReferencesResolver class
2017-04-11 11:45:05 +03:00
Alexey Sedunov
7f115343f9
Kotlin Facet: Drop Gradle/Maven-based version info providers
...
They are obsolete since compiler/library version can be detected
based on module dependencies generated on external model import
2017-04-11 11:45:04 +03:00
Denis Zharkov
aaddc34b54
Optimize control-flow analysis algorithm
...
There's no need to recalculate results if all of the
previous instructions' results remain unchanged.
It's a crucial optimizations because otherwise algorithm
can degrate to O(n * m) [n - instructions number, m - variables number]
even in a linear code like this:
var a_1 = 1
var a_2 = 1
...
var a_m = 1
We perform analysis iteration once, then we repeat it to be sure
that no changes happened and here for each instruction we're
starting to check if recomputed value is the same, that basically
compares maps of all the variables, so it works O(n * m)
After this change on the second iteration we won't recompute new values
as none of predecessor has been changed
2017-04-11 11:26:11 +03:00
Denis Zharkov
5e449fdc02
Optimize control-flow analysis by use of persistent maps
...
The case that it's worth to optimize is functions
with a lot of variables.
After debugging it's recovered that control-flow works nearly
O(n * m) where n is pseudocode size and m is a number of variables:
the algorithm performs O(n) copies of hashmap of size O(m)
Persistent maps should help because we don't need to perform a
copy of them, so the expected performance after the change is applied
is O(n log m)
We've tried pcollections and javaslang, and the latter one has demonstrated
better results
See results before and after optimizations
before:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/3da7ba45a704969653d70b50995f730e968540d8/reports/benchmarks-many-vars-2017-03-14.txt
after with pcollections:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/3da7ba45a704969653d70b50995f730e968540d8/reports/benchmarks-many-vars-persistent-optimizations-2017-03-17.txt
after with javaslang:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/d22a871b175b291fb337b51ef6465ba70bbfd96c/reports/benchmarks-many-vars-javaslang-2017-04-07.txt
2017-04-11 11:26:11 +03:00
Yan Zhulanow
9e61eea758
Support inline properties in debugger class search
2017-04-10 23:25:55 +03:00
Yan Zhulanow
cb9e90183a
Debugger: Fix AbstractPositionManagerTest
...
MockReferenceType can't be used anymore because the new DebuggerClassNameProvider requires much more from it.
The new SmartMockReferenceType implements methods such as nestedTypes() or allLineLocations() properly.
Also, as PositionManager can return more than one class, we should check if any of the classes it returned matches the pattern.
2017-04-10 23:25:54 +03:00
Yan Zhulanow
622430a296
Debugger: Fix AbstractPositionManagerTest
...
MockReferenceType can't be used anymore because the new DebuggerClassNameProvider requires much more from it.
The new SmartMockReferenceType implements methods such as nestedTypes() or allLineLocations() properly.
Also, as PositionManager can return more than one class, we should check if any of the classes it returned matches the pattern.
2017-04-10 23:25:53 +03:00
Yan Zhulanow
fe3c1aff8b
Debugger: Classes for callable references should be treated as synthetic
2017-04-10 23:25:52 +03:00
Natalia Ukhorskaya
42e14961de
Debugger: Find classes using its inner classes (initial implementation)
2017-04-10 23:25:51 +03:00
Yan Zhulanow
3ee65ac499
Kapt: Support specifying javac options (KT-17245)
2017-04-10 22:48:17 +03:00
Sergey Igushkin
8cdb08cbfe
Fixed duplicated kapt options caused by multiple call to args setup
...
Separated kapt args from other plugin options.
Issues: #KT-16965 Fixed
Fix indentation
2017-04-10 20:59:23 +03:00
Sergey Igushkin
ea3adb0629
Implemented resolving the compiler jar using the class loader
...
Added resolving the compiler jar using the class loader urls as the
first step with the fallback to the original resolution method. Also
helps if the compiler is not present in the classpath dependencies.
Issues: #KT-16580 Fixed
Changed to getting plugin version from the applied plugin instead of
the plugin JAR name.
Removed unnecessary working with version of AbstractKotlinPlugin.
2017-04-10 20:55:19 +03:00
Sergey Igushkin
bda59e58d5
Filling in and reverting annotationProcessor
...
Added reverting processor path back.
Appending processor path instead of setting it.
Issues: #KT-17255 Fixed
(cherry picked from commit 843844b)
Added a test checking that -processorpath is set for all Gradle versions
2017-04-10 20:50:34 +03:00
Sergey Igushkin
64278a06cc
Refactoring in AnnotationProcessingManager.kt.
2017-04-10 20:45:03 +03:00
Sergey Igushkin
80daae90e3
Partial fix for the processor path not being set up properly.
...
Issues: #KT-17255
2017-04-10 20:44:12 +03:00
Alexey Tsvetkov
e7e29f2651
Avoid changing java.rmi.server.hostname property
2017-04-10 20:39:34 +03:00
Alexey Tsvetkov
54ee779ba1
Import 'implement' dependency of platform project transitively
...
#KT-16926 fixed
2017-04-10 20:25:48 +03:00
Ilya Gorbunov
e9c47d6498
Minor: validate required environment variables are set.
2017-04-10 19:46:06 +03:00
Ilya Gorbunov
3425f6d3af
Remove dist-quick as it fails on terminal steps anyway.
...
Add compiler-for-maven packing step to dist-quick-compiler-only.
2017-04-10 19:46:06 +03:00
Ilya Gorbunov
37e046f6cd
Provide shortcuts for producing quick compiler for maven and rebuilding stdlib-js from ant.
2017-04-10 19:46:06 +03:00
Ilya Gorbunov
afba967fcf
Use kotlin-stdlib.jar instead of kotlin-runtime.jar as runtime during build
2017-04-10 19:46:06 +03:00
Dmitry Jemerov
655fe87d43
Remove obsolete code for deleting script/kotlin.js
2017-04-10 17:34:13 +02:00
Dmitry Jemerov
62eb9e9909
Check jar name before calling getVirtualFileForJar()
...
#KT-17331 Fixed
2017-04-10 17:32:30 +02:00
Dmitry Jemerov
406714a1f4
Remove warning for running the compiler under Java 6/7
...
Now the compiler won't even start, so no need to check this manually.
2017-04-10 17:30:03 +02:00
Dmitry Jemerov
5a7278b856
Fix test: update Android build tools to release version
2017-04-10 16:13:31 +02:00
Mikhail Zarechenskiy
438f318d3e
Minor, update test data
2017-04-10 16:35:00 +03:00
Mikhael Bogdanov
b51cb9a911
Delete clean reference instructions on dereferencing captured variables
...
Codegen generates clean instructions for ref values (captured vars)
on block exit so we should delete them on dereferencing captured values.
#KT-17200 FIXED
2017-04-10 16:35:03 +05:00