package libsail

  1. Overview
  2. Docs
val symbol_generator : string -> (unit -> Ast.id) * (unit -> unit)
val instr_counter : int ref
val instr_number : unit -> int
val idecl : Parse_ast.l -> Jib.ctyp -> Jib.name -> Jib.instr
val ireset : Parse_ast.l -> Jib.ctyp -> Jib.name -> Jib.instr
val iif : Parse_ast.l -> Jib.cval -> Jib.instr list -> Jib.instr list -> Jib.ctyp -> Jib.instr
val ifuncall : Parse_ast.l -> Jib.clexp -> (Ast.id * Jib.ctyp list) -> Jib.cval list -> Jib.instr
val iextern : Parse_ast.l -> Jib.clexp -> (Ast.id * Jib.ctyp list) -> Jib.cval list -> Jib.instr
val iclear : ?loc:Parse_ast.l -> Jib.ctyp -> Jib.name -> Jib.instr
val ireturn : ?loc:Parse_ast.l -> Jib.cval -> Jib.instr
val iend : Parse_ast.l -> Jib.instr
val iblock : ?loc:Parse_ast.l -> Jib.instr list -> Jib.instr
val itry_block : Parse_ast.l -> Jib.instr list -> Jib.instr
val ithrow : Parse_ast.l -> Jib.cval -> Jib.instr
val icomment : ?loc:Parse_ast.l -> string -> Jib.instr
val ilabel : ?loc:Parse_ast.l -> string -> Jib.instr
val igoto : ?loc:Parse_ast.l -> string -> Jib.instr
val iundefined : ?loc:Parse_ast.l -> Jib.ctyp -> Jib.instr
val imatch_failure : Parse_ast.l -> Jib.instr
val iexit : Parse_ast.l -> Jib.instr
val iraw : ?loc:Parse_ast.l -> string -> Jib.instr
val ijump : Parse_ast.l -> Jib.cval -> string -> Jib.instr
module Name : sig ... end
module NameSet : sig ... end
module NameMap : sig ... end
val current_exception : Jib.name
val have_exception : Jib.name
val throw_location : Jib.name
val return : Jib.name
val name : Ast.id -> Jib.name
val global : Ast.id -> Jib.name
val cval_rename : Jib.name -> Jib.name -> Jib.cval -> Jib.cval
val map_cval : (Jib.cval -> Jib.cval) -> Jib.cval -> Jib.cval
val clexp_rename : Jib.name -> Jib.name -> Jib.clexp -> Jib.clexp
val instr_rename : Jib.name -> Jib.name -> Jib.instr -> Jib.instr
val string_of_name : ?deref_current_exception:bool -> ?zencode:bool -> Jib.name -> string
val string_of_op : Jib.op -> string
val string_of_ctyp : Jib.ctyp -> string
val string_of_uid : (Ast.id * Jib.ctyp list) -> string
val full_string_of_ctyp : Jib.ctyp -> string

This function is like string_of_ctyp, but recursively prints all constructors in variants and structs. Used for debug output.

