Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289520

G1: Remove duplicate checks in G1BarrierSetC1::post_barrier

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • gc
    • b05

      `G1BarrierSetC1::post_barrier` has the following checks:

      ```
        if (!new_val->is_register()) {
          XXX
        }
        assert(new_val->is_register(), "must be a register at this point");
        
        ...
        
        if (!new_val->is_register()) {
          YYY
        }
        assert(new_val->is_register(), "must be a register at this point");
      ```

      The second `if` is redundant and can be removed.

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: