Commit Graph

3237 Commits

Author SHA1 Message Date
Alexander Udalov 13ae3d96ab Simplify TypeConstructorImpl, extend it from AbstractClassTypeConstructor 2016-03-18 14:20:43 +03:00
Michael Bogdanov b95e27fd87 Fix for KT-11478: "Couldn't inline method call" error
#KT-11478 Fixed
2016-03-18 11:07:47 +01:00
Denis Zharkov bfa0b69ba9 Simplify SamCodegenUtil.getOriginalIfSamAdapter
At the monent adapters are either:
- synthetic extensions (no overrides)
- static members:
fake override always has one overridden from super class,
that should be created as a result of SamAdapterDescriptor.createSubsitutedCopy(),
hence should be instance of SamAdapterDescriptor
2016-03-16 20:23:01 +03:00
Denis Zharkov 1d0c37ff20 Cache read classes and method nodes for inline
It decrease GENERATE phase nearly for 10%
2016-03-16 20:23:01 +03:00
Denis Zharkov 78c9dffe00 Refine return type of MemberScope.getContributedFunctions 2016-03-16 20:22:58 +03:00
Ilya Gorbunov 02bb7f2f0d Remove the compiler option "Xmultifile-facades-open" 2016-03-15 14:10:33 +03:00
Natalia Ukhorskaya e2d2d696c0 Add function name to fake local variable for inline argument 2016-03-15 13:25:49 +03:00
Michael Bogdanov 3eb6749377 Call done on when mapping transformation end 2016-03-15 10:04:28 +03:00
Alexander Udalov 4f77b02a58 Rename 'ins' -> 'Ins' in BuiltinsPackageFragment and related classes 2016-03-14 20:41:46 +03:00
Alexander Udalov 11409ec6cf Move some function type utilities from descriptors to frontend 2016-03-14 19:45:09 +03:00
Alexander Udalov 5b7115dc38 Minor, drop deprecated KotlinBuiltIns.getExtensionFunction 2016-03-14 19:45:08 +03:00
Alexander Udalov 2ce661af98 Rename KotlinBuiltIns.getFunctionType -> createFunctionType, move to functionTypes.kt 2016-03-14 19:24:06 +03:00
Michael Bogdanov 92f1a20d5f New name generation for transformed when classes 2016-03-14 12:22:06 +03:00
Michael Bogdanov a72636afb8 Code clean 2016-03-14 11:26:51 +03:00
Michael Bogdanov bec6126b06 Support when mapping transformation on inlining 2016-03-14 11:24:39 +03:00
Michael Bogdanov b88260b4f9 RegenerationInfo renamed to TransformationInfo 2016-03-14 10:45:39 +03:00
Michael Bogdanov c062fff633 All regeneration infos moved to one file 2016-03-14 10:45:38 +03:00
Michael Bogdanov 56d8e4d170 Old/NewClassName funs in RefenerationInfo converted to properties 2016-03-14 10:45:38 +03:00
Michael Bogdanov bbb838765c Obtain regenerated class name through RegeneratedInfo 2016-03-14 10:45:37 +03:00
Michael Bogdanov ddd992d3dd AnonymousObjectRegenerationInfo java->kotlin convertion 2016-03-14 10:45:37 +03:00
Michael Bogdanov da76bf7b03 AnonymousObjectRegenerationInfo.java->AnonymousObjectRegenerationInfo.kt 2016-03-14 10:45:36 +03:00
Michael Bogdanov 7e3e1554fa Added canRemoveAfterTransformation method 2016-03-14 10:45:36 +03:00
Michael Bogdanov 8c9d8778eb Introduced base class for AnonymousObjectGeneration 2016-03-14 10:45:35 +03:00
Michael Bogdanov c6007c91f7 AnonymousObjectGeneration refactoring 2016-03-14 10:45:35 +03:00
Michael Bogdanov a0f050fc69 Removed AnonymousObjectGeneration from RegeneratedClassContext 2016-03-14 10:45:34 +03:00
Alexander Udalov 994dc46bcd Write nullability annotations on extension receiver parameters
#KT-5429 Fixed
2016-03-11 15:20:32 +03:00
Pavel V. Talanov 5de4ce6f57 Minor, FunctionCodegen: add additional logging on missing function descriptor
Trying to diagnose light class building failures
2016-03-10 19:49:04 +03:00
Pavel V. Talanov fc16d7c4fd Refactor, minor: extract exception logging to an util object 2016-03-10 19:49:03 +03:00
Michael Bogdanov c38f28fb08 Restore last inline function call site line number on lambda inlining into @InlineOnly function 2016-03-10 17:08:17 +03:00
Nikolay Krasko 518bd76f35 Don't write false values in SetSlice to binding context
Optimization is significant for USED_AS_RESULT_OF_LAMBDA slice
2016-03-10 13:30:02 +03:00
Michael Bogdanov 1a5bf33190 Fix for KT-11034: Private set with @JvmStatic lateinit var doesn't compile
#KT-11034 Fixed
2016-03-10 10:17:27 +03:00
Alexander Udalov 54a615fcd3 Support inlining 'arrayOf' and 'emptyArray' with no stdlib in classpath
Previously an exception was thrown on trying to inline arrayOf/emptyArray when
compiling with "-no-stdlib" (or in tests without a dependency on the stdlib),
because these functions were found in a built-in package fragment which does
not have the bytecode associated with it
2016-03-09 10:25:38 +03:00
Denis Zharkov 68f411395a Fix bridge generation for special builtin override
Use method itself signature as common bridge delegate

 #KT-11285 Fixed
