Dmitry Petrov
c41ec1ddfb
KT-14400: Properly handle TypeAliasConstructorDescriptor in KotlinTypeMapper.mapToCallableMethod(...)
...
Implement getDefaultType() in TypeAliasDescriptor subclasses.
2016-10-20 09:56:03 +03:00
Denis Zharkov
4793f71da2
Properly generate indices for destructured parameters in inline case
...
#KT-14399 Fixed
2016-10-19 16:05:50 +03:00
Dmitry Petrov
a5d6559056
KT-14360 Microoptimizations in RedundantCoercionToUnitTransformer
2016-10-17 10:13:03 +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
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
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
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
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
Valentin Kipyatkov
41ee06ec96
Use parameter names in DescriptorRenderer
2016-10-11 23:38:49 +03:00
Denis Zharkov
194853b5c2
Fix backend issue related to JvmStatic val with accessor
...
Do not treat accessors to JvmStatic properties as having dispatch receiver
#KT-11585 Fixed
2016-10-11 12:22:03 +03:00
Michael Bogdanov
5bd045c79c
Fix for KT-14243: Wrong invocation descriptor on calling implicitly generated implementation in class
...
#KT-14243 Fixed
2016-10-10 14:17:50 +03:00
Alexey Andreev
977fd8f591
KT-12707: support case when secondary super constructor has optional parameters
2016-10-10 11:21:45 +03:00
Alexey Andreev
c1b8e50734
KT-12707: (JS) proper translation of a constructor in subclass that calls secondary constructor of parent class. Fix #KT-12707
2016-10-10 11:21:45 +03:00
Denis Zharkov
0905bf3e38
Refine redundant null checks interpreter
...
The main change here is addition of a check that NotNullBasicValue instances
are not being created for non-reference types
Exactly this change should be used instead of f25f0db10e
The latter commit lead to problem described in the KT-14242 issue:
v.getType().getSort() == w.getType().getSort() && (v.getType().getSort() != Type.OBJECT || v.equals(w))
Problem is that the condition above returns true without calling `v.equals(w)`,
because the sort of type is ARRAY, not OBJECT, so testArray was being treated
as NotNullable erroneously
So the second part of this change is effectively revering mentioned commit
#KT-14242 Fixed
2016-10-10 10:44:11 +03:00
Alexey Andreev
1dcb037aee
KT-2752: remove diagnostic that reports about overridden method having several names from different sources. Generate proxies instead. Fix reporting name clash when two distinct fake overrides require same name.
2016-10-08 19:25:35 +03:00
Alexey Andreev
c5087779e4
KT-2752: add diagnostics that reports about conflicting overridden declarations
2016-10-08 19:25:34 +03:00
Denis Zharkov
dfb9b323ff
Avoid generation of redundant abstract special stubs
...
#KT-13698 Fixed
2016-10-07 11:59:15 +03:00
Denis Zharkov
6e838f0adc
Avoid generation of redundant toArray stubs
...
#KT-13698 In Progress
2016-10-07 11:59:15 +03:00
Denis Zharkov
e05e0ec921
Optimize method count for collection stubs
...
Do not generate stubs if they're already present in superclasses
#KT-13698 In Progress
2016-10-07 11:59:15 +03:00
Denis Zharkov
900c442efd
Write generic signature for autogenerated toArray
...
#KT-14195 Fixed
2016-10-07 11:59:15 +03:00
Denis Zharkov
3a100d4139
Improve exception message in collection stubs
2016-10-07 11:59:15 +03:00
Denis Zharkov
8ee568105c
Do not generate collection stubs for Kotlin-specific signatures
...
#KT-14188 Fixed
2016-10-07 11:59:15 +03:00
Alexander Udalov
73652f309f
Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
...
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +03:00
Michael Bogdanov
95a1c254e1
Added error diagnostic on inheriting target 6 interface
2016-10-03 14:13:17 +03:00
Michael Bogdanov
d9bb519b76
Don't generate delegation to jvm8 default methods
2016-10-03 14:06:01 +03:00
Michael Bogdanov
c19e035f91
Properly map super calls in typeMapper
2016-10-03 14:06:00 +03:00
Michael Bogdanov
5f1f4a067d
Map proper owner for method with default args
2016-10-03 14:06:00 +03:00
Michael Bogdanov
dd4d5e3aa1
Generate 'DefaultImpls' for jvm 8 target only within compiler option
2016-10-03 14:05:59 +03:00
Michael Bogdanov
ca41f01468
Generate interface property annotations in interface class (not in DefaultImpls)
2016-10-03 13:50:12 +03:00
Michael Bogdanov
dfd5be1a33
Generate all bodies in interfaces as default methods
2016-10-03 13:50:11 +03:00
Dmitry Petrov
06101dba52
KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
...
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.
Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).
Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +03:00
Alexander Udalov
74d6ef73d4
Prevent double initialization in codegen tests, fix ScriptGenTest#testDependentScripts
...
Add an assertion to prevent duplicate initialization of CodegenTestFiles
instance in CodegenTestCase, which was happening in ScriptGenTest with multiple
invocation of loadFile()
2016-10-02 21:03:28 +03:00
Vsevolod
1ac07340c9
KT-13931 generate IntRange#contains with respect to side-effects on argument loading, test added
2016-09-29 17:56:18 +03:00
Denis Zharkov
bb1b8cca20
Fix AssertionError in CodegenUtil.getDelegates
...
Change getAllOverriddenDescriptors contracti, now it returns
original (not substituted) descriptors without any duplicates.
First of all it's necessary in CodegenUtil.getDelegates to avoid
duplicates (see assertion there), but also it's convenient for all
other usages of this method
#KT-8154 Fixed
2016-09-28 11:40:35 +03:00
Denis Zharkov
217f033552
Prevent generation of delegations to interfaces private methods
...
#KT-13381 Fixed
#KT-13996 Fixed
2016-09-23 14:51:14 +03:00
Alexander Udalov
621c6691d0
Support equals, hashCode, toString for annotations instantiated with reflection
...
#KT-13106 Fixed
2016-09-20 21:36:30 +03:00
Alexander Udalov
525937252d
Support Java annotation constructors in reflection
...
#KT-13106 In Progress
2016-09-20 21:36:30 +03:00
Alexander Udalov
aeba124bdb
Support Kotlin annotation constructors in reflection
...
#KT-13106 In Progress
2016-09-20 21:36:29 +03:00
Alexander Udalov
fb18e4bf4c
Sort parameters of Java annotation constructors by name for stability
2016-09-20 21:36:29 +03:00
Mikhail Zarechenskiy
7739677a06
Adapt ScriptCodegenTests to last changes
...
Get rid of possibility to configure script definition without template
class, therefore all tests now are using default script argument
2016-09-20 16:23:41 +03:00
Denis Zharkov
e75efc88ff
Add support for desctructuring of lambda parameters in JVM backend
...
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Alexander Udalov
22f8e7db3b
Use independent context to type-check LHS of '::'
...
#KT-13110 Fixed
2016-09-15 16:45:48 +03:00
Alexey Andreev
5d34f5fb75
KT-13836: fix generation of FQN of secondary constructor when it's called via typealias. Fix #KT-13836
2016-09-14 12:40:01 +03:00
Alexander Udalov
a10cf8a931
Support 'is/as FunctionN<...>' and 'invoke' for KFunction instances
2016-09-13 14:12:31 +03:00
Alexander Udalov
dcc66a6400
Drop KFunctionFromReferenceImpl, make FunctionImpl an interface
...
23 invokes in KFunctionFromReferenceImpl (and consequently, in FunctionImpl)
were needed before 1576160390 : a wrapped function
reference must have had the necessary invoke to be called as an instance of a
specific function type. After 1576160390 , this is
not needed anymore because KFunctionFromReferenceImpl is now an internal
implementation detail of reflection, and no invoke is ever called on it.
2016-09-13 14:12:30 +03:00
Alexander Udalov
fc043c6e66
Drop KPropertyNFromReferenceImpl classes
...
The only place where their get/set methods were used was in
KPropertyNImpl.Getter.invoke, and it's fine if that results in a reflective
call instead (KPropertyN#getter is not available without kotlin-reflect.jar
anyway). The test data has been changed because a package local Java field is
not accessible via reflection
2016-09-13 14:12:29 +03:00
Michael Bogdanov
69dc18b8b4
Proper concrete implementation filtering in java 8 interface case
2016-09-12 12:59:31 +03:00