Commit Graph

3951 Commits

Author SHA1 Message Date
Dmitry Petrov a5620454fa Minor: use IntrinsicMethods.INTRINSICS_CLASS_NAME where appropriate 2017-05-31 16:48:14 +03:00
Dmitry Petrov a6f8aad49b Minor: fix typo in exception message 2017-05-31 16:48:14 +03:00
Dmitry Petrov 08885e273b Support additional intrinsics in null check elimination
1. checkExpressionValueIsNotNull implies checked value is non-null

2. throwNpe never returns

 #KT-18162 Fixed Target versions 1.1.4
 #KT-18164 Fixed Target versions 1.1.4
2017-05-31 16:48:14 +03:00
Dmitry Petrov d559212d70 Optimize out trivial INSTANCEOF checks
#KT-18157 Fixed Target versions 1.1.4
2017-05-31 16:48:14 +03:00
Dmitry Petrov 17d2472511 Do not patch generic signature for methods with special bridges
Somewhat awkward solution for KT-18189.
2017-05-31 10:18:48 +03:00
Dmitry Petrov fd00a6fbe8 Generate generic signatures for special bridges
#KT-12408 Fixed Target versions 1.1.4
2017-05-31 10:18:48 +03:00
Dmitry Petrov 78de1fb72c Handle incorrect code for interface delegation
#KT-15931 Fixed Target versions 1.1.4
2017-05-31 10:18:48 +03:00
Denis Zharkov 2c98bd053a Fix super calls to suspend functions in abstract classes 2017-05-29 10:58:18 +03:00
Dmitry Petrov a86fe89aae Include file name for package-level members in diagnostics 2017-05-26 13:58:46 +03:00
Mikhael Bogdanov 3f7bf8467a Process non-aload0 outer access in constructor during inline
#KT-17972 Fixed
2017-05-26 09:24:10 +02:00
Mikhail Zarechenskiy d0e26c6527 Support underscores in non local destructuring declarations 2017-05-25 16:46:06 +03:00
Mikhail Zarechenskiy 47f2386212 Generate non-local destructuring declarations as properties
#KT-5620 Fixed
 #KT-15810 Fixed
2017-05-25 16:46:05 +03:00
Yan Zhulanow 5ec16167bc Kapt: Preserve parameter names for abstract methods 2017-05-23 16:45:29 +03:00
Denis Zharkov e2e93d633c Get rid of using label field in named function
It preventing from making it protected (as it was before)

 #KT-17898 In progress
2017-05-22 14:51:04 +03:00
Denis Zharkov 52b2e632df Simplify generated code for rangeTo/concat intrinsics
The main reason is avoiding complicated operations like
dup + dup_x2 + pop2 for instances obtained by NEW instruction.

Otherwise it leads to problems in performRefinedTypeAnalysis
because code there has a sensible assumption that NEW instances
can be only dupped or stored into a local (rare cases)

 #KT-17457 Fixed
2017-05-22 14:51:04 +03:00
Dmitry Petrov 45820f0220 Minor: more cleanup after converting to Kotlin 2017-05-22 11:57:20 +03:00
Dmitry Petrov 39aa97eebf Use Intrinsics#compare when specializing compareTo for ints 2017-05-22 11:57:20 +03:00
Dmitry Petrov a1ae40a617 RedundantBoxingMethodTransformer: convert to Kotlin & cleanup 2017-05-22 11:57:20 +03:00
Dmitry Petrov f1bb9a9839 RedundantBoxingMethodTransformer: .java -> .kt 2017-05-22 11:57:20 +03:00
Dmitry Petrov 89bfa64e90 Minor: simplify code in RedundantGotoMethodTransformer 2017-05-22 11:57:20 +03:00
Dmitry Petrov e1b41eee15 Specialize Comparable#compareTo for boxed primitives
Support Comparable#compareTo for boxed primitive in redundant
boxing/unboxing analysis, along with CHECKCAST to java.lang.Comparable.

Note that we can do that for Float and Double, too, because
Float#compareTo(Float) and Double#compareTo(Double) are delegated to
Float#compare(float, float) and Double#compare(double, double),
respectively.

