Alexander Udalov
82551e91a4
Add KClass.isFun modifier to reflection
...
#KT-38881 Fixed
2020-05-14 14:05:51 +02:00
Anton Bannykh
86b5c63891
JS IR: fix origin for callable references with bound reciever
...
In case of IrFunctionReference with type SuspendFunction (no K!) there
was a misalignment between the base class (Any) and the
origin (LAMBDA..). As a result the SuspendFunctionLowering was
getting confused and produced hanging code.
2020-05-14 14:33:12 +03:00
Anton Bannykh
bdca4b45bd
JS: inliner supports extra argument caused by suspend conversions
2020-05-14 14:33:12 +03:00
Alexander Udalov
ed8efafa9b
Generate InnerClasses attribute for nested classes in annotation arguments
...
Otherwise we incorrectly try to load a nested class "A.B" as if it is a
top level class named "A$B" and fail.
#KT-38853 Fixed
2020-05-14 13:20:13 +02:00
Mikhail Glukhikh
cdac6157a9
[FIR2IR] Force loading Java SAM from external classes
2020-05-14 14:07:40 +03:00
Jinseong Jeon
89a6ecd77d
[FIR] Update argument mapping while transforming integer operator.
2020-05-14 13:42:07 +03:00
Juan Chen
858731cac8
[FIR] add support for varargs in delegated constructor calls
...
Also add support for spread operators as named arguments.
2020-05-14 13:42:07 +03:00
Mikhail Glukhikh
3652ac9354
[FIR2IR] Mute 2 failing BB tests
...
Looks like both tests are failing because now only classes from
'kotlin.*' are considered "external" and generated with declarations.
2020-05-14 13:40:37 +03:00
Mikhail Glukhikh
d8398bb0ab
[FIR2IR] Handle external declaration parents more accurately
...
This allows us to set declaration parent immediately,
not at some moment after its creation
2020-05-14 13:40:37 +03:00
Mikhail Glukhikh
6beee004a3
[FIR2IR] Take callables from scope in external declaration generator
...
This commit fixes 2 more unmuted BB tests
2020-05-14 13:40:37 +03:00
Mikhail Glukhikh
12c0cbee94
[FIR2IR] Don't enter same class twice while override searching
...
This commit fixes 21 unmuted BB tests after previous one
2020-05-14 13:40:37 +03:00
Mikhail Glukhikh
00fcb6cb02
[FIR2IR] Minor refactoring of populateOverriddenSymbols
2020-05-14 13:40:36 +03:00
Mikhail Glukhikh
e7e80be34a
[FIR2IR] Populate overridden symbols even for !isOverride
...
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.
This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Dmitriy Dolovov
ac1e96500a
[Commonizer] Added README.md
2020-05-14 17:35:16 +07:00
Toshiaki Kameyama
08588001be
Redundant suspend modifier: do not report when the function has 'actual' modifier
...
#KT-37746 Fixed
2020-05-14 12:08:52 +02:00
Ilya Gorbunov
188bcf0e7b
stdlib-js-ir: do not copy source directories from the same project
2020-05-14 10:40:34 +03:00
Ilya Gorbunov
46b0784508
Disable kotlinMetadata compilation for js-ir-minimal-for-test
...
Use more convenient way to specify dependency on source syncing tasks.
2020-05-14 10:40:18 +03:00
Jinseong Jeon
bcf277d885
Add comments for generators about data/inline class (in psi2ir and fir2ir) and annotations (fir2ir).
2020-05-14 09:41:11 +03:00
Jinseong Jeon
e844c59e7e
FIR2IR: filter correct use-site target for value parameter annotations.
2020-05-14 09:41:11 +03:00
Jinseong Jeon
76e679a6ca
FIR2IR: refactor annotation generations.
2020-05-14 09:41:11 +03:00
Jinseong Jeon
931ba4892a
FIR2IR: split property annotations according to use-site targets.
2020-05-14 09:41:11 +03:00
Steven Schäfer
9bc8fdcb3c
JVM IR: Validate corresponding properties
2020-05-13 20:57:52 +02:00
Steven Schäfer
13f15a702b
JVM IR: Remove corresponding property hacks from MethodSignatureMapper
2020-05-13 20:57:52 +02:00
Steven Schäfer
497df0922a
JVM IR: Fix corresponding properties in inline classes
2020-05-13 20:57:52 +02:00
Steven Schäfer
c41e71b1c5
JVM IR: Merge PropertiesToFieldsLowering and JvmPropertiesLowering
...
This is necessary in order to fix the corresponding property symbols,
since PropertiesToFieldsLowering broke them intentionally.
2020-05-13 20:57:52 +02:00
Steven Schäfer
d5c2707c2c
JVM IR: Fix corresponding properties in JvmStaticAnnotationLowering
2020-05-13 20:57:52 +02:00
Steven Schäfer
24b28f80cb
JVM IR: Fix corresponding properties in BridgeLowering
2020-05-13 20:57:52 +02:00
Steven Schäfer
4a2b5df9fa
JVM IR: Fix corresponding properties for default impls redirections
2020-05-13 20:57:52 +02:00
Steven Schäfer
1fafbb8d72
Minor: Remove duplicate IrSetField builder
2020-05-13 20:57:52 +02:00
simon.ogorodnik
86683e94fc
[FIR] Fix cfg crash with multiple postponed arguments
2020-05-13 19:20:02 +03:00
Anton Bannykh
5b63dad1c3
JS IR: fix incremental compilation for stdlib
2020-05-13 19:15:18 +03:00
Ilya Gorbunov
a95f205c1a
Binary compatibility validator is now an external tool
...
Use its code from a dependency.
2020-05-13 19:00:35 +03:00
Konstantin Tskhovrebov
ceb03ce739
Disable KotlinNativeRunConfigurationProducer if not found Gradle plugin.
...
Issue #KT-38186 Fixed
2020-05-13 17:18:35 +03:00
Vladimir Ilmov
af114e3211
(CoroutineDebugger) 192/193 compatibility fix
2020-05-13 15:45:47 +02:00
Anton Bannykh
b5f31a3d76
JS IR: make CodeCleaner more conservative
...
The CodeCleaner treated all expressions with type `Nothing` as
non-terminating. This is not true for cases when return type is generic,
e.g:
```
fun <T> foo(): T = Any() as T
foo<Nothing>() // type: Nothing
```
This change makes the CodeCleaner more conservative, so that it doesn't
treat to such functions as non-terminating. This eliminates the need
to change call types from Nothing to Unit in
KotlinNothingValueExceptionLowering.
2020-05-13 16:30:47 +03:00
pyos
8809abdbac
JVM_IR: do not handle Nothing in suspend tail call bridges
...
Else they wouldn't be tail call, would they?
2020-05-13 05:54:37 -07:00
Ilmir Usmanov
0acaedef92
Fix attribute clash between STATIC_INLINE_CLASS_REPLACEMENT and original
...
Attributes are used to name continuation classes and are generated
before inline classes processing. During the processing, for override
functions in inlined classes, the compiler generates
STATIC_INLINE_CLASS_REPLACEMENT function with body of the override.
The override's body is replaced with delegating call to
STATIC_INLINE_CLASS_REPLACEMENT. However, since we need to keep the name
of the continuation class, we copy attributes from the override to
STATIC_INLINE_CLASS_REPLACEMENT. This leads to attribute clash during
AddContinuationLowering.
So, to fix the issue, do not use the attribute of
STATIC_INLINE_CLASS_REPLACEMENT in original->suspend map.
As an optimization, do not generate continuation for the override
function.
2020-05-13 14:53:37 +02:00
Alexander Udalov
d2a691d157
Minor, ignore failing box tests for light analysis
2020-05-13 13:54:51 +02:00
Mark Punzalan
99856afc31
ForLoopsLowering: Use @file:OptIn(ExperimentalUnsignedTypes::class)
...
instead of annotating declarations.
2020-05-13 13:54:35 +02:00
Mark Punzalan
b5b361bb09
Add tests for nullable loop variable in for-loop over unsigned progression.
2020-05-13 13:54:35 +02:00
Mark Punzalan
b85da8411d
ForLoopsLowering: Convert ProgressionType from enum to sealed class and
...
move more logic into the class.
This refactoring simplifies their usage with fewer `when` switches and
passing around of Symbols.
2020-05-13 13:54:35 +02:00
Mark Punzalan
177967258b
ForLoopsLowering: Eliminate construction/boxing/unboxing of UInt/ULong.
...
This needs further cleanup to encapsulate more logic into ProgressionType.
2020-05-13 13:54:35 +02:00
Mark Punzalan
e1120f49d8
ForLoopsLowering: Reduce unnecessary temporary variables.
2020-05-13 13:54:35 +02:00
Mark Punzalan
eaddd02e9b
Mute/unmute failing/passing unsigned progression tests for FIR.
2020-05-13 13:54:35 +02:00
Mark Punzalan
f249e7f5e9
ForLoopsLowering: Add additional bytecode text tests for optimization of
...
unsigned progressions.
2020-05-13 13:54:35 +02:00
Mark Punzalan
0e6af517d7
Generate tests for unsigned progressions using
...
GenerateSteppedRangesCodegenTestData.
2020-05-13 13:54:35 +02:00
Mark Punzalan
03ef3724f4
ForLoopsLowering: Add support for unsigned progressions.
2020-05-13 13:54:35 +02:00
Mikhael Bogdanov
9fdb1ff4f8
Call visit method on ClassWriter in IC caching in proper order
2020-05-13 13:45:10 +02:00
Igor Yakovlev
df8031945b
Allow UL class for KtEnumEntry declaration
2020-05-13 12:14:12 +03:00
Roman Golyshev
762f38a394
KT-38832 Add additional check to RemoveCurlyBracesFromTemplateInspection
...
- Expression in curly braces can change between the report of inspection
and quickfix application
- ^KT-38832 Fixed
2020-05-13 09:05:10 +00:00