Commit Graph

6009 Commits

Author SHA1 Message Date
Dmitry Petrov c1583c4368 Complex augmented assignment test.
Fix string literal creation for empty string template.
2016-10-18 09:08:10 +03:00
Dmitry Petrov 64d7a97145 IR, testing framework: if no tree labels were provided in source file, use default golden file. 2016-10-18 09:08:10 +03:00
Dmitry Petrov 888b1685ed Introduce name hints for temporary variables.
Split IrValue.kt into a subpackage.
2016-10-18 09:08:09 +03:00
Dmitry Petrov d7412c449e IR: augmented assignment for array access expressions 2016-10-18 09:08:07 +03:00
Dmitry Petrov 0a57eb8ea4 IR:
- smart casts handling separated from expression generation
- improved infrastructure for desugaring
2016-10-18 09:08:07 +03:00
Dmitry Petrov ecf6ab9e25 IR:
- Redo smart casts handling (yet again).
Front-end typing information can't be used for expressions in IR,
since it provides inferred type for PSI expressions for the last corresponding resoled call.

- Assignments handling, initial implementation.
2016-10-18 09:08:07 +03:00
Dmitry Petrov c4bbcadb34 IR: Collapse desugared blocks as a postprocessing pass. 2016-10-18 09:08:06 +03:00
Dmitry Petrov aa7bf4637b IR:
- function with expression bodies are desugared to blocks with return statement;
- property initializers are generated as regular expression bodies.
2016-10-18 09:08:06 +03:00
Dmitry Petrov f903fb8ad3 IR: destructuring declarations in regular statements 2016-10-18 09:08:05 +03:00
Dmitry Petrov 37cce98d19 Simplify IrElement hierarchy.
IrDeclaration can be now hosted under IrExpression (as IrStatement).
2016-10-18 09:08:04 +03:00
Dmitry Petrov 55eb79febf Make IrExpression.type nullable. 2016-10-18 09:08:04 +03:00
Dmitry Petrov 030111b130 IrBody is no longer a declaration owner.
Local declarations in expression tree.
Call generator supports argument reordering.
2016-10-18 09:08:03 +03:00
Dmitry Petrov b1af1af8a4 IR test tests: use that magical '<<<' everywhere. No need for 'IR_FILE_TXT'. 2016-10-18 09:08:03 +03:00
Dmitry Petrov 4ccf3c3590 Refactor calls and related expressions 2016-10-18 09:08:02 +03:00
Dmitry Petrov 3e11f35918 Qualified expressions and safe calls 2016-10-18 09:08:02 +03:00
Dmitry Petrov b80782c295 Testing framework: allow comparing subtrees starting at a given line with expected dump text. 2016-10-18 09:08:02 +03:00
Dmitry Petrov c93666f6f1 - IR expressions for calls & references
- first calls "parsed"
2016-10-18 09:08:01 +03:00
Dmitry Petrov cb79f377f0 Mutable declarations IR. 2016-10-18 09:06:55 +03:00
Dmitry Petrov 64abecf996 IR elements fixes & refactorings 2016-10-18 09:06:55 +03:00
Dmitry Petrov 7879fb7084 IR: first somewhat meaningful expression IR generation 2016-10-18 09:06:54 +03:00
Dmitry Petrov ad405f26fd IR: first smoke test 2016-10-18 09:06:54 +03:00
Dmitry Petrov 1600037625 KT-14307, KT-14377: Run declaration checks on local type aliases. 2016-10-17 16:22:04 +03:00
Dmitry Petrov a5d6559056 KT-14360 Microoptimizations in RedundantCoercionToUnitTransformer 2016-10-17 10:13:03 +03:00
Dmitry Petrov 753a558bcb KT-14352 Record short reference to companion object via type alias,
so that it would be checked properly.
2016-10-17 10:11:58 +03:00
Dmitry Petrov ac675784c1 KT-14357 Run RedundantCoercionToUnitTransformer before DeadCodeEliminatingMethodTransformer.
Remove empty try-catch blocks in DeadCodeEliminatingMethodTransformer.
2016-10-17 10:10:46 +03:00
Zalim Bashorov c21e1eb857 Report error when try to use unsupported reflection API in Kotlin JS; allow to use kotlin.Any members on reflection classes for both platforms. 2016-10-14 19:44:58 +03:00
Zalim Bashorov 279b4dc03c Remove obsolete test about class literals is not supported 2016-10-14 19:44:55 +03:00
Nikolay Krasko 87b628a3f7 Generate 'nop' instruction on lambda call when everything on line is going to be eliminated by inliner (KT-6477)
(cherry picked from commit 462bdb2)

 #KT-6477 Fixed
