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
Denis Zharkov
b939530a5c
Minor, Rename isEmpty -> isImplicit
2015-03-27 16:09:42 +03:00
Denis Zharkov
18e40d034e
Change contract of getDelegationCall to @NotNull
...
Its existence guaranteed by parser
2015-03-27 16:09:42 +03:00
Denis Zharkov
8c048c3e43
Refine recovery for constructors
2015-03-27 16:09:41 +03:00
Denis Zharkov
b1de2066c7
Add quickfixes inserting explicit delegation calls
...
#KT-6963 Fixed
2015-03-27 16:09:41 +03:00
Denis Zharkov
d0c72c2c3d
Mark value arguments in case of empty delegation call
...
It's useful for quickfixes for these diagnostics
2015-03-27 16:09:41 +03:00
Denis Zharkov
1a2167e062
Minor, always report diagnostics on callee expression
...
As these kinds of diagnostic always have non-empty callee expression
2015-03-27 16:09:41 +03:00
Denis Zharkov
555f9e7c06
Minor, move isEmpty, isCallToThis to JetConstructorDelegationCall
2015-03-27 16:09:41 +03:00
Denis Zharkov
023e1a13a9
Do not try to detect cycles if delegation call resolution is unsuccessful
2015-03-27 16:09:41 +03:00
Denis Zharkov
9da88bbd0f
Check if element is valid before checking it's writable
...
Otherwise it may lead to exception
2015-03-27 16:09:41 +03:00
Denis Zharkov
7aa2642a2b
Unify reporting resolution errors for empty delegation calls
...
- Always report "There is no applicable constructor for call without arguments in superclass"
under `constructor` keyword by replacing default TracingStrategy
- Remove positioning strategy used for reporting non-applicable
for empty delegation calls
#KT-6971 Fixed
2015-03-27 16:09:41 +03:00
Denis Zharkov
683bc4709f
Add test case: 'platformStatic' on constructors
2015-03-27 16:09:41 +03:00
Denis Zharkov
ce3bf423ad
Prohibit 'native' annotation on constructors
...
Currently doesn't work for primary ones
#KT-7000 Fixed
2015-03-27 16:09:41 +03:00
Denis Zharkov
29b03e8175
Report illegal modifiers on secondary constructors
2015-03-27 16:09:41 +03:00
Denis Zharkov
66023e6f31
Prohibit platformName on secondary constructor
...
#KT-6999 Fixed
2015-03-27 16:09:41 +03:00
Denis Zharkov
8aa4e9bd94
Report error for inappropriate modifiers usages
2015-03-27 16:09:40 +03:00
Denis Zharkov
01e5ee718f
Allow secondary constructors without body
...
#KT-6967 Fixed
2015-03-27 16:09:40 +03:00
Alexander Udalov
3f0541924f
Revert "Fix byte array memory leak from MemoryBasedClassLoader"
...
This reverts commit 58b033d9fb .
2015-03-27 15:28:52 +03:00
Alexey Sedunov
dcfefb0847
Extract Function: Do not extract extension function reference as parameter
2015-03-26 23:11:51 +03:00
Alexey Sedunov
4ec1b9971f
Parser: Do not produce JetQualifiedExpression without receiver
...
#KT-7122 Fixed
2015-03-26 23:11:50 +03:00
Stanislav Erokhin
cbcd2c3cce
Fixed formatter for function expression
2015-03-26 22:08:46 +03:00
Stanislav Erokhin
daa437b535
Fix JetTreeVisitor for file case
2015-03-26 22:08:46 +03:00
Stanislav Erokhin
faf7922884
Migrate AddInitKeywordFix & ClassObjectToDefaultObjectFix to JetWholeProjectModalAction
2015-03-26 22:08:46 +03:00
Stanislav Erokhin
f40b503454
Create DeprecatedLambdaSyntaxFix for whole project
2015-03-26 22:08:45 +03:00
Stanislav Erokhin
3fd8c5e980
Minor. Divide method moveInsideParenthesesAndReplaceWith
2015-03-26 22:08:45 +03:00
Alexander Udalov
58b033d9fb
Fix byte array memory leak from MemoryBasedClassLoader
...
40 Mb of bytes of preloaded compiler classes during the compilation become 16
Mb after this change
2015-03-26 21:42:05 +03:00
Alexander Udalov
30916e37ce
Move bootstrap runtime copying to 'prepare-dist' to fix dist-quick
2015-03-26 21:38:05 +03:00
Alexander Udalov
fd48b4dd04
Minor, drop unneeded code in findClassInJava
...
JavaClassFinderImpl already checks that it never finds light classes and
ReflectJavaClassFinder can't ever find them
2015-03-26 21:34:53 +03:00
Pavel V. Talanov
f3191a39a5
Do not store instances of Application in strong static references
...
Introduce ExtensionProvider which takes care of caching application using weak reference
Fixes a memory leak for scenarios with application being substituted (Jps build does that when compiling multiple modules)
2015-03-26 21:09:11 +03:00
Dmitry Jemerov
827d9d48c1
Correctly apply SAM conversions in superclass constructor calls
...
#KT-5452 Fixed
2015-03-26 19:03:42 +01:00
Evgeny Gerashchenko
da9fe7d9a9
Updated URL pattern for IDEA EAP page
2015-03-26 18:28:08 +03:00
Yan Zhulanow
1338e0cd0a
Replicate IDEA plugin versions only on TeamCity build
2015-03-26 16:12:10 +03:00