Skip to content

Commit 212faca

Browse files
authored
feat(compiler): Add @unsafe attribute for low-level code (#1074)
1 parent 0c7cb82 commit 212faca

File tree

59 files changed

+5635
-7992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+5635
-7992
lines changed

compiler/src/codegen/comp_utils.re

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ open Grain_utils;
55

66
let wasm_type =
77
fun
8-
| I32Type => Type.int32
9-
| I64Type => Type.int64
10-
| F32Type => Type.float32
11-
| F64Type => Type.float64;
8+
| Types.HeapAllocated
9+
| Types.StackAllocated(WasmI32) => Type.int32
10+
| Types.StackAllocated(WasmI64) => Type.int64
11+
| Types.StackAllocated(WasmF32) => Type.float32
12+
| Types.StackAllocated(WasmF64) => Type.float64;
1213

1314
let encoded_int32 = n => n * 2 + 1;
1415

0 commit comments

Comments
 (0)