Svetlana Isakova
efb23be367
Open / data forbidden: ConstraintPosition fix
2015-10-07 14:41:42 +03:00
Mikhail Glukhikh
67755d7dca
Protected / final are deprecated in interfaces: scopes and call translator
2015-10-07 11:49:45 +03:00
Mikhail Glukhikh
5e6c9f1979
Internal is deprecated in interfaces: reflection fix
2015-10-07 10:17:38 +03:00
Denis Zharkov
6a1566a6dc
Make JVM backend work with Collection.size as val
...
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
2015-10-07 08:46:35 +03:00
Denis Zharkov
e52e6cf869
Temporary make SmartSet less smart
...
SmartSet is compiled both with bootstrap and new compiler, so it can't
implement both old and new Set interfaces (with 'size' as function and as property).
This commit should be reverted after bootstraping
2015-10-07 08:46:33 +03:00
Denis Zharkov
547aa2cda6
Load special java methods as properites
...
Currently only those that override special builtin properties (e.g. `Collection.size`)
Their modality is defined by method's modality
2015-10-06 23:56:17 +03:00
Denis Zharkov
a02b64f0e3
Setup overridability rules for properties built on Java fields
...
- They overrides each other
- They do not overrides Kotlin propeties and vice versa
2015-10-06 23:56:17 +03:00
Denis Zharkov
dfe93406d9
Minor. Inline parameter
2015-10-06 23:56:17 +03:00
Denis Zharkov
27b231cd7d
Minor. Do not record method within resolveMethodToFunctionDescriptor
2015-10-06 23:56:17 +03:00
Denis Zharkov
9d087ce5bd
Convert size() functions in builtins to properties
...
Just like it will work itself out :)
2015-10-06 23:56:17 +03:00
Pavel V. Talanov
37d5c4b223
Allow to import members from object by name
...
Wrap object members so they do not require dispatch receiver
Hack jvm backend to make it work
2015-10-06 16:31:21 +03:00
Dmitry Petrov
9e546bda27
Support is/as/as? with Function[K]<...> types.
2015-10-06 10:06:27 +03:00
Valentin Kipyatkov
e41732e572
No callable references to synthetic extensions (and ones for get/set)
2015-10-03 10:40:50 +03:00
Alexander Udalov
cb6d16d224
Advance ABI version after changes to binary format
2015-10-03 00:59:52 +03:00
Alexander Udalov
bdd69d9e46
Use internal names in multifile class metadata
...
To reuse the strings already existing in the constant pool of the class file
2015-10-03 00:59:34 +03:00
Alexander Udalov
e1ccb92438
Write built-in extensions to new protobuf messages
2015-10-03 00:59:34 +03:00
Alexander Udalov
8c0a86617a
Write JVM signatures to new protobuf messages
2015-10-03 00:59:33 +03:00
Alexander Udalov
4f21caecc4
Simplify AnnotationAndConstantLoader, use NameResolver from ProtoContainer
2015-10-03 00:59:32 +03:00
Alexander Udalov
3a7a48a079
Minor, add nameResolver to ProtoContainer
2015-10-03 00:59:32 +03:00
Alexander Udalov
14ec34e37c
Refactor annotation and constant loader, simplify, drop some useless checks
2015-10-03 00:59:31 +03:00
Alexander Udalov
ad735cd788
Split ProtoBuf.Callable to three messages: constructor, function, property
...
Serialize both at the moment, will drop the old one after bootstrap
2015-10-03 00:59:30 +03:00
Alexander Udalov
041af28166
Deprecate and don't write KotlinClass$Kind, to be removed later
2015-10-03 00:59:30 +03:00
Alexander Udalov
056bb3f833
Deprecate and don't write KotlinSyntheticClass$Kind, to be removed later
2015-10-03 00:59:28 +03:00
Alexander Udalov
5bb47c8365
Write KotlinInterfaceDefaultImpls annotation to DefaultImpls classes
...
Instead of KotlinSyntheticClass with kind = TRAIT_IMPL
2015-10-03 00:58:52 +03:00
Alexander Udalov
e4090d3f30
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)
2015-10-02 20:30:55 +03:00
Dmitry Petrov
06d9ff6a71
KT-9377 Support is-checks for read-only collections
...
Generate better code for 'as?' with mutable collection types:
use CHECKCAST, do not introduce special intrinsics for safe-as.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
e033d093d4
KT-9377 Support is-checks for read-only collections
...
Reorganize marker interfaces and is/as/as? intrinsics.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
6cb0e5151c
KT-9377 Support is-checks for read-only collections
...
Intrinsics for is/as/as? with mutable Kotlin collections and related types.
2015-10-02 15:17:00 +03:00
Dmitry Petrov
35881198c3
KT-9377 Support is-checks for read-only collections
...
Marker interfaces for mutable Kotlin collections and related classes.
2015-10-02 15:17:00 +03:00
Pavel V. Talanov
1f36b7fbea
Extract FunctionPlaceholders from ErrorUtils to a separate component since they are not really an error
2015-10-01 17:53:16 +03:00
Pavel V. Talanov
d5624708fb
Add "java.io.Serializable" as supertype to java builtIns mapped to classes that are serializable on jvm
...
Implementation is hacky, relies on adding fictional supertype to corresponding classes
2015-10-01 17:53:16 +03:00
Pavel V. Talanov
427c853e27
ErrorUtils return DefaultBuiltIns
...
This should be changed in the future by making ErrorUtils not-static
2015-10-01 17:53:15 +03:00
Pavel V. Talanov
76029ee9b2
Introduce JvmBuiltIns and DefaultBuiltIns, different instances of KotlinBuiltIns
...
Make KotlinBuiltIns an abstract class
JsPlatform has DefaultBuiltIns
2015-10-01 17:53:14 +03:00
Pavel V. Talanov
4b9e167fd2
Minor: move builtIns initialization into constructor
2015-10-01 17:53:14 +03:00
Pavel V. Talanov
0ae842a05d
'descriptors' module exports 'deserialization', not the other way around
...
Also remove some of redundantly specified dependencies
2015-10-01 17:53:13 +03:00
Pavel V. Talanov
22e3e192ee
ModuleDescriptorImpl: remove KBI as default parameter
2015-10-01 17:53:12 +03:00
Pavel V. Talanov
5dd4843b5a
reflection.jvm: Drop usages of KotlinBuiltIns.getInstance()
2015-10-01 17:53:09 +03:00
Pavel V. Talanov
537134613a
js.translator: Drop usages of KotlinBuiltIns.getInstance()
2015-10-01 17:53:09 +03:00
Pavel V. Talanov
3963c8b833
MemberMatching: drop usage of KotlinBuiltIns.getInstance()
2015-10-01 17:53:06 +03:00
Pavel V. Talanov
51113c10b4
Drop some usages of KotlinBuiltIns.getInstance() in idea module
2015-10-01 17:53:02 +03:00
Pavel V. Talanov
b9da08d11c
TypeIntersector: refactor it to being a static utility
...
Deal with intersecting empty set of types on the call site
2015-10-01 17:52:03 +03:00
Pavel V. Talanov
9b0970e1a9
Avoid calling KotlinBuiltIns.getInstance() in DescriptorRendererImpl
2015-10-01 17:52:00 +03:00
Pavel V. Talanov
7429b65c73
Try to implement some of error utils without using KotlinBuiltIns
2015-10-01 17:51:59 +03:00
Pavel V. Talanov
6780a1fe90
Make DynamicCallableDescriptors non static and remove static object DynamicType
2015-10-01 17:51:58 +03:00
Pavel V. Talanov
424d71e964
Remove reference to KotlinBuiltIns from CompanionObjectMapping
...
Make it a class
2015-10-01 17:51:57 +03:00
Pavel V. Talanov
0fc23fc426
Use new method instead of some usages of KotlinBuiltIns.getInstance()
2015-10-01 17:51:56 +03:00
Pavel V. Talanov
22c250778e
Introduce TypeConstructor#getBuiltIns
2015-10-01 17:51:55 +03:00
Zalim Bashorov
a36e4abf4d
Move visibility check for toplevel private declarations to Visibilities.PRIVATE and fix it.
2015-10-01 14:57:26 +03:00
Zalim Bashorov
94b110936e
Add the ability to get containing source file from SourceElement
2015-10-01 14:37:25 +03:00
Alexander Udalov
34d14939f9
Fix build after change in property accessor names
2015-10-01 02:14:25 +03:00