Svyatoslav Scherbina
d99f41d62b
backend: support boxing when generics involved
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
6a3a70a7d5
backend: use "erased" types for LLVM function signatures
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
9135e359e3
runtime: implement remaining boxing
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
d7d9f7b604
runtime: add missing toChar implementations
...
(required for boxes)
2017-01-19 11:41:12 +07:00
Konstantin Anisimov
67013f8a60
Two passes inline scheme implemented
2017-01-18 17:22:14 +07:00
Konstantin Anisimov
551218c133
TESTS: new tests added
2017-01-18 17:21:04 +07:00
Konstantin Anisimov
faf64ec330
Refactoring
2017-01-13 11:37:37 +07:00
Konstantin Anisimov
eba08c5674
New "return" remove scheme
2017-01-11 16:21:42 +07:00
Konstantin Anisimov
9a363ceaf6
TESTS: new tests added
2017-01-09 17:16:54 +07:00
Konstantin Anisimov
49bedf1cc3
Comments added
2017-01-09 17:16:24 +07:00
Konstantin Anisimov
0d06299fe3
Inlining enabled for functions with arguments
2017-01-09 17:16:24 +07:00
Konstantin Anisimov
c46ba1aa3f
TESTS: passing changes in the test
2017-01-09 17:16:24 +07:00
Konstantin Anisimov
252af6ce15
TESTS: test for inlining integrated in the testsuite
2017-01-09 17:16:24 +07:00
Konstantin Anisimov
c106e4622c
Function without args returnung void has been inlined
2017-01-09 17:15:24 +07:00
Konstantin Anisimov
ee184de993
Create map FunctionDescriptor to FunctionDeclaration
2017-01-09 17:15:24 +07:00
Konstantin Anisimov
303e6a7c79
Inlining phase inserted
2017-01-09 17:15:24 +07:00
Konstantin Anisimov
df87c8e794
TEST: test for inlining added
2017-01-09 17:01:34 +07:00
Vasily Levchenko
1b79ae1ade
.gitignore: .bc.o added
...
(cherry picked from commit 02ebe718f1da06a2286ddab56da09a146a491000)
2017-01-09 12:29:17 +03:00
Nikolay Igotti
61d6967f3c
Support missing when branch exception throwing. ( #174 )
2016-12-31 12:01:56 +03:00
Svyatoslav Scherbina
3a9ba76d91
backend/build: rebuild stdlib and start if Kotlin sources changed
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
d1892a35ba
stdlib: disable HashMap views caching because it leads to memory leaks
...
due to reference cycles
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
5d8a28e5fc
backend/tests: add runtime/memory/throw_cleanup.kt
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
4cfe569001
backend: perform cleanup if leaving the frame with exception
...
Also unify `call` & `invoke`, allow `call` without landingpad only if
target function is nounwind
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
d389897631
backend: generate refs cleanup code for exceptional unwind
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
57ae3a1cc7
runtime: mark some functions as not throwing (nounwind)
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
7374ea642f
backend: import external functions with proper attributes
2016-12-30 14:48:51 +07:00
Svyatoslav Scherbina
b531d984c8
backend/build: add hack to workaround missing interop features
2016-12-30 14:48:51 +07:00
Nikolay Igotti
667d3b9356
Switch when to phi. ( #172 )
2016-12-29 16:33:23 +03:00
Alexander Gorshenev
c15fb6833d
Profiling machinery.
2016-12-29 16:07:43 +04:00
Alexander Gorshenev
3f65eeaeab
Changed byte array copying to a more efficient mechanism.
2016-12-29 16:07:43 +04:00
Nikolay Igotti
174cdc321c
Properly keep track of references. ( #169 )
2016-12-29 14:11:17 +03:00
Svyatoslav Scherbina
b25225ba5e
Review feedback
2016-12-29 17:46:28 +07:00
Svyatoslav Scherbina
4f1004c8f5
backend: reorder basic blocks to improve bitcode readability.
...
* Insert created basic block after the current one in `codegen.basicBlock()`.
* Slightly reorder calls to `codegen.basicBlock()`.
2016-12-29 17:46:28 +07:00
Nikolay Igotti
7ba096b169
Group slots together. ( #166 )
2016-12-29 09:00:01 +03:00
Svyatoslav Scherbina
276e3bcd44
backend/tests:
...
* enable 'expression_as_statement'
* add unit{1..4}
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
43b3902a0f
backend: refactor evaluateExpression
...
* Do not encode `Unit`- and `Nothing`-typed values as `null`;
make `evaluateExpression` return type not nullable.
* Evaluate only expressions, not statements.
* Reduce usage of recursive visiting in `CodeGeneratorVisitor`
because it usually leads to errors.
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
dfa07836fd
backend: add workaround for phi nodes with zero entries
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
7797b0efdc
backend: treat kotlin.Unit type specially only when used as return type
...
also remove some hacks related to Unit.
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
9a3bcd4c19
backend: statically instantiate kotlin.Unit
...
and optimize IrGetObjectValue(Unit)
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
462d2b5123
backend/StaticData: weaken existing global assertion
...
to handle the case when global is used before defined
(e.g. kotlin.Unit in stdlib).
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina
361bb7a101
runtime, backend: simplify static objects layout:
...
mark static objects with container_offset_negative_ == 0
2016-12-29 12:18:15 +07:00
Nikolay Igotti
ddf47e9359
Add more init tests.
2016-12-28 15:26:44 +03:00
Svyatoslav Scherbina
c0914825d9
backend/tests: add disabled test 'fields2'
...
Checks properties with custom accessors and backing fields.
2016-12-28 14:00:45 +07:00
Svyatoslav Scherbina
8b40b9645a
backend/tests: add disabled tests memory_var{1..4}
2016-12-28 13:51:14 +07:00
Alexander Gorshenev
413f47fda5
Removed 'clang' invocations in favour of llvm tools and 'ld'.
...
Introduced LinkStage in the compiler.
Removed the link stage from 'konanc'.
Removed duplicate :stdlib and :start targets.
Simplified test run task a lot.
2016-12-28 02:13:07 +04:00
Nikolay Igotti
e65b86ab21
Memory management design and implementation. ( #148 )
2016-12-27 15:01:18 +02:00
Alexander Gorshenev
c9fbd37f90
Use lower case for phase names.
2016-12-27 16:11:45 +04:00
Vasily Levchenko
3fe59cc46c
TEST: convertion unit tests into run tests
2016-12-27 13:56:03 +03:00
Svyatoslav Scherbina
7fd4b4fe34
backend: use IR builders in CallableReferenceLowering
2016-12-27 16:04:40 +07:00
Svyatoslav Scherbina
7b29f4854c
backend: lower safe casts
2016-12-27 16:04:40 +07:00