6e6ffa12a6
- 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
33 lines
436 B
Kotlin
Vendored
33 lines
436 B
Kotlin
Vendored
// EXPECTED_REACHABLE_NODES: 1225
|
|
package foo
|
|
|
|
fun box(): String {
|
|
|
|
var x: Long = 2L
|
|
x++
|
|
assertEquals(3L, x)
|
|
++x
|
|
assertEquals(4L, x)
|
|
|
|
var y = x++
|
|
assertEquals(4L, y)
|
|
assertEquals(5L, x)
|
|
|
|
y = ++x
|
|
assertEquals(6L, y)
|
|
assertEquals(6L, x)
|
|
|
|
x--
|
|
assertEquals(5L, x)
|
|
--x
|
|
assertEquals(4L, x)
|
|
|
|
y = +x
|
|
assertEquals(4L, y)
|
|
|
|
y = -x
|
|
assertEquals(-4L, y)
|
|
|
|
return "OK"
|
|
}
|