1434 Commits

Author SHA1 Message Date
Roman Artemev 01fea13467 Fix name clashing between local variables 2018-04-27 20:00:41 +03:00
Roman Artemev 997328f584 Refactoring and fixes 2018-04-27 20:00:40 +03:00
Roman Artemev deab0a017b Add support for inner clases 2018-04-27 20:00:40 +03:00
Roman Artemev 746eb4b93e Implement object class in JS BE 2018-04-27 20:00:39 +03:00
Roman Artemev 17ee38a0b7 Refactor secondary constructor lowering using new builders 2018-04-27 20:00:38 +03:00
Roman Artemev 752cbf2714 Implemented KFunction interface 2018-04-27 20:00:32 +03:00
Roman Artemev 09c54f1da3 Add symbol & IR builders to JS backend 2018-04-27 19:53:47 +03:00
Roman Artemev c1a4aeb67f Lift InnerClassesLowering from JVM to common since it is used by every backend in the same way 2018-04-27 19:53:47 +03:00
Roman Artemev ed0c26ef07 Implement function literals in JS BE 2018-04-27 19:53:47 +03:00
Zalim Bashorov 5c40892c57 [JS IR BE] Right support for inc and dec on primitive numbers 2018-04-26 13:46:50 +03:00
Zalim Bashorov 6725f085c7 [JS IR BE] Deprecate Name.toJsName and remove dummyScope 2018-04-25 22:21:25 +03:00
Zalim Bashorov a6f4594679 [JS IR BE] Intrinsicify kotlin.js.js 2018-04-25 22:20:41 +03:00
Zalim Bashorov 9c25b21510 Minor: remove useless comments from JsIrBackendContext 2018-04-25 22:18:57 +03:00
Zalim Bashorov ac42a0a23e [JS IR BE] don't materialize Unit for toplevel expressions 2018-04-16 14:34:44 +03:00
Zalim Bashorov 8408bada76 [JS IR BE] basic support for the case when IrBlock is used as expression
In this case compiler generates comma separated expressions.
2018-04-16 14:34:43 +03:00
Zalim Bashorov 77ac0a5d95 [JS IR BE] use most of new intrinsics in IR -> IR 2018-04-16 14:34:43 +03:00
Zalim Bashorov 48219e4a9a [JS IR BE] support new intrinsics in IR -> JS 2018-04-16 14:34:43 +03:00
Zalim Bashorov 76e102a2d2 [JS IR BE] declare more intrinsics
* jsGt
* jsGtEq
* jsLt
* jsLtEq
* jsUnaryPlus
* jsUnaryMinus
* jsPrefixInc
* jsPostfixInc
* jsPrefixDec
* jsPostfixDec
* jsAnd
* jsOr
* jsBitAnd
* jsBitOr
* jsBitXor
* jsBitNot
* jsBitShiftR
* jsBitShiftRU
* jsBitShiftL
* jsInstanceOf
2018-04-16 14:34:42 +03:00
Zalim Bashorov 2ed82f136c [JS IR BE] move intrinsic for Object.create calls to JsIntrinsics 2018-04-16 14:34:42 +03:00
Zalim Bashorov 89aefb2e3f [JS IR BE] add basic support for some binary and equality operations; add some intrinsic infrastructure 2018-04-16 14:34:41 +03:00
Zalim Bashorov 1f7d818307 [JS IR BE] use mapTo instead of map when translate call arguments 2018-04-16 14:34:41 +03:00
Zalim Bashorov 194f5d575a [JS IR BE] use IrMemberAccessExpression.valueArgumentsCount instead of descriptor based IrFunctionSymbol.parameterCount and remove last one 2018-04-16 14:34:40 +03:00
Roman Artemev 2bea8816a6 Add Secondary constructor lowering 2018-04-10 15:45:55 +03:00
Anton Bannykh a514c0f515 JS IR: initial lowerings reuse 2018-03-29 20:32:10 +03:00
Roman Artemev 68e47a9d60 Implement basic IR -> JS class translation 2018-03-29 13:26:04 +03:00
Zalim Bashorov 0aa0ffc6fd [JS IR BE] Add generating JS AST for more IR elements:
* string concat
* get local value
* set local variable

* block
* composite block
2018-03-28 20:33:22 +03:00
Zalim Bashorov 7ae28a806b [JS IR BE] Add generating JS AST for "while" and "do-while" 2018-03-28 20:33:22 +03:00
Zalim Bashorov 52e2fb7a4e [JS IR BE] Add generating JS AST for "when" 2018-03-28 20:33:22 +03:00
Zalim Bashorov d46bba1521 [JS IR BE] Support must of kinds of constants except Long and Char 2018-03-28 20:33:22 +03:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Zalim Bashorov 68457a55a8 [JS IR BE] support more constructions:
* generate declaration for top level properties
* basic support for calls
* break
* continue
* throw
* generate declaration for local vals and vars
2018-03-20 22:44:29 +03:00
Zalim Bashorov 560e35174b Minor: renames
IrElementToJsNodeTransformer -> BaseIrElementToJsNodeTransformer
IrFileTransformer -> IrFileToJsTransformer
IrModuleTransformer -> IrModuleToJsTransformer
2018-03-20 22:44:29 +03:00
Zalim Bashorov e0a070ff35 [JS IR BE] basic compiler 2018-03-20 22:44:27 +03:00
Zalim Bashorov bef7b5389b Create ir/backend.js module with dummy compiler 2018-03-20 22:44:26 +03:00