Commit Graph

11544 Commits

Author SHA1 Message Date
Mikhail Glukhikh 6e2395471d Sealed code generation: sealed is considered abstract, correct serialization
A pair of tests provided.
2015-06-25 19:07:23 +03:00
Mikhail Glukhikh 4d2ba3e890 Sealed constructors are made private in front-end, tests changed accordingly 2015-06-25 19:07:20 +03:00
Mikhail Glukhikh 4517e15299 Minor refactoring of resolveDelegationSpecifierList 2015-06-25 19:07:18 +03:00
Mikhail Glukhikh f6872dfbea Exhaustive when support for sealed classes #KT-7606 Fixed
When on sealed can use is (both for derived classes and objects) or just comparison (only for derived objects).
A pack of tests provided.
2015-06-25 19:07:16 +03:00
Mikhail Glukhikh 8d25c20169 Introduction of sealed classes
Sealed classes can be derived only by their own inner classes or objects.
Their constructors cannot be called explicitly, so compiler knows all their descendants.
Incompatible modifier checks (final, abstract). Impossible with interface, object, enum.
A pack of tests provided.
2015-06-25 19:07:13 +03:00
dnpetrov f364d23ee9 KT-5347 VerifyError on local data class with closure
- generated copy() should push captured fields on stack
- refactor context lookup
- handle vars in local classes using instance fields

 #KT-5347 Fixed
2015-06-25 17:52:30 +03:00
dnpetrov c24e6b5698 Support 'break' and 'continue' in expressions
- generate fake jump instructions so that we can always analyze stack depths
- fix stack before break and continue by dropping excessive elements (e.g., *a*.foo(*b*, c?:continue))
- Analyzer rewritten in Kotlin, with more flexible control of CFG traversal

 #Fixed KT-3340
 #Fixed KT-4258
 #Fixed KT-7941
