Commit Graph

1724 Commits

Author SHA1 Message Date
Svyatoslav Scherbina c842b9bc73 backend: preserve .isTailrec when lowering local functions 2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina 494d825da5 backend/codegen: improve break and continue support
Do not rely on loop label.
2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina f6e8735a08 backend: fix handling continue under try with finally 2017-03-03 20:45:39 +07:00
Ilya Matveev 76fd50e16f stdlib: Return this from StringBuilder.append 2017-03-03 14:35:13 +03:00
Ilya Matveev 126d6f3d41 tests: Ignore diagnostics directives 2017-03-03 14:35:13 +03:00
Konstantin Anisimov c7e4f0f28f New tests added 2017-03-03 18:30:35 +07:00
Konstantin Anisimov b9235ca8b1 Type propagation support, stdlib compilation bug fixes, workarounds 2017-03-03 18:30:35 +07:00
Ilya Matveev 8c60968514 backend: Support IrTypeOperator.IMPLICIT_INTEGER_COERCION
Add kotlin-compiler: 1.1-20170303.084850-431.
Support IMPLICIT_INTEGER_COERCION in codegen.
Remove workaround for KT-16486.
2017-03-03 14:29:59 +03:00
Igor Chevdar 9ce2297957 Added INSTANCE_INITIALIZER_CALL to enum classes.
Initializers lowering relies on fact that each constructor calling
super constructor has also INSTANCE_INITIALIZER_CALL in it's body.
2017-03-03 13:56:42 +03:00
Igor Chevdar 6794fe432f Direct bridge call must be non-virtual. 2017-03-03 13:53:03 +03:00
Nikolay Igotti 1113cdd555 Few more functions. 2017-03-02 17:33:19 +03:00
Nikolay Igotti 7855aa7479 Few more stdlib calls. 2017-03-02 16:35:08 +03:00
Svyatoslav Scherbina d259f29352 backend: add workaround for blacklisted Cloneable in ClassDeserializer 2017-03-02 17:49:28 +07:00
Alexander Gorshenev 401ac0567e Applied the same name table fallbacks for anonymous objects as other backends do.
Note that for such snippet:

class Foo {
        private val taq = object {var a = 7}
        val y = 20
}
class Bar {
        val qux = object {var b = 9}
        val x = 10
}

the type of taq is Foo.taq.<no name provided>, but the type of qux is kotlin.Any

lazy class Foo
class Foo::this
public constructor Foo() defined in Foo[ClassConstructorDescriptorImpl@45d6ef73]
private final val taq: Foo.taq.<no name provided> defined in Foo[PropertyDescriptorImpl@720653c2]
private final fun <get-taq>(): Foo.taq.<no name provided> defined in Foo[PropertyGetterDescriptorImpl@5cbd159f]
public final val y: kotlin.Int defined in Foo[PropertyDescriptorImpl@6a84bc2a]
public final fun <get-y>(): kotlin.Int defined in Foo[PropertyGetterDescriptorImpl@3b05a99b]
@konan.SymbolName public open external fun equals(other: kotlin.Any?): kotlin.Boolean defined in Foo[DeserializedSimpleFunctionDescriptor@5226e402]
value-parameter other: kotlin.Any? defined in Foo.equals[ValueParameterDescriptorImpl@6df3e44c]
@konan.SymbolName public open external fun hashCode(): kotlin.Int defined in Foo[DeserializedSimpleFunctionDescriptor@189b5fb1]
public open fun quxqux(other: kotlin.Any?): kotlin.Boolean defined in Foo[DeserializedSimpleFunctionDescriptor@1ddd3478]
value-parameter other: kotlin.Any? defined in Foo.quxqux[ValueParameterDescriptorImpl@7ce7e83c]
@konan.SymbolName public open external fun toString(): kotlin.String defined in Foo[DeserializedSimpleFunctionDescriptor@4d33940d]

