Commit Graph

842 Commits

Author SHA1 Message Date
Yan Zhulanow 713a305f45 Update change data for IrTextTestCaseGenerated
Reason of changes: 098469eb85
2020-06-18 19:01:06 +09:00
Georgy Bronnikov ee6d432ced Add forgotten test files 2020-06-18 12:22:53 +03:00
Jinseong Jeon 9e9ca4953f FIR2IR: coerce to Unit when "when" expr is not effectively exhaustive 2020-06-18 09:23:32 +03:00
Georgy Bronnikov c015463926 IR: remove field fake overrides 2020-06-17 20:02:26 +03:00
Georgy Bronnikov 36f22dafc5 IR: remove field fake override usage
Still a problem: Java static fields.
2020-06-17 20:02:26 +03:00
Jinseong Jeon f64f9c2144 FIR: inherit property accessor modifiers from property and vice versa 2020-06-16 19:17:27 +03:00
Dmitriy Novozhilov d7ee168dff [FIR] Create error candidate for completion instead of simple error reference 2020-06-15 15:32:25 +03:00
Mikhail Glukhikh 6f0eeecc64 [FIR2IR] Fix generation of type arguments of delegated constructor calls 2020-06-09 11:40:26 +03:00
Mikhail Glukhikh 6eab6a96cb [FIR2IR] Support type aliases properly 2020-06-08 16:19:37 +03:00
Mikhail Glukhikh 3567880303 [FIR] Consider enum entry nested classes as local 2020-06-08 12:11:33 +03:00
Jinseong Jeon 0d2552b0b6 FIR: record and serialize the modifier "fun" for functional interface 2020-06-08 09:42:32 +03:00
Denis Zharkov 409e90e7de FIR: Fix codegen test data after safe-call refactoring
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Dmitriy Novozhilov 164b4dd439 [FIR-TEST] Update testdata according to #KT-39340 2020-06-03 10:36:00 +03:00
Dmitry Petrov 5efbe6ae15 PSI2IR: SAM conversion in varargs 2020-06-02 23:53:47 +03:00
Mikhail Glukhikh 8c422fbfc7 [FIR2IR] Use signature composer to read external callables 2020-06-02 18:47:58 +03:00
Dmitry Petrov 246c68b0a9 PSI2IR: Don't generate IMPLICIT_INTEGER_COERCION
Generate integer coercion function calls and properly typed constant
expressions instead.
2020-06-01 16:51:47 +03:00
Jinseong Jeon 4a511c7721 FIR: extend arrayOf call transformation to other variants 2020-06-01 10:45:42 +03:00
simon.ogorodnik 99b2a4745a [FIR2IR] Fix superQualifier in case of composed super type ref 2020-05-29 21:10:56 +03:00
Mikhail Glukhikh 19f1a3de1a [FIR2IR] Populate overridden symbols also with public symbol inheritors 2020-05-28 22:19:21 +03:00
Mikhail Glukhikh cd24745f1f [FIR2IR] Add primitive signature composer & use it for external classes 2020-05-28 22:18:13 +03:00
Jinseong Jeon 18953c4717 FIR: transform resolved arrayOf call inside annotation to FirArrayOfCall 2020-05-27 11:38:34 +03:00
Roman Artemev 49690fc620 [JS IR] Properly detect whether nested class is external
- Fix KT-38765
2020-05-27 10:49:57 +03:00
Juan Chen adba0a03a6 [FIR] Create builtin primitive array types for properties
If the primary constructor has a vararg parameter, the corresponding
property has an array type. This commit creates the builtin array
types for such properties if the vararg element type is primitive,
e.g., CharArray instead of Array.
2020-05-26 14:08:47 +03:00
simon.ogorodnik ac1769a474 [FIR2IR] Support SAM constructors 2020-05-25 21:24:39 +03:00
Denis Zharkov e1e149a062 FIR: Support coercion-to-unit semantics for callable references 2020-05-18 11:17:45 +03:00
Jinseong Jeon 615636ed55 FIR2IR: apply SAM conversion to arguments of functional type. 2020-05-15 15:08:43 +03:00
Mikhail Glukhikh cdac6157a9 [FIR2IR] Force loading Java SAM from external classes 2020-05-14 14:07:40 +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
Jinseong Jeon e844c59e7e FIR2IR: filter correct use-site target for value parameter annotations. 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
Jinseong Jeon 6034fcdc46 FIR2IR: apply SAM conversion to arguments if needed 2020-05-13 11:28:48 +03:00
Mikhail Glukhikh 457fb09e3a [FIR] Use tower to resolve delegated constructors, set dispatch receiver 2020-05-12 16:57:07 +03:00
Jinseong Jeon eac9af521e [FIR2IR] differentiate external Java stub origin from external stub 2020-05-08 17:45:39 +03:00
Mikhail Glukhikh b271b6d7a8 [FIR2IR] Add conversion of value parameter annotations 2020-05-08 17:30:28 +03:00
Mikhail Glukhikh 76f6e27e37 [FIR2IR] Add initial support of collection literals 2020-05-08 17:30:24 +03:00
Mikhail Glukhikh f3e2dbf360 [FIR2IR] Add conversion of function annotations 2020-05-08 17:30:19 +03:00
Mikhail Glukhikh d8f9643650 [FIR2IR] Use intersection type approximation for receivers 2020-05-07 15:27:17 +03:00
Dmitry Petrov b574917314 Minor: update FIR2IR testData 2020-05-01 17:55:49 +03:00
Mads Ager 6257b32954 [JVM_IR] Avoid boxing when comparing primitive to object. 2020-05-01 17:53:34 +03:00
Dmitry Petrov 1d10776db4 Minor: update FIR2IR testData 2020-05-01 13:14:21 +03:00
Mads Ager db17184cfd [JVM_IR] Avoid some boxing when comparing boxed primitives to primitives. 2020-05-01 13:14:20 +03:00
Jinseong Jeon 9a561f4a7c FIR2IR: generate synthetic members for inline class 2020-04-30 13:09:53 +03:00
Jinseong Jeon 0890b8bad3 FIR2IR: set superQualifierSymbol for property access 2020-04-30 12:26:47 +03:00
Jinseong Jeon a084c5bf7d FIR2IR: populate overriddenSymbols for overriding properties 2020-04-30 12:25:48 +03:00
Dmitry Petrov 802372ceff PSI2IR: suspend conversion on arbitrary arguments 2020-04-28 12:41:56 +03:00
Dmitry Petrov 6b9a7464f5 PSI2IR: Support suspend conversion for function references 2020-04-27 21:02:37 +03:00
Jinseong Jeon ef09850df8 FIR2IR: set superQualifierSymbol for super call 2020-04-27 11:50:26 +03:00
Jinseong Jeon 57fe01c375 FIR2IR: populate overriddenSymbols for overriding functions
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Alexander Udalov 025d1ca64d psi2ir: rework representation of bound adapted function references
This fixes the problem in JVM IR backend which didn't pass bound
receiver value of an adapted function reference to the superclass
(kotlin/jvm/internal/AdaptedFunctionReference), which caused equals to
work incorrectly on such references (see changes in box tests).

Previously, bound adapted function reference was represented as
IrFunctionExpression to an adapter function which calls the callee. The
value of the bound receiver in that case could only be found in the body
of that adapter function. This is not very convenient, so this change
makes psi2ir produce a block of the adapter function + reference to it.
The bound receiver value is then found in the reference. This is
basically similar to what ProvisionalFunctionExpressionLowering is doing
for all function expressions. And since this IR structure is already
supported in FunctionReferenceLowering, the problem in the JVM IR is
fixed without any additional modifications.

However, inliners do not support this IR structure yet, see KT-38535 and
KT-38536.
2020-04-23 16:47:23 +02:00
Mark Punzalan b74652aa5b [FIR] Use ieee754equals for floating-point equality operations 2020-04-23 11:50:54 +03:00