Skip to content
  • Hannes Siebenhandl's avatar
    1bd3d13e
    Add `UnitId` to `EvalBreakpoint` · 1bd3d13e
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    The `EvalBreakpoint` is used to communicate that a breakpoint was
    encountered during code evaluation.
    This `EvalBreakpoint` needs to be converted to an `InternalBreakpointId`
    which stores a `Module` to uniquely find the correct `Module` in the
    Home Package Table.
    
    The `EvalBreakpoint` used to store only a `ModuleName` which is then
    converted to a `Module` based on the currently active home unit.
    This is incorrect in the face of multiple home units, the break point
    could be in an entirely other home unit!
    To fix this, we additionally store the `UnitId` of the `Module` in
    `EvalBreakpoint` to later reconstruct the correct `Module`
    
    All of the changes are the consequence of extending `EvalBreakpoint`
    with the additional `ShortByteString` of the `UnitId`.
    
    For performance reasons, we store the `ShortByteString` backing the
    `UnitId` directly, avoiding marshalling overhead.
    1bd3d13e
    Add `UnitId` to `EvalBreakpoint`
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    The `EvalBreakpoint` is used to communicate that a breakpoint was
    encountered during code evaluation.
    This `EvalBreakpoint` needs to be converted to an `InternalBreakpointId`
    which stores a `Module` to uniquely find the correct `Module` in the
    Home Package Table.
    
    The `EvalBreakpoint` used to store only a `ModuleName` which is then
    converted to a `Module` based on the currently active home unit.
    This is incorrect in the face of multiple home units, the break point
    could be in an entirely other home unit!
    To fix this, we additionally store the `UnitId` of the `Module` in
    `EvalBreakpoint` to later reconstruct the correct `Module`
    
    All of the changes are the consequence of extending `EvalBreakpoint`
    with the additional `ShortByteString` of the `UnitId`.
    
    For performance reasons, we store the `ShortByteString` backing the
    `UnitId` directly, avoiding marshalling overhead.
Loading