Commit Graph

52083 Commits

Author SHA1 Message Date
Ilmir Usmanov aa9ce7b2e9 Minor. Update test data 2019-02-19 18:09:23 +03:00
Mads Ager 057bdb3954 Generate better code for branches based on comparisons.
For comparison intrinsics and for instanceof checks, make
it possible to get the the stack value produced and branch
on that directly instead of materializing a boolean to
branch on from it.

That reduces code such as

```
    IF_CMPEQ L1
    CONST_0
    GOTO L2
L1: CONST_1
L2: IFEQ L3
```

to just one IF_CMP instruction.
2019-02-19 15:46:52 +01:00
Leonid Startsev 7d2c59fb70 Fix missing optionality of property when generating descriptor in Native 2019-02-19 15:52:04 +03:00
Leonid Startsev 8b16801f0d Insert correct offsets in a lot of places in IR
Use correct type arguments when invoking a generic functions
Fix missing parent in initializer
2019-02-19 15:52:04 +03:00
Leonid Startsev 66272bfa74 Fix impossibility to make @Optional field in a class hierarchy on JS 2019-02-19 15:52:04 +03:00
Leonid Startsev 18667a5a34 Add validator for unique serial names 2019-02-19 15:52:04 +03:00
Leonid Startsev 36e1d6668b Make write$Self a static function 2019-02-19 15:52:04 +03:00
Leonid Startsev 7c942af13d Add synthetic companion with .serializer() getter even if default serializer is overridden. (kotlinx.serialization/228) 2019-02-19 15:52:04 +03:00
Leonid Startsev 1e440efc01 Ban primitive arrays in JVM codegen too (fixes kotlinx.serialization/260) 2019-02-19 15:52:04 +03:00
Leonid Startsev 5231ef9966 Don't generate writeSelf/internal constructor if corresponding serialize/deserialize aren't auto-generated 2019-02-19 15:52:04 +03:00
Leonid Startsev a6651fd6f9 Call superclass deserialization constructor if superclass is also internal serializable or no-arg ctor of non-serializable class on Native and JS 2019-02-19 15:52:04 +03:00
Leonid Startsev e02cfcb8ea Replace @Optional with @Required 2019-02-19 15:52:04 +03:00
Leonid Startsev 04706f4473 Support classes with more than 32 serializable properties
Via increasing count of int bit masks in synthetic constructor
2019-02-19 15:52:04 +03:00
Leonid Startsev 08f983ef52 Semantic change:
Now properties with default values are @Optional by default, and properties without backing fields are @Transient by default.
2019-02-19 15:52:04 +03:00
Leonid Startsev cca03e9586 Make enums and interfaces not serializable internally. However, they
still can be serialized using custom companion object.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/138 and https://github.com/Kotlin/kotlinx.serialization/issues/304
2019-02-19 15:52:04 +03:00
Nikolay Krasko c41d6c427d Fix flaky navigation tests by refreshing file system before find 2019-02-19 15:42:32 +03:00
Mads Ager e9ec8e2cee JVM_IR: Do not generate annotations on $default methods. 2019-02-19 13:23:42 +01:00
Mikhael Bogdanov 19d2bac2f8 Temporary disable test in IR 2019-02-19 13:05:05 +01:00
Toshiaki Kameyama 8cdf901538 Keyword completion: do not suggest const except inside top level or object
#KT-23026 Fixed
#KT-29840 Fixed
2019-02-19 14:57:44 +03:00
Mikhail Glukhikh 7d809bc1d5 Fix 181 compilation (AbstractFirResolveWithSessionTestCase)
We could fix it better, but anyway FIR & its tests aren't important
for this branch
2019-02-19 14:33:47 +03:00
Mikhail Glukhikh 7952249cd9 FIR: prevent SDK leak error in total kotlin IDE test
Related to KT-24077
2019-02-19 14:12:43 +03:00
Mikhail Glukhikh 2bc22fc2a6 FIR: fix Gradle configurator exception in total IDE test 2019-02-19 14:12:26 +03:00
Simon Ogorodnik a6297f5f2f Refactor FIR total resolve in IDE test fixing various problems
Related to KT-24077
2019-02-19 14:11:43 +03:00
Simon Ogorodnik 5cef869d36 FIR: add symbol provider for IDE #KT-24097 Fixed
Functions & properties aren't yet supported
2019-02-19 14:11:11 +03:00
Mikhail Glukhikh 12ee81358c FIR: Add total resolve test in IDE mode (related to KT-24077) 2019-02-19 14:02:01 +03:00
Toshiaki Kameyama 779d536605 Redundant getter: fix false positive for 'external' getter
#KT-29416 Fixed
2019-02-19 13:03:11 +03:00
Mikhael Bogdanov 3b57ceeafe Don't generate annotations on $default methods
#KT-29965 Fixed
2019-02-19 10:51:37 +01:00
Mikhael Bogdanov a020170a92 Report missed INLINE_FROM_HIGHER_PLATFORM diagnostic for derived class
Inline function descriptor in derived class represented as FAKE_OVERRIDE.
 So we should find it in base class declaration
 (not interface cause inline function can't be virtual, but always final)
 and then check class version.

 #KT-29402 Fixed
2019-02-19 10:51:36 +01:00
Mikhael Bogdanov b03065b2ba Minor. Reformat 2019-02-19 10:51:35 +01:00
Kirill Shmakov b844e587ed Fix KT-29804: rename app -> main
#KT-29804 Fixed
Reviewed at KOTLIN-CR-2735
2019-02-19 12:14:34 +03:00
Sergey Rostov db8f423880 JPS Build, update artifacts: fix js stdlib, remove stdlib-jdk7 and 8 2019-02-19 11:39:53 +03:00
hisaaki.sioiri f1cc7cecce Escaping quotes in live-templates (KT-2387)
#KT-2387 Fixed
2019-02-19 11:18:13 +03:00
Toshiaki Kameyama 7149d4cd1c Group by file structure: show groups on text search (KT-28838)
#KT-28838 Fixed
2019-02-19 11:18:13 +03:00
Stanislav Erokhin 76f2430e7c Code of Conduct for Kotlin project 2019-02-19 11:04:37 +03:00
Toshiaki Kameyama 5f7dee4194 Convert to scope function: enable on single function call
#KT-29099 Fixed
2019-02-19 10:41:20 +03:00
Dmitry Petrov e1fdf0aa43 KT-29959 fix IR generation for 'd.m = e' 2019-02-19 09:59:42 +03:00
Mikhail Glukhikh 7f9b3a98b4 Fix corner cases (no expression, not resolved label) in raw FIR builder 2019-02-19 09:54:39 +03:00
Mikhail Glukhikh 552b137852 FIR: get rid of fictitious function symbols 2019-02-19 09:54:37 +03:00
Mikhail Glukhikh 74d89b1be2 JavaSymbolProvider: support different kinds of literals in annotations
Constants, enum entries, class references, arrays are covered here
Related to KT-29218
2019-02-19 09:54:34 +03:00
Mikhail Glukhikh f8e165dbe4 Integrate nullability into cone types, add & use FIR flexible type
FIR fake overrides are rendered now more precisely to test this process
2019-02-19 09:54:32 +03:00
Mikhail Glukhikh 3d77f3d129 Fix rendering of ConeClassErrorType
This commit fixes total kotlin resolve test
2019-02-19 09:54:30 +03:00
Simon Ogorodnik 9ebefa3ba6 FIR: make FunctionType class-like, refactor built-ins resolution
This breaks total kotlin resolve test because of incorrect rendering
of ConeClassErrorType (we are trying to read its symbol)
2019-02-19 09:54:28 +03:00
Simon Ogorodnik 3edd82b602 FIR: make JavaSymbolProvider return error-type on not found symbols 2019-02-19 09:54:26 +03:00
Simon Ogorodnik 5afb0a6f4a FIR rename: FirType -> FirTypeRef and related 2019-02-19 09:54:24 +03:00
Mikhail Glukhikh 1c76a612f9 FIR rename: isNullable -> isMarkedNullable 2019-02-19 09:54:21 +03:00
Simon Ogorodnik 3a237416c9 Implement FIR loading for Java (classes, supertypes, parameters, funs)
Properties aren't implemented yet
FIR symbol provider functions return more specialized types now
Related to KT-28918, KT-29636, KT-29218

#KT-28788 Fixed
2019-02-19 09:54:20 +03:00
Mikhail Glukhikh 4ea3df53cc Implement FIR loading for libraries (classes, supertypes, parameters)
Members aren't implemented yet
Related to KT-28788, KT-28918
2019-02-19 09:54:18 +03:00
Mikhail Glukhikh 0bef9f2afe Rename in FIR provider: getSymbolByFqName -> getClassLikeSymbolByFqName 2019-02-19 09:54:17 +03:00
Simon Ogorodnik bd769f8fd7 Add multiplatform test with substitution, fix deep supertypes
This commit fixes ambiguity problems introduced before
in MPP tests with deep supertypes

#KT-29636 Fixed
2019-02-19 09:54:16 +03:00
Simon Ogorodnik 0e3fecf614 Implement fake override mapping for functions
Related to KT-29636
2019-02-19 09:53:33 +03:00