Pavel Punegov 3c90299f2d Kotlin compiler update 1.4.0-dev-445 (#3732)
* Remove duplicate typeOrNull extension val

* [kotlin compiler][update] 1.4.0-dev-445

4c04ad2371 FIR: Add bindings for dispatch receiver parameters
a54ef3e427 FIR invoke resolve: remove redundant candidates
f47c3f0f5a FIR: if necessary, use explicit receiver as argument in invoke collector
0c88ecdc56 FIR resolve: introduce builtInExtensionFunctionReceiverValue
de50f8aef3 FIR resolve: add partial support of extension lambda calls
49e94f1ee3 FIR invoke consumer: minor rename
9a514dfdd9 FIR invoke consumer: do not process last data twice
933bdc98e5 Minor: extract val FirTowerConsumer.resultCollection
20fee028f9 [FIR TEST] Add test with incorrect invoke receiver
a8a50fa657 Fix raw FIR building with parenthesized expression as selector
a18fecb05f Minor: mute test for pre-1.3 behavior in JVM_IR
ee06678484 [JS BE] Fix `is` check with Function
04e567dbf9 [NI] Don't replace context dependency for blocks with expected type
4fa5e2d85c KT-20357: Add samples for linkedSetOf
95300ae31d KT-20357: Add sample for reduce, reduceRight and their indexed counterparts
6d092b5f71 Add more reduceOrNull tests
9546307243 Add sample for reduceOrNull and reduceRightOrNull
06008c40ab KT-33761 Add reduceRightOrNull
f5d696d3c4 KT-33761 Add reduceOrNull
39e1b24c2c Don't search for expects when not given -Xmpp-klibs
d210df9ea3 Update spec testdata according to previous commits
5dfe100ae5 Allow use reference to reified type parameters in contracts since 1.4
9c1b68f839 Prohibit using references to this from outer scope in contract declarations
f083edfac2 Allow contracts on final non-override members since 1.4
5a9070b6da as40: Minor: Fix copyright header in AbstractModelBuilderTest.java
3d79e4609e as40: Fix duplicate registration of kotlin-copyright
7b1c4e72ba Build: Fix android-wizardTemplate-plugin dependencies
1a3cf3b792 [Gradle, Native] Added subspecs support in CocoaPods plugin
8871c8b4fd Migrate diagnostic tests to 1.4
07d35a3ad1 Fix template indentation (#2923)
d3f63166f3 [JPS] Include Kotlin reflection for `tests-spec` though explicit specifying in gradle dependencies
babe6eb581 Fix explicit 'equals' for primitive types
1d5370a56a Fix rationale for test muted in JVM_IR (see KT-35656)
7898922066 NI: Fix type mismatch caused by smartcast
ae4397fbfb Fix bare typed smartcasts in NI
abee908b94 Remove effectively dead code in AbstractTypeCheckerContext
0b385cc532 NI: Approximate captured-for-star-projections to *
7728102a77 Cleanup and reformart DelegatedPropertyResolver.kt
c8a1b876e8 [NI] Fix completion of error delegates with receiver with type parameters
e83941a98e [NI] Don't resolve delegates twice
0c01499d98 [NI] Improve completing calls with multiple postponed arguments
0aa527347d Stubs don't break KtTypeAlias::isTopLevel
08454aa47e Minor: add reference to language design issue
2dd8727baf [JVM IR] ForLoopsLowering: Keep IMPLICIT_NOTNULL type-casts in `next()` and `componentN()` calls.
e54ef3bdb8 PSI2IR: ignore enum annotation arguments of error type
a9848305a3 Build: Use tar.gz extension for linux AS distributions
d8d21b0cba as40: Fix test compilation for AS 4.0 C7
89a259837f as40: Fix KotlinDslScriptModelProvider and KotlinDslScriptModelResolver for AS 4.0 C7
68f1d91e1b as40: Upgrade to AS 4.0 C7
eda27ab298 Build: Add Ide.AS40 constant
19233ee120 Build: Add as40 to .bunch
5fe06ceb06 Pill: Support api/implementation configurations
4309f53e11 NI: don't filter flexible types during CST calculation and force return as result the first of such types ^KT-35658 Fixed
51424ec598 [NI] Add constraint `K <: T` from constraint `K <: CapturedType(in T)`
b54169d312 [NI] Fix substitution in completion of callable references in coroutine inference
04d4366f2a [NI] Update testdata broken in NI
6ca0df59c1 [FIR-TEST] Fail old FE diagnostics test if testdata doesn't exist
77e4212774 [minor] unmute fixed spec tests
7ee71450bc [NI] Discriminate `Nothing?` result type from nullability constraints
a1ad680edb [NI] Disallow full completion based on lower Nothing constraint
384bd858e9 [NI] Support fixation to subtype in completion mode calculator
e69e45e2a6 [NI] Remove direcion calculator from variable fixation
e9941f8c12 [NI] Implement algorithm for completion mode selection
a9391c8dfb [NI] Remove Nothing result type restriction in most cases
ae1630f376 [NI] Don't discriminate `Nothing`-type from resulting ones
a8e9a6a1d0 Properly reference type parameter descriptors
f8fd5092c6 [native-gradle-plugin] Disabled cache building for iOS devices
70ff3d36d0 Fix running tests in compiler plugins
5583b57ed7 Regenerate spec tests to activate muting framework for them
7a94b1d88b Mute SpringReferenceNavigationTestGenerated test
2f129ea435 Allow resolve during fixing AddSpringBeanQualifierFix action
bf79b660c4 Fix HighlightingWithDependentLibrariesTest in 193 by using relative path
1b9bae0cca Mute more flaky tests
d575df56e9 Minor: show method key in parse error
143cfc7030 Minor: put first actual item to the new line in tests
9b68008208 Mute JvmSmartCompletionTestGenerated (KT-32919)
c372dc7f0a Fix AmbiguousCalls in >= 192
0884681662 Mute flaky stub builder tests
1e14c48742 Mute KotlinMavenInspectionTestGenerated
9206f1cfb2 Remove compatibility hack with reflection usage
1682ace428 Mute MultiPlatformHighlightingTestGenerated
3210e1d44c Fix testHighlightingWithDependentLibraries
03bd80b1ba Mute CreateActual.testWithTestDummy
d2909814c2 Mute DeprecatedSymbolUsageFixSpecialTest
d80fdf307f Fix testNoSynthesizedParameterNames in 192 and 193
dca5ff10c7 Mute testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage in 193
6613b73657 Mute highlighting tests
1e3736ec1e Mute SerializationIrBytecodeListingTestGenerated
1058f04c53 Mute ShortenRefsTestGenerated
84604b91bf Mute StringInterpolationInjectionTest
c11f36cf1d Mute IncrementalJvmJpsTestGenerated tests
18b1d64adc Update FindUsagesTestGenerated$Kotlin$Conventions.testSet test data
3520d5b81d Mute JavaAgainstKotlinBinariesCheckerTestGenerated tests in 192 and 193
5f25242cbf Mute QuickFixTestGenerated.Libraries tests
712517a02e Mute testWithJava9ModuleInfo tests
f41b588f70 Mute gradle.NewMultiplatformProjectImportingTest tests
08ade450ff Mute gradle.ImportAndCheckHighlighting (KT-35631)
c848212ae9 Mute GradleBuildFileHighlightingTest test
c935078f05 Mute JavaToKotlinConverterSingleFileTestGenerated tests
c5d4213a5c Mute CoroutineDumpTestGenerated, stable failure on windows
9d54d1ec40 Mute GradleFacetImportTest tests in 192 and 193
482cb07420  Mute GradleConfiguratorTest tests
8014a6509e Allow to mute JUnit 4 tests with parameters
d74721716a [JS IR] Use short klib names instead of absolute paths
31c84e9ac4 [JS IR] Build stdlib using compiler from repo
70111f8db1 Ignore test in Native backend
be8ae24713 Temporary mute some spec tests through apply changes after 45e881f03f
1129b2d3eb Support serializing a module's own descriptors without dependencies
ed6034e449 Support generating a klib from common code with K2MetadataCompiler
28e0089259 Allow not providing IR to serialize a klib with just the frontend metadata
cea0f08049 Regenerate compiler tests
45d894ee6e K/N: remove unused code
84e8b895be Minor: Fix compilation warnings
59e84e826b Fast check of Kotlin/Native KLIBs by virtual files
98e9642a1e Stop publishing old KLIB reader
4afbbda858 Minor fixes of move refactoring
a2db1f8314 Fix move tests for bunch 192
f2f7d144aa [JS] Fix failing test
6ba8fbd451 [IR BE] Refactored FoldConstantLowering
e4f83b96a3 [JS BE] Reduce temporary variable number produced during lowering
fb3bd8a9ac [JS BE] Implement accessor inlining optimization (WIP)  - enable constant folding
9871f8c579 [JS BE] Fix DCE to let it remove constant properties
2c94f590ca [JS BE] Improve error message in JS BE
738db7e511 [IR BE] Make FoldConstantLowering common
540b3cfec3 [JS IR] Fix test to make them able to run with JS
b5af28b28d [JS IR] Fix state machine builder to fit into switch optimizer requirements
50889e77a8 [JS IR] Support switch optimization for when-expression
23caf15457 [JS IR] Implement Switch optimizer for JS IR codegen
8dd467bde0 Fix build for bunch 191
982a088f00 JVM_IR: do not copy defaults in functions with inline class parameters
9e17140daf [JS_IR] Turned on passing JS_IR tests
7a5e8b4316 [IR] Inliner: supported tricky function references
cdf9ef63ba Remove nullability assertions from special bridge call arguments
fabeca5955 Redundant curly braces in string template: do not report labeled 'this'
80d29cdad1 FIR resolve: soften processBlock limitation during inference completion
fd73f5af20 FIR: simplify problematic test
03ec76b570 Redundant visibility modifier: do not report for 'internal' inside 'private'
49e5f170d1 "Replace 'when' with 'if'" intention: do not suggest if 'when' subject is variable declaration
1cdcef3b08 "Split property declaration" intention: do not suggest in 'when' subject
eab6864269 KT-35536: Fix enum constants in KAPT
62924ddcd4 KT-35472: Detect when content of annotation processor changes
7b227f3113 Remove Redundant Project
d4b0151f51 JVM_IR: fix name of received field for suspend lambdas
068d3f4beb JVM_IR: Use IrInlineReferenceLocator to find inline suspend lambdas and lambdas, which capture crossinline
1ea89ce28e JVM_IR: Minor. Unmute tests
5c92da3f35 JVM_IR: Do not generate parameter annotations for continuation constructors
9292022f88 JVM_IR: Support inner lambdas which capture crossinline
daa76cbf1e JVM_IR: Support inner objects with multiple suspend functions
a1448ebb37 JVM_IR: Support crossinline suspend lambdas
3b37f6bd32 JVM_IR: Add attributes to named suspend functions
0f1592b023 Remove deprecated method usage
6fb788d446 Fix move refactoring for several class files
51f726be9b JVM_IR: Fix check for whether classes are from Java.
e261b1e2de JVM IR: Fix line numbers in callable reference classes
59f2aa7add JVM_IR: remove constructors of nested annotations
17d2fda946 JVM_IR: keep nullability when remapping type parameters
1b95040934 [kotlin-native-plugin] Two fixes: * Added property to select the cache kind (none, dynamic, static) * Fixed the check if the cache needs to be rebuilt
e078282767 Fix ambiguity between Java and Kotlin SAM candidates
99e02665b5 Add forgotten FIR test data for old FE test
81ac46d35d Fix FIR test data for old FE test
74889ef3ad [Gradle, JS] Actualize node and yarn version
24e3310393 [Gradle, JS] Add check on run and dist task
fefdce0406 KT-35550 Generate type parameters for delegating property accessors
2019-12-28 10:26:47 +03:00
2019-11-04 15:13:27 +03:00
2019-12-27 11:01:09 +03:00
2019-11-28 12:20:29 +07:00
2019-12-25 14:14:53 +03:00
2019-03-21 14:16:25 +03:00
2019-12-27 11:01:09 +03:00
2017-03-30 09:51:58 +03:00
2019-12-18 16:58:28 +03:00
2019-10-25 16:05:35 +03:00
2019-12-02 09:55:51 +03:00
2019-11-28 12:20:29 +07:00
2019-07-10 15:29:45 +07:00
2019-12-09 10:14:07 +07:00
2018-09-13 11:48:42 +03:00
2017-04-28 17:05:20 +02:00
2019-01-30 19:11:11 +03:00
2019-09-28 09:53:20 +03:00
2019-09-28 09:53:20 +03:00

official project version

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-libs may be needed
  • on recent Ubuntu apt install libncurses5 is 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.

S
Description
The Kotlin Programming Language.
Readme 2.1 GiB
Languages
Kotlin 79.9%
Java 10.4%
Swift 4.3%
C 2.8%
C++ 2.1%
Other 0.3%