We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When local exceptions are turned into jumps, unboxing applies. However in this example, the argument of Exit3 doesn't get unboxed.
Exit3
type 'a ref = { mutable contents : 'a } external ref : 'a -> 'a ref = "%makemutable" external ( ! ) : 'a ref -> 'a = "%field0" external ( := ) : 'a ref -> 'a -> unit = "%setfield0" external ( < ) : 'a -> 'a -> bool = "%lessthan" external ( + ) : int -> int -> int = "%addint" external ( +. ) : float -> float -> float = "%addfloat" external raise : exn -> 'a = "%raise" external raise_notrace : exn -> 'a = "%raise_notrace" exception Exit3 of int option let f5 x g = let r = ref x in try while !r < 42 do if try g !r with _ -> false then begin if !r < 4 then raise_notrace (Exit3 (Some (!r + 2))) else raise_notrace (Exit3 None) end; r := !r + 1 done; 0 with (Exit3 x) -> match x with | None -> 4 | Some x -> x + 5
The text was updated successfully, but these errors were encountered:
This issue can be fixed by combining #316 and #532.
Sorry, something went wrong.
Gbury
No branches or pull requests
When local exceptions are turned into jumps, unboxing applies. However in this example, the argument of
Exit3
doesn't get unboxed.The text was updated successfully, but these errors were encountered: