Commit Graph

21340 Commits

Author SHA1 Message Date
Valentin Kipyatkov c57f2b10d6 J2K: use of emptyList, emptySet and emptyMap 2015-03-31 16:10:23 +03:00
Valentin Kipyatkov 1465418c2b KT-7151 Convert 'System.out.println()' to just 'println()'
#KT-7151 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov 39f94d7d45 KT-6044 J2K: Convert numeric float literals to 0.2f instead of 0.2.toFloat() + more fixes related to literals and type transformations
#KT-6044 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov 5454f7053f KT-6349 J2K: Static members of enums should be converted to class object members
#KT-6349 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov f19eb20803 KT-5287 J2K: Convert class with private constructor and static functions to "object" instead of class with "class object"
#KT-5287 Fixed
2015-03-31 16:10:23 +03:00
Valentin Kipyatkov 6dbb13c32d KT-6798 J2K: Needless use of run {} function after converting for-loop
#KT-6798 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov 46193f3ef7 KT-5692 Java to Kotlin conversion: convert int range loops in reverse order + a few more improvements
#KT-5692 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov 16295b875b Removed methods not need anymore 2015-03-31 16:10:22 +03:00
Valentin Kipyatkov fb4075cc2f J2K: inlining intermediate variable after removing type cast 2015-03-31 16:10:22 +03:00
Valentin Kipyatkov e31648a4b6 KT-6476 Kotlin J2K converter fails with for-loops with continues
#KT-6476 Fixed
2015-03-31 16:10:22 +03:00
Valentin Kipyatkov 2d4055e921 J2K: generating of elvis operators instead of if's 2015-03-31 16:10:22 +03:00
Valentin Kipyatkov 0932cb4606 J2K: auto-replacing of if's with safe access 2015-03-31 16:10:22 +03:00
Valentin Kipyatkov 555ae1ebd3 J2K: no redundant type casts
#KT-6794 Fixed
2015-03-31 16:10:21 +03:00
Valentin Kipyatkov 7d92559d13 J2K: generating "!is" instead of !(.. is ..) 2015-03-31 16:10:21 +03:00
Valentin Kipyatkov 108a1f872c J2K: use of new syntax for class intialization blocks 2015-03-31 16:10:21 +03:00
Stanislav Erokhin 4bfdcae972 Fixed ideaSDK download logic. 2015-03-31 15:43:01 +03:00
Ilya Gorbunov 536a977f5c indexOfAny, lastIndexOfAny return an index value only (similar to indexOf, lastIndexOf).
findAnyOf, findLastAnyOf introduced to cover the case when an index and a matched string value is required.
2015-03-31 02:25:19 +03:00
Ilya Gorbunov bb8df6be4b Restore startsWith and endsWith overloads taking single char to keep binary compatibility with markdown parser. 2015-03-31 02:25:04 +03:00
Ilya Gorbunov b3165ac771 Rename split method to splitBy and revive old split implementation interpreting parameter as regex to provide the migration path. 2015-03-31 02:24:50 +03:00
Ilya Gorbunov b10d869cd7 indexOf*, split, startsWith, endsWith: JS implementation 2015-03-31 02:24:35 +03:00
Ilya Gorbunov d724ce3f7e Add code generation for asList methods in js.libraries. 2015-03-31 02:24:20 +03:00
Ilya Gorbunov abdac27b61 Modify split(String) usages within stdlib. 2015-03-31 02:24:06 +03:00
Ilya Gorbunov 6f7a4d8429 Add methods for String: indexOfAny, lastIndexOfAny, indexOf, lastIndexOf, rangesDelimitedBy, splitToSequence, split, lineSequence, lines.
Add methods for Char: toUpperCase, toLowerCase.
Add an optional boolean parameter ignoreCase to the methods Char.equals, String.equals, String.startsWith, String.endsWith, String.contains.
2015-03-31 02:23:52 +03:00
Alexey Sedunov e9e8be5b4e Create from Usage: Generate secondary constructors by delegator to super-calls 2015-03-30 21:10:29 +03:00
Alexey Sedunov e8b4c43011 Create from Usage: Generate secondary constructors by delegation calls 2015-03-30 21:10:28 +03:00
Alexey Sedunov 9c0bcee9a3 Create from Usage: Generate secondary constructors by call expressions 2015-03-30 21:10:27 +03:00
Alexey Sedunov 15dddf362e Create from Usage: Secondary constructor support 2015-03-30 21:10:25 +03:00
Alexey Sedunov 11675322ee Find Usages: Fix exception in the search of class with default parameters in primary constructor 2015-03-30 21:10:24 +03:00
Alexander Udalov 0a93cfc9c0 build.xml: drop 'generate.assertions' option
It was error-prone, not very useful (only a couple seconds saved on a 3min
build), and in fact did not work since 5194310d, because <skip> element was
failing inside the default javac
2015-03-30 20:20:46 +03:00
Alexander Udalov 52292fc360 Fix build, add dependencies idea-analysis, idea -> deserialization 2015-03-30 20:15:12 +03:00
Alexander Udalov 7742fb52e6 Minor, move builtins-serializer sources to correct package 2015-03-30 19:44:21 +03:00
Alexander Udalov d2ef040bcb Fix occasional reflection test failure
The cache in moduleByClassLoader.kt contains weak references to instances of
RuntimeModuleData. However, prior to this change no one else had any _strong_
reference to the corresponding RuntimeModuleData: KClassImpl depends on the
ModuleDescriptor almost directly. Therefore the weak references were sometimes
garbage collected and a new module was constructed for a new reflection object,
which resulted in broken equality between two reflection objects.

