erlang: Phase 9h — erlang_ext.ml OCaml extension (opcodes 222-239, registered at startup)

This commit is contained in:
2026-05-15 08:24:57 +00:00
parent 12b56afcd3
commit 72896392c8
3 changed files with 169 additions and 0 deletions

View File

@@ -26,6 +26,12 @@ open Sx_types
invisible to the runtime. The applied call is a harmless lookup. *)
let () = ignore (Sx_vm_extensions.id_of_name "")
(* Register the Erlang opcode extension (Phase 9h) so
`extension-opcode-id "erlang.OP_*"` resolves to the host ids the SX
stub dispatcher consults. Guarded: a double-register raises Failure,
which we swallow so a re-entered server process doesn't die. *)
let () = try Erlang_ext.register () with Failure _ -> ()
(* ====================================================================== *)
(* Font measurement via otfm — reads OpenType/TrueType font tables *)
(* ====================================================================== *)