Vasily Levchenko b1462f8da6 DEBUGDEMO: refactoring & new demo of structured types.
- extract common part for easier demo introducing.
- fixed warning [-Wincompatible-pointer-types]
- demo-types
- this debug info generated for pseudo structure:
    1 /* smth here... */
    2 A {
    3 int a;
    4 int b;
    5}

    0:b-debugger-types:minamoto@unit-703(0)# llvmDebugInfoC/build/exe/demotypes/demotypes
    define i32 @main() !dbg !3 {
    entry:
      ret i32 42
      }

    !llvm.dbg.cu = !{!0}

    !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "konanc", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
    !1 = !DIFile(filename: "<stdin>", directory: "")
    !2 = !{}
    !3 = distinct !DISubprogram(name: "main", linkageName: "main", scope: null, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !4 = !DISubroutineType(types: !5)
    !5 = !{!6}
    !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !1, line: 2, size: 64, align: 32, elements: !7)
    !7 = !{!8, !10}
    !8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !1, line: 3, baseType: !9, size: 32, align: 32)
    !9 = !DIBasicType(name: "int", size: 32, align: 4)
    !10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, file: !1, line: 4, baseType: !9, size: 32, align: 32, offset: 32)
2017-05-04 20:35:44 +03:00
2017-03-30 09:51:58 +03:00
2017-05-03 16:59:59 +07:00
2017-05-04 17:28:59 +03:00
2017-03-30 09:51:58 +03:00
2017-05-04 17:28:59 +03:00
2017-05-04 17:28:59 +03:00
2017-04-19 22:10:47 +03:00
2017-04-03 19:05:44 +03:00
2017-05-04 18:03:04 +03:00
2016-10-27 13:52:00 +03:00
2016-10-27 13:52:00 +03:00
2017-04-28 17:05:20 +02:00
2017-04-05 10:49:54 +03:00
2017-05-04 17:28:59 +03:00

Kotlin/Native

Kotlin/Native is a LLVM backend for the Kotlin compiler, runtime implementation and native code generation facility using LLVM toolchain.

Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS, embedded targets), or where developer is willing to produce reasonably-sized self-contained program without need to ship an additional execution runtime.

To compile from sources use following steps.

First download dependencies:

./gradlew dependencies:update

Then build the compiler and standard library:

./gradlew dist

To build standard library for cross-targets (currently, iOS on Mac OSX and Raspberry Pi on Linux hosts) use:

./gradlew cross_dist

After that you should be able to compile your programs like that:

export PATH=./dist/bin:$PATH
kotlinc hello.kt -o hello

For an optimized compilation use -opt:

kotlinc hello.kt -o hello -opt

For some tests, use:

./gradlew backend.native:tests:run

To generate interoperability stubs create library definition file (take a look on samples/tetris/sdl.def) and run cinterop tool like this:

cinterop -def lib.def

See provided samples and INTEROP.md for more details.

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%