Alexander Udalov
a25aa2fed8
Cleanup DefaultErrorMessagesJvm
...
Use static imports, use Kotlin stdlib API, use more precise renderers
2017-06-21 15:42:59 +03:00
Alexander Udalov
4e51448b66
Refactor and simplify functionTypes.kt and related code
...
Remove unused declarations, inline one-liners, optimize by using
KotlinBuiltIns.isUnderKotlinPackage
2017-06-21 15:42:58 +03:00
Alexander Udalov
5a25ba199a
Micro optimization to avoid computing class FQ name when not necessary
...
KotlinBuiltIns.isConstructedFromGivenClass checks the simple name of the
class first, and only computes the full FQ name if it matches the last
segment of the expected FQ name
2017-06-21 15:42:57 +03:00
Alexander Udalov
aed5b934f8
Introduce KotlinBuiltIns.isUnderKotlinPackage
...
Semantics is the same as in the former
FunctionDescriptor.hasSubpackageOfKotlin, but it doesn't compute the FQ
name of the descriptor
2017-06-21 15:42:57 +03:00
Alexey Sedunov
7bc42f89d3
Configuration: Fix API version selection on language version change
2017-06-21 12:36:53 +03:00
Alexey Sedunov
3460a31e3a
Kotlin Facet: Do not import dependency-based classpath from Gradle
...
JPS obtains it automatically via imported module dependencies
#KT-18475 Fixed
2017-06-21 12:36:52 +03:00
Alexey Sedunov
f68689b5e4
Kotlin Facet: Do not import jdkHome from Gradle/Maven model
...
#KT-18151 Fixed
2017-06-21 12:36:51 +03:00
Alexey Sedunov
fe42586c6f
Kotlin Facet: Fix NPE in Maven importer tests
...
#KT-18376 Fixed
2017-06-21 12:36:50 +03:00
Alexey Sedunov
0570592952
Kotlin Facet: Avoid rewriting platform version with project settings
...
#KT-18373 Fixed
2017-06-21 12:36:49 +03:00
Ilya Chernikov
2e823a4816
Fix compatibility with renamed Gradle Kotlin DSL
2017-06-21 11:35:21 +02:00
Mikhail Zarechenskiy
1e020644e1
Fix getting right bracket element for collection literal
2017-06-21 01:22:08 +03:00
Mikhail Zarechenskiy
837df66c19
Register reference contributor for collection literals
...
#KT-18551 Fixed
2017-06-21 00:16:28 +03:00
Alexey Andreev
78b238a05b
Report warning when two .kt files get same paths in JS source map
2017-06-20 17:40:36 +03:00
Alexey Andreev
60dd475493
Don't expose sourceMapSourceRoots argument to Gradle (JS)
...
Exposing this property causes IDEA to treat it as a free
command line argument, which is undesirable.
Support source roots via setting command line arguments inside
JS gradle task.
2017-06-20 17:40:35 +03:00
Alexey Andreev
49b742ab3d
Add new JS source map config options to Maven plugin
2017-06-20 17:40:35 +03:00
Alexey Andreev
cfd3b137d8
Add support for JS source map source roots to Gradle plugin
2017-06-20 17:40:34 +03:00
Alexey Andreev
62fb149f08
Add support for sourceMapPrefix option (JS) in IDEA
2017-06-20 17:40:34 +03:00
Alexey Andreev
1d6f01ee6c
Add support for relative JS source map paths in JPS
2017-06-20 17:40:33 +03:00
Alexey Andreev
13ab63ae09
Generate relative paths in JS source maps
...
Also, add CLI options to manipulate prefixes of path
See KT-4078
2017-06-20 17:40:32 +03:00
Nikolay Krasko
44d3b8fb1a
Ignore sub-queries for other operators with the same receiver (KT-18566)
...
ExpressionsOfTypeProcessor searches for all occurence of expression
with given type. It start from usages of the class, searches for sub-classes,
declarations that return those classes, usages of these declarations,
and so on.
During this search, find usages for all operators that return the
subject type is executed as sub-queries. Full search for such queries
can't give addition types. And it also shouldn't give additional scopes
for search, because same scopes should be located by operands. In other
words, if sub-query can spot the scope of usage starting from the same
type, the original query should also process same scope.
#KT-18566 Fixed
2017-06-20 16:53:05 +03:00
Yan Zhulanow
0f3dff44ac
Minor: Remove invalid Maven module reference
2017-06-20 15:23:15 +03:00
Alexander Udalov
31b2fffbe1
Avoid NPE at UtilKt.toJavaClass for unrecognized classes
...
Sadly, the case where this NPE would reproduce, remains unknown
#KT-18494 Fixed
2017-06-20 14:39:48 +03:00
Alexander Udalov
8ef3531c48
Add kotlin.Any to KClass.superclasses if it's absent
...
#KT-18476 Fixed
2017-06-20 14:39:48 +03:00
Alexander Udalov
9471f33c38
Refactor getDefaultSupertype, drop obsolete diagnostic
2017-06-20 14:39:47 +03:00
Alexander Udalov
90f2ea87a6
Fix exception on callBy of callable with more than 32 parameters
...
The previous condition that checked if we'd skipped any optional
parameters didn't work when number of parameters > 32 because the number
of bit masks in that case was more than one
#KT-18404 Fixed
2017-06-20 14:39:47 +03:00
Mikhael Bogdanov
62cd57b0d2
Make base test classes 'abstract'
2017-06-20 13:07:30 +02:00
Dmitry Petrov
786ac46fa6
Do not store nulls for captured variables going out of scope
...
These values can't be read after going out of scope.
JVM implementation can take care of such object references on its own.
Ref objects for captured variables are not different from any other
objects stored in local variables, so there's really no reason to
nullify these references explicitly.
#KT-18478 Fixed Target versions 1.1.4
2017-06-20 13:31:36 +03:00
Dmitry Petrov
9356c1e0ef
Skip PopBackwardPropagation for methods with large frames or no POPs
...
TODO get rid of SourceInterpreter here, it's quite expensive.
2017-06-20 13:31:36 +03:00
Dmitry Petrov
0a622e4440
Rewrite OtherOrigin overloads to prevent further silly problems
...
#KT-18413 Fixed Target versions 1.1.4
2017-06-20 13:31:36 +03:00
Mikhael Bogdanov
8ca82c8e99
Add missed common parts
2017-06-20 11:08:53 +02:00
Mikhael Bogdanov
956cc0dbfd
Support IMPLICIT_INTEGER_COERCION
2017-06-20 11:01:10 +02:00
Mikhael Bogdanov
d888addba0
Add KCallableNamePropertyLowering
2017-06-20 11:00:38 +02:00
Mikhael Bogdanov
44b7f5a5be
Add inline tests to IR
2017-06-20 10:26:38 +02:00
Mikhael Bogdanov
8ab705a14c
Introduce IrInliner
2017-06-20 10:26:37 +02:00
Mikhael Bogdanov
9f736f2192
Extract PsiSourceCompiler
2017-06-20 10:26:36 +02:00
Mikhael Bogdanov
2507780e19
Extract PsiInlineCodegen
2017-06-20 10:26:35 +02:00
Mikhael Bogdanov
8dc1b8f95f
Introduce BaseExpressionCodegen and SourceCompilerForInline,
...
switch CallGenerator and InlineCodegen to them
~base
2017-06-20 10:26:35 +02:00
Alexey Andreev
3ae214b97a
Fix reified parameters with non-identifier names in JS
...
See KT-18169
2017-06-20 10:41:52 +03:00
Alexey Andreev
d3a5201ecc
Intrinsify String?.plus in JS BE
...
See KT-8020
2017-06-20 10:40:21 +03:00
Ilya Gorbunov
7efb9ddd4e
Early return if value is null
...
The change is required to fix compilation for IDEA 172, where getValue()
became explicitly nullable.
2017-06-20 02:58:40 +03:00
Zalim Bashorov
8b9fd44bbe
Publish kotlin compiler artifacts to NPM
2017-06-19 22:52:01 +03:00
Zalim Bashorov
06cd02f769
Publish to NPM with dev tag by default
2017-06-19 22:52:00 +03:00
Yan Zhulanow
04c09bedeb
SamWithReceiver, minor: Add missing module to Spring plugin classpath (fixes Spring tests)
2017-06-19 20:28:48 +03:00
Yan Zhulanow
d07fd52c43
SamWithReceiver: Add general-purpose plugin and Gradle/Maven integrations
2017-06-19 20:28:47 +03:00
Alexey Sedunov
db3172a750
Configuration: Inline createDefaultArguments() methods
...
It's a superficial fix: the bug is actually caused by
uninitialized companion instance reference in
Kotlin2JvmCompilerArgumentsHolder class
#KT-18505 Fixed
2017-06-19 18:15:40 +03:00
Mikhail Zarechenskiy
2a4cac024b
Add test for obsolete issue
...
#KT-13813 Obsolete
2017-06-19 17:36:10 +03:00
Mikhail Zarechenskiy
aeac2ea384
Fix 'add not-null asserted call' quick fix for operation in
...
#KT-18529 Fixed
2017-06-19 17:36:09 +03:00
Mikhail Zarechenskiy
b53a3b324f
Fix 'infix call' diagnostic for in operation
...
#KT-8845 Fixed
2017-06-19 17:36:08 +03:00
Mikhail Zarechenskiy
d17f31c8b0
Refactoring: move several utils from js module to frontend
2017-06-19 17:36:07 +03:00
Mikhail Zarechenskiy
dbfea9b787
Fix TCE for invalid code with wrong callee expression
...
#KT-14927 Fixed
2017-06-19 17:36:06 +03:00