Alexander Udalov
96cb7da025
Report correct parameter name in not-null assertions
2013-07-03 21:06:11 +04:00
Evgeny Gerashchenko
3e70661a6d
Handling null correctly when wrapping function in SAM wrapper
2013-06-27 20:37:27 +04:00
Evgeny Gerashchenko
c6f6e6c756
Minor. Renamed method parameter.
2013-06-27 17:46:40 +04:00
Evgeny Gerashchenko
72b0e1b07c
Got rid of samAwareGen for simplicity.
2013-06-27 17:41:36 +04:00
Evgeny Gerashchenko
773ff20585
Minor. Shorter code.
2013-06-27 17:09:17 +04:00
Evgeny Gerashchenko
be7dba0781
Minor. Static import.
2013-06-27 17:09:17 +04:00
Evgeny Gerashchenko
939b658704
Supported SAM adapter in infix calls.
2013-06-27 17:09:17 +04:00
Evgeny Gerashchenko
79185b6775
Added tests with SAM adapters in comparison operators.
2013-06-27 17:09:17 +04:00
Evgeny Gerashchenko
f35390134f
Supported SAM adapters in "in/!in" operators.
2013-06-27 17:09:16 +04:00
Evgeny Gerashchenko
0059db486f
Supported SAM adapters in augmented assignment operators.
2013-06-27 17:09:16 +04:00
Evgeny Gerashchenko
036960f117
Supported SAM adapters as plus/minus/etc operators.
2013-06-27 17:09:16 +04:00
Evgeny Gerashchenko
b1fb0aafea
Supported SAM adapters as get/set operators.
2013-06-27 17:09:16 +04:00
Evgeny Gerashchenko
779ea1d7b8
Storing info about expressions which should be generated as SAM values.
2013-06-27 17:09:16 +04:00
Evgeny Gerashchenko
e58bd5b6ec
Not recording names for SAM constructor calls since they are managed SamWrapperClasses.
2013-06-27 17:09:15 +04:00
Evgeny Gerashchenko
7660ae7f20
Simplified code.
2013-06-27 17:09:15 +04:00
Mikhael Bogdanov
8cd1880805
KT-3722: Write correct generic type information for generated fields
...
#KT-3722 Fixed
2013-06-27 15:59:48 +04:00
Evgeny Gerashchenko
b77fbf37b6
Using more specific class.
2013-06-25 20:17:47 +04:00
Evgeny Gerashchenko
104f15adc4
Moved Java-related keys to JavaBindingContext.
2013-06-25 20:17:47 +04:00
Evgeny Gerashchenko
63c17bd0b2
Green code.
2013-06-25 20:17:43 +04:00
Evgeny Gerashchenko
ee9fcff9ca
Supported non-literal arguments for SAM adapters.
2013-06-25 20:17:42 +04:00
Evgeny Gerashchenko
2e2061d9b6
Clarified comment.
2013-06-25 20:17:41 +04:00
Evgeny Gerashchenko
be02943675
Considering SAM interface FQ name in hash.
2013-06-25 20:17:41 +04:00
Evgeny Gerashchenko
7ef4c8cfa8
Generating SAM wrapper class per source file.
2013-06-25 20:17:41 +04:00
Evgeny Gerashchenko
0fbf203ff7
Extracted method.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
7d514bf081
Simplified code.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
8a9ec0f3ce
Added comment.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
ba2dae4db7
Removed obsolete comment.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
0f067f042f
Using more specific class.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
fe77c3edb9
Replaced signed decimal with hex. Eliminated querying canonical path.
2013-06-25 20:16:21 +04:00
Evgeny Gerashchenko
e8d0022406
Typo.
2013-06-25 20:16:20 +04:00
Evgeny Gerashchenko
4980dacd33
Supported calls of SAM adapters for constructors.
2013-06-25 20:16:20 +04:00
Evgeny Gerashchenko
5e2c3fcb50
Loading SAM adapters for constructors.
2013-06-25 20:16:20 +04:00
Alexander Udalov
fea85476b7
Cast int to byte/short/char in for loop generation
...
Similar to the previous commit, don't use iinc or iadd+istore where the value
can overflow the byte/short/char limits. This fixes Android tests
2013-06-25 18:48:28 +04:00
Alexander Udalov
356c32893b
Don't use 'iinc' instruction on byte/short/char variables
...
Android run-time verifier complains when there's any possibility that a
byte/short/char local variable could contain a value not fitting into the
type's limits.
2013-06-25 18:48:28 +04:00
Alexander Udalov
9a6979aa6c
Minor, rename method
2013-06-20 22:23:02 +04:00
Alexander Udalov
53cc582040
Minor, use incrementType in for-progression codegen
...
This doesn't fix anything, just makes it easier to figure out values of what
types are used where. Progression increment is of its own type, which may be
different from asmElementType in case of Byte, Char, Short progressions
2013-06-20 22:23:02 +04:00
Alexander Udalov
d85ca47184
Generate optimized bytecode for 'for' in progression
...
Instead of checking for overflow at the end of each iteration, calculate the
actual final loop parameter value before the loop, save it to the local
variable and at the end of the iteration check if the loop parameter is exactly
equal to this final value.
ProgressionUtil.getProgressionFinalElement() credits go to @geevee
2013-06-20 20:19:54 +04:00
Alexander Udalov
8a14b62a23
KT-3574 Assertion error when using ?: in for range
...
#KT-3574 Fixed
Do not assert that resolvedCall is non-null, since getRangeAsBinaryCall can
return a BinaryCall that doesn't represent a range at all (as specified by the
comment in getRangeAsBinaryCall)
2013-06-20 16:03:00 +04:00
Alexander Udalov
e22947281c
Minor, cut down unnecessary 'load' in for-progression codegen
2013-06-20 16:03:00 +04:00
Alexander Udalov
ee80e0b8ca
Fix loops over progressions near to MAX_VALUE/MIN_VALUE
...
#KT-492 Fixed
For Byte, Char and Short ranges, promote the type of the loop parameter to int
to avoid overflows. For Int and Long ranges at the end of the loop over a
progression we now check if the new (incremented) value of the loop parameter
is greater than the old value iff increment > 0
2013-06-20 16:03:00 +04:00
Alexander Udalov
33d6347876
Fix loop over a range literal up to MAX_VALUE
...
#KT-492 In Progress
For Byte, Char and Short explicit casting from Int is removed -- loop parameter
is already stored in an Int anyway. For Int and Long comparison "i < end" at
the beginning of the loop is replaced to "i != end" at the end of the loop + a
special check for an empty loop
2013-06-20 16:02:59 +04:00
Mikhael Bogdanov
132d74200b
Partial fix for KT-3698: properly write field initializer
2013-06-19 17:02:28 +04:00
Mikhael Bogdanov
79cf02ffb9
Fix for KT-3546: Exception when delegating to ArrayList
...
#KT-3546 Fixed
2013-06-18 13:23:54 +04:00
Mikhael Bogdanov
aec6deae9f
Rename fields on name clashing
...
#KT-3663 Fixed
#KT-3664 Fixed
2013-06-17 15:20:42 +04:00
Mikhael Bogdanov
406f90badf
CodegenContext replaced with MethodContext in ExpressionCodegen
2013-06-17 15:20:42 +04:00
Mikhael Bogdanov
be72e096ef
Realization of class object fields as static fields of outer class
...
#KT-2213 Fixed
2013-06-17 15:20:41 +04:00
Mikhael Bogdanov
47fe81471a
Synthetic accessors for class object private members
...
#KT-3338 Fixed
2013-06-17 15:20:34 +04:00
Mikhael Bogdanov
e96cf045dd
KT-3652: Char is converted to Int when used inside string interpolation
...
#KT-3652 Fixed
2013-05-27 19:33:49 +04:00
Evgeny Gerashchenko
43b9a9d434
Renamed Name.getName() and FqName.getFqName() to asString()
2013-05-21 17:56:05 +04:00
Andrey Breslav
a2b82095da
Using the version of ASM that has debug information in it
...
No more need for extra ASM jars (analysis and util)
2013-05-21 13:56:34 +04:00