We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a13224e commit 13d090dCopy full SHA for 13d090d
src/wasm-compiler/constants.ts
@@ -66,7 +66,14 @@ export const MAKE_BOOL_FX = wasm
66
.func("$_make_bool")
67
.params({ $value: i32 })
68
.results(i32, i64)
69
- .body(i32.const(TYPE_TAG.BOOL), i64.extend_i32_u(local.get("$value")));
+ .body(
70
+ i32.const(TYPE_TAG.BOOL),
71
+ wasm
72
+ .if(i32.eqz(local.get("$value")))
73
+ .results(i64)
74
+ .then(i64.const(0))
75
+ .else(i64.const(1))
76
+ );
77
78
// upper 32: pointer; lower 32: length
79
export const MAKE_STRING_FX = wasm
0 commit comments