Commit Graph

571 Commits

Author SHA1 Message Date
Alexander Udalov 00ca2c8bad Don't create KClass and KPackage instances in <clinit>
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.

Original commit: a4732b442d
2015-10-11 17:10:35 +03:00
Alexander Udalov cfad31bba1 Don't write field signatures when not necessary
Original commit: 934ffed944
2015-10-11 17:10:30 +03:00
Alexander Udalov 66961715dd Don't always write JVM method signatures to metadata
When the trivial type mapping (implemented in JvmProtoBufUtil) from
ProtoBuf.Type instances works fine, don't write the signature since it can be
loaded by exactly the same trivial type mapping

Original commit: 864926ee2e
2015-10-11 17:10:30 +03:00
Alexander Udalov 739cdb5c29 Drop Callable and primary/secondary constructor proto messages
Original commit: e4efa27b76
2015-10-11 17:10:26 +03:00
Yan Zhulanow 6e19e8c055 Replace get() and set() to getValue() and setValue() (property delegates)
Original commit: 1f2b4e20fe
2015-10-09 22:49:16 +03:00
Mikhail Glukhikh adda278298 Local interfaces are forbidden now
Original commit: 2fee9d362c
2015-10-09 21:06:33 +03:00
Mikhail Glukhikh 533a26ef9d Old backing field with dollar is now forbidden
Original commit: 6914d09297
2015-10-09 21:06:26 +03:00
Michael Bogdanov 1ebdbd18dc Copy to interface just companion object public const properties
Original commit: 12afbffb09
2015-10-09 16:25:15 +03:00
Dmitry Jemerov 6bbf3aaf66 restore compilation after rebase of dropping external annotations; fix affected tests
Original commit: 7e2c2ef678
2015-10-09 11:52:02 +02:00
Alexander Udalov 1dcc772f45 Drop external annotations support in build tools
External annotations will only be considered in the IDE for additional
inspections based on more precise types in Java libraries

Original commit: 13c54a2678
2015-10-09 11:51:58 +02:00
Ilya Gorbunov eec9d11a86 Do not sort twice
Original commit: 17fc1d9562
2015-10-07 22:36:50 +03:00
Ilya Gorbunov f63d5e372c Replace IoPackage legacy facade with corresponding package parts.
Original commit: fa491c8f1f
2015-10-07 22:36:31 +03:00
Ilya Gorbunov fea6e227fb Replace KotlinPackage legacy facade with corresponding package parts.
Original commit: 90e5ee8a7e
2015-10-07 22:36:29 +03:00
Ilya Gorbunov 3f0f62fccd Replace assert with lazy assert, times with repeat.
Original commit: 3106458cc4
2015-10-07 22:36:23 +03:00
Ilya Gorbunov c651a58e69 Replace sort with sorted.
Original commit: 37a0347669
2015-10-07 22:36:16 +03:00
Ilya Chernikov fff380ee81 Caching daemon connection in JPS, additional logging and minor perf measurements refactoring
# Conflicts:
#	jps-plugin/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunner.kt

Original commit: e27abe2f03
2015-10-07 19:55:05 +02:00
Ilya Chernikov 3756988fd4 Adding support for JS compilation on daemon
Original commit: 99b638a58b
2015-10-07 19:55:03 +02:00
Ilya Chernikov 3721b5fbe9 Extracting performance measuring utils into mini-framework, implement measurements of the rpc time, adding more measurements to performance logging, minor refactorings
Original commit: be66c24467
2015-10-07 19:55:01 +02:00
Alexander Udalov 97b4d89f0b Use internal names in multifile class metadata
To reuse the strings already existing in the constant pool of the class file

Original commit: bdd69d9e46
2015-10-03 00:59:34 +03:00
Alexander Udalov bdd8b3825b Write JVM signatures to new protobuf messages
Original commit: 8c0a86617a
2015-10-03 00:59:33 +03:00
Alexander Udalov ba87e98243 Split ProtoBuf.Callable to three messages: constructor, function, property
Serialize both at the moment, will drop the old one after bootstrap

Original commit: ad735cd788
2015-10-03 00:59:30 +03:00
Alexander Udalov 72b39ee233 Deprecate and don't write KotlinClass$Kind, to be removed later
Original commit: 041af28166
2015-10-03 00:59:30 +03:00
Alexander Udalov feabc81e3a Deprecate and don't write KotlinSyntheticClass$Kind, to be removed later
Original commit: 056bb3f833
2015-10-03 00:59:28 +03:00
Alexander Udalov 8550ed6cec Cleanup descriptors.proto, regenerate
- move enums and messages nested in Callable to top level, since they're likely
  to be reused in other messages soon
- delete obsolete comments: some did not any value, some became obsolete with
  custom options ("id in StringTable" -> name_id_in_table)

Original commit: e4090d3f30
2015-10-02 20:30:55 +03:00
Pavel V. Talanov 962d233e1a 'descriptors' module exports 'deserialization', not the other way around
Also remove some of redundantly specified dependencies

