jon.recoil.org

Module Jit_backend

JIT backend dispatch - architecture-independent interface for JIT. This module allows jit.ml to register a callback without knowing about architecture-specific emitters.

module String_map : Map.S with type key = string
type packed_sections =
  1. | Packed : {
    1. emitter : (module Binary_emitter_intf.S with type Assembled_section.t = 'a and type Relocation.t = 'r);
    2. sections : 'a String_map.t;
    } -> packed_sections

Packed sections with their Binary_emitter.S module, hiding the architecture-specific types using an existential.

type callback = packed_sections -> unit
val register : callback -> unit

Register a JIT callback. When code is generated, the callback will be invoked with the assembled sections packed with their emitter module. This handles architecture dispatch internally.

val unregister : unit -> unit

Unregister the JIT callback and restore previous state.