Commit Graph

2259 Commits

Author SHA1 Message Date
Alexander Udalov 7fb7dc0210 Fix deprecation warnings related to Project extensions 2020-09-08 20:26:20 +02:00
Alexander Udalov e7937db8fa Add link to the online docs to kotlinc's help
#KT-35111 Fixed
2020-09-02 16:45:56 +02:00
Alexander Udalov 6b05e1d179 Add warning to 'kotlinc.bat help' that delimiters need to be escaped
Related to KT-41303, KT-41309.
2020-09-02 16:45:40 +02:00
Roman Artemev a60782f3df [JS IR] Add CLI argument to setup error tolerance policy
-  Make sure dev mode is enabled if code with errors is allowed
2020-09-01 14:53:07 +03:00
Dmitriy Novozhilov a4e24ca3dc [FIR] Introduce FirAnalyzerFacade which hides implementation details of running FIR compiler 2020-09-01 12:00:13 +03:00
Dmitriy Novozhilov 6db8c28291 [FIR] Refactor session components initialization
From now all customization of session should perform via DSL which
  declared in FirSessionFactory. Registration or mutation session
  services from other places is prohibited
2020-09-01 12:00:12 +03:00
Dmitriy Novozhilov a8d23c36f5 [FIR] Introduce module :fir:entrypoint and FirSessionFactory for creating sessions 2020-09-01 12:00:12 +03:00
Alexander Udalov 5e48be3d11 Add a fallback flag -Xno-unified-null-checks for KT-22275
#KT-41482 Fixed
2020-08-31 12:43:28 +02:00
Dmitriy Novozhilov 2e92fe9be9 [FIR2IR] Add fir2ir component for converting fir visibility to FE 1.0 2020-08-25 10:31:36 +03:00
Alexander Udalov 0ef4b22cf3 Remove deprecated usages of ContainerUtil 2020-08-20 20:30:34 +02:00
Mikhail Glukhikh 07bddbe4d0 [FIR CLI] Don't run generation if some errors are found 2020-08-20 16:04:07 +03:00
Yunir Salimzyanov 42da9e62db Cleanup 192 patchset files (KTI-315) 2020-08-19 19:40:02 +03:00
Ilya Chernikov f713e8ad36 Set context classloader before REPL evaluation
#KT-35925 fixed
2020-08-19 15:17:06 +02:00
alexjuca 4794297640 used string template instead of concatenation 2020-08-19 13:58:58 +02:00
vldf a26eeb6ee8 [FIR] Add CLI flag for running extended checkers 2020-08-18 21:53:07 +03:00
Alexander Udalov a21f273570 Fix compiler warnings in compiler code 2020-08-17 21:18:20 +02:00
Alexander Udalov 3bdbfc1e73 Output total codegen statistics after IR translation/generation 2020-08-17 19:29:58 +02:00
Alexander Udalov c3cbcf6d7f Slightly improve performance measurements rendering
Report the input module name and size once before any measurements
instead of duplicating it in all of them. Also, render measurements in a
table to improve readability.

Before:

info: PERF: INIT: Compiler initialized in 467 ms
info: PERF: ANALYZE: 1 files (2 lines) target main-java-production in 277 ms - 7.220 loc/s
info: PERF: IR: Translation 1 files (2 lines) target main-java-production in 291 ms - 6.873 loc/s
info: PERF: GENERATE: 1 files (2 lines) target main-java-production in 513 ms - 3.899 loc/s
info: PERF: IR: Generation 1 files (2 lines) target main-java-production in 142 ms - 14.085 loc/s

After:

info: PERF: main-java-production, 1 files (2 lines)
info: PERF: INIT: Compiler initialized in 421 ms
info: PERF:         ANALYZE     342 ms       5.848 loc/s
info: PERF:  IR TRANSLATION     296 ms       6.757 loc/s
info: PERF:        GENERATE     453 ms       4.415 loc/s
info: PERF:   IR GENERATION     137 ms      14.599 loc/s
2020-08-17 19:29:57 +02:00
Mikhail Glukhikh e841b3a77b [FIR] Add diagnostic collection to KotlinToJVMBytecodeCompiler 2020-08-04 22:27:18 +03:00
Alexander Udalov cce55f1609 IR: add module ir.tree.impl, move main IR implementation there 2020-07-28 19:04:44 +02:00
Alexander Udalov 77247deb23 IR: add module ir.tree.persistent, copy PIR implementation there
Use PersistentIrFactory in JS IR compiler entry points.
2020-07-28 19:04:43 +02:00
Alexander Udalov db4cbe7103 IR: use IrFactory in SymbolTable 2020-07-28 12:05:23 +02:00
Mikhail Zarechenskiy 0c8b847ae6 Introduce compiler key to disable compatibility resolution mechanism
Enable it if one was using new inferene before 1.4

 #KT-40128 Fixed
 #KT-40112 Fixed
 #KT-40113 Fixed
2020-07-10 14:23:45 +03:00
Florian Kistner 346df07adc 203: Fix compilation for 203 2020-07-09 15:27:45 +02:00
simon.ogorodnik 6bc654ee49 [FIR] Add full compiler pipeline modularized test
Fixup: allow kotlin package
2020-07-07 21:47:24 +03:00
simon.ogorodnik bf1c3777ab Add IR specific timing measurements to performance manager 2020-07-07 21:47:24 +03:00
simon.ogorodnik 0de70d295a Fix argument names 2020-07-07 21:47:23 +03:00
simon.ogorodnik b401443dbd Compute GC metrics only during compilation 2020-07-07 21:47:23 +03:00
simon.ogorodnik 6095ec66ed Allow to pass external performance manager to compiler 2020-07-07 21:47:23 +03:00
Nikolay Krasko 87a520fc30 202: Overcome failure in PathManager.getHomePath() because of the wrong dir
Stacktrace:

