package ocaml-base-compiler

  1. Overview
  2. Docs
type integer_comparison =
  1. | Isigned of Cmm.integer_comparison
  2. | Iunsigned of Cmm.integer_comparison
type integer_operation =
  1. | Iadd
  2. | Isub
  3. | Imul
  4. | Imulh
  5. | Idiv
  6. | Imod
  7. | Iand
  8. | Ior
  9. | Ixor
  10. | Ilsl
  11. | Ilsr
  12. | Iasr
  13. | Icomp of integer_comparison
  14. | Icheckbound
type float_comparison = Cmm.float_comparison
type test =
  1. | Itruetest
  2. | Ifalsetest
  3. | Iinttest of integer_comparison
  4. | Iinttest_imm of integer_comparison * int
  5. | Ifloattest of float_comparison
  6. | Ioddtest
  7. | Ieventest
type operation =
  1. | Imove
  2. | Ispill
  3. | Ireload
  4. | Iconst_int of nativeint
  5. | Iconst_float of int64
  6. | Iconst_symbol of string
  7. | Icall_ind
  8. | Icall_imm of {
    1. func : string;
    }
  9. | Itailcall_ind
  10. | Itailcall_imm of {
    1. func : string;
    }
  11. | Iextcall of {
    1. func : string;
    2. ty_res : Cmm.machtype;
    3. ty_args : Cmm.exttype list;
    4. alloc : bool;
    }
  12. | Istackoffset of int
  13. | Iload of Cmm.memory_chunk * Arch.addressing_mode
  14. | Istore of Cmm.memory_chunk * Arch.addressing_mode * bool
  15. | Ialloc of {
    1. bytes : int;
    2. dbginfo : Debuginfo.alloc_dbginfo;
    }
  16. | Iintop of integer_operation
  17. | Iintop_imm of integer_operation * int
  18. | Inegf
  19. | Iabsf
  20. | Iaddf
  21. | Isubf
  22. | Imulf
  23. | Idivf
  24. | Ifloatofint
  25. | Iintoffloat
  26. | Ispecific of Arch.specific_operation
  27. | Iname_for_debugger of {
    1. ident : Backend_var.t;
    2. which_parameter : int option;
    3. provenance : unit option;
    4. is_assignment : bool;
    }
    (*

    Iname_for_debugger has the following semantics: (a) The argument register(s) is/are deemed to contain the value of the given identifier. (b) If is_assignment is true, any information about other Reg.ts that have been previously deemed to hold the value of that identifier is forgotten.

    *)
type instruction = {
  1. desc : instruction_desc;
  2. next : instruction;
  3. arg : Reg.t array;
  4. res : Reg.t array;
  5. dbg : Debuginfo.t;
  6. mutable live : Reg.Set.t;
  7. mutable available_before : Reg_availability_set.t;
  8. mutable available_across : Reg_availability_set.t option;
}
and instruction_desc =
  1. | Iend
  2. | Iop of operation
  3. | Ireturn
  4. | Iifthenelse of test * instruction * instruction
  5. | Iswitch of int array * instruction array
  6. | Icatch of Cmm.rec_flag * (int * instruction) list * instruction
  7. | Iexit of int
  8. | Itrywith of instruction * instruction
  9. | Iraise of Lambda.raise_kind
type fundecl = {
  1. fun_name : string;
  2. fun_args : Reg.t array;
  3. fun_body : instruction;
  4. fun_codegen_options : Cmm.codegen_option list;
  5. fun_dbg : Debuginfo.t;
  6. fun_num_stack_slots : int array;
  7. fun_contains_calls : bool;
}
val dummy_instr : instruction
val end_instr : unit -> instruction
val instr_cons : instruction_desc -> Reg.t array -> Reg.t array -> instruction -> instruction
val instr_cons_debug : instruction_desc -> Reg.t array -> Reg.t array -> Debuginfo.t -> instruction -> instruction
val instr_iter : (instruction -> unit) -> instruction -> unit
val operation_can_raise : operation -> bool
OCaml

Innovation. Community. Security.