Alexander Udalov
fe59dc27b3
Make 'when' on nullable enums exhaustive if 'null' entry is present
...
#KT-2902 Fixed
2014-10-21 00:16:06 +04:00
Alexander Udalov
624e507ec2
Make enum classes comparable
...
#KT-3727 Fixed
2014-10-17 21:27:23 +04:00
Alexander Udalov
1edaf43051
Fix Double and Float equality/hashCode in data classes
...
#KT-5818 Fixed
2014-10-17 21:27:22 +04:00
Denis Zharkov
ec63394121
Check that boxing instruction is simple call
...
like T.valueOf(unboxType(T))
#KT-6047 fixed
2014-10-17 01:22:25 +04:00
Michael Bogdanov
212d3da950
Fix for KT-5937: Receiver of javaClass-property hasn't been generated
...
#KT-5937 Fixed
2014-10-07 17:21:10 +04:00
Michael Bogdanov
989cae9f1f
Fix for KT-4357: Compiler error with infix call to Array.get
...
#KT-4357 Fixed
2014-10-07 10:13:53 +04:00
Denis Zharkov
f1d9d11590
Store stack values before inlines. #KT-5634 Fixed
...
Inlining code violates JIT assumptions for OSR in Java 8 in case of
starting with non-empty and containing cycles.
Fix is to mark each inlined block with markers and then store/restore
stack state before and after inlined body.
2014-09-29 17:16:58 +04:00
Alexander Udalov
cd0551078c
Support static method references
...
#KT-5123 Fixed
2014-09-26 18:48:43 +04:00
Denis Zharkov
35cda83c8f
Refined merging logic #KT-5844 Fixed
...
If merging primitives of different integral types (e.g. I and Z) return
INT.
Else return UNINITIALIZED_VALUE
2014-09-26 12:37:04 +04:00
Alexander Udalov
c30aa7db84
Include package part name to top level closure names
...
#KT-4234 Fixed
#KT-4496 Fixed
2014-09-26 10:22:25 +04:00
Alexander Udalov
c57441b51b
Use '$' instead of '-' in package part class names
...
Otherwise some tools break (e.g. CheckMethodAdapter in ASM, used in generic
signature writer) because they expect class names to be Java identifiers.
Some tests fixed, some will be fixed in future commits
2014-09-26 10:22:20 +04:00
Natalia Ukhorskaya
655682ac97
Move regression tests from stdlib to compiler
...
#KT-5770 FIxed
2014-09-17 13:59:52 +04:00
Michael Bogdanov
08e02f4176
Moving platformStatic annotation to kotlin.platform package
2014-09-10 17:35:59 +04:00
Michael Bogdanov
e26d635633
Initial implementation of platformStatic
2014-09-09 16:28:28 +04:00
Svetlana Isakova
9d366cb896
Prohibit local objects and enum classes
...
#KT-5402 Fixed
#KT-4838 Fixed
Resolve type of object inside local object as special, not supertype('Any').
Changed visibility of constructor of anonymous object to 'internal' to be able to resolve the following:
fun box(): String {
var foo = object {
val bar = object {
val baz = "ok"
}
}
return foo.bar.baz
}
The containing declaration of property initializers is constructor, so 'baz' was invisible inside private constructor.
2014-09-01 12:32:52 +04:00
Alexander Udalov
2ea9a2cfc9
Generate annotations on enum entry constants in bytecode
...
#KT-5665 Fixed
2014-08-25 17:50:08 +04:00
Denis Mekhanikov
1533c0e9f3
Support more than 32 default arguments
...
#KT-4675 Fixed
2014-08-20 20:47:34 +04:00
Alexander Udalov
226bfe65f0
Don't make traits and annotations inherit from KObject
...
#KT-5609 Fixed
2014-08-13 17:19:56 +04:00
Denis Zharkov
e0ced7cbcf
Boxing values merge fix. #KT-5588 Fixed
...
When merging Boxed value and something else just return MIXED_VALUE
2014-08-05 13:54:42 +04:00
Evgeny Gerashchenko
90b065e82b
+= tests fix
2014-07-29 12:06:36 +04:00
Denis Zharkov
b86affaa3a
Assignment operations test fix:
...
x is a byte, x += 2 translated to x = x+2, but type of (x+2) currently
is Int, so it's not compiled because Int can't be stored in Byte.
Maybe we need to think about what should be a result of sum of to
Bytes, but currently it's still Int
2014-07-28 22:00:15 +04:00
Alexander Udalov
c24c799819
Fix NoSuchMethodError on private components of data classes
...
A follow-up to
d5681540ec
2014-07-26 01:31:11 +04:00
Alexander Udalov
fb958897a9
Introduce kotlin.Cloneable
...
- Cloneable is a trait with a single protected member 'clone', which is mapped
to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
implementations. Also if you need your class to be Cloneable, most of the
time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic
#KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Alexander Udalov
a79398fa00
Don't load Object as a supertype for Java classes
...
#KT-4890 In Progress
#KT-5002 Fixed
2014-07-25 21:19:37 +04:00
Zalim Bashorov
c767ffc3e7
Unit.VALUE -> Unit in testData
2014-07-25 17:16:40 +04:00
Denis Zharkov
18cb479ef3
When2Switch: tests for non-literal expression in when by integral
2014-07-21 17:13:57 +04:00
Denis Zharkov
8d8c3d2b9e
When2Switch: generate ifnonnull check for nullable values before *switch-opcode
2014-07-21 17:13:56 +04:00
Denis Zharkov
d4cb822ee8
When by String constants:
...
Generate TABLESWITCH/LOOKUPSWITCH bytecode operation for when operator by String constants
2014-07-21 17:13:56 +04:00
Denis Zharkov
5a1c995b5c
When by enum:
...
Generate TABLESWITCH/LOOKUPSWITCH bytecode command in case of "when" by enum entries
2014-07-21 17:13:55 +04:00
Alexander Udalov
d5681540ec
Fix NoSuchMethodError for data classes with private parameters
...
Introduced in a07909bb52
2014-07-19 02:13:26 +04:00
Denis Zharkov
0b2b8ba816
Fixed KT-5493: NPE fix
2014-07-17 18:43:44 +04:00
Denis Zharkov
0f5e29df9b
tests added
2014-07-15 21:26:53 +04:00
Andrey Breslav
6422bafb7a
More tests for synchronized() {}
2014-07-03 18:39:57 +04:00
Andrey Breslav
90690e0711
KT-4825 Implement "synchronized" properly via monitorenter/monitorexit
...
#KT-4825 Fixed
2014-07-02 22:05:45 +04:00
Alexander Udalov
36f7cc742f
Introduce NoSuchPropertyException and IllegalAccessException
...
No new tests added because it's difficult to model a situation where a
::-access is allowed but the code throws these exceptions at runtime
2014-07-02 01:58:22 +04:00
Alexander Udalov
bc8bce7ca1
Provide "toString" for reflection objects
2014-07-02 01:55:55 +04:00
Alexander Udalov
c5d92cc03e
Provide "equals" and "hashCode" for reflection objects
2014-07-02 01:55:55 +04:00
Alexander Udalov
704de8992e
Support mapping between Java and Kotlin reflection objects
2014-07-02 01:55:55 +04:00
Alexander Udalov
a38a396a43
Remove default import "kotlin.reflect"
...
Basic reflection is usable without any imports (with :: literals)
This reverts commit 9503056dd5 .
2014-07-02 01:55:53 +04:00
Alexander Udalov
a86cfdc5de
Add some simple tests on HashPMap
2014-07-02 01:26:23 +04:00
Alexander Udalov
89d6f25fb6
Fix initialization order of KClass field and class object fields
2014-07-02 01:26:21 +04:00
Alexander Udalov
e7f19c531a
Support 'accessible' for reflected properties on JVM
...
Calls Java reflection's isAccessible/setAccessible
2014-07-02 01:26:20 +04:00
Alexander Udalov
1275c84f92
Fail with IllegalAccessException on :: reference to private property
...
Instead of mysterious NoSuchMethodException
2014-07-02 01:26:20 +04:00
Alexander Udalov
5ab83aad8a
Support references to extension properties in JVM codegen
...
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Alexander Udalov
461cce103b
Support references to top level and member properties in JVM codegen
...
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Andrey Breslav
777f3d1341
Codegen tests now fail on JVM-specific errors
2014-06-19 22:11:57 +04:00
Evgeny Gerashchenko
aa41ae09ed
Merge remote-tracking branch 'origin/master' into incremental
2014-06-19 11:43:59 +04:00
Andrey Breslav
512e4cb75e
Support transient, strictfp and synchronized flags
...
#KT-4377 Fixed
2014-06-18 10:55:57 +04:00
Andrey Breslav
705a081919
KT-5214 Annotation to provide platform name to avoid signature conflict
...
#KT-5214 Fixed
2014-06-10 18:21:36 +04:00
Mikhael Bogdanov
34e8cae89e
KT-5112 - test file update
2014-06-02 15:21:28 +04:00