Module Arg.Arena

An ordered collection of locations.

Arena is an expendable collection of data locations (usually registers) that are used to pass arguments. Passing an argument via an arena location consumes it so it is no longer available in the same computation.

If a computation that used an arena location is later rejected then the register is available again (the same as with any other side-effects of a rejected compuation).

The order of locations in arena, as well as their numbering according to that order, usually matters. Many targets have registers with the alphabetic orders of registers matching their arena orders (with notable exception of x86) that enables the direct usage of the Theory.Target.regs function to create arenas.

val create : _ Bap_core_theory.Theory.Var.t list -> arena t

create regs creates an arena from the ordered list of registers.

All registers must have the same size and the list could be empty. The registers will be used in the order of their appereance in the regs list.

val of_exps : Bap.Std.exp list -> arena t

of_exps xs creates an arena from the ordered list of expressions.

The expressions must have the same type and the list could be empty. The locations will be used in the order in which they were specified.

  • since 2.5.0

of_roles t roles creates an arena from registers of the specified roles.

The registers are ordered in the alphabetic order. The returned arena might be empty.

iargs t the integer argument arena.

An alias to of_roles [function_argument; integer]

irets t the integer return values arena.

An alias to of_roles [function_return; integer]

fargs t the floating-point argument arena.

An alias to of_roles [function_argument; floating]

frets t the floating-point return values arena.

An alias to of_roles [function_return; floatin]