val string_of_value : Value2.vl -> string
val string_of_cval : Jib.cval -> string
val map_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.ctyp -> Jib.ctyp
val ctyp_equal : Jib.ctyp -> Jib.ctyp -> bool
val ctyp_compare : Jib.ctyp -> Jib.ctyp -> int
module CT : sig ... end
module CTList : sig ... end
module CTSet : sig ... end
module CTMap : sig ... end
module CTListSet : sig ... end
module UId : sig ... end
module UBindings : sig ... end
val ctyp_vars : Jib.ctyp -> Ast_util.KidSet.t
val ctyp_suprema : Jib.ctyp -> Jib.ctyp
val merge_unifiers : Ast.kid -> Jib.ctyp -> Jib.ctyp -> Jib.ctyp option
val ctyp_ids : Jib.ctyp -> Ast_util.IdSet.t
val is_ref_ctyp : Jib.ctyp -> bool
val unref_ctyp : Jib.ctyp -> Jib.ctyp
val is_polymorphic : Jib.ctyp -> bool
val cval_deps : Jib.cval -> NameSet.t
val clexp_deps : Jib.clexp -> NameSet.t * NameSet.t
val instr_deps : Jib.instr_aux -> NameSet.t * NameSet.t
module NameCT : sig ... end
module NameCTSet : sig ... end
module NameCTMap : sig ... end
val clexp_typed_writes : Jib.clexp -> NameCTSet.t
val instr_typed_writes : Jib.instr -> NameCTSet.t
val map_clexp_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.clexp -> Jib.clexp
val map_cval_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.cval -> Jib.cval
val map_instr_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.instr -> Jib.instr
val map_instr_cval : (Jib.cval -> Jib.cval) -> Jib.instr -> Jib.instr
val map_instr : (Jib.instr -> Jib.instr) -> Jib.instr -> Jib.instr

Map over each instruction within an instruction, bottom-up

val concatmap_instr : (Jib.instr -> Jib.instr list) -> Jib.instr -> Jib.instr list

Map over each instruction within an instruction, bottom-up

val iter_instr : (Jib.instr -> unit) -> Jib.instr -> unit

Iterate over each instruction within an instruction, bottom-up

val cdef_map_instr : (Jib.instr -> Jib.instr) -> Jib.cdef -> Jib.cdef

Map over each instruction in a cdef using map_instr

val map_funcall : (Jib.instr -> Jib.instr list -> Jib.instr list) -> Jib.instr list -> Jib.instr list

Map over function calls in an instruction sequence, including exception handler where present

val cdef_map_funcall : (Jib.instr -> Jib.instr list -> Jib.instr list) -> Jib.cdef -> Jib.cdef

Map over each function call in a cdef using map_funcall

val cdef_concatmap_instr : (Jib.instr -> Jib.instr list) -> Jib.cdef -> Jib.cdef

Map over each instruction in a cdef using concatmap_instr

val ctype_def_map_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.ctype_def -> Jib.ctype_def
val cdef_map_ctyp : (Jib.ctyp -> Jib.ctyp) -> Jib.cdef -> Jib.cdef

Map over each ctyp in a cdef using map_instr_ctyp

val cdef_map_cval : (Jib.cval -> Jib.cval) -> Jib.cdef -> Jib.cdef
val map_instrs : (Jib.instr list -> Jib.instr list) -> Jib.instr -> Jib.instr
val map_instr_list : (Jib.instr -> Jib.instr) -> Jib.instr list -> Jib.instr list
val map_instrs_list : (Jib.instr list -> Jib.instr list) -> Jib.instr list -> Jib.instr list
val instr_ids : Jib.instr -> NameSet.t
val instr_reads : Jib.instr -> NameSet.t
val instr_writes : Jib.instr -> NameSet.t
val filter_instrs : (Jib.instr -> bool) -> Jib.instr list -> Jib.instr list
val label_counter : int ref

GLOBAL: label_counter is used to make sure all labels have unique names. Like gensym_counter it should be safe to reset between top-level definitions. *

val label : string -> string
val infer_call : Jib.op -> Jib.cval list -> Jib.ctyp
val cval_ctyp : Jib.cval -> Jib.ctyp
val clexp_ctyp : Jib.clexp -> Jib.ctyp
val instr_ctyps : Jib.instr -> CTSet.t
val instrs_ctyps : Jib.instr list -> CTSet.t
val ctype_def_ctyps : Jib.ctype_def -> Jib.ctyp list
val cdef_ctyps : Jib.cdef -> CTSet.t
val c_ast_registers : Jib.cdef list -> (Ast.id * Jib.ctyp * Jib.instr list) list
val instr_split_at : ('a -> bool) -> 'a list -> 'a list * 'a list
val instrs_rename : Jib.name -> Jib.name -> Jib.instr list -> Jib.instr list
OCaml

Innovation. Community. Security.