package libsail

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Libsail.Jib_utilSource

Sourceval symbol_generator : string -> (unit -> Ast.id) * (unit -> unit)
Sourceval instr_counter : int ref
Sourceval instr_number : unit -> int
Sourceval iif : Parse_ast.l -> Jib.cval -> Jib.instr list -> Jib.instr list -> Jib.ctyp -> Jib.instr
Sourceval ifuncall : Parse_ast.l -> Jib.clexp -> (Ast.id * Jib.ctyp list) -> Jib.cval list -> Jib.instr
Sourceval iextern : Parse_ast.l -> Jib.clexp -> (Ast.id * Jib.ctyp list) -> Jib.cval list -> Jib.instr
Sourceval iclear : ?loc:Parse_ast.l -> Jib.ctyp -> Jib.name -> Jib.instr
Sourceval ireturn : ?loc:Parse_ast.l -> Jib.cval -> Jib.instr
Sourceval iblock : ?loc:Parse_ast.l -> Jib.instr list -> Jib.instr
Sourceval itry_block : Parse_ast.l -> Jib.instr list -> Jib.instr
Sourceval icomment : ?loc:Parse_ast.l -> string -> Jib.instr
Sourceval ilabel : ?loc:Parse_ast.l -> string -> Jib.instr
Sourceval igoto : ?loc:Parse_ast.l -> string -> Jib.instr
Sourceval iundefined : ?loc:Parse_ast.l -> Jib.ctyp -> Jib.instr
Sourceval imatch_failure : Parse_ast.l -> Jib.instr
Sourceval iraw : ?loc:Parse_ast.l -> string -> Jib.instr
Sourceval ijump : Parse_ast.l -> Jib.cval -> string -> Jib.instr
Sourcemodule Name : sig ... end
Sourcemodule NameSet : sig ... end
Sourcemodule NameMap : sig ... end
Sourceval current_exception : Jib.name
Sourceval have_exception : Jib.name
Sourceval throw_location : Jib.name
Sourceval return : Jib.name
Sourceval name : Ast.id -> Jib.name
Sourceval global : Ast.id -> Jib.name
Sourceval cval_rename : Jib.name -> Jib.name -> Jib.cval -> Jib.cval
Sourceval map_cval : (Jib.cval -> Jib.cval) -> Jib.cval -> Jib.cval
Sourceval clexp_rename : Jib.name -> Jib.name -> Jib.clexp -> Jib.clexp
Sourceval instr_rename : Jib.name -> Jib.name -> Jib.instr -> Jib.instr
Sourceval string_of_name : ?deref_current_exception:bool -> ?zencode:bool -> Jib.name -> string
Sourceval string_of_op : Jib.op -> string
Sourceval string_of_ctyp : Jib.ctyp -> string
Sourceval string_of_uid : (Ast.id * Jib.ctyp list) -> string
Sourceval 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.

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

Map over each instruction within an instruction, bottom-up

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

Map over each instruction within an instruction, bottom-up

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

Iterate over each instruction within an instruction, bottom-up

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

Map over each instruction in a cdef using map_instr

Sourceval 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

Sourceval 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

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

Map over each instruction in a cdef using concatmap_instr

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

Map over each ctyp in a cdef using map_instr_ctyp

Sourceval cdef_map_cval : (Jib.cval -> Jib.cval) -> Jib.cdef -> Jib.cdef
Sourceval map_instrs : (Jib.instr list -> Jib.instr list) -> Jib.instr -> Jib.instr
Sourceval map_instr_list : (Jib.instr -> Jib.instr) -> Jib.instr list -> Jib.instr list
Sourceval map_instrs_list : (Jib.instr list -> Jib.instr list) -> Jib.instr list -> Jib.instr list
Sourceval instr_ids : Jib.instr -> NameSet.t
Sourceval instr_reads : Jib.instr -> NameSet.t
Sourceval instr_writes : Jib.instr -> NameSet.t
Sourceval filter_instrs : (Jib.instr -> bool) -> Jib.instr list -> Jib.instr list
Sourceval 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. *

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