Commit Graph

1039 Commits

Author SHA1 Message Date
Alexander Gorshenev dc80ba3492 Moved KonanLibrary to org.jetbrains.kotlin.backend.konan.util.File
instead of java.io.File.
2017-05-18 04:13:35 +03:00
Alexander Gorshenev 3b5ce031f8 Initial checkin of klib support.
The libraries exist in two incarnations:
    packed foo.klib and unpacked foo/ .
The compiler when given '-library foo' expects to find either
a foo.klib file and unpack it, or an already unpacked foo/ directory.

The stdlib is always unpacked in dist/klib .

The semantics of -o has changed slightly.
It now accepts '-o foo' and the compiler
either produces foo.kexe or foo.klib .
2017-05-18 04:13:35 +03:00
Alexander Gorshenev 77e093354f Squash me more. 2017-05-17 22:04:32 +03:00
Alexander Gorshenev bb40d015d0 Fix up after the code review. Squash me. 2017-05-17 22:04:32 +03:00
Alexander Gorshenev d4c34b29c1 Added support for inline class members.
Inline constructors in particular.
2017-05-17 22:04:32 +03:00
Alexander Gorshenev 2a246a9a3a Some tests for inline members. 2017-05-17 22:04:32 +03:00
Igor Chevdar 8a789a9ac4 Added test on function overriding return type with Unit 2017-05-16 16:30:29 +03:00
Igor Chevdar bdb185ee93 Added bridge for functions overriding return type with Unit 2017-05-16 16:30:29 +03:00
Konstantin Anisimov 3e35db5a51 Generate artificial return for inlined constructor 2017-05-16 19:24:52 +07:00
Igor Chevdar e15878bfe9 Fresh box tests 2017-05-15 15:24:58 +03:00
Alexander Gorshenev b5fcf0087b Print deserializer failure stack trace only if verbose mode is on. 2017-05-11 18:24:18 +03:00
Igor Chevdar 8f53018653 Disabled warning that coroutines are experimental 2017-05-11 12:51:05 +03:00
Igor Chevdar 29c30545e5 Coroutines lowering: fixed bug appeared after merging with IR symbols 2017-05-11 11:37:32 +03:00
Alexander Gorshenev 5d1e6acb7c Mangle "*" as #STAR, rather than an explicit variance plus a bound. 2017-05-10 19:30:22 +03:00
Igor Chevdar 39d1b8956d Test on abstract bridge 2017-05-10 15:44:22 +03:00
Igor Chevdar 97fe5c6b46 Abstract methods can also have bridges 2017-05-10 15:44:22 +03:00
Konstantin Anisimov 715db233f9 Code formatting 2017-05-10 18:31:02 +07:00
Konstantin Anisimov eba8a50c43 Code formatting 2017-05-10 18:31:02 +07:00
Konstantin Anisimov ba1f3d502e Use annotation to distinct inline constructor 2017-05-10 18:31:02 +07:00
Konstantin Anisimov 31a24d4607 Replace DelegatingConstructorCall with IrCall
Replace "this" with result of IrCall
2017-05-10 18:31:02 +07:00
Vasily Levchenko 432a2c1dda CODEGEN: typo missed int type 2017-05-10 10:52:28 +03:00
SvyatoslavScherbina 88e3c1d05c Implement parsing additional interop header directly from .def file (#557) 2017-05-09 19:48:19 +03:00
Svyatoslav Scherbina c2d556503d Fix bug in function inlining
Fake overrides have IR now, so their declarations can be found by inliner
but are fake and thus unusable.
2017-05-08 13:31:45 +03:00
Svyatoslav Scherbina 68e6ff614d Fix bug in local declarations lowering
IrCall doesn't provide `.shallowCopy` now, so the unreachable buggy code
became reachable.
2017-05-08 13:31:45 +03:00
Svyatoslav Scherbina 0b1e7c9526 Update compiler to IR with symbols, part 1
The produced symbols are currently unbound and thus useless.
2017-05-08 13:31:45 +03:00
Alexander Gorshenev 065fb6def5 Don't serialize empty packages for modules with dependencies. 2017-05-05 12:52:50 +03:00
Vasily Levchenko 9d63662fbe CODEGEN: generation type info for complex types and refactoring.
- unchecked_cast warning suppression
- move subroutineType ext function to DebugUtils.
- there is only one diType in caodegen
- generate type references for complex types if they are references
- generating array types
2017-05-04 20:35:44 +03:00
Vasily Levchenko dc8bcc677a DEBUGINFO: binding enchancement && composite type support
- structured datatypes usable in debug info
- bindings for llvm/Support/Dwarf.h (llvm 3.9) makes easier introducing dwarf constants from LLVM
- added HANDLE_DW_LANG generating sequence DW_LANGs (DW_LANG_Kotlin equals DW_LANG_C89 for now).
- refactoring : g/c typo
- tag (DwarfTag) of the type added as parameter in DICreateReplaceableCompositeType
- binding for creating reference type
- binding for creating array type.
2017-05-04 20:35:44 +03:00
Igor Chevdar 8fbc06809a Codegen: optimization of catch (t: Throwable) {} 2017-05-04 20:44:36 +05:00
Igor Chevdar 39c6aa0f2c Fixed bug in DeepCopyIrWithDescriptors 2017-05-04 20:44:36 +05:00
Igor Chevdar 4dcee48e1f Removed CodeContext from scope of a variable 2017-05-04 20:44:36 +05:00
Igor Chevdar ca4beb171b Pulled up functions for working with stack on top level 2017-05-04 20:44:36 +05:00
Igor Chevdar e600c93dfa Enabled tests with finally blocks on coroutines + added tests 2017-05-04 20:44:36 +05:00
Igor Chevdar 1d9ccb36f3 Renamed IrInlineFunctionBody to IrReturnableBlock 2017-05-04 20:44:36 +05:00
Igor Chevdar 667b5fb936 Removed finally blocks handling from code generator 2017-05-04 20:44:36 +05:00
Igor Chevdar 3c84e39360 Finally blocks lowering 2017-05-04 20:44:36 +05:00
Igor Chevdar a7caf5ba29 Coroutines lowering: minor refactoring 2017-05-04 20:44:36 +05:00
Konstantin Anisimov 6e7cb64b37 Typos fixed 2017-05-04 15:14:54 +07:00
Konstantin Anisimov 1e134f7062 Use fqName
Add BooleanArray
Use set
2017-05-04 15:14:54 +07:00
Konstantin Anisimov 666f052b10 Enforce inlining for *Array constructors 2017-05-04 15:14:54 +07:00
Ilya Matveev adb6e17b60 backend: Implement executableScriptFileName method in K2Native 2017-05-03 22:06:26 +07:00
Ilya Matveev 717f9ebc74 tests: Don't assume that NaN > any double in coercion test 2017-05-03 16:59:59 +07:00
Ilya Matveev 74bd3256f0 runtime: Correct Float.MIN_VALUE 2017-05-03 16:59:59 +07:00
Ilya Matveev 4179b5ddd6 tests: Disable tests that assume that NaN is greater than any value 2017-05-03 16:59:59 +07:00
Svyatoslav Scherbina c222eb8f04 Fix conversion between P1.(...)->R and (P1, ...)->R when inlining 2017-05-02 22:18:18 +03:00
Svyatoslav Scherbina a8ab837035 Add failing test 'inline24' 2017-05-02 22:18:18 +03:00
Ilya Matveev fe5badee34 build: Store kotlin-compiler repo URL in a project property 2017-05-02 18:17:27 +07:00
Ilya Matveev 3f0a273a11 build: Switch Kotlin compiler downloading to kotlin-dev bintray repo
This patch uses kotlin-dev bintray repo (dl.bintray.com/kotlin/kotlin
-dev/org/jetbrains/kotlin/kotlin-compiler/) for Kotlin compiler
downloading instead of the sonatype repo and our bintray mirror of it.
So there is not need to run ./gradlew update_kotlin_compiler on each
compiler update.

It also updates kotlin-compiler to 1.1.3-dev-1619
2017-05-02 18:17:27 +07:00
Ilya Matveev 94c1716899 build: Fix dependency uploading to bintray repo 2017-05-02 18:17:27 +07:00
Igor Chevdar 57c889de41 SuspendFunctionLowering: optimizations of ExpressionSlicer 2017-04-28 13:46:44 +03:00