Skip to content

Commit

Permalink
feat(compiler): Add @unsafe attribute for low-level code (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
jozanza committed Mar 6, 2022
1 parent 0c7cb82 commit 212faca
Show file tree
Hide file tree
Showing 59 changed files with 5,635 additions and 7,992 deletions.
9 changes: 5 additions & 4 deletions compiler/src/codegen/comp_utils.re
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ open Grain_utils;

let wasm_type =
fun
| I32Type => Type.int32
| I64Type => Type.int64
| F32Type => Type.float32
| F64Type => Type.float64;
| Types.HeapAllocated
| Types.StackAllocated(WasmI32) => Type.int32
| Types.StackAllocated(WasmI64) => Type.int64
| Types.StackAllocated(WasmF32) => Type.float32
| Types.StackAllocated(WasmF64) => Type.float64;

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

Expand Down
Loading

0 comments on commit 212faca

Please sign in to comment.