/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 2 1 ĠJetBrains Ġs . r . o . Ġand ĠKotlin ĠProgramming ĠLanguage Ġcontributors . Ċ Ġ* ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe Ġlicense / LICENSE . txt Ġfile . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . test . runners . codegen Ċ Ċ import Ġorg . jetbrains . kotlin . test . Constructor Ċ import Ġorg . jetbrains . kotlin . test . Target Backend Ċ import Ġorg . jetbrains . kotlin . test . backend . Black Box Code gen Suppress or Ċ import Ġorg . jetbrains . kotlin . test . backend . classic . Classic Backend Input Ċ import Ġorg . jetbrains . kotlin . test . backend . classic . Classic Jvm Backend Facade Ċ import Ġorg . jetbrains . kotlin . test . backend . handlers . Byte code Text Handler Ċ import Ġorg . jetbrains . kotlin . test . backend . ir . Ir Backend Input Ċ import Ġorg . jetbrains . kotlin . test . backend . ir . Jvm Ir Backend Facade Ċ import Ġorg . jetbrains . kotlin . test . builders . Test Configuration Builder Ċ import Ġorg . jetbrains . kotlin . test . builders . configure Jvm Artifacts Handlers Step Ċ import Ġorg . jetbrains . kotlin . test . directives . Jvm Environment Configuration Directives . USE _ P SI _ CLASS _ FILES _ READ ING Ċ import Ġorg . jetbrains . kotlin . test . directives . Jvm Environment Configuration Directives . WITH _ REF LECT Ċ import Ġorg . jetbrains . kotlin . test . directives . Jvm Environment Configuration Directives . WITH _ STD LIB Ċ import Ġorg . jetbrains . kotlin . test . frontend . classic . Classic Frontend 2 Classic Backend Converter Ċ import Ġorg . jetbrains . kotlin . test . frontend . classic . Classic Frontend 2 Ir Converter Ċ import Ġorg . jetbrains . kotlin . test . frontend . classic . Classic Frontend Facade Ċ import Ġorg . jetbrains . kotlin . test . frontend . classic . Classic Frontend Output Artifact Ċ import Ġorg . jetbrains . kotlin . test . frontend . fir . F ir 2 Ir Results Converter Ċ import Ġorg . jetbrains . kotlin . test . frontend . fir . F ir Frontend Facade Ċ import Ġorg . jetbrains . kotlin . test . frontend . fir . F ir Output Artifact Ċ import Ġorg . jetbrains . kotlin . test . model .* Ċ import Ġorg . jetbrains . kotlin . test . runners . Abstract Kotlin Compiler With Target Backend Test Ċ Ċ abstract Ġclass ĠAbstract Byte code Text TestBase < R Ġ: ĠResult ing Artifact . Frontend Output < R >, ĠI Ġ: ĠResult ing Artifact . Backend Input < I >>( ĊĠĠĠ Ġtarget Backend : ĠTarget Backend , ĊĠĠĠ Ġval Ġtarget Frontend : ĠFrontend Kind < R > Ċ ) Ġ: ĠAbstract Kotlin Compiler With Target Backend Test ( target Backend ) Ġ{ ĊĠĠĠ Ġabstract Ġval Ġfrontend Facade : ĠConstructor < Frontend Facade < R >> ĊĠĠĠ Ġabstract Ġval Ġfrontend To Backend Converter : ĠConstructor < Frontend 2 Backend Converter < R , ĠI >> ĊĠĠĠ Ġabstract Ġval Ġbackend Facade : ĠConstructor < Backend Facade < I , ĠBinary Artifacts . Jvm >> ĊĊĠĠĠ Ġoverride Ġfun ĠTest Configuration Builder . configuration () Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Directives Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ+ WITH _ STD LIB ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ+ WITH _ REF LECT ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcommon Configuration For Code gen Test ( target Frontend , Ġfrontend Facade , Ġfrontend To Backend Converter , Ġbackend Facade ) ĊĊĠĠĠĠĠĠĠ Ġcommon Handlers For Code gen Test () ĊĊĠĠĠĠĠĠĠ Ġconfigure Jvm Artifacts Handlers Step Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġuse Handlers (:: Byte code Text Handler ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġuse After Analysis Check ers (:: Black Box Code gen Suppress or ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ open Ġclass ĠAbstract Byte code Text Test Ġ: ĠAbstract Byte code Text TestBase < Classic Frontend Output Artifact , ĠClass ic Backend Input >( ĊĠĠĠ Ġtarget Backend Ġ= ĠTarget Backend . JVM , ĊĠĠĠ Ġtarget Frontend Ġ= ĠFrontend Kinds . Classic Frontend Ċ ) Ġ{ ĊĠĠĠ Ġoverride Ġval Ġfrontend Facade : ĠConstructor < Frontend Facade < Classic Frontend Output Artifact >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Classic Frontend Facade ĊĊĠĠĠ Ġoverride Ġval Ġfrontend To Backend Converter : ĠConstructor < Frontend 2 Backend Converter < Classic Frontend Output Artifact , ĠClass ic Backend Input >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Classic Frontend 2 Classic Backend Converter ĊĊĠĠĠ Ġoverride Ġval Ġbackend Facade : ĠConstructor < Backend Facade < Classic Backend Input , ĠBinary Artifacts . Jvm >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Classic Jvm Backend Facade Ċ } Ċ Ċ open Ġclass ĠAbstract Ir Byte code Text Test Ġ: ĠAbstract Byte code Text TestBase < Classic Frontend Output Artifact , ĠIr Backend Input >( ĊĠĠĠ Ġtarget Backend Ġ= ĠTarget Backend . JVM _ IR , ĊĠĠĠ Ġtarget Frontend Ġ= ĠFrontend Kinds . Classic Frontend Ċ ) Ġ{ ĊĠĠĠ Ġoverride Ġval Ġfrontend Facade : ĠConstructor < Frontend Facade < Classic Frontend Output Artifact >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Classic Frontend Facade ĊĊĠĠĠ Ġoverride Ġval Ġfrontend To Backend Converter : ĠConstructor < Frontend 2 Backend Converter < Classic Frontend Output Artifact , ĠIr Backend Input >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Classic Frontend 2 Ir Converter ĊĊĠĠĠ Ġoverride Ġval Ġbackend Facade : ĠConstructor < Backend Facade < Ir Backend Input , ĠBinary Artifacts . Jvm >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Jvm Ir Backend Facade Ċ } Ċ Ċ open Ġclass ĠAbstract F ir Byte code Text Test Ġ: ĠAbstract Byte code Text TestBase < F ir Output Artifact , ĠIr Backend Input >( ĊĠĠĠ Ġtarget Backend Ġ= ĠTarget Backend . JVM _ IR , ĊĠĠĠ Ġtarget Frontend Ġ= ĠFrontend Kinds . FI R Ċ ) Ġ{ ĊĠĠĠ Ġoverride Ġval Ġfrontend Facade : ĠConstructor < Frontend Facade < F ir Output Artifact >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: F ir Frontend Facade ĊĊĠĠĠ Ġoverride Ġval Ġfrontend To Backend Converter : ĠConstructor < Frontend 2 Backend Converter < F ir Output Artifact , ĠIr Backend Input >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: F ir 2 Ir Results Converter ĊĊĠĠĠ Ġoverride Ġval Ġbackend Facade : ĠConstructor < Backend Facade < Ir Backend Input , ĠBinary Artifacts . Jvm >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ:: Jvm Ir Backend Facade ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure ( builder : ĠTest Configuration Builder ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . configure ( builder ) ĊĠĠĠĠĠĠĠ Ġwith ( builder ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdefault Directives Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠSee ĠK T - 4 4 1 5 2 ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ- USE _ P SI _ CLASS _ FILES _ READ ING ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