Michael Bogdanov
1bf521c645
Don't generate accessors for @JvmField properties in primary constructor
2015-11-30 16:24:05 +03:00
Ilya Gorbunov
b4256f0c89
Replace increment with step in For Loop codegen for progressions
2015-11-30 14:12:10 +03:00
Yan Zhulanow
9d1af5a17e
Fix tests: "infix modifier required" and "operator modifier required" errors
2015-11-27 15:51:11 +03:00
Yan Zhulanow
a3ff3ffc45
Fix tests: "Placing function type parameters after the function name" error
2015-11-27 15:51:11 +03:00
Michael Bogdanov
2d3d526ccd
Fix for KT-10110: ClassReader$BadClassFile undeclared type variable: E
...
#KT-10110 Fixed
2015-11-26 13:29:30 +03:00
Denis Zharkov
fa99ea1e98
Generate type-safe barrier in method body
...
In cases when signature of special bridge is the same as current method,
but type is not 'Any?'.
Also there is tiny optimization:
only null check needed if value parameter type is mapped to Object,
but it's not nullable.
#KT-9973 Fixed
2015-11-17 16:27:02 +03:00
Denis Zharkov
1f704e0c4d
Minor. Split BytecodeText tests about special builtin bridges
2015-11-17 16:27:02 +03:00
Ilya Gorbunov
96f301fdec
Support only integer primitive ranges and progressions in optimized for loop codegen.
...
Do not call getProgressionFinalElement, use new progression properties 'first' and 'last' instead.
2015-11-13 20:58:18 +03:00
Ilya Gorbunov
5e6d16103e
Remove deprecated ranges from tests and take into account that Byte and Short rangeTo now returns IntRange.
2015-11-11 03:53:31 +03:00
Mikhail Glukhikh
0d35033106
Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
...
ClassReceiver converted to Kotlin
Also #KT-7617 Fixed
2015-11-10 20:20:51 +03:00
Dmitry Petrov
882827bf04
KT-9717, KT-9603:
...
pass getter/setter-related flags to AccessorForPropertyDescriptor
2015-10-27 12:02:27 +03:00
Michael Bogdanov
18f3eb87e4
INSTANCE field deprecated in companion object
...
Fix for KT-9692: Deadlock between <clinit> of a class (KtSimpleNameExpressionImpl) and <clinit> of its companion object
#KT-9692 Fixed
2015-10-23 17:39:27 +03:00
Michael Bogdanov
98b818203f
Test data fixed
2015-10-20 19:19:41 +03:00
Dmitry Petrov
dda508234f
Drop package facades:
...
- update tests
- cleanup JetTyMapper after rebase
2015-10-19 16:03:22 +03:00
Dmitry Petrov
3502c393fc
Drop package facades: JVM BE tests passed.
2015-10-19 16:03:16 +03:00
Denis Zharkov
fafca76ac5
Generate common bridges for final builtin declaration
...
#KT-9596 Fixed
2015-10-17 17:46:17 +03:00
Natalia Ukhorskaya
9168572b8c
Write local variable for inline function and inline argument
2015-10-17 17:02:55 +03:00
Michael Bogdanov
3452fc8d02
Don't initialize const properties in constructor
...
#KT-9532 Fixed
2015-10-17 15:31:57 +03:00
Denis Zharkov
7cbab5816c
Fix lost testData
2015-10-16 21:11:05 +03:00
Denis Zharkov
495780f5ab
Generate INVOKEVIRTUAL 'contains(Object)' instead of 'contains(String)'
...
In cases when callee overrides Collection<String>.contains
2015-10-16 18:16:02 +03:00
Denis Zharkov
d335f71dfe
Generate special bridges for builtins with same name but different JVM descriptor
2015-10-16 18:16:02 +03:00
Denis Zharkov
5c2fd75389
Minor. Clarified comments in test
2015-10-14 20:39:46 +03:00
Alexey Tsvetkov
62c25c0370
Replace is Array<T> with .isArrayOf<T>()
2015-10-14 18:36:53 +03:00
Dmitry Petrov
5d9ee7efee
Java 8 rules for method overrides:
...
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;
- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;
- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;
- update testData.
2015-10-12 14:12:31 +03:00
Dmitry Jemerov
1523d5bcbf
removing static type assertions work in progress
2015-10-12 11:11:23 +02:00
Denis Zharkov
89ded4ab1d
Implement hack to support both remove() and removeAt() in MutableList<Int>
...
Also add couple of tests about CharSequence.get
2015-10-11 19:57:22 +03:00
Alexander Udalov
a4732b442d
Don't create KClass and KPackage instances in <clinit>
...
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
2015-10-11 17:10:35 +03:00
Michael Bogdanov
8198ac77cb
Generate private constructor for object
...
#KT-9510 Fixed
2015-10-09 16:25:20 +03:00
Michael Bogdanov
a4997e8b31
backend tests: INSTANCE$ -> INSTANCE
2015-10-09 16:25:18 +03:00
Michael Bogdanov
60d1736b97
Instance field generation in objects
2015-10-09 16:25:16 +03:00
Denis Zharkov
80da320c2c
Customize JVM signature for Collection's members
...
- Do not write signature for `contains`
- Write signature for `containsAll` as it's declared like `containsAll(Collection<?>)`
2015-10-09 14:40:33 +03:00
Denis Zharkov
6a1566a6dc
Make JVM backend work with Collection.size as val
...
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
2015-10-07 08:46:35 +03:00
Dmitry Jemerov
7c20630272
diagnostics for deprecated syntax of function type parameter list
2015-10-06 16:20:47 +02:00
Michael Bogdanov
cd78514b76
Code clean, small refactorings and tests
...
#KT-8987 Fixed
2015-10-03 10:53:22 +03:00
Dmitry Petrov
06d9ff6a71
KT-9377 Support is-checks for read-only collections
...
Generate better code for 'as?' with mutable collection types:
use CHECKCAST, do not introduce special intrinsics for safe-as.
2015-10-02 15:17:00 +03:00
Denis Zharkov
ea8ada4664
Fix accessor naming test: count only method declarations
2015-09-30 08:19:52 +03:00
Denis Zharkov
fd0c92e307
Record inner class info for interface and DefaultImpls
2015-09-30 08:19:51 +03:00
Denis Zharkov
a101fffd9a
Change INTERFACE_IMPL_CLASS_NAME: $TImpl -> DefaultImpls
2015-09-30 08:19:51 +03:00
Valentin Kipyatkov
069ce12604
Accessor naming should be locale-independant
2015-09-29 18:32:24 +03:00
Valentin Kipyatkov
420c6856be
Changed naming algorithm of accessor name generation: "isXXX" and "kClass" cases affected
2015-09-29 18:32:24 +03:00
Alexander Udalov
1036506b25
Introduce new string table optimized for JVM class files
...
This format of the string table allows to reduce the size of the Kotlin
metadata in JVM class files by reusing constants already present in the
constant pool. Currently the string table produced by JvmStringTable is not
fully optimized in serialization (in particular, the 'substring' operation
which will be used to extract type names out of generic signature, is not used
at all), but the format and its complete support in the deserialization
(JvmNameResolver) allows future improvement without changing the binary version
2015-09-29 16:26:28 +03:00
Ilya Gorbunov
1622cf9506
Fix stdlib facade names in bytecode generation and decompilation tests.
2015-09-25 21:10:13 +03:00
Denis Zharkov
505cb37052
Generate deprecated flag on getter of const val's
2015-09-25 18:12:45 +03:00
Michael Bogdanov
cf57d56ab3
Don't generate private members in interface
2015-09-24 12:00:18 +03:00
Mikhail Glukhikh
a1e3471d92
"field": deprecated warnings introduced, compiler tests migrated to the new syntax
2015-09-21 15:48:00 +03:00
Ilya Gorbunov
e40a5457e3
Fix deprecations in testData: arrayOf usages.
2015-09-19 04:32:56 +03:00
Denis Zharkov
bae3320d52
Get rid of deprecated annotations in testData
2015-09-18 10:14:32 +03:00
Dmitry Petrov
1586a2df8e
Make stdlib work with -Xmultifile-package-facades.
...
Fixed wrong owner mapping in presence of -Xmultifile-package-facades.
Fixed backing field mapping issue.
Added more tests.
2015-09-14 11:26:29 +03:00
Dmitry Petrov
a47eaa2cb5
Change part class naming scheme
...
update tests depending on part class naming
2015-09-07 16:28:42 +03:00
Mikhail Glukhikh
eab288bdd7
annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
...
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00