Commit Graph

38696 Commits

Author SHA1 Message Date
Mikhail Glukhikh 1938438fa1 FIR: save/restore tower data contexts during resolve jumps
#KT-50278 Fixed
2021-12-21 10:45:36 +00:00
Mikhail Glukhikh f3f63a458b Make FirRegularTowerDataContexts immutable, SpecialTower.. just a storage 2021-12-21 10:45:35 +00:00
Mikhail Glukhikh 87e11c0f42 FirTowerDataContext parts: split into regular and special 2021-12-21 10:45:35 +00:00
Mikhail Glukhikh 25f30cb3a9 FIR: add resolve test for potential local scope problems 2021-12-21 10:45:34 +00:00
Mads Ager b5b1b38cb0 [FE] Do not repeatedly load inner classes from class files.
Java protobufs generate a lot of inner classes and when compiling
Kotlin wrappers for those Java protobufs the inner classes can
be loaded hundreds of times leading to out of memory. This change
avoids reloading by fixing a bug in the cache implementation that
caused inner classes to not be cached.
2021-12-21 13:23:48 +03:00
Anastasia.Shadrina ea33da3a8d [FE] Fix: do not report ambiguous label if label map is empty 2021-12-21 10:41:46 +03:00
Dmitry Petrov 8905586cbb IR KT-50258 rewrite enum-based 'when' more carefully 2021-12-21 06:06:45 +00:00
Roman Artemev e17f121b23 [JS REPL] Extract JS script/repl parts into separate module
- don't load js evaluation plugin in CLI compiler
2021-12-21 04:15:11 +03:00
Kristoffer Andersen 91e65edf86 [EE-IR] Minor: Refactor EvaluatorFragmentInfo
Part of migration to new constructor signature.

Unblocked by intellij-community#1839.
2021-12-20 19:04:19 +01:00
Alexander Udalov 6acb0c3d06 CLI: load module-info from META-INF/versions/... for any version
Not just 9, since at least some libraries are putting module-info to
META-INF/versions/11 nowadays.

 #KT-48027 Fixed
2021-12-20 18:59:07 +01:00
Alexander Korepanov b82c306530 [JS IR] Add deep copying for callable reference
Perform a deep copy of callable reference adapter on inline lowering

^KT-49844 Fixed
2021-12-20 14:02:11 +00:00
Dmitry Petrov 976998b56c PSI2IR KT-49526 function reference type approximation hack 2021-12-17 21:06:24 +00:00
Vyacheslav Gerasimov 5369813acc Fix "IdeaWin64.dll not found" error when running tests on Windows 2021-12-17 21:28:10 +03:00
Svyatoslav Scherbina 3fd4d90cca Native: remove harmful assertions from NaiveSourceBasedFileEntryImpl
These assertions checked that nobody requests line and column number
for the UNDEFINED_OFFSET.
But diagnostic and crash reporting tools might request line and column,
and crashing during crash reporting is not great.

So handle UNDEFINED_OFFSET gracefully instead, in a conventional manner.
2021-12-17 14:49:34 +00:00
Artem Kobzar ab7615adaf fix: fake override on interfaces. 2021-12-17 14:22:46 +00:00
Dmitry Petrov 0805916564 IR KT-47483 handle 'Nothing' in array constructor call 2021-12-17 13:43:59 +03:00
Pavel Kunyavskiy c9e9cbb62d [K/N] Fix vtable generation for nested suspend function inheritance
^KT-50304
2021-12-17 10:30:48 +00:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 049066f8ac Replace systemIndependentPath from Idea with invariantSeparatorsPath 2021-12-16 21:48:21 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Vyacheslav Gerasimov 156ecce961 Build: Fix unconditional adding kotlin-reflect.jar for JPS build
Should be added only when JPS build enabled to avoid kotlin-reflect
reindexing after each build
2021-12-16 21:48:18 +03:00
Dmitry Petrov 8c71e38c92 JVM_IR KT-49765 bridge for throwing stub should just throw UOE 2021-12-16 21:07:12 +03:00
Victor Petukhov e50e055eb4 [FE 1.0] Don't try to compute value parameters for variables while creating a flat signature for the overload resolution
^KT-50172 Fixed
2021-12-16 17:46:01 +03:00
Dmitry Petrov ab9747ed6d JVM_IR KT-50277 skip temporary var elimination on inline suspend lambda 2021-12-16 06:40:22 +00:00
Alexander Udalov 6807ed6642 Do not write version requirements for suspend functions
Coroutines are a stable feature since 1.3. Version requirement on
suspend functions, or functions mentioning suspend function types in the
signature, was needed to prevent older compilers from reading metadata
that they can't properly use. It's not needed anymore because a newer
metadata version prevents older compilers from reading any metadata
altogether.

