[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:
+19
@@ -0,0 +1,19 @@
|
||||
fun foo(b: Boolean): String {
|
||||
return if (b) {
|
||||
"OK"
|
||||
} else if (false) {
|
||||
"fail: reached unreachable code at line 5"
|
||||
} else if (true) {
|
||||
"fail: reached unexpected code at line 7"
|
||||
} else if (true) {
|
||||
"fail: reached unreachable code at line 9"
|
||||
} else if (b) {
|
||||
"fail: reached unreachable code at line 11"
|
||||
} else {
|
||||
"fail: reached unreachable code at line 13"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return foo(true)
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
fun foo(b: Boolean): String {
|
||||
return if (b) {
|
||||
"fail: reached unexpected code at line 3"
|
||||
} else if (false) {
|
||||
"fail: reached unreachable code at line 5"
|
||||
} else if (true) {
|
||||
"OK"
|
||||
} else if (true) {
|
||||
"fail: reached unreachable code at line 9"
|
||||
} else if (b) {
|
||||
"fail: reached unreachable code at line 11"
|
||||
} else {
|
||||
"fail: reached unreachable code at line 13"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return foo(false)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun box(): String {
|
||||
if (1 != 0) {
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user