Commit Graph

7 Commits

Author SHA1 Message Date
Mads Ager 05ff2b1292 [JVM_IR] Extend when to switch translation to deal with nested ors.
FIR translates:

```
when (x) {
  1, 2, 3 -> action
  else -> other_action
}
```

to an IR structure with nested ors:

```
if ((x == 1 || x == 2) || (x == 3)) action
else other_action
```

This change allows that to turn into switch instructions in the
JVM backend.
2021-02-16 03:20:07 -08:00
Mark Punzalan 238cc7c257 [FIR] Enable BytecodeText tests for FIR.
143 out of 767 tests (18.6%) are currently failing.
2020-09-29 10:21:21 +03:00
pyos fb194e982e Copy EnumWhenLowering from Kotlin/Native 2019-05-13 19:09:07 +03:00
Mads Ager 3a11322506 Enable bytecode text tests for the JVM_IR backend. 2018-12-21 16:20:45 +01:00
Mikhail Glukhikh b2653ad1e9 Deprecated enum syntax removed: most compiler tests 2015-08-10 16:24:12 +03:00
Alexander Udalov c57441b51b Use '$' instead of '-' in package part class names
Otherwise some tools break (e.g. CheckMethodAdapter in ASM, used in generic
signature writer) because they expect class names to be Java identifiers.

Some tests fixed, some will be fixed in future commits
2014-09-26 10:22:20 +04:00
Denis Zharkov 5a1c995b5c When by enum:
Generate TABLESWITCH/LOOKUPSWITCH bytecode command in case of "when" by enum entries
2014-07-21 17:13:55 +04:00