Rewrote enum lowering to support usage from other modules.

- Split up enum lowering into two stages: descriptors creation and IR creation.
- Added link stage test.
- Enum.valueOf() uses binary search instead of linear.
This commit is contained in:
Igor Chevdar
2017-03-03 13:47:05 +03:00
parent bf65a78a93
commit 0ff306ad3a
10 changed files with 280 additions and 141 deletions
@@ -1,8 +1,11 @@
enum class E {
E3,
E1,
E2
}
fun main(args: Array<String>) {
println(E.values()[0].toString())
println(E.values()[1].toString())
println(E.values()[2].toString())
}