/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 1 6 ĠJetBrains Ġs . r . o . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . frontend . di Ċ Ċ import Ġorg . jetbrains . kotlin . analyzer . common . Common Platform Ċ import Ġorg . jetbrains . kotlin . config . Language Version Settings Ċ import Ġorg . jetbrains . kotlin . config . Language Version Settings Impl Ċ import Ġorg . jetbrains . kotlin . config . Target Platform Version Ċ import Ġorg . jetbrains . kotlin . container . Storage Component Container Ċ import Ġorg . jetbrains . kotlin . container . get Ċ import Ġorg . jetbrains . kotlin . container . use Impl Ċ import Ġorg . jetbrains . kotlin . container . use Instance Ċ import Ġorg . jetbrains . kotlin . context . Module Context Ċ import Ġorg . jetbrains . kotlin . extensions . Storage Component Container Contributor Ċ import Ġorg . jetbrains . kotlin . incremental . components . Expect Actual Tracker Ċ import Ġorg . jetbrains . kotlin . incremental . components . Lookup Tracker Ċ import Ġorg . jetbrains . kotlin . psi . Kt File Ċ import Ġorg . jetbrains . kotlin . resolve .* Ċ import Ġorg . jetbrains . kotlin . resolve . calls . components . Classic Type System Context For CS Ċ import Ġorg . jetbrains . kotlin . resolve . calls . smart casts . Data Flow Value Factory Impl Ċ import Ġorg . jetbrains . kotlin . resolve . calls . tower . Kotlin Resolution State less Callbacks Impl Ċ import Ġorg . jetbrains . kotlin . resolve . check ers . Experimental Usage Checker Ċ import Ġorg . jetbrains . kotlin . resolve . lazy .* Ċ import Ġorg . jetbrains . kotlin . resolve . lazy . declarations . Declaration Provider Factory Ċ import Ġorg . jetbrains . kotlin . resolve . lazy . declarations . File Based Declaration Provider Factory Ċ import Ġorg . jetbrains . kotlin . types . expressions . Declaration Scope Provider For Local Classifier Analyzer Ċ import Ġorg . jetbrains . kotlin . types . expressions . Local Class Descriptor Holder Ċ import Ġorg . jetbrains . kotlin . types . expressions . Local Lazy Declaration Resolver Ċ Ċ fun ĠStorage Component Container . configure Module ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġplatform Version : ĠTarget Platform Version Ċ ) Ġ{ ĊĠĠĠ Ġuse Instance ( module Context ) ĊĠĠĠ Ġuse Instance ( module Context . module ) ĊĠĠĠ Ġuse Instance ( module Context . project ) ĊĠĠĠ Ġuse Instance ( module Context . storage Manager ) ĊĠĠĠ Ġuse Instance ( module Context . module . built Ins ) ĊĊĠĠĠ Ġuse Instance ( platform ) ĊĠĠĠ Ġuse Instance ( platform Version ) ĊĊĠĠĠ Ġplatform . platform Configurator . configure Module Components ( this ) ĊĠĠĠ Ġplatform . platform Configurator . configure Module Dependent Check ers ( this ) ĊĊĠĠĠ Ġfor Ġ( extension Ġin ĠStorage Component Container Contributor . get Instances ( module Context . project )) Ġ{ ĊĠĠĠĠĠĠĠ Ġextension . register Module Components ( this , Ġplatform , Ġmodule Context . module ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġconfigure Platform In dependent Components () Ċ } Ċ Ċ private Ġfun ĠStorage Component Container . configure Platform In dependent Components () Ġ{ ĊĠĠĠ Ġuse Impl < Sup ertype Loop Checker Impl >() ĊĠĠĠ Ġuse Impl < Kotlin Resolution State less Callbacks Impl >() ĊĠĠĠ Ġuse Impl < Data Flow Value Factory Impl >() ĊĊĠĠĠ Ġuse Impl < Experimental Usage Checker >() ĊĠĠĠ Ġuse Impl < Experimental Usage Checker . Overrides >() ĊĠĠĠ Ġuse Impl < Experimental Usage Checker . Classifier Usage >() ĊĠĠĠ Ġuse Impl < Classic Type System Context For CS >() Ċ } Ċ Ċ fun ĠStorage Component Container . configure Module ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġplatform Version : ĠTarget Platform Version , ĊĠĠĠ Ġtrace : ĠBinding Trace Ċ ) Ġ{ ĊĠĠĠ Ġconfigure Module ( module Context , Ġplatform , Ġplatform Version ) ĊĠĠĠ Ġuse Instance ( trace ) Ċ } Ċ Ċ fun Ġcreate Container For Body Resolve ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġbinding Trace : ĠBinding Trace , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġstatement Filter : ĠStatement Filter , ĊĠĠĠ Ġtarget Platform Version : ĠTarget Platform Version , ĊĠĠĠ Ġlanguage Version Settings : ĠLanguage Version Settings Ċ ): ĠStorage Component Container Ġ= Ġcreate Container (" Body Resolve ", Ġplatform ) Ġ{ ĊĠĠĠ Ġconfigure Module ( module Context , Ġplatform , Ġtarget Platform Version , Ġbinding Trace ) ĊĊĠĠĠ Ġuse Instance ( statement Filter ) ĊĊĠĠĠ Ġuse Instance ( Body Resolve Cache . Throw Exception ) ĊĠĠĠ Ġuse Instance ( language Version Settings ) ĊĠĠĠ Ġuse Impl < Annotation Resolver Impl >() ĊĊĠĠĠ Ġuse Impl < Body Resolver >() Ċ } Ċ Ċ fun Ġcreate Container For Lazy Body Resolve ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġkotlin Code Analyzer : ĠKotlin Code Analyzer , ĊĠĠĠ Ġbinding Trace : ĠBinding Trace , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġbody Resolve Cache : ĠBody Resolve Cache , ĊĠĠĠ Ġtarget Platform Version : ĠTarget Platform Version , ĊĠĠĠ Ġlanguage Version Settings : ĠLanguage Version Settings Ċ ): ĠStorage Component Container Ġ= Ġcreate Container (" Lazy Body Resolve ", Ġplatform ) Ġ{ ĊĠĠĠ Ġconfigure Module ( module Context , Ġplatform , Ġtarget Platform Version , Ġbinding Trace ) ĊĊĠĠĠ Ġuse Instance ( kotlin Code Analyzer ) ĊĠĠĠ Ġuse Instance ( kotlin Code Analyzer . file Scope Provider ) ĊĠĠĠ Ġuse Instance ( body Resolve Cache ) ĊĠĠĠ Ġuse Instance ( language Version Settings ) ĊĠĠĠ Ġuse Impl < Annotation Resolver Impl >() ĊĠĠĠ Ġuse Impl < Lazy Top Down Analyzer >() ĊĠĠĠ Ġuse Impl < Basic Absent Descriptor Handler >() Ċ } Ċ Ċ fun Ġcreate Container For Lazy Local Classifier Analyzer ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġbinding Trace : ĠBinding Trace , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġlookup Tracker : ĠLookup Tracker , ĊĠĠĠ Ġtarget Platform Version : ĠTarget Platform Version , ĊĠĠĠ Ġlanguage Version Settings : ĠLanguage Version Settings , ĊĠĠĠ Ġstatement Filter : ĠStatement Filter , ĊĠĠĠ Ġlocal Class Descriptor Holder : ĠLocal Class Descriptor Holder Ċ ): ĠStorage Component Container Ġ= Ġcreate Container (" Local Classifier Analyzer ", Ġplatform ) Ġ{ ĊĠĠĠ Ġconfigure Module ( module Context , Ġplatform , Ġtarget Platform Version , Ġbinding Trace ) ĊĊĠĠĠ Ġuse Instance ( local Class Descriptor Holder ) ĊĠĠĠ Ġuse Instance ( lookup Tracker ) ĊĠĠĠ Ġuse Instance ( Expect Actual Tracker . Do Nothing ) ĊĊĠĠĠ Ġuse Impl < Lazy Top Down Analyzer >() ĊĊĠĠĠ Ġuse Instance ( No TopLevel Descriptor Provider ) ĊĊĠĠĠ ĠCompiler Environment . configure ( this ) ĊĊĠĠĠ Ġuse Instance ( File Scope Provider . Throw Exception ) ĊĠĠĠ Ġuse Impl < Annotation Resolver Impl >() ĊĊĠĠĠ Ġuse Impl < Declaration Scope Provider For Local Classifier Analyzer >() ĊĠĠĠ Ġuse Impl < Local Lazy Declaration Resolver >() ĊĊĠĠĠ Ġuse Instance ( language Version Settings ) ĊĠĠĠ Ġuse Instance ( statement Filter ) Ċ } Ċ Ċ fun Ġcreate Container For Lazy Resolve ( ĊĠĠĠ Ġmodule Context : ĠModule Context , ĊĠĠĠ Ġdeclaration Provider Factory : ĠDeclaration Provider Factory , ĊĠĠĠ Ġbinding Trace : ĠBinding Trace , ĊĠĠĠ Ġplatform : ĠTarget Platform , ĊĠĠĠ Ġtarget Platform Version : ĠTarget Platform Version , ĊĠĠĠ Ġtarget Environment : ĠTarget Environment , ĊĠĠĠ Ġlanguage Version Settings : ĠLanguage Version Settings Ċ ): ĠStorage Component Container Ġ= Ġcreate Container (" Lazy Resolve ", Ġplatform ) Ġ{ ĊĠĠĠ Ġconfigure Module ( module Context , Ġplatform , Ġtarget Platform Version , Ġbinding Trace ) ĊĊĠĠĠ Ġuse Instance ( declaration Provider Factory ) ĊĠĠĠ Ġuse Instance ( language Version Settings ) ĊĊĠĠĠ Ġuse Impl < Annotation Resolver Impl >() ĊĠĠĠ Ġuse Impl < Compiler Deserialization Configuration >() ĊĠĠĠ Ġtarget Environment . configure ( this ) ĊĊĠĠĠ Ġuse Impl < Resolve Session >() ĊĠĠĠ Ġuse Impl < Lazy Top Down Analyzer >() Ċ } Ċ Ċ fun Ġcreate Lazy Resolve Session ( module Context : ĠModule Context , Ġfiles : ĠCollection < Kt File >): ĠResolve Session Ġ= ĊĠĠĠ Ġcreate Container For Lazy Resolve ( ĊĠĠĠĠĠĠĠ Ġmodule Context , ĊĠĠĠĠĠĠĠ ĠFile Based Declaration Provider Factory ( module Context . storage Manager , Ġfiles ), ĊĠĠĠĠĠĠĠ ĠBinding Trace Context (), ĊĠĠĠĠĠĠĠ ĠCommon Platform , ĊĠĠĠĠĠĠĠ ĠTarget Platform Version . NoVersion , ĊĠĠĠĠĠĠĠ ĠCompiler Environment , ĊĠĠĠĠĠĠĠ ĠLanguage Version Settings Impl . DEFAULT ĊĠĠĠ Ġ). get < Resolve Session >() Ċ