lazy class Bar
class Bar::this
public constructor Bar() defined in Bar[ClassConstructorDescriptorImpl@4a05d8ae]
public final val qux: kotlin.Any defined in Bar[PropertyDescriptorImpl@27068a50]
public final fun <get-qux>(): kotlin.Any defined in Bar[PropertyGetterDescriptorImpl@3c904f1e]
public final val x: kotlin.Int defined in Bar[PropertyDescriptorImpl@5b78fdb1]
public final fun <get-x>(): kotlin.Int defined in Bar[PropertyGetterDescriptorImpl@4eb30d44]
@konan.SymbolName public open external fun equals(other: kotlin.Any?): kotlin.Boolean defined in Bar[DeserializedSimpleFunctionDescriptor@43cf6ea3]
value-parameter other: kotlin.Any? defined in Bar.equals[ValueParameterDescriptorImpl@d56aaa6]
@konan.SymbolName public open external fun hashCode(): kotlin.Int defined in Bar[DeserializedSimpleFunctionDescriptor@37c5fc56]
public open fun quxqux(other: kotlin.Any?): kotlin.Boolean defined in Bar[DeserializedSimpleFunctionDescriptor@1c025cb]
value-parameter other: kotlin.Any? defined in Bar.quxqux[ValueParameterDescriptorImpl@6972c30a]
@konan.SymbolName public open external fun toString(): kotlin.String defined in Bar[DeserializedSimpleFunctionDescriptor@50825a02]
2017-03-02 13:06:04 +04:00
Svyatoslav Scherbina 23c70fddb0 backend/codegen: do not rely on branch result Nothing type
Fix deadCodeElimination/kt14357.kt
2017-03-02 15:09:21 +07:00
Igor Chevdar 68b3e2243b Merge branch 'property_delegation' 2017-03-01 15:39:27 +03:00
Igor Chevdar 2918e65786 Do not create KProperties field if there is no delegated properties. 2017-03-01 15:37:28 +03:00
Igor Chevdar c7e04bfd0e Removed KProperty creation from each call of delegated property. 2017-03-01 14:43:21 +03:00
Igor Chevdar e2f2e31dc1 Added delegated property through map support + tests. 2017-03-01 14:40:10 +03:00
Igor Chevdar 889b28ee87 Added link test, checking correct object field layout. 2017-03-01 14:40:10 +03:00
Igor Chevdar f534616e19 Added tests. 2017-03-01 14:40:10 +03:00
Igor Chevdar 94fd86f906 Implemented delegated properties. 2017-03-01 14:40:10 +03:00
Vasily Levchenko 02d0307609 IR: vararg lowering shouldn't skip properties' getter and setter 2017-03-01 12:26:53 +03:00
Ilya Matveev 8623a699f7 backend: Don't save default args in original function 2017-03-01 12:26:21 +03:00
Vasily Levchenko 663ad5868a ranges: pasto misleating 'external' modifier in Long.rangeTo(Byte) 2017-03-01 12:25:03 +03:00
Svyatoslav Scherbina a85d30215d backend/tests: add interop3 (uses callback) 2017-03-01 16:14:17 +07:00
Svyatoslav Scherbina 9e716291c1 Interop, backend: add partial support for callbacks
Support callbacks that don't take or return structs by value.
2017-03-01 16:14:17 +07:00
Svyatoslav Scherbina 3411ce2e8c Interop, backend: refactor and reorder interop lowering
* Do not break type compatibility when lowering interop intrinsics.
* Place interop lowering before callable reference lowering.
* Add other improvements to interop implementation.
2017-03-01 16:14:17 +07:00
Svyatoslav Scherbina 6c627a0b55 backend: add trivial utils for reporting compile errors 2017-03-01 16:14:17 +07:00
Nikolay Igotti 720c060531 Add step() infix functions. 2017-02-28 19:22:44 +03:00
vvlevchenko 9cfff757c8 IR: enum prevent loosing IrExpressionBody on lowering of enums (#279)
* IR: enum prevent loosing IrExpressionBody on lowering of enums

* IR: refactoring

* IR: refactoring : return it back

* IR: remove 'it'
2017-02-28 18:41:27 +03:00
Nikolay Igotti 3cd4f76397 Add startsWith()/endsWith(). (#281) 2017-02-28 17:03:51 +03:00
Svyatoslav Scherbina 093671f549 backend: rework builtIns configuration
* Do not create separate builtIns for analyzer.
* Make builtInsModule synthetic but depending on stdlib.
2017-02-28 17:44:22 +07:00
Svyatoslav Scherbina 5584ef2541 stdlib: add more declarations from builtIns 2017-02-28 17:44:22 +07:00
Igor Chevdar 108f2132b6 Fixed CallableReferenceLowering to visit all nodes. 2017-02-28 12:09:53 +03:00
Ilya Matveev 00e5e070d7 tests: Add a test for list sorting 2017-02-28 10:59:25 +03:00
Ilya Matveev 73adb8524d stdlib: Add mutableList.sort function 2017-02-28 10:59:25 +03:00
Ilya Matveev 135025ff8d stdlib: Add Comparator((T, T) -> Int) function 2017-02-28 10:59:25 +03:00
Ilya Matveev 1cbfa73f67 tests: Use 'prefix' property in run_external task 2017-02-28 10:49:30 +03:00
Ilya Matveev 1a45667261 backend: Lower callable references in properties 2017-02-28 10:49:30 +03:00
Nikolay Igotti a51c900271 Add equals() to basic value types. (#271) 2017-02-27 12:01:04 +03:00
Ilya Matveev 9b24f10f07 backend: Move string concatenation after inlining 2017-02-27 11:52:38 +03:00
Ilya Matveev 912fa136f1 backend: Set returnType for local constructors 2017-02-27 11:47:39 +03:00
Svyatoslav Scherbina 925b1fb0b6 backend/tests: add tests for == with Nothing/Nothing? 2017-02-27 13:16:12 +07:00
Svyatoslav Scherbina b9371332d6 backend: fix == when both parts conform to Nothing? type 2017-02-27 13:16:12 +07:00
Svyatoslav Scherbina 0688f8e758 backend: fix callable references to constructors 2017-02-27 13:16:12 +07:00
Vasily Levchenko f3dadfa61c kotlin-compiler: 1.1-20170224.164531-429 2017-02-27 06:48:31 +03:00
Vasily Levchenko c1b1f7b45c IR: vararg: process not only functions, but fiel and property initializer 2017-02-23 11:22:02 +03:00
Ilya Matveev b6d5dd5a68 backend/tests: Disable coroutines tests 2017-02-22 17:50:06 +03:00
Vasily Levchenko 4673de2fdd IR: don't stop lowering expression on first vararg expression, please lower deeper 2017-02-22 16:42:28 +03:00