Also, computing isSuspendOrHasSuspendTypesInSignature took ~0.5% of
backend time on compilation of intellij (related to KT-48233).
2021-12-15 22:27:51 +01:00
Simon Ogorodnik 8b23d86bd9 Treat mixed (subtyping, inference) sub-types properly in CST 2021-12-15 22:23:18 +03:00
Victor Petukhov b3943f5ab6 [FE 1.0] Process builder inference stub types with different nullability properly
^KT-49887 Fixed
2021-12-15 22:23:18 +03:00
Simon Ogorodnik 32a80bf38e FIR: Add fast-path for getOrderedAllTypeVariables if no synthetics 2021-12-15 22:23:16 +03:00
Simon Ogorodnik 8cf97127fe Add util for safe registration of type variables in constraint system 2021-12-15 22:23:16 +03:00
Simon Ogorodnik 9e8727e6a8 FIR Minor: Reformat 2021-12-15 22:23:14 +03:00
Simon Ogorodnik 1593dd2514 FIR: Remove recursive processAllContainingCallCandidates 2021-12-15 22:23:14 +03:00
Simon Ogorodnik bb13583862 FIR: Rename stub type for builder inference 2021-12-15 22:23:13 +03:00
Simon Ogorodnik 1a288fcdcd FIR: Lookup contained postponed atoms recursively in delegate inference 2021-12-15 22:23:13 +03:00
Simon Ogorodnik 26b158bded FIR: Update test-data (Delegate inference) 2021-12-15 22:23:12 +03:00
Simon Ogorodnik 951eebcd68 FIR: Do not invert order of synthetic variables 2021-12-15 22:23:11 +03:00
Simon Ogorodnik df9da371cb FIR: Fix synthetic type variables to independent stub types 2021-12-15 22:23:11 +03:00
Simon Ogorodnik 580410863f FIR: Allow to create synthetic variables during stub creation 2021-12-15 22:23:10 +03:00
Simon Ogorodnik c3c4404bc5 FIR: Use only successful calls for constraints in delegate inference 2021-12-15 22:23:10 +03:00
Simon Ogorodnik 64944a1247 FIR: Register type variables properly in builder inference 2021-12-15 22:23:09 +03:00
Simon Ogorodnik 0d9ed6990e FIR: Build currentConstraintStorage for delegate inference incrementally 2021-12-15 22:23:08 +03:00
Mikhail Glukhikh a4df0aaa7d FIR: Add test 2021-12-15 22:23:08 +03:00
Mikhail Glukhikh 2338281889 FIR: Add test for get class + let in delegation 2021-12-15 22:23:07 +03:00
Simon Ogorodnik 1c8b6dccff FIR Tests: Fix modularized tests dependencies for html dump 2021-12-15 22:23:06 +03:00
Simon Ogorodnik 8f9fd76254 FIR: Remove unused FirInferenceSession.addErrorCall 2021-12-15 22:23:06 +03:00
Simon Ogorodnik 11ec23e5dc FIR: Make synthetic type variables fix to self-stub type if no info 2021-12-15 22:23:05 +03:00
Mikhail Glukhikh 8ae37a3dd2 FIR: Attempt to cache constraint storage in delegate inference 2021-12-15 22:23:04 +03:00
Mikhail Glukhikh 9aced1c33d FIR: Update test-data (Delegate inference) 2021-12-15 22:23:04 +03:00
Mikhail Glukhikh 1e41ec7d22 FIR: replace ConeComposedSubstitutor with ChainedSubstitutor 2021-12-15 22:23:03 +03:00
Simon Ogorodnik 52145e0623 FIR: Respect nullability when substituting stub types 2021-12-15 22:23:02 +03:00