2016-03-07 09:26:02 +03:00
Dmitry Petrov 3bbd8979e4 KT-9670: optimize Class <-> KClass wrapping/unwrapping as a special case of boxing/unboxing.
NB doesn't work for arrays of classes.
2016-03-04 10:14:21 +03:00
Dmitry Petrov 2ecb8896cc Converting optimization.boxing to Kotlin: convert & simplify 2016-03-04 10:14:21 +03:00
Dmitry Petrov 0555464a3b Converting optimization.boxing to Kotlin: rename files 2016-03-04 10:14:21 +03:00
Alexander Udalov 4553afbd0c Make PropertyAccessorDescriptor#hasBody a front-end utility 2016-03-03 16:08:18 +03:00
Michael Bogdanov 534a3a11d6 Write additional type parameters for DefaultImpls methods, fix for KT-11121: BadClassFile exception for interface implemented generic properties
#KT-11121 Fixed
2016-03-03 16:11:31 +03:00
Dmitry Petrov 9244ef9b81 Do not use 'dup' for postfix increment/decrement: can't do it with collection element in general.
KT-11190, KT-11191, KT-11192, KT-11200, KT-11206
2016-03-02 14:28:06 +03:00
Denis Zharkov eb2c584578 Rename JetTypeMapper 2016-03-02 13:38:46 +03:00
Denis Zharkov 56a2561ab9 Extract JvmMethodGenericSignature from JvmMethodSignature 2016-03-02 13:38:46 +03:00
Denis Zharkov d66b9a08dd Do not map generic signature if it's unnecessary 2016-03-02 13:38:46 +03:00
Michael Bogdanov 16afe74dc1 Fix for KT-11117: Android Kotlin DEX transformation error when I use arrayOf as an anonymous object property
#KT-11117 Fixed
2016-02-29 12:53:58 +03:00
Denis Zharkov 4c88e2a0bc Use original descriptor when mapping fake override
Otherwise wrong CONFLICTING_INHERITED_JVM_DECLARATIONS were reported

 #KT-10691 Fixed
2016-02-25 11:10:48 +03:00
Michael Bogdanov 582b1c5e66 Fix for KT-11163: Incorrect codegen in case of custom compareTo on primitives
#KT-11163 Fixed
2016-02-25 10:16:09 +03:00
Denis Zharkov 914447b7eb Do not treat uninitialized value as a reason to retain boxing
See testData/simpleUnitializedMerge.kt
On exit from `if` we merge value in variable with slot 1 (x):
- from `if` body we get BoxedBasicValue
- from outer block we get UNITIALIZED_VALUE

So we just suppose `x` is unitialized after `if`
and there's no need to mark BoxedValue as unsafe to remove
because it's anyway can't be used after `if`

 #KT-6842 Fixed
2016-02-25 08:31:19 +03:00
Denis Zharkov 2f4b8dab25 Minor. Replace 'filter' with 'any' 2016-02-25 08:31:19 +03:00
Michael Bogdanov b20f49a2c4 Default body compilation for inline fun extracted from InlineCodegen to separate one 2016-02-24 14:06:29 +03:00
Michael Bogdanov f149f16882 Separately process inline function default impl body compilation (non general inline magic),
Fix for KT-10670 Debugger: Evaluate Expression/Watches fail for inline function parameter initialized with default value

 #KT-10670 Fixed
2016-02-24 14:06:29 +03:00
Michael Bogdanov 7bfb5a0c60 InliningInstructionAdapter refactoring: renamed to MethodBodyVisitor, added additional empty owerrides 2016-02-24 14:06:28 +03:00