Konstantin Anisimov
43a6cf722d
merge
2017-02-03 11:49:42 +07:00
Konstantin Anisimov
bdbb5d7b94
Merge branch 'proper-inline' into inline
...
# Conflicts:
# backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLower.kt
# backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt
# backend.native/tests/build.gradle
# backend.native/tests/codegen/inline/inline5.kt
# gradle.properties
2017-02-03 11:18:47 +07:00
Konstantin Anisimov
880fc6c0f3
Merge
2017-02-02 18:21:53 +07:00
Konstantin Anisimov
7632a6061e
Merge branch 'inline' of https://github.com/JetBrains/kotlin-native into inline
2017-02-02 17:47:00 +07:00
Konstantin Anisimov
c745af1fe8
Sorce location has been changed
2017-02-02 16:56:37 +07:00
Konstantin Anisimov
e0a3c4ad4c
TESTS
2017-02-02 16:34:26 +07:00
Konstantin Anisimov
be2b2f1b43
Non local return implemented
2017-02-02 16:33:55 +07:00
Konstantin Anisimov
043fd8b0ec
Lambda without parameters is inlined
2017-02-01 16:39:53 +07:00
Konstantin Anisimov
0e9ca39d9f
Intermediate results
2017-01-31 16:04:57 +07:00
Konstantin Anisimov
8d943bc5ab
Inlining moved in the beginning of lowering passes
2017-01-31 16:03:30 +07:00
Konstantin Anisimov
e10d9b62e2
TESTS: new tests added
2017-01-31 16:01:46 +07:00
Konstantin Anisimov
1b17d8d1f9
Evaluation of parameter expression implemented
2017-01-24 15:44:54 +07:00
Konstantin Anisimov
88d830e5b7
TESTS: new test added
2017-01-24 15:43:36 +07:00
Konstantin Anisimov
69661444ce
TESTS: new tests added
2017-01-20 15:46:55 +07:00
KonstantinAnisimov
e604efb254
Merge pull request #176 from JetBrains/inline
...
Inline
2017-01-20 10:26:52 +07:00
KonstantinAnisimov
1a83014eba
Merge branch 'master' into inline
2017-01-20 10:26:34 +07:00
Konstantin Anisimov
16344218c0
TESTS: new inline tests added
2017-01-19 11:56:52 +07:00
Svyatoslav Scherbina
4667714e16
backend/tests: add objectInitialization1
2017-01-19 11:41:59 +07:00
Svyatoslav Scherbina
c3e1dc37f2
backend, runtime: place vtable at the end of TypeInfo
2017-01-19 11:41:59 +07:00
Nikolay Igotti
24219c86b3
Implement virtual invoke via vtables. ( #181 )
...
Small refactoring to share vtable computation code.
2017-01-19 11:41:59 +07:00
Vasily Levchenko
965bb031a0
compiler: 1.1-20170116.100209-359
2017-01-19 11:41:59 +07:00
Nikolay Igotti
56bdfc663a
Improve object arrays support. ( #182 )
...
Also fix the way how symbol names are being generated. Before arrays2.kt was not linking.
2017-01-19 11:41:59 +07:00
Svyatoslav Scherbina
709113fde7
backend/tests: add defaults{4,5,6}
2017-01-19 11:41:59 +07:00
Vasily Levchenko
486d95c101
IR: default parameter extension support
...
for code
```
fun Int.foo(a:Int, b:Int = a + 1, c:Int = a + b) = a + b +c
fun main(arg:Array<String>) {
42.foo(0)
}
```
we generate IR representation corresponding to the following code
```
fun Int.foo(a:Int, b:Int, c:Int) = a + b +c
fun foo_default(a:Int, b:Int, c:Int, __mask__:Int, __receiver__:Int):Int {
var tmpb:Int = 0
if ((__mask__ and (1 shl 1)) != 0)
tmpb = a + 1
else
tmpb = b
var tmpc:Int = 0
if ((__mask__ and (1 shl 2)) != 0)
tmpc = a + tmpb
else
tmpc = c
return __receiver__.foo(a, tmpb, tmpc)
}
fun main(arg:Array<String>) {
foo_default(0, 0, 0, 6 /* (1 shl 1) | (1 shl 2)*/, 42)
}
```
NOTE: if call provides all arguents we don't emit call of _default function.
2017-01-19 11:41:59 +07:00
Vasily Levchenko
6ec207cabc
TEST: test for default parameters
...
(cherry picked from commit 7999d68d812aedd5863f04b7fd2171e284b8f332)
2017-01-19 11:41:59 +07:00
Svyatoslav Scherbina
497de0dc8d
backend: update kotlin-compiler and remove code contributed to Kotlin
...
Update kotlin-compiler to 1.1-20170112.203631-353
Also remove workarounds for fixed bugs.
2017-01-19 11:41:59 +07:00
Nikolay Igotti
abd30d2e04
GC interface. ( #178 )
2017-01-19 11:41:59 +07:00
Nikolay Igotti
ecf66ab23b
Cycle collector. ( #175 )
2017-01-19 11:41:59 +07:00
Svyatoslav Scherbina
14695bf20e
backend: enable some tests
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
ae117b020e
runtime: enable some stdlib code
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
adc86dd029
backend: improve support for references to vararg functions
...
(doesn't happen for now)
2017-01-19 11:41:12 +07:00
Svyatoslav Scherbina
02ae38d4a7
backend: erase types in callable reference targets
...
(required because function types are not specialized yet)
2017-01-19 11:41:12 +07:00
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
Svyatoslav Scherbina
8474168960
backend/tests: add objectInitialization1
2017-01-18 12:33:43 +07:00
Svyatoslav Scherbina
648e728d90
backend, runtime: place vtable at the end of TypeInfo
2017-01-17 13:26:32 +07:00
Nikolay Igotti
913916e6dd
Implement virtual invoke via vtables. ( #181 )
...
Small refactoring to share vtable computation code.
2017-01-16 15:25:36 +03:00
Vasily Levchenko
56093ecbe0
compiler: 1.1-20170116.100209-359
2017-01-16 14:19:07 +03:00
Nikolay Igotti
90577d440a
Improve object arrays support. ( #182 )
...
Also fix the way how symbol names are being generated. Before arrays2.kt was not linking.
2017-01-16 12:22:27 +03:00
Svyatoslav Scherbina
3b4c25988e
backend/tests: add defaults{4,5,6}
2017-01-16 10:57:40 +07:00
Vasily Levchenko
81d77c39f4
IR: default parameter extension support
...
for code
```
fun Int.foo(a:Int, b:Int = a + 1, c:Int = a + b) = a + b +c
fun main(arg:Array<String>) {
42.foo(0)
}
```
we generate IR representation corresponding to the following code
```
fun Int.foo(a:Int, b:Int, c:Int) = a + b +c
fun foo_default(a:Int, b:Int, c:Int, __mask__:Int, __receiver__:Int):Int {
var tmpb:Int = 0
if ((__mask__ and (1 shl 1)) != 0)
tmpb = a + 1
else
tmpb = b
var tmpc:Int = 0
if ((__mask__ and (1 shl 2)) != 0)
tmpc = a + tmpb
else
tmpc = c
return __receiver__.foo(a, tmpb, tmpc)
}
fun main(arg:Array<String>) {
foo_default(0, 0, 0, 6 /* (1 shl 1) | (1 shl 2)*/, 42)
}
```
NOTE: if call provides all arguents we don't emit call of _default function.
2017-01-13 13:42:02 +03:00
Vasily Levchenko
a8caf7c7d8
TEST: test for default parameters
...
(cherry picked from commit 7999d68d812aedd5863f04b7fd2171e284b8f332)
2017-01-13 13:42:02 +03:00
Svyatoslav Scherbina
b994fabadd
backend: update kotlin-compiler and remove code contributed to Kotlin
...
Update kotlin-compiler to 1.1-20170112.203631-353
Also remove workarounds for fixed bugs.
2017-01-13 16:13:49 +07:00
Nikolay Igotti
239a573142
GC interface. ( #178 )
2017-01-13 12:03:38 +03:00
Konstantin Anisimov
faf64ec330
Refactoring
2017-01-13 11:37:37 +07:00
Nikolay Igotti
b1101ba43e
Cycle collector. ( #175 )
2017-01-11 17:38:03 +03:00