Commit Graph

1710 Commits

Author SHA1 Message Date
Dmitry Jemerov a321e8eef5 performance counters infrastructure 2015-06-04 10:20:19 +02:00
Natalia Ukhorskaya 7b63dd987c Workaround for bug in Android Plugin: it generates LightFields for files starting from '.' (ex. .DS_Store file)
#KT-6625 Fixed
2015-06-03 16:36:57 +03:00
Valentin Kipyatkov aefe0dd192 Changed highlighting range and attributes of useless elvis operator 2015-06-02 14:35:19 +03:00
Alexander Udalov 4f77b44ac3 Minor, move constant to the proper place 2015-06-01 19:23:08 +03:00
Alexander Udalov d14e5b8a72 Restore and deprecate Function{n}/ExtensionFunction{n} classes for easier migration
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.

Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
2015-05-28 01:20:05 +03:00
Denis Zharkov 53e9234ea9 Add quickfix for replacing positioned arguments in Java annotation 2015-05-27 17:41:27 +03:00
Valentin Kipyatkov 281acb860e Loading of annotation class arguments from compiled classes 2015-05-27 16:15:50 +03:00
Dmitry Jemerov 1188e57597 rename @overloads annotation to @jvmOverloads 2015-05-27 12:23:08 +02:00
Alexander Udalov 48b18f18d3 Restore explicit imports of Kotlin function types in Java
This is a follow-up to 738a84e259 and
d4965a4f3e. Optimize imports in all files
affected in those commits, drop temporary _.kt
2015-05-26 18:46:27 +03:00
Alexander Udalov 9ba6d91e2e Prepare JVM runtime for support of reflection on functions
Introduce abstract class FunctionReference, which is supposed to be a
superclass for all anonymous classes generated for function references. Each
anonymous subclass will have statically-generated symbol info, which will be
used by reflection to locate the symbol
2015-05-26 15:05:01 +03:00
Alexander Udalov 27ed098467 Introduce kotlin.jvm.internal.Lambda, superclass for all lambdas
It has its arity precomputed, as opposed to the future KFunctionImpl inheriting
from FunctionImpl, for which the computation of arity can take some time and so
it shouldn't be passed in the constructor and saved as a field
2015-05-26 15:04:54 +03:00
Alexander Udalov 738a84e259 Temporary hack to migrate functions to package kotlin.jvm.functions
Add a file in package 'kotlin.jvm.functions' to the project and replace
explicit imports of functions 'kotlin.Function{n}' to two imports 'kotlin.*'
and 'kotlin.jvm.functions.*', so that the codebase can be compiled both by the
old and by the new compiler
2015-05-26 15:04:34 +03:00
Michael Nedzelsky d4f348edd5 VirtualFileFinder: regenerate injectors 2015-05-26 05:03:54 +03:00
Michael Nedzelsky 618a8622a1 VirtualFileFinderFactory: introduce JvmVirtualFileFinderFactory, JsVirtualFileFinderFactory 2015-05-26 05:03:51 +03:00
Mikhail Glukhikh f4977a1108 Reorganization of when checking: exhaustion predicates clarified, analysis on platform enum warnings was moved to frontend.java 2015-05-25 14:23:57 +03:00
Alexey Sedunov b1f1360081 PSI: Make JetPostfixExpression.getBaseExpression() nullable
#KT-7761 Fixed
2015-05-21 19:29:49 +03:00
Pavel V. Talanov cfdb1f4ec3 Refactor creation of ModuleDescriptor
Add storageManager to ModuleDescriptorImpl (to be used later)
Extract ModuleParameters to hold default imports and platform class map
Introduce MutableModuleContext to simplify module creation code
2015-05-20 19:45:50 +03:00
Alexander Udalov 189286efee Support platformStatic members in companion object of enums
#KT-7777 Fixed
2015-05-19 18:47:00 +03:00
Nikolay Krasko 0108205367 Minor: log class of element in assert message 2015-05-19 13:04:57 +03:00
Mikhail Glukhikh fdf0ea5546 Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries 2015-05-18 16:08:16 +03:00
Pavel V. Talanov 268d43d14a Change ModuleContext#module type to ModuleDescriptor instead of ModuleDescriptorImpl 2015-05-17 18:24:50 +03:00
Pavel V. Talanov 01efbb1502 Introduce ModuleContext, ProjectContext and use it some of the APIs 2015-05-17 18:24:49 +03:00
Pavel V. Talanov 9d22a39924 Refactor: TopDownAnalysisParameters -> TopDownAnalysisMode
No longer implements TypeLazinessToken (was unused)
2015-05-17 18:24:49 +03:00
Pavel V. Talanov d9c70b5927 Drop TopDownAnalysisParameters#isAnalyzingBootstrapLibrary() 2015-05-17 18:24:48 +03:00
Pavel V. Talanov f9b6c25498 Refactor: TopDownAnalysisParameters doesn't implement GlobalContext 2015-05-17 18:24:47 +03:00
Natalia Ukhorskaya f20e76c185 Improve assert message.
#KT-6625 In Progress
2015-05-14 14:08:16 +03:00
Dmitry Jemerov 9975bb8935 replace 'trait' keyword with 'interface' in user-visible messages and code generation tools 2015-05-12 11:49:37 +02:00
Dmitry Jemerov cce1be3892 rename JetClass.isTrait() to isInterface(); rename ClassKind.TRAIT to INTERACE 2015-04-29 16:50:19 +02:00
Denis Zharkov fc5236244b Deprecate java.lang.Class as annotation parameter 2015-04-29 14:03:11 +03:00
Pavel V. Talanov ac2cb9af74 Remove some usages of KotlinBuiltIns.getInstance()
Introduce DeclarationDescriptor.builtIns extension to get builtins where descriptors are available
Introduce various utilities in KotlinBuiltIns to check for primitive types and get fq names of builtins
2015-04-28 12:49:34 +03:00
Pavel V. Talanov 1a5efacbf3 Refactor frontend components
Make dependencies more explicit
Move components out of ExpressionTypingServices
Make ExpressionTypingUtils a true utility class, refactor stuff out
Extract new components: FakeCallResolver, MultiDeclarationResolver, ValueParameterResolver
2015-04-27 15:56:59 +03:00
Michael Bogdanov 39fabda611 New diagnostic for Java default method call via super in trait 2015-04-24 18:54:09 +03:00
Ilya Ryzhenkov c2b3bcc95f SymbolUsageValidator infrastructure 2015-04-24 15:44:28 +03:00
Alexander Udalov 43c11b2925 Merge CollectionClassMapping into JavaToKotlinClassMap 2015-04-24 02:09:05 +03:00
Alexander Udalov a59fa5015e Merge KotlinToJavaTypesMap into JavaToKotlinClassMap
Also use this new Kotlin->Java mapping in RuntimeTypeMapper instead of
inheriting directly from JavaToKotlinClassMapBuilder
2015-04-24 02:09:05 +03:00
Alexander Udalov b956fb5eb0 Pull Java<->Kotlin primitive type mapping up to JavaToKotlinClassMapBuilder 2015-04-24 02:09:04 +03:00
Alexander Udalov 4b07ec11ea Change Class<?> parameter to ClassId in JavaToKotlinClassMap implementations 2015-04-24 02:09:04 +03:00
Alexander Udalov deff3968db Simplify KotlinToJavaTypesMap, use only one map 2015-04-24 02:09:03 +03:00
Alexander Udalov 23a792aa44 Somewhat simplify mapping of JVM primitive types 2015-04-24 02:09:03 +03:00
Alexander Udalov 0a66c78449 Disperse primitive type mapping in JavaToKotlinClassMap 2015-04-24 02:09:02 +03:00
Nikolay Krasko 3e1c3e9dfe Don't search for NonClasspathClassFinder classes and package during Kotlin resolve 2015-04-23 17:38:07 +03:00
Denis Zharkov 1b42e2fdcc Deprecate calls of annotations' methods 2015-04-23 08:27:43 +03:00
Mikhail Glukhikh e64dab0ae9 Review fixes after automatic code analysis 2015-04-21 15:29:34 +03:00
Mikhail Glukhikh 27625b04e1 Refactoring of JetTypeInfo / BindingContext. Loop data flow analysis corrected.
Now BindingContext includes expression type info instead of jump out possible, data flow info and expression type.
getType() was added into BindingContext, getType() and recordType() were added into BindingTrace.
JetTypeInfo now includes also jump possible flag and jump point data flow info.
Old TypeInfoWithJumpInfo deleted.
TypeInfoFactory introduced to create JetTypeInfo instances.
A pack of extra tests for break / continue in loops added.
2015-04-21 15:29:07 +03:00
Denis Zharkov cc9322fbdd Add quickfix for usages of javaClass<T>() in annotations loaded from Java 2015-04-17 18:52:17 +03:00
Denis Zharkov f53baebf89 Show warning on usages of javaClass<T>() in annotations loaded from Java 2015-04-17 18:50:37 +03:00
Pavel V. Talanov d76f293dc9 Speed up finding kotlin binaries and java files in CLI
Change VirtualFileFinder api to accept ClassId and adjust usages
Introduce KotlinCoreProjectEnvironment to create special KotlinCliJavaFileManager which shares cache with CliVirtualFileFinder
Truly distinguish between java source roots and binary roots: don't search for source files in classpath and vica versa
Implement JvmDependenciesIndex
2015-04-16 16:40:28 +03:00
Alexander Udalov 44e35cad29 Make 'sure' an inline function with a lazy parameter
Also replace some other non-lazy stdlib function usages with the new lazy
'sure'
2015-04-16 13:55:06 +03:00
Denis Zharkov 0abc63261d Inject reflectionTypes into LazyJavaResolverContext 2015-04-16 10:40:20 +03:00
Denis Zharkov f942f6ac8e Move ReflectionTypes to builtins 2015-04-16 10:40:19 +03:00