Commit Graph

182 Commits

Author SHA1 Message Date
Pavel V. Talanov 2b373a3601 Component container add tools to specify default implementation of a component 2017-03-30 18:59:14 +03:00
Mikhail Zarechenskiy 20d5616d75 Introduce Kotlin language version 1.2
Wherein DEFAULT version is still 1.1, which means that version 1.2 should be configured manually
2017-03-30 13:27:45 +03:00
Dmitry Jemerov 03a26c4ce0 Set language level 6 for modules using JDK 6 2017-03-29 18:41:00 +02:00
Alexander Udalov 579238c3be Remove deprecated declarations from project code, cleanup usages 2017-03-22 20:25:54 +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
Alexander Udalov af5fbef4ea Use JDK 1.6 to compile modules under "core"
Outputs of these modules go into kotlin-stdlib and kotlin-reflect, both
of which must be usable on Java 6
2017-03-21 13:03:18 +03:00
Mikhail Glukhikh b121bf8802 Cleanup: fix some compiler warnings (mostly deprecations, javaClass) 2017-03-15 17:35:31 +03:00
Denis Zharkov b5a8ffaddc Fix resolution of callable references
When there is unsuccessful (e.g invisible) result of one kind (static/non-static)
and there is a successful candidate for another kind, choose the latter one.

Note, that we have to postpone commiting trace until we choose one of the results,
otherwise errors of unsuccessful results are reported

TODO: Maybe it makes sense to report all results when all of them are
unsuccessful (NONE_APPLICABLE or something like this)

 #KT-16278 Fixed
2017-03-01 09:59:00 +03:00
Alexander Udalov 4c9afb9d20 Move testable IS_PRE_RELEASE flag to KotlinCompilerVersion
It'll be used in the JS back-end as well soon, so
DeserializedDescriptorResolver is not the best place for it
2017-02-13 12:11:15 +03:00
Ilya Gorbunov 63f591bde9 Deprecate some utils and provide sensible replacements from stdlib. 2017-02-09 18:21:51 +03:00
Alexander Udalov 7371dc9b54 Minor, fix typo in assertion message 2017-01-30 20:27:17 +03:00
Alexander Udalov 268d10d3f0 Advance JvmMetadataVersion to 1.1.4, change IS_PRE_RELEASE to false
Kotlin 1.1 is no longer considered a pre-release
2017-01-30 16:00:05 +03:00
Dmitry Petrov b36e3bc083 KT-13355
An overridden abstract member with a more specific "return type" than an overridden concrete member
should be explicitly overridden even if the class in question can have abstract members.
2017-01-19 16:09:29 +03:00
Denis Zharkov 72401efb9f Update coroutine related runtime parts 2016-12-15 23:32:08 +03:00
Alexander Udalov 1342743001 Add KotlinVersion.IS_PRE_RELEASE and a flag to kotlin/Metadata 2016-12-09 01:59:33 +03:00
Alexander Udalov 414daef001 Rename KotlinVersion->KotlinCompilerVersion, move to module util.runtime
Rename to avoid confusion with the recently added kotlin.KotlinVersion
2016-12-07 21:11:15 +03:00
Simon Ogorodnik f8b7ce1011 Fix for KT-13695, KT-13159 J2K: Invalid conversion context setup for plain text pastes
Extending, Implementing, imports from paste target file previously not implemented
2016-10-27 20:02:26 +03:00
Dmitry Petrov 520a3133bc minor: allow specifying indentation unit in Printer 2016-10-18 09:06:53 +03:00
Alexander Udalov 9fd698db36 Fix NPE in StorageManager on sanitizing stack trace
This could happen when running the compiler from the command line, where
MemoryBasedClassLoader is used which does not ever create Package instances.
2016-10-07 20:13:23 +03:00
Nikolay Krasko cb32bc97dd Remove logging in LockBasedStorageManager creation as it all the same useless
HEAD - 3 leads to "org.jetbrains.kotlin.storage.LockBasedStorageManager.createWithExceptionHandling(LockBasedStorageManager.java:65)" debug string
2016-09-21 15:54:42 +03:00
Denis Zharkov 8ee5f3de8f Minor. Use ArrayList instead of LinkedHashSet
Looks like there's no duplicates anyway
2016-09-09 10:27:35 +03:00
Stanislav Erokhin 6556cde329 Introduce new type checker. 2016-07-21 16:07:16 +03:00
Alexander Udalov d04624cfe9 Minor, refactor KotlinToJVMBytecodeCompiler#compileModules 2016-05-26 11:47:30 +03:00
Mikhail Glukhikh 733f3e8025 Code cleanup: type parameters can have in / out variance 2016-05-13 17:57:02 +03:00
Denis Zharkov c30c695a18 Use cache for custom ClassDescriptors
Otherwise new ones are being created for each request, and their member scope is recomputed
2016-05-04 14:58:05 +03:00
Denis Zharkov 594fa02a9c Optimize memory usage by LockBasedStorageManager inner classes
Change all inner classes to be 'static'
Use explicit reference to StorageManager instead of
implicit reference to outer class.

