Commit Graph

19656 Commits

Author SHA1 Message Date
Nikita Skvortsov 4e99a61aea fix compilation 2014-12-31 12:05:42 +03:00
Nikita Skvortsov 140bbe28fd move kotlin-gradle plugin classes from core to wrapper 2014-12-31 12:05:41 +03:00
Nikita Skvortsov e6d6281a3f move java cross-compile-related code to kotlin2jvm task 2014-12-31 12:05:41 +03:00
Zalim Bashorov 619854a7a3 JS frontend: additional check for nativeSetter -- check that the return type is either Unit or a supertype of the second parameter's type. 2014-12-30 19:10:38 +03:00
Zalim Bashorov 76bafb9634 Added spec about JavaScript interop. 2014-12-30 17:30:05 +03:00
Zalim Bashorov 9869ae10e5 JS frontend: allow to omit body for native functions and initializer for native properties. Additionally suppress UNUSED_PARAM for new nativeX annotations too. 2014-12-29 21:37:18 +03:00
Zalim Bashorov 41dff74037 resolve/*Diagnostics* -> resolve/diagnostics/*Diagnostics*
And remove unused TraceUtil.java
2014-12-29 21:37:18 +03:00
Alexander Udalov d4e90b5bc3 Regenerate tests 2014-12-29 19:32:10 +03:00
Alexander Udalov e9badcbcc7 Rename AsmTypeConstants -> AsmTypes 2014-12-29 19:32:10 +03:00
Alexander Udalov 6cd6704bcf Remove obsolete codegen test data 2014-12-29 19:32:09 +03:00
Zalim Bashorov 7668f44655 JS lib: added hasNext to Kotlin.ListIterator and fixed next.
#KT-6506 Fixed

Additionally made abstract AbstractList::get and AbstractCollection::size.
2014-12-29 19:15:32 +03:00
Alexander Udalov 480f990c1d Preloader: HashMap constructor takes capacity, not expected size 2014-12-29 18:19:24 +03:00
Alexander Udalov 8306ccd8ec Preloader: extract nested classes to top-level 2014-12-29 18:19:24 +03:00
Alexander Udalov 9273b0dfec Preloader: support loading classpath dependencies from manifest
Move this logic from ide-compiler-runner. This fixes running 'kotlinc' CLI
compiler locally when the runtime is changed binary incompatibly
2014-12-29 18:19:23 +03:00
Alexander Udalov 91f110acd4 Preloader: support many resources by given name 2014-12-29 18:19:22 +03:00
Alexander Udalov 0d671141d0 Don't store class loader in CompilerEnvironment
Modules jps-plugin and ide-compiler-runner are loaded by the same class loader
2014-12-29 18:19:21 +03:00
Alexander Udalov 5e261e344e Move ExitCode to cli-common, simplify KotlinCompilerRunner
- check exit code's toString instead of integer code: more readable and stable
  this way
- call newInstance() on arguments' classes instead of pointless constants
2014-12-29 18:19:20 +03:00
Alexander Udalov a14e0ac59e Simplify KotlinCompilerRunner and CompilerRunnerUtil 2014-12-29 18:19:19 +03:00
Alexander Udalov 9807643b0e Synchronize access to mutable class loader reference in CompilerRunnerUtil 2014-12-29 18:19:18 +03:00
Alexander Udalov 51e9675138 Include different runtime into plugin for bootstrap build 2014-12-29 18:19:18 +03:00
Alexander Udalov ef1fef65c2 Minor, rename module to conform to naming style 2014-12-29 18:19:17 +03:00
Alexander Udalov 7de9a3f029 Load compiler dependencies in a separate class loader in IDE compiler runner
To be able to invoke the intermediate compiler built on the first step of
bootstrap: in contrast to the distributed compiler, it's incompatible with the
runtime produced by itself and should instead be run with the runtime in the
classpath which was used to compile it.

Drop the non-preloader mode of running compiler, because it would require using
a special parent-last class loader with exceptions specified by ClassCondition
2014-12-29 18:19:13 +03:00
Alexander Udalov 45c6d486fc Refactor CompilerRunnerUtil
Eliminate code duplication, add NotNull, make everything private, etc
2014-12-29 18:17:22 +03:00
Alexander Udalov b8328f9190 Rename MessageRenderer constants 2014-12-29 18:17:21 +03:00
Alexander Udalov a30a3f1926 Rework bootstrapping compiler with runtime in build.xml
Do not pack the runtime into the compiler on the first step of bootstrap, but
rather leave it as a separate file named kotlin-runtime-internal-bootstrap.jar.

This new solution will allow compiler to use its own classes from "core", not
the ones used by the runtime it depends on
2014-12-29 18:17:21 +03:00
Alexander Udalov ffbae46e3c Compile kotlin-runtime-minimal.jar, run proguard against it
ProGuard complains if we're trying to shrink compiler with the full runtime in
dependencies because for the compiler produced on the first step of bootstrap
these two jars contain conflicting classes. This won't matter in the final
distribution because we will strip 'core' modules from compiler.jar. But this
matters in the first step because core will be different in the compiler (used
to load compiled class files) and in the reflection (used to introspect symbols
at runtime).

kotlin-runtime-minimal.jar still contains the complete reflection API and some
stub implementations in module 'reflection.stub.jvm', but doesn't have core, so
it won't cause a proguard error
2014-12-29 18:17:10 +03:00
Alexander Udalov 6c145de39e Minor, remove pointless comment and broken URL 2014-12-29 18:00:18 +03:00
Alexander Udalov 14dab749a2 Use reflection in Ant task to invoke compiler
This will allow a more controlled management of the runtime that the compiler
is linked against. Incidentally this also allows Ant task to use any of
compiler arguments via <compilerarg> because Ant task is now just a facade for
the CLI compiler.

The test "wrongArguments" is deleted because the full compiler usage is now
printed out on a wrong <compilerarg>, and this will become inconvenient to
update with each change in compiler arguments

 #KT-5618 Fixed
2014-12-29 18:00:18 +03:00
Alexander Udalov 3bde619ca3 Add test for obsolete issue
#KT-4434 Obsolete
2014-12-29 18:00:17 +03:00
Alexander Udalov 91754c0c4b Move test files to test data root 2014-12-29 18:00:16 +03:00
Nikolay Krasko 1ec7104132 Search in index under read lock to prevent entering to isDumb() mode (EA-63656) 2014-12-29 17:55:22 +03:00
Nikolay Krasko 3d254748b4 Minor: better function used and reformat 2014-12-29 17:55:21 +03:00
Valentin Kipyatkov d297f4ad8f Minor 2014-12-29 17:27:30 +03:00
Valentin Kipyatkov 4b2ee7e645 Fixed KT-6429 Wrong replacement range in smart completion in some particular case
#KT-6429 Fixed
2014-12-29 17:27:30 +03:00
Valentin Kipyatkov 51678d0a45 KT-5874 Support code completion of label names after "continue@" and "break@"
#KT-5874 Fixed
2014-12-29 17:27:30 +03:00
Valentin Kipyatkov 4800a02e69 More correct list of keywords with no space after 2014-12-29 17:27:30 +03:00
Valentin Kipyatkov 0b687ddb05 Added tests for space insertion after return@xxx + do not overwrite space after keyword 2014-12-29 17:27:30 +03:00
Valentin Kipyatkov e39443d53a Refactored tests for keywords insertion to be all generated 2014-12-29 17:27:30 +03:00
Valentin Kipyatkov 276b99857a Insertion of space after "return" depending on return type 2014-12-29 17:27:29 +03:00
Valentin Kipyatkov cdb5ec3492 KT-5875 Support code completion after "return@"
#KT-5875 Fixed
2014-12-29 17:27:29 +03:00
Valentin Kipyatkov 95285f7a2e Auto-popup completion after @ 2014-12-29 17:27:29 +03:00
Valentin Kipyatkov 39a5486db8 Completion of this@...: supported labeled function literals 2014-12-29 17:27:29 +03:00
Valentin Kipyatkov 05be100f53 Corrected test data which was incorrect before 2014-12-29 17:27:29 +03:00
Valentin Kipyatkov 3b0fe8831b Code completion of "this@..."
#KT-2035 Fixed
2014-12-29 17:27:29 +03:00
Valentin Kipyatkov 2adcaef39c Completion: use class icon instead of method icon for instantiation 2014-12-29 17:27:29 +03:00
Valentin Kipyatkov ddd63d69e9 KT-6442 Completion of inner class name contains outer name
#KT-6442 Fixed
2014-12-29 17:27:28 +03:00
Valentin Kipyatkov b94e9e63c3 KT-6534 Code completion of global function does not insert import in very specific context
#KT-6534 Fixed
2014-12-29 17:27:28 +03:00
Dmitry Jemerov eca8ed2768 Merge pull request #541 from JetBrains/rr/yole/coverageView2
Implement APIs added in IDEA 14.1 for Packages view and Coverage view to work
2014-12-29 14:49:14 +01:00
Dmitry Jemerov e0677dffd4 a bit more cleanup 2014-12-29 14:48:26 +01:00
Dmitry Jemerov d1123e116f refactor for clarity; don't ignore XxxPackage files not related to Kotlin 2014-12-29 13:57:56 +01:00