2016-10-14 14:52:06 +03:00
Valentin Kipyatkov 2b2042860d Fixed ParameterName annotation target 2016-10-14 12:24:43 +03:00
Michael Bogdanov 050139220d Fix for KT-14330 java.lang.IllegalArgumentException: Parameter specified as non-null is null: method ... parameter value
#KT-14330 Fixed
2016-10-14 10:56:15 +03:00
Dmitry Petrov 47b3420a65 Minor: testData fix after rebase 2016-10-13 18:03:00 +03:00
Dmitry Petrov e7ca00d91b Support @SinceKotlin annotation for type aliases. 2016-10-13 17:52:21 +03:00
Dmitry Petrov 8d634f6003 KT-14274: resolve type alias constructors calls in supertypes list as type alias constructors.
Support @Deprecated for type aliases, including type alias constructors.
2016-10-13 17:52:21 +03:00
Dmitry Petrov 3d0288ffed Annotations on type aliases: generate synthetic method for type alias annotations. 2016-10-13 17:52:21 +03:00
Dmitry Petrov d2d8f72ffc Annotations on type aliases: typealias is not a "default target".
Add diagnostic test for annotations on type aliases.
2016-10-13 17:52:21 +03:00
Dmitry Petrov c6350e1afb Concatenate annotations in type alias expansion. 2016-10-13 17:44:14 +03:00
Mikhail Glukhikh 7a41d13b41 Do not add special names to scopes #KT-14319 Fixed 2016-10-13 17:17:05 +03:00
Vsevolod e788ef408f KT-5044 code cleanup, test added 2016-10-13 10:11:32 +03:00
Vsevolod bd6f83b9b7 KT-5044 intrinsify all contains calls for primitive ranges from stdlib 2016-10-13 10:11:32 +03:00
Vsevolod d7ad27ac3b KT-5044 implement missing Range#contains tests and move it to separate package 2016-10-13 10:11:32 +03:00
Ilya Gorbunov 2a7717214b Annotate new API with @SinceKotlin in kotlin-runtime except reflection and type aliases. 2016-10-13 08:37:31 +03:00
Alexander Udalov 383b7f89a6 Annotate ParameterName with SinceKotlin("1.1") 2016-10-12 17:07:10 +03:00
Ilya Chernikov 846797ff61 Switch to templates in the separate script runtime 2016-10-12 15:38:52 +02:00
Ilya Chernikov 42a4f0ed70 Compile most test scripts with runtime 2016-10-12 15:37:48 +02:00
Ilya Chernikov 385aab8418 Add output checking to script tests 2016-10-12 15:37:48 +02:00
Ilya Chernikov 0b68f313ab minor: fix typos and terminology 2016-10-12 15:37:48 +02:00
Ilya Chernikov 63c5133167 Remove support for xml-based script configs, other minor refactorings 2016-10-12 15:37:47 +02:00
Alexander Udalov 777004a0e2 Fix test data after merge 2016-10-12 12:52:38 +03:00
Alexander Udalov e37a20d6b3 Do not deserialize type aliases in compatibility mode
When "-language-version 1.0" is specified in command line arguments, the
compiler should not be able to see the declarations of type aliases in
libraries, because that corresponds to the behavior of the compiler of version
1.0. Note that type aliases are _completely invisible_ in this mode (i.e.
"unresolved reference" is reported) because they must not interfere with the
classifier resolution
2016-10-12 12:19:19 +03:00
Denis Zharkov 84153f9636 Add warning for ambiguous annotated expression syntax
#KT-14238 In Progress
2016-10-12 11:40:12 +03:00