Original commit: 0ae842a05d
2015-10-01 17:53:13 +03:00
Michael Nedzelsky e654254c9f add tests for incremental compilation: package members
Original commit: 0de9e8295a
2015-10-01 15:16:30 +03:00
Michael Nedzelsky d3d256e709 incremental compilation: do not recompile on changes in private static final values.
Original commit: 8557e540fc
2015-10-01 15:16:26 +03:00
Michael Nedzelsky ac20dbf780 add tests for comparison of package members
Original commit: bc6746b9e6
2015-10-01 15:16:22 +03:00
Michael Nedzelsky bacc14b4c4 fix KT-8977 Ignore non-public API changes for packages in incremental compilation
#KT-8977 Fixed

Original commit: c7b52bfdc1
2015-10-01 15:16:18 +03:00
Zalim Bashorov eb1f04c29d Move visibility check for toplevel private declarations to Visibilities.PRIVATE and fix it.
Original commit: a36e4abf4d
2015-10-01 14:57:26 +03:00
Dmitry Petrov 44f754521a Migrate to new storage API.
Remove IncrementalPackageFragment::getMultifileFacade.

Original commit: 9a41ee41d7
2015-09-30 09:56:05 +03:00
Dmitry Petrov aef8470196 Incremental compilation support for multifile classes.
Original commit: 3dfe9951ef
2015-09-30 09:56:05 +03:00
Denis Zharkov db78429e2d Change INTERFACE_IMPL_CLASS_NAME: $TImpl -> DefaultImpls
Original commit: a101fffd9a
2015-09-30 08:19:51 +03:00
Zalim Bashorov 05f074ac4c KotlinBuilder: improve logging
Original commit: 0eac238f9b
2015-09-29 19:42:29 +03:00
Alexander Udalov 68e17044fe Introduce new string table optimized for JVM class files
This format of the string table allows to reduce the size of the Kotlin
metadata in JVM class files by reusing constants already present in the
constant pool. Currently the string table produced by JvmStringTable is not
fully optimized in serialization (in particular, the 'substring' operation
which will be used to extract type names out of generic signature, is not used
at all), but the format and its complete support in the deserialization
(JvmNameResolver) allows future improvement without changing the binary version

Original commit: 1036506b25
2015-09-29 16:26:28 +03:00
Alexander Udalov 46f1add2f3 Introduce infrastructure to separate string table from metadata on JVM
Nothing especially helpful happens here, this is only a big refactoring
introducing a separate string array for the string table, which is currently
always empty, but will contain actual strings soon

Original commit: 6a8d0fbd75
2015-09-29 16:26:27 +03:00
Alexander Udalov 1e2cb13c07 Remove NameResolver#getFqName, replace with getClassId
Original commit: 89fe54c951
2015-09-29 16:26:26 +03:00
Alexander Udalov 7e24eb8d91 Simplify storage of JVM signatures in binary metadata
Store the whole method & field descriptor strings. Moving these strings to
separate annotation arguments later will allow to reuse them with the ones in
the constant pool, presumably allowing to save lots of space (up to 10%)

Original commit: 7d5bd3cf50
2015-09-29 16:26:25 +03:00
Alexander Udalov 99bf0fd03f Delete deprecated Type.Constructor message, advance ABI version
Original commit: e749bc262d
2015-09-29 16:26:24 +03:00
Stanislav Erokhin 7de15ca7d1 Minor. Fix testdata.
Original commit: 5a61871d4b
2015-09-29 13:33:57 +03:00
Michael Nedzelsky 4755cab740 fix check for internal from another module in imports and file level annotations
Original commit: 0035bbba7c
2015-09-27 20:37:41 +03:00
Michael Nedzelsky 8c8a3e549c remove incremental test: accessPrivateMembers
Original commit: 2f9151ec18
2015-09-25 21:16:03 +03:00
Alexey Tsvetkov ae9c86ddd1 Remove tests on turning incremental on/off temporary
Original commit: 743c59331d
2015-09-25 20:11:58 +03:00
Alexey Tsvetkov 81d59de601 Update cache version
Original commit: 1002d233cb
2015-09-25 20:11:58 +03:00
Alexey Tsvetkov 8e27d32a7b Clean only kotlin caches when incremental compilation is off
Original commit: ba33020140
2015-09-25 20:11:58 +03:00
Alexey Tsvetkov 4e7cc0b637 Minor: rename test cases
Original commit: 1298d115bd
2015-09-25 20:11:57 +03:00
Alexey Tsvetkov 5b4101ee0d Fix recompilation of dependent modules on cache/abi version change
New cache version was written to dependent targets,
when they have not been compiled yet

 #KT-9190 Fixed

Original commit: c7f66a1585
2015-09-25 20:11:57 +03:00
Alexey Tsvetkov aa029d2113 Clean all storages if incremental compilation is off
Original commit: 7ef23da289
2015-09-25 20:11:57 +03:00
Alexey Tsvetkov 5fae296bea Test caches creation with turning incremental on/off
Original commit: 2bed8d0557
2015-09-25 20:11:57 +03:00
Alexey Tsvetkov d591e31eee Enable disabling incremental compilation for tests
Original commit: 68437175f6
2015-09-25 20:11:57 +03:00