Skip to content

Commit

Permalink
Change opcode for cont (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhil authored Apr 10, 2023
1 parent 5331635 commit 2877ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion interpreter/binary/decode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ let cont_type s =
let def_type s =
match s7 s with
| -0x20 -> DefFuncT (func_type s)
| -0x21 -> DefContT (cont_type s)
| -0x23 -> DefContT (cont_type s) (* TODO(dhil): See comment in encode.ml *)
| _ -> error s (pos s - 1) "malformed definition type"


Expand Down
5 changes: 4 additions & 1 deletion interpreter/binary/encode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ struct

let def_type = function
| DefFuncT ft -> s7 (-0x20); func_type ft
| DefContT ct -> s7 (-0x21); cont_type ct (* TODO(dhil): I think the GC proposal claims opcode -0x21 for one of the struct/array types. *)
| DefContT ct -> s7 (-0x23); cont_type ct
(* TODO(dhil): This might need to change again in the future as a
different proposal might claim this opcode! GC proposal claimed
the previous opcode we were using. *)

let limits vu {min; max} =
bool (max <> None); vu min; opt vu max
Expand Down

0 comments on commit 2877ce4

Please sign in to comment.