Commit Graph

17 Commits

Author SHA1 Message Date
Ilya Kirillov 418903e9ef FIR IDE: Make KtReference class descriptors frontend independent
* The new idea-frontend-independent module created
* Moved KtReference and it inheritors to that module & implement them in idea-analysis module by using descriptors frontend
2020-06-09 16:19:12 +03:00
Alexander Udalov b6fdc96994 Reverse dependency 'psi' <-> 'frontend.common'
Move ParseUtils to 'psi', and ImportPath to 'frontend.common'.

Now 'psi' depends on 'frontend.common', and that allows to remove
dependency of 'fir:tree:tree-generator' on 'psi', allowing the former to
compile in parallel with the old frontend code.
2020-03-28 21:30:07 +01:00
Alexander Udalov 4dcd0d1cb6 Extract module 'config' out of 'frontend'
Also move deprecated TargetPlatform there. This allows to get rid of the
dependency cli.common -> frontend, and even on frontend.common.
2020-03-28 21:30:05 +01:00
Dmitry Savvinov f9b8ab3a3a [Resolve] Introduce CompositeResolver
This commit introduces CompositeResolverForModuleFactory, which should
work under so-called "composite resolution mode", where sources of all
all modules are analyzed in one global facade.

This allows to:
- avoid re-analyzation of common sources
- avoid retaining memory for all platforms (which can be very bad as
soon as we'll start distinguishing various flavours of platforms,
especially "flavours" of common platform)
- support running platform-specific checks in common modules (e.g.,
report JVM_PLATFORM_DECLARATION_CLASH if common sources are going to have
it)
- support analysis of shared platform modules, like commonNative

This mode heavily depends on so-called "type refinement" support in the
compiler, which is introduced in other series of commits.

In this commit, CompositeResolver and related codepaths are left unused.
Also, this commit misses several important pieces of logic in
resolvers-setup code, which should be different for CompositeResolver
- computation of 'firstDependency'
- computation of built-ins
- computation of modules owned by facade

They will be covered in the following commits
2019-07-30 12:41:40 +03:00
Dmitry Savvinov 29beed9b21 [Expect/Actual] Support matching of expect/actual in hierarchical MPP 2019-06-10 13:34:27 +03:00
Dmitry Savvinov 9d0f518d62 Rename PlatformDependentCompilerServices -> PlatformDependentAnalyzerServices 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 2caa1c3dd6 [Compatibility] Restore old TargetPlatform and subtypes for compatibility 2019-05-28 13:08:08 +03:00
Dmitry Savvinov 1606b3bf23 [Platform API] Make 'ModuleInfo.platform' non-nullable 2019-05-28 13:08:07 +03:00
Dmitry Savvinov d5fbe59a3e [Platform API] Introduce fundamental abstraction of Platform
This is a large commit, which introduces general API for working with
abstraction of Platform.

- Add new abstraction to 'core' - SimplePlatform - which represents
exactly one platform
  - Clients are strongly prohibited to create instances of SimplePlatform
  by hand, instead, corresponding *Platforms abstraction should be used
  (e.g. JvmPlatforms, JsPlatforms, KonanPlatforms)

- Move TargetPlatform to 'core', it represents now a collection of
SimplePlatforms
  - Clients are strongly encouraged to use TargetPlatform
    (not SimplePlatform) in API, to enforce checks for multiplatform

- Provide a helper-extensions to work with TargetPlatform
(in particular, for getting a specific component platform)

- Remove MultiTargetPlatform in favour of TargetPlatform
  - Notably, this commit leaves another widely used duplicated abstraction,
    namely, IdePlatform. For the sake sanity, removal of IdePlatform is
    extracted in the separate commit.
2019-05-28 13:08:07 +03:00
Dmitry Savvinov 451d14e504 [Platform API] Minor: move some classes to separate files 2019-05-28 13:08:07 +03:00
Dmitry Savvinov bf51a402b9 Remove deprecated method 2019-05-28 13:08:06 +03:00
Dmitry Savvinov f2a0a809f1 [Platform API] Split TargetPlatform into lightweight TargetPlatform and CompilerServices
This decouples simple data (TargetPlatform) from other subsystem-specific
logic (like default imports, built-ins, etc.).

Aside from purely aesthetic improvements, it also makes it easier
to move 'TargetPlatform' into core (see next commits)
2019-05-28 13:08:06 +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
Mikhail Glukhikh db2fb86c8e Raw FIR: implement expression trees & conversions from PSI
Testing: total kotlin test controls no stubs in FIR in non-stub-mode
#KT-29002 Fixed
2019-02-06 11:58:59 +03:00
Sergey Rostov 0f2fb4ff82 Build: remove intellijCore/annotations.jar usages 2019-01-28 13:43:08 +03:00
Dmitry Savvinov 69fff12384 Drop LockBasedStorageManager.defaultDebugName, use meaningful name everywhere
Also, drop `createDelegatingWithSameLock` as it was unused
2019-01-14 11:10:37 +03:00
Simon Ogorodnik e3aed04d96 Extract module info & target platform to separate frontend.common 2018-12-11 22:07:41 +03:00