Kristoffer Andersen
0142d96319
[EE-IR] Account for toplevel properties in reflective lowering
2022-05-20 23:06:19 +02:00
Igor Yakovlev
3d3526e3d0
[WASM] Workaround for compiled wasm runs under node
2022-05-20 16:33:58 +02:00
Igor Yakovlev
73a86fffe5
[WASM] Bootstrap std compatibility fix
2022-05-20 16:33:57 +02:00
Igor Yakovlev
526e99891a
[WASM] Refcast and Reftest refactorings
2022-05-20 16:33:57 +02:00
Igor Yakovlev
1eaa266a95
[WASM] Minor refactorings
2022-05-20 16:33:57 +02:00
Igor Yakovlev
8da6ab7a04
[WASM] New VTable format
2022-05-20 16:33:57 +02:00
Svyatoslav Kuzmich
84ed3ff5b0
[Wasm] Don't generate wat format by default in box tests
...
Gives ~15% tests speedup
Use kotlin.wasm.debugMode=1 to enable old behaviour
2022-05-20 13:34:28 +00:00
Svyatoslav Kuzmich
d1c81eb6ba
[Wasm] Support Wasm GC milestone 5
2022-05-20 12:22:43 +03:00
Georgy Bronnikov
a8cc3ec316
Fir2IR: introduce IdSignature?.iscomposite()
2022-05-19 12:02:44 +02:00
Georgy Bronnikov
ad625a4631
Fir2Ir: deal with Java fields in FirIrProvider
2022-05-19 12:02:43 +02:00
Georgy Bronnikov
571ba9298e
Fir2Ir: put properties data from IrBuiltinsOverFir into symbol table
...
Properties themselves, accessors, backing fields.
2022-05-19 12:02:43 +02:00
Georgy Bronnikov
12d34589d8
Psi2Ir, Fir2Ir: always include return type into signature mangle of a function
2022-05-19 12:02:42 +02:00
Georgy Bronnikov
0ef474a8d3
Do not set parent for deserialized IR declarations
2022-05-19 12:02:42 +02:00
Georgy Bronnikov
ffe1615e9c
Fir: simplify IrBuiltInsOverFir
2022-05-19 12:02:42 +02:00
Georgy Bronnikov
0012ba79e1
Fir2Ir: rework FirIrProvider
2022-05-19 12:02:41 +02:00
Georgy Bronnikov
3f66b31a47
Fir2Ir: add irProviders to Fir2IrComponents
...
Removes the last use of DeclarationStubGenerator in the FIR pipeline.
2022-05-19 12:02:41 +02:00
Georgy Bronnikov
13d4d60afa
Fir2Ir: pass Fir2IrExtensions to backend
2022-05-19 12:02:41 +02:00
Georgy Bronnikov
3c3c1be543
Fir2Ir: introduce Fir2IrExtensions
...
This allows us to remove DeclarationStubGenerator from Fir2IrConverter,
thus reducing dependency on descriptor-based code.
2022-05-19 12:02:41 +02:00
Georgy Bronnikov
6bc01f031c
JVM_IR: remove dependency of JvmFileFacadeClass on stub generator
2022-05-19 12:02:41 +02:00
Ivan Kylchik
73a571ef7f
Report warning from backend if constant expression cannot be evaluated
2022-05-18 21:20:04 +03:00
Ivan Kylchik
f3252334b2
Move most of ir utils from backend.common to ir.tree
2022-05-18 21:20:03 +03:00
Ivan Kylchik
40d224d5fe
Change error message of EXCEPTION_IN_CONST_VAL_INITIALIZER
2022-05-18 21:20:03 +03:00
Ivan Kylchik
20d0a531df
Add new tests to check evaluation of intrinsic сonsts
2022-05-18 21:20:02 +03:00
Ivan Kylchik
dca22d745a
Drop excessive lowerings that are replaced by ConstEvaluationLowering
2022-05-18 21:20:02 +03:00
Ivan Kylchik
0f0b48f87b
Move reporting of interpreter's backend errors tests to fir module
2022-05-18 21:20:01 +03:00
Ivan Kylchik
44cf64a00c
Convert const values in ranges without explicit cast
2022-05-18 21:20:01 +03:00
Ivan Kylchik
fac98b7787
Add possibility to dump lowered ir in tests before lowering execution
2022-05-18 21:20:00 +03:00
Ivan Kylchik
592baf134e
Change ir const checker to match new rules of IntrinsicConstEvaluation
2022-05-18 21:20:00 +03:00
Ivan Kylchik
1431d4b356
Add jvm diagnostic tests to check report of exceptions from interpreter
2022-05-18 21:20:00 +03:00
Ivan Kylchik
df7be06558
Add tests to check constant evaluation for intrinsic const declarations
2022-05-18 21:19:58 +03:00
Ivan Kylchik
2dcfe219be
Move string concat folding into FlattenStringConcatenationLowering
...
Originally `FoldConstantLowering` is responsible for this, but it can
be removed in the future.
2022-05-18 21:19:58 +03:00
Ivan Kylchik
23f9e97a5f
Create getInnerDeclarations function to extract statements from parent
...
This function is needed to be able to work with files and scripts
2022-05-18 21:19:58 +03:00
Ivan Kylchik
d0ab01ad24
Add lowering that will evaluate all intrinsic const expressions
2022-05-18 21:19:56 +03:00
Ivan Kylchik
6a0802a1be
Allow interpreting code extension property
2022-05-18 21:19:56 +03:00
Ivan Kylchik
7113523e34
Support interpretation of trimMargin and trimIndent
2022-05-18 21:19:56 +03:00
Ivan Kylchik
3bf678a011
Add ONLY_INTRINSIC_CONST evaluation mode
2022-05-18 21:19:55 +03:00
Ivan Kylchik
761424b131
Add IntrinsicConstEvaluation annotation to some ir builtins functions
2022-05-18 21:19:55 +03:00
Dmitriy Dolovov
8de4eb798c
[IR] Fix removal-of-abstract-fun IR linkage case
...
^KT-50771
2022-05-18 18:05:09 +03:00
Steven Schäfer
90d09dce2c
JVM IR: Mangle overridden symbols in non-inline functions (KT-52394)
2022-05-17 12:13:29 +00:00
pyos
0fc676a20c
JVM: remove TypedNullValue, hack interpreter instead
2022-05-17 11:58:06 +00:00
Steven Schäfer
0da23198e6
JVM_IR: Add null-checks in SAM wrapper constructors (KT-50108)
2022-05-14 02:01:44 +02:00
Kristoffer Andersen
7f531d8426
[IR] Improve stepping/LVT behavior around destructuring
2022-05-13 23:19:27 +02:00
Denis.Zharkov
81416d1c46
Fix codegen for context-receiver contained super class constructor calls
...
^KT-51889 In Progress
2022-05-13 18:04:01 +00:00
Svyatoslav Kuzmich
813b600555
[Wasm] Don't write .wat files in box tests
...
These files take space on CI, but they are not validated or processed
automatically in any way.
Disabled by default, enabled via kotlin.wasm.debugMode=1
2022-05-13 11:20:13 +00:00
Artem Kobzar
4e06ff26d4
fix(KT-39423): add support of optional parameters to constructor + fix bug with optional parameters inside functions.
2022-05-13 10:46:32 +00:00
Mads Ager
3d4e025602
Remove variable that is only ever written and never read.
2022-05-11 19:58:12 +03:00
Ilmir Usmanov
4f53b085ec
Do not override collection stub, if the override is suspend
...
but the stub is not. The other way around should be OK.
#KT-52237 Fixed
2022-05-09 23:16:58 +00:00
pyos
b19b265735
JVM_IR: generate continuation classes for suspend inline references
...
This is somewhat suboptimal since this results in `::suspendInline`
generating 2 classes while `{ suspendInline() }` only creates 1, but
it's the best allowed by the existing hierarchy of classes in stdlib. At
least it works?
^KT-50832 Fixed
2022-05-09 23:15:05 +00:00
Kristoffer Andersen
a9479ec8d7
[EE-IR] Anticipate fake overrides in fragment lowerings
2022-05-06 22:10:19 +02:00
Alexander Udalov
6d664bcd10
JVM IR: fix operand type for CompareTo intrinsic
...
It's incorrect to take the first parameter type from the expression
itself because it can be nullable if smart casts are used. And if it's
nullable, it's mapped to the wrapper type and calling
`comparisonOperandType` for it makes no sense. Instead, take the type
from the callee function, as it's guaranteed to be mapped to a JVM
primitive type.
E.g. in `test1` function in the added test, the problem was that the
dispatch receiver type of the call expression is `Double?`, which is
mapped to `java/lang/Double`, whereas we clearly wanted to obtain the
primitive `D` (double) type.
#KT-52163 Fixed
2022-05-05 23:06:21 +02:00