-class Borrow(Binop):
- """Returns the borrow bit from and implied subtractions of its 2 operands"""
- flags = []
-
-class Bound(Op):
- """Performs a bounds-check: if lower <= index < upper then return index,
- otherwise throw an exception."""
- ins = [
- ("mem", "memory dependency"),
- ("index", "value to test"),
- ("lower", "lower bound (inclusive)"),
- ("upper", "upper bound (exclusive)"),
- ]
- outs = [
- ("M", "memory result", "pn_Generic_M"),
- ("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
- ("X_except", "control flow when exception occured", "pn_Generic_X_except"),
- ("res", "the checked index", "pn_Generic_other"),
- ]
- flags = [ "fragile", "highlevel" ]
- pinned = "exception"
- pinned_init = "op_pin_state_pinned"
- attr_struct = "bound_attr"
- attrs_name = "bound"
-
-class Builtin(Op):