Commit Graph

92862 Commits

Author SHA1 Message Date
Nikolay Lunyak c8ef427421 [FIR JS] Fix ConeDynamicType in asPsiType 2022-06-02 13:47:26 +00:00
Nikolay Lunyak d7e8dc65f5 [FIR] Update smartcast tests 2022-06-02 13:47:25 +00:00
Nikolay Lunyak 611691ec70 [FIR JS] Support smart casts for dynamic 2022-06-02 13:47:25 +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
Nikolay Lunyak d2a8942353 [FIR] Extract FirJvmConstDeserializer
Attempts to separate JVM and non-JVM entities more clearly.
2022-06-02 13:47:23 +00:00
Nikolay Lunyak be9e97d044 [FIR] Introduce ConeDynamicType 2022-06-02 13:47:23 +00:00
Nikolay Lunyak e763197c3e [FIR] Fix the use of local ClassIds 2022-06-02 13:47:22 +00:00
Ilmir Usmanov f922684169 Minor. Add regression test
#KT-52561 Fixed
2022-06-02 13:26:24 +00:00
Yahor Berdnikau 4a7a0126f2 Decrease Kotlin daemon autoshutdown timeout to 30 sec
Daemon spawned via buildSrc compilation is incompatible with other
compilations in Kotlin repo, as they use custom compiler classpath.

To reduce memory consumption (especially on CI), idle autoshutdown
timeout was reduced from default 2 hours to 30 seconds.
2022-06-02 13:16:54 +00:00
Alexander Likhachev e9a231e97e [Gradle, JS] Reuse yarn resolution results from configuration cache 2022-06-02 10:41:14 +00:00
Igor Yakovlev 6c5fdfe070 [WASM] Disable wasm std tests tc service output for local builds 2022-06-02 12:02:34 +02:00
Nikolay Lunyak 98c7399a35 [FIR] Remove the redundant backing field check
This commit fixes a failing visibility check
(FirSymbolByPsiTestGenerated.testBackingField) for the backing field.

Merge-request: KT-MR-6389
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2022-06-02 08:36:14 +00:00
Denis.Zharkov 461d91a10e FIR: Rework checking dispatch receivers applicability
Using `ownerLookupTag` might be wrong in case of private constuctors
 of inner classes: their owner is an Inner class, but expected
 dispach receiver is Outer
2022-06-01 16:02:31 +00:00
Denis.Zharkov 67e6687e89 FIR: Fix FP error on a call to constructor of a private inner class
Do not check dispatch receiver applicability when checking visibility
for containing class of a callee constructor
2022-06-01 16:02:30 +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
Denis.Zharkov ccc32b4e3b FIR: Refine visibility check for private methods defined in a class
- use-site should be contained within the class that owns callee symbol
- class-representative of dispatch receiver value
should be exactly the same as a container class of a callee (not its subtype)
2022-06-01 16:02:29 +00:00
Mads Ager ddb140cc51 [K/N] Add splay benchmark based on the V8 Benchmark Suite.
The benchmark constructs a splay tree, measures the time it takes
to performs a number of insertions and removals, and after
measurements validates that the splay tree is valid.
2022-06-01 14:14:15 +00:00
Pavel Mikhailovskii 3b5179686e KT-52592 Fix NPE from KProperty.getExtensionDelegate on property delegated to another property; make $delegate methods private 2022-06-01 14:02:28 +00:00
Troels Bjerre Lund 315501debf [Native] Include base plugin
Using a standard plugin beats custom tasks.
2022-06-01 13:00:43 +00:00
Troels Bjerre Lund 5410655266 [Native] Add clean task to K/N:endorsedLibraries
Currently, :kotlin-native:endorsedLibraries does not have its build
directory deleted during a clean.

