FFI.Code
type t = private {
co_name : string;
co_filename : string;
co_flags : int;
co_cellvars : string array;
A tuple containing the names of nonlocal variables. These are the local variables of a function accessed by its inner functions.
*)co_freevars : string array;
A tuple containing the names of free variables. Free variables are the local variables of an outer function which are accessed by its inner function.
*)co_names : string array;
A tuple containing the names used by the bytecode which can be global variables, functions, and classes or also attributes loaded from objects. There are "global names". Local variables & the like are going in other arrays
*)co_varnames : string array;
A tuple containing the local names used by the bytecode (arguments first, then the local variables).
*)co_nlocals : int;
co_argcount : int;
co_firstlineno : int;
co_posonlyargcount : int;
co_stacksize : int;
co_kwonlyargcount : int;
co_lnotab : char array;
co_consts : Constant.t array;
A tuple containing the literals used by the bytecode. By experience, it is only int
, string
, tuple
s, None
or code
objects
instructions : Instruction.t list;
}
val pp : Ppx_show_runtime.Format.formatter -> t -> unit
val show : t -> string
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
val full_show : t -> string
val is_closure : t -> bool
val get_arguments : t -> string array
val get_locals : t -> string array