Denis Zharkov
6a22d75dd7
Drop TypeAliasDeserializer
...
Currently it's only used for local type aliases, while code in
'deserializeTypeAlias' works properly only for nested or top-level type
aliases.
Also it seems that serialization of types based on local type aliases
doesn't work now anyway (see KT-13692)
2016-09-05 17:54:36 +03:00
Denis Zharkov
86c1dbe7b5
Fix decompilation of types based on local classifiers
...
If deserializing a type with arguments based on a local class for
decompiler, then just return Any type (without arguments).
Previously Any constructor was used with serialized arguments, that lead
to exception
Note that in case of deserialization for compiler nothing changes about
local-classes-based types (LocalClassifierResolverImpl is just inlined)
#KT-13408 Fixed
2016-09-05 17:54:36 +03:00
Dmitry Petrov
e0cdad30e4
KT-13181 Unresolved reference when referencing a type alias from a different module
...
Add corresponding resolution code.
2016-09-02 10:18:23 +03:00
Alexander Udalov
9bf91e95d0
Change default visibility for TypeAlias from 'internal' to 'public'
...
Since public type aliases will supposedly be more common than internal ones, it
makes sense to save on writing flags for the former rather than the latter
2016-07-05 18:18:45 +03:00
Denis Zharkov
d53c53a900
Support annotations on type aliases declarations
2016-06-28 10:33:29 +03:00
Denis Zharkov
067fe35b72
Fix type deserialization failure when type alias was not found
...
It's crucial for decompilation as declarations are always being deserialized
with no dependencies
#KT-12832 Fixed
2016-06-28 10:33:29 +03:00
Denis Zharkov
15ce4f8856
Minor. Add comment about type aliases based types metadata format
2016-06-28 10:33:29 +03:00
Denis Zharkov
d78177dc23
Refine metadata format for typealias based type
2016-06-28 10:33:29 +03:00
Alexander Udalov
4c8e8b099a
Update protobuf from 2.5.0 to 2.6.1
2016-06-27 20:14:00 +03:00
Mikhael Bogdanov
db5d9940df
Added 'isInline' implementation to property accessor descriptors
2016-06-24 17:05:48 +03:00
Alexander Udalov
7e38b93d80
Use protobuf with renamed packages, pack to IDEA plugin
...
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources
#KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Alexander Udalov
3477f6ee85
Minor, drop java_generic_services option from .proto files
...
There are no service definitions in our .proto files, so this option had no
effect
2016-06-09 15:54:49 +03:00
Stanislav Erokhin
63b2f89356
Removed laziness from TypeDeserializer, because DeserializedMemberScope has cache for callable descriptors.
2016-06-09 12:58:18 +03:00
Stanislav Erokhin
8c2ad82de7
Minor. fixes after review
2016-06-09 12:58:07 +03:00
Stanislav Erokhin
797ef8d143
Refactoring. Removed all usages of asSimpleType except related to TypeSubstitution.
2016-06-09 12:58:05 +03:00
Stanislav Erokhin
f41c8dc045
Refactoring. Removed several usages of asSimpleType
2016-06-09 12:58:00 +03:00
Stanislav Erokhin
1d9ca06b96
Remake KotlinTypes.
2016-06-09 12:57:59 +03:00
Stanislav Erokhin
a5c1e009c3
Remove type capability AbbreviatedType.
2016-06-09 12:57:55 +03:00
Stanislav Erokhin
203c4cd94d
Remake Raw type representation.
...
(cherry picked from commit b21cede)
2016-06-09 12:57:53 +03:00
Stanislav Erokhin
669558c4ba
Refactoring. Move flexible type factory to deserialization module.
2016-06-09 12:57:48 +03:00
Stanislav Erokhin
957bae18be
Refactoring. Move flexible type creation to KotlinTypeFactory.
2016-06-09 12:57:44 +03:00
Denis Zharkov
07592398c1
Preserve sources properly for coroutine parts
...
Otherwise incremental reporting leads to exception when inlining into coroutine body happens
2016-06-08 18:53:16 +03:00
Denis Zharkov
7dda2d9f62
Add ability to set up source element when copying descriptor
2016-06-08 18:53:16 +03:00
Denis Zharkov
329fb9d619
Introduce 'coroutine'/'suspend' modifiers
2016-06-08 18:53:16 +03:00
Dmitry Petrov
0319d5a5aa
KT-11588 Type aliases
...
- Nested type aliases
- UNSUPPORTED_TYPEALIAS error (language level < 1.1)
- tests for is/as/as? with type alias
2016-06-01 14:32:46 +03:00
Dmitry Petrov
32f61c3918
KT-11588 Type aliases
...
Deserialization
2016-05-20 14:17:25 +03:00
Dmitry Petrov
65293008fd
KT-11588 Type aliases
...
Type alias descriptor serialization
Types with type aliases serialization
2016-05-20 14:17:24 +03:00
Stanislav Erokhin
74bddcfb70
Refactoring. Convert Annotated to kotlin.
2016-05-20 09:32:55 +03:00
Stanislav Erokhin
450ea78b1d
Refactoring. Convert KotlinType to kotlin.
2016-05-20 09:32:54 +03:00
Denis Zharkov
1501a042e9
Add possibility to add annotations when building FunctionDescriptor copy
...
It's being used in next commits to add Deprecated annotation
to unknown additional built-ins members
2016-05-16 15:38:13 +03:00
Mikhail Glukhikh
733f3e8025
Code cleanup: type parameters can have in / out variance
2016-05-13 17:57:02 +03:00
Alexander Udalov
17dacb1efa
Revert "Minor, move SpecialNames.isSafeIdentifier check a little earlier"
...
This reverts commit a3055edda9 .
It turns out, this re-introduces an AssertionError at ClassId.<init> ("Class
name must not be root") when LazyJavaPackageScope#getContributedClassifier is
called during SAM constructor resolution below in
LazyJavaPackageScope#computeNonDeclaredFunctions, which was overlooked at the
time the commit was pushed
2016-05-04 17:41:49 +03:00
Alexander Udalov
a3055edda9
Minor, move SpecialNames.isSafeIdentifier check a little earlier
2016-04-29 15:21:26 +03:00
Alexander Udalov
d85884426e
Minor optimization of lookup tracker records
2016-04-29 15:21:26 +03:00
Alexander Udalov
785877d1de
Combine Java package scope and Kotlin scopes in JvmPackageScope
...
Use it in LazyJavaPackageFragment#scope instead of a weird lazy chained scope.
Also move lookup tracker records to it, to prevent them from being written in
each package scope individually (this was hurting performance)
2016-04-29 15:21:26 +03:00
Alexander Udalov
05af72dc7a
Optimize class lookups in DeserializedPackageMemberScope
...
Do not try to load classes (and litter in ClassDeserializer#classes cache with
unsuccessful requests) which the deserialized scope knows nothing about. This
is possible because deserialized scopes have the full list of their class names
2016-04-29 15:21:26 +03:00
Denis Zharkov
d259b91143
Add MutableMap.remove(K, V) as built-in declaration
...
Use PlatformDependent annotation to guarantee it's only be available for JDK8
Also adjust type-safe bridges and mutable collection stubs generation
2016-04-29 15:08:54 +03:00
Valentin Kipyatkov
b551886889
Code cleanup: removed redundant semicolons
2016-04-29 11:26:25 +03:00
Mikhail Glukhikh
5a66ef2126
Core & compiler: unnecessary 'val's removed from constructors
2016-04-27 18:41:56 +03:00
Denis Zharkov
bbbc910e02
Load additional built-in classes constructors from JDK
...
#KT-9194 In Progress
#KT-5175 In Progress
#KT-10370 In Progress
#KT-7127 In Progress
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
Denis Zharkov
137847e0c9
Minor. Refactor DeserializedMemberScope.addNonDeclaredDescriptors
2016-04-25 17:41:08 +03:00
Denis Zharkov
51a4b81d3e
Minor. Rename AdditionalSupertypes -> AdditionalClassPartsProvider
...
And relevant methods
2016-04-25 17:41:08 +03:00
Stanislav Erokhin
45ac1d2cb5
Refactoring. Remove FlexibleTypeFactoryDeserializer.
2016-04-25 15:28:49 +03:00
Stanislav Erokhin
0a4ad3f267
Refactoring. Rename FlexibleTypeCapabilities -> FlexibleTypeFactory. Also use factory.create instead of DelegatingFlexibleType.create.
2016-04-25 15:28:46 +03:00
Alexander Udalov
d571512f47
Remove unnecessary fields in DeserializedClassDescriptor
2016-04-14 21:08:36 +03:00
Alexander Udalov
e0dd60c57a
Expand code for boolean fields in Flags
...
Push flag index computation logic from FlagField down to subclasses
(BooleanFlagField and EnumLiteFlagField) because in the case of
BooleanFlagField it's trivial
2016-04-14 21:08:36 +03:00
Alexander Udalov
1f3850da6e
Store outer class in ProtoContainer instead of only its kind
2016-04-14 21:08:36 +03:00
Alexander Udalov
8ee278d02f
Fix SourceElement for classes loaded in decompiler
2016-04-14 21:08:36 +03:00
Alexander Udalov
88106bb13b
Get rid of BinarySource interface, use SourceElement instead
2016-04-14 21:08:36 +03:00