max-kammerer
8560459dc6
Revert "Test reification of type parameters into Array(size, init)"
...
This reverts commit 6daa61ef5f .
2019-05-09 11:49:34 +02:00
pyos
6daa61ef5f
Test reification of type parameters into Array(size, init)
2019-05-09 08:03:18 +02:00
pyos
a74fae246b
JS_IR: remove traces of @kotlin.native.internal.InlineConstructor
...
This is a hack used by Kotlin/Native purely to implement Array
constructors. Since there's a lowering that does that, and inline
constructors are not part of the language (although they theoretically
could be), the code is redundant.
2019-05-09 08:03:18 +02:00
pyos
530ad368fe
JVM_IR: implement IrReturnableBlock codegen
2019-05-09 08:03:18 +02:00
pyos
4a29e3cfcf
Add a common JVM/JS lowering for Array(size, function)
...
and remove the hack from JVM_IR codegen that replaces this call with
hardcoded inline function bytecode.
2019-05-09 08:03:18 +02:00
Svyatoslav Kuzmich
f4bb1354c9
[JS IR BE] Support friend modules
2019-05-08 23:34:00 +03:00
Nikolay Krasko
ad02700200
Update to bootstrap 1.3.50-dev-2
...
Fix Compiler and all IDE plugins configuration struggling to build
stdlib because of circular dependency.
See 1.3.50-dev-2 build in https://teamcity.jetbrains.com/app/buildConfiguration/Kotlin_dev_CompilerAllPlugins?branch=%3Cdefault%3E&buildTypeTab=builds
2019-05-08 20:01:01 +03:00
Dmitriy Dolovov
ca9bff010b
Fix: Make "cidrPluginsEnabled" Gradle parameter checks consistent
...
Also add logging.
2019-05-08 17:16:40 +03:00
Natalia Selezneva
e158875a14
Fix NPE in SLRUMap in ScriptDefinitionsManager
...
EA-138364 - NPE: LinkedHashMap$Entry.access$
2019-05-08 15:17:13 +03:00
Natalia Selezneva
2a2fe6b428
Do not provide 'add dependency' quick fix for unresolved references for non-project files
...
EA-126105 - NPE: JavaFileManagerImpl$LibSrcExcludingScope.<init> (KotlinAddOrderEntryActionFactory)
2019-05-08 15:17:12 +03:00
Natalia Selezneva
ba7d66eb4b
Fix 'Invalid file' Exception during script definition search (EA-125840)
...
EA-125840 - assert: FileManagerImpl.findFile
2019-05-08 15:17:12 +03:00
Natalia Selezneva
836006b3f3
Do not use canonical paths in OutsidersPsiFileSupportUtils (EA-135551)
...
EA-135551 - IOE: OutsidersPsiFileSupportUtils$getOutsiderFileOrigin$.invoke
2019-05-08 15:17:11 +03:00
Natalia Selezneva
98235952ad
Fix notification about highlighting for diff view in build.gradle.kts (KT-30638)
...
^KT-30638 Fixed
2019-05-08 15:17:11 +03:00
Natalia Selezneva
495d98f997
Fix highlighting for scripts in diff view (KT-30690)
...
^KT-30690 Fixed
2019-05-08 15:17:10 +03:00
Natalia Selezneva
88c6ecbbdf
Minor: extract common parts
2019-05-08 15:17:09 +03:00
Natalia Selezneva
89bf7f991a
Run indexes update after typing in script if needed
2019-05-08 15:17:09 +03:00
Natalia Selezneva
9e51f82248
Refactoring: add isApplicable method to ScriptDependenciesLoader
2019-05-08 15:17:08 +03:00
Natalia Selezneva
e990c61b55
Do not start script dependencies update if dependencies are already cached
2019-05-08 15:17:07 +03:00
Mikhail Zarechenskiy
516fccbe7b
[NI] Complete call if return type contains only "good" type variables
2019-05-08 12:19:52 +03:00
Mikhail Zarechenskiy
61bd3a8d03
[NI] Complete call if return type has proper lower or equal constraints
...
There was a silly bug: equal constraint is actually a lower and an upper
constraint, but we checked only presence of lower constraints.
Test is important as here we have one equal constraint and should
complete inner call `foo<Int>()` without propagating it to `bar` to
avoid using `NoInfer` annotation multiple times
2019-05-08 12:19:50 +03:00
Mikhail Zarechenskiy
6c9394f0b2
[NI] Use original implicit receiver for DSL violation check
...
There is an inconsistency between old and new inference for storing
receivers of resolved calls. In new inference, for captured types,
receiver will be changed and to preserve behavior of the old inference,
we use original one during important checks.
This is more a workaround than a solution and should be revisited.
#KT-31356 Fixed
#KT-29948 Fixed
#KT-31360 Fixed
2019-05-08 12:19:48 +03:00
Mikhail Zarechenskiy
c283e15425
[NI] Preserve annotations during type substitution
...
#KT-31346 Fixed
2019-05-08 11:26:20 +03:00
Ilya Gorbunov
2c26dc3af6
Add simplified overloads of String<->ByteArray/CharArray conversions
...
These overloads cover the most common cases of conversion of the entire
String or Byte/CharArray, avoiding extra index check and branching.
#KT-24810, KT-29265
2019-05-08 02:58:57 +03:00
Svyatoslav Kuzmich
f9c12db3b5
[JS IR] Unmute tests
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
e3bcabeae3
[JS IR] stdlib: Fix bugs in Long.toString(radix)
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
bc29a5b15c
[JS IR] stdlib: port methods that use bit representation of numbers
...
- Port part of 'misc.js' from current backend to 'bitUtils.kt' in IR backend
- Enable toBits, toRawBits, fromBits extension function on Double and Float
- Enable Double.withSign
- Refactor getNumberHashCode using new utils
2019-05-07 21:49:12 +03:00
Svyatoslav Kuzmich
362fbc8770
[JS IR] stdlib: Use comparator in CharArray.sort
...
CharArray is represented as a regular JS Array. Its default sort order is based
on string representation of elements.
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
179acf0789
[JS IR] stdlib: generate type-safe contentToString for primitive arrays
...
Avoid casting 'primitive' arrays to Array<*> because they fail on runtime
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
7687985442
[JS IR] Stdlib: use total-order comparasion for content equals
2019-05-07 21:48:50 +03:00
Svyatoslav Kuzmich
3a506a372b
[JS IR] stdlib: Use Nothing in return type of THROW helpers
...
Backend generated calls to those helpers inside expression which
resuleted in invalid type casts in IR (in dead code).
2019-05-07 21:48:50 +03:00
Nikolay Krasko
8c83beb086
Refactoring: drop unused AbstractKotlinReferenceContributor.kt
2019-05-07 16:12:25 +03:00
Nikolay Krasko
9b9bfe7ba3
Don't produce references for Kotlin block
2019-05-07 16:12:24 +03:00
Nikolay Krasko
78200dd38e
Get Kotlin references through Kotlin contributors only (KT-31129)
...
Speed up getting references and protect Kotlin from slow
references contributors.
#KT-31129 Fixed
2019-05-07 16:12:24 +03:00
Nikolay Krasko
b5918f4b5d
Minor: move KotlinDefaultAnnotationMethodImplicitReferenceContributor.kt
...
Need this move to reference contributor from reference provider service.
2019-05-07 16:12:24 +03:00
Mikhail Zarechenskiy
3506c2047a
Fix lint test: take into account diagnostic that is specific for NI
2019-05-07 15:56:15 +03:00
Mikhail Glukhikh
54411bd248
Simplifiable call: support case w/out receiver, add minor enhancements
...
Related to KT-30501
2019-05-07 14:28:20 +03:00
Mikhail Glukhikh
8328af5694
Apply "library call could be simplified" to idea + other style fixes
2019-05-07 14:28:20 +03:00
Mikhail Glukhikh
e934eba6e4
Simplifiable call inspection: add filter -> filterIsInstance replacement
...
#KT-30501 Fixed
2019-05-07 14:28:18 +03:00
Mikhail Glukhikh
7f1643cfad
Minor: simplify isCalling
2019-05-07 14:28:17 +03:00
Mikhail Glukhikh
8913755e11
Simplifiable call inspection: add filter -> filterNotNull replacement
...
Related to KT-30501
2019-05-07 14:28:17 +03:00
Mikhail Glukhikh
4a5cbe0443
Replace "flatMap -> flatten" inspection with abstract "simplifiable call"
...
Related to KT-30501
2019-05-07 14:28:16 +03:00
Nicolay Mitropolsky
6101b5e6ba
KotlinAnnotatedElementsSearcher made support Kotlin objects (KT-31332)
2019-05-07 09:26:00 +03:00
Svyatoslav Kuzmich
824c51e7f0
[JS IR] Add stdlib regression tests
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
0de1242f68
[JS IR BE] Unmute passed tests
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
331625a9bb
[JS IR BE] Lower kotlin.js.Json external interface methods
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6c9375196
[JS IR BE] Preserve package fqName when moving external declarations out
...
Create separate package fragment for each fqName of external declaration package
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
2741ecaaad
[JS IR BE] Materialize Unit object during upcasts in AutoBoxingTransformer
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
58bed0f932
[JS IR BE] Fix types of in secondary ctor lowering
...
Type of IrDelegatingConstructorCall is 'kotlin.Unit'
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
d6761d323c
[JS IR BE] Fix return targets inside state machine
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
feeb6e9862
[JS IR BE] Fix type for lowered cast expression
...
Safe cast result type is different from its type operand.
2019-05-06 19:34:25 +03:00