Commit Graph

41985 Commits

Author SHA1 Message Date
Sergey Igushkin cce7b3cfdf Create KotlinMultiplatformCommonOptionsImpl.kt 2017-10-10 19:40:17 +03:00
Sergey Igushkin e06d60174d Generate KotlinMultiplatformCommonOptions and <...>OptionsBase. 2017-10-10 19:40:17 +03:00
Alexey Andreev 8cdef4139e Fix JS DCE removing reachable functions 2017-10-10 18:59:18 +03:00
Denis Zharkov cb7d561c6c Add cache for declaration names in StubBasedPackageMemberDeclarationProvider
#KT-20683 Fixed
2017-10-10 18:34:31 +03:00
Denis Zharkov 082ed62cd5 Optimize ConstraintSystemBuilderImpl::generateNewBound
Do not process the bound if it's just the same
This situation can actually happen in case of adding bound
containing type variable itself
2017-10-10 18:27:00 +03:00
Denis Zharkov 3a9650d0fc Introduce cache for KotlinBuiltins::builtInClassesByName
There are a lot of places requesting nothing/any/.. instances
and just asking the scopes isn't very effecient:
see org.jetbrains.kotlin.builtins.KotlinBuiltIns#createPackage
having ChainedMemberScope and a `map` call
2017-10-10 18:27:00 +03:00
Denis Zharkov e3b453ada4 Do not create redundant temporary trace
It will be commited after use in any case
2017-10-10 18:27:00 +03:00
Denis Zharkov 00df41ee25 Optimize subtyping for simple cases 2017-10-10 18:27:00 +03:00
Denis Zharkov d5376fa8ba Drop effectively unused parameter with default value 2017-10-10 18:27:00 +03:00
Denis Zharkov 6e59799b54 Get rid of a couple of usages of simpleTypeWithNonTrivialMemberScope
The simple versions of KotlinTypeFactory::simpleType may lead
to smaller number of KotlinType instances
(defaultType from descriptor are used if there are no arguments)
2017-10-10 18:27:00 +03:00
Denis Zharkov 1c9b454d90 Rename KotlinTypeFactory::simpleType to simpleTypeWithNonTrivialMemberScope
To state it must be used only for limited number of cases
2017-10-10 18:27:00 +03:00
Denis Zharkov 20334a2321 Cache virtualFilePath for KtFile
Because of com.intellij.openapi.vfs.local.CoreLocalVirtualFile#getPath
that has a rather slow implementation calling String::replace on each call

At the same time this method gets called very frequently when
recording lookups
2017-10-10 18:27:00 +03:00
Denis Zharkov bb6a52c0cc Optimize subtyping for case of objects identity
It may be rather frequent (e.g. in case of types without arguments or
for dispatch receiver parameters)
2017-10-10 18:27:00 +03:00
Denis Zharkov f81c7a1a47 Add explicit fast path in TypeCheckerContext::anySupertype 2017-10-10 18:27:00 +03:00
Denis Zharkov b99658b8eb Optimize CandidateResolver::checkReceiver
- Do not calculate smart cast variants unless they're not necessary
- Avoid calling subtyping twice just to know if smart cast is necessary
  (now the needed info is contained in ReceiverSmartCastResult)
