Dmitry Petrov
8262d4a4b9
psi2ir: Don't generate constructor bodies for 'external' classes
...
#KT-27934
2018-11-08 12:29:15 +03:00
Dmitry Petrov
51002ee620
psi2ir: Handle missing "then" branches as empty blocks
...
#KT-27933
2018-11-08 12:29:15 +03:00
Dmitry Petrov
bd1491ac8a
psi2ir: Merge constant entries in string template expressions
...
This is required to handle UCNs properly, see KT-28006.
#KT-28006
2018-11-08 12:29:15 +03:00
Georgy Bronnikov
dbfbfa65a6
Remove IrClass.isFileClass as unneeded
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
a814e4a314
IR. Remove ClassLowerWithContext
...
The code is never used and shows some signs of bit rot.
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
1aec16ca29
JVM_IR. Remove FileClassDescriptor, no longer used
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
0a43054a92
JVM_IR. Remove descriptors from FileClassLowering
2018-11-07 19:09:15 +03:00
Georgy Bronnikov
95fbe29350
JVM_IR: remove descriptors from JvmCoercionToUnitPatcher
2018-11-07 19:09:15 +03:00
Roman Artemev
0e7520fde3
[JS IR BE] Fix GetClass on primitive type
2018-11-01 16:51:44 +03:00
Roman Artemev
2d03f87ea5
[IR BE] Support lateinit locals and isInitialized property
...
* update tests
2018-11-01 16:51:43 +03:00
Roman Artemev
535eea7f48
[JS IR BE] fix enum initialization
2018-11-01 16:51:42 +03:00
Roman Artemev
b86e2e6dc0
[JS IR BE] Fix EnumClassLowering
...
* make it incremental
* fix access to enum entry from different module
* drop ExternalEnumLowering
2018-11-01 16:51:42 +03:00
Roman Artemev
12848d4eff
[JS IR BE] Support in callable references
...
* default params
* vararg
Minor refactoring
2018-11-01 16:18:44 +03:00
Roman Artemev
fb709cae92
[JS IR BE] Fix private field names
2018-11-01 16:18:44 +03:00
Dmitry Savvinov
00036ba498
[BE IR] Skip comments for determining startOffset of declaration
2018-10-31 14:52:03 +03:00
Mikhael Bogdanov
bedaa1a503
Use proper type constructor in IrIllegalArgumentException
...
'v.anew(Type.geType(...))' worked accidentally because
1. By default, ASM 6 creates METHOD Type for 'Type.geType(...)' invocation
2. It didn't fail because this type was used only in 'anew' invocation that
calls 'internalName' only
3. ASM 7 changes default behavior to throw Exception
2018-10-30 16:30:26 +01:00
Alexander Udalov
c1ab08c8ce
Refactor KClassValue to store ClassLiteralValue internally
...
Only invariant array projections and non-null element types will be
supported soon (see KT-26568), so it makes no sense to store the
complete type in KClassValue. What we need is only the ClassId of the
class, and the number of times it's wrapped into kotlin/Array, which is
exactly what ClassLiteralValue represents.
This change helps in decoupling annotation values from
descriptors/types. The only constant value that depends on descriptors
is now AnnotationValue.
#KT-26582 Fixed
2018-10-25 16:27:23 +02:00
Alexander Udalov
9183d7ca27
Add ModuleDescriptor to AnnotationCodegen
2018-10-25 16:27:22 +02:00
Roman Artemev
ffdfec4815
[JS IR BE] Minor refactoring
2018-10-25 15:49:33 +03:00
Roman Artemev
080e1ad5b5
[JS IR BE]
...
* Fix type parameters for callable references
* Visit IrCallableReference tree as well
2018-10-25 15:49:22 +03:00
Roman Artemev
04bf93c1bc
[JS IR BE] Refact CallableReferenceLowering
...
* fix cross-module references
* make it incremental
2018-10-25 15:49:20 +03:00
Roman Artemev
43d14ed954
[JS IR BE] Put closure function declaration in container (factory function)
2018-10-25 15:49:20 +03:00
Roman Artemev
9515de0b7e
[JS IR BE] Fix name clash between top-level fields
2018-10-25 15:48:42 +03:00
Roman Artemev
91ea377622
[JS IR BE] Fix translation for float literals
2018-10-25 15:48:42 +03:00
Roman Artemev
276000a974
[JS IR BE] Fix exceptions
...
* set message property in the correct way
* set proper name for each Throwable successor
2018-10-25 15:48:42 +03:00
Roman Artemev
6a05b1eee5
[JS IR BE] Add noWhenBranchMatchedException
...
* refact exception helpers
2018-10-25 15:48:42 +03:00
Roman Artemev
3bea3eca2b
[JS IR BE] Support external enum classes
...
* add lowering pass
* fix EQEQ operator
2018-10-25 15:48:42 +03:00
romanart
eed22b0485
[JS IR BE] Add isTopLevel property to IrFunction
2018-10-25 15:48:42 +03:00
Roman Artemev
fced46ffaf
[JS IR BE] Fix block decomposer
2018-10-25 15:48:42 +03:00
Anton Bannykh
b83df18e22
[JS IR BE] make default argument lowering support per-file mode
2018-10-19 23:49:18 +03:00
Roman Artemev
41ccea6807
[JS IR BE] Fix name clashes between static and top-level functions
2018-10-19 14:07:20 +03:00
Roman Artemev
79f7cb11f0
[JS IR BE] Fix invoke on dynamic types
2018-10-19 14:03:06 +03:00
romanart
df5872281b
[JS IR BE] Support instance check for Nothing type
2018-10-18 19:00:43 +03:00
Anton Bannykh
3a105debb3
[JS IR BE] fix default arguments lowering
2018-10-18 14:25:48 +03:00
Anton Bannykh
e9c932260c
[JS IR BE] minor refactoring
2018-10-18 14:25:48 +03:00
Dmitry Petrov
763e72603a
Mark implicit 'invoke' calls with origin INVOKE
2018-10-18 10:59:24 +03:00
Georgy Bronnikov
bbac1d802f
JVM_IR. Support annotation classes with JvmField fields
2018-10-17 21:15:28 +03:00
Georgy Bronnikov
605afbae90
Move fields and init blocks of companions to their owners
2018-10-17 21:15:28 +03:00
Georgy Bronnikov
827494abbe
JVM_IR. Mostly remove descriptors from ConstAndJvmFieldPropertiesLowering
2018-10-17 21:15:28 +03:00
Alexander Udalov
6e2e6794aa
Remove unnecessary copy of ReflectionTypes
...
ReflectionTypes was copied from org.jetbrains.kotlin.builtins to
kotlin-native in
https://github.com/JetBrains/kotlin-native/commit/776f4c4b7 , and then
was incorrectly copied back in 27365dc4be . This class is in fact only
needed in kotlin-native, where it was moved and simplified in
https://github.com/JetBrains/kotlin-native/commit/c3e921d53
2018-10-17 18:39:50 +02:00
romanart
d75434ac71
[JS IR BE] Support tailreq in JS
2018-10-17 18:33:52 +03:00
romanart
eb2a33ebee
[JS IR BE] Implement lowering to connect kotlin Throwable with JS Error
2018-10-17 14:10:37 +03:00
Georgy Bronnikov
4942ed5e7a
Clean up backend.common.ir.IrUtils.kt
2018-10-15 21:52:50 +03:00
Georgy Bronnikov
376eef05f5
JVM_IR. Accessor lowering
2018-10-15 21:52:50 +03:00
Georgy Bronnikov
a23aae590e
JVM_IR. Avoid unbound symbols and declarations without parent
2018-10-15 21:52:50 +03:00
Svyatoslav Kuzmich
02277d0293
[JS IR BE] ExpectDeclarationsRemoving lowering
...
* Copy lowering from konan to common
* Keep actual default parameters when both actual and expect default parameters are present
* Run lowering before inline in JS IR BE to fix
box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt
2018-10-15 00:03:46 +03:00
Svyatoslav Kuzmich
5a057f8ca6
[JS IR BE] Support 'is Number' and 'is Comparable<>'
2018-10-14 23:53:03 +03:00
Svyatoslav Kuzmich
783f27c554
[JS IR BE] Support Number.to(Byte|Short|Int|Float|Double|Long)
2018-10-14 23:53:03 +03:00
Svyatoslav Kuzmich
bad9534abd
[JS IR BE] Support integer operation overflow
2018-10-14 23:53:02 +03:00
Zalim Bashorov
8013a56286
[JS IR BE] process empty loops correctly in BlockDecomposerLowering
2018-10-13 01:51:59 +03:00