Files
kotlin-fork/js/js.translator/testData/wasmBox/number/incDecOptimization.kt
T
Svyatoslav Kuzmich 6e6ffa12a6 [WASM] Initial infrastructure
- New module ":compiler:backend.wasm"
    - Initial compiler infra (driver, phaser, context)
    - Subset of Wasm AST
    - Skeleton of IR -> Wasm AST
    - Wasm AST -> WAT transformer

- Testing infra

- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00

21 lines
342 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1283
// CHECK_VARS_COUNT: function=test count=1
// TODO: Support classes
fun test(): String {
var i = 23
var x = ++i
if (x != 24) return "fail1:"
i++
if (i != 25) return "fail2:"
// a.i++, used as expression, requires temporary variable
return "OK"
}
fun box(): String = test()