No test added because it was rather hard to come up with (and, more
importantly, to support) a test case.
2015-03-30 19:44:19 +03:00
Alexander Udalov d59e1ad7ac Minor, add toString() to WeakClassLoaderBox for debug 2015-03-30 19:44:18 +03:00
Alexander Udalov 32c3bb8c7f Extract module 'deserialization' out of 'serialization'
'deserialization' stays in core because it's needed both in compiler and
reflection, but 'serialization' is used only in the compiler
2015-03-30 19:44:17 +03:00
Alexander Udalov d09e0e73fa Rename NameSerializationUtil, move serialization-related code there 2015-03-30 17:22:07 +03:00
Alexander Udalov 085bc2197b Merge module 'serialization.jvm' into 'descriptor.loader.java'
It was very small and there proved to be no point in separation of loading Java
classes and deserializing Kotlin classes
2015-03-30 17:22:06 +03:00
Alexander Udalov b57e15f3a4 Move utilities from NameSerializationUtil to meaningful places 2015-03-30 17:22:06 +03:00
Alexander Udalov 485dce987c Fix byte array memory leak from MemoryBasedClassLoader
40 Mb of bytes of preloaded compiler classes during the compilation become 16
Mb after this change

This is a slightly reworked version of 58b033d (reverted in 3f05419). The
problem in that commit was that URLClassLoader did not work in the fashion
MemoryBasedClassLoader was designed to work (child first, parent last). So some
resource was found in an incorrect jar which was causing the compiler to break
2015-03-30 17:12:10 +03:00
Alexander Udalov 45da9555de Fix minor bug in MemoryBasedClassLoader#getResources()
Own resources and those from the parent class loader were not combined
2015-03-30 17:12:10 +03:00
Pavel V. Talanov d109facc6f Convert JetCoreEnvironment: migrate code in libraries 2015-03-30 15:13:05 +03:00
Pavel V. Talanov b73bd697e6 Rename JetCoreEnvironment -> KotlinCoreEnvironemnt 2015-03-30 15:11:58 +03:00
Pavel V. Talanov 5cb431c5c4 Convert JetCoreEnvironment: migrate other code 2015-03-30 15:11:57 +03:00
Pavel V. Talanov 2dcf935b99 Convert JetCoreEnvironment: clean up code 2015-03-30 15:11:57 +03:00
Pavel V. Talanov 0209acceb1 Convert JetCoreEnvironment: autoconvert 2015-03-30 15:11:56 +03:00
Pavel V. Talanov 49a0da7750 Convert JetCoreEnvironment: rename file 2015-03-30 15:11:56 +03:00
Natalia Ukhorskaya 785f7e749f InlineCodegen: find virtual file using findVirtualFileWithHeader 2015-03-30 14:03:24 +03:00
Mikhail Glukhikh ef6698bd52 Test fixed 2015-03-30 10:55:24 +03:00
Mikhail Glukhikh 5d7e388276 Fix of KT-7130 2015-03-30 10:55:21 +03:00
Dmitry Jemerov 1e536af87e correctly calculate the number of mask arguments required for a method with default arguments
#KT-6816 Fixed
2015-03-27 18:51:07 +01:00
Denis Zharkov 418034add3 Prohibit instance access before super call
- Before this change members just left unresolved as they were absent in the
  specific scope named scopeForSecondaryConstructorHeaderResolution that
  created just to prohibit such accesses.
- Now they are resolved the same way as other members, but diagnostic is
  repored by in-place injected CallChecker
- Drop obsolete type of class scope

 #KT-6995 Fixed
2015-03-27 20:15:00 +03:00