Commit Graph

50413 Commits

Author SHA1 Message Date
Mikhail Glukhikh c2686872ae FIR: use implicit Unit type in setters 2018-11-21 18:04:13 +03:00
Mikhail Glukhikh bcb27f212c FIR: support resolve of implicit Unit types 2018-11-21 18:04:13 +03:00
Mikhail Glukhikh 65f1a6c041 FIR: introduce FictitiousFunctionSymbol making it not FIR-based 2018-11-21 18:04:13 +03:00
Mikhail Glukhikh 5cdf938902 FIR: temporary implementation of kotlin.FunctionX resolve 2018-11-21 18:04:12 +03:00
Mikhail Glukhikh 82ae3f8f10 FIR resolve: add nested companion scope #KT-24095 Fixed 2018-11-21 18:04:12 +03:00
Mikhail Glukhikh 98abe08056 Add Java symbol resolve in default star importing scope
Related to KT-24098
2018-11-21 18:04:12 +03:00
Mikhail Glukhikh 5c572aa56e Add java.lang & kotlin.jvm to default star importing scope 2018-11-21 18:04:12 +03:00
Mikhail Glukhikh b58e372db3 FIR: include properties from primary constructors in tree 2018-11-21 18:04:12 +03:00
Mikhail Glukhikh e2cec9125d FIR: resolve annotations on value & type parameters 2018-11-21 18:04:12 +03:00
Mikhail Glukhikh 78d45f3f90 FIR: resolve constructor delegated calls (types are all error yet) 2018-11-21 18:04:11 +03:00
Mikhail Glukhikh ea86c3d2b3 FIR: resolve bounds of function type arguments 2018-11-21 18:04:11 +03:00
Simon Ogorodnik 6c3fe5dc98 FIR: refactor cone types (arguments, projections) 2018-11-21 18:04:11 +03:00
Simon Ogorodnik 02bedeca05 FIR: introduce Java type resolve and JavaSymbolProvider #KT-24098 Fixed 2018-11-21 18:04:11 +03:00
Mikhail Glukhikh 5c53bdb142 FIR: support inline classes + render class attributes nicer 2018-11-21 18:04:11 +03:00
Mikhail Glukhikh 124c11df08 FIR: support lateinit properties 2018-11-21 18:04:11 +03:00
Mikhail Glukhikh 7279d696d2 FIR: support annotation resolve & rendering 2018-11-21 18:04:10 +03:00
Mikhail Glukhikh c31513837b FIR: fix resolve of function type & its parameters in supertype position 2018-11-21 18:04:10 +03:00
Simon Ogorodnik 6cfe935c2a FIR: Switch to | in fir resolved type renderer
Otherwise it clashed with qualified names
2018-11-21 18:04:10 +03:00
Simon Ogorodnik 4fb321fa00 FIR: Support function type resolve #KT-24092 Fixed 2018-11-21 18:04:10 +03:00
Simon Ogorodnik 0ea1a5b30f FIR: Various random optimization 2018-11-21 18:04:10 +03:00
Simon Ogorodnik 140120abc2 FIR: Optimize iteration 2018-11-21 18:04:10 +03:00
Mikhail Glukhikh cce741eef8 FIR: partial function type resolve + some rendering fixes 2018-11-21 18:04:09 +03:00
Simon Ogorodnik 29ee4371d0 FIR: Optimize fqName creation in ImportResolveTransformer 2018-11-21 18:04:09 +03:00
Simon Ogorodnik 8a5a43d670 Add IDEA action to show raw FIR of currently opened file
This action works correctly with fir.enabled=true in Gradle properties
2018-11-21 18:04:09 +03:00
Toshiaki Kameyama e5f0f2489f Introduce backing property: fix false positive for const property #KT-28341 Fixed 2018-11-21 17:51:34 +03:00
Andrey Uskov 7080559cb4 Remove empty build.gradle.kts.191 2018-11-21 17:37:16 +03:00
Nicolay Mitropolsky 0ee98a8d1d 183: Uast: multiresolve (KT-27244) 2018-11-21 17:24:14 +03:00
Leonid Startsev 2e83ec1551 Restrict auto-implementing serializers methods to certain type of classes 2018-11-21 16:00:04 +03:00
Leonid Startsev 1535426a11 Don't add GeneratedSerializer as a supertype for user-defined serializers 2018-11-21 16:00:03 +03:00
Leonid Startsev a3e34af2f1 Increase priority of overridden serializer on type
Fixes Kotlin/kotlinx.serialization/252
2018-11-21 16:00:02 +03:00
Leonid Startsev 127ceaca34 Fix commented check when generating descriptor initializer:
It was needed before `save` because save references symbol of initializer,
yet we don't need to generate it if user provided its own getter
2018-11-21 16:00:01 +03:00
Leonid Startsev b76116a077 Do not add any .childSerializers() stuff if user explicitly marked custom serializer as KSerializer
todo: better design for user-provided descriptors and and schema hierarchy
2018-11-21 16:00:00 +03:00
Leonid Startsev 80c262ec66 Fix instantiation of generic serializers on JS
(Kotlin/kotlinx.serialization/244, which was fixed already by lookuping descriptor, but still had a bug)
2018-11-21 15:59:59 +03:00
Leonid Startsev a163e62f5f Rebased on master, adopt to new constant values from deserialized
annotations
Fix issue with generating redundant constructors for custom generic
seralizers
2018-11-21 15:59:58 +03:00
Leonid Startsev 2444a6680e .shouldEncodeElementDefault for JVM 2018-11-21 15:59:57 +03:00
Leonid Startsev 662e918a7b Support skipping values equals to defaults in output stream for JS and IR backends 2018-11-21 15:59:56 +03:00
Leonid Startsev dba6396e95 Support enums according to new design 2018-11-21 15:59:55 +03:00
Leonid Startsev f101e17dfa Support reference array and context serializers
Enum serializers are also instantiated, but won't work on native because of lack of KClass<E: Enum<E>>.enumValues()
2018-11-21 15:59:54 +03:00
Leonid Startsev ef42201b05 Fix order of overriding @Serializable(with) on property: check override, than @ContextualSerialization.
This will apply Context serializer event if class annotated @Serializable
2018-11-21 15:59:53 +03:00
Leonid Startsev abb8e5e914 Support @Transient properties initializers and init blocks in IR plugin 2018-11-21 15:59:52 +03:00
Leonid Startsev 104368de3b Better lookup for serializer() function in companion for generic classes because user can define a parameterless shorthand one
Fixes Kotlin/kotlinx.serialization/#228
2018-11-21 15:59:51 +03:00
Leonid Startsev 077f51e2f4 Generics serialization in IR 2018-11-21 15:59:50 +03:00
Leonid Startsev a4a1df0a81 Add information about secondary constructors to synthetic classes.
Before this, descriptors for such constructors were created in-place where they needed by the codegens.
However, presence of symbol table in IR backend requires the single instance of constructor descriptor across all compilation to be able to reference it and create a symbol. This support of generics in kotlinx.serialization on Kotlin/Native.
2018-11-21 15:59:49 +03:00
Leonid Startsev 01d3c7bdc8 Descriptors for IR 2018-11-21 15:59:48 +03:00
Leonid Startsev 3010814327 .childSerializers for JS 2018-11-21 15:59:47 +03:00
Leonid Startsev baf8cb6e9b Replace imported serialization-ide.jar with serialization-compiler.jar so JPS build also start working 2018-11-21 15:59:46 +03:00
Leonid Startsev e40383b1ce Introduce GeneratedSerializer and childSerializers
Descriptors passing on JVM
2018-11-21 15:59:45 +03:00
Leonid Startsev f0e81c6eb8 Respect @ContextualSerialization on file
Add common ancestor to all serializable generators
2018-11-21 15:59:44 +03:00
Leonid Startsev 82fa152514 Remove auto-applying ContextSerializer 2018-11-21 15:59:43 +03:00
Nicolay Mitropolsky 0cfce8bd99 Evaluating string constants in injections in String Interpolations (KT-25906) 2018-11-21 15:37:57 +03:00