*f7c784adeb- (tag: build-1.4.0-dev-2368) JVM_IR: minor code cleanup in JvmStaticAnnotationLowering (vor 25 Stunden) <Georgy Bronnikov> *182e1c1b3b- JVM_IR: Remove buggy special case accessor code from JvmStaticAnnotationLowering (vor 25 Stunden) <Georgy Bronnikov> *b451c25dba- (tag: build-1.4.0-dev-2366) Fixed MoveJavaInnerClassKotlinUsagesHandler after obsolete API drop off (vor 28 Stunden) <Vladimir Dolzhenko> *5b48f63bb9- (tag: build-1.4.0-dev-2363) Added missed runReadAction to access psi on bg thread (vor 2 Tagen) <Vladimir Dolzhenko> *ce2d32620a- (tag: build-1.4.0-dev-2359) Add JoinWithTrailingCommaHandler to plugin-common.xml 191, 192 (vor 3 Tagen) <Vladimir Dolzhenko> *304700cf7b- (tag: build-1.4.0-dev-2351) JVM IR: Add all relevant overridden symbols to generated bridge methods (vor 3 Tagen) <Steven Schäfer> *951b2fa770- JVM IR: Optimize type checks to null checks if possible (vor 3 Tagen) <Steven Schäfer> *07737f8fc6- JVM IR: Fix BridgeLowering (vor 3 Tagen) <Steven Schäfer> *461d8ef368- Add renaming special bridges to SpecialBridgeMethods (vor 3 Tagen) <Steven Schäfer> *5f6af58aeb- JVM IR: (Un)mute tests and add more tests for bridge generation (vor 3 Tagen) <Steven Schäfer> *12e31a1760- JVM IR: Use dispatchReceiver to calculate owner in MethodSignatureMapper (vor 3 Tagen) <Steven Schäfer> *0e243ca295- JVM IR: Fix receiver types in AddContinuationLowering (vor 3 Tagen) <Steven Schäfer> *a4414829bc- JVM IR: Fix dispatch receiver type in ResolveInlineCalls (vor 3 Tagen) <Steven Schäfer> *f46ad10266- JVM IR: Fix dispatch receiver type in InheritedDefaultMethodsOnClassesLowering (vor 3 Tagen) <Steven Schäfer> *edd0ac6c6f- JVM IR: Fix types of temporaries in AddContinuationLowering (vor 3 Tagen) <Steven Schäfer> *30166b20b7- JVM IR: Fix dispatch receiver types in FunctionNVarargBridgeLowering and ReplaceKFunctionInvokeWithFunctionInvoke (vor 3 Tagen) <Steven Schäfer> *66cbe3b1a8- JVM IR: Remove IrReplacementFunction (vor 3 Tagen) <Steven Schäfer> *73b4f897b6- JVM IR: Fix modalities in JvmSymbols (vor 3 Tagen) <Steven Schäfer> *cfcdf05c92- (tag: build-1.4.0-dev-2347) Fix documentListener leakage in PluginStartupActivity (vor 3 Tagen) <Vladimir Dolzhenko> *fee72839bf- (tag: build-1.4.0-dev-2337) Report error if IR is enabled with incorrect language version (vor 3 Tagen) <Pavel Kirpichenkov> *feccf9cc1b- (tag: build-1.4.0-dev-2333) Remove dependency of fir.tree on ir.tree (vor 3 Tagen) <Alexander Udalov> *10d2eebe28- (tag: build-1.4.0-dev-2331) Gradle, native: Fix running cinterop on Windows hosts (vor 3 Tagen) <Ilya Matveev> *8cdef13537- (tag: build-1.4.0-dev-2330) [JVM IR] Add tests to verify correct parameter reflection metadata for suspend functions. (vor 3 Tagen) <Mark Punzalan> *06408011f0- (tag: build-1.4.0-dev-2328) JVM_IR: prefer to move, not copy, suspend lambda bodies (vor 3 Tagen) <pyos> *5acb3e14fb- IR: mark parameters for captures of crossinline parameters (vor 3 Tagen) <pyos> *2bf50cc91a- JVM_IR: correctly name $$forInline versions of @JvmName suspend funs (vor 3 Tagen) <pyos> *08074bb60e- JVM_IR: wrap inline suspend references in suspend lambdas (vor 3 Tagen) <pyos> *c34d2f9daa- (tag: build-1.4.0-dev-2323) [FIR] Fix signature calculation in JvmMappedScope (vor 3 Tagen) <Mikhail Glukhikh> *0c195be513- [FIR TEST] Add test with MutableMap.compute (vor 3 Tagen) <Mikhail Glukhikh> *2fb508aa1b- [FIR] Fix DFA behaviour for a case with == (!=) true / false (vor 3 Tagen) <Mikhail Glukhikh> *36ba8bf6a9- [FIR] Add test imitating complex smart casts on descriptors (vor 3 Tagen) <Mikhail Glukhikh> *a8e89a6390- [FIR] Fix various corner cases in DFA (vor 3 Tagen) <Mikhail Glukhikh> *1344d6407c- [FIR] DFA fix: imply != null after x as? NotNullType for real variables (vor 3 Tagen) <Mikhail Glukhikh> *1bbcec4935- [FIR] DFA fix after x?.syntheticProperty ?: return (vor 3 Tagen) <Mikhail Glukhikh> *d23c03e9dc- [FIR] Add test about synthetic / non-synthetic smart casts (vor 3 Tagen) <Mikhail Glukhikh> *9f9d53cc5a- [FIR] Fix handling of scope emptiness in case of synthetic properties (vor 3 Tagen) <Mikhail Glukhikh> *c8c0ba480b- (tag: build-1.4.0-dev-2319) FIR: Add problem tests for smart cast within init-section (vor 3 Tagen) <Denis Zharkov> *3518fcf78c- (tag: build-1.4.0-dev-2315) Fix psi2ir tests broken by7249d2f889(vor 3 Tagen) <Dmitry Petrov> *a1326d3ef5- !RENDER_DIAGNOSTICS_FULL_TEXT directive (vor 3 Tagen) <Dmitry Petrov> *4e6c3b6b43- Diagnostics tests with JVM backend (vor 3 Tagen) <Dmitry Petrov> *a17027e330- (tag: build-1.4.0-dev-2310) Fixed incompatibility with 191 and 192 (vor 4 Tagen) <Vladimir Dolzhenko> *5605eb5a31- (tag: build-1.4.0-dev-2299) Review fix: add TODO comments (vor 4 Tagen) <Anton Bannykh> *70a4c265de- Add tests extracted from regressions (vor 4 Tagen) <Anton Bannykh> *1e96c3d21e- DCE-driven mode (vor 4 Tagen) <Anton Bannykh> *571bbba0e3- Change DCE a bit to touch less declarations (vor 4 Tagen) <Anton Bannykh> *f07fb91e9d- Simple stage layers + enforce model (vor 4 Tagen) <Anton Bannykh> *f437da8ee5- Persistent IR implementation (vor 4 Tagen) <Anton Bannykh> *4c4b0ef013- Suspend Functions (vor 4 Tagen) <Anton Bannykh> *94d2a79d2e- FoldConstantLowering (vor 4 Tagen) <Anton Bannykh> *0efe2ab00a- PropertyAccessorInlineLowering (vor 4 Tagen) <Anton Bannykh> *6e501e5f9b- AnnotationConstructorLowering (vor 4 Tagen) <Anton Bannykh> *d76bfdf860- Enums (vor 4 Tagen) <Anton Bannykh> *3165556c6b- PrivateMembersLowering (vor 4 Tagen) <Anton Bannykh> *f6d4ea469c- PrimaryConstructorLowering (vor 4 Tagen) <Anton Bannykh> *76ff30b86e- ObjectLowering (vor 4 Tagen) <Anton Bannykh> *ce625075f6- MoveBodilessDeclarationsToSeparatePlace (vor 4 Tagen) <Anton Bannykh> *09a2c145a9- CallableReferenceLowering (vor 4 Tagen) <Anton Bannykh> *9812291364- BlockDecomposerLowering (vor 4 Tagen) <Anton Bannykh> *e2d16d5096- FunctionInlining (vor 4 Tagen) <Anton Bannykh> *86a4e17dc4- LocalDelegatedProperties (vor 4 Tagen) <Anton Bannykh> *81e599c18f- VarargLowering (vor 4 Tagen) <Anton Bannykh> *489ba508c3- TypeOperatorLowering (vor 4 Tagen) <Anton Bannykh> *05ab17f1e1- ThrowableLowering (vor 4 Tagen) <Anton Bannykh> *15b2312cec- StaticMembersLowering (vor 4 Tagen) <Anton Bannykh> *d9fbe8b951- SecondaryCtorLowering (vor 4 Tagen) <Anton Bannykh> *fb36432cb5- PrimitiveCompanionLowering (vor 4 Tagen) <Anton Bannykh> *edf6dec63b- MultipleCatchesLowering (vor 4 Tagen) <Anton Bannykh> *f1442f5ae9- ConstLowering (vor 4 Tagen) <Anton Bannykh> *21ef35bc25- ClassReferenceLowering (vor 4 Tagen) <Anton Bannykh> *d9646a5361- BridgesConstruction (vor 4 Tagen) <Anton Bannykh> *4142031fe7- AutoboxingTransformer (vor 4 Tagen) <Anton Bannykh> *38d409a487- Inline function removal + body copying (vor 4 Tagen) <Anton Bannykh> *76c7668162- CallsLowering (vor 4 Tagen) <Anton Bannykh> *64a5039ebe- Refactor default arguments lowering (vor 4 Tagen) <Anton Bannykh> *9327776706- Rewrite inner class lowerings (vor 4 Tagen) <Anton Bannykh> *908c23cb48- Make ForLoopsLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *0d1c6e08c3- Refactor LateinitLowering into DeclarationTransformer's and a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *6e96e271ae- Make InitializersLowering a BodyLoweringPass and add a InitializersCleanupLowering (vor 4 Tagen) <Anton Bannykh> *600caaa636- Make ExpectDeclarationsRemoveLowering a DeclarationTransformer (vor 4 Tagen) <Anton Bannykh> *d0284d19ec- Make PropertiesLowering a DeclarationTransformer (vor 4 Tagen) <Anton Bannykh> *03398e6025- Make StripTypeAliasDeclarationsLowering a DeclarationTransformer (vor 4 Tagen) <Anton Bannykh> *3d726fe5a2- Make InlineClassDeclarationLowering a DeclarationTransformer (vor 4 Tagen) <Anton Bannykh> *0a5db9d222- Make inlineClassUsageLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *fe236507a0- Make LocalDeclarationsLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *1eec2acf43- Make LocalClassPopupLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *d228de9008- Make ArrayConstructorLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *bf26b86cf2- Make ProvisionalFunctionExpressionLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *5aa2deb449- Make ReturnableBlockLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *2fa04afbf2- Make SharedVariablesLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *936e53d044- Make TailrecLowering a BodyLoweringPass (vor 4 Tagen) <Anton Bannykh> *a42f849981- Change BodyLoweringPass API; add DeclarationTransformer + helper methods (vor 4 Tagen) <Anton Bannykh> *b087d2d756- IR impl: additional constructors for IrBody implementations (vor 4 Tagen) <Anton Bannykh> *20dc3ccdb8- New mechanism for mappings between old and produced declarations (vor 4 Tagen) <Anton Bannykh> *e8fba8bcb6- IR API: change `val ... : MutableList` to `var ...: List` for most lists (vor 4 Tagen) <Anton Bannykh> *0bcde9dffc- IR API: Make IrEnumEntry.initializerExpression IrExpressionBody (vor 4 Tagen) <Anton Bannykh> *3ec671d727- (tag: build-1.4.0-dev-2292) Fix getMirror for kotlin decompiled file (vor 4 Tagen) <Igor Yakovlev> *ab32f2efac- (tag: build-1.4.0-dev-2282) Use legacy configuration names to make jps import happy (vor 4 Tagen) <Ilya Gorbunov> *f428bbb782- (tag: build-1.4.0-dev-2281) TrailingComma: `Join Lines` should remove trailing comma (vor 4 Tagen) <Dmitry Gridin> *cb66625688- TrailingComma: fix case of `when` without expression or property (vor 4 Tagen) <Dmitry Gridin> *6739d03823- TrailingCommaPostFormatProcessor: change recursive checker (vor 4 Tagen) <Dmitry Gridin> *5054bc65a5- Introduce `TrailingCommaHelper` (vor 4 Tagen) <Dmitry Gridin> *c08c3d4d9b- (tag: build-1.4.0-dev-2275) Update JVM metadata version to 1.4.0 (vor 4 Tagen) <Alexander Udalov> *4d93b3d5ab- (tag: build-1.4.0-dev-2271) Dropped unused UsageDescriptor (vor 4 Tagen) <Vladimir Dolzhenko> *a0c9b275aa- (tag: build-1.4.0-dev-2270) Removed deprecated usage of treeBuilder from currentProjectViewPane (vor 4 Tagen) <Vladimir Dolzhenko> *617807beea- Removed deprecated usage of ScratchFileService.isInScratchRoot (vor 4 Tagen) <Vladimir Dolzhenko> *7c8f3b2b3b- Use LightJavaModule.getModule instead of deprecated getModule (vor 4 Tagen) <Vladimir Dolzhenko> *dd8a120d45- Use JList#getSelectedValuesList() instead of deprecated getSelectedValues() (vor 4 Tagen) <Vladimir Dolzhenko> *670e016d34- PluginStartupComponent reworked into startup activity and service (vor 4 Tagen) <Vladimir Dolzhenko> *df23274aa5- Use Application.addListener(listener, disposable) (vor 4 Tagen) <Vladimir Dolzhenko> *45e288be49- Drop deprecated file from @Storage (vor 4 Tagen) <Vladimir Dolzhenko> *ff7221e1c4- Cleaned up from deprecated CallerMethodsTreeStructure(PsiMethod) (vor 4 Tagen) <Vladimir Dolzhenko> *13d8603c4b- Fixed incompatibility with 192 (vor 4 Tagen) <Alexander Podkhalyuzin> *2408977a68- Fixed bunch file (vor 4 Tagen) <Alexander Podkhalyuzin> *46526ab53c- Removed deprecated icons usages (vor 4 Tagen) <Alexander Podkhalyuzin> *d880a507dd- Removed deprecated usage (vor 4 Tagen) <Alexander Podkhalyuzin> *35fa812a19- Removed MethodNodeBase usage (vor 4 Tagen) <Alexander Podkhalyuzin> *dd73629db1- Obsolete API usages removed from 193 branch (vor 4 Tagen) <Alexander Podkhalyuzin> *312c7bc9bf- Proper override in move (vor 4 Tagen) <Alexander Podkhalyuzin> *e26dcdf10b- Removed unnecessary deprecated method overrides (vor 4 Tagen) <Alexander Podkhalyuzin> *4db89f073f- Remove outdated icon creation API usage (vor 4 Tagen) <Alexander Podkhalyuzin> *0890e6837b- Proper check if plugin is disabled (vor 4 Tagen) <Alexander Podkhalyuzin> *f3d66dcce8- proper way to distinguish JetBrains annotations (vor 4 Tagen) <Alexander Podkhalyuzin> *aee3887604- removed deprecated usage for isAnnotated (vor 4 Tagen) <Alexander Podkhalyuzin> *08d5471f51- isSearchForTextOccurencesAvailable usage replaced (vor 4 Tagen) <Alexander Podkhalyuzin> *23fa21d37e- getUsages -> getMetrics in FUSCollectors (vor 4 Tagen) <Alexander Podkhalyuzin> *8bb59e31e0- (tag: build-1.4.0-dev-2254) Minor. Remove textifyMethodNode, since it duplicates nodeText (vor 4 Tagen) <Ilmir Usmanov> *7dfd7b6081- Spill stack before analyzing it when looking for non-inline suspend lambda (vor 4 Tagen) <Ilmir Usmanov> *b7a6fc271c- (tag: build-1.4.0-dev-2249) minor: remove unused import (vor 4 Tagen) <Pavel Kirpichenkov> *e2a99f84a5- [FIR] Fix test data (vor 4 Tagen) <Mikhail Glukhikh> *286622009d- (tag: build-1.4.0-dev-2245) FIR: Cleanup PostponedArguments.kt (vor 4 Tagen) <Denis Zharkov> *6f6281a3f3- FIR: Support type aliases to function types in resolution (vor 4 Tagen) <Denis Zharkov> *7249d2f889- (tag: build-1.4.0-dev-2243) [FIR] Fix translation of invokes & add return expressions for lambdas (vor 4 Tagen) <Juan Chen>
Kotlin/Native
Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.
Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS or embedded targets), or where a developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.
Prerequisites:
- install JDK for your platform, instead of JRE. The build requires
tools.jar, which is not included in JRE; - on macOS install Xcode 11
- on Fedora 26+
yum install ncurses-compat-libsmay be needed - on recent Ubuntu
apt install libncurses5is needed
To compile from sources use following steps:
First, download dependencies:
./gradlew dependencies:update
Then, build the compiler and libraries:
./gradlew bundle
To build with experimental targets support compile with -Porg.jetbrains.kotlin.native.experimentalTargets.
The build can take about an hour on a Macbook Pro. To run a shorter build with only the host compiler and libraries, run:
./gradlew dist distPlatformLibs
To include Kotlin compiler in composite build and build
against it, use the kotlinProjectPath project property:
./gradlew dist -PkotlinProjectPath=path/to/kotlin/project
It's possible to include in a composite build both Kotlin compiler and Kotlin/Native Shared simultaneously.
After that, you should be able to compile your programs like this:
export PATH=./dist/bin:$PATH
kotlinc hello.kt -o hello
For an optimized compilation, use -opt:
kotlinc hello.kt -o hello -opt
For tests, use:
./gradlew backend.native:tests:run
To generate interoperability stubs, create a library definition file
(refer to samples/tetris/.../sdl.def), and run the cinterop tool like this:
cinterop -def lib.def
See the provided samples and INTEROP.md for more details.
The Interop tool generates a library in the .klib library format. See LIBRARIES.md
for more details on this file format.