Denis Zharkov
ebfd257408
Refactoring: extracted common logic of working with local variable table into getValuesStoredOrLoadedToVariable
2014-07-15 21:26:52 +04:00
Denis Zharkov
0f0d07c9fe
Refactoring: extracted specific logic into RedundantBoxedValuesCollection class
2014-07-15 21:26:51 +04:00
Denis Zharkov
cb3eef4b86
Optimization of type conversion with boxed values (transform Integer.valueOf(x). .. .longValue() -> I2L and etc)
2014-07-15 21:26:51 +04:00
Denis Zharkov
270e58cf4e
Do not remove boxing when possibly unsuccessful CHECKCAST is performed
2014-07-15 21:26:50 +04:00
Denis Zharkov
779e2a096e
Support for IFNONNULL opcode in RedundantNullCheckMethodTransformer
2014-07-15 21:26:50 +04:00
Denis Zharkov
b1a54a424e
Fixes after review
2014-07-15 21:26:50 +04:00
Denis Zharkov
ed445f6488
dealing with ranges
2014-07-15 21:23:51 +04:00
Denis Zharkov
ee87b11723
Dealing with case when boxing value is being stored in a variable
2014-07-15 21:23:51 +04:00
Denis Zharkov
b2eaac4468
Added unsafe opcodes check for boxed values
2014-07-15 21:23:51 +04:00
Denis Zharkov
485ac3f809
Minor, fixes after review
2014-07-15 21:23:51 +04:00
Denis Zharkov
3dea4bc07d
Minor, added Contract to JetPsiUtil.deparenthesize()
2014-07-15 21:23:51 +04:00
Denis Zharkov
9aa5e85bde
Redundant null check of boxed values detecting and cleaing out
2014-07-15 21:23:50 +04:00
Denis Zharkov
69436b64fc
Specialized code generation for safe qualified expression when it's within elvis or another safe-call. In such cases instead of generating ACONST_NULL, if reciever is null, just fall back to null-handler's label of the outer expression
2014-07-15 21:23:50 +04:00
Denis Zharkov
11af678767
Fixes after integration tests
2014-07-15 21:23:50 +04:00
Denis Zharkov
3fa5fc7b11
Tests updated after integration with optimization subsystem
2014-07-15 21:23:50 +04:00
Denis Zharkov
feb0918d99
integration into codegen system
2014-07-15 21:23:50 +04:00
Denis Zharkov
1ecca9f40b
initial
2014-07-15 21:23:50 +04:00
Pavel V. Talanov
fc164d5ca0
Minor: add missing static imports for PsiPackage.JetPsiFactory
2014-07-15 16:41:14 +04:00
Pavel V. Talanov
ee036770c3
Add JetPsiFactory(JetElement) function and use it
2014-07-15 16:41:13 +04:00
Pavel V. Talanov
7269e383cf
Rewrite JetPsiFactory to kotlin, make project a property
...
Instead of passing to every function
All static methods are now member functions
2014-07-15 16:41:12 +04:00
Pavel V. Talanov
307522ddd2
Rename JetPsiFactory to preserve history
2014-07-15 16:41:09 +04:00
Alexander Udalov
35385fdd75
Minor, swap parameters of AnalyzerWithCompilerReport#analyzeAndReport
...
#KT-5459 Fixed
2014-07-14 21:39:26 +04:00
Alexander Udalov
9194b5d532
Minor, add NotNull to JetCoreEnvironment#getConfiguration
...
#KT-5460 Fixed
2014-07-14 20:44:39 +04:00
Alexander Udalov
315b68ce56
Refactor and rename ExpressionCodegen#generateFromResolvedCall
2014-07-14 20:44:39 +04:00
Alexander Udalov
c0d9bfe89f
Minor, add nullability annotations, toString(), remove unused methods
2014-07-14 20:44:38 +04:00
Alexander Udalov
05baebfc27
Minor, store closure class name for debugging purposes
...
Strip package from the name up to the last slash, because slashes are not
allowed in a Name
2014-07-14 20:44:38 +04:00
Alexander Udalov
999e5f667a
Minor, remove unreachable code in CodegenContext#intoConstructor
2014-07-14 20:44:37 +04:00
Alexander Udalov
295283dc40
Minor, remove code duplication in ImplementationBodyCodegen
2014-07-14 20:44:37 +04:00
Alexander Udalov
2a763598e7
Minor, delete outdated assertions in ImplementationBodyCodegen
2014-07-14 20:44:37 +04:00
Zalim Bashorov
dc68d78d9d
Minor: revert changes in StackValue and fix tes data.
...
(this commit should be reverted after make Unit object)
2014-07-11 20:28:57 +04:00
Evgeny Gerashchenko
6182f2cf66
Clarified "Inapplicable annotation" error message.
2014-07-11 20:24:17 +04:00
Alexey Sedunov
487e7f2a91
Pseudocode: Replace {<: Any?} type predicate with *
2014-07-11 19:13:52 +04:00
Alexey Sedunov
3cd7a22535
Pseudocode: Stabilize type predicate order
2014-07-11 19:13:50 +04:00
Alexey Sedunov
4707f4a5e9
Pseudocode: Add debug information to magic instructions
2014-07-11 19:13:49 +04:00
Alexey Sedunov
d636d362b7
Pseudocode: Generate proper instructions for when conditions. Eliminate unnecessary magics
2014-07-11 19:13:46 +04:00
Alexey Sedunov
fd21b6cbe9
Pseudocode: Use call element stored in resolved calls to generate
...
call/read instructions
2014-07-11 19:13:45 +04:00
Alexey Sedunov
d95f6383b7
Extract Function: Allow to extract local variables which are used outside of extracted fragment
2014-07-11 19:13:32 +04:00
Alexey Sedunov
e792b3f1db
Pseudocode: Do not store "synthetic" flag of magic instructions
2014-07-11 19:13:27 +04:00
Alexey Sedunov
0a8fa404bf
Pseudocode: Generate additional returns for implicit return values (lambdas, functions with expression bodies)
2014-07-11 19:13:26 +04:00
Alexey Sedunov
1c75a5f642
Pseudocode: Generate instructions for superclass constructor calls. Consume value of delegate expression in the by-clause
2014-07-11 19:13:21 +04:00
Alexey Sedunov
523beab902
Pseudocode: Use value usage map to decide if expression is effective statement
2014-07-11 19:13:19 +04:00
Alexey Sedunov
02342fce5d
Pseudocode: Store lazily computed value usage map in the pseudocode
2014-07-11 19:13:18 +04:00
Evgeny Gerashchenko
026bc05a86
Fixed @Nullable annotation.
2014-07-11 15:39:20 +04:00
Evgeny Gerashchenko
42e3ad3ccf
Reused utility method getDirectMember.
2014-07-11 14:54:12 +04:00
Evgeny Gerashchenko
708816f09c
Fixed generating method calls from same module when inlining.
2014-07-11 14:54:12 +04:00
Valentin Kipyatkov
acc58173da
Java to Kotlin converter: added auto-conversion run of Kotlin analyzer. Implemented first fix with it - redundant !! removal
2014-07-10 23:20:39 +04:00
Valentin Kipyatkov
9bd742472d
Fixed KT-5339 J2K: convert Objects.equals to == and !=
...
Mock JDK regenerated to add java.util.Objects
#KT-5339 Fixed
2014-07-10 23:20:38 +04:00
Alexander Udalov
51ecfe2a09
Don't fail on a bad Retention annotation in light classes
...
#KT-5450 Fixed
No new tests added because it seems there are no tests on highlighting which
cause light class generation, where the original error occurred
2014-07-10 20:30:47 +04:00
Alexander Udalov
242376550c
Minor, beautify code in StackValue.CallReceiver
2014-07-10 20:30:46 +04:00
Alexander Udalov
f1b199f6c4
Minor, add assertion message to CodegenContext
2014-07-10 20:30:46 +04:00