This task should probably be inherited from a plugin instead, but it is
not clear to me which one.
2022-06-01 13:00:43 +00:00
Dmitriy Novozhilov db3c2d2ba0 Advance bootstrap to 1.7.20-dev-1687 2022-06-01 12:12:01 +00:00
Roman Golyshev e72f8f829a [FIR] More special names unification 2022-06-01 11:56:39 +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
Sergej Jaskiewicz 5b61e60f2f [JS IR] Support IrFunctionExpression in jsBind intrinsic 2022-06-01 09:02:29 +00:00
Roman Golyshev 9fe0f055c5 [FIR] Get rid of ensureResolvedForCalls completely
The problem that this function has been solving (resolving declarations
to a somewhat adequate resolve phase) should be solved in another place;
moreover, right now it is the only scope that uses that function, which
is non-consistent
2022-06-01 00:23:11 +04:00
Roman Golyshev 01ce499bb2 [FIR] Unify some special names to make code more uniform 2022-06-01 00:11:17 +04:00
Pavel Kirpichenkov 023def9d25 fixup! fixup! [MPP] Fix dependencies of a platform compilation source set 2022-05-31 16:47:37 +00:00
Pavel Kirpichenkov 4d023e873d [MPP] Fix dependencies of a platform compilation source set
Leave empty new visible source sets in a metadata transformation
for a platform (leaf) source set.

Motivation:
* Platform source sets should get their deps from the compilation
* Metadata dependencies in platform source set shouldn't be used
as transitive library dependencies won't be correct in this case

KT-52216
2022-05-31 16:47:36 +00:00
Victor Petukhov b472ccd358 [FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call 2022-05-31 14:13:29 +00:00
Victor Petukhov 848075192c [FE 1.0] Don't use BuilderInferenceSubstitutionConstraintPosition for declared upper bound constraint with no substituted upper bound
It leads to further infer type variable into those upper bounds which is forbidden

Substituted upper bounds is ok because specific substituted types came from constraints of other proper positions, or if specific substituted type is from declared upper bound too, then there should be another declared upper bound with no substitution

^KT-51464 Fixed
^KT-47986 Fixed
2022-05-31 14:13:28 +00:00
Mikhail Glukhikh c3b5d83f31 FE10 Analysis API: create 17 separate test data files for resolve 2022-05-31 11:34:59 +00:00
Mikhail Glukhikh a3db2e13b2 FE10 analysis API: render type parameter bounds as FIR does 2022-05-31 11:34:58 +00:00
Mikhail Glukhikh d792c7b70c Reference analysis API: add stub for ReadWriteAccessChecker to run tests 2022-05-31 11:34:57 +00:00
Mikhail Glukhikh 1ae71a20f3 FE10 analysis API: support reference resolve for labels & 'this' 2022-05-31 11:34:56 +00:00
Mikhail Glukhikh 8cb3081bbd Analysis API: add KtReference..Provider to fix reference resolve in FE10 2022-05-31 11:34:56 +00:00
Mikhail Glukhikh d67e910ee8 FE10 Analysis API: don't render override for deserialized 2022-05-31 11:34:55 +00:00
Mikhail Glukhikh f4510773d0 FIR analysis API: add workaround for java.io.Serializable type 2022-05-31 11:34:54 +00:00
Mikhail Glukhikh ef5cfab655 FE10 analysis API: don't count static members of final class as final 2022-05-31 11:34:53 +00:00
Mikhail Glukhikh 446ee943e2 FIR analysis API: fix rendering of Java-based types 2022-05-31 11:34:53 +00:00
Mikhail Glukhikh 125de59e09 FE10 analysis API: create receiver parameter symbols for 'this' 2022-05-31 11:34:52 +00:00
Mikhail Glukhikh d112ab3f17 FE10 analysis API: fix parentheses using while rendering receiver 2022-05-31 11:34:51 +00:00
Mikhail Glukhikh 564d179cfb FE10 analysis API: fix flexible type pretty-printing 2022-05-31 11:34:50 +00:00
Mikhail Glukhikh fa0faa33a5 FE10 analysis API: create package symbols properly 2022-05-31 11:34:49 +00:00
Mikhail Glukhikh 213445347d Fix PsiType for local class in FE10 Analysis API
After this commit,
Fe10IdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGenerated
test group passes
2022-05-31 11:34:48 +00:00
Mikhail Glukhikh ffc17bea55 Add SymbolLightClassFacadeCache to FE10 Analysis API configuration 2022-05-31 11:34:48 +00:00
Mikhail Glukhikh 8fce239209 Generate even more FE10 analysis API tests 2022-05-31 11:34:47 +00:00