Commit Graph

6489 Commits

Author SHA1 Message Date
Artem Kobzar ba738cbbff feat: add ability to create nested entities inside object. 2022-06-22 11:59:13 +00:00
Pavel Mikhailovskii 3766698081 KT-52743 IR: Fix null checks in Elvis operators 2022-06-22 09:11:24 +00:00
Dmitriy Novozhilov b73783b693 Add test for KT-52580 2022-06-21 14:10:37 +00:00
Sergej Jaskiewicz da7ff5b868 [JS IR] Fix replacing super.toString() call with a runtime function call
#KT-52553 Fixed
2022-06-16 10:03:14 +00:00
Sergej Jaskiewicz f2111c9dc8 [JS] Add some helpful documentation regarding testing to the readme. 2022-06-16 10:02:06 +00:00
Sergej Jaskiewicz 30b47b6902 [JS] Use absolute paths in sourcemaps for tests 2022-06-16 10:02:05 +00:00
Sergej Jaskiewicz 53233c487e [JS] Factor out source map path rewriting 2022-06-16 10:02:05 +00:00
Sergej Jaskiewicz 0320d49ddc [JS IR] Generate sourcemaps for JS IR tests 2022-06-16 10:02:04 +00:00
Steven Schäfer 194a1d1c6a JVM IR: Start fake variables for default lambdas after initialization
KT-52702
2022-06-15 16:49:22 +02:00
Alexander Korepanov 9e780afdca [JS IR] Rework incremental cache invalidation
Replace loading the whole world IR with loading only exported (reachable) IR.

 For that purpose the direct and inverse dependency graph is used.
 It is stored in a cache directory and the cache updater keeps it up to date.
 If after loading it is found that other files must be also implicitly rebuilt
 (see rebuilt reasons below), IR for that files also will be loaded.
 This algorithm repeats until the number of implicitly rebuilt files is not 0.

 More rebuilt reasons (dirty state) have been added:
  - added file: this is a new file;
  - modified ir: ir of the file has been updated;
  - updated exports: exports from the file have been added or removed
    (e.g. a function has been used from another file);
  - updated inline imports: imported inline function has been modified
    (transitively);
  - removed inverse depends: a dependent file has been removed;
  - removed direct depends: a dependency file has been removed;
  - removed file: this file has been removed.

 Incremental cache tests has been refactored:
  - The supporting of all rebuilt reasons (dirty states) has been added;
  - New file name format "*.$suffix.kt" for the test steps has been allowed,
    so the syntax highlight works now;
  - Explicit stdlib dependency usage has been removed.
2022-06-13 20:04:05 +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
Mikhael Bogdanov 3d1bde470b Regenerate tests 2022-06-13 11:58:15 +02:00
pyos a1f0c6208c Add a test from KT-51950 2022-06-13 11:58:15 +02:00
Pavel Mikhailovskii bcd8a28d4c KT-47823 IR.JVM Fix handling of for loop ranges with inline types and break/continue/return 2022-06-10 18:42:28 +00:00
Steven Schäfer dbb6144ab0 JVM IR: Avoid boxing in generic floating point equality (KT-48635) 2022-06-08 15:38:06 +02:00
Igor Yakovlev 3abcd84802 [WASM] Fix Kotlin.Test box tests 2022-06-07 20:59:03 +00:00
Igor Yakovlev f996278171 [WASM] Support for mjs universal launcher 2022-06-07 20:59:03 +00:00
Pavel Mikhailovskii 65b2cee913 KT-23397 Optimize out field for property delegate when it's safe (JVM) 2022-06-07 10:46:01 +00:00
Nikolay Lunyak 8d2868da32 [FIR JS] Regenerate tests
вфцвфдцьв
2022-06-02 13:47:34 +00:00
Nikolay Lunyak da8a8a8988 [FIR JS] Add a Fir2IrJsText runner 2022-06-02 13:47:30 +00:00
Nikolay Lunyak 994e2970c7 [FIR JS] Suppress EQUALITY_NOT_APPLICABLE 2022-06-02 13:47:30 +00:00
Nikolay Lunyak 0e549e3329 [FIR JS] Suppress INVISIBLE_REFERENCE 2022-06-02 13:47:27 +00:00
Nikolay Lunyak 5e97a36680 [FIR JS] Ignore tests with unsupported features 2022-06-02 13:47:26 +00:00
Nikolay Lunyak bdc3b5fe6f [FIR JS] Mute 170 failing multi-module tests 2022-06-02 13:47:24 +00:00
Nikolay Lunyak ccc72e5125 [FIR JS] Add a FirJsTest runner
Note: 763/1627 failed tests
- 170 are multi-module tests which can be ignored for now
2022-06-02 13:47:24 +00:00
Nikolay Lunyak 9a9beef25b [FIR JS] Prepare the infrastructure for FIR JS tests 2022-06-02 13:47:24 +00:00
Ilmir Usmanov f922684169 Minor. Add regression test
#KT-52561 Fixed
2022-06-02 13:26:24 +00:00
Denis.Zharkov c1904004c4 FIR: Fix case when smartcast receiver is used for call to private method
^KT-54432 Fixed
2022-06-01 16:02:30 +00:00
Sergej Jaskiewicz 58e2652ba6 [JS IR] Test in-line anonymous functions with extension functions 2022-06-01 09:02:32 +00:00
Sergej Jaskiewicz e03747ea7d [JS IR] Introduce the GENERATE_INLINE_ANONYMOUS_FUNCTIONS feature flag 2022-06-01 09:02:31 +00:00
Sergej Jaskiewicz c10af22b27 [JS IR] Lower lambdas into in-line anonymous functions when possible
Previously we always generated factories for contextful lambdas:

