Ilya Matveev
a3b8d26c1f
runtime: Avoid UB in shift operations
2017-01-23 10:33:06 +03:00
Ilya Matveev
154c889517
runtime: Add exception for division by zero
2017-01-23 10:33:06 +03:00
Ilya Matveev
7f911b8085
backend/tests: Ignore binaryOp/compareWithBoxed... tests
2017-01-23 10:33:06 +03:00
Ilya Matveev
4765a20ae8
Add bitwise operations for Short and Byte
...
This commit adds and, or and xor operations to Byte and Short types.
It also implements inv operation for all integer types, shl for Long
and Char + Int operation.
2017-01-23 10:33:06 +03:00
Alexander Gorshenev
afaa50ce34
Introduced -target and -list_targets flags.
...
Use it like
$ konanc hello.kt -target iphone
2017-01-23 00:17:39 +04:00
Nikolay Igotti
d31b44135a
Temporary disable inlining.
2017-01-20 19:03:54 +03:00
Svyatoslav Scherbina
1f7738e052
backend: fix minor bug in evaluateWhen
...
Also add the corresponding test 'when9'.
2017-01-20 20:02:50 +07:00
Svyatoslav Scherbina
0958d32605
backend: improve typealias support:
...
* handle TypeAliasConstructorDescriptor in codegen
* ignore ignore typealias declaration in codegen
Also add test 'typealias1'.
2017-01-20 20:02:50 +07:00
Svyatoslav Scherbina
65444ec690
backend: improve type operators support:
...
* add initial support for casts with generics;
* optimize out the casts to subtypes
Also add tests unchecked_cast{1,2}, the latter is disabled.
2017-01-20 20:02:50 +07:00
ilmat192
9bf0380048
Merge pull request #185 from JetBrains/blackbox-testing
...
Blackbox testing
2017-01-20 14:28:09 +03:00
Ilya Matveev
48122c8a03
backend/tests: Add test result reporting to run_external task.
...
+ regenerate external tests.
2017-01-20 14:24:35 +03:00
Ilya Matveev
d18219c383
backend/tests: Fixes in regenerate_external_tests task
2017-01-20 14:24:35 +03:00
Ilya Matveev
6efe2b6d31
backend/tests: Add compilation logging
2017-01-20 14:24:35 +03:00
Ilya Matveev
8ec33334a4
backend/tests: Enable some tests in the binaryOp group
2017-01-20 14:24:26 +03:00
Ilya Matveev
2ef49da2fe
backend/tests: Ignore all tests with IGNORE_BACKEND: JS directive
2017-01-20 14:04:04 +03:00
Ilya Matveev
89a74c0591
backend/tests: Use IGNORE_BACKEND directive to exclude java-dependent tests
2017-01-20 14:04:04 +03:00
Ilya Matveev
d24f966600
backend/tests: Regenerated external test tasks
2017-01-20 14:04:04 +03:00
Ilya Matveev
bfdda21da1
backend/tests: Added task generation for test groups instead of tests
2017-01-20 14:04:04 +03:00
Ilya Matveev
b6587252c0
backend/tests: Added test group running
2017-01-20 14:04:04 +03:00
Ilya Matveev
ee58c7ee5f
backend/tests: Added autogenerated tasks for external tests
2017-01-20 14:04:04 +03:00
Ilya Matveev
fd44baf2c0
backend/tests: Infrastructure for external test running
2017-01-20 14:04:04 +03:00
Ilya Matveev
1b553ebfaf
backend/tests: Add blackbox tests from Kotlin JVM
...
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00
Svyatoslav Scherbina
d5988297b1
backend/tests: add objectExpression{1,2,3}
2017-01-20 17:53:38 +07:00
Svyatoslav Scherbina
26e1075893
backend: lower local classes
2017-01-20 17:53:38 +07:00
Svyatoslav Scherbina
ead5f93a90
backend: rename Local{Functions => Declarations}Lowering
2017-01-20 17:53:38 +07:00
Svyatoslav Scherbina
28f1f5a180
backend: import LocalFunctionsLowering again
2017-01-20 17:53:38 +07:00
Svyatoslav Scherbina
40eea333ce
backend: build ModuleIndex for codegen after lowering
2017-01-20 17:53:38 +07:00
Svyatoslav Scherbina
97b5c60455
backend: support IrField located directly at IrClass
2017-01-20 17:53:38 +07:00
Nikolay Igotti
eb6ba1cfa5
Fix primitive type globals initialization. ( #189 )
2017-01-20 13:31:47 +03:00
Nikolay Igotti
1c878e4843
Improve object init order. ( #187 )
2017-01-20 13:31:01 +03:00
Vasily Levchenko
0e05d3b30a
compiler: 1.1-20170119.231846-374
2017-01-20 12:06:53 +03: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
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
Svyatoslav Scherbina
8b83cb2adf
backend: enable some tests
2017-01-11 19:32:25 +07:00
Svyatoslav Scherbina
26dd735240
runtime: enable some stdlib code
2017-01-11 19:32:25 +07:00
Svyatoslav Scherbina
7464b2cb09
backend: improve support for references to vararg functions
...
(doesn't happen for now)
2017-01-11 19:32:25 +07:00