Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Activating Two-Phase Borrows

activateTwophaseBorrowCreatedAt

reserveLocation is a function from borrow edges to the MIR location at which the borrow edge was created.

The activateTwophaseBorrowCreatedAt operation takes a single parameter:

  • , a MIR location

The operation is implemented as follows:

  • If there exists a borrow edge in the graph such that l = reserveLocation(e):
    • If there exists a place node for in the graph:
      • Restore capability to
    • If is not owned:
      • Downgrade the capability of every ancestor of to None
  • TODO Logic is bad