Commit Graph

138 Commits

Author SHA1 Message Date
Artem Kobzar bff433f4e9 [K/JS] Support eager initialization for per-file granularity 2023-09-06 09:27:28 +00:00
Alexander Korepanov d0e4515ec1 [JS IR] Materialize all JsCompositeBlock
^KT-60667 Fixed
2023-08-01 12:22:17 +00:00
Artem Kobzar 64158a8a2f [K/JS] Add file-to-file compilation ^KT-6168 Fixed 2023-06-22 18:23:45 +00:00
Artem Kobzar 039b5fca7a [K/JS] Use declared upper-bound types for parameters inside inlined functions body, instead of the provided types 2023-06-20 12:01:28 +00:00
Artem Kobzar 669efc781d [K/JS] Import @JsModule declarations without asterisk 2023-05-11 12:39:57 +00:00
Artem Kobzar 948c511284 [K/JS] Rework ES modules part with squashed JsImport and right renaming strategy inside import/export statements 2023-03-16 10:28:39 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Sergej Jaskiewicz 8efa72ca36 [JS] Make sourcemaps more precise wrt JS syntax
- Generate mappings for function parameters
- Don't generate debug info for dots in qualified references
- A location of a JsNameRef is considered the start of the rightmost
  name
2022-11-09 12:35:44 +00:00
Artem Kobzar 14e4febb05 [K/JS] Exclude default from the regular reserved keywords to give ability to export declarations with default export ^KT-54480 Fixed
fix(KT-54480): exclude default from the regular reserved keywords to give ability to export intities with default export.

Merge-request: KT-MR-7459
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-24 10:12:30 +00:00
Sergej Jaskiewicz a939f9ccd0 [JS IR] Improve debug info precision for blocks
Namely:
- Generate debug info for closing braces, which allows the breakpoints
  set on closing braces to be hit
- Generate debug info for 'if' and 'try/catch' statements.

KT-46276
2022-10-18 14:31:14 +00:00
Sergej Jaskiewicz d9681caf0c [JS IR] Generate 'names' entries for functions in sourcemaps 2022-10-14 10:09:40 +00:00
Sergej Jaskiewicz 1d0025c3cf [JS] Support the 'names' field in sourcemaps 2022-10-14 10:09:39 +00:00
Artem Kobzar de880ce9aa [K/JS] Move ES modules logic to a new transformer with IC 2022-10-13 07:32:44 +00:00
Ilya Goncharov eed994f1fe [Gradle, JS] Correct require relative path 2022-09-21 10:58:20 +00:00
Sergej Jaskiewicz 7874b1fcad [JS] Rename JsLocation.identityObject to fileIdentity 2022-09-09 11:02:25 +00:00
Alexander Korepanov 14b7db0187 [JS IR] Optimize JS AST metadata memory consumption 2022-09-05 11:15:54 +00:00
Alexander Korepanov c747d0e742 [JS IR] Optimize JS AST blocks memory consumption 2022-09-05 11:15:54 +00:00
Alexander Korepanov ea34e10b67 [JS IR] Optimize JS AST scopes memory consumption 2022-09-05 11:15:54 +00:00
Alexander Korepanov bf53273b84 [JS IR] Cache JsLocation objects and js function signatures
Memory consumption optimization
2022-09-05 11:15:53 +00:00
Sergej Jaskiewicz 746c1b5903 [JS] Add toString() override to JsPropertyInitializer
This doesn't affect js2string, but is convenient for debugging
2022-08-22 23:15:52 +00:00
Artem Kobzar e790607af5 feat(KT-51123): save comments from js-function call inside arguments list. 2022-06-13 12:58:18 +00:00
Artem Kobzar 8bc5508f5c fix(KT-52339): add newlines to SourceMap to calculate multiline comments in a right way. 2022-05-20 13:35:54 +00:00
Artem Kobzar a2b40acc98 feat: add WARNING on usage top-level exportable declarations with non-consumable identifiers. 2022-05-04 11:22:57 +00:00
Artem Kobzar 333440dfc6 fix: function inlining without blocks for else statement. 2022-04-20 09:28:45 +00:00
Artem Kobzar fc4c745cc4 chore: remove usage of globalscope declaration. 2022-04-11 20:33:20 +00:00
Artem Kobzar f142599243 feat: add limited support of comments inside js call. 2022-04-11 17:03:28 +00:00
Artem Kobzar 45e3c94a8b feat: add limited support of comments inside js call. 2022-04-11 14:25:46 +00:00
Artem Kobzar 12f337f63d chore: fix meterialize argument annotation. 2022-04-11 10:37:19 +00:00
Artem Kobzar d46db2a9f3 fix: block statements rendering. 2022-04-11 10:37:18 +00:00
Artem Kobzar 7ef14fc11b chore: use CompositeBlock instead of GlobalBlock. 2022-04-11 10:37:14 +00:00
Artem Kobzar c6136619d2 chore: remove unreadable blocks and use comments instead. 2022-04-11 10:37:13 +00:00
Artem Kobzar 804eb61bf0 feat: add polyfills insertion for ES Next used features 2022-02-16 10:49:11 +00:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Artem Kobzar 979e9f94ef feat(Escaped Identifiers): add ability to use any symbol wrapped in back ticks. 2021-10-29 17:55:59 +00:00
Dmitriy Novozhilov f26059a7d3 [FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
^KT-46860
2021-10-27 16:28:37 +03:00
Anton Bannykh 936383254a [JS IR] explicitly mark JsName's temporary or not 2021-10-15 20:14:49 +03:00
Svyatoslav Kuzmich 3f8dce4b53 [JS IR] Support per-file mode and ES modules 2021-10-12 23:29:39 +03:00
Sergej Jaskiewicz 1f0b691ab6 [JS] Fix some JS prettyprinting
- Print a newline after `default` case in `switch`es
- Print a newline after `if` blocks without corresponding `else` blocks
2021-10-12 13:38:56 +00:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Zalim Bashorov 340512e27a [KJS] Throw exception on recursive types provided to typeOf and provide proper support later within KT-40173
#KT-38140 fixed
2020-07-14 14:14:13 +03:00
Anton Bannykh da79f93c61 JS IR: per-module .js generation support 2020-06-26 17:55:33 +03:00
Vitaly 18bd80eb29 [JS BE] add JsClass node to ast 2020-05-27 00:32:54 +03:00
Alexander Udalov 8dd04789ad Remove obsolete InlineStrategy
Replace corresponding metadata property in js.ast with Boolean. This
allows to get rid of dependency of 'js.ast' on 'frontend'.
2020-03-28 21:30:03 +01:00
Zalim Bashorov 83e85b3ec8 [JS AST] Add single line comment node 2019-11-21 23:51:08 +03:00
Zalim Bashorov 4e3a2a0b3e [JS AST] Don't generate a new line after try and if-then blocks 2019-11-21 23:51:08 +03:00
Svyatoslav Kuzmich 7592048437 [JS] Support typeOf 2019-09-25 18:12:55 +03:00
Roman Artemev 46b98a1e98 [JS BE] Make sourceMap generation more precise
- Don't produce mapping for closing bracket in case of expressionBody
 - Map Kt*Function declaration into corresponding js fun declaration
 - Update test data & add new test
2019-07-24 18:56:40 +03:00
Svyatoslav Kuzmich 685597d20a [JS IR BE] Codegen class model refactorings
Reduce JsScope usage
2019-07-01 18:55:41 +03:00
Anton Bannykh fadeac083f JS: fix reified T::class for primitive T (e.g. Int) (KT-32215 fixed) 2019-06-28 13:49:22 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00