Commit Graph

521 Commits

Author SHA1 Message Date
Alexey Tsvetkov eeb90656dc Exclude generated IC tests from ant build
Generated tests depend on the annotations from the `tests-common` module.
Testing utils from test root of the `incremental-compilation-impl` module
are also used in Gradle tests, so the test root is built in the ant build too.
However building `tests-common` separately from the compiler is complicated,
so I decided to exclude generated tests from 'kotlin-build-common-test.jar'.
2017-08-29 02:24:38 +03:00
Nikolay Krasko 0d6cf19896 Don't pack jps services into compiler 2017-08-10 22:05:49 +03:00
Dmitry Jemerov 548e86285c Fix 'ant dist' build against 172 branch 2017-08-10 22:05:46 +03:00
Dmitry Jemerov 20d0d49cc3 Advance Guava version 2017-08-10 22:05:46 +03:00
Alexander Udalov f313001b2d Update to jline 3.3.1 and jansi 1.16
Note that the history file name was changed (.kotlin_history ->
.kotlinc_history) because the history is now stored in a different
(incompatible) format.

 #KT-11369 Fixed
2017-07-25 11:10:45 +03:00
Pavel V. Talanov 008c27d547 Compiler build depends on kotlinx-coroutines-core 2017-07-19 12:28:43 +03:00
Yan Zhulanow d4b4bc71ee Android Extensions: Support @ContainerOptions in compiler plugin 2017-07-18 18:10:21 +03:00
Alexander Udalov 5b9ee88b52 Remove --add-opens options to workaround Java 9 visibility checks
These options are no longer needed because the problematic code in
intellij-core that was accessing these private APIs has been dealt with
in the 171 branch.

