Alexander Gorshenev
c227c13799
Commonizing klib metadata between native and js
2019-10-01 17:38:57 +03:00
Georgy Bronnikov
7e9cfbc91a
IR: use toLowerCaseAsciiOnly
2019-10-01 16:43:23 +03:00
Georgy Bronnikov
53b7766910
IR: call toLowerCase() with root locale
...
Preventing complexities with Turkish Iı vs. İi.
2019-09-30 22:55:19 +03:00
pyos
20626e4aaf
Make ReturnableBlockLowering common
...
and remove special handling in JVM_IR codegen.
2019-09-05 15:48:26 +02:00
Alexander Udalov
bf5ca2ed84
Cleanup compiler warnings in IR-related modules
2019-09-03 19:32:57 +02:00
Roman Artemev
f14107bf65
[IR] Sort dependencies a bit early
2019-09-03 14:21:29 +03:00
Svyatoslav Kuzmich
9594e9b3b1
[JS IR BE] Initial export generation
2019-08-30 13:15:37 +03:00
Svyatoslav Kuzmich
6670180782
[JS IR BE] Use internal visibility for generated helper methods
2019-08-30 13:15:37 +03:00
Svyatoslav Kuzmich
6e6ffa12a6
[WASM] Initial infrastructure
...
- New module ":compiler:backend.wasm"
- Initial compiler infra (driver, phaser, context)
- Subset of Wasm AST
- Skeleton of IR -> Wasm AST
- Wasm AST -> WAT transformer
- Testing infra
- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00
Svyatoslav Kuzmich
1891fa1bf1
[JS IR BE] Commonize JS lowerings
2019-08-22 15:59:41 +03:00
Igor Chevdar
ad8bcda99e
[IR] Merged K/N inliner with the common one
2019-08-16 18:32:19 +03:00
Dmitry Petrov
a9c961931c
JS_IR: Support 'CHECK_NOT_NULL' intrinsic
2019-08-14 11:16:11 +03:00
Dmitry Petrov
7170439517
IR: '!!' is generated as 'CHECK_NOT_NULL' intrinsic
...
```
fun <T : Any> CHECK_NOT_NULL(x: T?): x =
if (x != null) x else throw NullPointerException(...)
```
This allows to compile both Kotlin/JVM and Kotlin/JS effectively.
2019-08-14 11:16:10 +03:00
Dmitry Petrov
f590d4da9e
IR: IrTypeAlias: serialize/deserialize new IR objects
...
Add uniqId for typealias declarations.
Implement WrappedTypeAliasDescriptor.
2019-08-06 12:42:43 +03:00
Dmitry Petrov
2b43b09444
IR: IrTypeAlias: Strip 'typealias' declarations in back-ends
2019-08-06 12:42:02 +03:00
Steven Schäfer
9182fe887e
Fix inline class handling in DefaultParameterInjector
2019-08-05 16:48:18 +03:00
Dmitry Petrov
dd3f8ecaac
IR BE Common: Provisional IrFunctionExpression lowering
...
Transforms IrFunctionExpression elements to local function references,
as it was done before IrFunctionExpression introduction.
2019-07-19 11:36:19 +03:00
Roman Artemev
efafb6585e
[JS IR BE] Refactored js("...") function
...
- support object expression
- do not wrap in function in statement-level position
- support implicit return
- code clean up
2019-07-11 18:00:28 +03:00
Roman Artemev
946bc75cda
[JS IR BE] Code clean up
...
- Remove hacks for unbound symbols in TypeOperatorLowering
- Replace hacker intrinsics with dynamic operations
- Fix return type for `Object$create` intrinsic
2019-07-11 18:00:28 +03:00
Roman Artemev
6ab46204cb
[JS IR BE] Properly handle primary constructors
...
- force primary constructor to be created by codegen
- make sure initializer is invoked once in primary constructor
- make one of coroutine constructor primary
- remove hack from codegen
2019-07-10 10:39:11 +03:00
Roman Artemev
a112345418
[JS IR BE] Fix builtin constructor lowering
...
- Do not touch delegation construction call
2019-07-10 10:39:11 +03:00
Roman Artemev
131158df65
[JS IR BE] Refact MultipleCatchLowering
...
- catch dynamic type instead of common super type over all catch blocks
2019-07-10 10:39:11 +03:00
Roman Artemev
1605dc3251
[JS IR BE] Remove unused classifier symbol from IrTypeOperatorCall builder
2019-07-10 10:39:10 +03:00
Roman Artemev
d9c6d38715
[JS IR BE] Fix private members lowering
...
- visit over file instead of class
2019-07-09 10:40:01 +03:00
Svyatoslav Kuzmich
675f01ee80
[JS IR BE] Set Throwable subtype name in extendThrowable function
2019-07-05 19:31:23 +03:00
Roman Artemev
8a569cc698
[JS IR BE] Do not create $default stub for external function and any its fake override
2019-07-04 22:59:12 +03:00
Roman Artemev
28a108a205
[JS IR BE] Visit callable reference members in private member lowering
2019-07-04 22:59:12 +03:00
Roman Artemev
b4c68025a7
[JS IR BE] Improve error reporting
2019-07-04 22:59:12 +03:00
Svyatoslav Kuzmich
94aebd0101
[JS IR BE] Proper support for String and Any constructors
...
Remove workarounds from codegen
2019-07-04 17:03:47 +03:00
Svyatoslav Kuzmich
631a09e541
[JS IR BE] ThrowableLowering: Use dynamic operators instead of jsSetJSField intrinsic
2019-07-03 20:37:49 +03:00
Svyatoslav Kuzmich
871180cdc0
[JS IR BE] Fix setting names of Throwable subclasses without primary constructor
2019-07-03 20:37:49 +03:00
Svyatoslav Kuzmich
918d470e1b
[JS IR BE] Simplify throwable lowering.
...
- Make kotlin.Throwable class extenral
- Add runtime function 'extendThrowable' to use instead of delegating
constructors to Throwable
2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich
6d1f893a5a
[JS IR BE] Move object instance creation lowerings to IR
2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich
5dcb0ee016
[JS IR BE] Reduce JsScope usage in codegen
2019-07-03 20:37:48 +03:00
Svyatoslav Kuzmich
69962cbf8c
[JS IR BE] Add JsExport annotations
2019-07-01 18:55:41 +03:00
Svyatoslav Kuzmich
685597d20a
[JS IR BE] Codegen class model refactorings
...
Reduce JsScope usage
2019-07-01 18:55:41 +03:00
Mark Punzalan
969478481e
Move extension receiver to value parameters for static functions created
...
during InlineClassLowering phase.
This was the only place where both dispatch and extension receivers were
NOT moved to value parameters, which meant that the receivers were not
following the conventional ordering.
Merged createStaticBodilessMethod with createStaticFunctionWithReceivers
and the latter was moved to backend/common/ir/IrUtils.kt.
2019-07-01 13:24:08 +02:00
Mark Punzalan
1abdf0561a
Generate synthetic functions for local functions with default values, by
...
re-ordering the lowering phases.
The changes in InterfaceLowering are necessary so that IrElements that
target the removed functions are re-targeted to the new functions in
DefaultImpls. This affects local functions in interface functions since
now LocalDeclarationsLowering comes before InterfaceLowering.
2019-07-01 13:24:08 +02:00
Alexander Udalov
9131ff3626
Move IrType.isNullable to 'ir.tree'
2019-06-27 16:43:06 +02:00
Mikhael Bogdanov
9b6fef005f
Simplify LocalDeclarationsLowering, support declaration pop up via separate lower
...
1. Scheme of capturing local variables not touched
2. Lowered local functions are transposed to the nearest class (including local) or file
3. Local classes are also transpose to the nearest class (including local) or file
2019-06-27 08:07:01 +02:00
Anton Bannykh
d6c10d24e1
JS IR: move inliner to common part; inline suspendCoroutineUninterceptedOrReturnJS
2019-06-26 13:13:39 +03:00
Dmitry Petrov
b3b7e26985
Make InsertImplicitCasts work with Descriptors and KotlinTypes again
...
This is a temporary change to make sure IrType infrastructure work is in
master.
It causes some of irText tests to work incorrectly (as in master).
2019-06-26 10:07:13 +03:00
Dmitry Petrov
7a44b0f951
IR: IrTypeOperatorCall.classifierSymbol can be computed from typeOperand
2019-06-26 09:39:16 +03:00
Dmitry Petrov
760806a1ac
IR: IMPLICIT_DYNAMIC_CAST
...
Generate IMPLICIT_DYNAMIC_CAST for implicit casts from `dynamic` to `T`
2019-06-26 09:39:16 +03:00
Roman Artemev
544443f113
[JS IR BE] Initialize module dependencies in the correct order
2019-06-24 20:14:19 +03:00
Svyatoslav Kuzmich
0b19a4a32b
[JS IR BE] Initial version of member namer
2019-06-21 17:02:01 +03:00
Svyatoslav Kuzmich
3e10de9cd1
[JS IR BE] Fixup property accessors
2019-06-21 17:02:01 +03:00
Svyatoslav Kuzmich
84d48b8c7b
[IR BE] Don't override private declarations
2019-06-21 17:02:01 +03:00
Svyatoslav Kuzmich
7796d084e1
[JS IR BE] Generate fileds for all properties
2019-06-21 17:02:01 +03:00
Svyatoslav Kuzmich
14ec30dd5a
[JS IR BE] Lower property accessors in PrimitiveCompanionLowering
2019-06-21 17:02:01 +03:00