```kt
fun foo(a: Int) = { a }
```

```js
function foo(a_38) {
  return foo$lambda(a_38);
}

// factory!
function foo$lambda($a) {
  return function () {
    return $a;
  };
}
```

After this patch, the generated code for `foo` is more concise:

```js
function foo(a) {
  return function() { return a; };
}
```
2022-06-01 09:02:30 +00:00
Victor Petukhov 96d1f89836 [BE] Support until operator in back-ends 2022-05-31 08:42:56 +00:00
Victor Petukhov 2378979a99 [FE JS] Support until operator in WRONG_OPERATION_WITH_DYNAMIC error 2022-05-31 08:42:55 +00:00
Pavel Mikhailovskii 2ceccec2b8 KT-52551 Create a static initialization section in case of delegation to a property reference from a file class 2022-05-30 14:16:18 +00:00
Ivan Kochurkin 0ef043b074 [FIR2IR] Consider property init value from nested class, ^KT-52057 Fixed 2022-05-29 23:41:23 +03:00
Victor Petukhov 0199c76c06 [FE 1.0] Check callable reference return type safety during resolution
^KT-51844
^KT-52503 Fixed
2022-05-27 13:56:34 +00:00
Victor Petukhov 51551998c7 Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Victor Petukhov b411eb36e8 [FE 1.0] Take care standalone lambdas during updating types in the builder inference
^KT-50520 Fixed
2022-05-27 13:56:32 +00:00
Sergej Jaskiewicz e9db050245 [JS] Optimize resolving paths when building source maps
`File.getCanonicalFile` follows symlinks, that is not necessary.
2022-05-26 16:32:07 +00:00
Sergej Jaskiewicz 375c13cd7e [JS] Add a doc comment for SourceMapLocationRemapper 2022-05-26 16:32:06 +00:00
Sergej Jaskiewicz 0614c519af [JS] Convert SourceFilePathResolver to Kotlin, fix usages 2022-05-26 16:32:05 +00:00
Sergej Jaskiewicz 4bf79cd23b Rename SourceFilePathResolver.java -> SourceFilePathResolver.kt 2022-05-26 16:32:04 +00:00
Dmitriy Novozhilov c777ecd470 [JS] Unmute tests due to fixed KT-52339 2022-05-23 12:04:37 +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
Svyatoslav Kuzmich 84ed3ff5b0 [Wasm] Don't generate wat format by default in box tests
Gives ~15% tests speedup
Use kotlin.wasm.debugMode=1 to enable old behaviour
2022-05-20 13:34:28 +00:00
Svyatoslav Kuzmich d1c81eb6ba [Wasm] Support Wasm GC milestone 5 2022-05-20 12:22:43 +03:00
Georgy Bronnikov 39bba7973c Fir2Ir: create file level signatures where appropriate
This is godugly code, where a flag for file level signatures is passsed
around.
An alternative would be not to create file level signatures for toplevel
private clases, since those still need unique names, at least on JVM.
But that would break binary compatibility.
Signatures are due for overhaul anyway. Hopefully this code can be
reverted at that point.
2022-05-19 12:02:43 +02:00
Ivan Kylchik f3252334b2 Move most of ir utils from backend.common to ir.tree 2022-05-18 21:20:03 +03:00
Ivan Kylchik 4ddbb89103 [JS] Manually change receiver's type of Char's equals method
Char's equals method in js doesn't work properly because now equals
method is not fake override in Char, but it is actual override and so
when we call equals for some char in js, it will not be boxed. To fix
it we need to get correct receiver's type.
2022-05-18 21:19:54 +03:00
Dmitriy Dolovov deb9039b0f [IR][tests] Add tests for IR linkage issues related to properties 2022-05-18 18:05:05 +03:00