Anton Bannykh
3a258ad08a
JS: fix module references in case of @JsModule annotation
2019-02-14 15:14:28 +03:00
Anton Bannykh
a1649e9e4d
JS: fix import cleaner
...
The tag generated during the source file translation could differ from
the tag generated based on the import statement (e.g. "intrinsic:..."
during generation becomes "'Kotlin'...." later on).
This means that the same function imported from the start and imported
during inlining has different tags. Which makes duplicate import removal
trickier. The best solution would be to make sure the tag generation
algorithms are consistent.
Current solution: rewrite the tags in terms of the Inliner tag
generation algorithm right after the source file translation.
Also it seems that some `var` statements we treated as imports, even
though they were not. Supported this behavior for now.
TODO: Get rid of these workaround
2019-02-14 15:14:28 +03:00
Anton Bannykh
a30c7fbee1
JS: Support imported wrapper serialization
2019-02-14 15:14:28 +03:00
Anton Bannykh
2cbdc7ecb0
JS: store whole JsImportedModule's in the module local alias
...
Module references were stored as plain JsName's. When inlining a function
from one fragment to another, those references should be re-interpreted
in terms of the destination fragment. Storing the whole module information
makes that much easier.
2019-02-14 15:14:28 +03:00
Anton Bannykh
a0ff581a2f
JS: refactoring
2019-02-14 15:14:28 +03:00
Anton Bannykh
6d26bf9622
JS: don't load binary AST unless required by the inliner
2019-02-14 15:14:28 +03:00
Anton Bannykh
c83b6d46cc
JS: split JsInliner
2019-02-14 15:14:28 +03:00
Anton Bannykh
c65383fa3f
JS: postpone JS AST merging
2019-02-14 15:14:28 +03:00
Anton Bannykh
039625bb7e
JS: convert K2JSTranslator to Kotlin
2019-02-14 15:14:28 +03:00
Anton Bannykh
1052ec898c
JS: review fixes (mostly tests)
2019-02-14 15:14:28 +03:00
Anton Bannykh
3529114913
JS: incremental translation of tests and main fun invocation
2019-02-14 15:14:28 +03:00
Svyatoslav Kuzmich
cfde97a7a0
[JS IR BE] Support nested external classes
2019-02-12 18:45:35 +03:00
Svyatoslav Kuzmich
0ff23544fc
[JS IR BE] Initial support for mudule wrapper generation
2019-02-12 18:45:35 +03:00
Svyatoslav Kuzmich
d8b1d09566
[JS IR BE] Support codegen for external objects and properties
2019-02-12 18:45:35 +03:00
Mikhael Bogdanov
a122cba862
Switch Kotlin project to jvm-target 1.8
...
#KT-29405
2019-01-31 07:43:05 +01:00
Svyatoslav Kuzmich
24ab36616e
[JS] Fix runtime file order in runIrTestInNode.js
2019-01-29 19:06:31 +03:00
Anton Bannykh
b1f6a05aa0
JS: fix incremental suspend inline test (KT-29360 fixed)
2019-01-29 13:16:39 +03:00
Anton Bannykh
5c7072ec44
JS: add incremental suspend inline test
2019-01-29 13:16:39 +03:00
Sergey Rostov
0f2fb4ff82
Build: remove intellijCore/annotations.jar usages
2019-01-28 13:43:08 +03:00
Svyatoslav Kuzmich
8fbf1ed683
[JS IR BE] Unmute tests
2019-01-24 23:05:56 +03:00
Svyatoslav Kuzmich
29eb3c745c
[JS IR BE] Support two versions of test runtime: full and reduced
2019-01-24 16:14:40 +03:00
Svyatoslav Kuzmich
aa811dcfb3
[JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests
2019-01-24 16:14:40 +03:00
Svyatoslav Kuzmich
c92a6f9ca2
[JS IR BE] Unmute inlineClasses tests
2019-01-16 12:11:28 +03:00
Denis Zharkov
949214c10b
Refactor bridges generation for JVM
...
Make a separate subclass for DescriptorBasedFunctionHandle
to allow customize the behavior without complex abstract concepts
like `areDeclarationAndDefinitionSame`
2019-01-14 14:54:18 +03:00
Roman Artemev
d35b20f764
[JS IR BE] Implement private members lowering to extract private methods from class and transform them into static function
...
* fix kotlin.Long
* update tests
2019-01-11 20:28:04 +03:00
Pavel Punegov
dc8cb103c5
Replace class instantiation with object in JS tests
2019-01-11 17:38:58 +03:00
Ilmir Usmanov
8a01da6ec6
Support val initialization in non-inline function with EXACTLY_ONCE effect
...
by generating a box for the value.
#KT-26126 Fixed
2018-12-28 15:09:11 +03:00
Sergey Rostov
883970fadb
Add explicit dependencies to nullable annotations
2018-12-26 09:07:06 +03:00
Marcin Moskala
686cfa6fd2
Fix common misspellings
2018-12-21 16:13:42 +03:00
Roman Artemev
e436e7cf61
[JS IR BE] Support call super with default parameters
2018-12-18 15:55:09 +03:00
Roman Artemev
2b436b493c
Move test from js to common part
2018-12-11 16:11:01 +03:00
Roman Artemev
4e05be9a96
Update tests
2018-12-07 17:58:20 +03:00
Leonid Startsev
b775501042
Translate KClass references to built-in types in serialization plugin correctly.
...
Add overload with ClassDescriptor to `getPrimitiveClass` translation function and increase it visibility to public to be usable from plugin.
2018-12-05 15:16:15 +03:00
Roman Artemev
c5922bf74b
Refact stdlib generator, add support for different backends
...
[JS IR BE] Runtime fixes
* Do not generate external declarations for IR BE
* Move `arrayToString` helper function out of shared JS stdlib
* Fix arrays type check for IR BE
2018-11-29 22:04:53 +03:00
Ilya Gorbunov
beec6a7c4a
Update line numbers after reformatting coroutines stdlib sources
2018-11-28 06:05:03 +03:00
Nikolay Krasko
2284028bbe
Add bodyBlockExpression() helper function to KtDeclarationWithBody
2018-11-12 13:38:28 +03:00
Roman Artemev
8f2117685f
[JS BE] Support contracts in JS Fix KT-27946
2018-11-08 17:35:06 +03:00
Dmitry Petrov
b5664755c8
Minor: remove IGNORE_BACKEND for passing JS_IR tests
2018-11-08 12:29:15 +03:00
Anton Bannykh
829bdf6061
JS: fix noInline version of inline suspend fun (KT-27611 fixed)
2018-11-07 12:34:00 +03:00
Anton Bannykh
59009430e5
JS: report inline suspend functions to IC
...
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Anton Bannykh
5dae00182d
JS: fix suspend lambda inlining
...
* Also avoid casts when setting inline metadata
2018-11-07 12:07:02 +03:00
Anton Bannykh
4c5201d30e
JS: fix module parameter linking
2018-11-07 12:06:09 +03:00
Roman Artemev
7f215d3f52
Update tests
2018-11-01 16:51:38 +03:00
Alexander Udalov
911420d823
Minor, move InlineOnly-related utilities to frontend
2018-10-31 17:21:06 +01:00
Roman Artemev
fb499def59
Update tests
2018-10-25 15:49:21 +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
59b1743c37
Add tests
2018-10-25 15:48:42 +03:00
Roman Artemev
7cb202934c
Update tests
2018-10-25 15:48:42 +03:00
Alexander Udalov
1ee1d15b91
Support annotations on property accessors in JS/common metadata
...
#KT-14529 Fixed
2018-10-24 18:17:12 +02:00
Anton Bannykh
b83df18e22
[JS IR BE] make default argument lowering support per-file mode
2018-10-19 23:49:18 +03:00