Commit Graph

1757 Commits

Author SHA1 Message Date
Igor Chevdar 532cab42a7 bug fix: Callable references as arguments of callable references. 2017-03-07 18:35:36 +03:00
Igor Chevdar 1a8ce13067 Added tests 2017-03-07 18:35:36 +03:00
Igor Chevdar 776f4c4b7f Implemented callable references for properties 2017-03-07 18:35:36 +03:00
Vasily Levchenko 484fba5b55 misc: unused file 2017-03-07 18:05:08 +03:00
Vasily Levchenko 34e17e82f4 STDLIB: bunch of ranges functions 2017-03-07 17:33:15 +03:00
Vasily Levchenko 680cde41fa compiler: 1.1-20170307.124125-437 2017-03-07 17:32:25 +03:00
Nikolay Igotti 342a166ab8 Add explicit phase dependency mechanism. (#313) 2017-03-07 16:07:51 +03:00
Vasily Levchenko 996d6d8f74 IR: vararg lowering processing delegation constructor call 2017-03-07 15:37:07 +03:00
Igor Chevdar 48b0754a7b Handle specially only constructors of the class being lowered. 2017-03-07 14:27:29 +03:00
Nikolay Igotti d49c497e02 Fix lowering of default arguments to local ctors. (#309) 2017-03-07 13:44:28 +03:00
Nikolay Igotti 526c0dc924 Speed up large file compilation. (#308) 2017-03-07 13:40:25 +03:00
Vasily Levchenko 9845b589ea compiler: 1.1-20170306.122049-432 2017-03-07 09:44:42 +03:00
Alexander Udalov 1d0ec313b5 Add Package.packageFqName serializer extension 2017-03-07 09:44:42 +03:00
Igor Chevdar c76c214763 Extracted some common code.
Sometimes it would be nice to know context during IR rewriting, this is when
IrElementTransformerVoidWithContext comes in handy.
2017-03-06 21:08:56 +03:00
Igor Chevdar 8c1c9f5660 Turned off lowering of outer class for inner class constructors.
Constructors of inner classes already have access to their outer class
through its dispatch receiver parameter.
2017-03-06 21:08:56 +03:00
Nikolay Igotti 361e94fd1a Simplify default imports. 2017-03-06 15:22:44 +03:00
Igor Chevdar 2e81c045a7 Merge fix 2017-03-06 15:07:29 +03:00
Vasily Levchenko 104a983282 gradle: do not lose debugging options from java exec 2017-03-06 14:47:03 +03:00
Igor Chevdar bcd346d0f4 Bridge descriptor's visibility is equal to the visibility of its owner. 2017-03-06 14:35:39 +03:00
Igor Chevdar 810bcca552 Review fixes 2017-03-06 14:35:39 +03:00
Igor Chevdar 0ff306ad3a Rewrote enum lowering to support usage from other modules.
- Split up enum lowering into two stages: descriptors creation and IR creation.
- Added link stage test.
- Enum.valueOf() uses binary search instead of linear.
2017-03-06 14:35:39 +03:00
Igor Chevdar bf65a78a93 Made bridge methods public.
Added test on usage of a bridge method from different module.
Bridge methods must be public in order use them from other modules.
2017-03-06 14:35:39 +03:00
Igor Chevdar 7d433be68b Added lowering of property callable reference for provideDelegate.
PropertyDelegationLowering is now lowering all callable references to properties.
2017-03-06 14:34:23 +03:00
Svyatoslav Scherbina 2d3879ea0d backend/tests: add more tailrec tests 2017-03-06 17:09:05 +07:00
Svyatoslav Scherbina fe55e1f0e2 backend: fix tailRecursion/defaultArgsOverridden.kt 2017-03-06 17:09:05 +07:00
Svyatoslav Scherbina ac757e1285 backend: workaround boxing of IMPLICIT_INTEGER_COERCION result 2017-03-06 15:19:27 +07:00
vvlevchenko a1f2b572a8 gradle: KonanTest extends from JavaExec making tests debugging rather easy task (#299) 2017-03-04 00:32:27 +03:00
Igor Chevdar cf32f89697 Eliminated all hacks related to IR bugs with delegated descriptors. 2017-03-03 17:00:15 +03:00
Svyatoslav Scherbina 8427612d59 backend/tests: add trivial tests for tailrec 2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina 9a28d648a8 backend: implement tailrec lowering 2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina 701cbebf5c backend: implement tail recursion calls collector 2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina 62d5f69ef0 backend: implement copying IR tree with variable declarations 2017-03-03 20:45:39 +07:00
Svyatoslav Scherbina 6e17507cde backend: move some sources to common packages 2017-03-03 20:45:39 +07:00
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