Commit Graph

1272 Commits

Author SHA1 Message Date
Vladimir Ivanov fd02802028 [Native] Export KDoc into generated native header 2021-03-09 16:50:23 +03:00
Alexander Udalov 1f8de46b3c JVM IR: do not depend on StubGeneratorExtensions in backend
Move most of the implementation from JvmGeneratorExtensions to
JvmGeneratorExtensionsImpl. The latter implements
StubGeneratorExtensions from psi2ir, and doing so helps to remove direct
dependency on this part of psi2ir from backend.
2021-03-05 20:46:33 +01:00
Alexander Udalov f332192de8 IR: remove SourceManager, make PsiSourceManager a singleton 2021-03-05 20:46:33 +01:00
Alexander Udalov 027df41740 Add test which runs Kotlin compiler in parallel
This will be useful in diagnosing issues like KT-45007 in the future.

 #KT-45007
2021-03-05 17:58:42 +01:00
Alexander Udalov 5d6aa01086 Fix warnings in Java code in tests-common 2021-03-01 19:47:24 +01:00
Ilmir Usmanov d67e4f0c48 Rename inline class -> @JvmInline value class in stdlib and compiler 2021-02-25 16:06:51 +01:00
Simon Ogorodnik b6fb3c9799 [FIR] Isolate benchmark thread, add jit log format events for passes
Add special output for pass events to match with LogCompilation
2021-02-25 14:03:26 +03:00
Alexander Udalov addabae8d2 IR: move frontend-dependent code into implementations in psi2ir 2021-02-24 19:07:38 +01:00
Alexander Udalov 2e2caae05c Extract control flow analysis to separate module
Extract a service interface out of ControlFlowInformationProviderImpl
and register its implementation in two "leaf" modules: 'cli',
'idea-core'.

This improves parallel build, since a lot of modules depend on
'frontend' but only these two modules reference the implementation and
thus depend on the full CFA implementation now.
2021-02-24 17:17:04 +01:00
Alexander Udalov ca5a35b4b3 Move CompilerEnvironment from 'frontend' to 'cli'
This is needed in order to have a single convenient place where to
register frontend services implemented _outside_ of the 'frontend'
module, such as the control flow analysis, extracted to a separate
module in a subsequent commit.
2021-02-24 17:17:03 +01:00
Alexander Udalov 899f75466d Remove tests on kotlin-annotations-android
#KT-44815
2021-02-15 17:23:44 +01:00
Anton Bannykh abc44fa658 Increase -Xmx for Ant tests 2021-02-11 18:39:34 +03:00
Dmitriy Novozhilov c8f9cc33ef [FIR] Pass all FirFiles to FirGlobalResolveProcessor.process 2021-02-09 16:04:39 +03:00
Dmitriy Novozhilov 771b1acbc1 [Test] Ignore multimodule tests in AbstractLightAnalysisModeTest 2021-02-04 10:53:50 +03:00
Denis.Zharkov c51798d46f Fix warning at VMCounters.kt 2021-02-03 15:05:22 +03:00
Dmitriy Novozhilov 99cb85ab00 [Test] Merge box against java tests into codegen black box tests 2021-02-02 17:54:47 +03:00
Dmitriy Novozhilov 6f3713af5f [Test] Migrate AbstractIrCompileKotlinAgainstKotlinTest to new infrastructure 2021-02-02 17:53:53 +03:00
Dmitriy Novozhilov 3a0eee64b8 [Test] Migrate all jvm tests runners for boxInline tests 2021-02-02 17:53:50 +03:00
Dmitriy Novozhilov 92e21e76ba [Test] Implement SMAP dump handler 2021-02-02 17:50:07 +03:00
Dmitriy Novozhilov 3f758a3fa2 [Test] Make BytecodeInliningHandler for new infrastructure 2021-02-02 17:50:06 +03:00
Dmitriy Novozhilov 5c8d555808 [Test] Move KotlinAgainstKotlin tests under BlackBoxCodegen tests 2021-02-02 17:50:05 +03:00
Alexander Gorshenev 16b3fedcd4 Created AbstractKlibBinaryCompatibilityTest and AbstractJsKlibBinaryCompatibilityTest
A common test runner for klib binary compatibility tests
and its js counterpart
2021-01-30 17:41:54 +03:00
Mikhael Bogdanov 6a29097a8c Remove obsolete dependency for dx 2021-01-29 17:47:37 +01:00
Mikhael Bogdanov be9ef8f3c8 Remove obsolete DxChecker 2021-01-29 17:47:37 +01:00
Dmitry Petrov 3140cca050 JVM_IR indy-SAM conversions, 1st passing tests
KT-44278 KT-26060 KT-42621
2021-01-29 12:59:45 +03:00
Dmitriy Novozhilov bc3b791cd8 [TMP] Remove :kotlin-coroutines-experimental-compat module 2021-01-28 13:19:34 +03:00
Dmitriy Novozhilov f3393eae1b [Test] Update testdata of CompileKotlinAgainstCustomBinariesTest 2021-01-28 13:19:26 +03:00
Kristoffer Andersen 836261ba6e [Test] Ignore test infrastucture sources in debugging tests
This solves no immediate deficiency, but is a to-do that arose as part
of an ongoing effort to port the old, slightly too restrictive
checkLocalVariableTable tests to the more "functional" debugger
infrastructure.

This just shaves a little bit of overhead off the test expectations
and couples them less tightly to the specifics of the test
infrastructure.
2021-01-28 08:09:42 +01:00
Roman Artemev 37c7f60ae7 [KLIB] Fix issues between directory and .klib modes
- use .klib extension explicitly
 - fix issue with `module.klib.klib` names