Fuse specialized comparison for integers with conditional jumps
if possible (both for Comparable#compareTo and Intrinsics#areEqual).

 #KT-11959 Fixed
2017-05-22 11:57:20 +03:00
Mikhael Bogdanov 47fec6c9d5 Wrap captured local delegated property into Delegate
#KT-16864 Fixed
2017-05-19 09:53:19 +02:00
Nikolay Krasko 0cd3e4f3a4 Minor: JetFile -> KtFile 2017-05-18 20:00:17 +03:00
Alexander Udalov 52237ce77f Fix KClass.java intrinsic for stack values of type Unit
#KT-17692 Fixed
2017-05-18 13:29:04 +03:00
Denis Zharkov 49453ca705 Avoid dependency on coroutine-related public API changes
These changes has been introduced in c3a032ea0b
to support new scheme for named functions

At the same time they can be avoided by generating some additional
code/accessors in the anonymous classes for coroutine state

Now we cannot simply remove introduced API because of bootstrap problems

 #KT-17898 Fixed
2017-05-18 12:42:12 +03:00
Denis Zharkov 06b598e595 Minor. Rename CoroutineCodegenForLambda.kt -> CoroutineCodegen.kt 2017-05-18 12:42:12 +03:00
Mikhael Bogdanov d9dc2bd443 Minor. Fix review remarks 2017-05-17 10:20:04 +02:00
Mikhael Bogdanov fd561c6cb9 Support default bound callable reference inlining
#KT-6884 Fixed
2017-05-17 10:20:03 +02:00
Mikhael Bogdanov 8a083a41d5 Clean code after transformation 2017-05-17 10:20:02 +02:00
Mikhael Bogdanov eca359f176 Convert RegeneratedLambdaFieldRemapper to Kotlin 2017-05-17 10:20:01 +02:00
Mikhael Bogdanov fe4668c315 Rename RegeneratedLambdaFieldRemapper.java to RegeneratedLambdaFieldRemapper.kt 2017-05-17 10:20:01 +02:00
Mikhael Bogdanov 77af888b6f Code clean after convertion 2017-05-17 10:20:00 +02:00
Mikhael Bogdanov 5b947ac27e Convert FieldRemapper to Kotlin 2017-05-17 10:19:59 +02:00
Mikhael Bogdanov f795f2777c Rename FieldRemapper.java to FieldRemapper.kt 2017-05-17 10:19:58 +02:00
Mikhael Bogdanov e86e128c8a Code clean after convertion 2017-05-17 10:19:58 +02:00
Mikhael Bogdanov fcd76e6dec Convert InlinedLambdaRemapper to Kotlin 2017-05-17 10:19:57 +02:00
Mikhael Bogdanov d1fdfd484b Rename InlinedLambdaRemapper.java to InlinedLambdaRemapper.kt 2017-05-17 10:19:56 +02:00
Mikhael Bogdanov 05d2aa700b Support default property reference inlining 2017-05-17 10:19:55 +02:00
Mikhael Bogdanov 0ac23c789e Add diagnostics for default lambda inlining 2017-05-17 10:19:54 +02:00
Mikhael Bogdanov 81c2e1dd8c Code clean after convertion 2017-05-17 10:19:53 +02:00
Mikhael Bogdanov 6373c3115a Convert LocalVarRemapper to Kotlin 2017-05-17 10:19:52 +02:00
Mikhael Bogdanov c6189076cc Rename LocalVarRemapper.java to LocalVarRemapper.kt 2017-05-17 10:19:51 +02:00
Mikhael Bogdanov 6730fa2bbf Support default inline lambda reification 2017-05-17 10:19:51 +02:00
Mikhael Bogdanov 9e8495dc3d Clean code 2017-05-17 10:19:50 +02:00
Mikhael Bogdanov 45bfb2075d Move reifiedTypeInliner to root context 2017-05-17 10:19:49 +02:00
Mikhael Bogdanov da13ea4a8a Move all InliningContext's to one place 2017-05-17 10:19:48 +02:00
Mikhael Bogdanov 9fdd4c647a Clean code. Add LambdaInfo to InliningContext 2017-05-17 10:19:48 +02:00
Mikhael Bogdanov 9dae183e3a Convert RootInliningContext.java to Kotlin 2017-05-17 10:19:47 +02:00
Mikhael Bogdanov 8b2164e2b8 Code clean after transformation 2017-05-17 10:19:46 +02:00
Mikhael Bogdanov fcbd27fdc4 Convert InliningContext.java to Kotlin 2017-05-17 10:19:45 +02:00