Roman Artemev
c2d118cb75
[JS IR BE] Improve error reporting
2019-05-31 13:14:43 +03:00
Roman Artemev
5686de7e09
[JS IR BE] Make kotlinx.io compile
...
- Fix expect/actual default arguments
- Fix dynamic type in inliner
- Fix external varargs
2019-05-31 13:14:43 +03:00
Dmitriy Novozhilov
bd87332b0c
Fix compiler errors in compiler detected after enabling @OnlyInputTypes in NI
2019-05-29 10:57:08 +03:00
Alexander Udalov
8dc34ae7b9
IR: rename {name,fqName}Safe -> {name,fqName}ForIrSerialization
...
These properties have a very specific detail in their behavior, in that
the constructor's name is set to be "<init>". While this is OK for the
IR serialization, this may not always be expected in other cases, and
their rather common names (`name`, `fqNameSafe`) suggested that these
properties could be used in generic contexts.
Change all usages outside IR serialization to use
`IrDeclarationWithName.name` and nullable
`IrDeclarationWithName.fqNameWhenAvailable` instead
2019-05-24 14:09:09 +02:00
Svyatoslav Kuzmich
7aed8d2f75
[JS IR BE] Fix lowering types nullability
2019-05-24 11:50:46 +03:00
Svyatoslav Kuzmich
cd55e6b1e5
[JS IR BE] Use static fields instead of variables in enum lowering
2019-05-24 11:50:46 +03:00
Roman Artemev
dfa38f4a4d
[JS IR BE] Fix state machine generation in case of composition of loops, inline functions and finally blocks
...
* lower finally blocks in any cases
* do not optimize exit blocks for if-statements
2019-05-22 15:18:13 +03:00
Roman Artemev
9c7d47789c
[JS IR BE] Implement type check for SuspendFunctionN
2019-05-22 15:18:13 +03:00
Svyatoslav Kuzmich
dd6bc100ed
[JS IR BE] Don't detach assignment operator from receiver
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
5495da5241
[JS IR BE] Allow empty call arguments only for external functions
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
e9ceee388e
[JS IR BE] Don't transform toString with extension receiver
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
3153a7dd7e
[JS IR BE] Fix boolean and/or generation
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
b8bbcb3f93
[JS IR BE] Copy type metadata for Boolean, Char and Long varargs
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
59617c97b4
[JS IR BE] Fix VarargLowering
...
- Enable empty vararg transformation for all IrFunctionAccessExpression
- Fix empty vararg boxing
- Refactor inline class boxing logic
- Fix types of generated expressions
2019-05-21 19:19:31 +03:00
Svyatoslav Kuzmich
f80b6ff947
[JS IR BE] Put file names into JsDoc
2019-05-21 19:19:31 +03:00
Roman Artemev
fabd306437
[JS IR BE] Fix varargs for inline arrays
2019-05-16 19:27:41 +03:00
Roman Artemev
600ad7e088
[JS IR BE] Fix KProperty access in case of both receivers
2019-05-16 19:27:41 +03:00
Roman Artemev
02d84bf061
[IR BE] Delegate coroutine naming strategy to platform part
2019-05-16 19:18:54 +03:00
Svyatoslav Kuzmich
23a214710b
[JS IR BE] Add Unit return type to function signature
2019-05-15 14:09:02 +03:00
Svyatoslav Kuzmich
e8933738ac
[JS IR BE] Remove conservative unit materialization
...
Remove UnitMaterializationLowering
Remove Unit insertion in BridgeConstruction
Fix codegen for when expressions without else branch
2019-05-15 14:09:02 +03:00
Svyatoslav Kuzmich
28406b6bc4
[JS IR BE] Enable unconditional validation
2019-05-14 16:23:43 +03:00
Svyatoslav Kuzmich
b07690fccf
Phaser: Implement dumper and verifier as general actions
2019-05-14 16:23:43 +03:00
Roman Artemev
db5396c1c2
[JS IR BE] Fix main function detector
...
- Do not consider extension functions as main candidate
2019-05-13 15:26:09 +03:00
Svyatoslav Kuzmich
bd3953c09f
[JS IR BE] Turn on strict mode in generated code.
...
Fix multiple import of the same javascript module.
2019-05-13 13:41:11 +03:00
Svyatoslav Kuzmich
0f90aa5f80
[JS IR BE] BridgeConstruction: Fix init order of receivers and type parameters
2019-05-13 13:40:30 +03:00
pyos
3171129c3c
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.
(cherry picked from commit a74fae246b )
2019-05-09 11:54:35 +02:00
pyos
683f8417d3
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.
(cherry picked from commit 4a29e3cfcf )
2019-05-09 11:54:18 +02:00
max-kammerer
e74e0ea013
Revert "Add a common JVM/JS lowering for Array(size, function)"
...
This reverts commit 4a29e3cfcf .
2019-05-09 11:49:34 +02:00
max-kammerer
05d352769b
Revert "JS_IR: remove traces of @kotlin.native.internal.InlineConstructor"
...
This reverts commit a74fae246b .
2019-05-09 11:49:34 +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
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
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
Igor Chevdar
7f423bd841
[IR] Fixes in inliner
2019-04-26 17:43:26 +03:00
Roman Artemev
c545481db9
Fix JS_IR IrConstructorCall support
2019-04-26 17:43:26 +03:00
Dmitry Petrov
b78d1bb2b9
IrConstructorCall support in JVM_IR, JS_IR, and FIR2IR
2019-04-26 17:43:25 +03:00
Roman Artemev
5bd3bcd237
[JS IR BE] Support main function
...
* Implement IR-based main function detector
2019-04-26 17:04:28 +03:00
Roman Artemev
6729603ac7
[JS IR BE] Fix warnings
2019-04-26 17:04:28 +03:00
Mikhail Zarechenskiy
f00c946ff7
Fix projection compilation against bootstrap compiler
...
This is needed after 5d95a1ac
2019-04-25 16:19:38 +03:00
Dmitry Gridin
37c856290f
Fix minor compile warnings
2019-04-25 19:47:39 +07:00
Svyatoslav Kuzmich
e30bdb8dc9
Fix hanling module names that require escaping
2019-04-25 03:54:17 +03:00