2015-06-25 17:40:55 +03:00
Nikolay Krasko a98468e829 Test for KT-5326
#KT-5326 Obsolete
2015-06-25 13:50:14 +03:00
Evgeny Gerashchenko 55dad40650 Added reflect.jar as dependency for proguard. Fixed build. 2015-06-24 20:51:17 +03:00
Evgeny Gerashchenko 23eab73507 Added extra logging in incremental cache and Kotlin Builder. 2015-06-24 18:01:51 +03:00
Mikhail Glukhikh 5fabb962ae Private constructors are now accessed via synthetic constructor with DEFAULT_CONSTRUCTOR_MARKER as an additional argument #KT-6299 Fixed
A set of tests provided. Some external tests fixed accordingly.
Companion object creation changed accordingly.
Derived classes now can use base class with the private constructor.
Refactoring of AccessorForFunctionDescriptor.
2015-06-24 12:30:11 +03:00
Mikhail Glukhikh 83ce674a37 Warning message changed #KT-8143 Fixed 2015-06-24 12:30:08 +03:00
Michael Bogdanov 9ef00f0621 Code clean 2015-06-24 09:48:56 +03:00
Michael Bogdanov b1c5002889 Remove finally marker at inlining 2015-06-24 09:48:55 +03:00
Michael Bogdanov a018e4e12a Updated exception table generation: support new exception table in non-local returns 2015-06-24 09:48:55 +03:00
Michael Bogdanov 93c5a52d13 Updated exception table generation: try block return moved to uncatched interval
#KT-8148 Fixed
2015-06-24 09:48:55 +03:00
Michael Bogdanov 11ab2148b2 Fixed scipt execution classpath 2015-06-24 09:48:55 +03:00
Michael Nedzelsky 71729031c1 fix maven build 2015-06-24 01:35:25 +03:00
Alexander Udalov 0593b833b5 Check extension receiver properly for property references
Without this, the unrelated type specified on the LHS of a property reference
literal was considered to be an extension receiver of the candidate, and the
resolution was erroneously successul. This is only reproducible for properties,
because if we're trying to resolve an extension, we consider all properties
from the scope, even non-extensions, because there may be a property of an
extension-functional type (T.() -> R). (We don't do this for functions.)

 #KT-7430 Fixed
 #KT-7945 Fixed
2015-06-23 23:35:17 +03:00
Dmitry Jemerov 5b1d393d05 report JIT time 2015-06-23 16:24:49 +02:00
Dmitry Jemerov 2216ec1b68 report GC time 2015-06-23 16:24:48 +02:00
Dmitry Jemerov 6ca4dd32cf include module names in analyze and generate perf reports 2015-06-23 16:24:48 +02:00
Dmitry Jemerov ebcd7de26b report meaningful init times for subsequent runs when -Xrepeat flag is used 2015-06-23 16:24:47 +02:00
Dmitry Jemerov 669cd9e514 environment variable for enabling perf 2015-06-23 16:24:47 +02:00
Dmitry Jemerov 7cfb91192f K2JVMCompiler: cleanup after J2K 2015-06-23 16:24:46 +02:00
Dmitry Jemerov 0600abd6bd K2JVMCompiler: J2K 2015-06-23 16:24:46 +02:00
Dmitry Jemerov d84c9fa59e K2JVMCompiler: rename to .kt 2015-06-23 16:24:45 +02:00
Denis Zharkov 8412984774 Delete IdeaJdkAnnotationsReflectedTest
Kotlin JDK annotations are empty now
2015-06-23 16:44:47 +03:00
Denis Zharkov 602a1c11ac Fix testData: parameter names are dropped from annotations 2015-06-23 16:44:47 +03:00
Denis Zharkov 80a7f79f12 Make jars with JDK/Android SDK annotations empty
- Compiler use them only for getting parameter names and we are OK to drop it
- IDE plugin can use jdkAnnotations from ideaSDK
2015-06-23 16:44:27 +03:00
Nikolay Krasko 8013cbe4ef Fix forEach method in TrackingSlicedMap 2015-06-23 16:00:40 +03:00
Nikolay Krasko 66a4e0f299 Mute error about org.iq80.snappy.Snappy 2015-06-23 15:59:34 +03:00
nik 3136e5eefd removed registration of deprecated extensions points without implementations 2015-06-23 15:59:24 +03:00
Nikolay Krasko 757b963731 Register JavaClassSupers service 2015-06-23 15:59:14 +03:00
Pavel V. Talanov f454b7d15e AnalyzerFacade: resolvers for modules are created lazily 2015-06-23 15:19:31 +03:00
Pavel V. Talanov 96199ecc1f Refactor AnalyzerFacade: move module.initialize() outside of createResolverForModule() 2015-06-23 15:19:22 +03:00
Pavel V. Talanov 997a6f1381 Fix import resolution for some cases of malformed imports ("import some.")
Fix parsing import directives in case of non-identifier after "import"
Add diagnostics test for malformed imports
2015-06-23 15:19:14 +03:00
Pavel V. Talanov 37bcd455b5 Make ModuleDescriptor#getPackage() return not null lazy object with lazy scope
Refactor: no need to create package view in order to obtain its subpackages
LazyPackageViewDescriptorImpl to replace PackageViewDescriptorImpl
This allows to avoid computations when package views are requested but their contents not necessarily queried
For example: DescriptorResolver.resolvePackageHeader()
2015-06-23 15:19:06 +03:00
Pavel V. Talanov 1cf38e4799 Convert PackageViewDescriptor to Kotlin 2015-06-23 15:18:57 +03:00
Pavel V. Talanov 1ef125fa2c Change testa data according to semantics change 2015-06-23 14:35:46 +03:00
Pavel V. Talanov c5e6dea8b0 Minor: Inline and remove JetModuleUtil 2015-06-23 14:15:17 +03:00
Pavel V. Talanov ade898775c Minor: remove unused parameter 2015-06-23 14:14:35 +03:00
Pavel V. Talanov 257b8f31e7 Change import resolution algorithm
The new algorithm: move from right to left, trying to find package, (new code) when found go right resolving descriptors (uses old code)
This allows to avoid unnecessary computations (matters in IDE moslty) for resolving root packages
This changes semantics of imports resolution: when package clashes with any declaration package is preffered
2015-06-23 14:14:25 +03:00
Alexey Sedunov 3266d8c29a Parser: Disable joining complex tokens while parsing type references
#KT-8141 Fixed
2015-06-19 21:45:13 +03:00
Mikhail Glukhikh 065db07e1c More accurate check on an enum entry deprecated super constructor #EA-69735 Fixed 2015-06-19 13:50:49 +03:00
Yan Zhulanow fee1726dfb Write annotations with RetensionPolicy(SOURCE) to light classes 2015-06-19 02:25:41 +03:00
dnpetrov 36ae8790a1 KT-8011 Compiler crashes on attempt to create local class inside lambda
- use StackValue from upper-level context if local lookup fails

 #KT-8011 Fixed
2015-06-18 17:40:24 +03:00
Nikolay Krasko 818bfce1f1 Minor: add method for printing thread name 2015-06-18 16:45:23 +03:00
Nikolay Krasko 6d7cc8bc02 Minor: Don't print end message if profiler was muted 2015-06-18 16:45:22 +03:00
dnpetrov 046189087a KT-5963 Call to super shouldn't require type specification if there is no conflict
Implemented unqualified 'super' type resolution (in BasicExpressionTypingVisitor).

No overload resolution of any kind is involved.
Corresponding supertype is determined by the expected member name only:
- 'super.foo(...)' - function or property (of possibly callable type) 'foo'
- 'super.x' - property 'x'
Supertype should provide a non-abstract implementation of such member.
As a fall-back solution for diagnostics purposes, consider supertypes with abstract implementation of such member.

Diagnostics:
- AMBIGUOUS_SUPER on 'super', if multiple possible supertypes are available;
- ABSTRACT_SUPER_CALL on selector expression, if the only available implementation is abstract.

#KT-5963 Fixed
2015-06-18 14:16:34 +03:00