Georgy Bronnikov
aab95f93f2
JVM_IR: invoke method descriptor for default lambdas
2020-07-10 17:35:29 +03:00
Alexander Udalov
8c71d8f126
Undeprecate VariableDescriptorWithAccessors.isDelegated
...
Apparently there's quite a few valid usages of this method outside of
the compiler frontend, where manual suppression is annoying.
2020-07-07 18:09:40 +02:00
Dmitry Petrov
6e0bb0b468
JVM: no nullability annotations for inline class '-impl' methods
...
Specialized generated methods for inline classes (toString-impl,
hashCode-impl, equals-impl, etc) are inaccessible from Java, and thus
don't require nullability annotations.
2020-07-02 22:39:06 +03:00
Mads Ager
1124887aa0
[JVM_IR] Fix stepping behavior for assignments to local variables.
2020-07-02 17:29:07 +02:00
Georgy Bronnikov
8e24256f95
JVM_IR: avoid descriptors when tracking inline properties
...
Preparing to use wrapped properties in InlineCodegen.
2020-07-02 12:46:58 +03:00
Steven Schäfer
5cdf053c8e
Coroutines: Fix RedundantLocalsEliminationMethodTransformer
...
- Take control flow into account when collecting usage information
- Don't remove stores to local variables
2020-07-02 00:49:28 +02:00
Ilmir Usmanov
697c8637ee
For all int-like typed variables, use int as field type and coerce
...
it during spill-unspill.
Coerce int to boolean, otherwise, VerifyError is thrown on android
Completely rewrite SpilledVariableFieldTypesAnalysis... again,
but this time use BasicInterpreter
This way, the analysis both does not use SourceInterpreter and
is in line with the rest on analyses.
2020-07-01 17:26:47 +02:00
Mikhail Bogdanov
3580c7c28c
Write proto flag about compatibility mode
...
There is no any special aim for this flag now.
But it could be useful in future in case of compatibility mode deprecation
2020-06-30 14:59:01 +02:00
Ilmir Usmanov
ed80b431f0
Restore refined int-type analysis
2020-06-29 21:42:30 +02:00
Ilmir Usmanov
f127a0f593
Add flag to disable new spilled variable type analysis
2020-06-29 20:50:43 +02:00
Ilmir Usmanov
da12532669
Ignore fake inliner variables in merge operation
...
since they are not read and just markers.
#KT-39863 Fixed
2020-06-29 20:13:37 +02:00
Dmitry Petrov
2137a4b1e5
JVM, JVM_IR: no nullability annotations on private and synthetic methods
...
NB it looks like it doesn't cover all cases, e.g., some synthetic
methods generated for suspend functions.
2020-06-26 18:51:35 +03:00
Dmitry Petrov
64e47265e1
JVM, JVM_IR: no nullability annotations on lateinit backing fields
2020-06-26 15:08:23 +03:00
Dmitry Petrov
3f266aafb4
JVM: no nullability annotations on private and synthetic fields
2020-06-25 22:31:12 +03:00
Ilmir Usmanov
1ee8e615fc
Reuse value is ISTORE if expected type is the same, otherwise, create
...
new value
2020-06-25 18:51:15 +02:00
Ilmir Usmanov
c21820c615
Revert "Revert "Fix merging two reference values""
...
This reverts commit 1cccceabb9 .
2020-06-25 18:51:13 +02:00
Ilmir Usmanov
a6f14c206b
Revert "Revert "Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline""""
...
This reverts commit 447308dcfc .
2020-06-25 18:51:11 +02:00
Alexander Udalov
c6a481190a
JVM: optimize type mapping for primitive types
2020-06-24 19:26:59 +02:00
Dmitry Petrov
5bfec7f6bc
JVM: don't generate nullability annotations on property delegate fields
...
Such fields are private, so these annotations are redundant.
They were incorrect, anyway (property type was used instead of delegate
type).
2020-06-23 20:18:42 +03:00
Mikhail Bogdanov
af3bda51ec
Fix compilation on mixed hierarchies in compatibility mode
2020-06-23 18:59:04 +02:00
Mikhail Bogdanov
41511898a1
Deprecate DefaultImpl methods in compatibility mode
2020-06-23 18:59:04 +02:00
Dmitry Petrov
e9231b5624
JVM: Generate object and companion object INSTANCE fields as @NotNull
2020-06-22 16:28:00 +03:00
Mikhail Bogdanov
e93bcc55ae
Revert "Deprecate DefaultImpl methods in compatibility mode"
...
This reverts commit 6c9c2a28
2020-06-19 12:58:46 +02:00
Mikhail Bogdanov
6c9c2a287d
Deprecate DefaultImpl methods in compatibility mode
2020-06-19 12:23:05 +02:00
Mikhail Bogdanov
9c0b96af71
Report error on missed specialization in compatibility mode
...
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
9d48ecfac3
Make proper check for defaults on delegation to DefaultImpls
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
b8f0ad2111
Generate nullability annotations on this receiver in DefaultImpls. Don't generate nullability annotations in private methods
...
#KT-36969 Fixed
2020-06-19 11:57:35 +02:00
Mikhail Bogdanov
5bdf3d5757
Don't generate compatibility stubs for @JvmDefaultWithoutCompatibility
2020-06-19 11:57:35 +02:00
Victor Petukhov
447308dcfc
Revert "Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline"""
...
This reverts commit 5567033b
2020-06-17 13:02:40 +03:00
Ilmir Usmanov
1cccceabb9
Revert "Fix merging two reference values"
...
This reverts commit 85e2392f
2020-06-17 13:02:40 +03:00
Ilmir Usmanov
d9821412d0
Do not generate fields for unused suspend lambda parameters
...
This also allows us to not spill them in the lambda.
But, disable this optimization for local named functions.
#KT-16222 In progress
2020-06-17 12:00:25 +02:00
Mikhail Bogdanov
fe4bb24a3e
Don't use labels for caching
...
Avoid new objects creation
2020-06-15 15:13:10 +02:00
Mikhail Bogdanov
db50afeafe
Fix compilation with ASM 8
...
General rule to use linkedLabel or linkWithLabel
when label from node is reused in other instructions.
If label is not linked then it will point to another labelNode when visited
#KT-39013 Fixed
2020-06-15 15:13:10 +02:00
Georgy Bronnikov
89aa15c419
JVM_IR: implement isCompiledToJvm8OrHigher on IrClass
2020-06-13 12:45:00 +03:00
Ilmir Usmanov
85e2392fef
Fix merging two reference values
...
In this case, make the result of value type Object instead of unknown.
2020-06-09 20:52:29 +02:00
Ilmir Usmanov
5567033b33
Revert "Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline""
...
This reverts commit 822c14814b .
2020-06-09 20:52:24 +02:00
Alexander Udalov
e3a23aed33
Minor, remove unneeded check in ClosureCodegen
...
Actually we do need to generate delegates to DefaultImpls even for Java
SAM wrappers, so this condition is incorrect. However, this never worked
properly anyway because of KT-12466.
2020-06-09 19:56:27 +02:00
Alexander Udalov
fc1217ba07
Generate delegates to DefaultImpls in fun interface wrappers
...
#KT-37436 Fixed
2020-06-09 11:44:31 +02:00
Alexander Udalov
2793187bda
Handle IllegalArgumentException in trimMargin intrinsics on JVM
...
#KT-38537 Fixed
2020-06-09 11:11:06 +02:00
Ilmir Usmanov
8cc5f2abfb
Forbid val field initialization inside EXACLTY_ONCE lambda
...
unless the lambda is inline. This way, final field will remain final.
2020-06-04 21:26:48 +02:00
Dmitry Petrov
202bbdf8dd
Forward compatibility hacks for Result.{success, failure}
...
Don't mangled functions annotated with @JvmName.
Annotate 'Result.success' and 'Result.failure' with @JvmName and
@Suppress("INAPPLICABLE_JVM_NAME").
NB this would require bootstrap.
2020-06-04 12:16:27 +03:00
Mikhail Bogdanov
4f8ad6bdcb
Remove compatibility hack
2020-06-04 08:01:30 +02:00
Ilmir Usmanov
822c14814b
Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline"
...
This reverts commit 1ed4324613 .
Otherwise, bootstrap is broken.
2020-06-03 19:43:59 +02:00
Ilmir Usmanov
1ed4324613
Completely rewrite reifiedIntTypeAnalysis, making it more streamline
...
and easy to understand and optimize if it would be a bottleneck.
Use LVT to get information of refined int type in one specific case
#KT-38925 Fixed
2020-06-03 16:03:50 +02:00
Ilmir Usmanov
0e908b720d
Replace SourceInterpreter with specific one in tail-call optimization
2020-06-03 16:03:49 +02:00
Ilmir Usmanov
3fa9ea9bc0
Remove unreachable instructions
2020-06-03 16:03:48 +02:00
Ilmir Usmanov
ea60b83f16
Fix merging two sources with same type
2020-06-03 16:03:48 +02:00
Ilmir Usmanov
cd0e218a07
Rewrite RedundantLocalsEliminationMethodTransformer
...
Use specific interpreter instead of SourceInterpreter.
2020-06-03 16:03:48 +02:00
Ilmir Usmanov
f247ea7c27
Replace SourceInterpreter with a specific one in coroutines inlining
2020-06-03 16:03:48 +02:00
Dmitry Petrov
ba43ee8410
Handle error type in SamType
2020-06-03 15:57:24 +03:00