• 
      

    Buffer incoming opcodes and the filtered interdiff opcodes.

    Review Request #15202 — Created July 29, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-8.x

    Reviewers

    The existing interdiff filtering algorithm tracks a single pending
    opcode to process the next iteration, and yields filtered-equal
    opcodes as they're calculated.

    In preparation for some additional work on the algorithm that will
    require opcode backtracking, this change switches to a
    DiffOpcodeBuffer, which provides peek, consume, and queue operations
    for the opcodes. This replaces the old pending_opcode, simplifies the
    opcode loop, and gives us some look-ahead features we'll be using.

    filtered-equal opcodes are no longer yielded as they're calculated.
    Instead, they're added to a list, which tracks the original tag for
    processing (in the upcoming algorithm changes). When it's time to yield
    an opcode, it will first flush the filtered opcodes, turning them into
    filtered-equal as they're yielded, and once that's flushed the new
    non-filtered opcode will be yielded.

    At the moment, this doesn't change anything about the processing of
    interdiffs. The upcoming changes will take advantage of this to
    backtrack and buffer opcodes through some new heuristics.

    Unit tests pass.

    Commits

    Files