Commit Graph

93 Commits

Author SHA1 Message Date
Igor Chevdar 4835aa3e74 Added tests on bridges 2017-02-22 15:35:13 +03:00
Konstantin Anisimov 3b5c16076e TESTS: New tests added 2017-02-21 16:12:52 +07:00
Ilya Matveev c68c4d3b6d backend: Use simple DFS during closure building.
Now closure builder can contain includes. Includes
are another builders which closures must be added
to the building one.
Includes are:

For function closure:
	call targets (including constructors)
	callable reference targets

For class:
	all children declarations
	call targets (including constructors)
        callable reference targets

For constructor:
	call and callable reference targets
	delegating constructor call target
	constructing class closure
2017-02-17 15:17:46 +03:00
Ilya Matveev 95a9f65afd backend/tests: Add tests for local function closures 2017-02-17 15:17:46 +03:00
Igor Chevdar c746da3ce4 Bridges (#240)
* - bridges building
- bridges support in vtable and methods table

* FunctionDescriptor.signature fix + some assertions

* tests

* refactoring

* refactoring

* removed debug output

* refactoring

* review fixes

* implemented bridge construction for parameters

* tests

* refactoring

* removed custom box/unbox

* added bridge for extension receiver
2017-02-16 15:26:57 +05:00
Konstantin Anisimov 76ebe9d870 TESTS: recursive inlining 2017-02-16 15:49:04 +07:00
Vasily Levchenko 6310ec80c3 TEST: added defaults9 test 2017-02-16 11:40:10 +03:00
Vasily Levchenko c395bc80a0 TEST: defaults7 test enabled and defaults4 was enabled 2017-02-15 14:48:28 +03:00
Igor Chevdar 5c8368847a Containing declaration elimination (#225)
* rewrote AbstractClosureAnnotator not using containingDeclaration

* bug fix

* bug fix

* review fixes + tests

* review fixes

* refactoring

* fix
2017-02-09 16:53:47 +05:00
Igor Chevdar a856e16d2f Local declarations and initializers fixes (#222)
* captured values are stored in corresponding fields before call to super constructor

* preserving the order of initializers

* tests

* refactoring

* - test fix
- workaround of IR bug

* refactoring

* review fix
2017-02-08 14:52:26 +05:00
KonstantinAnisimov dcb0a074da Merge branch 'master' into inline 2017-02-06 17:21:28 +07:00
Konstantin Anisimov 99ef87ec78 TESTS: new tests added 2017-02-06 16:45:14 +07:00
Konstantin Anisimov 6a1745e8ac TESTS: new inline tests added 2017-02-06 16:44:53 +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 4be3649daf Merge 2017-02-02 17:11:57 +07:00
Konstantin Anisimov e0a3c4ad4c TESTS 2017-02-02 16:34:26 +07: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 e10d9b62e2 TESTS: new tests added 2017-01-31 16:01:46 +07:00
Igor Chevdar 01cb9d4cac Implementation of super methods calling (#203)
* implemented super call

* tests

* removed redundant code
2017-01-27 16:38:48 +05:00
Svyatoslav Scherbina cf946a7676 backend/tests: update and disable 'defaults4' 2017-01-26 13:53:40 +07:00
Nikolay Igotti c6a4ec2ff4 Add enumeration support. (#128)
* Add enumeration support.

* Enum classes lowering.

* merge fix

* merge fix

* used arrayOf from irModule

* changed lowering quant from body to file

* refactoring

* review fixes

* lowering for GET_OBJECT in enums

* enabled tests

* added tests

* moved tests to separate dir

* renamed test files

* moved phase up

* review fixes

* reformat
2017-01-25 14:39:36 +05:00
Konstantin Anisimov 88d830e5b7 TESTS: new test added 2017-01-24 15:43:36 +07:00
Svyatoslav Scherbina 16ca882298 backend/tests: add cast_null and unchecked_cast3 2017-01-23 17:18:43 +07:00
Svyatoslav Scherbina 97ce2227d5 backend/tests: add boxing{14,15}
the latter is disabled.
2017-01-23 16:56:44 +07: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
Svyatoslav Scherbina d5988297b1 backend/tests: add objectExpression{1,2,3} 2017-01-20 17:53:38 +07:00
KonstantinAnisimov 1a83014eba Merge branch 'master' into inline 2017-01-20 10:26:34 +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
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 a8caf7c7d8 TEST: test for default parameters
(cherry picked from commit 7999d68d812aedd5863f04b7fd2171e284b8f332)
2017-01-13 13:42:02 +03:00
Svyatoslav Scherbina 8b83cb2adf backend: enable some tests 2017-01-11 19:32:25 +07:00
Konstantin Anisimov 9a363ceaf6 TESTS: new tests added 2017-01-09 17:16:54 +07:00
Konstantin Anisimov c46ba1aa3f TESTS: passing changes in the test 2017-01-09 17:16:24 +07:00
Konstantin Anisimov 252af6ce15 TESTS: test for inlining integrated in the testsuite 2017-01-09 17:16:24 +07:00
Konstantin Anisimov df87c8e794 TEST: test for inlining added 2017-01-09 17:01:34 +07:00
Nikolay Igotti 61d6967f3c Support missing when branch exception throwing. (#174) 2016-12-31 12:01:56 +03:00
Nikolay Igotti 667d3b9356 Switch when to phi. (#172) 2016-12-29 16:33:23 +03:00
Svyatoslav Scherbina 276e3bcd44 backend/tests:
* enable 'expression_as_statement'
* add unit{1..4}
2016-12-29 12:18:15 +07:00
Svyatoslav Scherbina c0914825d9 backend/tests: add disabled test 'fields2'
Checks properties with custom accessors and backing fields.
2016-12-28 14:00:45 +07:00
Vasily Levchenko 3fe59cc46c TEST: convertion unit tests into run tests 2016-12-27 13:56:03 +03:00
Svyatoslav Scherbina 62737efd54 backend: add tests:
* test for uninitialized vals
* test initializers3: global `var` of reference type
* expression_as_statement (disabled): using type operator as statement

Also enable test break1.
2016-12-23 11:40:31 +07:00
SvyatoslavScherbina b6561b13a4 Implement lowering of some builtin operators. (#154)
* EQEQ
* THROW_NPE

Add test for (un)boxing `==` operands.
2016-12-22 13:02:20 +07:00
Svyatoslav Scherbina f2b5b98dba backend: enable and add tests for autoboxing 2016-12-20 15:33:38 +07:00
Nikolay Igotti 3b7321ef94 Boxing. 2016-12-20 15:33:38 +07:00
Svyatoslav Scherbina 319a473565 backend: add test for lambda with receiver 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina ac4aca1c3a backend: add more tests for lambda 2016-12-13 16:09:55 +07:00