Commit Graph

62 Commits

Author SHA1 Message Date
Ivan Kylchik bc21753877 Move IR interpreter's tests from ir/loweredIr directory into box 2023-01-27 10:52:56 +00:00
Vladimir Sukharev 924898afb7 [K/N] KFC-446: K2 platform: Native alpha
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-04 16:10:40 +00:00
Ilya Chernikov 7e4ee399c8 FIR JS: temporarily mute remaining codegen tests 2022-11-12 16:28:25 +01:00
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Igor Yakovlev 033e2c45f1 [WASM] Caching string literals in global pool 2022-11-01 13:15:09 +00:00
Ivan Kylchik 45b89de9f4 Optimize ir interpretation of Enum.name
There is no need to create honest object in case of such simple
calculation. Furthermore, it can be harmful if enum class has
non-constant initializer or property.

#KT-53480 Fixed
2022-08-11 18:55:30 +03:00
Mads Ager 59c2bde10a [K/N] Unmute passing tests. 2022-08-01 08:57:16 +00:00
Igor Yakovlev adee0f1cb0 [WASM] Add kotlin.math implementation 2022-01-05 13:12:32 +01:00
Ivan Kylchik 6fc56477bf Drop all tests that disable features for language version less than 3 2021-12-28 20:08:56 +03:00
Igor Yakovlev 4f9b54da26 [WASM] Remove ignore from wasm std text tests 2021-12-07 21:33:28 +03:00
Mikhail Glukhikh cf104c8433 FIR: add status line to all failing black box tests 2021-11-20 03:37:31 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Igor Laevsky 50ca86838f [WASM] Fix build 2021-10-14 17:24:07 +03:00
Igor Laevsky cb5bef1535 [Wasm] Remove unnecessary testHelpers and add assertions from stdlib 2021-10-14 17:24:06 +03:00
Igor Laevsky e331a52e75 [Wasm] Mute/unmute box tests after kotlin.test support 2021-10-14 17:24:05 +03:00
Svyatoslav Kuzmich aa5f98f919 [JS] Remove KJS_WITH_FULL_RUNTIME for tests that already have WITH_RUNTIME 2021-10-07 22:36:18 +03:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Alexander Udalov e857966edb JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
This feature is enabled by default since 1.4, which is the earliest
language version supported by Kotlin at this moment.
2021-09-14 22:29:12 +02:00
Igor Laevsky 00f61978b8 WASM: Enable exception handling tests 2021-09-08 19:56:38 +03:00
Dmitry Petrov 851980e36f JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs 2021-05-18 22:20:12 +03:00
Andrey Zinovyev 07e47140a6 [FIR] Treat unsigned numbers as primitives in constant checker 2021-05-13 10:11:59 +03:00
Dmitry Petrov 5324cbe729 Minor: update tests 2021-04-21 19:10:32 +03:00
Steven Schäfer d3d4e94cd6 JVM: Fix constant folding for unsigned values 2021-04-21 19:10:31 +03:00
Shagen Ogandzhanian e0e2715864 [js] Fix constant folding for unsigned aithmetic in IR
this resolves KT-44138
2021-03-30 16:53:12 +02:00
Dmitriy Novozhilov 245bc7c8e2 [FIR2IR] Fix interpreting constants from const properties from other module 2021-03-02 19:11:26 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Ivan Kylchik 027d177c15 Remove IGNORE_FIR from tests that are using unsigned constants 2020-06-25 12:30:23 +03:00
Ivan Kylchik 27c52f54ca Remove IGNORE_FIR from tests that are passing after constant folding 2020-06-24 16:12:59 +03:00
Jinseong Jeon b076bec07f FIR deserializer: signature-aware annotation loading for functions 2020-06-19 10:21:09 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
Pavel Punegov d0e28d7c8d Ignore Java-sepcific test in Native 2020-03-30 18:31:50 +03:00
Mikhail Zarechenskiy 191fb02bf6 [NI] Consider intersection type with number type as Nothing
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>

 #KT-37302 Fixed
2020-03-23 16:39:21 +03:00
Juan Chen 7249d2f889 [FIR] Fix translation of invokes & add return expressions for lambdas
* fixed NoSuchMethod caused by mismatched signatures of the "invoke" method generated for lambda arguments
* added test cases in invoke.kt for KFunction and anonymous functions
* added a transformer to wrap the last expression in the bodies of lambdas with return
2020-02-06 12:44:14 +03:00
Roman Artemev 6ba8fbd451 [IR BE] Refactored FoldConstantLowering
- Fix `toString` evaluation for unsigned types in FoldConstantLowering
 - make corner cases around float/double evaluation work for K/JS
 - remove usage of kotlin type
2019-12-24 19:26:06 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Steven Schäfer 0b76f60b63 JVM IR: Handle NonInlinedConst 2019-10-05 10:52:59 +02:00
Ting-Yuan Huang 1b4d26e490 psi2ir: keep the type of when when possible
Ideally, the type of `IrWhen` should be provided by type inference for
a consistent behavior. `USED_AS_EXPRESSION` from CFG isn't always
consistent with type inference, unfortunately.

The behavior is now aligned with `if`. The type of `when` is kept when
it *can* be an expression, instead of whether it is used or not.
2019-06-05 10:23:44 +02:00
Roman Artemev c352117eab [JS IR BE] Set correct runtime for JS IR BE tests 2019-05-16 19:27:41 +03:00
pyos 5b595b58b2 JVM_IR: fold constant string concatenations 2019-04-23 16:20:43 +02:00
pyos ef5e02da84 JVM_IR: handle Nothing and Unit more consistently.
* In blocks, discard the result of any statement that has a return
   type other than void. This was previously done by wrapping each
   statement into an "implicit Unit conversion" that was actually
   compiled down to a stack pop instead. If an expression happened to
   already have type Unit, however, such a conversion was not inserted,
   resulting in a stray reference on the stack. These conversions are
   now redundant and should probably be removed.

 * In assignments and non-exhaustive conditionals, materialize a Unit
   on the stack to avoid depth mismatches that trip up the bytecode
   validator. Because such expressions are generally used at block level
   (and, indeed, the frontend will reject a non-exhaustive conditional
   used as an expression), combined with the above change this results
   in no additional GETSTATIC opcodes, as they are immediately removed
   by the peephole optimizer.
2019-03-26 13:32:02 +01:00
Ting-Yuan Huang 79fcaae991 Implement constant folding in the IR backend for JVM
The newly added pass folds the set of constant functions of the
current backend, plus IrBuiltIns.
2019-03-20 21:02:55 +01:00
Roman Artemev 91ea377622 [JS IR BE] Fix translation for float literals 2018-10-25 15:48:42 +03:00
Dmitry Petrov 813e4c966a Update testData for constant initializers in IR 2018-10-02 17:08:55 +03:00
Georgy Bronnikov ade640eadb JVM_IR. Support compile time constants 2018-10-01 12:25:55 +03:00
Georgy Bronnikov 487f500f85 Revert "JVM_IR. Support compile time constants"
This reverts commit 055215c54f.
2018-09-25 05:24:48 +03:00
Georgy Bronnikov 055215c54f JVM_IR. Support compile time constants 2018-09-25 01:38:51 +03:00
Alexander Udalov 4f803d03cf Minor, fix test data 2018-08-31 19:54:08 +02:00
Pavel Punegov 2ff6047845 Update ignore tag for Native backend 2018-08-28 13:48:43 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Anton Bannykh 07b3b66fd9 JS IR: unmute tests 2018-07-10 13:34:19 +03:00