[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:
@@ -0,0 +1,26 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1282
|
||||
package foo
|
||||
|
||||
fun bigValue() = 0x7FFFFFFC
|
||||
|
||||
fun mediumValue() = 0x12345
|
||||
|
||||
fun box(): String {
|
||||
var v = bigValue()
|
||||
v += 1
|
||||
if (v != 0x7FFFFFFD) return "fail1"
|
||||
|
||||
v = bigValue()
|
||||
v += 8
|
||||
if (v != -0x7FFFFFFC) return "fail2"
|
||||
|
||||
v = mediumValue()
|
||||
v *= 0x23456
|
||||
if (v != -2112496338) return "fail3"
|
||||
|
||||
v = bigValue()
|
||||
v *= bigValue()
|
||||
if (v != 16) return "fail4"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user