2017-10-10 18:27:00 +03:00
Denis Zharkov 9fdb702688 Minor. Drop unused method 2017-10-10 18:27:00 +03:00
Denis Zharkov 457b57ace2 Inline TypeCheckerContext::anySupertype
This method is a hot spot, since it's may be called
several times during one isSubtypeOf call and it contains
two lambdas, so it's worth inlining it
2017-10-10 18:27:00 +03:00
Denis Zharkov 2fa82edd85 Use smaller default deque size for BFS over supertypes
The default value (16) seems to be rather big
2017-10-10 18:27:00 +03:00
Denis Zharkov df88926ef8 Minor. Get rid of redundant var
The lazyness here is redundant since SmartList doesn't make a lot of
harm, but at the same time `var` here leads to another
kotlin/jvm/internal/Ref$ObjectRef instance
2017-10-10 18:27:00 +03:00
Denis Zharkov bca53e6c1c Optimize type checking for common cases
- Type equality for simple constructors (no arguments)
- Subtyping on final classes
2017-10-10 18:27:00 +03:00
Denis Zharkov e519095e9e Minor. Move local functions as a private to class 2017-10-10 18:27:00 +03:00
Denis Zharkov 79a7c01eac Fix obviously wrong !is check in type checker 2017-10-10 18:27:00 +03:00
Simon Ogorodnik 3ca47f5f4a Revert "Add note about automatic dev plugin updates to ReadMe"
This reverts commit c92408e
2017-10-10 18:25:27 +03:00
Simon Ogorodnik b7e78e6625 Revert "Add note about bootstrap plugin"
This reverts commit 722345d
2017-10-10 18:25:21 +03:00
Simon Ogorodnik 722345d14e Add note about bootstrap plugin 2017-10-10 18:07:51 +03:00
Simon Ogorodnik c92408eec9 Add note about automatic dev plugin updates to ReadMe 2017-10-10 18:07:51 +03:00
Mikhael Bogdanov a79c2bf999 Write script descriptor type to ASM_TYPE slice
#KT-20707 Fixed
2017-10-10 17:01:23 +02:00
Nikolay Krasko eb32f5478a Minor: use special extension 2017-10-10 16:29:22 +03:00
Nikolay Krasko 6664b7759b Configure kotlin.stdlib for gradle projects (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:22 +03:00
Nikolay Krasko 023067aaf2 Allow to use folders for gradle configuration tests 2017-10-10 16:29:22 +03:00
Nikolay Krasko cc0a9070b9 Add kotlin.stdlib to module-info when configure Maven project (KT-19207)
#KT-19207 In Progress
2017-10-10 16:29:22 +03:00
Nikolay Krasko c0e6cb8b92 Log module name when maven project wasn't found in manager 2017-10-10 16:29:21 +03:00
Nikolay Krasko f05e4c922b Minor: use another method 2017-10-10 16:29:21 +03:00
Nikolay Krasko 65798cdd81 Minor: optimize imports and clean up 2017-10-10 16:29:21 +03:00
Nikolay Krasko 9d122a275a Update module-info only for Java configurator (KT-19207)
#KT-19207 Fixed
2017-10-10 16:29:21 +03:00
Ilya Gorbunov fe9ef04cae Make a task to count dex methods in kotlin-stdlib and kotlin-reflect 2017-10-10 14:48:20 +03:00
Alexander Udalov 00c846a160 Write patch version for VersionRequirement correctly 2017-10-10 13:21:50 +02:00
Alexander Udalov 6f2e6db131 Check the RequireKotlin annotation value
Similarly to SinceKotlin
2017-10-10 13:21:50 +02:00
Alexander Udalov a96861c353 Support version kind for RequireKotlin
#KT-20584 Fixed
2017-10-10 13:21:49 +02:00
Alexander Udalov 4532f7556c Introduce internal RequireKotlin annotation 2017-10-10 13:19:18 +02:00
Alexander Udalov 8962911503 Rename SinceKotlinInfo -> VersionRequirement 2017-10-10 13:19:18 +02:00
Alexey Andreev 8f9fc100a3 Fix compilation of JS stdlib
1. Don't import intrinsics when compiling stdlib, use declarations
   from current module instead
2. Add constructor with one argument to SourceFilePathResolver,
   to fix bootstrapping issues.
3. Pass correct source roots to compiler when building
   stdlib, since now we pass module root by default,
   while stdlib source roots are outside of module root.
2017-10-10 14:11:15 +03:00
Alexey Sedunov ea8f3dcc65 Go to Implementation: Support suspend functions 2017-10-10 13:15:16 +03:00
Alexey Sedunov 21bf4d3f24 Rename: Suspend function support 2017-10-10 13:15:15 +03:00
Toshiaki Kameyama c5b7d0f0df Remove parentheses after deleting the last unused constructor parameter
So #KT-16636 Fixed
2017-10-10 11:55:27 +03:00
Mikhail Glukhikh 7ade2bb708 Move CreateActualFix to expectactual package 2017-10-10 10:45:12 +03:00
Mikhail Glukhikh 104826e0a9 Line markers: use descriptors in isExpect/ActualDeclaration 2017-10-10 10:45:10 +03:00
Mikhail Glukhikh 1bf0424b1c Set line marker on expect constructor '(' if no constructor keyword 2017-10-10 10:44:51 +03:00
Mikhail Glukhikh 4bfaa46c15 Add correct mapping of module descriptor to implementedDescriptor
Now implements dependency is taken into account here
Old commonModuleOrNull() was deleted
Test (JVM + 2xCommon) was added
2017-10-10 10:44:44 +03:00
Mikhail Glukhikh b5e2fa5f94 Add line marker test for type aliases #KT-20164 Fixed 2017-10-10 10:44:39 +03:00