13 Commits

Author SHA1 Message Date
Alexander Korepanov 6df0e0c847 [JS FIR] Enable FirJsLineNumberTests for FIR
^KT-64426 Fixed
2024-01-10 19:02:15 +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
Alexander Korepanov 79d378f2bd [JS IR] Perform optimizations on the generated JS code
The patch adopts and reuses the optimizations from the legacy backend.

The optimizations remove useless temporary variables,
statements and simplify generated JS code.

The optimizations can be disabled by `-Xoptimize-generated-js=false`.

Related to KT-51139
2023-04-18 12:49:33 +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
Artem Kobzar fc4c745cc4 chore: remove usage of globalscope declaration. 2022-04-11 20:33:20 +00:00
Sergej Jaskiewicz e0dcb0975a [JS IR] Enable line number tests for JS IR 2022-03-28 21:47:43 +00: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
Anton Bannykh cd0fd569b4 JS: visit tests and main in import remover; update line numbers 2019-02-14 15:14:28 +03:00
Alexey Andreev 61ba6e528a Fix JS line number tests 2017-09-04 15:33:06 +03:00
Alexey Andreev 64f335380f Provide more source map info about statements in JS tests 2017-07-06 10:20:45 +03:00
Alexey Andreev 1e74325c52 Generated source map for JS function's closing curly bracket 2017-07-06 10:20:44 +03:00
Alexey Andreev bf21cfd6e0 Use source map remapper in JS inliner 2017-06-07 11:13:55 +03:00