@Override
  public void beforeRegisterAllocation() {
    super.beforeRegisterAllocation();
    boolean hasDebugInfo = getResult().getLIR().hasDebugInfo();
    if (hasDebugInfo) {
      getResult()
          .setDeoptimizationRescueSlot(
              ((AArch64FrameMapBuilder) getResult().getFrameMapBuilder())
                  .allocateDeoptimizationRescueSlot());
    }

    getResult().setMaxInterpreterFrameSize(debugInfoBuilder.maxInterpreterFrameSize());
  }
 private HotSpotLockStack getLockStack() {
   assert debugInfoBuilder != null && debugInfoBuilder.lockStack() != null;
   return debugInfoBuilder.lockStack();
 }