[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
This commit is contained in:
Svyatoslav Kuzmich
2019-08-07 14:27:18 +03:00
parent 812083ee05
commit 6e6ffa12a6
106 changed files with 6418 additions and 584 deletions
@@ -0,0 +1,32 @@
// 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"
}