The remaining options in "Codegen Tests" run configurations are needed
because of reflection usage on JDK internals in KtUsefulTestCase
2017-07-06 12:50:04 +03:00
Alexander Udalov f96ef96078 Check JDK_16 and JDK_18 existence in build.xml 2017-06-27 14:54:53 +03:00
Nikolay Krasko ad6c84924b Copy bootstrap compiler to dist directory
Can by used in old branches where it's impossible to make dist properly
2017-06-21 17:51:51 +03:00
Alexander Udalov 15e392bbd1 Fix compilation on Windows
JDK_16 environment variable may have spaces in it ("C:\Program
Files\..."), so it should be passed as a separate argument explicitly to
the kotlinc ant task
2017-06-07 16:26:09 +03:00
Alexander Udalov c851e9d206 CLI: use JDK 1.6 to compile the "kotlin" launcher script
"kotlin" is used to run programs compiled by "kotlinc" which supports
emitting JVM bytecode 1.6, so it should also be runnable on JDK 1.6
2017-06-07 14:57:44 +03:00
Alexander Udalov 534e8a5c50 Do not pack useless files into the compiler jar
Do not pack META-INF/services to compiler-quick from out directories
because they're packed from sources anyway in the pack-compiler target.
Also do not pack the "META-INF/jb/$$size$$" and "META-INF/LICENSE" files
found in some IntelliJ libraries. Licenses are not required in binaries,
and previously only the first of them was packed anyway
2017-06-07 14:41:13 +03:00
Alexey Andreev 174068c462 Add JS source map parser and remapper
JS source map remapper takes parsed source maps
together with JS AST with correct JS positioning information
and converts the latter into Kotlin positioning information
2017-06-07 11:13:51 +03:00
Alexander Udalov 751ff48301 Extract logic of builtins package fragment provider creation
This allows to drop the compile dependency of module 'descriptors' on
'deserialization', breaking the circular dependency between them
2017-06-06 14:29:20 +03:00
Alexander Udalov ea9194e1fb CLI: compile preloader against JDK 1.6
To be able to detect the Java runtime version at startup to report an
error if it's < 1.8
2017-06-06 14:17:27 +03:00
Alexey Andreev 9e89213d66 Prototyping DCE tool for JS 2017-05-26 18:20:15 +03:00
baratynskiy 5eea3b6569 Introduce experimental -Xuse-javac compilation mode
In this mode, javac AST and Symbol files are used during
Kotlin compilation instead of PSI / binary stuff.
Later, they are reused for Java file compilation.
javac in this mode is integrated into kotlinc.
2017-05-17 17:48:17 +03:00
Ilya Gorbunov 2f7ab1c0c1 Inline some properties from kotlinManifest.properties that were used only once 2017-05-05 21:56:56 +03:00
Ilya Gorbunov 96c36fb317 Remove manifest.impl.value.kotlin.version and other unused properties from kotlinManifest.properties 2017-05-05 21:56:56 +03:00
Ilya Chernikov c91a3f8bf0 Add sam-with-receiver and source-sections compiler plugins to maven
rename source-sections compiler plugin jar in the dist (add kotlin- prefix),
according to the agreed naming scheme for the artefacts. (The renaming of the
other plugins should follow.)
in addition configure proguard to retain VirtualFile members, since they
are used in the source-sections plugin
2017-04-19 15:22:15 +02:00
Zalim Bashorov 51e84f7ce4 Move some script related part of frontend to separate module to avoid using kotlin-reflect.jar in frontend module
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:35 +03:00
Denis Zharkov 5e449fdc02 Optimize control-flow analysis by use of persistent maps
The case that it's worth to optimize is functions
with a lot of variables.

After debugging it's recovered that control-flow works nearly
O(n * m) where n is pseudocode size and m is a number of variables:
the algorithm performs O(n) copies of hashmap of size O(m)

Persistent maps should help because we don't need to perform a
copy of them, so the expected performance after the change is applied
is O(n log m)

We've tried pcollections and javaslang, and the latter one has demonstrated
better results

See results before and after optimizations
before:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/3da7ba45a704969653d70b50995f730e968540d8/reports/benchmarks-many-vars-2017-03-14.txt

after with pcollections:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/3da7ba45a704969653d70b50995f730e968540d8/reports/benchmarks-many-vars-persistent-optimizations-2017-03-17.txt

after with javaslang:
https://github.com/dzharkov/kotlin-compiler-benchmarks/blob/d22a871b175b291fb337b51ef6465ba70bbfd96c/reports/benchmarks-many-vars-javaslang-2017-04-07.txt
2017-04-11 11:26:11 +03:00
Ilya Gorbunov 3425f6d3af Remove dist-quick as it fails on terminal steps anyway.
Add compiler-for-maven packing step to dist-quick-compiler-only.
2017-04-10 19:46:06 +03:00
Ilya Gorbunov 37e046f6cd Provide shortcuts for producing quick compiler for maven and rebuilding stdlib-js from ant. 2017-04-10 19:46:06 +03:00
Ilya Gorbunov afba967fcf Use kotlin-stdlib.jar instead of kotlin-runtime.jar as runtime during build 2017-04-10 19:46:06 +03:00
Ilya Gorbunov e7dc7ec005 Rebuild sources for kotlin-daemon-client and compiler-client-embeddable in maven build
Do not build these sources in ant.
Do not require them as artifact dependencies.
2017-04-08 19:07:54 +03:00
Ilya Gorbunov 6e961be1a1 No need to fork ant under jdk8 to build annotation-processing 2017-04-08 08:31:03 +03:00
Ilya Gorbunov eef835f6c1 Remove ant targets that are superseded by gradle build. 2017-04-08 08:31:01 +03:00
Ilya Gorbunov 356f8dd0d1 Killswitch: do not build runtime with ant, switch to gradle artifacts. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov df44f3bfe6 Launch kotlin runtime gradle build from ant.
Fork ant to build compiler as it requires a lot of memory.
Pass build.number to gradle build.
2017-04-06 20:32:37 +03:00
Ilya Chernikov a309511adf Add actual sources to compiler and daemon client jars 2017-04-06 10:02:46 +02:00
Ilya Chernikov 7ceaca133a Add new artifact kotlin-compiler-client-embeddable.jar 2017-04-06 10:02:44 +02:00
Ilya Chernikov 32d0d7a4d5 Remove xerces from compiler uberjar, pack compiler with explicit jar names
xercesImpl was unnecessarily added to the compiler uberjar during migration
to the idea platform 171. This caused NCDFE about classes from org.w3c
package.
And to simplify application of this commit and to ensure that only required
jars are packed into the uberjar, the build.xml was altered to use
explicit list of the jars from the ideaSdk/core directory, rather than
a mask.

Fixes #KT-17143 and #KT-17157

(cherry picked from commit 5595bea)
2017-04-04 15:14:46 +02:00
Ilya Gorbunov c740c0b177 Do not produce javadoc for kotlin-compiler and do not attach it to maven artifacts 2017-04-01 04:32:01 +03:00
Alexander Udalov a5d70cfa68 Support running Kotlin compiler CLI on Java 9 on Unix
Workaround IDEA-170005, IDEA-170494 and similar issues by opening the
required packages from java.base to the unnamed module

 #KT-14988 In Progress
2017-03-30 13:04:41 +03:00
Ilya Chernikov 4b430b49a7 Implement source sections compiler plugin
allows to compile only parts of the source files, denoted by top-level
"sections" (function with lambda param calls), but preserving original
file line/column numbers for easier diagnostics. Allow e.g. to compile
gradle "buildscript" section without preprocessing original file in
advance. See tests for examples.
2017-03-21 16:30:46 +01:00
Dmitry Jemerov 3a8cf68541 Keep class file version during shrinking; generate Java 8 bytecode
sometimes
2017-03-20 18:45:59 +01:00
Alexey Sedunov 73b879ea89 Misc: Include cli-parser 1.1.2 sources into the project under different package and drop original library dependency
This would allow building the project with Kotlin JPS plugin on TeamCity where older library takes precendence due to appearing earlier in JPS classpath
2017-03-14 15:33:06 +03:00
Dmitry Jemerov 1d86bd5610 Build multiplatform stdlib docs 2017-03-01 16:08:38 +01:00
Dmitry Jemerov adc937c57d Extract separate target for preprocessing JS stdlib sources 2017-03-01 16:08:28 +01:00
Alexander Udalov c10524586a Use proguard to remove unused symbols from kotlin-reflect.jar
#KT-16268 Fixed
2017-02-15 10:46:48 +03:00
Alexander Udalov e5680565b3 JS: drop "-kjsm" flag, merge logic with "-meta-info"
#KT-16049 Fixed
2017-01-30 11:31:03 +03:00
Alexander Udalov 46bf057b47 JS: do not generate .meta.js and .kjsm for built-ins 2017-01-30 11:31:02 +03:00
Zalim Bashorov 29ac01f2e2 KJS: allow to use packages with names starting with "kotlin" only if the -Xallow-kotlin-package command line option is specified
#KT-14668 Fixed
2017-01-29 17:21:01 +03:00
Ilya Gorbunov 0df31f1223 Build kotlin-stdlib-js.jar in ant
#KT-15940
2017-01-27 22:19:40 +03:00
Ilya Gorbunov f9e552e3c2 Build kotlin-stdlib in addition to kotlin-runtime in ant build. 2017-01-24 22:38:05 +03:00
Ilya Gorbunov a0cfd8d35e Change builtins module name to kotlin-runtime to match that of maven built artifact. 2017-01-24 22:04:46 +03:00
Ilya Gorbunov 9b9852cdc9 kotlin-test: rename shared module to common.
Do not use shared kotlin-test while building js stdlib.
2017-01-24 19:39:05 +03:00
Sergey Mashkov 98075c17c9 kotlin-test: extract from JS library, convert to multiplatform 2017-01-23 15:43:02 +03:00