Commit Graph

3045 Commits

Author SHA1 Message Date
Mikhael Bogdanov f290b325ee Remove @JvmDefault members from delegation 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov 1d3e57acee Add @JvmDefault diagnostics 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov 63afd37cdd Remove unused parameters, compiler keys and obsolete code 2018-04-03 19:18:10 +02:00
Dmitry Jemerov 20cd193030 Delete remains of external annotations support from compiler 2018-03-29 09:45:07 +02:00
Alexander Udalov 71e9ee7437 Minor, rephrase diagnostic message on repeatable annotations 2018-03-26 16:35:17 +02:00
Mikaël Peltier 3a50d0d78f KT-22063 Add intrinsics for javaObjectType and javaPrimitiveType
Fix of https://youtrack.jetbrains.com/issue/KT-22063
2018-03-26 15:52:19 +02:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Nikolay Krasko 0b0eb210b6 Refactoring: get module language settings in ResolverForProjectImpl 2018-03-23 18:04:06 +03:00
Nikolay Krasko 586860e03a Refactoring: store correspondent module info in module content 2018-03-23 18:04:01 +03:00
Nikolay Krasko dced45d1bf Refactoring: rename AnalyzerFacade -> ResolverForModuleFactory 2018-03-23 18:03:52 +03:00
Denis Zharkov c334f46825 Avoid retaining reference to ProtoBuf.Package in JvmPackagePartSource
Otherwise, 2e933a165a doesn't help
2018-03-15 18:59:44 +03:00
Alexander Udalov 3f3e05a9d2 Move essential metadata-related classes to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:16 +01:00
Alexander Udalov 88dea9aa70 Move NameResolver to module 'metadata' and J2K
Also move NameResolverImpl to 'metadata' and JvmNameResolver to
'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov 27ad4f7d5d Move ProtoBuf classes to package org.jetbrains.kotlin.metadata 2018-03-14 12:25:10 +01:00
Alexander Udalov 7e1b1db7cc Minor, don't use BitEncoding where it's not necessary 2018-03-14 12:25:05 +01:00
Alexey Sedunov 4609b2ae37 Navigation: Resolve typealiased SAM-references to type alias declaration
#KT-15302 Fixed
2018-03-06 15:15:42 +03:00
Pavel V. Talanov 27d7bb595f CliLightClassGenerationSupport: correctly find facade files
This fixes a problem where JvmPackageName annotation could force file
    facades to be in the package different to declared kotlin package
2018-03-06 12:07:12 +01:00
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Mikhail Zarechenskiy f23b5103ec Avoid non-null assertions for inline classes based on nullable types
Note that there are more places where assertions for inline classes should refined:
  - lateinit vars
  - values that come from Java
  - type casts (interfaces to inline class type)
2018-02-20 14:41:48 +03:00
Dmitry Savvinov 0929673576 Refactor DataFlowValueFactory into proper component 2018-02-20 13:11:33 +03:00
Mikhael Bogdanov 31c63dea50 Add jvm target 10 tests on jdk 10 2018-02-16 14:22:04 +01:00
Mikhail Zarechenskiy 1ac4e9755a Generate synthetic unbox method for each wrapper of inline class 2018-02-09 02:08:11 +03:00
Alexander Udalov 7123202670 Add getExtensionOrNull utility for protobuf messages 2018-02-08 17:08:33 +01:00
Alexander Udalov 890374a42a Load module annotations for JVM and JS modules in compiler
#KT-22759 In Progress
2018-02-08 17:08:33 +01:00
Alexander Udalov b4ac852392 Add packageProto/nameResolver to JvmPackagePartSource
May be useful for loading platform-specific protobuf extensions (such as
package_module_name on JVM) when analyzing deserialized top level
members
2018-02-08 17:07:22 +01:00
Alexander Udalov 6da3f37fc3 Write anonymousObjectOriginName for classes copied during inline
#KT-21320
2018-02-06 13:05:22 +01:00
Mikhail Glukhikh 81122ed236 Fix a pack of broken IDE action tests
Related to KT-20281.
For Java resolve we can use also resolve with 'null' platform,
which is possible situation in tests.
2018-02-06 15:02:38 +03:00
Mikhail Glukhikh 19beaf57a7 JVM facade: for Java resolve, always use JvmPlatform resolver
So #KT-20281 Fixed
2018-02-06 09:50:10 +03:00
Mikhail Zarechenskiy 928a342ace Initial version of codegen for inline classes 2018-02-05 12:07:40 +03:00
Vyacheslav Gerasimov 89a07ded1c Extract versions and remove unnecessary '.jar' extensions 2018-01-30 17:06:18 +03:00
Ilya Chernikov 4eb557724c Convert compiler projects to the new intellij deps 2018-01-30 17:06:13 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Alexander Udalov 46b8deedf7 Run classifier usage checkers on constructor calls
In some cases, REFERENCE_TARGET for annotation entries is the annotation
class descriptor, and in others -- the constructor of that class
2018-01-29 12:22:41 +01:00
Alexander Udalov 8cd7686535 Introduce DeclarationCheckerContext, remove SimpleDeclarationChecker 2018-01-29 12:22:40 +01:00
Alexander Udalov 4cb5483c13 Introduce CheckerContext and ClassifierUsageCheckerContext
To reduce the number of parameters in classifier usage checker
implementations, and to unify the API with call checkers
2018-01-29 12:20:36 +01:00
Mikhael Bogdanov c4da370b0b Allow to use @JvmStatic in interface companion object 2018-01-26 10:09:20 +01:00
Mikhael Bogdanov 2340756b88 Minor. Reformat 2018-01-26 10:09:20 +01:00
Denis Zharkov 31e73e90d6 Explicitly state that PluginDeclarationProviderFactory is source-only
Before this change `filesScope` was effectively empty in cases when
module info is a library, thus looking
into PackageIndexUtil.packageExists(name, indexedFilesScope, project)
was kind of redundant since it always returns false for empty scopes

