Commit Graph

53 Commits

Author SHA1 Message Date
Pavel V. Talanov
59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Evgeny Gerashchenko
14b16ff87c KT-6916 Slow bytecode for downTo iteration like for (i in max downTo min)
#KT-6916 fixed
2015-03-06 13:43:02 +03:00
Alexander Udalov
2c0830b017 Change synthetic accessor method names to "access$..."
As per discussion in https://youtrack.jetbrains.com/issue/KT-6870
2015-02-27 20:30:51 +03:00
Dmitry Jemerov
6442b61db8 Don't generate redundant initializers for 'var' properties.
Since only 'val' properties store initializers as compile time constants in descriptors, we need to take the initializer expression from the PSI and try to evaluate it as a constant.

 #KT-6661 fixed
2015-01-30 14:05:25 +01:00
Denis Zharkov
6f94ebb9d6 Refined redundant null check optimization 2015-01-15 15:13:05 +03:00
Denis Zharkov
5675d2b26b Dead code elimination
#KT-6602 Fixed
 #KT-6305 Fixed
 #KT-5656 Fixed
2015-01-15 15:13:05 +03:00
Denis Zharkov
654411a0b0 Refactored tests using Array constructor:
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00
Michael Bogdanov
3a70992d27 Lazy intrinsic generation
#KT-6241 Fixed
2014-11-21 13:59:43 +03:00
Michael Bogdanov
5412a67d29 Generate static backing fields for properties in object
#KT-4973 Fixed
2014-11-20 10:20:31 +03:00
Michael Bogdanov
7d1fd47569 Rewrite local var increment optimization 2014-11-20 10:20:12 +03:00
Michael Bogdanov
c7b1c0fe52 Store refactoring
#KT-1213 Fixed
2014-11-20 10:20:11 +03:00
Michael Bogdanov
8a9977de72 Fix for KT-6202: Redundant and wrong linenumber after if/else condition
#KT-6202 Fixed
2014-11-05 18:25:36 +03:00
Natalia Ukhorskaya
8deef10292 Fix android tests 2014-10-29 17:31:14 +03:00
Michael Bogdanov
8e93719e9d Fix test data for android tests 2014-10-29 17:04:10 +03:00
Michael Bogdanov
d0f6f03380 Fixes for call site finally generation before non-local returns 2014-10-28 19:15:00 +03:00
Michael Bogdanov
dd8c3f0e49 Fixes for inline fun finally block generation before lambda non-local returns 2014-10-28 19:14:52 +03:00
Michael Bogdanov
5abc2dac4e Generate labeled statements as statements 2014-10-13 11:31:15 +04:00
Michael Bogdanov
d4307c69d2 Fix for KT-4301: Too many StringBuilders on string concatenations
#KT-4301 Fixed
2014-10-09 12:23:06 +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
Denis Zharkov
da159c1e53 Simple version of redundant GOTO's removing 2014-09-26 12:37:33 +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
Denis Zharkov
4ed744428b Generate substatements as statements too
Preventing pushing on stack redundant Unit instances

 #KT-5667 fixed
2014-09-24 15:51:43 +04:00
Alexander Udalov
485f63e1cd Rename object$ -> OBJECT$, instance$ -> INSTANCE$
According to Java code conventions, public static final constants should be
named with all capital letters
2014-07-25 21:15:13 +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
4bdf7e3426 Use direct field access to trivial class properties
#KT-3845 Fixed
2014-07-17 19:18:05 +04:00
Denis Zharkov
0f5e29df9b tests added 2014-07-15 21:26:53 +04:00
Evgeny Gerashchenko
708816f09c Fixed generating method calls from same module when inlining. 2014-07-11 14:54:12 +04:00
Alexander Udalov
59777e7df6 Generate "$kotlinClass"/"$kotlinPackage" reflection fields to every class
Some seemingly irrelevant tests were changed because now there's <clinit> in
almost every class and class initialization begins with executing it
2014-07-02 01:26:18 +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
Laszlo Hornyak
9dec0fb779 Correct the argument types of the StringBuilder.append
Modified AsmUtil to generate calls to more specific append methods
in the StringBuilder class in order to save computation time and make
less temporary objects.

Also adds unit-test to verify that the append(Object) method was
invoked 0 times while the append(String) 3 times

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-06-02 16:34:44 +04:00
Alexander Udalov
9760f30c99 Don't allow fake override to inherit implementation with wrong return type
#KT-4763 Fixed
2014-05-22 19:32:10 +04:00
Mikhael Bogdanov
380f1875b8 Don't generate default method implementation in package facade (just delegation) 2014-05-16 18:34:07 +04:00
Alexander Udalov
fc838dbb53 Refactor ImplementationBodyCodegen.getTraitImplementations()
Make it static, extract a method which finds an implementation in a trait for a
fake override
2014-04-11 21:57:46 +04:00
Alexander Udalov
28940256e3 Minor, add bytecode text test on bridges for fake overrides 2014-04-11 21:57:45 +04:00
Natalia Ukhorskaya
4a79bfa16d Generate static accessors fro protected functions in different packages
#KT-4617 Fixed
2014-03-31 21:27:13 +04:00
Mikhael Bogdanov
7dc662f613 Optimization for const closures: access it via GETSTATIC 2014-03-31 20:04:09 +04:00
Svetlana Isakova
a829da185d Resolve invoke on any kind of expressions, not only on simple name expressions 2014-03-20 10:05:24 +04:00
Alexander Udalov
b68e47f705 Move JVM-specific annotations out of built-ins
Move 'volatile' and 'synchronized' to package 'kotlin' in stdlib. Also delete
'atomic', since its support was never implemented
2014-03-02 19:54:55 +04:00
Alexander Udalov
713c6f13ae Fix primitive override problem in Kotlin-Java inheritance
See the comment in JetTypeMapper
2013-12-30 06:41:09 +04:00
Natalia Ukhorskaya
dbaaa80918 Add i2b cast boxing Int to Byte? or Short? (fix android tests) 2013-12-16 20:54:10 +04:00
Natalia Ukhorskaya
69ed9bc47a Do not cast arguments of binary operation to expected type for byte and short 2013-12-12 17:11:42 +04:00
Andrey Breslav
d47109b928 Do not write 'jet.volatile' annotation to class files
ProGuard fails when it sees a class named 'volatile'
2013-10-14 14:42:25 +04:00
Alexander Udalov
8a5336aca2 Don't use $ in package fragment class names
Package fragment classes now are named "*Package-<filename>-<hash>" instead of
"*Package$src$<filename>$<hash>". This will help to avoid erroneous code in
intellij FileManager, which assumes that classes with dollars are always inner
classes of some other class (see AnnotationDescriptorDeserializer)
2013-10-02 17:03:24 +04:00
Mikhael Bogdanov
39b5be6e2b Test fix for android configuration 2013-09-24 17:10:44 +04:00
Mikhael Bogdanov
fc1c3a2e23 KT-3978: Kotlin: [Internal Error] org.jetbrains.jet.codegen.CompilationException: Back-end (JVM) Internal error: null
#KT-3978 Fixed
2013-09-19 15:40:28 +04:00