Svyatoslav Scherbina
7f90ce3d8a
backend: support native interop value types
...
also improve reliability of `==` lowering
2017-02-06 11:58:10 +07:00
Svyatoslav Scherbina
1bafee0ac3
backend: add utils for interop support
2017-02-06 11:58:10 +07:00
Svyatoslav Scherbina
d02fd5ec1b
build: add Interop/Runtime to stdlib
2017-02-06 11:58:10 +07:00
Svyatoslav Scherbina
6939398521
Interop/Runtime: fix major bug: alloc C strings using correct placement
2017-02-06 11:58:10 +07:00
Svyatoslav Scherbina
49815f72e0
Interop/Runtime: add support for Kotlin Native
...
Also add minor improvements, fix bugs and workaround missing features.
2017-02-06 11:58:10 +07:00
Svyatoslav Scherbina
91aab11e01
backend: remove special handling for setter call because it is incorrect
...
Handle it as usual call.
2017-02-06 11:58:10 +07:00
Igor Chevdar
2f9bde4482
Local objects ( #215 )
...
* bug fix
* bug fix with nested inner classes
* - fixed FixMeInner
- support of inner classes in local classes
- support of object expressions in initializers
* comments
* merged modification
* - review fixes
- tests
* review fixes
* review fixes
2017-02-03 19:41:34 +05:00
Konstantin Anisimov
bd129d62c9
Comments added. Variables renamed
2017-02-03 19:36:01 +07:00
Konstantin Anisimov
90b12e3041
Merge
2017-02-03 19:26:31 +07:00
Konstantin Anisimov
4306215b18
Merge
2017-02-03 19:19:00 +07:00
Konstantin Anisimov
697140de49
TESTS
2017-02-03 18:09:33 +07:00
Konstantin Anisimov
922eb9fac3
Non local return implemented
2017-02-03 18:09:28 +07:00
Konstantin Anisimov
d966cae14a
Lambda without parameters is inlined
2017-02-03 18:07:50 +07:00
Konstantin Anisimov
279684f6aa
Intermediate results
2017-02-03 18:07:50 +07:00
Konstantin Anisimov
5ce0e2c74f
Inlining moved in the beginning of lowering passes
2017-02-03 18:07:05 +07:00
Konstantin Anisimov
70b35f9aa7
TESTS: new tests added
2017-02-03 18:05:56 +07:00
Konstantin Anisimov
8dece0f817
Evaluation of parameter expression implemented
2017-02-03 18:05:40 +07:00
Konstantin Anisimov
97411bca6e
TESTS: new test added
2017-02-03 18:05:40 +07:00
Konstantin Anisimov
02e604cc71
TESTS: new tests added
2017-02-03 18:05:40 +07:00
Konstantin Anisimov
9e3fe3a41c
TESTS: new inline tests added
2017-02-03 18:05:38 +07:00
Nikolay Igotti
ae49bd8432
Improve object arrays support. ( #182 )
...
Also fix the way how symbol names are being generated. Before arrays2.kt was not linking.
2017-02-03 18:04:36 +07:00
Vasily Levchenko
26ee99185c
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-02-03 18:03:14 +07:00
Nikolay Igotti
e3662bfa1e
Cycle collector. ( #175 )
2017-02-03 18:00:58 +07:00
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
6b99f38521
Merge branch 'master' of https://github.com/JetBrains/kotlin-native
2017-02-03 10:37:20 +07:00
Svyatoslav Scherbina
f6cab824ab
backend/tests: enable boxing15
2017-02-02 19:22:22 +07:00
Svyatoslav Scherbina
15107f4cdc
backend: improve value types support:
...
Introduce value type definition.
Use the same type checking strategy in codegen and autoboxing.
Optimize the latter by that.
2017-02-02 19:22:22 +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
Ilya Matveev
31a0423225
build: Do not build runtime and stdlib for dist_compiler task
2017-02-02 13:21:11 +03:00
Konstantin Anisimov
263e658b1b
Merge
2017-02-02 17:13:19 +07:00
Konstantin Anisimov
4be3649daf
Merge
2017-02-02 17:11:57 +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
Ilya Matveev
b4ee0e86d2
backend: Fix uninitialized property access in LocalDeclarationsLowering
2017-02-02 10:22:31 +03:00
Ilya Matveev
f960c70c68
backend: Copy AbstractClosureRecorder from Kotlin JVM
...
Copied from org.jetbrains.kotlin.backend.common.
AbstractClosureAnnotator
2017-02-02 10:22:31 +03:00
Vasily Levchenko
e7159d364f
TEST: with no parameters to vararg
2017-02-02 07:49:35 +03:00
Vasily Levchenko
2479593f44
IR: using function descriptor valueParameters field instead of visiting children of IrCall
...
code
```
fun foo(vararg x: Any?) {}
fun bar() = foo()
```
produce following IR:
```
FUN public fun bar(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='bar(): Unit'
CALL 'foo(vararg Any?): Unit' type=kotlin.Unit origin=null
x: BLOCK type=kotlin.Array<T> origin=null
CALL 'constructor Array(Int)' type=kotlin.Array<T> origin=null
<T>: Any?
size: CONST Int type=kotlin.Int value='0'
```
2017-02-02 07:49:35 +03:00
Nikolay Igotti
bb43b6ab09
Fix Any.toString().
2017-02-01 18:17:50 +03:00
Nikolay Igotti
6192dc254a
Fix way how function table is built. Allows to extend Exception class. ( #210 )
2017-02-01 15:43:28 +03:00
Konstantin Anisimov
043fd8b0ec
Lambda without parameters is inlined
2017-02-01 16:39:53 +07:00
Vasily Levchenko
06c703f840
IR: lowering for vararg expressions including spread element.
2017-01-31 21:10:50 +03:00
Vasily Levchenko
4905d2a056
STDLIB: internal Array::<init>(Int) obtains konan.internal.ExportForCompiler annotation
2017-01-31 21:10:50 +03:00
Vasily Levchenko
458aa058c0
RUNTIME: grant access to symvols marked with konan.internal.ExportForCompiler
2017-01-31 21:10:50 +03:00
Vasily Levchenko
47a5e13ff3
STDLIB: konan.internal.ExportForCompiler added annotation to mark symbol exported for generation with compiler
2017-01-31 21:10:50 +03:00
Igor Chevdar
4911f78200
Inner classes ( #207 )
...
* Inner classes lowering
* cmd line fix
* tests
* * reverted adding parameter to inner classes constructors
* variables are identified by their descriptors
* review fixes
2017-01-31 15:36:21 +05: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