2021-01-26 19:23:23 +03:00
Dmitriy Novozhilov f61a318c9d [Test] Migrate AbstractBytecodeTextTest to new test infrastructure 2021-01-25 17:11:21 +03:00
Dmitriy Novozhilov 42f9442728 [Test] Handle any Throwable from test instead of AssertionError 2021-01-25 17:08:31 +03:00
Dmitriy Novozhilov 0d058c7c8c [Test] Allow parse FILE and MODULE directives with other strings between them in old tests 2021-01-22 13:51:33 +03:00
Dmitriy Novozhilov aaa3fa5845 [Test] Migrate IrTextTestGenerated to new infrastructure 2021-01-22 13:51:23 +03:00
Mikhael Bogdanov 91717cdcdd Perform inline checks in IR tests 2021-01-20 15:23:09 +01:00
Svyatoslav Kuzmich cf228bebc3 Use static year range in copyright of generated FIR and tests
Dynamically calculating a year is problematic, especially in cases like
FIR where generation happens in every build. When you are working on a
last year's commit, each build creates a bunch of uncommited
 changes of updating the year in copyrights.
2021-01-19 17:17:31 +03:00
Shagen Ogandzhanian 23332bac13 More precise message for "this test can be unmuted" 2021-01-18 12:51:23 +01:00
Pavel Kirpichenkov c0dd731818 Load JVM built-ins in IDE from module dependencies
Fix built-ins for JVM platform and make them consistent
with module's dependency on standard library. Changes
don't affect non-JVM platforms.

Previously all built-ins in IDE were loaded from classloader
and were based on the same pre-serialized .kotlin_builtins files.
This approach is generally not correct as built-in declarations
differ for different platforms, but it had been working for a while
without immediately observalble effects (see KT-33233 for more info).
After changes in standard library JvmBuiltins started producing
false errors (see KT-39728).

To fix this, JVM built-ins in IDE now utilize the same technique as
applied in CLI: using dependency on standard library as a module
for built-ins instead of artificial module that considers only
.kotlin_builtins.

Change summary:
- Provide JvmBuiltins with kind FROM_DEPENDENCIES
  for all modules with stdlib dependency in IDE
- Add JvmBuiltinsPackageFragmentProvider to JVM-ish module resolvers
  (JVM and Composite with JVM platform) to support their use as
  built-ins module
- Create KotlinBuiltInsMetadataIndex file index for tracking libraries
  containing .kotlin_builtins to support JvmBuiltinsPackageFragmentProvider
- Create KotlinStdlibIndex file index for tracking kotlin-stdlib(-common),
  which looks for "Kotlin-Runtime-Component" manifest attribute
- Add caching service to track LibraryInfo for kotlin-stdlib(-common)
- Put LibraryInfo for kotlin-stdlib(-common) alongside SDKs
  due to the need to resolve that modules in BuiltInsCache
- Update BuiltInsCache to separate JvmBuiltins by module's dependency
  on stdlib and JDK
- Make platform of KotlinSDK common instead of JVM
- Set built-ins module lazily in IDE

^KT-33233 Verification Pending
2021-01-14 17:28:15 +03:00
Alexander Udalov 0d8f909bda Use ObsoleteTestInfrastructure instead of Deprecated in black box tests 2021-01-13 19:34:24 +01:00
Alexander Udalov 221f44da5f Fix warnings in stdlib/compiler/plugins/test code 2021-01-13 19:18:20 +01:00
Alexander Udalov b3d85e656e Fix warnings after update to 202 platform
#KT-44069 Fixed
2021-01-13 19:17:22 +01:00
Alexander Udalov f8c2f4a8d0 Fix incorrect code in AbstractJspecifyAnnotationsTest
There was a warning on line 78
(`diagnosticsToJspecifyMarksMap[diagnostic.name]`) which unconvered that
the map wasn't used in the same way in both call sites.
2021-01-13 19:17:21 +01:00
Alexander Udalov e0363788f4 Remove some remaining tests on old coroutines 2021-01-13 19:16:31 +01:00
Dmitriy Novozhilov e3c7bd5f85 [Test] Migrate AbstractIrBlackBoxCodegenTest to new infrastructure 2021-01-12 18:35:34 +03:00
Dmitriy Novozhilov 85c87f7df9 [Test] Migrate AbstractBlackBoxCodegenTest to new infrastructure 2021-01-12 18:35:30 +03:00
Dmitriy Novozhilov 9fd2800594 [Test] Support KOTLIN_CONFIGURATION_FLAGS directive in new tests 2021-01-12 18:35:20 +03:00
Dmitriy Novozhilov 1e67702128 [Test] Introduce opt in @ObsoleteTestInfrastructure for migrating tests to new infrastructure 2021-01-11 14:19:10 +03:00
Ilya Chernikov d2ecc1e361 Implement -X arguments passing from kotlin runner to compiler 2021-01-07 10:37:22 +01:00
Dmitriy Novozhilov 8bd4e67341 [Test] Drop obsolete FIR tests 2020-12-24 14:58:06 +03:00
Dmitriy Novozhilov 660c438ebe [Test] Migrate tests of foreign annotations to new infrastructure
This commit includes:
- test runners for foreign annotation tests
- minor changes testdata related to changed directives syntax
- dropping tests with javac integration: old javac tests actually ran
    compiler without javac because of bug in configuration, so some
    nullability annotations features are not supported in javac mode.
    It's fine to drop it since javac mode is not fully supported
    by compiler
2020-12-24 14:58:05 +03:00
Dmitriy Novozhilov 8689fc43cd [Test] Move java generation utils to :compiler:tests-compiler-utils module 2020-12-24 14:58:02 +03:00