The main problem of inner classes here is that outer instance
is being captured at each inheritance level, so e.g. some lazy value impls
may store up to three duplicating references.
2016-05-04 14:58:05 +03:00
Denis Zharkov 1efed64014 Use JVM signatures instead of FQ-names for additional built-ins 2016-04-25 17:41:08 +03:00
Denis Zharkov 8cf29ea4f3 Extract JVM descriptors type mapping from backend to core
Also unbind it from ASM types
2016-04-25 17:41:08 +03:00
Denis Zharkov 5bc5722051 Load additional JDK functions into built-ins member scope
#KT-5990 Fixed
 #KT-7127 Fixed
 #KT-10370 Fixed
2016-04-25 17:41:08 +03:00
Alexander Udalov 027cc898e7 Minor, fix warnings in core/ modules 2016-04-17 13:35:17 +03:00
Alexander Udalov db5e00bcc0 Report error if some deserialized classes are missing in dependencies
Technically we often can compile code which uses missing classes (as long as
nothing is called on them) but it seems better to let the user know something's
wrong in their setup before the error manifests itself at runtime. Also the
Java compiler does the same

 #KT-4328 Fixed
2016-03-28 14:13:59 +03:00
Alexey Sedunov fefa0baeee Light Classes: Generate light wrappers for annotation entries 2016-03-24 17:41:58 +03:00
Valentin Kipyatkov 05dc4c1c48 ResolutionFacade for synthetic files should be invalidated on changes in these synthetic files
Fixed EA-77017
2016-03-04 16:30:24 +03:00
Stanislav Erokhin 9338aa5633 Refactoring. Copy SmartList from IDEA to util.runtime module. 2016-03-02 18:07:40 +03:00
Zalim Bashorov 2c1d1e84a6 Allow to use internal declarations from special modules in IDEA
(e.g. IDEA 16 gradle tests loaded in separate module)

 #KT-10595 Fixed
2016-02-08 15:42:47 +03:00
Ilya Gorbunov 744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Ilya Gorbunov 23080f78f7 Map.getOrPut: treat nulls as missing values. 2016-01-26 11:49:18 +03:00
Ilya Gorbunov 9a41e07ac0 Use IDEA 143.1960 built with master kotlin branch.
Remove tweaks required to bootstrap packages.
Restore non-star imports of kotlin.text.Charsets.
2016-01-22 22:06:22 +03:00
Ilya Gorbunov 9c0f0cad70 Packages: move collections to kotlin.collections. 2016-01-22 05:54:38 +03:00
Alexander Udalov d4c4515944 Refactor BinaryVersion and subclasses, get rid of static factories 2016-01-19 18:39:59 +03:00
Alexander Udalov 9552accaec Introduce BinaryVersion.isCompatible()
To decrease the chance to mix up the receiver and the first argument when
checking version compatibility
2016-01-19 18:39:59 +03:00
Alexander Udalov 04d335db15 Move version constants to corresponding BinaryVersion subclasses 2016-01-19 18:39:59 +03:00
Alexander Udalov 2f64680b63 Add several subclasses of BinaryVersion
To simplify comparison of expected vs actual versions in the future
2016-01-19 18:39:59 +03:00
Dmitry Jemerov 3870bd04b8 core: cleanup 'public', property access syntax 2016-01-07 18:03:09 +01:00
Ilya Gorbunov 911adfd04d Cleanup in core modules 2015-12-29 18:04:14 +03:00
Alexander Udalov 57b96f38a9 Minor, remove/simplify unnecessary utilities in util.runtime 2015-12-25 20:16:18 +03:00
Stanislav Erokhin 10a13e737e Minor. Add isComputing to DeferredType 2015-12-08 17:29:55 +03:00
Alexey Sedunov e517cbcf78 Quick Fixes: Implement "Rename unresolved reference" fix
#KT-8795 Fixed
2015-12-08 16:20:56 +03:00
Denis Zharkov 9c73502bdc Partially revert "Fix project source to overcome bootstrap problem"
Adjust code to new generic signatures generated by Kotlin compiler
This reverts commit 0fd2484bc9.
2015-12-04 10:19:48 +03:00
Denis Zharkov 0fd2484bc9 Fix project source to overcome bootstrap problem 2015-12-01 08:21:02 +03:00