Alexander Udalov
4597fff18a
Prohibit OptionalExpectation on nested annotation classes
...
Because the new generation scheme based on module metadata does not
support them, and we don't plan to have them in the standard library
yet.
2020-05-12 19:28:58 +02:00
Alexander Udalov
012ffa2993
Support new scheme of compilation of OptionalExpectation annotations
...
Instead of generating these annotation classes as package-private on
JVM, serialize their metadata to the .kotlin_module file, and load it
when compiling dependent multiplatform modules.
The problem with generating them as package-private was that
kotlin-stdlib for JVM would end up declaring symbols from other
platforms, which would include some annotations from package
kotlin.native. But using that package is discouraged by some tools
because it has a Java keyword in its name. In particular, jlink refused
to work with such artifact altogether (KT-21266).
#KT-38652 Fixed
2020-05-12 19:28:57 +02:00
Jinseong Jeon
30e5748fec
FIR: set proper visibility of property accessors.
2020-05-12 19:47:37 +03:00
Igor Yakovlev
84a582c618
Fix escaping const string literals in UL
...
Fixed #KT-38247
2020-05-12 17:04:16 +03:00
Igor Yakovlev
9f8044ff1b
Fix ultraKtLightClassForFacade compiler backend call
...
+minor fixes
2020-05-12 17:04:16 +03:00
Igor Yakovlev
62c24c95b5
Add support for UltraLightScripts
2020-05-12 17:04:15 +03:00
Mikhail Glukhikh
6a2461f2c6
[FIR] Refactor boolean flags related to constructors: !no -> include
2020-05-12 16:57:08 +03:00
Mikhail Glukhikh
db694dd7ab
[FIR] Extract ConstructorScopeTowerLevel
2020-05-12 16:57:08 +03:00
Mikhail Glukhikh
22e7264460
[FIR] Use all implicit receivers for del. constructors, not just one
2020-05-12 16:57:08 +03:00
Mikhail Glukhikh
535b4434a8
[FIR TEST] Add extra test for inner classes inside hierarchy
2020-05-12 16:57:08 +03:00
Mikhail Glukhikh
f48ff2679e
[FIR] Branch delegating constructor call resolve by isInner from start
2020-05-12 16:57:07 +03:00
Mikhail Glukhikh
28c0dac36f
[FIR] Set FirJavaClass.isInner properly
2020-05-12 16:57:07 +03:00
Mikhail Glukhikh
3aca40538b
[FIR TEST] Fix error in exposedSupertype test
2020-05-12 16:57:07 +03:00
Mikhail Glukhikh
457fb09e3a
[FIR] Use tower to resolve delegated constructors, set dispatch receiver
2020-05-12 16:57:07 +03:00
Victor Petukhov
11d05c1abd
NI: propagate isNullabilityConstraint flag into constraint injector and inherit it
...
^KT-37510 Fixed
2020-05-12 16:15:07 +03:00
Roman Artemev
6bdd473eff
[JVM IR] Fix plugin API for JVM IR
...
- Unmute ktx.serialization test
2020-05-12 14:29:55 +03:00
Roman Artemev
a794052f86
[IR] Mark Value Parameters which have default argument
2020-05-12 14:29:55 +03:00
Roman Artemev
7737c76540
[PLUGIN API] Do postprocess after symbol resolve
2020-05-12 14:29:55 +03:00
Roman Artemev
92befaac5d
[IR] Remove IrExtensionGenerator
2020-05-12 14:29:55 +03:00
Roman Artemev
9f99094780
[IR] Clean up linker interface
2020-05-12 14:29:54 +03:00
Roman Artemev
1e9c9ef7e0
[IR] Clean up linker code
2020-05-12 14:29:54 +03:00
Roman Artemev
d41bbbae0d
[IR] Deprecate some API
2020-05-12 14:29:54 +03:00
Roman Artemev
2f0840388d
[IR] Fix context
2020-05-12 14:29:54 +03:00
Roman Artemev
559b654a4f
[IR] Provide new plugin API to access declaration via FqName in the safe way
2020-05-12 14:29:53 +03:00
Roman Artemev
8335ce8665
[IR] Fix to make K/N work
2020-05-12 14:29:53 +03:00
Roman Artemev
aac4649845
[JS IR] Remove usage of LazyIr from JS
2020-05-12 14:29:53 +03:00
Roman Artemev
3d24665c0d
[IR] Use ReferenceSymbolTable in BuiltinSymbolsBase
2020-05-12 14:29:53 +03:00
Roman Artemev
3c50b47333
[IR] Add new API into IrBuiltIns to access functional interfaces
2020-05-12 14:29:53 +03:00
Roman Artemev
a477aa7289
[KLIB] Pass IrFunctionFactory from outside
2020-05-12 14:29:53 +03:00
Roman Artemev
318568636e
[IR] Pass IrBuiltIns to BuiltinSymbolsBase
2020-05-12 14:29:53 +03:00
Roman Artemev
da661e4db7
[IR BE] Remove usage of KotlinType from ir loop optimization
2020-05-12 14:29:53 +03:00
Roman Artemev
c38ba45c1b
[JVM IR] Fix jvm linker
2020-05-12 14:29:52 +03:00
Roman Artemev
5ea309d578
[PSi2IR] Generate synthetic declaration during psi2ir
...
- Make sure any declaration from currently generating module is bound.
- Implement standalone declaration generator
2020-05-12 14:29:52 +03:00
Roman Artemev
66543131c2
[IR] Add referenceScript to SymbolTable
2020-05-12 14:29:52 +03:00
Pavel Kirpichenkov
003ba1c8f5
[NI] CST: add preemptive recursion detection
...
For single super type constructor create star projection argument when types for that argument are equal to the original types.
Captured star projections are replaced with their corresponding supertypes during this check.
Skip check for `in` parameters, for which recursive cst calculation does not happen.
Adjust constant in fallback recursion condition.
^KT-38544 Fixed
2020-05-12 11:13:43 +03:00
Jinseong Jeon
fd584e6f13
FIR2IR: fix offsets for calls.
2020-05-09 21:11:40 +03:00
Victor Petukhov
b49dc46e6c
NI: improve reporting errors about mismatch number of anonymous function parameters
2020-05-09 12:34:08 +03:00
Victor Petukhov
585e98a835
NI: support inferring lambda receiver type by explicit receiver of anonymous function (which is another postponed argument)
2020-05-09 12:34:06 +03:00
Ilmir Usmanov
d6d331de2a
Minor. Fix test
2020-05-08 19:36:02 +02:00
Mikhail Glukhikh
1dd50ba1f2
[FIR] Use JvmGeneratorExtensions also from CLI
2020-05-08 17:57:55 +03:00
Jinseong Jeon
eac9af521e
[FIR2IR] differentiate external Java stub origin from external stub
2020-05-08 17:45:39 +03:00
Mikhail Glukhikh
b271b6d7a8
[FIR2IR] Add conversion of value parameter annotations
2020-05-08 17:30:28 +03:00
Mikhail Glukhikh
76f6e27e37
[FIR2IR] Add initial support of collection literals
2020-05-08 17:30:24 +03:00
Mikhail Glukhikh
f3e2dbf360
[FIR2IR] Add conversion of function annotations
2020-05-08 17:30:19 +03:00
Mikhail Zarechenskiy
36f6ccffde
Add test for obsolete issue
...
#KT-38667 Obsolete
2020-05-08 15:42:43 +03:00
Alexander Udalov
91ef053fbc
IR: keep local scope with counter maps across LDL invocations
...
Since LocalDeclarationsLowering is a BodyLoweringPass, local
functions inside one declaration are handled independently of local
functions in the other declaration. This can lead to name clashes, in
case a local function with the same name and signature is declared in
overloads in the same container, which results in a signature clash
error in JVM IR.
The issue became more common with the introduction of adapted function
references, where psi2ir generates a local adapter-function with a
predefined name, which can easily clash with another reference to the
same target in an overload. This led to a compilation error when
bootstrapping Kotlin with JVM IR, for example in GradleIRBuilder.kt
where there are a lot of references to the same function.
2020-05-08 14:33:34 +02:00
Dmitriy Novozhilov
ad09eb5416
[FIR] Add ability to rewrite attributes in FirDeclarationAttributes
2020-05-08 15:10:13 +03:00
Dmitriy Novozhilov
239837fd14
[FIR] Introduce FirDeclarationAttributes for FirDeclaration
2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov
b348ae689a
[FIR] Introduce different implementations of ArrayMapOwner
...
- ComponentArrayOwner for services
- AttributeArrayOwner for attributes like userdata or type attributes
2020-05-08 15:10:12 +03:00
Dmitriy Novozhilov
959ecceaf7
[FIR-PLUGIN] Move fir plugin prototype out from :compiler module
2020-05-08 15:10:02 +03:00