The initial motivation was run by 1716720604
that made PackageIndexUtil::packageExists calls much more frequent
2018-01-25 14:41:28 +03:00
Denis Zharkov 4d378912bf Minor. Reformat JVM/JS analyzer facades 2018-01-25 14:41:28 +03:00
Alexander Udalov a46a2b9b1c Support nested classes in annotation classes
#KT-16962 In Progress
2018-01-24 15:54:35 +01:00
Alexander Udalov 899002b681 Refactor JavaEnumValueAnnotationArgument and implementations
Only require implementations to be able to compute the enum class name
and the corresponding entry name. Only this should be necessary to
correctly resolve the argument; the resolvers will find the
corresponding class descriptor if necessary
2018-01-18 12:49:38 +01:00
Alexander Udalov 907f53e539 Refactor ConstantValue implementations
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).

Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Alexey Tsvetkov fec2d08d22 Compile actual and expected declarations together
#KT-20840 fixed
2017-12-22 16:12:19 +03:00
Pavel V. Talanov aec893180e Minor, JvmAnalyzerFacade: drop logging
Prevent log spam
2017-12-20 17:19:09 +03:00
Nikolay Krasko b133189309 Rename: MyFunctionDescriptor -> SamAdapterExtensionFunctionDescriptorImpl 2017-12-15 16:14:48 +03:00
Denis Zharkov fa6285d32a Fix NPE in JavaNullabilityChecker when checking equals-calls
This NPE was introduced in ce41b5745a
Prior to the latter change there was a synthetic PSI element for each
equals-related call, thus callOperationNode was not null here.

== are intentionally treated as safe calls, but for nullability checker
it's not relevant, it only should report warnings on real safe-calls
2017-12-14 19:15:41 +03:00
Denis Zharkov e24e711208 Avoid rebuilds after changes of layouts xml-files
This commit makes IC react more granularly on these changes
Precisely, it marks dirty only kt-files that having lookups into
synthetic package built upon a changed layout-file

 #KT-21622 Fixed
2017-12-12 16:17:58 +03:00
Denis Zharkov df533053f9 Record special name lookup when trying use interface as a SAM
It was already working in JPS, because it see our synthetic classes
as subclasses for SAM's, but with non-JPS build we have to manually
tracking places that should be recompiled after SAM members are changed
2017-12-12 16:17:58 +03:00
Denis Zharkov 34452f4f4a Introduce JavaClassesTracker interface into java resolution components
It's purpose is passing java classes being used during analysis
to incremental compilation to let it track diffs

Potentially it might be done the other way:
incremental compilation could build a separate container to analyze
necessary classes, but it's rather hard to implement now

 #KT-17621 In Progress
2017-12-12 16:17:58 +03:00
Mikhail Zarechenskiy 7f0cca52ca [NI] Use definitely not-null types for smartcasts 2017-12-06 18:36:13 +03:00