java.lang.RuntimeException: Could not find installation home path. Please reinstall the software.
  at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:106)
  at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:76)
  at com.intellij.openapi.application.PathManager.getPreInstalledPluginsPath(PathManager.java:248)
  at com.intellij.ide.plugins.DescriptorListLoadingContext.<init>(DescriptorListLoadingContext.java:57)
  at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:61)
  at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1397)
  at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:266)
  at org.jetbrains.kotlin.cli.jvm.compiler.CoreApplicationEnvironmentCompatKt.registerExtensionPointAndExtensionsEx(coreApplicationEnvironmentCompat.kt:17)
  at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:534)
  at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:505)
  at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.getOrCreateApplicationEnvironmentForProduction(KotlinCoreEnvironment.kt:465)
  at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:92)
  at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
  at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
  at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
  at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
  at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
  at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
  at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
  at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:225)
  at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
  at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:262)
  at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:63)
2020-07-03 21:21:23 +03:00
Nikolay Krasko ca7169b84f 202: Disable ignored plugins check in compiler environment
Stacktrace:

java.lang.NullPointerException
  	at java.io.Reader.<init>(Reader.java:78)
  	at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
  	at com.intellij.ide.plugins.PluginManagerCore.getBrokenPluginVersions(PluginManagerCore.java:207)
  	at com.intellij.ide.plugins.PluginManagerCore.createLoadingResult(PluginManagerCore.java:825)
  	at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:61)
  	at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1397)
  	at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:266)
  	at org.jetbrains.kotlin.cli.jvm.compiler.CoreApplicationEnvironmentCompatKt.registerExtensionPointAndExtensionsEx(coreApplicationEnvironmentCompat.kt:17)
  	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:534)
  	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:505)
  	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.getOrCreateApplicationEnvironmentForProduction(KotlinCoreEnvironment.kt:465)
  	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:92)
  	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
  	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
  	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
  	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
  	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
  	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
  	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
  	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:225)
  	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
  	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:262)
  	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
2020-07-01 11:31:22 +03:00
Mikhail Bogdanov b5b5c8aebc Check target for -Xjvm-default modes
#KT-39925 Fixed
2020-06-30 19:47:06 +02:00
Nikolay Krasko 21fa2bf98c Switch to 201 platform 2020-06-30 19:53:18 +03:00
Alexander Gorshenev e61960f333 Fake override construction fallback mode 2020-06-29 21:58:31 +03:00
Alexander Gorshenev de79e3bec3 Added -Xdisable-fake-override-validator 2020-06-29 21:58:31 +03:00
Ilmir Usmanov f127a0f593 Add flag to disable new spilled variable type analysis 2020-06-29 20:50:43 +02:00
Anton Bannykh da79f93c61 JS IR: per-module .js generation support 2020-06-26 17:55:33 +03:00
Mathias Quintero f0bc52222d Fix annotation construction with array literals
Turns out the issue happens to be that ArrayValue uses a list of values which needs to be translated to an array of the percise type before it is used by callBy

This also addresses handling of arguments after a vararg in an annotation
2020-06-19 13:20:57 +02:00
Ilya Muradyan 017f640f26 Allow skipping extensions resolution for implicit receivers 2020-06-19 13:03:23 +02:00
Ilya Chernikov 8fb41e4562 Process compiler plugins and options in scripting compiler
#KT-37766 fixed
2020-06-16 17:11:33 +02:00
Vyacheslav Gerasimov 4aa3040550 Build: Use runtimeOnly instead of deprecated runtime
maven-publish plugin uses `runtimeOnly` for runtime scope instead of
`runtime`
2020-06-14 20:31:26 +03:00
Nikolay Krasko 7190b3400f 202: Fix compilation in DefaultDiagnosticReporter 2020-06-10 12:39:29 +03:00
Nikita Bobko eb67c4519d 202: Fix compilation because of CoreJarVirtualFile
CoreJarVirtualFile is now package private. And seems that
most of VirtualFiles return system independent path
2020-06-10 12:39:28 +03:00
simon.ogorodnik cd9273028b Profiling and repeat support for JVM CLI Compiler 2020-06-08 20:40:27 +03:00
Ilya Muradyan 489290263f Add info about the end of range in scripting REPL compiler messages 2020-06-05 21:58:28 +02:00
Ilya Chernikov 5e33612238 Extract interface from CompilerMessageLocation to ease extension
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
2020-06-05 21:58:27 +02:00
Vladimir Ilmov 3634cbe3cb (LightClasses) resolve of annotations fast-path 2020-06-05 13:27:10 +02:00
Mikhail Glukhikh 9ea69b4b3c Introduce first version of FirJvmKotlinMangler & its parts 2020-06-02 18:47:50 +03:00
Leonid Startsev 7c8c5b057f Extensible mechanism for plugin metadata during descriptor serialization
A mechanism that allows kotlinx.serialization plugin to preserve the
correct (program) order of properties after serializing/deserializing
descriptors to kotlin metadata, which is needed for correct and stable
json serialization of class hierarchies in incremental/multi-module scenario.
It uses protobuf extensions.
2020-06-01 17:48:16 +03:00
Nikita Bobko aa5a5c954f Refactoring: change "// BUNCH: xxx" format
It wasn't obvious how to use this comment properly.
Now it should be clear
2020-05-29 20:31:12 +03:00