Commit Graph

45134 Commits

Author SHA1 Message Date
Mikhael Bogdanov cdcb651c8e Get rid of 'BRIDGE' flag on $default functions 2018-03-14 13:57:49 +01:00
Zalim Bashorov ac5ef57876 Regenerate tests 2018-03-14 15:06:35 +03:00
Zalim Bashorov 055b900d8a Add generating tests using "whitelist" of target backend; add new target backends: JS_IR and JVM_IR 2018-03-14 15:06:31 +03:00
Zalim Bashorov 82f41a1125 J2K TargetBackend 2018-03-14 15:06:31 +03:00
Zalim Bashorov 9970dd051f Fix copyright's start year in generated tests 2018-03-14 15:04:58 +03:00
Zalim Bashorov 814be1810c Don't write copyright to *.gradle.kts and *.gradle files 2018-03-14 15:04:57 +03:00
Zalim Bashorov c0ce3f849d Fix copyright's start year 2018-03-14 15:04:57 +03:00
Alexander Udalov e21c73229c Throw exceptions explicitly in protoTypeTableUtil
Previously, if both type and typeId messages were missing (for example,
ProtoBuf.Function.returnType/returnTypeId) because of some bug, the
behavior was unpredictable because a type with id 0 from the type table
would be returned, which could be a completely irrelevant type. This is
an incorrect situation and we should report a diagnostic instead.
Temporarily throw an exception instead, since this only affects how the
compiler works on bad metadata
2018-03-14 12:25:23 +01:00
Alexander Udalov 0a78fe8ae3 Move some serialization helpers to metadata/metadata.jvm 2018-03-14 12:25:22 +01:00
Alexander Udalov 779290be0c J2K Interner: convert and prettify 2018-03-14 12:25:22 +01:00
Alexander Udalov bda7514b43 J2K Interner: rename .java -> .kt 2018-03-14 12:25:21 +01:00
Alexander Udalov acf357e9b5 Extract descriptor-related behavior in StringTable to separate interface
Descriptor-related code is only needed to be able to compute
"replacement" names for local classes, which are different in JVM and JS
2018-03-14 12:25:20 +01:00
Alexander Udalov 043f4c3d01 Increase patch number of metadata versions
After adding inline classes in 915455ebe9
2018-03-14 12:25:19 +01:00
Alexander Udalov 407de206a3 Minor corrections in proto schemas, mostly in comments
Also set up code style for the protobuf plugin
2018-03-14 12:25:19 +01:00
Alexander Udalov 9d8d4b837b Minor, move JavaFlexibleTypeDeserializer.id to JvmProtoBufUtil
To be able to read platform types with metadata.jvm
2018-03-14 12:25:18 +01:00
Alexander Udalov 241673c6a1 Add forgotten SinceKotlin to Metadata.pn
kotlin.Metadata is internal, so it shouldn't have any visible effect
2018-03-14 12:25:17 +01: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 0ba42850f9 Drop ClassData and PackageData, rename ClassDataWithSource -> ClassData
Use pairs in JvmProtoBufUtil for simplicity
2018-03-14 12:25:15 +01:00
Alexander Udalov 5ed5ac8291 Minor, use stdlib instead of ifEmpty 2018-03-14 12:25:14 +01:00
Alexander Udalov a5a69c5099 Remove dependency of ClassMapperLite on JavaToKotlinClassMap
There are two reasons for this. First, this class will be used in the
metadata reading library which should not have dependencies on lots of
compiler stuff JavaToKotlinClassMap depends on.

