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
Svyatoslav Kuzmich
fc0a0f41d2
[JS IR BE] Fix: patch parents problems
...
* Patch parents for state machine builder
* Patch parents for declarations inside default value of actual parameter
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
130d2d00c3
[JS IR BE] Fix unboxing empty inline class varargs
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
0aae760469
[JS IR BE] Fix block decomposition lowering for dynamic expressions
2019-05-06 19:34:25 +03:00
Svyatoslav Kuzmich
17178628fb
[JS IR BE] Support bridges for special methods
...
Mostly reused from JVM IR lowering.
Shared logic moved to common backend module.
2019-05-06 19:34:25 +03:00
Mikhael Bogdanov
ec6904afd1
Minor. Fix test data
2019-05-06 17:34:02 +02:00
Mikhail Zarechenskiy
c1c464eeb5
Enable new type inference algorithm for IDE analysis
...
Note that this change doesn't affect compilation: if a project used
old inference, then it'll continue to use it.
To use old inference one can uncheck "Enable new type inference..."
option in "Kotlin Compiler" tab
2019-05-06 18:19:25 +03:00
Mikhail Zarechenskiy
1fecd15355
[NI] Fix exception on capturing stub type from coroutine-inference
...
#KT-30853 Fixed
2019-05-06 18:05:02 +03:00
pyos
90f11211d3
JVM_IR: wrap performInline in enterIntoInlining/exitFromInliningOf
2019-05-06 16:23:28 +02:00
Mikhail Zarechenskiy
931bbd8cec
[NI] Support ad-hoc implicit integer coercion for Kotlin/Native
2019-05-06 16:59:30 +03:00
Abduqodiri Qurbonzoda
c8a4fa58cd
Implement String to/from ByteArray conversion (KT-24810)
2019-05-06 15:54:28 +03:00
Abduqodiri Qurbonzoda
81d2d3cb6a
Implement String to/from CharArray conversion (KT-29265)
2019-05-06 15:54:28 +03:00
Mikhail Zarechenskiy
a3247b1b92
Add option to enable new inference only for IDE analysis
...
#KT-30453 Fixed
2019-05-06 14:36:05 +03:00
Dmitry Gridin
e857425b35
Fix 'optimizeImports' tests
2019-05-06 18:12:39 +07:00
Dmitry Gridin
75fb74b262
Fix runtime instance for AbstractJvmOptimizeImportsTest
2019-05-06 18:12:39 +07:00
Dmitry Gridin
ff26acacf9
Optimize Imports shouldn't delete imports with unresolved parts
...
#KT-10512 Fixed
2019-05-06 18:12:39 +07:00
Dmitry Gridin
87b559562f
Run 'Optimize Import' on idea/tests and idea/src
2019-05-06 18:12:39 +07:00
Dmitry Gridin
96ed33e357
Optimize Imports should remove unused import alias
...
#KT-17375 Fixed
2019-05-06 18:10:52 +07:00
Dmitry Gridin
7fe0503337
Unused import: support also imports as alias
...
#KT-12392 Fixed
2019-05-06 18:10:52 +07:00
Dmitry Gridin
9062a2fe72
Fix false positive "Unused import directive" for imports under several alias
...
#KT-30949 Fixed
2019-05-06 18:10:51 +07:00
Dmitry Gridin
c52abfda16
Minor: refactoring KotlinImportOptimizer, KotlinUnusedImportInspection, OptimizedmportsBuilder and AbstractOptimizeImportsTest
2019-05-06 18:10:51 +07:00
Mikhail Zarechenskiy
2f835ed66f
Specify type arguments to fix compilation against bootstrap compiler
2019-05-06 14:00:19 +03:00
Mikhail Zarechenskiy
8446ea8a6b
[NI] Avoid substituting type variables inside captured types
...
This fixes exception in CreateAnnotation#testAnnotationType test
2019-05-06 14:00:17 +03:00