Commit Graph

42021 Commits

Author SHA1 Message Date
Dmitry Savvinov 32d80f322e Effects: add new slices in BindingContext
==========
Effect System introduction: 4/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov d2e582698e Effects: add interpreters of ContractDescription
Interpreters convert declarative representation of contracts
(ContractDescription) in internal representation convenient for usage
inside compiler (Computations, Effects, etc.)

==========
Effect System introduction: 3/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov afc15e9211 Effects: Add inner representation of contracts
Add model of contracts used by compiler during analysis. It should be
thought of as structure which used by the compiler to implement
semantics, expressed by the ContractDescription.

==========
Effect System introduction: 2/18
2017-10-11 13:34:54 +03:00
Dmitry Savvinov ba84bd3f19 Effects: Add declarations for description of contracts
Add ContractDescription structure which is used for declarative representation
of function's contract.

Also, add corresponding LanguageFeatures.

==========
This is the first commit from a series of 18 commits which gradually
introduce effect system into the compiler. All such commits will be
marked with appropriate comment and index in that series.

While each one of such commits separately shouldn't break compiler (i.e
you can checkout any of them and expect compiler to build and pass
tests successfully, e.g. for bissecting purposes), semantically they
all are one big feature and not entirely independent. Please bear that
in mind while working with/changing only some of them -- some strange
effects can happen.
2017-10-11 13:34:54 +03:00
Dmitry Jemerov ee72cc268c Fix NSEE if there's no JVM implementation module (KT-20638) 2017-10-11 12:27:01 +02:00
Dmitry Jemerov dc7ffdcbe4 Add missing read action 2017-10-11 12:26:59 +02:00
Dmitry Jemerov 6c7f558d36 Add missing FileModificationService call (EA-107395) 2017-10-11 12:26:39 +02:00
Dmitry Jemerov c2efdfe243 Add space before 'where' keyword
#KT-19213 Fixed
2017-10-11 12:25:53 +02:00
Dmitry Jemerov f2a7e7f238 Show argument name hints for function type calls only for known names
#KT-19216 Fixed
2017-10-11 12:25:52 +02:00
Dmitry Jemerov af09f5a49f Enable argument name hints for annotations
#KT-19146 Fixed
2017-10-11 12:25:51 +02:00
Nikolay Krasko 8a46968292 Fix JUnit3RunnerWithInners runner for gradle execution (KT-20684)
#KT-20684 Fixed
2017-10-11 12:43:44 +03:00
Nikolay Krasko aaa3dd8e70 Don't filter out inner classes when running tests (KT-20684)
#KT-20684 In Progress
2017-10-11 12:43:43 +03:00
Ilya Gorbunov 456c26cdae Remove "EXPERIMENTAL" from 1.2 version description in tests and gradle options 2017-10-11 08:50:30 +03:00
Ilya Gorbunov b901a8946c Set 1.2-SNAPSHOT in maven build 2017-10-11 08:50:30 +03:00
Ilya Gorbunov cffab8d3ef Set 1.2-SNAPSHOT in gradle build 2017-10-11 08:50:30 +03:00
Ilya Gorbunov 968c9c2034 Set LATEST_STABLE language version and current version of stdlib to 1.2 2017-10-11 08:50:30 +03:00
Sergey Igushkin 17eac133a2 (minor) Make a test running on Gradle 4.0+ check the classes correctly 2017-10-11 02:25:30 +03:00
Mikhail Zarechenskiy e9aad54664 Add intrinsics to mark and choose special api calls
#KT-20585 Fixed
2017-10-11 01:37:05 +03:00
Mikhail Glukhikh e37bfa13e3 Related to KT-20713: add test for find usages in script 2017-10-10 22:48:42 +03:00
Mikhail Glukhikh c5cb45794a Fix CCE in ReplaceAddWithPlusAssignIntention #KT-20183 Fixed 2017-10-10 22:48:39 +03:00
Mikhail Glukhikh fd95769780 Code cleanup: ReplaceAddWithPlusAssignIntention 2017-10-10 22:48:37 +03:00
Mikhail Glukhikh 45c9be2945 Fix problem with mutable map in "simplifiable call chain"
So #KT-20315 Fixed
2017-10-10 22:48:35 +03:00
Mikhail Glukhikh 8e59d3e379 Handle modifiers correctly in "val to object" #KT-18919 Fixed 2017-10-10 22:48:33 +03:00
Mikhail Glukhikh 0b5b5d8e89 Suggest primitive array type for collection literals in "add type" fix
So #KT-18549 Fixed
2017-10-10 22:48:30 +03:00
Mikhail Glukhikh e65112fcab Disable "Replace camel-case name with spaces" intention for JS / common
So #KT-18773 Fixed
2017-10-10 22:48:28 +03:00
Ilya Gorbunov 43e6106791 Bootstrap selection: allow to specify teamcity project with a parameter 2017-10-10 21:00:32 +03:00
Ilya Gorbunov 39c8bae134 Minor: move extra property initialization 2017-10-10 21:00:30 +03:00
Ilya Gorbunov 712d0e0777 Remove redundant repositories 2017-10-10 20:50:03 +03:00
Ilya Gorbunov 5f51a293ba Use 'idea' plugin to specify excluded dirs 2017-10-10 20:50:03 +03:00
Ilya Gorbunov a8766a00c6 Remove unused property jdk16.home 2017-10-10 20:50:03 +03:00
Zalim Bashorov a4722a4000 Make "js.tests" depends on ":kotlin-test:kotlin-test-js" since it's used on runtime inside JS tests.
Transform dependency on ":kotlin-stdlib-js" to testRuntime since it's required only on runtime.

And remove unnecessary dependency from jsCompilerTest.
2017-10-10 20:19:07 +03:00
Zalim Bashorov eb1c76ecc4 Make :kotlin-test-js:distJs depends on compileKotlin2Js to avoid running the task too early 2017-10-10 20:19:07 +03:00
Sergey Igushkin 205df7b1f3 ~ Remove debug port 2017-10-10 19:40:18 +03:00
Sergey Igushkin 8e967c9b6b Move existing multiplatform tests to separate class; add options test. 2017-10-10 19:40:18 +03:00
Sergey Igushkin 6fd9eb2711 Add kotlinOptions to KotlinCompileCommon 2017-10-10 19:40:18 +03:00
Sergey Igushkin 8046959017 Refactor existiong *OptionsImpl classes. 2017-10-10 19:40:17 +03:00
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