Commit Graph

34 Commits

Author SHA1 Message Date
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
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Roman Artemev 6ac4fd2e5f [JS IR BE] Update test data 2018-06-14 19:54:30 +03:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Mikhail Zarechenskiy 73b3efd628 Remove LANGUAGE_VERSION directive from blackBox codegen tests 2017-10-24 11:44:02 +03:00
Dmitry Petrov a84c2a6f31 Improve string concatentation & string templates code generation
Reuse StringBuilder instances for nested subexpressions.
(NB StringBuilder instance for string template with a string
concatenation inside an expression entry, such as `"${"a" + "b"}"`,
will not be reused, although that doesn't seem to be a real-life issue).

 #KT-18558 Fixed Target versions 1.1.4
 #KT-13682 Fixed Target versions 1.1.4

Join adjacent strings literals, escaped strings, and constant values
(in a language version that supports const val inlining).
Use StringBuilder#append(char) for single-character constants
(e.g., " " in "$a $b").

 #KT-17280 Fixed Target versions 1.1.4
 #KT-15235 Fixed Target versions 1.1.4
2017-06-27 14:28:42 +03:00
Alexey Andreev 069711c3d5 JS: fix translation of float constants. See KT-8413 2016-12-30 16:22:07 +03:00
Zalim Bashorov 596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Michael Bogdanov 926e3fd350 Test for obsolete KT-9560
#KT-9560 Obsolete
2015-10-20 19:19:43 +03:00
Michael Bogdanov 3452fc8d02 Don't initialize const properties in constructor
#KT-9532 Fixed
2015-10-17 15:31:57 +03:00
Natalia Ukhorskaya e5a3518248 Parse longs with 'L' suffix. Report error if 'l' used. 2013-12-05 15:23:40 +04:00
Natalia Ukhorskaya b6ce6c5e5a Parse floats with 'F' or 'f' suffix 2013-12-05 15:22:01 +04:00
Svetlana Isakova a49dcc0dd4 analyze when entry in independent context 2013-09-03 17:05:21 +04:00