Second, it was easy to accidentally break the deserialization in old
compilers by adding another mapping to JavaToKotlinClassMap. This was
possible because ClassMapperLite is used to decide whether or not the
JVM signature is "trivial" and should be written to the metadata (at
JvmSerializerExtension.SignatureSerializer.requiresSignature). If the
signature is trivial but mentions a type added in JavaToKotlinClassMap
in the new compiler, the old compiler will not be able to load the
signature correctly. See the comment on ClassMapperLite for more
information
2018-03-14 12:25:14 +01:00
Alexander Udalov 070effc69d Minor, drop unnecessary ClassDescriptor.classId implementation 2018-03-14 12:25:13 +01:00
Alexander Udalov b07c6086cd Remove dependency of NameResolverImpl on FqName
Remove AbstractJsProtoComparisonTest.getProtoData in favor of
(apparently copy-pasted) IncrementalJsCache.getProtoData
2018-03-14 12:25:12 +01:00
Alexander Udalov 4f81e572c7 Make NameResolver.getName extension instead of member
To get rid of dependency of NameResolver on Name
2018-03-14 12:25:11 +01:00
Alexander Udalov e31f286444 Make NameResolver.getClassId extension instead of member
To get rid of dependency of NameResolver on ClassId
2018-03-14 12:25:11 +01:00
Alexander Udalov 27ad4f7d5d Move ProtoBuf classes to package org.jetbrains.kotlin.metadata 2018-03-14 12:25:10 +01:00
Alexander Udalov 575a388b11 Move core protobuf schemas to 'metadata' and 'metadata.jvm' 2018-03-14 12:25:09 +01:00
Alexander Udalov 368af867b8 Add modules metadata and metadata.jvm 2018-03-14 12:25:08 +01:00
Alexander Udalov 54d6710923 Regenerate gradle/project-schema.json 2018-03-14 12:25:07 +01:00
Alexander Udalov 99964cd030 Move descriptor-related utilities from Flags to ProtoEnumFlags 2018-03-14 12:25:07 +01:00
Alexander Udalov ec67a878a0 Minor, rename Deserialization -> ProtoEnumFlags
Also fix warnings and remove unneeded JvmStatic
2018-03-14 12:25:06 +01:00
Alexander Udalov 7e1b1db7cc Minor, don't use BitEncoding where it's not necessary 2018-03-14 12:25:05 +01:00
Alexey Tsvetkov ceb243c096 Don't pack kotlin-daemon-client and daemon-common into kotlin-compiler-runner jar 2018-03-14 13:29:32 +03:00
Alexey Tsvetkov c736f229ce Always depend on runtimeJar of kotlin-daemon-client 2018-03-14 13:29:32 +03:00
Sergey Igushkin 0039be6972 Fix binary incompatibility with Android Gradle plugin 3.2.0-alpha06
Remove a non-reflective usage of the ResourceSet class, which has been
moved to a different package between versions. Access it through
reflection instead. This is a workaround. We can introduce a proper
fix once we have a public API in the Android plugin.

The test case that could detect the compatibility issue is
`testAndroidExtensionsManyVariants` (it uses experimental Android
extensions), but we did not run it with 3.2.0-alpha6. This commit
adds a test class with the same tests for 3.2.0-alpha6.

Issue #KT-23192 Fixed
2018-03-14 04:11:35 +03:00
Alexey Tsvetkov 3a7a34cc4e Add all necessary compile dependencies to 'pill:generate-all-tests'
Before this change running the pill:generate-all-tests:testClasses
task (which is run by Intellij on "Build" invocation) led to compile error
2018-03-13 21:26:28 +03:00
Alexey Tsvetkov 0deec7983d Revert "Provide custom ConstantAffectionResolver in JPS"
This reverts commit 772a935de6.

The API in Intellij was changed, now the issue can be fixed only in
182.* branches.
2018-03-13 21:26:11 +03:00
Vyacheslav Gerasimov d831d35869 Add readme for including kotlin-compiler into composite build 2018-03-13 18:29:26 +03:00
Vyacheslav Gerasimov 0e879896e0 Add include/kotlin-compiler project
Needed to include kotlin compiler project into a composite build (kotlin native + cotlin compiler)
2018-03-13 18:29:24 +03:00
Vyacheslav Gerasimov 361e8e065c Remove unused xpp3 & xstream from IntellijCoreDependencies
They are 'fatjared' into kotlin-compiler but proguard removes them from resulting jar afterwards
2018-03-13 17:50:15 +03:00
Nikolay Krasko 7174b31756 Fix GradleConfiguratorTest.kt compilation 2018-03-13 17:42:40 +03:00
Nikolay Krasko 48f2fd8607 Add explicit set of supported file types to KotlinPositionManager 2018-03-13 15:52:21 +03:00
Nikolay Krasko 674fbc9871 Process dependencyManagement during stdlib-jre* deprecation check (KT-21745, KT-23161)
#KT-23161 Fixed
 #KT-21745 Fixed
2018-03-13 15:52:20 +03:00
Nikolay Krasko 57aaf0444f Add support for "implementation" gradle directive (KT-21746)
#KT-21746 Fixed
2018-03-13 15:52:19 +03:00
Nikolay Krasko 9004cdfa45 Reformat: idea-gradle module 2018-03-13 15:52:18 +03:00
Denis Zharkov cff88a3f8b Fix false positive unreachable code in case of Nothing!-typed calls
Note, that this change potentially has some other effects in corner cases
(like the changed test data that is rather sensible because `bar`
in the example is not effectively projected out and can be called
with nulls)

Probably, we need to consider rewriting all other isSomeType methods
in KotlinBuiltins, but now it seems to be a rather dangerous change

 #KT-16424 Fixed
2018-03-13 14:40:05 +03:00
Denis Zharkov a7854bc0ce Fix SAM detection algorithm for case of default overrides
#KT-22652 Fixed
2018-03-13 14:39:35 +03:00
Dmitry Jemerov b4fb0e0305 Further reduce number of calls to getConfigurableModulesWithKotlinFiles
Also handle INRE and requeue check
2018-03-13 12:29:16 +01:00
Dmitry Jemerov a29d693dc5 Fix inverted logic of isNotConfiguredNotificationRequired 2018-03-13 12:29:16 +01:00
Dmitry Jemerov fa39cec94b Avoid duplicate scan of modules with Kotlin files (KT-23183) 2018-03-13 12:29:16 +01:00